Commit graph

7410 commits

Author SHA1 Message Date
Daniel Verkamp
03dd1feab7 Cargo.toml: depend on zerocopy 0.6 explicitly
Previously all of the zerocopy imports just used "*", but there are
API changes in zerocopy 0.7, so ensure we get a compatible version by
depending on 0.6 everywhere.

This is a no-op since Cargo.lock already specifies a 0.6.x version, but
it will prevent accidentally upgrading to 0.7.x without updating to the
new API.

BUG=b:301283548
TEST=cargo build

Change-Id: Ifd702d982a09b5083dddd666dc6f3052cba22214
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4878502
Reviewed-by: Zihan Chen <zihanchen@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-09-20 21:28:58 +00:00
recipe-roller
67cb4bca25 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/8769403782891064321

depot_tools:
7eb4e4841f
  7eb4e48 (hferreiro@igalia.com)
      Don't limit ninja -j on Linux beyond ulimit -n

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: I8c33fca3d93691d5e69773bc818b4bdde36ddd8a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4879190
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>
2023-09-20 20:49:05 +00:00
Zihan Chen
5db1e3c1fc e2e_tests: Add postgres benchmark
Add a preliminary version of pgbench running in e2e_tests
facilities. It currently does nothing with the benchmark result.

TEST=Can pass and produce results with `./tools/bench postgres`

BUG=b:257303497

Change-Id: If2f06cb0a9c91f5d7240094bacf86fc681062127
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4763144
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2023-09-20 19:00:15 +00:00
Kaiyi Li
79a105ff53 Do not require unsafe block to use syscall_bail
GetLastError() should be always safe to call.

Test: build
Change-Id: I2accfba608514a9da03b8c46bd7048137c14b462
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4814443
Commit-Queue: Kaiyi Li <kaiyili@google.com>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
2023-09-20 17:18:26 +00:00
Pujun Lun
7eac9a86c7 Add AOT for GPU display.
This will record the thread/window messages flowing through our message
pump. It could help debug window not responding issues like b/264846691.

TODO(b/252870196):
Add freeze detection and trigger simulated crash reports.

Bug: 264846691
Test: Triggered crash reports and checked the generated traces
Change-Id: If7a9fc4da40ed5b56cb7eff40e2680eccf0c6150
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4804800
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
Auto-Submit: Kaiyi Li <kaiyili@google.com>
2023-09-20 17:17:11 +00:00
recipe-roller
efdbe716bb 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/8769416995850827121

depot_tools:
96a5bc2c44
  96a5bc2 (philwo@google.com)
      Refactor the depot_tools OWNERS file.

recipe_engine:
40747dc790
  40747dc (mohrr@google.com)
      [led] Rename edit-cr-cl to edit-gerrit-cl in tests

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: I5561a92ba60d7f5e5cca3442cd3386dd8dfb71d2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4878755
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>
2023-09-20 17:16:32 +00:00
recipe-roller
4e90364d18 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/8769425802176644865

recipe_engine:
95f73e8159
  95f73e8 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 45502e388ddf to fe20b089d931

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: I68cd18fc238288a786be26be13616d7d58b712ad
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4878754
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>
2023-09-20 14:59:03 +00:00
Natsuko Mineno
f2786fc39d tracing_analyser: Add unit test for LatencyData
unit test for create_layer

BUG=b:297954291
TEST= Run cargo test and the tests pass

Change-Id: I8e7b36a53c9f3083192d72f6375d870a75e9976b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4857968
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Natsuko Mineno <natsukomineno@google.com>
Reviewed-by: Ryuichiro Chiba <chibar@chromium.org>
2023-09-20 08:17:23 +00:00
Federico 'Morg' Pareschi
68fcb7ab99 base: unix: do not fail when deleting unpolled fds
The error ENOENT is reported in `epoll_ctl(2)` as an error code we
return when the poll operation is asked to modify or delete an fd that
is not being polled by the current instance. In this case, we don't need
to fail as we can just silently ignore the error. This allows us to
delete fds in an idempotent way without failing.

In our codebase we currently do not rely on this ENOENT error behaviour
to bubble up so we can safely transparently drop this error.

BUG=None
TEST=presubmit

Change-Id: I1ab9b9300e0e48340db71b10281107290439e24b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4875917
Auto-Submit: Morg <morg@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Morg <morg@google.com>
2023-09-20 04:20:36 +00:00
Federico 'Morg' Pareschi
f174811f72 devices: event_loop: Add pausable events
This CL adds the option to "pause" and "resume" polling on a given file
descriptor for the event_loop. This is useful in situations where we
want to temporarily stop reading from a file while maintaining a
reference to its event handle that we can resume polling on at a later
time.

BUG=b:297957754
TEST=presubmit

Change-Id: Idf8c9eb0663139ff6e8ba61566c57c0c591f5cef
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4865766
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Auto-Submit: Morg <morg@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Morg <morg@google.com>
2023-09-20 04:20:36 +00:00
recipe-roller
a5631c2b36 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/8769469215078833025

depot_tools:
ed9a0819a4
  ed9a081 (aredulla@google.com)
      [ssci] Add prescript to metadata validation results

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: I0d7850831daf82a1099e96d691f6c9e519d41026
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4877809
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>
2023-09-20 03:26:06 +00:00
Junichi Uekawa
d13de4b488 crosvm: tools: contrib: A tool to dump memory info.
Dumps memory stats and page cache stats relevant for diagnosing issues
with virtio-blk and ARCVM.

BUG=b:190337734
TEST=cargo run ${DUT}

Change-Id: Iacf8f5e7238ad6f2777162af11beccfb7403bf13
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4703695
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
2023-09-20 02:48:21 +00:00
Noah Gold
1a4a933f2f devices: vsock-win: save connections in sleep/wake.
When taking a snapshot, all vsock connections are dropped due to the way
sleep and wake are implemented (at least on Windows). This isn't
what we want since sleep/wake shouldn't be destructive, and when they
are it can cause a VM to break unexpectedly when all the vsock
connections get broken. This CL modifies the Windows vsock
implementation to keep connections around between sleep/wake. Of course,
connections will break across a snapshot/restore, but that is expected &
normal.

BUG=b:300365100
TEST=took snapshot & verified vsock host app remained connected as
expected.

Change-Id: If82bebc49bd0bab4d8bd0b54e704b7fe43f8834f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4873794
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
Reviewed-by: Richard Zhang <rizhang@google.com>
2023-09-20 01:06:25 +00:00
Natsuko Mineno
4437dbd283 cros_tracing_analyser: Filter for flamegraph
Filter by event_name and how many time-consuming events to output

BUG=b:297954291
TEST= Run the tool with a trace.dat collected by trace-cmd.

Change-Id: Id2375a394cd43da8d9342d309c3830f19b51654e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4853089
Reviewed-by: Morg <morg@google.com>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Ryuichiro Chiba <chibar@chromium.org>
Commit-Queue: Natsuko Mineno <natsukomineno@google.com>
2023-09-20 00:55:57 +00:00
Natsuko Mineno
ad1924ea3f cros_tracing_analyser: Add unit test for EventData
unit test for populate_event_names and calculate_latency_data

BUG=b:297954291
TEST= Run cargo test and the tests pass

Change-Id: Iff7a3ebcead4b2d777881c0f1cb5859e126bc5c4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4857960
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Ryuichiro Chiba <chibar@chromium.org>
Reviewed-by: Morg <morg@google.com>
Commit-Queue: Natsuko Mineno <natsukomineno@google.com>
2023-09-20 00:55:50 +00:00
Natsuko Mineno
c2967a6ede cros_tracing_analyser: Add feature for flamegraph
Extract name and latency of all events output it to json file

BUG=b:297954291
TEST= Run the tool with a trace.dat collected by trace-cmd.

Change-Id: Iea72e4aebaaecc4b11e7289af771540c32938d71
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4839555
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Ryuichiro Chiba <chibar@chromium.org>
Commit-Queue: Natsuko Mineno <natsukomineno@google.com>
2023-09-20 00:55:45 +00:00
recipe-roller
ab9ee8cadb 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/8769485570884913841

depot_tools:
50b27a5308
  50b27a5 (gavinmak@google.com)
      Add gclient installhooks to add pre-commit hook

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: I851614d20a6a667d3985483e3ada13ad62efc7f1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4877797
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>
2023-09-19 23:11:28 +00:00
Zihan Chen
7a62cb0465 e2e_tests: Support program parsing guest command output
Delegate has been restructured to support this change, and sadly
Win64 compile exclusion has to be reintroduced to avoid compiling
this binary on Windows.

Now e2e_tests can explicitly obtain result (including stdout/stderr/
exit code/signal) from command ran in test guests.

BUG=b:257303497

Change-Id: Ibcd773b69cca9708a8dacb34cc870ca527fa32c3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4787727
Auto-Submit: Zihan Chen <zihanchen@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2023-09-19 22:27:35 +00:00
Frederick Mayle
d15db8f00a crosvm: add cmdline option to set GPU's PCI address
BUG=b:301112810

Change-Id: I27d4f7b0c13ac3b5a6f70b2a49f4f6fc4d33421a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4877354
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-09-19 21:20:57 +00:00
Daniel Verkamp
71c2583edf vtpm: remove x86-64-only restriction
Remove the cfg(target_arch = "x86_64") checks for the vTPM feature,
since there is no architecture-specific code involved - it is simply a
wrapper around a D-Bus service.

Builders of crosvm can choose not to enable this feature using the vtpm
feature flag, as before.

BUG=None
TEST=tools/dev_container tools/presubmit
TEST=cargo build --target=aarch64-unknown-linux-gnu --features=vtpm

Change-Id: I432b5a129165964ac34842ec9b264fd3f570b10c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4875224
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-09-19 18:46:44 +00:00
Daniel Verkamp
24a1b81699 crosvm: add cfg checks for net feature
This feature is enabled by default, so builds using the default feature
set should get the same functionality as before.

Fixes mingw --no-default-features build since now both net and slirp are
disabled by default. Windows builds with net but without slirp will not
work (failing at compile time), but that is effectively the same
behavior as before.

BUG=b:260607247
TEST=cargo build --target x86_64-pc-windows-gnu --no-default-features

Change-Id: I97f6a8bfd7b9e6673cafee4f22cb7c08c1627a75
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4823133
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2023-09-19 18:33:39 +00:00
recipe-roller
aac1641f1c 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/8769544081590464929

depot_tools:
0fd098edd6~..4dac5d6b4b39a26d72698e701e59c47278d66fec
  0fd098e (tikuta@chromium.org)
      update goma to version 261
  4dac5d6 (aredulla@google.com)
      [ssci] Return relative license filepath instead of absolute

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: I707005e5ba5eeb10012cd47fc088df9576a9e5bc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4873795
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>
2023-09-19 07:39:24 +00:00
Federico 'Morg' Pareschi
93d6c48ebb devices: usb: refactor backend device provider
This CL splits the logic of a generic backend device provider with the
specific implementation of a host backend device provider (backed by
usbdevfs semantics). By separating common logic with backend-specific
implementation logic, we make it easier to implement alternative
backends (like virtual USB devices) in the future.

BUG=b:297957754
TEST=presumit

Change-Id: I1f38708cb7aefd324977e72f3f38da6f37b31213
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4865911
Commit-Queue: Morg <morg@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Ryuichiro Chiba <chibar@chromium.org>
Auto-Submit: Morg <morg@google.com>
2023-09-19 07:30:26 +00:00
recipe-roller
8bb6225d33 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/8769560440279737057

depot_tools:
36bd52621f
  36bd526 (aredulla@google.com)
      [ssci] Support alias for Shipped field

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: I889963d8d992005a05926e1dccb8fcbb515cddf6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4874732
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>
2023-09-19 03:19:58 +00:00
Frederick Mayle
7337acac75 e2e_tests: enable vhost-user snapshot-restore test
Had to tweak the assert because the queue snapshot no longer has an
"activated" field.

The first `vm` created wasn't dropped until the very end of the test and
then the shutdown would hang (didn't debug why). Added a scope so that
everything from the first VM is dropped before we attempt the restore.

Change-Id: I9e3a10dbe08045d581742645d8305ba1951530cf
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4875223
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Elie Kheirallah <khei@google.com>
2023-09-19 00:27:55 +00:00
Elie Kheirallah
191604ffd3 devices: virtio: add context argument in test macro
Some devices require a control tube for creation, whereas some others have
the control tube as an option, and some don't even have a tube. Some
might have additional state. Those get passed in the context argument.

BUG=b:292276136
TEST=cargo test

Change-Id: I49c0732929de1b603093ed081bd4dd8107c61ba2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4860866
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Elie Kheirallah <khei@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Elie Kheirallah <khei@google.com>
2023-09-18 22:02:39 +00:00
recipe-roller
0a72737ac7 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/8769588751148579521

depot_tools:
3b9212b7ee
  3b9212b (sokcevic@chromium.org)
      [gclient_scm] Disable push recurseSubmodule

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: If5a441cefff8c50fba4371d28874183886e383d1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4873695
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>
2023-09-18 19:53:27 +00:00
Noah Gold
f90c071347 devices: virtio-console: wait for pipe connection.
For the named pipe console, we shouldn't start reading from it until the
pipe is connected otherwise we get a bunch of errors due to the pipe not
being connected. There are still other major issues with the pipe
console, but it'd be good to fix this one for now.

BUG=b:297294476
TEST=tested with other fixes and the console seems to work.

Change-Id: I74a3e4b0a587f8a9dc52083d2ed2cec69a75283b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4867358
Commit-Queue: Noah Gold <nkgold@google.com>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
2023-09-18 18:16:24 +00:00
recipe-roller
8ab3798706 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/8769596929451768657

depot_tools:
8a25998dd9
  8a25998 (samuel.r.attard@gmail.com)
      handle absolute and relative gn imports in autoninja

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: Ieb1c9db19f163bb5f956894812f802283ff9df5b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4873687
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>
2023-09-18 17:41:20 +00:00
recipe-roller
ac04ae2bb9 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/8769598085810324065

recipe_engine:
d792234e42
  d792234 (iannucci@chromium.org)
      Remove API from importer.

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: Idff355310eb4ccc4d9f18f052819cea4cc66e623
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4873682
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>
2023-09-18 17:20:41 +00:00
recipe-roller
dde4098012 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/8769601964557062897

depot_tools:
523537049c
  5235370 (yiwzhang@google.com)
      gclient: choose cipd log-level based on the gclient verbosity

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: Ied1ecc80511d354834dfa4ae1ffa6ff06ac7f4e1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4874196
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>
2023-09-18 16:22:00 +00:00
Dennis Kempin
e879ef6e81 testvm: Increase rootfs size to 8GB
cloud-init takes care of resizing the rootfs to fit the size of the
block device.
The downloaded image size is the same as before since it's a compressed
qcow2 file.
This will improve stability of parallel tests to allow multiple
snapshot tests to run at the same time.

BUG=b:300669562
TEST=run_tests --dut=vm

Change-Id: I1e90f2a54e449696b60e338c1097e42eedba9bae
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4869245
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2023-09-15 22:04:02 +00:00
Dennis Kempin
b4b0a82ca5 infra: Pass NEXTEST_PROFILE through to test runner
This will pick up the nextest.toml configuration for postsubmit,
enabling postubmit failures for flaky tests.

BUG=b:300669562
TEST=NEXTEST_PROFILE=postsubmit dev_container presubmit

Change-Id: I9b518aebbcba083e670fa8a5099b846316a6864c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4863126
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2023-09-15 21:58:24 +00:00
Gurchetan Singh
5dfd74a068 rutabaga_gfx/ffi: new AEMU package names
New package names for the AEMU utility library as requested.

BUG=b:273561059
TEST=compile

Change-Id: I56a8f73601800a30cb815673cccb79da75d5325b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4865171
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
2023-09-15 21:55:07 +00:00
lunpujun
9c0457d2f5 Add support for 2k and 4k resolution.
We used to cap the guest resolution at 1080p. We are experimenting with
higher resolutions, gated by the feature flag enable_4k_uhd_resolution.
Two places need to change:

1. The virtual display size should be capped at 3840x2160 instead if the
   feature is enabled. This size is used as the guest resolution.
2. guest_dpi_manager should provide the recommended DPI for the newly
   added resolutions. It is fine not to check the feature flag there
   since the BSS knows whether or not to use those values.

get_virtual_display_size() may be called by validate_gpu_config(), which
happens very early and the process variants are not yet written to the
static variable PROCESS_INVARIANTS, so we can't use the macro
phenotype!. As a workaround, we load the process variants and read the
flag by ourselves. In the long term, the BSS should be specifying the
virtual display size when launching KiwiVM, so we should be able to get
rid of This workaround.

Bug: 276352265
Test: Ran GPG with the feature enabled/disabled, and verified that the
      resolution is capped at 4k UHD when it is enabled.
Change-Id: I3ec06deda1aa5b7fe89dde5bca426248b93b3ecf
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4804797
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Kaiyi Li <kaiyili@google.com>
2023-09-15 21:39:55 +00:00
Frederick Mayle
907a3a31ec e2e_tests: add pmem device to suspend-resume test
For more coverage.

BUG=b:266514902

Change-Id: I9ec4e391d3012b733d6809f6b219b96e0699635b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4868581
Reviewed-by: Elie Kheirallah <khei@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Frederick Mayle <fmayle@google.com>
2023-09-15 20:23:37 +00:00
Frederick Mayle
88c41512dd e2e_tests: refactor suspend-resume vm config creation
Change-Id: Iffa653fd229183c04203d821325b5d5a559fe72f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4868580
Reviewed-by: Elie Kheirallah <khei@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2023-09-15 20:23:37 +00:00
recipe-roller
132949f530 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/8769863688459432753

depot_tools:
d7ba85d1eb
  d7ba85d (agrieve@chromium.org)
      Add experimental --google-java-format flag to "git cl format"

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: I8731b6f3f55793de0683b3d2382bfeca2c50804d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4869175
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>
2023-09-15 19:01:03 +00:00
recipe-roller
07aec32c69 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/8769864940486557425

depot_tools:
30c1cba02f
  30c1cba (brucedawson@chromium.org)
      Handle import statements in args.gn 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: Ib9b1b8cbd16047499766e36a69ddbe6d8ca3cc49
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4868579
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>
2023-09-15 18:40:52 +00:00
Joe Hattori
6b19db6bd1 devices: virtio: scsi: Add command line option for SCSI devices
This implements the command line option for scsi devices. virtio-scsi is
supposed to be much more versatile than virtio-blk; it is capable of
returning detailed of errors, more than 28 devices can be attached
(while not possible in virtio-blk), it can emulate optical devices, etc.

This commit adds a command line option --scsi-block. For now, we do not
create SCSI device or handle virtio-scsi requests, but the features will
be added in the following commits in the CL chain.

cf) This is the spec of virtio-scsi
https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-3520006.

BUG=b:300042376
TEST=tools/presubmit
TEST=crosvm parses the --scsi-block option.
e.g.) ./crosvm run -b /path/to/root-image --scsi-block
"/path/to/another-image,ro" /path/to/kernel

Change-Id: I23eb10de191004ba43527dbf7adee684ad5aaf43
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4840762
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Commit-Queue: Joe Hattori <hattorij@google.com>
2023-09-15 08:54:30 +00:00
Shintaro Kawamura
0b0baa608a e2e_tests: add e2etests for vmm-swap
e2e tests confirming:

* crosvm swap command succeeds
* vmm-swap feature does not break guest memory content

BUG=b:293383846
TEST=./tools/run_tests2 --dut=vm -E 'rdeps(e2e_tests) & test(swap)'

Change-Id: Ia612663987a254a4a49b394474ed2d5bc01887a3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4722410
Commit-Queue: Shin Kawamura <kawasin@google.com>
Reviewed-by: David Stevens <stevensd@chromium.org>
2023-09-15 08:00:05 +00:00
recipe-roller
3a85cfd92c 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/8769909613971672257

depot_tools:
272e6ab3cb
  272e6ab (battre@chromium.org)
      Bash autocompletion for 'git new-branch' and 'git reparent-branch'

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: Iabdd7a624cba32af959a9a00b1ded341b4e3824c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4868174
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>
2023-09-15 06:48:45 +00:00
Federico 'Morg' Pareschi
ca0cd8b465 devices: usb: xhci: use getter for device_backend
We have a get_device_backend() that locks and returns the device
backend, yet we never use it in the usb_hub code. It's more appropriate
to use it when possible so we don't incur in incosistency bugs if we
decide to change the getter later.

Also, as per rust style guide, we get rid fo the "get" name in the
method.

BUG=None
TEST=presubmit

Change-Id: Ifcbced0618b7bc31cd89dac2a31a4b32eed31b57
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4865906
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Auto-Submit: Morg <morg@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2023-09-15 02:26:29 +00:00
recipe-roller
6af62025f2 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/8769925963165517377

recipe_engine:
13cbf26d63
  13cbf26 (ayatane@google.com)
      bcid_reporter: Uprev stable pin

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: I955ad25412ed98833c931eed9f89c08261e99668
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4863937
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>
2023-09-15 02:26:25 +00:00
recipe-roller
96d873723a 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/8769927855897194673

recipe_engine:
58c49d0d9e
  58c49d0 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 337f599fa50c to 8b73cff3b780

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: Ib69ddce6e103dd2376844e3906bf25644dce262d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4867362
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>
2023-09-15 02:00:15 +00:00
Frederick Mayle
aaac50edc6 devices: virtio: pmem: recapture Tube on sleep
BUG=b:266514902

Change-Id: If882a053739f1912dd7375cffcf8b297cd6a793d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4867478
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Elie Kheirallah <khei@google.com>
2023-09-15 00:32:04 +00:00
Frederick Mayle
ae96f954aa devices: virtio: pmem: require Tube in constructor
If the Tube is None, then activate will crash.

BUG=b:266514902

Change-Id: I587224730caa1bcfd661d8e55f172c9e32133d49
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4867477
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Elie Kheirallah <khei@google.com>
2023-09-15 00:32:04 +00:00
Daniel Verkamp
f5182d3e81 vmm_vhost: normalize disconnect error for Tube connections
Make the vmm_vhost Tube connection (used on Windows) match the behavior
of the Socket connection (used on Linux) by returning the specific
VhostError::Disconnect type rather than a generic TubeError when the
client disconnects. This also propagates into the special handling in
recv_header() that translates a VhostError::Disconnect into a
VhostError::ClientExit when the client exits at a clean point in the
connection.

Change-Id: If22e319f1e3657d95610601eb00eaab237aabd2f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4854945
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
2023-09-14 18:36:14 +00:00
Daniel Verkamp
478f5dfa4d CONTRIBUTING.md: add notes about related changes
Document the expectation that each change in a series of related changes
must pass the tests.

Change-Id: I9f704b8343ecd93482ad7321192b6175da65b52c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4865160
Reviewed-by: Morg <morg@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-09-14 18:17:13 +00:00
Daniel Verkamp
535fc34fdd devices: virtio: remove Queue::reset_counters
This function is unused after the removal of vvu.

Change-Id: Iaff036f7228c237c80211b41452b1006d7d9a377
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4859206
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-09-14 18:11:19 +00:00