Commit graph

8219 commits

Author SHA1 Message Date
Daniel Verkamp
869e67fc62 tube_transporter: remove from exclude and fix clippy issues
Change-Id: I834476fe3ac906309962355ae622466682222b7a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5321576
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-02-23 21:42:57 +00:00
Daniel Verkamp
cc6f7a15f7 win_audio: remove from exclude and fix clippy warnings
This seems to build fine upstream, so re-enable it to ensure it does not
get broken accidentally.

Change-Id: I1fcb5678ce33edb24d1aa047fa405b1d27100206
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5321440
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-02-23 21:42:57 +00:00
Daniel Verkamp
f88a2f3e03 win_util: remove from exclude and fix clippy checks
Change-Id: Ibfe05312db8c44dbc7f515b10b830c1e75e96852
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5321575
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-02-23 21:42:57 +00:00
Daniel Verkamp
b674dca9bd base: log: use Mutex for EARLY_INIT_CALLED
Replace the OnceCell<()>, which is effectively a slightly quirky
AtomicBool, with an actual Mutex, since we can construct them statically
now.

This ensures that the early logging init is finished before returning
from either early_init() or test_only_ensure_inited(); this doesn't
really matter for non-test code, since we would immediately panic if
early_init() were called twice, but for tests, it makes sure that the
second thread does not start calling logging functions before the first
thread finishes running apply_logging_state().

Change-Id: Ic857426cbd02096d5971ff7c41f79964ee294887
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5318702
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-02-23 19:38:57 +00:00
Daniel Verkamp
7b3f8df17e sync: Mutex and Condvar new() are const now
The standard library versions of these functions have been const since
Rust 1.63. Make our sync wrappers match.

Change-Id: I63ec097aa9fbb63735528827576f08ced2304a16
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5318701
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-02-23 19:38:57 +00:00
recipe-roller
f8824c134c 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/8755276318236513713

recipe_engine:
b86e012842
  b86e012 (vadimsh@chromium.org)
      [swarming] Update swarming pRPC CLI tool.

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: I5b36ba11c75035f0ded705b0bb5c9973f6769520
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5320363
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>
2024-02-23 19:14:33 +00:00
Daniel Verkamp
5919875451 Cargo.toml: remove deprecated "chromeos" feature
This has been replaced by individual feature flags, which are enabled by
the downstream ChromeOS chromeos-base/crosvm package.

BUG=b:244618505
TEST=tools/dev_container tools/presubmit
TEST=emerge-$BOARD chromeos-base/crosvm

Change-Id: I9f540d947ef8050335e5f8ca3e33ebbbf32a1836
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5311522
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-02-23 19:14:19 +00:00
Andrew Walbran
9d22518a7e No longer need to set TZ environment variable.
BUG=b:326256145
BUG=b:257987535

This was used by chrono::Local, which we aren't using anymore.

Change-Id: I2fb828044a319f6bc65d23748f97d3e271a617ff
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5314564
Commit-Queue: Andrew Walbran <qwandor@google.com>
Auto-Submit: Andrew Walbran <qwandor@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2024-02-23 10:09:06 +00:00
Andrew Walbran
3009bf2722 Only use required features of chrono.
BUG=b:326256145

Change-Id: I3c1b5b7bc39ebd190ca9ff74e41efbdc312bde67
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5313721
Commit-Queue: Andrew Walbran <qwandor@google.com>
Auto-Submit: Andrew Walbran <qwandor@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2024-02-23 09:51:09 +00:00
Andrew Walbran
d6e8ee884e Use UTC time in serial log to avoid using clock feature of chrono.
BUG=b:326256145
BUG=b:257987535

Change-Id: I47e26c5f865a1a674b2f0f891605afd27e764d3d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5314563
Commit-Queue: Andrew Walbran <qwandor@google.com>
Auto-Submit: Andrew Walbran <qwandor@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2024-02-23 09:51:09 +00:00
Noah Gold
4b5f031e48 vm_control: switch to Boxed raw fragments.
Turns out impl Trait in return position means we only get *one* concrete
return type for all branches. In a future CL we'll have multiple return
types, so paradoxically, we'll have to think inside the Box.

BUG=b:326170473
TEST=builds

Change-Id: If759995d47e717adfeae6153f81f9940062e1e4e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5320337
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
2024-02-23 01:04:58 +00:00
dawnhan
ed8c61f473 virtio_gpu: Improve the readability of the error logs on virtgpu
It used to be a debug message, change it to an error message.

BUG=b:307946404
TEST=./tools/presubmit
TEST=emerge-board crosvm, and deploy to dut
TEST=CQ

Change-Id: Ib0a9cc55dd56708dc20d96dc45b12cbc72a6ea0f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5299852
Reviewed-by: Ryan Neph <ryanneph@google.com>
Commit-Queue: Dawn Han <dawnhan@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2024-02-23 00:01:26 +00:00
Federico 'Morg' Pareschi
094ba7474e devices: xhci: add stop() to backend interface
The current host backend implementation does not make use of this, but
future backend implementations require explicitly stopping the device
before dropping it.

BUG=b:297957754
TEST=presubmit and CQ

Change-Id: Ie929102075ad54fe09b60ccd36f35fc21a2a4279
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5316377
Auto-Submit: Morg <morg@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-02-22 22:21:27 +00:00
recipe-roller
009dcc8c02 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/8755356219528094881

depot_tools:
7b4fb3d22d~..9d64acedead8bf69b1eee2645a18f8fd47a1100d
  7b4fb3d (gavinmak@google.com)
      Support recipes_test.py in non-git workspace
  9d64ace (baghdadi@ca.ibm.com)
      enable fetch and gclient to run on z/OS part 1

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: I04d151ac4b83606a2d94d37f0af3f6d80b20f71a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5319798
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>
2024-02-22 22:07:26 +00:00
David Dai
b7e72de084 aarch64: Use cpu_capacity to determine clustering instead
Some systems do not populate cpu-map information and
use other ways of grouping CPUs in a frequency/topology
domain instead. Use normalized cpu_capacity information
to determine clustering instead.

BUG=b:326170473
Test=./tools/presubmit
Change-Id: If4ba7d224338798fcf2c0ffbaa91547dc2f2e16d
Signed-off-by: David Dai <davidai@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5319790
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2024-02-22 21:45:02 +00:00
Daniel Verkamp
bb28281bd7 base: macos: use unix Pid, pagesize(), and number_of_logical_cores()
These can share the generic unix versions that are also used on Linux.

BUG=b:309011910

Change-Id: Iad78c11cf4fff3099331b6cee585d617772e48bd
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5310530
Reviewed-by: Cody Schuffelen <schuffelen@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Frederick Mayle <fmayle@google.com>
2024-02-22 21:41:21 +00:00
Noah Gold
cbf9381c58 vm_control: snapshot fragments use IO traits.
The current SnapshotReader/Writer interface returns Files for raw
fragments. When we add snapshot encryption, we will need to return an
encrypting or decrypting streaming wrapper, and this won't be a File.
This CL changes the interface to return impl Read or impl Write. As
part of that, we also had to make a significant safety change to
how memory snapshots are taken.

Memory snapshots used to be written with FileReadWriteVolatile. This is
because we assume GuestMemory is always mutably borrowed by the guest,
and it is UB to have aliased references in Rust. While formally
undefined, the rough reasoning for this is that LLVM optimizations
assume noalias on mutable references, and if that is violated at
runtime, optimizations can result in changed behavior. In the snapshot &
restore case though, we know the guest is not running because its VCPUs
are stopped, so its mutable reference can be ignored (temporal overlap
for aliasing is required for UB to occur). Luckily for us, the host code
will never alias guest memory because up until this CL, we assumed that
was never safe.

Credit: thanks to fmayle@, who originally proposed using Read/Write in this
manner in a CL that added snapshot compression.

BUG=b:326170473
TEST=builds

Change-Id: Iafd9175f684bc197329a0f5aae57685f5cfd677e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5313630
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
2024-02-22 20:48:37 +00:00
David Stevens
fc20b8349b linux: Move ctrl tube handling into function
Refactor handling of control tube events into a dedicated function,
rather than inline in the run loop.

BUG=None
TEST=tast run DUT arc.Boot.vm

Change-Id: I74ccba1f653717b44b3e65275db5ce15d5e86dc3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5316376
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2024-02-22 19:30:21 +00:00
recipe-roller
64f7664288 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/8755428571397582529

depot_tools:
03821aea69
  03821ae (jwata@google.com)
      [ninjalog_uploader] Collect use_siso/use_remoteexec GN args met...

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: I6b8b024132a72ab5fbead0eaa4aadab2b95fc73b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5315962
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>
2024-02-22 03:02:23 +00:00
recipe-roller
a91f00f652 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/8755431717746094785

recipe_engine:
8c28df9c0b
  8c28df9 (chanli@chromium.org)
      [recipe_modules/buildbucket] support eager

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: If2f145d0e9854766a381cee54074cf2ee4250178
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5316160
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>
2024-02-22 02:04:13 +00:00
Federico 'Morg' Pareschi
a26cf3093e devices: xhci: Implement interrupt moderation
This CL implements interrupt moderation as defined by the xhci specs
section 4.17.2. Instead of using the IMODC (Interrupt Moderation
Counter) we just store the timestamp of the last interrupt event and
calculate the amount of time elapsed according to the formula provided.

BUG=b:325388860
TEST=Verified that USB functionality works on bulk and interrupt devices

Change-Id: Ie7892de3af5b8c2f8f8aead722e4d94d115ea030
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5298957
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Morg <morg@google.com>
Commit-Queue: Morg <morg@google.com>
2024-02-22 01:11:53 +00:00
Pujun Lun
77709742c9 gpu_display_win: upstream multi-display impl for Windows.
1. Introduced two structs for window management:
   a. WindowResources: a host window that isn't currently used (no
      Surface associated).
   b. WindowMessageProcessor: a host window associated with a guest
      display/Surface.
2. Enabled WindowMessageDispatcher to manage multiple
   WindowResources and WindowMessageProcessors.
3. Enabled adding/removing multiple Surfaces. See the CreateSurface
   and ReleaseSurface commands in DisplaySendToWndProc.

BUG=b:254702853
TEST=presubmit

Change-Id: I5940a597e00f58dfb99b43149d72a7e36f196f7e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5286460
Commit-Queue: Pujun Lun <lunpujun@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
2024-02-22 00:18:56 +00:00
A. Cody Schuffelen
60ff4996ab cros_async: Separate ExecutorKind and ExecutorKindSys
Until the tokio executor is implemented, there are only
platform-specific executors.

Bug: b/320603688
Test: tools/presubmit
Change-Id: I380a6b61f6f6a0cca2fbd3e89d63a2c9c8d051ef
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5201658
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
2024-02-21 23:23:07 +00:00
Daniel Verkamp
4ff556b9ee base: disable env-logger default features
The env-logger crate's default features are:

- auto-color
- humantime (unused since we override the format string)
- regex (allows regex-based filtering)

I don't think anyone is actually using the regex functionality when
filtering log messages, and module-based filtering is still possible:

  crosvm --log-level=info,devices::usb=debug run ...

This is the only place the regex crate is pulled into crosvm, and
removing it reduces the binary by about 500 KB (!) in a normal ChromeOS
build configuration.

Change-Id: Ia1275e2a3f70790ee805fab25139a2da2f578559
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5313755
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-02-21 23:09:37 +00:00
recipe-roller
95967e2b14 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/8755444300057553201

recipe_engine:
e1eda4a088~..39030d3e2d47009ce7479caf8537e9d535f7a033
  e1eda4a (mohrr@google.com)
      [path] Use enum for internal file type
  39030d3 (mohrr@google.com)
      [engine] Ensure summary_markdown isn't too big

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: I955b9fb40f433d419cb775a356c9713d91fc729b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5313631
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>
2024-02-21 22:44:04 +00:00
Gurchetan Singh
02110bc6fc rutabaga_gfx: fixes for crrev.com/c/5279413
- Functions should be marked as unsafe, as the caller needs to
  guarantee that the directory is a valid string.
- Comment fixes

BUG=324440526
TEST=cargo test

Change-Id: I43405fd2d63a8de3c9b73f349f7e8928373cf9ab
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5313625
Reviewed-by: Frederick Mayle <fmayle@google.com>
Reviewed-by: Andrew Walbran <qwandor@google.com>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
2024-02-21 22:19:29 +00:00
recipe-roller
aa9ad1c1ec 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/8755453736964787921

depot_tools:
b26059ac45
  b26059a (kfarnung@microsoft.com)
      [git_cache] Fix shadowing for `bootstrap`

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: I3cc848e450d08f626e66fcdefceb610354a62a66
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5313628
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>
2024-02-21 20:18:40 +00:00
recipe-roller
96864e3da3 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/8755454995357614561

depot_tools:
cc1689822e
  cc16898 (chanli@chromium.org)
      [depot_tools] Roll bb

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: I5a1f111031d401ecc6c3f64363b7c6bad5043345
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5313758
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>
2024-02-21 19:56:32 +00:00
recipe-roller
4577509570 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/8755465062413663921

depot_tools:
90d1d40c35
  90d1d40 (vapier@chromium.org)
      repo: stop using our repo fork

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: Ibf75b79f28079cb332ee2dbade723c10cb2dede6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5313626
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>
2024-02-21 17:15:39 +00:00
Hikaru Nishida
c3a24eeb28 uprev prebuilt version
Update prebuilts to reflect the recent updates on guest_under_test images:
- crrev/c/5308635
- crrev/c/5190792

BUG=b:295256641
TEST=tools/dev_container tools/presubmit all

Change-Id: I06910645d4a6507989bc7289e59e754be773ccca
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5300045
Reviewed-by: David Stevens <stevensd@chromium.org>
Auto-Submit: Hikaru Nishida <hikalium@chromium.org>
Commit-Queue: Hikaru Nishida <hikalium@chromium.org>
2024-02-21 08:58:03 +00:00
Takaya Saeki
f934bc0413 serial: allow multiple console=true devices
Currently crosvm does not allow users to give multiple serial devices
with `console=true`. However, actually Linux kernel can have multiple
`console=` options at the same time. Each serial hardware type can have
one console. Kernel logs will be copied to all consoles, and the inputs
will be taken from the last `console=` device. Even if multiple
`console=` options for the same device type are given, no error occurs
and the last one is effective. Therefore, crosvm doesn't have to
restrict console option.

Thus, this CL removes the restriction on multiple consoles of crosvm.

BUG=b:325362584
TEST=`crosvm run --serial type=file,path=serial,console=true --serial
type=stdout,hardware=virtio-console,console=true,stdin=true ...`. Both
file and stdout have console outputs

Change-Id: I911c9223704eb91f369b74e9cdcd901f115aa7eb
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5306814
Commit-Queue: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2024-02-21 07:15:34 +00:00
recipe-roller
b27613f5a4 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/8755530492692419889

depot_tools:
7dc148fe3c
  7dc148f (vapier@chromium.org)
      repo: do not update citc 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: I58561fdf0a24319618e61934c73623c736afbb33
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5311736
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>
2024-02-20 23:56:50 +00:00
recipe-roller
c96942b808 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/8755532381351331137

depot_tools:
2c2371dc88
  2c2371d (chanli@chromium.org)
      [depot_tools] roll led

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: I6498315a1d31ee8016d857369c00f82ad7a7b1ec
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5311525
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>
2024-02-20 23:32:48 +00:00
Federico 'Morg' Pareschi
f9bde14419 devices: xhci: reintroduce busy handler flag check
This CL reverts a change from https://crrev.com/c/2202745 where we had
to remove a busy check due to a bug in our implementation. The fix to
the bug is to make sure we set both EHB and Event Ring Dequeue pointer in
the same function so we don't call interrupts multiple times on the same
event.

BUG=b:309889022
TEST=`while adb shell echo hi; do : ; done` and old crash doesn't happen

Change-Id: I26f06774238fc0f40f1363012e8c41bab0d50e56
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5294354
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Morg <morg@google.com>
2024-02-20 21:24:17 +00:00
A. Cody Schuffelen
ecc0206af8 Upgrade rust to 1.73.0
There don't appear to be any new clippy warnings, and this is the
version of Rust that Android is now using: b/303252546. Work for the
next version is tracked in b/310977762.

This doesn't have any particular features I'm looking for (async traits
only come in 1.75.0). I'm not particularly attached to this change. If
it's easy to upgrade the container though, we could ensure no new clippy
warnings appear.

Android rust versions appear here:
https://cs.android.com/android/platform/superproject/main/+/main:prebuilts/rust/linux-x86/

Also not sure what the ChromeOS release schedule is.

Release docs: https://releases.rs/docs/1.73.0/

Test: tools/dev_container --clean bash -c "rustc --version && tools/presubmit clippy"
Change-Id: I2d3010c3032053709f0c0beb7dcbe2b80d782415
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5201659
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2024-02-20 19:11:51 +00:00
Dennis Kempin
e45905b53e dev_container: Fix libc6:arm64 issue during container build
libc6:arm64 will call telinit to restart affected services.
This will block indefinitely in the container without init running.
The workaround is to replace telinit with true to make it a
no-op.
Also removes the mount caches from the build process as they seem
don't seem to work with APTs file lock.

BUG=b:322015733
TEST=make -C tools/impl/dev_container

Change-Id: If1079581680ac9edc981ad46afb3173508668335
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5230818
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2024-02-20 19:11:51 +00:00
recipe-roller
41e80544fc 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/8755555030749134529

depot_tools:
62dc9f462e
  62dc9f4 (gavinmak@google.com)
      Implement support for change info thru diff file

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: I18f9d0f2794cccb86be3673bf80f7f2f130814a5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5310517
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>
2024-02-20 17:33:09 +00:00
Hikaru Nishida
9510142a7c Specify patch version of e2e_test kernels explicitly
Specify patch version explicitly to improve the reproducibility of
e2e_test image generation. This patch version is determined based on r11
of the prebuilt images, which is the currently used version at this
point.

BUG=b:295256641
TEST=./tools/dev_container ./tools/presubmit

Change-Id: I6e91ce88bec4827168a61c682c3de9f0e94e4c70
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5308635
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Hikaru Nishida <hikalium@chromium.org>
2024-02-20 04:13:58 +00:00
recipe-roller
099fcf6925 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/8755611023407168913

depot_tools:
280bb93210
  280bb93 (tikuta@chromium.org)
      Revert "Remove ability to use_goma via 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: I2cd70f9398f15aacf61bb726a43b5d2d3cdd3cdd
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5307964
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>
2024-02-20 02:42:32 +00:00
Bogdan-Cosmin Chifor
244f1e1d37 x86_64: Enable identity map address and accomodate larger BIOS size
On Azure Dv3 instances `unrestricted guest` is not available.
This prevents crosvm from booting, because TSS address overlaps
with BIOS memory region when BIOS is larger than ~250K.
This fix allows 16M BIOS maximum size and enables identity map address
which allows crosvm to boot on machines where `unrestricted guest` is
not available.

BUG=None
TEST=tools/presubmit
TEST=Boot an AOSP Cuttlefish VM on Azure (without unrestricted guest) and GCP (with unrestricted guest)

Co-authored-by: Bogdan-Cosmin Chifor <bogdan.chifor@tii.ae>
Co-authored-by: Mikko Koivisto <mikko.koivisto@unikie.com>
Co-authored-by: Myung Kyu Kim <myung.kyu.kim@unikie.com>
Change-Id: Ibf7b6685eca969f5f52dd6e5f3510bf919c14e2c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5290234
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-02-16 21:41:01 +00:00
Daniel Verkamp
11994dbba3 linux: remove memfd panic handler
This is only intended to be used on the downstream ChromeOS version of
crosvm, so we should really be patching it there rather than carrying
this code in upstream crosvm.

The crosvm version of the memfd panic handler will be replaced with the
version from libchromeos-rs.

BUG=b:325081271
BUG=b:309651697

Change-Id: I0587bacd103a3f2471d2ac7227903df6cd7e0028
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5293235
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2024-02-16 20:38:51 +00:00
David Dai
557f1555b4 Change get_host_cpu_clusters to get unique clusters
Ensure cluster lists are unique, while the current cluster
configurations are handled by Linux, they bloat the devicetree and are
difficult to parse by some secure firmwares.

Bug=b:284369518
Test: ./tools/presubmit
Change-Id: If26fe8d82b0056f656ac29bca130969fdd303ce7
Signed-off-by: David Dai <davidai@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5303156
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2024-02-16 19:48:09 +00:00
recipe-roller
ea6b43607f 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/8755918674407403105

depot_tools:
9d7c8e76f8
  9d7c8e7 (msavigny@google.com)
      Change source of hash for reproxy socket.

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: Ibad3259ba5dfa6717bf618f6f7b5b808ae60fe96
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5302426
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>
2024-02-16 17:16:55 +00:00
recipe-roller
4e5b49bed3 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/8755930629385600513

recipe_engine:
88c63dd9fd
  88c63dd (mingkong@google.com)
      [ResultDB] Add QueryTestVariants to recipe module 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: I7a2788da3dfcde1bb70285bdb985a40bdb0dfc2b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5303469
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>
2024-02-16 14:01:46 +00:00
Ryan Neph
d93be8c65f vm_control: enable fixed_blob_mapping + noncoherent-dma
Certain platforms use the noncoherent-dma feature to appropriately
consider the guest PAT's memory type (caching mode) when configuring the
effective memory type in SLAT, instead of simply ignoring it in favor of
the host PAT.

Dynamic blob mapping has already integrated support for noncoherent-dma
upon setting up each mapped blob's memory region (e.g. KVM memslot),
but fixed_blob_mapping merged while naively ignoring the feature.

Now, we respect the feature when setting up the shared/prepared memory
region (appropriately passing the new MemCacheType enum through to the
hypervisor).

BUG=b:246334944
TEST=tools/presubmit
TEST=(in venus-enabled VM w/ noncoherent-dma) `deqp-vk -n dEQP-VK.memory*` passing
TEST=(in venus-enabled VM w/ noncoherent-dma) Hollow Knight, Portal 2,
Valheim, CS:Source all look fine.

Change-Id: Ia31763c80765a42a1932bfb347ffa57a2faf6fab
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5285309
Commit-Queue: Ryan Neph <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2024-02-16 00:09:55 +00:00
Kaiyi Li
413c388d5e rustfmt: wrap comments
Tests: presubmit
Change-Id: Ie759b0b788440986783f3b7de4eeca8d5ceeaa92
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5297986
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Kaiyi Li <kaiyili@google.com>
2024-02-15 23:30:13 +00:00
Kaiyi Li
c28067d1d9 Reformat comments
Test: presubmit
Change-Id: I39c261d9985989873b698213c5d8b653fc13757b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5299850
Auto-Submit: Kaiyi Li <kaiyili@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2024-02-15 23:30:13 +00:00
recipe-roller
9c0d3e16e7 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/8755990398610840273

depot_tools:
b1b1a43f07
  b1b1a43 (gavinmak@google.com)
      Move LSC check into pan project presubmit checks and check num...

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: If60c7a6b9aefade866e7f521b3df9ae8779b832e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5301770
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>
2024-02-15 22:09:02 +00:00
Gurchetan Singh
c797fe08b8 rutabaga_gfx: fix error handling snapshot save/restore
Otherwise, RutabagaError::Unsupported is returned in the
gfxstream path.

BUG=325091627
TEST=GfxstreamEnd2EndTests

Change-Id: I74f74c1d471be2459c09b2dbb0434589541c58a7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5299849
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
2024-02-15 18:34:10 +00:00
recipe-roller
4d9cbe68b5 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/8756074704586354465

depot_tools:
553b749663~..72bf410aff5deb7c378ed545831c019dfa157328
  553b749 (chanli@chromium.org)
      [depot-tools] roll dirmd
  72bf410 (meiring@google.com)
      [ResultDB] Roll RDB 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: I0b284ab7153d046d7672955a7dba63fdbd573433
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5297545
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>
2024-02-14 23:59:42 +00:00