Commit graph

4959 commits

Author SHA1 Message Date
recipe-roller
326a2ea131 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

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

depot_tools:
ecfab09639~..dca14bc463857bd2a0fee59c86ffa289b535d5d3
  ecfab09 (fdegans@chromium.org)
      [code-health] Run XML pretty_print.py with vpython3
  dca14bc (brucedawson@chromium.org)
      Show PresubmitResult call stacks in verbose mode

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: I89523dac83f60978a153aa8c9bbbad2ad59a3314
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3900326
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-15 21:27:28 +00:00
Daniel Verkamp
362f9d3730 crosvm: config: audio_cras does not imply audio
Check both features to fix the build with --features=chromeos (which
enables audio_cras) but without --features=audio.

BUG=None
TEST=cargo build --no-default-features --features=audio_cras

Change-Id: I0d41d7ef62cc38e685ae5da77cba88f482340b4f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3900318
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-09-15 20:35:37 +00:00
Pujun Lun
797ff4a795 vm_memory: create udmabuf stub for Windows.
BUG=b:213149288
TEST=presubmit

Change-Id: I250209912cff96da505e6ccfb76f9dba4b9a6683
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3885377
Commit-Queue: Pujun Lun <lunpujun@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-15 19:03:49 +00:00
Alexandre Courbot
829f0d3d25 devices: video: decoder: remove unused lifetime
This lifetime is not used anywhere and clippy complains about it.

BUG=None
TEST=cargo build --features video-decoder,ffmpeg

Change-Id: I09fe49b2c89cfc80891acb47592f0de6ebc26ea3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3889320
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2022-09-15 08:58:46 +00:00
Pattara Teerapong
14516a1dee devices: virtio: snd: refactor StreamInfo into a separate file
Refactor StreamInfo into a separate file and add unit tests for state
transitions.

BUG=b:242021318
TEST=unit test
TEST=play music and record audio in ARCVM

Change-Id: I3aa17bdbd29bb768f6471a91f4cf93c56d68574d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3889321
Commit-Queue: Pattara Teerapong <pteerapong@chromium.org>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
2022-09-15 02:53:36 +00:00
Alexandre Courbot
dee4a6e40f crosvm: handle '--disable-sandbox' after other sandboxing options
The '--disable-sandbox' argument has the effect of setting the jail
configuration to `None`, but other sandboxing options can potentially
recreate it afterwards if they are also specified.

Fix this by handling '--disable-sandbox' after all other sandboxing
options, so the jail configuration always ends up being `None` if that
option is specified.

Reported and fix proposed by Dmitrii Osipenko.

TEST=cargo run with and without --disable-sandbox

Change-Id: I57bed8a3a4fdd543c7f7a24d778ecc16a3ad0d8a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3893545
Reviewed-by: Dmitrii Osipenko <dmitry.osipenko@collabora.corp-partner.google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
2022-09-15 02:27:46 +00:00
Alexandre Courbot
2c171901ee virtio: vhost: user: remove use of serde's flatten in VhostUserParams
The use of flatten is problematic as it introduces type ambiguity if we
need to parse a string from either the embedding or the embedded
structure. For this reason we are now discouraging its use.

Replace the only place where it was used (the VhostUserParams struct)
with a manual parser that requires the 'vhost' parameter to come first.
This is a bit more constraining but at the same time is probably clearer
than having it in the middle of device-parameters anyway.

BUG=b:217480043
BUG=b:241300017
TEST=cargo test -p devices vhost_user_params

Change-Id: I35847196fa6dc4858112ffe1e2883d64c2fae514
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3889329
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-09-15 02:07:56 +00:00
Alexandre Courbot
d47cd8366e virtio: vhost: user: introduce tests for VhostUserParams parsing
We are going to make some changes to VhostUserParams' parsing, so add
tests to make sure we don't break anything along the way.

BUG=b:217480043
TEST=cargo test -p devices vhost_user_params

Change-Id: I898b4b2293bc6233fed6703fb6de1b8238a16d5d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3889326
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-15 02:07:56 +00:00
Alexandre Courbot
caddede98e virtio: vhost: user: rename VhostUserParams's device_params to device
This is both a shorter and better name for this member.

BUG=b:217480043
TEST=cargo build

Change-Id: I4698fc9c411361837b65d42c4e64516a477eb2a5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3889325
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-15 02:07:56 +00:00
Alexandre Courbot
b68d4c4db0 serde_keyvalue: add documentation about caveats of using flatten
Serde's `flatten` property is very useful to transparently add
parameters to a command-line argument, but it comes with a few
important limitations. Document them and discourage its use whenever
possible.

BUG=b:218223240
BUG=b:241300017
TEST=cargo build

Change-Id: I822645acbf0ef563d0c0d14f719571093a5152f2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3889327
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-15 02:07:56 +00:00
Alexandre Courbot
7468fa4f91 serde_keyvalue: export KeyValueDeserializer
We will need to control deserialization from a lower-level in order to
remove the `flatten` attribute from the VhostUserParams struct, so make
the KeyValueDeserializer interface available publicly.

BUG=b:217480043
TEST=cargo build

Change-Id: I366a71ef1b4f38ba4673478dc7ae8b928a8f57d3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3889328
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-15 02:07:56 +00:00
Alexandre Courbot
92918a5b01 serde_keyvalue: use nom-based methods for deserialize_any
These methods are better to predict the type of what follows than just
parsing the next character. For instance, '1foo' was interpreted as an
integer whereas it should be a string.

BUG=b:218223240
BUG=b:241300017
TEST=cargo test -p serde_keyvalue
TEST=cargo test

Change-Id: I9a0a3cb73e06783784d47450de7d291adf41aa53
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3889330
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-15 02:07:56 +00:00
recipe-roller
7b78909091 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

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

depot_tools:
5e4d74983e
  5e4d749 (brucedawson@chromium.org)
      Support a tag to ignore long lines

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: I5ace1f7bc06f0e30e63601aa88c9ff63a0ee2ae3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3898111
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-15 01:05:46 +00:00
Daniel Verkamp
187b26c076 devices: virtio: block: move spec definitions to device_constants
This cleans up the remaining common.rs definitions.

No functional change.

BUG=b:237829580
TEST=tools/presubmit --all

Change-Id: I7a318648a7f16535e1f0525566fe49a6e4e57c3c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892135
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-09-14 23:12:16 +00:00
Daniel Verkamp
4fa3e761ec devices: virtio: block: move common funcs into BlockAsync
Now that the non-async block device is removed, it makes more sense for
these functions to live in the BlockAsync implementation. This partly
cleans up the remaining common.rs contents.

Also move the BlockId type into asynchronous.rs, as it is only used
within DiskOption.

No functional change.

BUG=b:219595052
TEST=tools/presubmit --all

Change-Id: Id848c401eac1d7ab6a6d38be5d6676718d30d460
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892134
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-09-14 22:33:06 +00:00
Dennis Kempin
aae0141680 dev_container: Upgrade to debian bookworm
Debian bullseye is becoming old and we require a couple of newer
dependencies. gLinux is also tracking bookworm, so we are staying
close to our usual development environment.

Since the official rust images do not have a bookworm version,
we switch to the official debian image and add a rustup install
to ./tools/install-deps.

The new glibc version uses clone3 in multiple devices, adding
this new syscall to our policy to pass integration tests.

Drive-by change: Upgrading rust-toolchain from 1.62.0 to 1.62.1

BUG=b:243081643
TEST=CQ

Change-Id: I8af721ed4a83df61163d67001b777166abe8abfa
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892621
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-14 22:32:36 +00:00
Daniel Verkamp
74f1ca4e78 bindgen: update bindings to Linux 5.15
This requires a few tweaks to non-generated code:
- VIRTIO_ID_VIDEO_ENC/DEC -> ENCODER/DECODER
- io_uring unnamed union layout change

Change-Id: I58e118efa5c6bf28ff56d211fec5603651cb60bc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3893753
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-09-14 22:09:30 +00:00
Dennis Kempin
60911dbc02 dev_container: Always pass tty to docker if available
This allows programs to use colors and other tty features. It also
fixes issues with stdout being buffered instead of printed in real
time.

BUG=b:246623045
TEST=./tools/dev_container ./tools/health-check --all -v

Change-Id: I09dd7523a15fbd8b3c5c653471ef091eac75cf6d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892522
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-14 19:07:16 +00:00
Alexandre Courbot
33f90e6eb0 devices: gpu: remove deserialize_wsi deserialization function
When converting the GpuParameters to serde_keyvalue, we moved the custom
parsing code into custom deserializations functions. However, in the
case of the 'wsi' member, it looks like the same result can be obtained
by using kebab-case and aliasing "vk" to the "Vulkan" variant.

BUG=b:218223240
TEST=cargo test --features "gpu" parse_gpu

Change-Id: Ie7b892a9aebd0b0915c089473e1a114ab992202e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3889323
Reviewed-by: Pujun Lun <lunpujun@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-14 18:13:56 +00:00
Alexandre Courbot
a11457c245 devices: gpu: make 'wsi' gpu option recognize the 'vulkan' parameter
'GpuParameters' are used for parsing the command-line, but are also
passed through a tube. When that happens, the default serializer turns
the 'wsi' member to "Vulkan", but the custom deserializer function
expects 'vk' in order to build it properly.

Fix this by making RutabagaWsi use the kebab-case for
serializing/deserializing so it gets serialized into 'vulkan', and
making the 'deserialize_wsi' function accept 'vulkan' as a valid option.

BUG=b:218223240
TEST=cargo test --features "gpu" parse_gpu

Change-Id: I831ddc623ff6b5ddd74dbfe82cf7ccc0f7647272
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3889322
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Pujun Lun <lunpujun@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-14 18:09:56 +00:00
Daniel Verkamp
150384ad2d media/ffmpeg: only show VERSIONS notice on change
Check if the VERSIONS file actually changed before printing the related
message.

Also print the path to the VERSIONS file to give some more context.

BUG=None
TEST=media/ffmpeg/bindgen.sh

Change-Id: I6e7cd2ace37ca99ed744a307675272a2e3c205f6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3893752
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-09-14 18:01:56 +00:00
Daniel Verkamp
03e1b667e3 media/ffmpeg: use bindgen-common.sh
Switch to the common bindgen wrapper so that the ffmpeg bindings get the
same defaults as other bindgen-generated bindings.

BUG=None
TEST=media/ffmpeg/bindgen.sh
TEST=cargo build --features=ffmpeg,video-decoder

Change-Id: I09901c122401fe1b65eed154a6be8348decfcc33
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3893751
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-09-14 17:55:56 +00:00
Pujun Lun
693f5e0a82 gpu: move resource bridge related code to a separate struct.
This new struct tracks which resource bridges should be processed.
* For Unix, there should be no functional changes.
* For Windows, resource bridges are not supported so this struct
  intentionally does nothing.

BUG=b:213149288
TEST=presubmit

Change-Id: I8da6a9fe073600c2982e7930108ebf159be95a30
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3880589
Commit-Queue: Pujun Lun <lunpujun@google.com>
Reviewed-by: Kaiyi Li <kaiyili@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2022-09-14 06:39:35 +00:00
Navil Perez
5d63693d3a DIR_METADATA: Add ChromeOS CQ HW/VM V2 test plans.
Configure HW/VM test coverage for the chromiumos/platform/crosvm repo as a part of the new distributed test config (go/cros-cq-test-config).

Coverage is based on the following rule:
http://cs/chromeos_internal/src/config-internal/board_config/source_tree_test_config_main.star;l=203;rcl=6d9636609b52868595e56359542784b999e7ea97.

V2 test planning will be verified in staging before being enabled in
prod.

BUG=b:241828347
TEST=dirmd validate

Change-Id: I424e735ad10f74d892f6a5fd941fd6013a867a09
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892627
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Navil Perez <navil@google.com>
Auto-Submit: Navil Perez <navil@google.com>
2022-09-14 00:43:05 +00:00
Zihan Chen
774bd47261 infra: Always docker pull dev container in CQ
The overhead for doing this is small as docker will not pull when
digest doesn't change.

TEST=https://luci-milo.appspot.com/swarming/task/5d5206115a9d7811
FIXED=b:243562713

Change-Id: I4158e433a62f6e7815edaec180b1b294d9ff4d79
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3885378
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2022-09-14 00:31:06 +00:00
Zihan Chen
7de274b8df dev_container: Add --pull option to force trigger docker pull
TEST=./tools/dev_container --pull triggers docker pull
BUG=b:243562713

Change-Id: I4158e433a62f6e7815edaec180b1b294d9ff4d87
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892524
Auto-Submit: Zihan Chen <zihanchen@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-09-14 00:16:38 +00:00
Zihan Chen
94de30aea3 dev_container: Fix vscode integration
Fix permission issue when dev container is launched in vscode.
see: crrev/c/3855471/comments/3ee66fdb_46268f20

TEST=dev container from vscode can rust analyzer

Change-Id: Ia5e8f213bf7ab8e5826dca21a6ef3846ff841b92
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3884301
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2022-09-14 00:16:38 +00:00
Gurchetan Singh
8ab7d9b715 rutabaga_gfx: nuke fake capset
All Android guests have been updated.

BUG=b:239639751
TEST=compile

Change-Id: Ic1d6e7bc338335d3afd36d8d70f6f291a24cc63f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892130
Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2022-09-13 22:31:55 +00:00
Daniel Verkamp
7c6d8bec3f health-check: enforce blank line after copyright
While we are tweaking all of the copyright headers, let's take the
opportunity to ensure there is always a blank line after the copyright
header for consistency. (Almost all files already follow this style.)

This includes a slightly ugly regex to allow the end of a C-style
comment block after the end of the copyright:

/*
 * Example comment block
 */   <-- this line

Change-Id: Idfd0855861e5ecb3d33afae942fdba908af0dcff
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892521
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2022-09-13 22:24:35 +00:00
recipe-roller
30b531a933 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

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

depot_tools:
9ebcfa6be1
  9ebcfa6 (fdegans@chromium.org)
      [code-health] Run CheckVPythonSpec under python3

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: I9ce6afca3a976db77682cddc4072596be48f1e88
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892523
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-13 21:47:06 +00:00
Peter Collingbourne
96b95accf3 aarch64: Expose MTE to guests
A proposed set of kernel patches makes it possible to map anonymous
MAP_SHARED mappings into the IPA space of a virtual machine with MTE
enabled. With these patches we can use most features of crosvm with the
exception of pmem which relies on being able to make file mappings in the
IPA space. Therefore, we make MTE an opt-in feature via the --mte command
line argument and forbid specifying --mte together with --pmem-device
or --rw-pmem-device.

Bug: b:234779841
Change-Id: I70bf2d0a8c1aff7c5956d6009ca5169a623bc6b2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892141
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Peter Collingbourne <pcc@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
2022-09-13 21:05:15 +00:00
Dennis Kempin
7150e63ee3 health-check: Add version check for mdformat
On glinux people may have set up the google internal mdformat
tool, which is different from the open source mdformat tool.

BUG=b:236962138
TEST=./tools/health-check --all markdown_format
with PATH updated to use both versions

Change-Id: Ia6b783c52195f2edd33eb836333b28f257be8a32
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894236
Reviewed-by: Zihan Chen <zihanchen@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-09-13 20:04:56 +00:00
Daniel Verkamp
e27dde0caa crosvm: unix: install memfd panic hook
Add a call to the install_memfd_handler() function so that panics
produce a specially named memfd to store the panic information for
retrieval by the crash reporter.

A new panic-memfd feature (enabled by default with --features=chromeos)
is added to control this functionality.

BUG=b:234093439
TEST=emerge-hatch crosvm

Change-Id: Ibc92b3970609d097371b0019d6f1c8d00a3e5f15
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892142
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Paramjit Oberoi <psoberoi@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-09-13 20:01:55 +00:00
Dennis Kempin
587b0ccd53 infra: Add led usage examples to README.md
BUG=None
TEST=./tools/health-check

Change-Id: If6aa2de1e0ca1f5eda9de57fe4242b1a2bfe37d3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3887352
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Zihan Chen <zihanchen@google.com>
2022-09-13 20:00:05 +00:00
Dennis Kempin
1dab58a2cf Update all copyright headers to match new style
This search/replace updates all copyright notices to drop the
"All rights reserved", Use "ChromiumOS" instead of "Chromium OS"
and drops the trailing dots.

This fulfills the request from legal and unifies our notices.

./tools/health-check has been updated to only accept this style.

BUG=b:246579983
TEST=./tools/health-check

Change-Id: I87a80701dc651f1baf4820e5cc42469d7c5f5bf7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894243
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-09-13 18:41:29 +00:00
Dennis Kempin
78f62a44e7 Update copyright header check to cover all files
generated files and a list of excluded files are skipped.
Others are fixed to include the missing header.

BUG=b:246579983
TEST=./tools/health-check --all copyright_header

Change-Id: I13e9bf79df18789f1ed4b83fc47c0c2e080d70a8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894240
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-13 18:41:29 +00:00
Peter Collingbourne
87ddd08405 hypervisor: change the last KvmVm::new argument to a struct
We are going to need to start passing a new arch-dependent configuration
parameter to KvmVm::new in addition to protection_type. Since we can't
[cfg] a function argument, and to avoid churning the tests the next time
we need another argument, let's create a hypervisor::Config struct and
start passing protection_type that way.

Bug: b:234779841
Change-Id: I42ce9438b064658ebb9732e78ee5c82dac2636b6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892140
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
2022-09-13 17:14:44 +00:00
recipe-roller
5d7faa8542 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

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

depot_tools:
635383fb43
  635383f (brucedawson@chromium.org)
      Document filter lists more precisely

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: I344b7c68b76c9960faa7b7f7d86d409ea325d045
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894232
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-13 16:48:28 +00:00
Daniel Verkamp
88f5539882 devices: vfio: include path in group open error
This makes it easier to diagnose what is going wrong with the --vfio
option, as it will now print the actual path (e.g. "/dev/vfio/38")
rather than just "/dev/vfio/$group_num".

BUG=None
TEST=crosvm run --vfio /some/sysfs/pci/path

Change-Id: I18c196151d807827bcba348b9453fd2ef7c1a9b9
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892131
Commit-Queue: David Stevens <stevensd@chromium.org>
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: David Stevens <stevensd@chromium.org>
2022-09-13 07:24:15 +00:00
Peter Collingbourne
679f3919ef cmdline: Fix unbalanced brackets
They were causing some weird formatting in Kakoune's Rust syntax
highlighter.

Change-Id: I9281cfa75391eb991f479d2370f09db942a1fb64
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892139
Auto-Submit: Peter Collingbourne <pcc@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-13 01:28:04 +00:00
Idan Raiter
73cd3e24fa devices: Implement MasterReqHandler for Windows
Brings up the master request handler on Windows. To stay within the
existing protocol, PackedTube was introduced, which is able to transmit
a Tube via a RawDescriptor.

BUG=b:221882601
TEST=presubmit & cargo test & tested downstream

Change-Id: Ibd4c2f55c42738392beed5b15b8d445e47890627
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3856828
Reviewed-by: David Stevens <stevensd@chromium.org>
Commit-Queue: Idan Raiter <idanr@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-12 16:09:34 +00:00
recipe-roller
052742a1ad Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

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

recipe_engine:
16bd220b96
  16bd220 (mohrr@google.com)
      [cas] Allow overriding instance for a single call

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: I9efa35c94fef1aac21b208fd2e1526c4e885d79d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3888820
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-10 01:19:01 +00:00
Daniel Verkamp
c6fbc5a811 windows: fix build without --features=balloon
Add the minimal cfg checks to let the Windows target build without
--features=balloon enabled. This doesn't fully guard all uses of balloon
related types, just enough to make it compile, since it's intertwined
with other features (e.g. "kiwi").

BUG=None
TEST=cargo build --no-default-features

Change-Id: I013d84d07edb39d318bcd1be718a914e2282ea25
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3885497
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-09-09 22:49:03 +00:00
Daniel Verkamp
bd13bdbfc8 windows: fix build without --features=stats
Add a top-level stats feature that selects devices/stats and guard the
uses of stats-related types with a cfg check. Fixes the Windows build
when the stats feature is not enabled. No change in behavior when
building with the win64 feature, as that selected the stats feature
already.

BUG=None
TEST=cargo build --no-default-features

Change-Id: I468f6c34509753d640ea002199da74e1729d25f7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3885496
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-09-09 22:47:16 +00:00
recipe-roller
8f13ec7af4 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

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

recipe_engine:
a32a33cff9
  a32a33c (gbeaty@chromium.org)
      Don't print None-valued rendered steps.

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: Icb70234fe4563a6f64471d77838cba1ce1a3d016
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3887351
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-09 18:55:56 +00:00
recipe-roller
e2443022ab Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

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

depot_tools:
ea876290e0
  ea87629 (rgw@google.com)
      Accepting new flag for --all flag and allowing CI to run.

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: I9c2dd496bd36c2fe8126927e6a0f408e19bd929e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3888339
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-09 18:37:16 +00:00
Daniel Verkamp
2f774a9a6a config: make seccomp policy dir default consistent
Re-add a serde default function for JailConfig::seccomp_policy_dir and
use it in the Default impl as well.

Fixes tests when --features=chromeos is enabled.

BUG=b:235858187
TEST=FEATURES=test emerge-hatch crosvm

Change-Id: Iec9152781f098aab05336e794d6eaf3c1105d53b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3887347
Commit-Queue: Zihan Chen <zihanchen@google.com>
Reviewed-by: Zihan Chen <zihanchen@google.com>
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
2022-09-09 18:28:27 +00:00
recipe-roller
9df15d5384 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

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

depot_tools:
9623d88e8f
  9623d88 (brucedawson@chromium.org)
      Enforce license requirement on new files

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: I77a7645eb84bd51af0193cf8130fb0ea6b9dae74
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3887348
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-09 18:19:36 +00:00
recipe-roller
5574ac9450 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

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

depot_tools:
3d1a52e074
  3d1a52e (gbeaty@chromium.org)
      Remove recipe warnings due to python module.

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: Icc5f726f2af8d886eeed8af625aaaf021ed08b38
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3887346
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-09 17:45:56 +00:00
recipe-roller
ab3025da9f Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

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

depot_tools:
787e71ac8b
  787e71a (jmadill@chromium.org)
      Fix code check in upload to google storage.

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: Iaa6d59b25269d17b81137c942ef0bccab56a1d28
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3887341
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-09 16:19:06 +00:00