Commit graph

4198 commits

Author SHA1 Message Date
Dennis Kempin
a919bcb7a5 tools/dev_container: Support cros checkouts
Mount the cros root instead so the git worktree or symlink can be
resolved.

BUG=b:234322274
TEST=./tools/dev_container

Change-Id: I52d0cbe5e9a38cb6febcf1f328970e13209bcf9f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3768048
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Dennis Kempin <denniskempin@google.com>
2022-07-18 23:32:48 +00:00
Daniel Verkamp
4ca8a5fe3a config: parse VvuOption with serde_keyvalue
This removes a bunch of boilerplate parsing code.

BUG=None
TEST=cargo test

Change-Id: I8c557feb9f483552f3ba7f905eb49b53f48d8177
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3767095
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-18 20:07:18 +00:00
Daniel Verkamp
67eb9cfb33 devices: pci: serialize PciAddress as a string
Implement custom serde Serialize/Deserialize versions that just format
the PciAddress as a plain string rather than a struct so it can be used
for parsing command-line options.

BUG=None
TEST=cargo test -p devices

Change-Id: Ia6e5891c614be1fc7e1d136e40835e1622f5a2c0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3767094
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-18 20:02:28 +00:00
Vikram Auradkar
f1d8ff7d19 devices: refactor bat.rs
Windows does not use monitor. Move unix specific monitor feature
under sys/unix.

Enable bat module for windows.

BUG=b:213149155
TEST=presubmit

Change-Id: Ic48562f4d7e78a332e5387e5274131d35a59a7b5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764428
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Vikram Auradkar <auradkar@google.com>
Tested-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-07-18 16:34:39 +00:00
Daniel Verkamp
db94670f7f main: restore --syslog-tag functionality
The crosvm run --syslog-tag argument was accepted, but it did not do
anything after the argh refactor. Tweak the LogConfig setup so the
default tag is "crosvm" and can be overriden by the --syslog-tag option.

BUG=None
TEST=crosvm run --syslog-tag="TESTVM" ... # observe tag in syslog

Change-Id: I7cd83b0623ac725c59a1dc1fcc4f8952e749e00a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764041
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
2022-07-16 03:17:26 +00:00
Alexandre Courbot
96c3a79138 virtio: vhost: user: use volatile access to memory-mapped registers
We recently started to map VVU device registers into the process address
space, but accessed them like regular memory. This is dangerous as the
compiler can reorder and optimize these accesses.

Add new `write_obj_volatile` and `read_obj_volatile` ops to
`MemoryMapping` that are designed to perform such I/O accesses and use
them where appropriate.

BUG=b:238282334
BUG=b:237647217
TEST=VVU console device can be created from Linux.

Change-Id: I40f30acfd358248d4f9d0c00d5cd708eabae047d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3762971
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-07-16 01:25:47 +00:00
Alexandre Courbot
95a00b9a99 base: mmap: merge identical methods on Windows and Unix
Move MemoryMapping's implementations of write/read_slice, write/read_obj
and get_slice as well as the definition of the MappedRegion from the
platform module into the base mmap module, since these definitions were
strictly identical between Windows and Linux. This removes quite a bit
of duplicated code.

In the process, some tests need to be adapted in order to work with the
common MemoryMapping type instead of the platform one, as the above
mentioned methods become unavailable on the platform type.

BUG=b:213153157
TEST=./tools/dev_container ./tools/run_tests --target=host
TEST=./tools/dev_container ./tools/run_tests --target=host --build-target=mingw64
TEST=cargo test -p base --doc

Change-Id: I20e6f47c3c4763b63eae707a527a084b229cd951
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3762970
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-07-16 01:16:36 +00:00
Alexandre Courbot
35bb8c6efd base: mmap: merge Unix and Windows implementations of Protection
Windows and Unix now use identical code for their Protection
implementation, the only difference being the value of their PROT_*
constants. Make the contants part of the platform and use these from the
common mmap module to avoid duplicated code.

BUG=None
TEST=./tools/dev_container ./tools/run_tests --target=host
TEST=./tools/dev_container ./tools/run_tests --target=host --build-target=mingw64

Change-Id: I95f2769e868f32ae70de8159ac4fbb481c4ef467
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3762969
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
2022-07-16 01:08:46 +00:00
Alexandre Courbot
395c486ce9 base: remove Protection::none() constructor
This state is invalid for Windows, and we can easily avoid using it
altogether.

BUG=None
TEST=./tools/dev_container ./tools/run_tests
TEST=./tools/dev_container ./tools/run_tests --target=host --build-target=mingw64

Change-Id: Id5aba0498f9c19df0d95e86aea04fbe8a4023707
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3762968
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
2022-07-16 00:49:56 +00:00
Alexandre Courbot
1f04bbc602 base: windows: convert protection to use c_int internally
The Windows and Unix Protection struct are extremely close, with the
only difference being how they internally represent their state. Make
the Windows implementation adopt the same storage type as the Unix one
so we can merge them.

BUG=None
TEST=./tools/dev_container ./tools/run_tests --target=host --build-target=mingw64

Change-Id: Idb47243e7d2003d7eb499e683993dba2419e8841
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3762967
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-16 00:49:46 +00:00
Daniel Verkamp
57470a47d0 tools/cl: don't try to prune branches with no upstream
This cleans up the output a bit when there are many local branches that
don't have an upstream configured.

BUG=None
TEST=tools/cl prune

Change-Id: Ic5892dcbca315613682326c5615fce28d49b421d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764046
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
2022-07-15 22:58:46 +00:00
Richard
d12728e6d3 devices: Enable virtio snd and console build/test for Windows
BUG=b:237011316
TEST=ran "./tools/run_tests --target=host --build-target=mingw64 --verbose"

Change-Id: I0660bd123f6a4a9ad9f256710ca62191dc749d86
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764372
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Richard Zhang <rizhang@google.com>
Tested-by: Richard Zhang <rizhang@google.com>
2022-07-15 22:46:06 +00:00
Colin Downs-Razouk
98b42fd75f devices: tsc: calibrate handle offline cores
If a core is offline, we will not be able to set the cpu affinity to
that core. The TSC calibration code attempts to determine the TSC offset
of all cores. Determining which cores are online requires parsing the
contents of /sys/devices/system/cpu/online on linux, and it's not clear
how to do it on Windows. Instead, the calibration code will treat errors
when calling set_cpu_affinity as legitimate reasons for a core to be
offline, and will exclude that core from the offset information in the
TscState. This will prevent the TSC sync mitigation logic from setting
any vpu's affinity to that core.

This also changes how number_of_logical_cores is implemented on linux,
to count the number of configured cores instead of the number of online
cores, which seems more correct.

BUG=b:230372694
TEST=added a new unittest, also ran unittests with an offline core

Change-Id: I12c187a7ca1dd06e25b396eaeae542628fdf563c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764280
Tested-by: Colin Downs-Razouk <colindr@google.com>
Commit-Queue: Colin Downs-Razouk <colindr@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2022-07-15 22:23:06 +00:00
Dennis Kempin
53c7515c3f tools/cl: Add prune command
The prune command will delete all branches with gerrit changes
that have been submitted.

BUG=None
TEST=./tools/cl prune

Change-Id: I2f942591e6e29a16d1ed6655655ef9f8cb4fd34f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3765345
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-07-15 21:29:36 +00:00
Dennis Kempin
a02065aadb tools: Move gerrit utilities into common.py
These will be useful in other scripts as well.

BUG=None
TEST=./tools/chromeos/mergebot update-dry-runs

Change-Id: Id75ed458fdd212d4564a547274209b1f39796ceb
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3765344
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-07-15 21:23:16 +00:00
Daniel Verkamp
15fe29bae3 seccomp: add rseq to x86_64 common_device.policy
This was missed in the original rseq change.

BUG=b:235172163
BUG=b:235960683
TEST=emerge-hatch crosvm

Fixes: 17c782f1c1 ("seccomp: add rseq to all policy files")
Change-Id: Id78f0e0cd5c22142230abdc0cea6a7f91d492569
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3765348
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-15 20:55:46 +00:00
Richard
d569281cc6 devices: Upstream Windows implementation for Serial
This adds a sync thread that will call `fsync` once a second. This is a
safety measure since Window OS handles flushing automatically, but has been
proven to be somewhat unreliable.

TEST=built and presubmits
BUG=b:233951530

Change-Id: I7f5922da09fd95999bf8a7a40abc3b6ae796eafc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764466
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Richard Zhang <rizhang@google.com>
Commit-Queue: Richard Zhang <rizhang@google.com>
2022-07-15 20:50:16 +00:00
Daniel Verkamp
7159299e9a Revert "seccomp: allow rseq syscall"
This duplicates rseq in all of the policy files and causes the minijail
compiler to fail due to duplicate definitions.

rseq was already added in commit 17c782f1c1 ("seccomp: add rseq to all
policy files").

This reverts commit 1a7a822858.

BUG=b:235960683
TEST=emerge-trogdor crosvm

Change-Id: I9d45897e6815b6cdd5ef376a27563ebc4af06bdd
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3765347
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2022-07-15 20:45:46 +00:00
Richard
27d27a0402 audio_streams: Upstream to support Windows
BUG=b:213150293
TEST=built and presubmits

Change-Id: Ia032dd4645d5a827e4b462ebbf9d10db410f5468
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764468
Commit-Queue: Richard Zhang <rizhang@google.com>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: Richard Zhang <rizhang@google.com>
2022-07-15 20:33:15 +00:00
Daniel Verkamp
57d3db037f devices: tsc: use slice where a Vec is not needed
Fixes a Rust 1.60 clippy lint:

  error: writing `&mut Vec` instead of `&mut [_]` involves a new object
  where a slice will do

BUG=b:239075544
TEST=tools/clippy # with rust-toolchain = 1.60.0

Change-Id: Ib1a8e30bc70a7c7036c038f364ec1067169a0698
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764423
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-07-15 18:27:56 +00:00
Daniel Verkamp
c8506b8abb virtio-video: use to_vec() to copy &Vec
Fixes a Rust 1.60 clippy lint:

  error: called `iter().copied().collect()` on a slice to create a
  `Vec`. Calling `to_vec()` is both faster and more readable

BUG=b:239075544
TEST=tools/clippy # with rust-toolchain = 1.60.0

Change-Id: I37ac1b5708ed5f8a1ac5487225fe2ee8fb6486ad
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764422
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2022-07-15 18:27:56 +00:00
Dennis Kempin
943b7432b6 infra: Enable allow_submit_with_open_deps on CQ
BUG=None
TEST=lucicfg validate

Change-Id: Ibad9d90bad730c9bf6cc858032abe20585713dba
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3765376
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-07-15 17:50:11 +00:00
Daniel Verkamp
3bd68ea223 libva: use slice rather than Vec for attributes
Fixes a Rust 1.60 clippy lint:

  error: writing `&mut Vec` instead of `&mut [_]` involves a new
  object where a slice will do

BUG=b:239075544
TEST=tools/clippy # with rust-toolchain = 1.60.0

Change-Id: I273bd647067b807982f9a9b7248ba788ad3f2032
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764421
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-07-15 17:41:15 +00:00
Daniel Verkamp
7c47dfe3f2 tests: disable plugin_hint test
This test uses kill(getppid(), SIGSTOP), which stops the cargo test
runner process instead of crosvm as intended.

Skip it until someone has time to fix it.

BUG=b:239094055
TEST=cargo test --features=plugin -- --test-threads=1

Change-Id: Ib41351154bc585cecc8471f0150f393ce9431da9
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764464
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-15 17:35:52 +00:00
Adrian Ratiu
1a7a822858 seccomp: allow rseq syscall
Starting with v4.18, the Linux kernel provides the rseq
syscall which is a mechanism for fast userspace task
synchronization.

Starting with v2.35 glibc uses the new syscall, if it
exists, to gain some performance improvements, so we
need to update the policy files to allow it.

Even on older kernels where rseq is not supported,
glibc will still probe for its existence by expecting
an -ENOSYS response.

BUG=b:235960683
TEST=Local builds against glibc 2.35

Change-Id: I704f2fbf2b058c3a4c3269c7441c3a7324012f8a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3763901
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Owners-Override: Dominick Ng <dominickn@google.com>
Reviewed-by: Allen Webb <allenwebb@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
2022-07-15 16:19:21 +00:00
Daniel Verkamp
a3da0f9803 tools: print package name to be installed
This was hard-coded to argh, which is the only package that uses it for
now, but the function may be used elsewhere in the future.

Also don't print a newline so the user can answer the prompt on the same
line after the [y/N].

BUG=None
TEST=Run tools/cl without python3-argh installed

Change-Id: I587fd1ded81f21724169a2fe90445f6055d1f421
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764375
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-07-14 23:50:21 +00:00
Daniel Verkamp
e487d4a56c infra: run Windows tests with --verbose
This lets us see the list of tests that ran and matches the Linux
results more closely.

BUG=None
TEST=cd infra && ./recipes.py test run

Change-Id: I880cd397e21d487fb9f1924fbb1fc8e2ff3cc29a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764467
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-07-14 23:17:14 +00:00
Daniel Verkamp
17c782f1c1 seccomp: add rseq to all policy files
Allow the restartable sequences system call used by glibc 2.35+.

This is an extension of commit 637402a827 ("Add rseq to the seccomp
policy file on aarch64."), which was originally reverted because the
ChromeOS kernel headers did not have the necessary declarations yet.

This depends on the rseq declarations patch to linux-headers:
https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/3749266/

BUG=b:235172163
BUG=b:235960683
TEST=Start crosvm on x86-64 Arch Linux with glibc 2.35
TEST=emerge-hatch crosvm # ensure seccomp policies compile

Reported-By: Peter Collingbourne <pcc@google.com>
Change-Id: I14e3dfd150a7c06bdafc68a88ef3f755eb7bf90c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3763776
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2022-07-14 22:45:21 +00:00
Dennis Kempin
b3b01e866e infra: Manually roll recipes
./tools/recipe.py autoroll

BUG=b:239081770
TEST=led get-builder luci.crosvm.ci:health_check | led edit-recipe-bundle | led launch

Change-Id: I49e4259b2e51be5f25d36de96d47fd0f0b359ca2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764463
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-14 22:19:59 +00:00
Dennis Kempin
230dc4fd84 Revert "Roll recipe dependencies (trivial)."
This reverts commit e19959ab3c.

Reason for revert: Broke bot update. See https://ci.chromium.org/ui/p/crosvm/builders/try/health_check/b8808633426831578849/overview

Original change's description:
> Roll recipe dependencies (trivial).
>
> This is an automated CL created by the recipe roller. This CL rolls
> recipe changes from upstream projects (depot_tools, recipe_engine) into this repository.
>
> The build that created this CL was
> https://ci.chromium.org/b/8808635415894971729
>
> depot_tools:
> 9a7b7675ba~..2f988479fb9e31a59f935054d5f230748ed526f4
>   9a7b767 (vapier@chromium.org)
>       isort: make available to users
>   fb8cf9c (aravindvasudev@google.com)
>       Add --protocol-override to fetch.py
>   13acea3 (brucedawson@chromium.org)
>       Let git cl presubmit work with no branch
>   23ddab2 (aravindvasudev@google.com)
>       Reland "Break make_encoded_file into two functions"
>   08a30b2 (bpastene@chromium.org)
>       Add examples to the help string for git-cl-try's -B arg
>   443d913 (dpapad@chromium.org)
>       Include TypeScript .ts files in DEFAULT_FILES_TO_CHECK.
>   b9dca86 (meiring@google.com)
>       [depot_tools] Roll rdb.
>   6a1494e (tikuta@chromium.org)
>       Reland "autoninja: increase parallelism for non-HT cpu"
>   1bc3cd2 (akhoroshilov@brave.com)
>       Add a global core limit support for goma/rbe builds.
>   cb2cef9 (sdefresne@chromium.org)
>       [mac] Restore an upper limit on the number of jobs on macOS
>   31bfd51 (brucedawson@chromium.org)
>       Actually add a trailing slash to dir_with_slash
>   9997ceb (vapier@chromium.org)
>       black: add helper for formatting Python
>   aa7d7e4 (dmercadier@chromium.org)
>       [cpplint] Fix bug with "if constexpr"
>   bfefaa8 (chanli@chromium.org)
>       [depot_tools] roll led
>   50c631e (jojwang@google.com)
>       Skip 'ls' when downloading from gs.
>   f8300fb (jochen@chromium.org)
>       Remove myself from depot_tools OWNERS
>   73218ec (vadimsh@chromium.org)
>       [cipd] Update to v2.6.4.
>   772f3dc (ukai@google.com)
>       Roll out goma client VERSION=246
>   632bbc0 (sokcevic@google.com)
>       Skip Python 2 presubmit step when unneeded
>   cf9a776 (lpromero@chromium.org)
>       Typo when countdown is more than 1.
>   471b549 (chanli@chromium.org)
>       roll dirmd
>   0e9a7d2 (sokcevic@google.com)
>       Revert "Add iannucci to depot_tools owners"
>   2f98847 (dsanders11@ucsbalum.com)
>       cpplint: improve root path for header guard behavior
>
> recipe_engine:
> f588cc00b9~..04b3acea0bf45c9e1076079998b6378caa5570d2
>   f588cc0 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
>       Roll CAS Client from 595e0f7a2869 to cb424e70e751
>   52ef306 (iannucci@chromium.org)
>       [recipe_engine] Implicit CANCELED final build status.
>   cde011f (machenbach@chromium.org)
>       [led] Add common logic to trigger a builder
>   087afb8 (chanli@chromium.org)
>       [recipe-py] buildbucket: enable buildbucket tracking parent/chi...
>   c827c1b (chanli@chromium.org)
>       Revert "[recipe-py] buildbucket: enable buildbucket tracking pa...
>   9eef321 (gbeaty@chromium.org)
>       Prevent creation of candidates for dependencies of dependencies.
>   3db9e1b (chanli@chromium.org)
>       Reland "[recipe-py] buildbucket: enable buildbucket tracking pa...
>   b788d0a (vadimsh@chromium.org)
>       [scheduler] Expose job ID and invocation ID.
>   6d2e271 (gredelston@google.com)
>       walkthrough.md: Fix incorrect kwarg "output"
>   14202da (chromium-autoroll@skia-public.iam.gserviceaccount.com)
>       Roll CAS Client from addd54e4fcef to 6da0608e4fa8
>   826d446 (kimstephanie@google.com)
>       Add new post_process.PropertiesContain to check that key exists
>   f15df27 (chanli@chromium.org)
>       Extend placeholder.py to schedule child builds
>   83eab46 (whesse@google.com)
>       [buildbucket] Relax type check on buildbucket ids
>   d3504b5 (mohrr@google.com)
>       [path] Add __lt__ to Path
>   9e3ca47 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
>       Roll CAS Client from a0672c27eaaa to 5fa853f88d79
>   2522322 (gbeaty@chromium.org)
>       Rewrite candidate_algorithm.
>   b4882c1 (chanli@chromium.org)
>       [time] make sleep a timed wait on global_shutdown
>   1d661d3 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
>       Roll CAS Client from b927ccff49e4 to b2aa2d72c22b
>   a6fd0d2 (chanli@chromium.org)
>       [time] set the step to canceled if GLOBAL_SHUTDOWN is triggered
>   0f5f374 (alexschulze@chromium.org)
>       [cipd] Fix `instances` command with limit = 0
>   048f6f2 (chanli@chromium.org)
>       [recipe-py] buildbucket: set `luci.buildbucket.parent_tracking`...
>   d63eb67 (chanli@chromium.org)
>       Revert "[recipe-py] buildbucket: set `luci.buildbucket.parent_t...
>   e783f88 (chanli@chromium.org)
>       [recipe-py] (2 attempt) buildbucket: set `luci.buildbucket.pare...
>   2239191 (gbeaty@chromium.org)
>       Prevent spurious GitFetchErrors in CommitList.from_backend.
>   efaa1e2 (iannucci@chromium.org)
>       [json] Stop using python.inline.
>   dc013a8 (iannucci@chromium.org)
>       [python] Mark python.inline with a warning
>   6345fb2 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
>       Roll CAS Client from 4f40f26f3102 to 2aa3d7e5e866
>   36be946 (iannucci@chromium.org)
>       [python] Deprecate api.python.__call__
>   357b1cd (martiniss@google.com)
>       Add timing information option to the test command
>   e174a86 (martiniss@google.com)
>       Add exponential_backoff to the time module.
>   ce1d368 (iannucci@chromium.org)
>       [warnings] Omit warnings which are attributed to other recipe r...
>   c002009 (akashmukherjee@google.com)
>       [snoopy] Create luci's bcid recipe module dir.
>   1e08dae (akashmukherjee@google.com)
>       [snoopy] Create a luci's bcid recipe_module.
>   f2754bc (akashmukherjee@google.com)
>       [snoopy] Update the cipd for reporter module.
>   4cb1bf0 (gbeaty@chromium.org)
>       Don't set the -u flag when running python unbuffered.
>   50cbd44 (meiring@google.com)
>       [recipe-py] roll recipe_proto
>   82fb654 (meiring@google.com)
>       [recipes-py] Update ResultDB exoneration example to populate re...
>   bb1fb5a (iannucci@chromium.org)
>       [python] Set warning for entire python module.
>   d047727 (gbeaty@chromium.org)
>       Inhibit displaying coverage information on python3 failures wit...
>   57ac2ff (chromium-autoroll@skia-public.iam.gserviceaccount.com)
>       Roll CAS Client from e361505b12f1 to 3bd002442390
>   253ac82 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
>       Roll CAS Client from 91c1b9ec335a to cad461b65231
>   2684e3c (chromium-autoroll@skia-public.iam.gserviceaccount.com)
>       Roll CAS Client from 4137ed7879ac to 93b14d0f4216
>   ac03648 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
>       Roll CAS Client from 35b05be75bc4 to 29b908616bc9
>   0a09360 (kimstephanie@google.com)
>       Add post_process.LogDoesNotContain
>   08c51a1 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
>       Roll CAS Client from c25db5a11beb to d3db74920e35
>   e3cd9eb (kuanhuang@chromium.org)
>       Add recipes API swarming.show_request(name, task) -> TaskRequest
>   04b3ace (chromium-autoroll@skia-public.iam.gserviceaccount.com)
>       Roll CAS Client from 8b08f5e9f609 to 0ef9351a5b73
>
> Please check the following references for more information:
> - autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
> - rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
> - cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md
>
> Use https://goo.gl/noib3a to file a bug.
>
> R=​denniskempin@google.com
>
> Recipe-Tryjob-Bypass-Reason: Autoroller
> Ignore-Freeze: Autoroller
> Bugdroid-Send-Email: False
> Change-Id: Ic16796c2981fe7b3373146a55921cfee5e64eedc
> Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764420
> Commit-Queue: Dennis Kempin <denniskempin@google.com>
> Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>

Change-Id: I56cd86430a8d5707e1c0a9720ac85ebe0cbc89f0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764439
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Dennis Kempin <denniskempin@google.com>
2022-07-14 21:01:53 +00:00
Dennis Kempin
0ae3b8d578 infra: Disable recipe rolls until permissions are set up
BUG=b:239081770
TEST=None

Change-Id: I39667c367d5c2ca998c395b54b2f706f9ac5ac8f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764461
Auto-Submit: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-07-14 20:58:21 +00:00
Dennis Kempin
1fa061ad71 tools: Automatically install common.py dependencies
Ask the user if they want to 'pip install' the dependency
if it is missing.

Not the prettiest solution, but helps make tools like
./tools/cl usable with minimal dependencies available.

Eventually we may consider pyenv or a similar solution.

BUG=b:239072471
TEST=pip uninstall argh; ./tools/cl

Change-Id: I4872e86883a9a0903a408d2f6d4f35dd1841f2ef
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764425
Auto-Submit: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-14 20:31:41 +00:00
recipe-roller
e19959ab3c Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools, recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8808635415894971729

depot_tools:
9a7b7675ba~..2f988479fb9e31a59f935054d5f230748ed526f4
  9a7b767 (vapier@chromium.org)
      isort: make available to users
  fb8cf9c (aravindvasudev@google.com)
      Add --protocol-override to fetch.py
  13acea3 (brucedawson@chromium.org)
      Let git cl presubmit work with no branch
  23ddab2 (aravindvasudev@google.com)
      Reland "Break make_encoded_file into two functions"
  08a30b2 (bpastene@chromium.org)
      Add examples to the help string for git-cl-try's -B arg
  443d913 (dpapad@chromium.org)
      Include TypeScript .ts files in DEFAULT_FILES_TO_CHECK.
  b9dca86 (meiring@google.com)
      [depot_tools] Roll rdb.
  6a1494e (tikuta@chromium.org)
      Reland "autoninja: increase parallelism for non-HT cpu"
  1bc3cd2 (akhoroshilov@brave.com)
      Add a global core limit support for goma/rbe builds.
  cb2cef9 (sdefresne@chromium.org)
      [mac] Restore an upper limit on the number of jobs on macOS
  31bfd51 (brucedawson@chromium.org)
      Actually add a trailing slash to dir_with_slash
  9997ceb (vapier@chromium.org)
      black: add helper for formatting Python
  aa7d7e4 (dmercadier@chromium.org)
      [cpplint] Fix bug with "if constexpr"
  bfefaa8 (chanli@chromium.org)
      [depot_tools] roll led
  50c631e (jojwang@google.com)
      Skip 'ls' when downloading from gs.
  f8300fb (jochen@chromium.org)
      Remove myself from depot_tools OWNERS
  73218ec (vadimsh@chromium.org)
      [cipd] Update to v2.6.4.
  772f3dc (ukai@google.com)
      Roll out goma client VERSION=246
  632bbc0 (sokcevic@google.com)
      Skip Python 2 presubmit step when unneeded
  cf9a776 (lpromero@chromium.org)
      Typo when countdown is more than 1.
  471b549 (chanli@chromium.org)
      roll dirmd
  0e9a7d2 (sokcevic@google.com)
      Revert "Add iannucci to depot_tools owners"
  2f98847 (dsanders11@ucsbalum.com)
      cpplint: improve root path for header guard behavior

recipe_engine:
f588cc00b9~..04b3acea0bf45c9e1076079998b6378caa5570d2
  f588cc0 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 595e0f7a2869 to cb424e70e751
  52ef306 (iannucci@chromium.org)
      [recipe_engine] Implicit CANCELED final build status.
  cde011f (machenbach@chromium.org)
      [led] Add common logic to trigger a builder
  087afb8 (chanli@chromium.org)
      [recipe-py] buildbucket: enable buildbucket tracking parent/chi...
  c827c1b (chanli@chromium.org)
      Revert "[recipe-py] buildbucket: enable buildbucket tracking pa...
  9eef321 (gbeaty@chromium.org)
      Prevent creation of candidates for dependencies of dependencies.
  3db9e1b (chanli@chromium.org)
      Reland "[recipe-py] buildbucket: enable buildbucket tracking pa...
  b788d0a (vadimsh@chromium.org)
      [scheduler] Expose job ID and invocation ID.
  6d2e271 (gredelston@google.com)
      walkthrough.md: Fix incorrect kwarg "output"
  14202da (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from addd54e4fcef to 6da0608e4fa8
  826d446 (kimstephanie@google.com)
      Add new post_process.PropertiesContain to check that key exists
  f15df27 (chanli@chromium.org)
      Extend placeholder.py to schedule child builds
  83eab46 (whesse@google.com)
      [buildbucket] Relax type check on buildbucket ids
  d3504b5 (mohrr@google.com)
      [path] Add __lt__ to Path
  9e3ca47 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from a0672c27eaaa to 5fa853f88d79
  2522322 (gbeaty@chromium.org)
      Rewrite candidate_algorithm.
  b4882c1 (chanli@chromium.org)
      [time] make sleep a timed wait on global_shutdown
  1d661d3 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from b927ccff49e4 to b2aa2d72c22b
  a6fd0d2 (chanli@chromium.org)
      [time] set the step to canceled if GLOBAL_SHUTDOWN is triggered
  0f5f374 (alexschulze@chromium.org)
      [cipd] Fix `instances` command with limit = 0
  048f6f2 (chanli@chromium.org)
      [recipe-py] buildbucket: set `luci.buildbucket.parent_tracking`...
  d63eb67 (chanli@chromium.org)
      Revert "[recipe-py] buildbucket: set `luci.buildbucket.parent_t...
  e783f88 (chanli@chromium.org)
      [recipe-py] (2 attempt) buildbucket: set `luci.buildbucket.pare...
  2239191 (gbeaty@chromium.org)
      Prevent spurious GitFetchErrors in CommitList.from_backend.
  efaa1e2 (iannucci@chromium.org)
      [json] Stop using python.inline.
  dc013a8 (iannucci@chromium.org)
      [python] Mark python.inline with a warning
  6345fb2 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 4f40f26f3102 to 2aa3d7e5e866
  36be946 (iannucci@chromium.org)
      [python] Deprecate api.python.__call__
  357b1cd (martiniss@google.com)
      Add timing information option to the test command
  e174a86 (martiniss@google.com)
      Add exponential_backoff to the time module.
  ce1d368 (iannucci@chromium.org)
      [warnings] Omit warnings which are attributed to other recipe r...
  c002009 (akashmukherjee@google.com)
      [snoopy] Create luci's bcid recipe module dir.
  1e08dae (akashmukherjee@google.com)
      [snoopy] Create a luci's bcid recipe_module.
  f2754bc (akashmukherjee@google.com)
      [snoopy] Update the cipd for reporter module.
  4cb1bf0 (gbeaty@chromium.org)
      Don't set the -u flag when running python unbuffered.
  50cbd44 (meiring@google.com)
      [recipe-py] roll recipe_proto
  82fb654 (meiring@google.com)
      [recipes-py] Update ResultDB exoneration example to populate re...
  bb1fb5a (iannucci@chromium.org)
      [python] Set warning for entire python module.
  d047727 (gbeaty@chromium.org)
      Inhibit displaying coverage information on python3 failures wit...
  57ac2ff (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from e361505b12f1 to 3bd002442390
  253ac82 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 91c1b9ec335a to cad461b65231
  2684e3c (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 4137ed7879ac to 93b14d0f4216
  ac03648 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 35b05be75bc4 to 29b908616bc9
  0a09360 (kimstephanie@google.com)
      Add post_process.LogDoesNotContain
  08c51a1 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from c25db5a11beb to d3db74920e35
  e3cd9eb (kuanhuang@chromium.org)
      Add recipes API swarming.show_request(name, task) -> TaskRequest
  04b3ace (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 8b08f5e9f609 to 0ef9351a5b73

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ic16796c2981fe7b3373146a55921cfee5e64eedc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764420
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-07-14 20:28:31 +00:00
Daniel Verkamp
e5afc82d9c test_runner: format flaky tests message
BUG=None
TEST=tools/presubmit --all # with a failed test

Change-Id: I67262353cbd732b1394cdbe60b38d04c3a6e817b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3763359
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-07-14 20:19:01 +00:00
Dennis Kempin
f91ea18f6c infra: Allow all googlers to trigger CQ
BUG=b:216156045
TEST=None

Change-Id: If7c63824e20091a369250c983d854ec7684c5cfc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3763642
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-14 18:25:51 +00:00
Dennis Kempin
ed7d455a43 Switch main crosvm repo
This updates all references to chromiumos/platform/crosvm to
crosvm/crosvm.
It will also switch ./tools/cl to upload to the new main repository.

BUG=None
TEST=None

Change-Id: I1f71e5d5de2300e57ace1315cb4553f68533d576
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3760903
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-07-14 17:58:26 +00:00
Norman Bintang
3ebfc9b7fe audio: Support null backend for VirtioSnd
Rename VirtioSndCras to VirtioSnd. Add null backend support
for VirtioSnd.
Changes:
* Add backend field in virtio::snd::Parameters
* Add snd_null_device.policy
* Add NoopStreamSourceGenerator options in VirtioSnd

BUG=b:233542268
TEST=run crosvm with virtio-snd device and call aplay

Change-Id: I7fca20fd27417df3d592b1153b2dede5f2890a30
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3729264
Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-14 13:44:57 +00:00
Alexandre Courbot
8f9de922f8 crosvm: make JailConfig structure parseable from command-line options
This will allow us to control all the jail-related options under a
single "--jail" command-line argument, instead of several different
arguments as we did before.

BUG=b:217480043
TEST=cargo test -p crosvm crosvm::config::tests::parse_jailconfig

Change-Id: I4246c79dcf53411461437b09cb31be8b212e1c97
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3755187
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-07-14 08:25:49 +00:00
Noah Gold
a0bf9563b2 tools: build example_simple w/ no crosvm features.
The example is currently building a crosvm with gpu support, which
doesn't link properly out of the box. Now, we build explicitly with all
features off, which is sufficient to run the example.

BUG=none
TEST=ran the example.

Change-Id: I1699741f9c094831827b090782be5f5d7492eefa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3756725
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
2022-07-14 02:37:04 +00:00
Noah Gold
39a9977505 base: syslog panics on double-init.
We've had multiple silent bugs stemming from the current double-init
behavior of the logging system. To prevent that from happening for the
fourth time, this CL makes all subsequent logging inits panic. This way,
it will be much harder to commit code that won't work. Details:

* Current behavior: only the first init applies logging configuration.
  The subsequent inits will silently do nothing, and discard the
  supplied settings. These settings could be important things like
  setting the log file, whether to echo to stderr, etc.
* New behavior: after the first call to init, any subseqent call will
  panic.

NOTE: If this CL breaks a downstream project, there is very likely
a bug in that project which may be causing logs from crosvm to be
lost. Please fix that bug, or revert this CL in the downstream project
temporarily.

In this CL, we discovered that openlog_and_get_socket (used in linux
syslog) mutates global state. In tests, this manifested as a failure.
For this CL, we've chosen to preserve the behavior of only re-creating
State (and by extension, PlatformSyslog) when there is no STATE
currently set. (This behavior is nice for other reasons since it keeps
us from performing unnecessary operations when a no-op is possible.)

BUG=b:238680255
TEST=presubmit & tested downstream by verifying log files were written.
Also ran example_simple & verified it didn't panic.

Change-Id: Iad64c1b52b917e63d14a42cbbd1739ef94107fae
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3756274
Commit-Queue: Noah Gold <nkgold@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
2022-07-14 02:37:03 +00:00
Noah Gold
6952be0328 arch: split platform pstore code into sys mod.
BUG=b:237597358
TEST=builds

Change-Id: I6d12ebc088dd04aed36ab312d1312873813357d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3741685
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-14 00:08:34 +00:00
Noah Gold
637b1ee1d1 arch: split platform lib code into sys mod.
Highlights:
* goldfish battery never worked on Windows, but it sort of compiled
  anyways downstream. This CL makes it unix only because it never worked
  on Windows as a device anyway.

BUG=b:237597358
TEST=builds

Change-Id: Ia5fc3b5e5fcd243d8454646b00a6857085d018ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3741432
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
2022-07-14 00:08:33 +00:00
Vikram Auradkar
8d29b82847 devices: upstream pit
safe_arm_timer accepts Optional Duration. And other minor changes

BUG=b:213149155
TEST=presubmit

Change-Id: Id8739dcfc85b225dd516cc83f1100b88b87970bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3760145
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-07-13 23:36:57 +00:00
Vikram Auradkar
f6908a8bcc devices: move lib.rs common functions
BUG=b:213149155
TEST=presubmit

Change-Id: Id73ceac4102e14fd0c499da9441268776147f882
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3760147
Commit-Queue: Vikram Auradkar <auradkar@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-13 23:30:26 +00:00
Noah Gold
f234eaf752 arch: enable tests on Windows.
This shuts off some of the Windows serial code beacuse it's blocked on a
separate CL that upstreams bits of the serial device. (It doesn't work
in this repo yet anyway.)

BUG=b:237597358
TEST=builds

Change-Id: If6b223ff29d55f44bff7d006c1e0b5db3733a4ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3741429
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
2022-07-13 23:11:29 +00:00
Daniel Verkamp
a82d09a591 main: perform x=y arg splitting on short flags too
Previously, the argh preprocessor only converted --long=options style
arguments; this should be applied to single-character options as well,
such as `-p`.

BUG=None
TEST=cargo test args
TEST=crosvm run -p=init=/bin/bash -r=vm_rootfs.img vm_kernel

Change-Id: I8614891f5b86af1b2f6315f59689e5c0c5037416
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3759334
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-07-13 22:05:22 +00:00
Vikram Auradkar
8bcd18bdeb devices: enable debugcon on windows
new_with_pipe is not implemented yet.

BUG=b:213149155
TEST=presubmit

Change-Id: I1062bc964e6204088660fd1a04bbce09a77e293d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3760144
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
Auto-Submit: Vikram Auradkar <auradkar@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-13 21:30:43 +00:00
Zihan Chen
f59a7fb1e9 crosvm: Allow JailConfig to not define path to policy dir
This allow us to use undefined policy dir path to enable loading
policies embedded at build time inside the binary.

BUG=b:235858187

Change-Id: I312f32ec7db9d625621707ae6330bd556dc55e93
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3759335
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2022-07-13 20:31:36 +00:00
Dennis Kempin
145b62ed7c run_tests: Run devices crate exclusively too
Some tests can fail if there is interference from other tests (e.g.
EINTR errors).

BUG=b:238232551
TEST=./tools/presubmit

Change-Id: I962a030771cee9d77f309d83fb7f0f43c18ada45
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3760897
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-13 18:33:20 +00:00
Vikram Auradkar
eac9b95fad ci: skip choco checksum
BUG=b:238702274
TEST=presubmit

Change-Id: Ie499523c69ab6bd4196af6db074b9db534109c9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3758741
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-13 17:21:48 +00:00