Commit graph

4692 commits

Author SHA1 Message Date
David Stevens
5a840ad77f crosvm-fuzz: fix breakage caused by Interrupt:new
Update Interrupt:new to the new signature.

BUG=None
TEST=cd crosvm-fuzz/; cargo build

Change-Id: Ia1b443dcbee434f96fe0483a5f9105023bf4366d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3881687
Commit-Queue: David Stevens <stevensd@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
Auto-Submit: David Stevens <stevensd@chromium.org>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2022-09-08 06:18:14 +00:00
recipe-roller
270aa6fcbd 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/8803629303281130545

depot_tools:
07d6e6985b
  07d6e69 (jojwang@chromium.org)
      Use shutil when moving gsutil.

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

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

depot_tools:
360ece5d10
  360ece5 (vadimsh@chromium.org)
      [cipd] Update luci-auth tool.

recipe_engine:
85a3b044c6
  85a3b04 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 9bca2440ad93 to c93fd3c5ebdc

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: I63218f8f862a81790d6db5d886bc3222c23c71f8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3880835
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-08 00:19:35 +00:00
Ryan Neph
9f97f53c8b gpu: remove timer-based fence polling
Remove the deprecated timer-based fence polling strategy, leaving the
async callback-based strategy that is now in use by all Rutabaga
components.

BUG=b:175527587
TEST=glxgears & vkcube in ChromeOS VM
TEST=Vulkan & OpenGL games in ChromeOS VM
TEST=GfxBench in ARCVM
TEST=Asphalt 9 in ARCVM

Change-Id: I75714f82e36f1d6291a875fe3dd47d850ff2eb82
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3880586
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Kaiyi Li <kaiyili@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Ryan Neph <ryanneph@google.com>
Tested-by: Ryan Neph <ryanneph@google.com>
2022-09-08 00:10:15 +00:00
Mike Gerow
a2734226ed smbios: add ability to specify custom OEM strings
Type 11 SMBIOS OEM strings entries are commonly used to pass arbitrary
information into a VM. For example, systemd's credentials[1] system
looks for specially formatted values here.

The main goal here is to allow parameterization of a VM when we're
booting with OVMF, in which case providing parameters via the kernel
cmdline is less useful.

QEMU suports something similar, but this is a significantly simplified
approach, allowing only OEM strings instead of a wider range of DMI
table entries QEMU allows customizing.

[1]: https://systemd.io/CREDENTIALS/

BUG=b:244366989
TEST=cargo test; passed oem strings into vm and confirmed they are in
dmi tables

Change-Id: I5e106983e624c8a244b8074d6944bc0c9acfd748
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3868327
Auto-Submit: Mike Gerow <gerow@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Mike Gerow <gerow@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-07 23:04:25 +00:00
Mike Gerow
c3fac99c91 smbios: derive Clone for smbios structs
The derived method matches what we provide, so just use the derived
method instead of unnecessarily creating our own.

BUG=b:244366989
TEST=build, confirm smbios entries still work

Change-Id: Ia5668c4bcf496cfadcc8f7ca153661df6a1d180d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3881045
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Mike Gerow <gerow@google.com>
Tested-by: Mike Gerow <gerow@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-07 23:04:25 +00:00
Ryan Neph
cc7c43183a rutabaga_gfx: silence some compiler warnings
BUG=None
TEST=cargo build

Change-Id: Ife9616a258a685535483432991b3a06207d955b2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3880623
Tested-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Ryan Neph <ryanneph@google.com>
2022-09-07 21:21:45 +00:00
Daniel Verkamp
ee4836850f devices: pci: add no-IRQ case for preferred_irq()
Allow PciDevice implementations to indicate that they do not want an IRQ
assigned at all (e.g. for modern PCIe devices that do not support INTx#
interrupts, only MSI/MSI-X) or if they do not have a preferred IRQ but
just want any available IRQ allocation.

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

Change-Id: Ic6c86d4ce727a7c1b91080873deee5add23f3c9f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3877203
Reviewed-by: Dmytro Maluka <dmy@semihalf.com>
Tested-by: Dmytro Maluka <dmy@semihalf.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
2022-09-07 18:15:05 +00:00
Daniel Verkamp
16231e9507 devices: interrupt: merge Interrupt Arcs into one
Now that Interrupt owns the interrupt_status as well, we can merge the
two separate Arc wrappers into a single one.

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

Change-Id: I1c21da31c3e4e8d11ac29cd1c541c20db178591e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3866049
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-07 18:13:15 +00:00
Daniel Verkamp
ee38a649aa devices: virtio: move interrupt status into Interrupt
BUG=b:244204463
TEST=tools/presubmit --all

Change-Id: I855acd5cefb0abb657e4749fa42ac2f75298bf48
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3858694
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2022-09-07 18:13:15 +00:00
Victor Ding
df24522dcf aml: Use the shortest possible form to generate integers
Per ACPI Machine Language (AML) Specification, all integers encodings
are equally accepted; hence one can always the shortest possible forms.

BUG=None
TEST=./tools/presubmit

Change-Id: I7f1802607e173d41d1ae9ba26a036e9bfcd95121
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3878738
Tested-by: Victor Ding <victording@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Victor Ding <victording@chromium.org>
2022-09-07 18:06:14 +00:00
Victor Ding
ef7e9109da aml: Update Field to support LockRule
LockRule indicates whether the Global Lock is to be used when accessing
a field, which is crucial for performing certain MMIO.

BUG=None
TEST=tools/presubmit

Change-Id: I2bbabaa87b85ae529878587c810166614383098c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3876762
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Victor Ding <victording@chromium.org>
Tested-by: Victor Ding <victording@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-09-07 18:02:45 +00:00
Daniel Verkamp
01f4d18488 devices: virtio: block: remove Default for DiskOption
The Default impl for DiskOption was only used in one place (vhost-user
block device); that use can be replaced by filling in the two missing
fields.

The values used in the Default impl did not match the serde deserializer
defaults, which are used when parsing the --disk and related options
from the command line. Removing this unnecessary Default clarifies which
values are actually used.

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

Change-Id: I5ffaa4facab31402aeb84552cadce750d132c307
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3877202
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-07 17:51:37 +00:00
recipe-roller
9274c1692c 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/8803663276754826273

depot_tools:
95c7da10c5
  95c7da1 (sokcevic@google.com)
      Only run selected tests on py2

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: I8ffbe35b71768c95dce3605083804d29395704ce
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3878232
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-07 17:10:44 +00:00
recipe-roller
8e220868ca 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/8803668306545138129

depot_tools:
863438746a
  8634387 (avi@chromium.org)
      Adjust copyright regex

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: Id13351126a85024e4999c17abf628f19756757f2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3879268
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-07 15:51:54 +00:00
Xiong Zhang
6a3fa62327 pci: Add a function to construct ssdt method for vfio-pci
For vfio-pci device, guest couldn't call this device's acpi method like
_DSM/_DSD/_PS0..., in order to let guest run it, crosvm will provide
virtual method to guest, this virtual method pass guest method call into
host and pass host return value into guest.

This commit adds a function into pci device trait, which returns the
aml code to construct virtual acpi method. Two pages mmio are used to
pass acpi parameters and return value, when guest access the first page,
vm exit happens and it is trapped into crosvm, when guest access the
second page, no vm exit happens.

Co-authored-by: Victor Ding <victording@google.com>

BUG=b:194390621
TEST=tools/presubmit

Change-Id: I71797394de61437d4d105e65488d36511c71cbd7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3813137
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Victor Ding <victording@chromium.org>
Commit-Queue: Victor Ding <victording@chromium.org>
2022-09-07 04:42:44 +00:00
recipe-roller
35f3d68e3a 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/8803719901376032369

recipe_engine:
3b0a664ee4
  3b0a664 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from e9947d6af61b to f529671465f2

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: Iaeb391820fe751ac0106c60ae04f4ee2efae113f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3877553
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-07 02:05:55 +00:00
recipe-roller
1f338d7828 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/8803726815443000065

depot_tools:
6efb3ed962
  6efb3ed (sokcevic@google.com)
      Reland "Use io.open for opening files"

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

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

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ifdcdf85fa41862e809648601f558df5c1d5c7c76
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3877552
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-07 00:27:17 +00:00
Ryan Neph
ddc999cc9f gpu: build virgl_render_server env in HashMap
Follow up from crrev/c/3753417 to cleanup implementation.

BUG=b:237493180
TEST=env for virgl_render_server process still has radv_require_etc2=true

Change-Id: I9aa6f9d8eb92e78e8ab8053be5df6406d6411ea9
Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3877549
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-06 23:20:24 +00:00
Daniel Verkamp
8ade6af69a Revert "virtio: video: encoder: Handle SET_PARAMS_EXT's resource_type."
This reverts commit 4811773029.

Reason for revert: set_params() uses a resource_type variable that does not exist, breaking the build when video-encoder is enabled

Original change's description:
> virtio: video: encoder: Handle SET_PARAMS_EXT's resource_type.
>
> Previously we kept using the initial value and while this was fine for
> ARC because VirtioObject was the initial value negotiated by the kernel
> and ARC only used VirtioObject anyway, but this broke when using FFmpeg
> which would use the mmap buffers of V4L2.
>
> Handle the type switch like we did in the decoder.
>
> BUG=None
> TEST=arc.VideoDecodeAccel*_vm,arc.VideoEncodeAccel*_vm on hatch
>
> Change-Id: I6f1c2d1bdaf18efb559528dfadb10baf32dbb757
> Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3840991
> Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
> Tested-by: Tatsuyuki Ishi <ishitatsuyuki@google.com>
> Commit-Queue: Tatsuyuki Ishi <ishitatsuyuki@google.com>

Bug: None
Change-Id: Ic2852236b53e3db6b334ecb327a442df1a985b38
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3877547
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-09-06 20:46:14 +00:00
Dennis Kempin
c1b656f46c tools/presubmit: Align with tests in CI
presubmit has slightly diverged from what we are runnning in CI,
so things like running tests with user space emulation tend to break.

This should make sure that presubmit continues to work.

We can utilized user-space emulation as when we reorganize our tests
to have unit tests that do not have special system requirements. Then
CI will be running those tests with user-space emulation as well.

BUG=b:244185215
TEST=./tools/presubmit [--quick/--all]

Change-Id: I46f6498ad030ad50d42d3365c908a16e6573b5d7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3867535
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-06 20:32:54 +00:00
recipe-roller
2c5d3cb5c8 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/8803744437548978033

depot_tools:
0959bb1c2a
  0959bb1 (maruel@google.com)
      Fix git-retry on errors

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: Ia3408c880d5d227457fc86e123818c626fd6593b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3877328
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-06 19:36:24 +00:00
recipe-roller
41964d915c 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/8803746324752666081

recipe_engine:
176e032023
  176e032 (zhaoyangli@chromium.org)
      Add LUCI analysis protos to recipes-py recipe_proto

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: I0b0fe5db7acc65c2f23ac0918fce1a61340a4110
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3877488
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-06 19:08:20 +00:00
Daniel Verkamp
b5aecd9857 devices: make SignalableInterrupt clonable
Rather than requiring interrupts to be held inside a mutex everywhere,
make it possible to clone them so each thread handling a queue can have
its own SignalableInterrupt instance that does not require locking.

BUG=b:244204463
TEST=tools/presubmit --all
TEST=start x86_64 Linux bzImage in crosvm

Change-Id: Ifd4b101de2e00498c9f47b92a02f7ac649c17bff
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3858693
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-06 18:05:14 +00:00
Daniel Verkamp
8ded4b6549 devices: virtio: vsock: use async_utils::handle_irq_resample
Replace the vsock device's copy of handle_irq_resample() with the common
version in the async_utils module, since it is functionally identical.

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

Change-Id: Ibda6edf40e785ff099d9194c60efff1e856350f3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3871961
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-09-06 17:59:04 +00:00
Daniel Verkamp
4e36e8a601 rust-toolchain: update to Rust 1.62
This matches the recent ChromeOS SDK update.

BUG=b:243677117
TEST=tools/dev_container tools/clippy

Change-Id: I5de34abfe0985b5f41ac666ce3e93adbb628d790
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3854975
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-06 17:36:34 +00:00
Dennis Kempin
232e17c6dd Add tests for ./tools/cl
Makes a temporary copy of the git repo for each test so we can
modify the repo for testing purposes.
It's not the fastest test (~12s), but is only run when python files
have been modified. In contrast to other developer tooling, tools/cl
is not used by Luci, so it needs a dedicated test.

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

Change-Id: I06c90a580aa8ed0fa267a41ca40895710121767f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3866692
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-09-06 17:14:34 +00:00
Tatsuyuki Ishi
4811773029 virtio: video: encoder: Handle SET_PARAMS_EXT's resource_type.
Previously we kept using the initial value and while this was fine for
ARC because VirtioObject was the initial value negotiated by the kernel
and ARC only used VirtioObject anyway, but this broke when using FFmpeg
which would use the mmap buffers of V4L2.

Handle the type switch like we did in the decoder.

BUG=None
TEST=arc.VideoDecodeAccel*_vm,arc.VideoEncodeAccel*_vm on hatch

Change-Id: I6f1c2d1bdaf18efb559528dfadb10baf32dbb757
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3840991
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Tatsuyuki Ishi <ishitatsuyuki@google.com>
Commit-Queue: Tatsuyuki Ishi <ishitatsuyuki@google.com>
2022-09-06 09:42:46 +00:00
recipe-roller
37e4977fbc 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/8803785332092397585

depot_tools:
665eb5c25d
  665eb5c (philwo@google.com)
      Update Goma client

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: I1c49542e2a7a76d01ca52b0423c982352b5e8afc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3874343
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-06 08:48:46 +00:00
Christian Blichmann
44762216cf disk: Turn Android Sparse format into a feature
This is a follow-up to
https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3864926,
which implements this for QCOW.

Same rationale: allow to turn off support for disk formats that projects
do not need/want.

BUG=None
TEST=./tools/presubmit; cd crosvm-fuzz && cargo build

Change-Id: I401bad4d4ccb1a00a303ed86f1156f153b70b562
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3872278
Commit-Queue: Christian Blichmann <cblichmann@google.com>
Reviewed-by: David Stevens <stevensd@chromium.org>
Tested-by: Christian Blichmann <cblichmann@google.com>
2022-09-05 15:36:23 +00:00
Tatsuyuki Ishi
8cef8b7e64 media: ffmpeg: Fix AvPacket test not compiling.
Changed missed by accident in 61d72266 (media: ffmpeg: Take AvBuffer
directly in AvPacket::new_owned). The later commits were tested but it
was grouped into the wrong commit in rebase.

BUG=b:239897269
TEST=cargo test --features "video-decoder,ffmpeg" -p ffmpeg -p devices

Change-Id: Iabdcc98833b24271f4701fb210e0e5733d1f9f12
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3868594
Tested-by: Tatsuyuki Ishi <ishitatsuyuki@google.com>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2022-09-05 13:00:53 +00:00
David Stevens
d5f59c7fac cros-fuzz: enable qcow feature
A feature was recently added to allow qcow support to be disabled. Add
that feature to the fuzzer default list, since qcow is one of the fuzzer
targets.

BUG=None
TEST=cd crosvm-fuzz/; cargo build

Change-Id: I5ba86e907201eac8ed1a1db420bdb42eea9815ec
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3873273
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
Auto-Submit: David Stevens <stevensd@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
2022-09-05 01:53:12 +00:00
recipe-roller
6b99cf59ab 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/8804046425008471201

depot_tools:
a089281a82
  a089281 (tperrotta@chromium.org)
      roll_dep: support multiple -r/--reviewer arguments

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: Id2825679827f235bded5fdfecade262aa1b81b28
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3871546
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-03 11:41:01 +00:00
recipe-roller
95b38d3280 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/8804089838600647745

depot_tools:
a3a95d439b
  a3a95d4 (gavinmak@google.com)
      Revert "Use io.open for opening files"

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

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

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I167ce0076d13235d14646df4a35bec93c367b58c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3871542
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-03 00:11:41 +00:00
recipe-roller
d8ec9710ab 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/8804096130091531617

depot_tools:
eb16430cf9
  eb16430 (sokcevic@google.com)
      Use io.open for opening files

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

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

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I4a28a6b2be68b09631792889910175fb15f2e2b6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3871541
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-02 22:27:41 +00:00
Daniel Verkamp
dc6d2b9995 devices: block: remove non-async block device
Now that AsyncDiskFileWrapper is available, we don't need the original
non-async virtio-blk device.

BUG=b:219595052
TEST=cargo build --features=composite-disk

Change-Id: Ifabf878f97b3d9ef5997fa6bdb651114d280e066
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3824068
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2022-09-02 20:17:41 +00:00
Daniel Verkamp
450501b2bf windows: switch virtio-blk to BlockAsync
Use the async block device rather than the non-async one.

BUG=b:219595052
TEST=tools/run_tests --target=host --build-target=mingw64

Change-Id: Ibcfa7eff95356e2fc0c09f669ec82b54a6d4c183
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3857129
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
2022-09-02 20:17:41 +00:00
Daniel Verkamp
e951a3fe9a block_fuzzer: switch to fuzzing BlockAsync
The synchronous Block type will be removed, so fuzz the asynchronous
version.

BUG=b:219595052
TEST=build crosvm with amd64-generic asan profile
TEST=run crosvm_block_fuzzer

Change-Id: I34f667748738b3501481bc4814507f7a8b6af40c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3852305
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2022-09-02 20:17:22 +00:00
Daniel Verkamp
2d01677a65 disk: remove non-async disk image support
With AsyncDiskFileWrapper, we can use all disk image formats via the
async API.

The create_async_disk_file() function is removed, and the existing
create_disk_file() function can be used to create async-capable disk
files, as the DiskFile trait now includes ToAsyncDisk.

BUG=b:219595052
TEST=cargo build --features=composite-disk
TEST=Boot x86-64 Linux in crosvm with a qcow2 disk attached

Change-Id: I430d306fe71c325ab529a7031353d20f8a9aa2f3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3824067
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-09-02 20:17:20 +00:00
Pujun Lun
e4d8e6685b gpu_display: fix Linux keycode for '`'.
BUG=b:213150276
TEST=presubmit

Change-Id: I92fad55467b1f740ec94cf1575573d47141b7c76
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3871958
Commit-Queue: Pujun Lun <lunpujun@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Pujun Lun <lunpujun@google.com>
2022-09-02 18:44:41 +00:00
recipe-roller
0cdbb4d679 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/8804111229014665201

depot_tools:
38d669fe6f
  38d669f (sokcevic@google.com)
      Reduce retries in gclient_utils

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: I9559865594d29c1d174b8e85c500b9a61602e01a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3871960
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-02 18:28:41 +00:00
Pujun Lun
9cf75b5695 gpu: support display mode selection
We will support two display modes on Windows:

(1) Borderless full screen mode, which can be specified with
    "--gpu-display borderless_full_screen".
(2) Windowed mode, which can be specified with the expected display
    size, e.g. "--gpu-display width=800,height=600".

If none of them is specified, we use windowed mode by default. Note
that on Unix, only windowed mode is supported for now.

BUG=b:233676779
TEST=presubmit

Change-Id: I5665ceedb31533c7c298eb7aa50e23eafb1e9411
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3806755
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Pujun Lun <lunpujun@google.com>
Commit-Queue: Pujun Lun <lunpujun@google.com>
Reviewed-by: Kaiyi Li <kaiyili@google.com>
2022-09-02 16:13:26 +00:00
Keita Suzuki
7d1c18ac69 devices: vhost-user: block: add control server to devices command
Add an in-process control server-like mechanism which runs in the
devices command to enable controlling vhost-user devices with control
commands such as DiskControlCommands. Like the in-process version,
the vhost-user control server waits for connection on the specified
socket, processes the recevied command, and forwards it to the
corresponding device via established tubes. Currently, DiskCommands are
the only commands supported by the control server, as block devices are
the only devices which need this mechanism.

This patch also adds the mechanism to process forwarded commands in
the vhost-user block backend device, similar to the command processing
mechanism in the worker provided in the in-process block device.

BUG=b:191845881
TEST=cargo run devices -s /path/to/socket.sock --block ..., then run
cargo run disk resize 0 $SIZE /path/to/socket.sock

Change-Id: I7b96e6c4bb7371424ca220da5f95be88e82c1fc0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3841001
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: Keita Suzuki <suzukikeita@google.com>
Reviewed-by: Morg <morg@chromium.org>
Commit-Queue: Keita Suzuki <suzukikeita@google.com>
2022-09-02 07:47:30 +00:00
recipe-roller
513a5484a1 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/8804174773575190929

recipe_engine:
d6c8a7cd71
  d6c8a7c (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from git_revision:f9c708a28b4630d62f33f325d71a2...

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: Ibd7b6f47fb1a50e92d936af6fc6a7ec9fd2b0141
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3869769
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2022-09-02 01:46:30 +00:00
Judy Hsiao
dbd67e522a audio_streams_conformance_test: support playback test for cras_stream
Support playback test for cras_stream.
It does not support `cargo build --features=chromeos` to enable
the libcras support due to the sys_util dependency of libcras.

The output result is like:

==
audio_streams_conformance_test -P cras --iterations 100

Playback Source: CRAS
Channels: 2
Format: S16LE
Sample rate: 48000 frames/s
Buffer size: 240 frames
Iterations: 100

Cold start latency: 239.692005ms
Records count: 100
[Step] min: 4.68 ms, max: 65.29 ms, average: 5.61 ms, standard
deviation: 6.03 ms.
[Linear Regression] rate: 47576.23 frames/s, standard error: 284.42

BUG=b:238038707
TEST=emerge-${BOARD} audio_streams_conformance_test
TEST=audio_streams_conformance_test -P cras

Change-Id: I2547df7b15cd36adb5452ab09d2a38e417b04dbf
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3864013
Tested-by: Judy Hsiao <judyhsiao@google.com>
Commit-Queue: Judy Hsiao <judyhsiao@google.com>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Auto-Submit: Judy Hsiao <judyhsiao@google.com>
2022-09-02 01:24:20 +00:00
Pierre-Clément Tosi
3174c86a36 tree-wide: Rename protected_vm as protection_type
Rename all local variables across the codebase to be consistent with the
recently renamed cfg.protection_type (from cfg.protected_vm). This
commit is intended to make the renaming less cumbersome to review.

Note: no functional change intended.

BUG=b:243646855
TEST=build

Change-Id: I495b0854ce60cb1dc041ef43480fe11b379883c2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3867616
Tested-by: Pierre-Clément Tosi <ptosi@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Pierre-Clément Tosi <ptosi@google.com>
2022-09-01 22:20:40 +00:00
Pierre-Clément Tosi
436d19645c config: Rename cfg.protected_vm as protection_type
Improve clarity and consistency between the variable and its type, given
that it represents the protected/unprotected state AND whether some
firmware needs to be used. In particular, it isn't the protected VM
itself.

Similarly, rename components.protected_vm for the same reason.

OTOH, keep cmd.protected_vm for --protected-vm as it is dedicated to
making the VM protected and follows the name of the CLI flag.

Note: no functional change intended.

BUG=b:243646855
TEST=build

Change-Id: Id91d1c83e9efa79562022dacf37f4c89e451f2b5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3867615
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Pierre-Clément Tosi <ptosi@google.com>
2022-09-01 22:20:40 +00:00
Pierre-Clément Tosi
a673d2e639 aarch64: configure_vcpu_early: Refactor ABI setup
Flatten the logic for initializing the PC and group the pvmfw ABI code.

Note: no functional change intended

BUG=b:243646855
TEST=build

Change-Id: I973dfb324d9facdc3f79cbdb41b69b8a7fd1444e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3867614
Tested-by: Pierre-Clément Tosi <ptosi@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Pierre-Clément Tosi <ptosi@google.com>
2022-09-01 22:20:40 +00:00
Pierre-Clément Tosi
c7a185738e cmdline: Refactor cfg.protected_vm initialization
De-duplicate logic for when the VM isn't protected.

Note: no functional change intended.

BUG=b:243646855
TEST=build

Change-Id: I27dd23e8c437e4e0adb7d344cc3a8b86557672e8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3867613
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Pierre-Clément Tosi <ptosi@google.com>
2022-09-01 22:20:40 +00:00
Pierre-Clément Tosi
ced4bfe1db cmdline: run: Rename cmd.pvm_fw to its flag name
Make the variable clearer by renaming it to represent the information it
holds i.e. the firmware file AND the fact that the VM is unprotected.
And to avoid confusing it with cfg.pvm_fw and components.pvm_fw, which
both actually hold the protected VM firmware (resp. path and image).

Note: no functional change intended.

BUG=b:243646855
TEST=build

Change-Id: Ieabc2f05798c3a0e969348d6dbd9a87ffb3a8ad0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3867612
Commit-Queue: Pierre-Clément Tosi <ptosi@google.com>
Tested-by: Pierre-Clément Tosi <ptosi@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-01 22:20:40 +00:00