Commit graph

5208 commits

Author SHA1 Message Date
Keiichi Watanabe
bbe8a60f46 CONTRIBUTING: Add a section about commit messages' format
Document what a good commit message should look like in CONTRIBUTING.md.

BUG=none
TEST=./tools/fmt

Change-Id: I5097efa9650c9659f090553b1ba4171790cc51fd
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3945521
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2022-10-19 06:22:42 +00:00
Koki Ryu
16da55f236 Add --net option to the crosvm run command
Currently, --tap-name, --tap-name, --host-ip...etc commands are all used
to create a vhost-user net device. This CL unifies the command line arguments.

BUG=b:246224081
TEST=run the following tests:
- `cargo test -p devices virtio::net::tests`
- `cargo test -p net_util`

Change-Id: Ie1342f23f0951e5a81e54547bf725c0d9be19f97
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3893869
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Koki Ryu <kokiryu@chromium.org>
2022-10-19 02:18:27 +00:00
recipe-roller
43edde25d8 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/8799919231068078929

recipe_engine:
0f888193b8
  0f88819 (sidereal@google.com)
      [recipe-py] buildbucket: Expose "bb builders" in the API

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: Iabac48cf2b378f2f2210cd36498b6407bf36e2b5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3965668
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-10-19 00:55:38 +00:00
recipe-roller
2c50cc424f 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/8799920490053070497

recipe_engine:
763aebeb5b
  763aebe (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 9f32e02d53ad to 0b4ca8594812

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: If59a8563b7a9b752abe564499a76b668afd6ed11
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3965283
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-10-19 00:37:38 +00:00
recipe-roller
f3a9280040 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/8799928668461771985

depot_tools:
1b48a2184a
  1b48a21 (qyearsley@google.com)
      Deploy lucicfg version 1.33.4 enabling location_filters

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: I460853dd06ed4ed5a32853e551e3e68b7de6f9ed
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3965274
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-10-18 22:27:02 +00:00
recipe-roller
f940ece70c 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/8799931178579205025

recipe_engine:
e3c4498ea5
  e3c4498 (randymaldonado@google.com)
      [buildbucket] adding step tags to streams

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: I97e3cb3a872c01dd4087171eda607bf42804235a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3965272
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-10-18 21:48:45 +00:00
Dennis Kempin
1c66b6cf7e Add mingw64 builder to postsubmit
Mingw64 builds are used frequently by linux developers to check
windows portions of crosvm and part of ./tools/presubmit.

Test in postsubmit and once the builder is green it can be enabled
in the CQ as well.

BUG=b:254316054
TEST=recipes.py tests run

Change-Id: I8495446772a54d63644e73d07423892e28cedd1a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3964541
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-10-18 21:12:14 +00:00
Eval EXEC
b951ca684f fix bindgen installation instruction
The bindgen cli tool has changed to a workspace member of rust-bindegen
repo: https://github.com/rust-lang/rust-bindgen/commits/master/bindgen-cli

Change-Id: Ie3248d61919fdb742e49f57a10f5db827cd8230d
Signed-off-by: Eval EXEC <execvy@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3964808
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-10-18 19:50:46 +00:00
Pujun Lun
1289167d24 crosvm: enable the "gpu" feature by default on Windows.
BUG=b:213149288
TEST=presubmit

Change-Id: I726324893d78b8cc0303d1bb4d8132e48889a5bc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3960861
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Pujun Lun <lunpujun@google.com>
2022-10-18 18:18:38 +00:00
David Stevens
c11683b07f seccomp: add lseek to all devices
The panic hook calls read_to_string, which relies on lseek internally.
Most devices already allow lseek, but add it to the common policy files
to ensure that devices can properly panic.

BUG=None
TEST=compiles

Change-Id: I99d6d1d258706874cc04ce550108991631d71706
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3960213
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2022-10-18 06:39:41 +00:00
Keiichi Watanabe
9867495716 docs: Replace crbug link with issuetracker.google.com
BUG=none
TEST=./tools/fmt

Change-Id: If7a252615f81530df026c5b2659457d4e8ec6be6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3960212
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2022-10-18 06:22:41 +00:00
Pujun Lun
b849ebd0e1 crosvm: GPU and display arg parsing for Windows.
This replaces the handwritten arg parser with the serde_keyvalue
based parser. Eventually we will unify the arg parsing with Unix.

BUG=b:233676779
TEST=cargo b --features all-msvc64,gpu --no-default-features
TEST=cargo t -p vm_control --features all-msvc64,gpu
     --no-default-features
TEST=cargo t -p crosvm sys::windows::config::
     --features all-msvc64,gpu --no-default-features

Change-Id: I36a563be9767c7e5cbd3ab44f6a9ba23cd64cdb6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3939033
Commit-Queue: Pujun Lun <lunpujun@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2022-10-18 05:17:53 +00:00
recipe-roller
11a7826e0d 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/8799999132750537665

depot_tools:
dbaca22bdf
  dbaca22 (brucedawson@chromium.org)
      Make license check stricter 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: I14eb72ea9d2015d8c173554bb380a65ea99da158
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3962163
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-10-18 03:46:00 +00:00
recipe-roller
36aa700c37 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/8800000391889006401

depot_tools:
c950858a72
  c950858 (aravindvasudev@google.com)
      Update banned word regex matcher

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: I3f535f1ed7cac45213ddff71a73a4e500ffcaa01
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3962162
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-10-18 03:24:55 +00:00
Gurchetan Singh
9142190652 rutabaga_gfx: allow running context types without 3D component
It's not necessary to build 3D rendering support to run the
cross-domain context type.

Default implementations are added for some hypercalls, since
the guest kernel may still think it's running a KMS display.
That adds log-spam if errors are present.

BUG=b:173630595
TEST=Run weston terminal in the guest

Change-Id: I8155cf9d9867a329927b7dd4bb22c385510966a2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3961536
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
2022-10-18 01:54:59 +00:00
Keita Suzuki
5f4321b0a3 integration_tests: add tests for disk resize command
Add the test for disk resize command. This patch also updates the Vm
fixture to support additional argument to the command, and also updates
the Vhost-user backend fixture to use devices command.

BUG=b:243127910, b:191845881
TEST=./integration_tests/run

Change-Id: I8f1f4bd6a986ea77507a2ed6f1ae8582b10d3178
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3954786
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2022-10-17 23:59:37 +00:00
Zihan Chen
a95adc3124 tools/cros_container: Add experimental CrOS builder container
This allow GCP cloud build to fresh and incrementally build updated
docker containers to test upstream crosvm in CrOS tree efficiently.
Currently this resides in an experimental GCP project while being WIP.

TEST=Both fresh and incremental can build, emerge-hatch in pulled container
BUG=b:240692674

Change-Id: Id54014f347c00e4dae16674b430159dd8cfa67aa
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3934983
Commit-Queue: Zihan Chen <zihanchen@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2022-10-17 21:29:57 +00:00
Noah Gold
cb55cd0394 tracing: rename tracing to cros_tracing.
`tracing` conflicts with a crates.io crate. Since we may support tokio
tracing in the future, and want to submit some benchmarks against it
right now, we should rename our crate.

BUG=b:253517247
TEST=presubmit

Change-Id: I32bf64a7ce1830e881bd582e4606932782df65c6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3957598
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
2022-10-17 20:49:16 +00:00
Pujun Lun
fad7b68139 devices: generate EDID for disabled displays.
As we always report the maximum number of displays (16), the kernel
would issue VIRTIO_GPU_CMD_GET_EDID for all displays even if they
are marked as not enabled. However, VirtioGpu::get_edid() would
return an error if the display is not enabled.

We could report some default EDID for disabled displays. Also
noticed that EdidBytes has 2 impl blocks, which doesn't seem
necessary, so they are merged now.

BUG=b:253482501
TEST=tested in Windows downstream

Change-Id: I666961fe33a6143b9d022049abf05be4ec757a8d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3957536
Commit-Queue: Pujun Lun <lunpujun@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-10-17 16:23:45 +00:00
Alexandre Courbot
ab613b56a1 video: decoder: vda: use wrapping multiplication for timestamp
When decoding using libvda, the frame timestamp is truncated to 32-bits
and needs to be restored to its original value. This is done by doing a
multiplication with the truncation factor. However, if libvda gives us
an invalid timestamp, the multiplication can overflow and cause the
video device process to panic. Avoid this by switching to a wrapping
multiplication - the passed timestamp will still be invalid, but the
decoder device will signal an error instead of crashing.

BUG=None
TEST=cargo build --features "video-decoder,libvda"

Change-Id: Iabe683a997e0e9dea8c2bea53ef520f53868e590
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3958881
Reviewed-by: David Stevens <stevensd@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-10-17 04:31:17 +00:00
recipe-roller
894670a919 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/8800287282146405089

depot_tools:
c9f904f205~..77e64ae61ebda9e20f1eee461149e601c65b0a8f
  c9f904f (brucedawson@chromium.org)
      Move python2_usage.txt from depot_tools to temp
  77e64ae (sunxiaodi@google.com)
      [Chrome Health] Update batch priority in pinpoint CLI

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: Ic947fd6f416f1e8a4ab2c4259a32f47381230c7d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3956730
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-10-14 23:27:03 +00:00
Frederick Mayle
472b249bc8 plugin: fix health_check error
Getting the following error at HEAD.

    error: unused import: `base::Descriptor`
      --> src/crosvm/plugin/process.rs:24:5
       |
    24 | use base::Descriptor;
       |     ^^^^^^^^^^^^^^^^
       |

Change-Id: Ic638c277941fcdc41542c84a184d71680218b42a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3956728
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Frederick Mayle <fmayle@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-10-14 23:14:38 +00:00
Dennis Kempin
849f1558cf Enable the video-encoder feature upstream
This feature can be enabled now that we have ffmpeg enabled.

BUG=b:244618273
TEST=presubmit

Change-Id: Ic1c36ffa46729fcbdc408135f4167c49042ea56a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3953083
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2022-10-14 20:31:19 +00:00
Dennis Kempin
5a32a2d198 Enable vaapi feature upstream
The feature can be built but not tested without access to an intel
GPU.
To enable the build, the testvm and dev container are updated to
include libva.

BUG=b:244619376
TEST=presubmit

Change-Id: Ia8c4dc46ccbcd244bf57441f2c550a6b73c67b1c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3946027
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2022-10-14 20:31:19 +00:00
Dennis Kempin
f91a9f673a Remove plugin-render-server feature
This feature was used for experiments and is no longer needed.

BUG=b:253086623
TEST=presubmit

Change-Id: Id8ece0e1e8588a5716794961c359482bc60dc729
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3946029
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-10-14 20:31:19 +00:00
Dennis Kempin
bb9a3a5572 Document feature flags and introduce new feature sets
The feature flags are documented using the document_features
crate.
Each platform gets one feature set that enables the features that
are built and tested for that platform.

The only functional difference is that the plugin feature is now
enabled in clippy. Otherwise this should be a no-op.

BUG=b:243894033
TEST=presubmit && cargo doc

Change-Id: Ia910bc2670696172daedcc503f7ad5844a844964
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3946024
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-10-14 20:31:19 +00:00
Daniel Verkamp
ba1ddbda41 broker: remove cmd /c in ping tests
This allows the tests to work in the dev_container wine environment and
should not have any negative effects on actual Windows.

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

Change-Id: Ic94511573b83e6dd82163185098d3f1fdd871a4e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3935522
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-10-14 20:04:59 +00:00
Daniel Verkamp
4b6c33d346 base: windows: error if CPU >= 64 in set_cpu_affinity
The loop that generates the CPU affinity mask uses a shift by the CPU
index to generate a u64, so if the shift count is 64 or greater, it will
shift past the end of the u64 and panic when overflow checks are enabled
(which we enable by default in release builds in Cargo.toml).

Add a bounds check so set_cpu_affinity() will return an error rather
than causing a panic in this case.

BUG=None
TEST=run tests via wine on 72 logical core machine

Change-Id: I2ac4a0602b2c014aeca4939ec2882926cdfe2c29
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3935523
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2022-10-14 20:04:46 +00:00
Idan Raiter
28de38563d devices: vhost-user: GPU features fix and handle tasks like other devices
- Spawn detached tasks with an AbortHandle like other devices.

- Bug fix: without calling queue.ack_features at the beginning of
  start_queue, VIRTIO_RING_F_EVENT_IDX causes a hang.

BUG=b:243061269
TEST=presubmit, downstream

Change-Id: I03eba1c60a541cf7862feb434fc9fc1064319629
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3950853
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Idan Raiter <idanr@google.com>
2022-10-14 19:36:09 +00:00
Idan Raiter
91741705a5 rutabaga: Use method instead of property
In an earlier refactor, mistakenly called .properties instead of
properties()

BUG=b:244622199
TEST=downstream

Change-Id: Ia34e6167ad04e9b42580193b9fcd6b4f8acaf1fd
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3939622
Commit-Queue: Idan Raiter <idanr@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-10-14 18:21:28 +00:00
Idan Raiter
3e19680831 rutabaga: Don't enable all features for Vulkano device
Some devices support so many features, that they collide. In Vulkano's
autogenerated out\features.rs, some are tagged as:

crate::device::FeatureRestriction::ConflictsFeature

Meaning both cannot be on at the same time. An example failure is
on Nvidia for:

shading_rate_image
attachment_fragment_shading_rate

My GPU supports both and thus cannot be created since we attempt to
enable all supported features.

This is VUID 04480
https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkDeviceCreateInfo-shadingRateImage-04480

This change just removes features from being requested. Instead we
should choose the specific features we want as they come up. Currently
for GPU mapping we don't need features.

BUG=b:244622199
TEST=downstream

Change-Id: Ic511d04cf2987bfc7189182a1dc002a367b5d9f7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3936679
Commit-Queue: Idan Raiter <idanr@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-10-14 18:17:02 +00:00
Jason Macnak
f4d2214077 devices: gpu: Add DPI to display parameters
... and include this information in the EDID blob.

BUG=b:163864461
TEST=cargo build
TEST=Android build
TEST=launch Cuttlefish with various DPIs and inspect
     `adb shell dumpsys SurfaceFlinger`

Change-Id: I3f9ca0283f335d51063bf8e555ff2ffa7ead104b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3954473
Reviewed-by: Pujun Lun <lunpujun@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Jason Macnak <natsu@google.com>
2022-10-14 18:04:48 +00:00
Allen Webb
07041ace37 Adding missing # provided by ebuild to Cargo.tomls
cros_async and by extension serde_keyvalue are needed on ChromeOS, so
add the `# provided by ebuild` comments where appropriate to make it
possible to uprev cros_async (which requires pulling in serde_keyvalue).

BUG=b:250883877
TEST=kokoro passes

Change-Id: I423cac0c4e5e30afac058b914358caca7d27edbf
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3953082
Auto-Submit: Allen Webb <allenwebb@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2022-10-14 16:42:38 +00:00
Pierre-Clément Tosi
ee4c635de2 cmdline: Add --protected-vm-with-firmware
Add a mode where the VM is placed in protected mode but the protected
firmware has been provided to crosvm and preloaded at its usual address,
instead of being loaded by the hypervisor at VM boot time. This is
useful for automated testing of firmware builds and development.

BUG=b:243646855
TEST=build

Change-Id: I849f3c6f0de55607893862d1d7739f6e1b410990
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3944853
Commit-Queue: Pierre-Clément Tosi <ptosi@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Andrew Walbran <qwandor@google.com>
Reviewed-by: Jiyong Park <jiyong@google.com>
2022-10-14 14:12:46 +00:00
Pierre-Clément Tosi
b779c5cdef hypervisor: ProtectionType: Add helper methods
Introduce a set of helper methods that expose individual characteristics
that particular subsets of the ProtectionType variants share. These will
simplify various match statements into conditionals by encapsulating the
deduction of those characteristics, making the calling code more concise
and robust.

BUG=b:243646855
TEST=build

Change-Id: I65ff3e61c448d90704551b79c21c64d1b4c11dc4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3944852
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2022-10-14 14:12:46 +00:00
Pierre-Clément Tosi
b73080af06 UnprotectedWithFirmware: Use swiotlb by default
Even if it isn't functionally necessary, use swiotlb and virtio bouncing
in UnprotectedWithFirmware as the mode is supposed to emulate protected
mode (e.g. for debugging), which matches when VIRTIO_F_ACCESS_PLATFORM
is set by virtio::base_features().

BUG=b:243646855
TEST=build

Change-Id: I987707060805aadce9f00faddc137a62c0d9993f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3944851
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Andrew Walbran <qwandor@google.com>
2022-10-14 14:12:46 +00:00
Dennis Kempin
e8842561c6 Enable a couple of trivial features in upstream
Also fixes health-check to recognize that the proto optional
crate is referred to by other features.

Change-Id: Ie0e8f9ee8960ccb31539eeb2604e8c9654798de4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3943594
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-10-13 17:24:22 +00:00
Daniel Verkamp
915dfb2f84 tools/presubmit: update mingw64 build steps
This now requires --platform instead of --target, per the error message
from tools/run_tests:

  Warning: Setting --target for running crosvm tests is deprecated.
  Use --platform instead to specify which platform to test for.

BUG=None
TEST=tools/presubmit

Change-Id: I0e52f97273774b968617007c098aa80d33103263
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3950716
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-10-13 16:25:38 +00:00
Vikram Auradkar
660aee3312 sandbox: Add a README
BUG=b:213170185
TEST=presubmit

Change-Id: I8ff176f9f6e3bc84e9552d208ba587d204c9bbb3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3949681
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Vikram Auradkar <auradkar@google.com>
2022-10-13 16:25:08 +00:00
recipe-roller
d04b0f51fe 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/8800447085276818417

depot_tools:
2c0a8c736a
  2c0a8c7 (bryner@google.com)
      New vpython to depot tools.

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: I1ec27aa89470f59108a448f6ba680cb170bd4ef9
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3949838
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-10-13 05:04:21 +00:00
Ryuichiro Chiba
f202332893 devices: virtio: Fix the vhost worker to set actual queue size to the vhost device
Vhost worker uses the maximum queue size the host offers when setting a
queue size to the vhost device, which leads inappropriate behavior when
a guest preapares a virtqueue whose size is smaller than the maximum
size.
Fix the vhost worker to set the actual queue size to the vhost device.

BUG=b:235857465
TEST=`cargo build`
TEST=`./tools/run_tests`
TEST=host and guest can communicate via vhost-vsock

Change-Id: I99af745788c347ca2770b979252f8ea8dde34462
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3946422
Commit-Queue: Ryuichiro Chiba <chibar@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
2022-10-13 01:40:38 +00:00
recipe-roller
b820d2fe02 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/8800460286244928065

recipe_engine:
d24cde52d4
  d24cde5 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 9e13cd7ebe15 to 9f65ffe719f7

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: I50b1602df2561fdd5d9a1e8d265f15c43ea7e01b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3949684
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-10-13 01:37:32 +00:00
recipe-roller
04f01184cf 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/8800472879931179537

recipe_engine:
e566c1a8c3
  e566c1a (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from b10c9ceb8bae to 05765dd1fd00

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: I776e91ac2bdbfbb1bd904ec03f1414ad1866fa1c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3950951
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-10-12 22:16:03 +00:00
Vikram Auradkar
44a07970cb sandbox: upstream sandbox
The crate depends on a prebuilt library.

BUG=b:213170185
TEST=presubmit

Change-Id: I810baa14afa53e88f6b2a739481a6d3656efc2e5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3784338
Commit-Queue: Vikram Auradkar <auradkar@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-10-12 21:05:39 +00:00
Daniel Verkamp
990a0ce365 integration_tests: search for mkfs.ext4 in sbin via PATH
Some distributions (such as Debian) put the mkfs.ext4 binary in /sbin or
/usr/sbin. However, in our case, we don't need to be root, since we are
only using it to create a filesystem inside a normal file, not on a
block device. Adding these directories to the path lets us find the mkfs
binary on these systems without requiring sudo privileges.

BUG=None
TEST=cargo test -p integration_tests -- --test-threads=1

Change-Id: I9b180f941ee81c5febf78004050d211fe1912621
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3940108
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2022-10-12 20:28:04 +00:00
recipe-roller
722c6e7c8d 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/8800485461836211633

depot_tools:
5c72d1e40c~..d540d8b0cd9994e5d8b489bab6925c60e92d8087
  5c72d1e (zhaoyangli@chromium.org)
      [mac_toolchain] Roll mac_toolchain in depot_tools to latest ver...
  d540d8b (sokcevic@google.com)
      [git-cache] Fix remove files recursively

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: I0d0a7ed08f6d94e0d717dba0e5d16a443da73ee4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3949500
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-10-12 18:57:40 +00:00
Pujun Lun
3b2ecd9570 gpu: a few fixes for Windows build.
1. gpu_control_tube is not used on Windows yet. We will make use of
   it and test it in the downstream first before removing the Unix
   feature flag.
2. In Gpu::keep_rds(), skip appending descriptors of stdout and
   stderr since it is hard to find such descriptors on Windows, and
   this function won't be called on Windows anyways.
3. Some functions in gpu_display should be guarded with gfxstream
   feature flag, since we don't need to link against gfxstream
   binary when we are building/tesing without gfxstream.

BUG=b:213149288
TEST=presubmit

Change-Id: I28c3d16d82916e6d4a542aa008dd09015141716c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3947825
Commit-Queue: Pujun Lun <lunpujun@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-10-12 18:09:48 +00:00
Andrew Walbran
13cbc69abc aarch64: Don't include pVM firmware region in memory size calculation.
The pVM firmware memory region is allocated before
AARCH64_PHYS_MEM_START, but several parts of the code were assuming that
all memory was contiguous and after that.

BUG=b:244553205
TEST=Patched into AOSP and ran some VMs.

Change-Id: I8caefc9cae79c98ea62ee02a506b1b485d3f09a6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3921604
Reviewed-by: Pierre-Clément Tosi <ptosi@google.com>
Commit-Queue: Andrew Walbran <qwandor@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Jiyong Park <jiyong@google.com>
2022-10-12 17:42:33 +00:00
recipe-roller
9ec7172c7b 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/8800490495364816801

depot_tools:
5b5ee2de1b
  5b5ee2d (jojwang@chromium.org)
      [git-cache] Fix print log.

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: I93120559d7f553091938487718ef4b9d76ad5aa8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3950489
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-10-12 17:36:37 +00:00
Daniel Almeida
5ede18b6f7 media: libva: take ownership of SegmentParamVP9 in the wrapper
It's not ergonomic for the calling code to pass in an array of
references.

Just take ownership of that array, as it's not going to be used again
when the calling code succeeds in creating the wrapper.

BUG=b:214478588
TEST="cargo build --features=video-decoder,vaapi" successfully builds
the libva crate

Change-Id: I97d91f9f996c298450e65c21c126a9739ec4615f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3900314
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2022-10-12 12:55:23 +00:00