Commit graph

4313 commits

Author SHA1 Message Date
Daniel Verkamp
4e626ec083 github: update contributing link
The original contributing.html link was broken since we shuffled some of
the directories around.

BUG=None
TEST=follow the link

Change-Id: I0c2c9ce0fa79e786d87e679b8391f884b0b8cc4a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3795006
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-07-29 22:54:01 +00:00
Daniel Verkamp
8930ba079f crosvm: update book and doc links to crosvm.dev
Replaced using this script:

git grep -l 'https://google.github.io/crosvm' \
 | xargs -n1 sed -i \
 -e 's^https://google.github.io/crosvm/doc/^https://crosvm.dev/doc/^g' \
 -e 's^https://google.github.io/crosvm/^https://crosvm.dev/book/^g'

BUG=None
TEST=mdbook build doc/book

Change-Id: I8df4e0bcc1ca1e9044df29998572393c934e29cc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3795005
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-29 22:54:01 +00:00
Daniel Verkamp
a77c40ec06 tools: enable search feature for mdbook
This will generate the search index and in-browser search for the book.

BUG=None
TEST=mdbook build docs/book

Change-Id: Ibaf67002c5b5d5cf1aafd19ab66a05b9116b14a0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3792098
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-29 21:16:21 +00:00
Vikram Auradkar
dd7ef550dc crosvm: resync crosvm windows
Brings in changes from downstream.

- Reintroduce generate_catchall_args.
  - This code will be deleted soon
- Fix clippy warnings.
- Conditionally compile feature specific changes.

BUG=b:213146388
TEST=The code compiles downstream.

Change-Id: Ic8192b84f5677d1b5f9b2a2c80df20645b1dfab3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3794523
Auto-Submit: Vikram Auradkar <auradkar@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-07-29 20:56:41 +00:00
Richard
f43c59bcdd ac97: Upstream Windows Ac97 implementation and removed Vios from Ac97
This does not include ac97_bus_master being upstreamed, which will be
done in a followup CL

BUG=b:237681055
TEST=built for both platforms and ran Windows tests locally

Change-Id: I3220caf7e87c5c236a975304ac9af10dcf6829f0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764045
Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: Richard Zhang <rizhang@google.com>
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
2022-07-29 18:16:21 +00:00
Vikram Auradkar
5e4ce1db39 base: RecvTube impl ReadNotifier
Closing one of the deltas in base crate.

BUG=b:213146388
TEST=presubmit

Change-Id: Ibac36d1ad9b1b6387ec74e8b59ccb38319903655
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3793691
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-07-29 17:49:31 +00:00
Vikram Auradkar
925ba7a1fb crosvm: Fix clippy related warnings
Ran clippy with features that are enabled downstream. Those features
will be enabled upstream in later cls when crosvm starts building.

BUG=b:213146388
TEST=presubmit

Change-Id: I67cb74127a349b572e573c350d69d1611533d961
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3793690
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
Tested-by: Vikram Auradkar <auradkar@google.com>
2022-07-29 17:49:31 +00:00
recipe-roller
4bf124905a 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/8807295958631195457

recipe_engine:
dd96320d16
  dd96320 (gerb@google.com)
      resultdb: Ensure Artifacts.contents is binary

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: Ifab39fcbcae5ed6cd185776c9710569bffa1b777
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3792093
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-07-29 14:44:01 +00:00
Alexandre Courbot
31539a7a79 virtio: video: decoder: ffmpeg: make input buffers manage their event
Make the InputBuffer type able to send the event signaling its
availability to be reused itself, when it is dropped. This does not
bring any immediate benefit, but is going to be a required design for
the next CL, where we transfer its ownership to libavcodec in order to
avoid copying its content.

BUG=b:169295147
TEST=v4l2r's simple_decoder can decode a H.264 stream.

Change-Id: I822bac85d9cd5f87e450e4c7ec009bb75655e91f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3782036
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-07-29 12:26:11 +00:00
Alexandre Courbot
91ff1282b4 virtio: video: decoder: add SyncEventQueue
So far we were using EventQueue in a very simple and controlled manner ;
but efficient decoding patterns are more complex than that and we are
soon going to need to keep references to the queue from remote corners
of the code and post events from there, which requires mutable access.

To help with this, add a SyncEventQueue type that is essentially an
EventQueue wrapped into a Mutex, which allows us to make its methods
non-mut.

BUG=b:169295147
TEST=v4l2r's simple_decoder can decode a H.264 stream.

Change-Id: Ife94629ab2382eb0aac5786ba24373c66b80efc7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3782035
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2022-07-29 12:26:03 +00:00
Norman Bintang
03b55369d4 audio: Remove audio cfg requirement for VhostUserSnd frontend
Enable vhost-user sound frontend even without audio cfg. It makes vhost
user sound frontend available in crosvm-direct. It is okay because
vhost-user frontend doesn't do any device emulation. crosvm-direct is a
lightweight crosvm binary to run ChromeOS VM and other guest VMs on
ManaTEE.

BUG=b:240363846
TEST=run crosvm with audio cfg as backend
TEST=run crosvm without audio cfg as frontend then call aplay

Change-Id: I9e6c3f22ca725e1689930cbb0503ad8bfab9264d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3784682
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Commit-Queue: Norman Bintang <normanbt@chromium.org>
Tested-by: Norman Bintang <normanbt@chromium.org>
2022-07-29 06:04:31 +00:00
Dennis Kempin
1f0b985a4d Update cloud storage locations to use crosvm-infra project
See go/crosvm/infra for instructions on how to get access to uploading
them.

Added a helper script to install dependencies needed to build the
guest_under_test.

BUG=b:235269312
TEST=Kokoro

Change-Id: I78387a33ddbf3ab199b36e76ba617acb1250c7e5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3783011
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-07-29 02:17:15 +00:00
Dennis Kempin
8faf4677bb infra: Public API docs at /doc instead of /api
Do not delete files in GCS, it contains an index.html we
want to preserve. Ideally we will generate it automatically
in the bot.

BUG=b:239255064
TEST=./infra/recipes.py test run

Change-Id: I5df428ce4198d04374e51ac2372e5daceb6e2651
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3792629
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-29 01:12:44 +00:00
Dennis Kempin
f2b8cb84bd Add --nightly option to rustfmt
This allows you to use the nightly version of rustfmt
to reformat imports as well.

BUG=None
TEST=./tools/fmt --nightly

Change-Id: I07c2fd1ad59ddfed3d97b636f991ae50076fd5d3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3792430
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-07-28 23:06:51 +00:00
recipe-roller
f7b2e109e3 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/8807356362479099905

depot_tools:
cec7295ab0
  cec7295 (zhihuixie@google.com)
      depot_tools: Roll rdb

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: Ie12167b33bbc0837a7185a750ecdfab76607be73
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3792628
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-07-28 22:45:51 +00:00
Pujun Lun
2915a351f1 gpu: rename "displays" to "display_params" in GpuParameters
"display_params" better reflects the actual type. They are eventually
passed to struct Gpu and VirtioGpu and they are also called
"display_params" there, so this feel more consistent.

BUG=b:233676779
TEST=presubmit

Change-Id: I315b7be92ae60a0996290ea5ee180e2b0efde279
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3792773
Tested-by: Pujun Lun <lunpujun@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Pujun Lun <lunpujun@google.com>
2022-07-28 22:39:51 +00:00
Zihan Chen
216a22426c dev_container: Uprev to include clang
Need clang to compile minijail policies

TEST=new container can build crosvm with minijail policies included
BUG=b:235858187

Change-Id: Id26898025ef1ff3148da2edc5af3d923a00401c2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3792428
Commit-Queue: Zihan Chen <zihanchen@google.com>
Auto-Submit: Zihan Chen <zihanchen@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Zihan Chen <zihanchen@google.com>
2022-07-28 21:56:31 +00:00
Daniel Verkamp
29513965ce crosvm: clean up unix wildcard re-export
Export only the few items that are actually needed. This also cleans up
an unused import warning when compiling with --no-default-features.

BUG=None
TEST=cargo build
TEST=cargo build --no-default-features
TEST=cargo build --no-default-features --features=gpu
TEST=cargo build --no-default-features --features=plugin
TEST=cargo build --no-default-features --features=gpu,plugin

Change-Id: I0293cbe702059b785a51363e5376c27378931fb8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3786978
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-07-28 21:30:50 +00:00
Daniel Verkamp
44cb9861b5 plugin: move render server config inside gpu block
Without this change, the plugin code won't build when the gpu feature is
disabled because it tries to use the undefined GpuRenderServerParameters
type.

BUG=None
TEST=cargo build --no-default-features --features=plugin

Change-Id: Id412eb17d5e845daca6c11e2cfe304f3dbe718a3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3786977
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
2022-07-28 21:23:50 +00:00
recipe-roller
d7425cd09c 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/8807363283147222337

depot_tools:
08cd5fec1f
  08cd5fe (arthurmilchior@google.com)
      Clarify documentation from `gclient recurse`

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: I66a0723b701e85666e90798847412ef281cbb011
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3792433
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-07-28 20:55:31 +00:00
recipe-roller
46c52ef48e 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/8807366429375804961

recipe_engine:
0cfa0e6e5b
  0cfa0e6 (mohrr@google.com)
      [autoroll] Update to be Python 3-compatible

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: I3bea18cfb420f51c2a9355e2f4bdfb51d262bd33
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3792767
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-07-28 20:08:21 +00:00
Zihan Chen
b6b5a58d75 tools: Spawn dev container in per-checkout names
CRC32 of checkout's path is now part of dev-container's instance
name.

TEST=`docker ps` shows crc of script's absolute path in checkout
FIXED=b:237592974

Change-Id: I7179c40e5c8436a5866d5d75b01696dc788725c9
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3790038
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Zihan Chen <zihanchen@google.com>
Auto-Submit: Zihan Chen <zihanchen@google.com>
2022-07-28 19:42:41 +00:00
Daniel Verkamp
d1a6e9cf94 rust-toolchain: update to 1.60.0
The ChromeOS toolchain is updated to this point, so bring our crosvm
testing in line.

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

Change-Id: I6bfa7bfd802f1cd75204ba59b560de176a56326f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764424
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-07-28 17:46:00 +00:00
Daniel Verkamp
4016e4475a main: remove switch_or_option compatibility hack
The calling code in vm_concierge has been updated to specify values for
these options, so we can remove the fallback code now.

For any downstream project that may be using these flags, the defaults
correspond to:

--battery => --battery type=goldfish
--video-decoder => --video-decoder libvda
--video-encoder => --video-encoder libvda
--gpu => --gpu backend=virglrenderer
--gpu-display => --gpu-display width=X,height=Y

BUG=b:235882579
TEST=Start Crostini and ARCVM on hatch

Change-Id: I1fa5667a275fc72d03c2b71aea399afd3552a24c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3786917
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-07-28 17:34:10 +00:00
Sebastian Ene
46be6c3b59 vmwdt: Update the fdt node
Update the compatible name of the device to qemu,vcpu-stall-detector
and fix the clock-frequency property name to reflect the one defined in
LK upstream:

https://lore.kernel.org/all/20220711081720.2870509-2-sebastianene@google.com/

BUG: b:240271204
Change-Id: Ib0c6442343d95261f36f485f31426feec0f7dde3
Signed-off-by: Sebastian Ene <sebastianene@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3785482
Reviewed-by: Will Deacon <willdeacon@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-28 08:59:30 +00:00
David Stevens
1125e4098a devices: vhost: allow vhost-user gpu frontend w/o gpu feature
Support using a vhost-user-gpu feature without needing to set the gpu
feature flag.

BUG=b:201745804
TEST=launch crostini on ManaTEE, run glxgears

Change-Id: Ifd8668a2419043ef5f1782655fcb394d069f274f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3765080
Commit-Queue: David Stevens <stevensd@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2022-07-28 08:25:30 +00:00
David Stevens
1ee6b5bb2f devices: virtio: gpu: use SharedMemoryMapper
Switch gpu from command tube to SharedMemoryMapper. This requires
replacing VmMemorySource::Vulkan with support in the gralloc frontend
trait.

This cleanup also allows the gpu device backend to control the shared
memory region size, rather than having it set by the vhost-user-gpu
device.

BUG=b:201745804
TEST=launch ARCVM and crostini on volteer

Change-Id: I0e66ac7d70b32e4a944a68acbbe064396727b329
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3765019
Commit-Queue: David Stevens <stevensd@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
2022-07-28 08:21:12 +00:00
David Stevens
170659f3d8 devices: vvu: only notify txq after sending
Only signal the txq_notifier when a message is actually written.

BUG=None
TEST=launch ManaTEE sibling

Change-Id: I631720b270a75a010bac5efc94158ab1875dd99e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3787935
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
2022-07-28 06:30:20 +00:00
David Stevens
534f873f1a devices: vvu: support shared memory regions
Add support for SHMEM_MAP and SHMEM_UNMAP. This requires mapping the
buffer in the device backend via VFIO and reconstituting it as a udmabuf
in the proxy device. It's also necessary to handle unmap operations in
the device backend, to unmap the buffer.

BUG=b:201745804
TEST=launch sibling VM on manatee

Change-Id: I505960cd5047ded172c25748c8aff32ac2d93cd7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3779086
Tested-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
2022-07-28 06:25:30 +00:00
David Stevens
bf7058d434 devices: vvu: support backend request channel
Support backend request channels (i.e. slave_req_fd) with vvu. The
backend channel is proxied with the same virtqueue as the frontend
channel, so this requires muxing and demuxing the messages in the proxy
and device handler respectively. Supporting this in the device handler
requires making the backend channel a vmm_vhost Endpoint rather than a
plain File, to allow the platform-specific Connection to construct the
proper Endpoint.

BUG=b:201745804
TEST=launch sibling VM on manatee

Change-Id: Ibada1764fc74ed759f59fc5f483bb17e1b269abd
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3765017
Commit-Queue: David Stevens <stevensd@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2022-07-28 04:54:40 +00:00
Alexandre Courbot
a87bb97d70 virtio: video: decoder: vaapi: fix build
https://crrev.com/c/3782034 replaced the event_pipe method of EventQueue
with an implementation of AsRawDescriptor. Somehow I forgot to update
the VAAPI decoder backend

BUG=b:214478588
TEST=cargo build --features "video-decoder,vaapi"
TEST=./tools/cargo-doc

Change-Id: I4e722d40693f764baf39c2ff4d020eb79c05f5a4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3781836
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
2022-07-28 03:10:50 +00:00
David Stevens
b1dec9172b wl: indicate no pfn when using shmem regions
Indicate when a vfd has no associated pfn when using a shared memory
region by sending the pfn offset corresponding to the size of the shared
memory region.

BUG=b:213532601
TEST=crostini.CopyPaste.wayland_to_x11_buster_stable

Change-Id: Ia2cee6a58c91b474e90837c389dd12dea55e54e5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3789167
Tested-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Commit-Queue: David Stevens <stevensd@chromium.org>
2022-07-28 02:44:55 +00:00
Daniel Verkamp
7bf0d05bd7 virtio-snd: remove unneeded late initialization
Fixes a clippy warning with Rust 1.60 - the variables can be initialized
right away rather than having a separate `let` without an assignment.

BUG=b:239075544
TEST=tools/clippy

Change-Id: Ifd1db84ba5b4bf45c5e5efebcddf2e35a760a071
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3790037
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
2022-07-28 02:38:30 +00:00
Takaya Saeki
8881bc37cb vhost-user: Fix syslog double init crash of gpu/fs
Fix `crosvm devive` command for gpu and fs crases due to double-init of
syslog.

BUG=b:240349875
TEST=`crosvm device gpu` and `fs` don't crash after the fix, and they still can write logs

Change-Id: I8ea35132de66841375366595bd0bb51a8f83f7b1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3782448
Commit-Queue: Takaya Saeki <takayas@chromium.org>
Tested-by: Takaya Saeki <takayas@chromium.org>
Reviewed-by: David Stevens <stevensd@chromium.org>
2022-07-28 02:11:50 +00:00
recipe-roller
773585083b 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/8807437520292078049

depot_tools:
24f28f2f7c
  24f28f2 (vadimsh@chromium.org)
      [lucicfg] Update v1.31.5 => v1.32.0.

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: Iec9df710c213d152036c68dc27f2c2bf8ba75ced
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3790039
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-07-28 01:16:30 +00:00
Alexandre Courbot
d07cd1a050 crosvm: initialize syslog for platform-specific commands
Syslog also needs to be initialized here, otherwise these commands won't
be able to use the log macros.

BUG=None
TEST=crosvm devices command is able to log.

Change-Id: I727fd91dc24226e67dd65502a32823bf78f3b4ab
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3780063
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
2022-07-28 00:58:00 +00:00
Daniel Verkamp
0c6dce811b tpm2-sys: build libtpm2 with -Wno-error
Recent OpenSSL versions have added deprecation warnings for functions
used by libtpm2, which breaks the default build that uses -Werror. Force
it off for our build.rs file so we can keep working until libtpm2 is
updated.

BUG=None
TEST=tools/clippy

Change-Id: I874df1393c6a9b5033e90e8182e6ba694d48e1df
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3790036
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-07-28 00:26:00 +00:00
Dennis Kempin
4fea399df9 Reformat imports
crosvm is switching the import style to use one import per line.
While more verbose, this will greatly reduce the occurence of merge
conflicts going forward.

Note: This is using a nightly feature of rustfmt. So it's a one-off
re-format only. We are considering adding a nightly toolchain to
enable the feature permanently.

BUG=b:239937122
TEST=CQ

Change-Id: Id2dd4dbdc0adfc4f8f3dd1d09da1daafa2a39992
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3784345
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-07-28 00:15:50 +00:00
Elie Kheirallah
18d435aa17 Updating documentation for building crosvm.
Updating set_test_target to test_target.
Highlighting part that mentions running instructions inside the
container.

Bug=b:240336174
Test=None

Change-Id: I61efe14de02fe0fd98bd677a1cd8198b9085c6c7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3788728
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Elie Kheirallah <khei@google.com>
Commit-Queue: Elie Kheirallah <khei@google.com>
2022-07-27 20:54:20 +00:00
Zihan Chen
11812a5bf9 crosvm: Make ballooning a compile time feature
Balloon support can not be compiled out, and don't need to be
disabled at run time.

BUG=b:235887451
TEST=Guest has balloon device by default, does not have balloon
device when disabled. Ballooning via cli functions by default,
return not supported when running vm has ballooning compiled out.

Change-Id: I737851496fe4c14cdbb69c48e6edf1ca9186c15a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3786928
Tested-by: Zihan Chen <zihanchen@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2022-07-27 19:21:50 +00:00
recipe-roller
1884bfd37f 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/8807460800788590689

depot_tools:
a84a16b863
  a84a16b (jojwang@chromium.org)
      [no-sync] Set _should_sync and add flag to control if the exper...

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: Ied7550edf3e8d2735137a98e019de28e276166ab
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3790041
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-07-27 19:08:38 +00:00
Dennis Kempin
1061a4fd02 tools: Fix path to test_target script
The test_target.py script is not longer directly executable
but the test runner would still be pointed at it when used
for iterative development.

BUG=None
TEST=./tools/test_target set vm:aarch64 && source .envrc && cargo test

Change-Id: Id179fe83cd1f449d266576340a2f6f46e63c2878
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3784340
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-07-27 18:07:28 +00:00
recipe-roller
e90ad40006 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/8807475899405330961

depot_tools:
882f1e2a9a
  882f1e2 (brucedawson@chromium.org)
      Treat UnitTests failures as presubmit --all 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: I6f04f37b5a2be3900a4bd4f4fd5b10f6a1d0566a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3789484
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-07-27 15:06:28 +00:00
David Stevens
bdba48b64b wl: disable wl shared memory feature
When the shared memory feature is enabled, there is a bug in how the
driver handles vfds without an associated pfn. Disable the feature bit
until the bug is fixed.

BUG=b:213532601
TEST=crostini.CopyPaste.wayland_to_x11_buster_stable

Change-Id: Ic5f68e167e8ee8f4c990d0c4d73149e60b3ce908
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3789166
Commit-Queue: David Stevens <stevensd@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
2022-07-27 07:39:08 +00:00
Alexandre Courbot
49c8cd6160 media: ffmpeg: reduce dependency on base
We want the ffmpeg crate to be independent of crosvm - remove a
dependency to base by adding a dedicated trait for types that can be
used as sources to a ffmpeg buffer.

BUG=b:169295147
TEST=v4l2r's simple_decoder can decode a H.264 stream.

Change-Id: I2ae6c2678a6a672746e6fc11a70dee692986db69
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3782032
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
2022-07-27 07:30:48 +00:00
Alexandre Courbot
6dbad5033c virtio: video: decoder: remove event_pipe() from EventQueue
This method's result is always used as a dyn AsRawDescriptor, so it's
more flexible to directly implement AsRawDescriptor here instead of
restricting the return type to Event.

BUG=None
TEST=cargo test --features "video-decoder,ffmpeg" -p devices video

Change-Id: Ib911ba671f819106169cde049fda6cb12ebaa4b6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3782034
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-07-27 02:46:48 +00:00
Alexandre Courbot
8e9ebcbfed virtio: video: decoder: ffmpeg: add comment
The use of AV_CODEC_CAP_DR1 is not obvious from its name alone, so add a
comment about what we are doing here.

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

Change-Id: Ib1d38c878ce761fafa85e57076e6d429f63495b5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3782033
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-07-27 02:43:18 +00:00
David Stevens
01e2724335 devices: wl: initialize gralloc after sandboxing
Initializing gralloc may spawn threads, so it needs to be done after
sandboxing the wl device. Initializing gralloc requires expanding the
wl device's sandbox. Rather than trying to maintain a new dedicated
minijail configuration for wl, reuse the gpu's configuration. This
should be sufficient, since virglrenderer has to open minigbm within the
sandboxed gpu process.

BUG=None
TEST=ARCVM and crostini GUI on volteer, zorc-arc-r, grunt-arc-r

Change-Id: I291fb59c665a8ba65058a6f55dee959c839bb43c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3787936
Commit-Queue: David Stevens <stevensd@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Tested-by: David Stevens <stevensd@chromium.org>
2022-07-27 01:54:48 +00:00
Alexandre Courbot
ad05940dcf media: ffmpeg: remove generic type from AvPacket
We only need to enforce a lifetime to the data source of the packet ; we
are not interested in its type. Replace it by () and remove that generic
parameter.

BUG=b:169295147
TEST=cargo build --features "video-decoder,ffmpeg"

Change-Id: Ibd9e976cab9dcc9cf0a44487580eb067211cc9b8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3782031
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-07-27 00:24:18 +00:00
Rob Clark
605573283d crosvm: Increase GPU's fd limit
The GPU can be heavy on fd usage (fences, dma-bufs, eventfd and
shmemfds per context, etc).  Increase the limit.

BUG=b:207515789, b:237224199, b:240092999
TEST=cts-tradefed run cts -m CtsMediaTestCases -t android.media.cts.DecodeAccuracyTest

Change-Id: Icae6652d173614a809a5fc27b2c85910d57e6bb3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3788603
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Rob Clark <robdclark@chromium.org>
Tested-by: Rob Clark <robdclark@chromium.org>
2022-07-26 22:27:23 +00:00