Commit graph

8859 commits

Author SHA1 Message Date
Mu-Le Lee
ec39c307da Implement virtio-snd aaudio stream to support audio in android
This change introduces feature audio_aaudio on top of the support of
virtio-snd-multiple-backend. The android_audio uses the Android
AAudio NDK library to play audio. A libaaudio_stub is provided for
building and testing on non-android environment.

Bug=b:325930215
Test=Play Youtube video on panther
Test=./tools/dev_container
Test=cargo build
Test=cargo build -F audio_aaudio,libaaudio_stub
Test=./tools/run_tests
Test=./tools/presubmit

Change-Id: I7c275433bf94d4a347720ce0ffa9127ffcb66a1e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5556704
Reviewed-by: Jiyong Park <jiyong@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
Auto-Submit: Mu-Le Lee <mulelee@google.com>
Commit-Queue: Mu-Le Lee <mulelee@google.com>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
2024-05-31 05:32:38 +00:00
Wang Ningyuan
4ec0d1e011 crosvm: Withheld hotplug request until slot ready
After [crrev/c/5579863](http://crrev/c/5579863), a slot would reject any
hotplug requests until it is ready. To accomodate this, The manager adds
EmptyNotReady and OccupiedNotReady states to a slot, and waits for port
ready notification to send requests. Unit tests added. e2e tests are not
feasible since the current test VM does not accept commands until the
guest is ready.

TEST=presubmit tests
TEST=manual test: Add device before PCI enumeration, then remove and add
BUG=b:331529292

Change-Id: I7769667a9838fe8869b8855bc6b080d6e451fad2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5578630
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Ningyuan Wang <ningyuan@google.com>
2024-05-31 04:09:34 +00:00
Wang Ningyuan
ed8f19ef62 devices: Add notification for PCI slot ready
This CL adds a notification event when a PCI slot is enabled by the
guest, and is ready for accepting hot plug events.

TEST=presubmit tests
BUG=b:331529292

Change-Id: I69cda392eb7bdfec5a4b731990c0c3816e8359ad
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5578629
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Ningyuan Wang <ningyuan@google.com>
2024-05-31 04:04:37 +00:00
Wang Ningyuan
3a431fc3b4 devices: pcie: reject hot plug request until port enabled
When a PCIe slot is initiated, the power indicator defaults to OFF.
However, as a device behind the bridge can be added and initiated by
flipping PCIE_SLTSTA_PDS, then discovered by PCI enumeration, the power
indicator does not match the status of the card. Such an inconsistency
is problematic for subsequent hot plug requests. As a result, no hot
plug events shall be made until the port is enabled by the guest.

TEST=presubmit tests
BUG=b:331529292

Change-Id: Id1cee16ed97a2f13fca842d8b3437023968257c1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5579863
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Ningyuan Wang <ningyuan@google.com>
2024-05-31 03:50:43 +00:00
Noah Gold
f34ff36b13 crosvm: add idanr@ to OWNERS
idanr@ has been writing and reviewing CLs in CrosVM & a downstream
product for over a year. In addition to his primary work, Idan has
completed a key refactoring project in upstream CrosVM where he
unified the GPU device stack (vhost-user/plain virtio), and has
upstreamed significant GPU code. Over the past month, he has been
consistently reviewing CLs in upstream CrosVM as is expected for
OWNERS. Idan regularly demonstrates good technical judgment for
changes in CrosVM, and has a holistic view of the codebase.

I believe the requirements for global CrosVM OWNERS have been
satisfied, and as such nominate idanr@ for the role.

BUG=none
TEST=idanr@ has been writing & reviewing code in CrosVM for some time
with good results.

Change-Id: I66b50034d6f481ba94d38fba07c03b6723bc31e4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5582033
Reviewed-by: Idan Raiter <idanr@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
2024-05-31 00:11:01 +00:00
recipe-roller
707fbfc293 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/8746481492719653985

depot_tools:
6427b94bc2
  6427b94 (iannucci@chromium.org)
      [git_cl] Refactor EnsureAuthenticated.

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: I264dfc7abb1fae0baf75f6beac210ccf17ae51aa
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5585343
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-05-30 21:08:44 +00:00
recipe-roller
c74540b894 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/8746490929307206673

depot_tools:
8ff5d0caee
  8ff5d0c (ddoman@chromium.org)
      [depot_tools] auto correct url always

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: Idc63caa89a3caad598d1c2ef9373f30e6fe4efc4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5584284
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-05-30 18:44:47 +00:00
recipe-roller
cd7213fb3a 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/8746494073563308513

depot_tools:
0a4852e19d
  0a4852e (sokcevic@chromium.org)
      Add clank/orderfile to deletion blocklist

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: Icacfe4170baee56b7b0103fb1d5ae6b11c10a2cb
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5585737
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-05-30 17:46:14 +00:00
Richard Zhang
6ab9a0bcf2 vhost user snd: Append card_index to logs
BUG=b:342187194
TEST=builds and presubmits

Change-Id: Ifb85a13766ff024add9ee921f1c7062219bef6ca
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5571097
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Commit-Queue: Richard Zhang <rizhang@google.com>
2024-05-30 17:40:23 +00:00
Keiichi Watanabe
b319fff090 pmem: Add a reference for alignment rules
Add a comment linking to a GitHub issue that explains why 128MiB alignment is
added at the initial CL [1].

[1]: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1605517/comment/c10e60b9_328b4337/

BUG=none
TEST=none

Change-Id: Ia7f8e7ba27ceaf9f157c02786e4fd2ead17befe5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5569435
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
2024-05-30 07:35:43 +00:00
recipe-roller
903cba2a74 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/8746552585136325137

depot_tools:
da5e2f948a
  da5e2f9 (ukai@google.com)
      autoninja: fix for no args

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: I6a46f9a5430f6d0f5b59c7962a5819a017912bc2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5583396
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-05-30 02:17:11 +00:00
recipe-roller
3f5656ad0a 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/8746563281844702961

depot_tools:
e99a4f1cf1
  e99a4f1 (sokcevic@chromium.org)
      Add instrumented libraries to denylist

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: Ia4ee36c785ee8c3210b22672982f494a9828621f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5583195
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-05-29 23:26:45 +00:00
recipe-roller
e101ce34dc 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/8746565167765051857

depot_tools:
c57b7ed364
  c57b7ed (iannucci@chromium.org)
      [gerrit_util] Change Authenticator API to return proxy info.

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: I07006024479f94cb2c942e5a18d46c050db65d83
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5583192
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-05-29 23:03:21 +00:00
recipe-roller
dc56f2076e 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/8746568942499882705

depot_tools:
11ed5e0222
  11ed5e0 (sokcevic@chromium.org)
      Reland "[gclient] Delete GCS output_dir on download"

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: I803805c0cdab4e8f84f6bcf60f1625b3255b8b9d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5581108
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-05-29 21:59:57 +00:00
Gurchetan Singh
c636d01275 rutabaga_gfx: uses_vulkan --> uses_vulkano
error[E0599]: no method named `uses_vulkano` found for struct `RutabagaGrallocBackendFlags` in the current scope
   --> external/crosvm/rutabaga_gfx/src/rutabaga_gralloc/gralloc.rs:280:18
    |
29  | pub struct RutabagaGrallocBackendFlags(pub u32);
    | -------------------------------------- method `uses_vulkano` not found for this struct
...
280 |         if flags.uses_vulkano() {
    |                  ^^^^^^^^^^^^ help: there is a method with a similar name: `uses_vulkan`

BUG=336291294
TEST=cuttlefish_fastboot_flashing_test

Change-Id: Ie57505e576f948d7fe30a56733da3bbddbb8e2ac
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5581104
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-05-29 20:27:26 +00:00
Wang Ningyuan
a47ec016f9 devices: Remove unused PciDeviceError variants
This CL removes unused variants from PciDeviceError.

BUG=NONE
TEST=presubmit tests

Change-Id: I578f7f96c31f44035ee28afb8cb589dbeaf9ad46
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5579857
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-05-29 19:44:50 +00:00
recipe-roller
48aaf75ec7 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/8746580897346729729

depot_tools:
2377dbfdbc
  2377dbf (mohrr@google.com)
      [recipes] Migrate away from deprecated post_process checks

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: I3b2f89246b890682c783a114ae01993215bf8b4e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5582031
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-05-29 18:46:42 +00:00
Daniel Verkamp
c3a2322f1a hypervisor: whpx: replace unsound WHV_UINT128 conversion
Transmuting from [u8; 16] to [u32; 4] was undefined behavior, since the
alignment of u32 is larger than that of u8.

Replace this conversion, as well as the corresponding conversion back to
an array, as `from_ne_bytes()` and `to_ne_bytes()` functions as wrappers
around the standard `u128` functions by the same names, and implement
`u128` <-> `WHV_UINT128` conversions in a safe, straightforward way
with casts of the union fields to the appropriate native types and
shifting.

BUG=None
TEST=tools/presubmit_clippy_mingw64 # with whpx feature

Change-Id: I4e3fa84ade61c7da6e66f3dbf6a110e81bf8b1fa
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5577447
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
2024-05-29 18:42:29 +00:00
Dennis Kempin
37e40ac2f1 OWNERS_COUNCIL: Update council reviewers
Remove some members that are no longer working on
crosvm, add others to fill the void.

Change-Id: Ieb5f769be5678dde199f2f5f183c0dc4ec09332d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5577440
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Elie Kheirallah <khei@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2024-05-29 18:36:55 +00:00
Gurchetan Singh
8d633edf60 rutabaga_gfx: gralloc: don't always start Vulkano
RutabagaGralloc is used for two things:

   1) Allocating swapchain buffers
   2) Using Vulkan to map buffers via hypervisor-specific syscalls

(2) is done in the main crosvm process, and could be sensitive
to performance considerations.  The "cuttlefish_fastboot_flashing_test"
seems to fail when Vulkano is initialized.  Maybe initializing Vulkan
takes too long, who knows.

Only Windows uses (2), and Linux doesn't really need it right now.
All Linux platforms could benefit from (1), so modify
RutabagaGralloc initialization so Vulkan is available for (1) but
not (2) on Linux.

BUG=336291294
TEST=cuttlefish_fastboot_flashing_test

Change-Id: Ic753298230f05e4c314f65b3efbb362c76e21cd9
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5577398
Reviewed-by: Frederick Mayle <fmayle@google.com>
Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
2024-05-29 18:30:54 +00:00
recipe-roller
d203c9a282 Added hypervisor utils and test for entering long mode
BUG=342012892
Test=Yes it is

Change-Id: I6a412e7936bc6f84c4d7a2ea21636a520d6ac5d7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5560443
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Judson Powers <judsonp@google.com>
Commit-Queue: Oystein Eftevaag <oysteine@chromium.org>
2024-05-29 18:05:45 +00:00
recipe-roller
0ed505f3db 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/8746587186341002641

depot_tools:
58c6521691~..499342211b3b767b06347d8470d36b98c9099f0c
  58c6521 (jwata@google.com)
      Add per-file autoninja_test.py=file://BUILD_OWNERS to tests/OWNERS
  4993422 (sokcevic@chromium.org)
      [GCS] Add prefix option to upload_to_gs_f_c

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: Ibd84cdae672caf27cfe3c697e3b9affac3d071d5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5582030
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-05-29 17:08:53 +00:00
Kaiyi Li
f7ed066999 hypervisor: add tests for ready_for_interrpt with FLAGS.IF set and unset
Hypervisors should always not allow interrupt interception if FLAGS.IF
is not set.

TEST= ./tools/dev_container cargo nextest run --workspace --profile=default -E 'package(hypervisor) & binary(hypervisor_virtualization) & test(test_interrupt_ready_when_interrupt_enable_flag_not_set)' --retries 0 --no-capture
BUG=b:334055761

Change-Id: Idb70572afe0472ffda76c3d7e4c043f4024c4ce7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5577442
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Kaiyi Li <kaiyili@google.com>
2024-05-29 16:28:10 +00:00
Richard Zhang
ef9c7c6345 virtio-snd: windows: Pass audio_client_guid to IAudioClient::Initialize
Virtio-snd on Windows will take a audio_client_guid on initialization.

A device index is also added so that logs can be differentiated between
multiple audio devices

TEST=ran emulator downstream
BUG=b:342181161

Change-Id: Ia156b3ad2a9cc447a7e350a1915762f23e25f9cb
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5563959
Commit-Queue: Richard Zhang <rizhang@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
2024-05-29 16:27:49 +00:00
recipe-roller
e33ef0798a 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/8746590964455793617

depot_tools:
dd0dd62997
  dd0dd62 (petermcneeley@chromium.org)
      Provide documentation for title option

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: I07664109f8cf7f4fceb7dd839556db94d0bc7323
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5581093
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-05-29 16:11:56 +00:00
Richard Zhang
efbd44580d crosvm: Assign audio_client_guid and device index to each audio device
BUG=b:342181161
BUG=b:340945837
TEST=tested downstream by running emulator

Change-Id: I4a0025b990c3c1afe282a70bc7de052bdd6c4259
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5560444
Reviewed-by: Idan Raiter <idanr@google.com>
Commit-Queue: Richard Zhang <rizhang@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Doug Horn <doughorn@google.com>
2024-05-29 14:02:48 +00:00
recipe-roller
c1532a94f2 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/8746624308724016113

recipe_engine:
8324480341
  8324480 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 2bb12046ab13 to 3c691526411b

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: I4fbd1c2db2bdfe67af1fd1f1c21cc1f8c099120f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5579473
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-05-29 07:16:12 +00:00
recipe-roller
2eac8489b2 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/8746637520465781489

recipe_engine:
1a909a429e
  1a909a4 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 92ccbacc35ac to 7dc2571edcbd

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: I16c6c43d10bd14094fcb743f994b3cfd5e0147e2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5577449
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-05-29 03:46:21 +00:00
recipe-roller
3fb712127f 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/8746656395060474849

recipe_engine:
045c03f589
  045c03f (mohrr@google.com)
      [post_process] Add deprecation warnings

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: I3ca5f7ca25500bdd7c00b02c325734cbf20af00d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5577443
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-05-28 22:45:23 +00:00
Kaiyi Li
7eb6a6ba6e hypervisor: fix compile error with whpx feature enabled
TEST=cargo nextest run --workspace --features=all-msvc64,whpx

Change-Id: I257f95920518975500ca751ef555cd300be321a8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5567151
Reviewed-by: Richard Zhang <rizhang@google.com>
Commit-Queue: Kaiyi Li <kaiyili@google.com>
2024-05-28 21:45:57 +00:00
recipe-roller
080ed7bf71 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/8746660799207514113

depot_tools:
f318db0055
  f318db0 (sokcevic@chromium.org)
      [GCS] Allow upload of the entire directory to GS

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: I7cc45a3a0b71d7bb5b7fb704406c76d4f43584d0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5577441
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-05-28 21:35:07 +00:00
recipe-roller
5044b2abfa 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/8746669606954906769

depot_tools:
a85dcffff4
  a85dcff (iannucci@chromium.org)
      [git_cl] Refactor away a use of isinstance.

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: I460acfd000155865a8dc806edd8e9b3dcf2d946f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5577435
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-05-28 19:18:19 +00:00
Kaiyi Li
7158d0c14c hypervisor: fix interruptibility test
It is only guaranteed that interrupt won't be delievered right after sti
only when FLAGS.IF is not set. With the added cli, all hypervisors don't
allow interrupt injection right after sti.

TEST=./tools/dev_container cargo nextest run --workspace --profile=default -E 'package(hypervisor) & binary(hypervisor_virtualization)' --retries 0 --no-capture
BUG=b:334055761

Change-Id: Ie7a5cc9ca7e4a597c6fe07b59772a1380b64d858
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5578134
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Judson Powers <judsonp@google.com>
Commit-Queue: Kaiyi Li <kaiyili@google.com>
2024-05-28 19:07:07 +00:00
Keiichi Watanabe
88cd2aa7be pmem: Simplify alignment logic with checked_next_multiple_of()
BUG=none
TEST=start a VM with pmem device

Change-Id: Ie720be3adf046e63a008bef9d518de1e20d7c5bb
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5569434
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-05-28 18:30:52 +00:00
Jeongik Cha
fa3f917c34 Support cursor in android display
1. Handle cursor scanout as well
2. Add set_android_surface_position to handle cursor move event

Bug: 327559087
Test: check cursor in vm
Change-Id: I5429cb88a0f7983df015e05745070bf71f7c15ad
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5569432
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Jiyong Park <jiyong@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
2024-05-28 17:45:38 +00:00
Kaiyi Li
909a54913e hypervisor: test interuptibility on special interrupt window
The interrupt window includes:
* sti
* mov ss

On real x86 processors, after certain instructions(mov ss/pop ss/sti), an interrupt is guaranteed not to be delivered for exactly one instruction, not just an indefinite amount of time.

For mov ss/pop ss, this is architecturally defined so that loading a new stack segment plus stack pointer together can be done atomically (without an interrupt handler running in the middle and using a half-initialized stack address).

For sti, this delay allows the kernel to do sti ret, without an interrupt handler running before we return from the current routine.

However, the virtualization instructions allow the hypervisor to inject interrupts. Therefore, it's the hypervisor/VMM's responsbility to not to deliver an interrupt on an unexpected places on the guest.

This test uses port IO to trigger VMEXIT before and after mov ss or sti, and tests the interruptibility under different occasions. It also tests when the interrupt will be delivered.

TEST=./tools/dev_container cargo nextest run --workspace --profile=default -E 'package(hypervisor) & binary(hypervisor_virtualization) & test(interruptible)'  --retries 0 --no-capture
BUG=b:334055761

Change-Id: Ib800c5e8054b4bcc4b20899d2cea1b113081c0e7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5568137
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Kaiyi Li <kaiyili@google.com>
Reviewed-by: Judson Powers <judsonp@google.com>
2024-05-28 16:46:05 +00:00
recipe-roller
7078f8aa88 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/8746776561589910721

depot_tools:
97246c4f73
  97246c4 (danakj@chromium.org)
      Revert "[gclient] Delete GCS output_dir on download"

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: I2b6f9c3c267b3f58613e987769529f5a4053e846
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5573114
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-05-27 14:57:00 +00:00
recipe-roller
8731d71132 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/8746811164313520033

depot_tools:
8a11c2d152
  8a11c2d (jwata@google.com)
      autoninja: Support Siso builtin RBE client mode

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

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

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I2d0c01078b27f1e14362877d6431aa2daf25348d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5571649
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-05-27 05:46:21 +00:00
recipe-roller
a56ec3e273 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/8746812422740056529

depot_tools:
450c36420d
  450c364 (jwata@google.com)
      autoninja: Remove autosiso

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: I4de3d3aa3cb8b3cd8bb678e67567b37b922a3530
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5572788
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-05-27 05:28:22 +00:00
recipe-roller
dfbfdb6da4 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/8747004311411923857

depot_tools:
7d95eb2eb0
  7d95eb2 (sokcevic@chromium.org)
      [gclient] Delete GCS output_dir on download

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: I669af4f809cd34a74e07f87b74e121b3c838b008
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5571879
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-05-25 02:36:33 +00:00
Wang Ningyuan
c1c57df0a5 crosvm: Handle PCI hotplug asynchrony
This patch handles the asynchrony between the hypervisor and guest by
waiting for PCI_EXP_SLTCTL_CC signal, and scheduling subsequent events
carefully. This improves the robustness of hotplug when multiple such
events are scheduled consequetively before guest finished handling them.

BUG=b:331529292
TEST=Presubmit tests
TEST=manual function test: plug, unplug, plug before PCI enumeration
TEST=manual function test: plug, unplug, plug after PCI enumeration

Change-Id: Ie2544a83c31991429e73afe8eff5b3fc6241dcf1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5501022
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Ningyuan Wang <ningyuan@google.com>
2024-05-24 01:33:53 +00:00
Wang Ningyuan
02a1e4dd6d devices: Check power indicator before attn btn press
When hot unplug on a PCI slot, the slot could already be off. In this
case, pressing attention button would trigger a hot plug attempt on the
guest. This CL adds a check on the slot state before the button press,
and skip the interrupt if it is already off.

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

Change-Id: I5c80e138cf2fb58003121f9efcc693ed26574a10
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5528836
Commit-Queue: Ningyuan Wang <ningyuan@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2024-05-24 01:28:52 +00:00
Wang Ningyuan
7950bcacac devices: pci: delay hotplug complete signal
This CL delays the hot (un)plug complete signal until the first SLTSTA
write after the power indicator (PIC) is turned on or off. previously,
the signal was sent with the first SLTCTL change, when the PIC changes
to blinking. This shall be avoided as an attention button press (ABP)
while PIC blinking will cause the guest to try to cancel the previous
button press. (Ref to PCIe 4.0 spec 6.7.1.5) This was never intended.
The signal is deferred until the first SLTSTA write to prevent the
subsequent ABP to be accidentally cancelled.

BUG=b:331529292
TEST=presubmit tests

Change-Id: I2b72698ccd8985cb30f39e0e08be1ab0e6eaaac1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5528834
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Ningyuan Wang <ningyuan@google.com>
2024-05-24 01:27:45 +00:00
Wang Ningyuan
19a7cfae54 devices: pcie: No hotplug interrupt before port enabled
Currently, hot plug and unplug before pcieport driver is load worked by
coincidence. Hotplug interrupt, PCIE_SLTSTA_ABP, and PCIE_SLTSTA_PDC
flags are mechanisms to notify guest a change in device presence, which
is not applicable before the port is enabled. Only the presence bit
PCIE_SLTSTA_PDS flip is needed. Refer to http://b/331529292/comment13
for more background.
hotplug e2e_tests are temporarily disabled as async handling is missing.

BUG=b:331529292
TEST=presubmit tests
TEST=hot plug, unplug, then plug before PCI enum with crrev/c/5501022

Change-Id: I1fdbe12c5db15eb1971f28c84bb5cc813a3abd3d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5538828
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Ningyuan Wang <ningyuan@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2024-05-24 01:25:07 +00:00
Junnan Wu
fb579f5eb4 e2e: console: add e2e test for virtio-console
Add three e2e test cases for virtio-console with
multiport feature.

1. Verify portname in testVM.
2. Verfiy output log from testVM in each port
3. Verify output log from testVM in each port
and verfiy modified input log from HostVM

For case3, we need to prepare a backend monitor service,
which is used to get tx message from out fifo,
change them to uppercase and send rx message to in fifo.

BUG=b:339817865
TEST=tools/run_tests --dut=vm --no-parallel -vv
    -E 'package(e2e_tests) & test(vhost_user_console)'

Signed-off-by: Junnan Wu <junnan01.wu@samsung.com>
Change-Id: I23633a3454e470a67a9c92f760048e69afd39a4c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5534197
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-05-24 00:13:39 +00:00
recipe-roller
e2193ba344 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/8747104340432393857

depot_tools:
09c232e7c0
  09c232e (brucedawson@chromium.org)
      Resolve git.bat to git.exe without using shell=True

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: Id4ddf0c9eaf4ec9c77cd36585d454a683f06d1fd
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5567153
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-05-24 00:09:32 +00:00
recipe-roller
e8869a439a 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/8747112524819921761

depot_tools:
3ea849f363
  3ea849f (iannucci@chromium.org)
      [git_cl.py] Remove all usage and messages around netrc.

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: Ic478ab7d97f2f3137d0d6eea80ea97e23812a191
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5566568
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-05-23 21:58:36 +00:00
recipe-roller
4dbe9c1024 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/8747116928347982369

depot_tools:
2f779d3061
  2f779d3 (iannucci@chromium.org)
      [git_cl] Minor type annotation and initialization cleanup.

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: I0f9c35b20193d1de41c49a51f7442ed2b35523d4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5565151
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-05-23 20:48:20 +00:00
recipe-roller
f30d57407f 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/8747123220532249041

recipe_engine:
ece005ce6b
  ece005c (gbeaty@chromium.org)
      Support Paths as arguments to Path.joinpath.

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: Ied55b7bd3fd6c08075e3cbb1cd21c7f04cea4742
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5564151
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-05-23 19:17:01 +00:00
Kaiyi Li
114c71fb5a hypervisor: add test to inject multiple interrupts
* Create different ISRs that set different registers for interrupt 32
  and 33.
* Set up the IDT.
* hlt on the guest to allow the test to inject both the interrupt 32 and
  33.
* hlt again on the host to end the guest VM.
* Check the registers on the host to verify which ISR has been called.

TEST=./tools/dev_container cargo nextest run --workspace --profile=default -E 'package(hypervisor) & binary(hypervisor_virtualization)'  --retries 0
BUG=b:334055761

Change-Id: I7aa649542f81b346f7334cbdec1092986afead35
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5550432
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Judson Powers <judsonp@google.com>
Commit-Queue: Kaiyi Li <kaiyili@google.com>
2024-05-23 18:16:36 +00:00