This lets us offload the blocking accept() call to another thread so
that the main thread can continue handling other operations.
BUG=b:179755651
TEST=cargo test
Change-Id: I1372a13e662fe4ad5c99764788550a444d46170d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2987588
Auto-Submit: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
A lot of the information was outdated. The new guide prioritizes
building for linux and testing on linux as the default workflow
for crosvm.
BUG=b:194323235
TEST=None
Change-Id: Idb7cdb07151fc7d7d5466075e316015cf5f4c615
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3098391
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This allows ChromeOS developers to use cargo to build against the crates
provided by the ChromeOS source tree, instead of using the bundled
submodules.
BUG=b:196585250
TEST=./setup_cros_cargo.sh && cargo build
Change-Id: I02d38784f7a97657c37c267818499efed4ddab47
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3092414
Auto-Submit: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
A MSIX BAR can include both MSIX and non-MSIX registers. The non-MSIX
part of the BAR can be mmaped, eliminating unnecessary slow reads/writes
in userspace.
Add a new struct, VfioMsixAllocator, to keep track of the non-MSIX areas
of a mappable MSIX BAR. Page alignment is imposed to make sure mmap
succeeds.
BUG=b:184904868
TEST=boot Linux kernel and verify MSIX-capable passthru devices work
properly
Change-Id: I1fbf4c710f4bfaffe613d902f27e3bbb558c469e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2972489
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
num_pba_entries should use rounding instead.
BUG=b:184904868
TEST=boot Linux kernel and verify MSIX-capable passthru devices work
properly
Change-Id: I406c033f59bc50bd767116947525058b74be054f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2972488
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
For MSIX-capable PCI devices, some BAR regions are described using
VFIO_REGION_INFO_CAP_MSIX_MAPPABLE:
The MSIX mappable capability informs that MSIX data of a BAR can be
mmapped which allows direct access to non-MSIX registers which
happened to be within the same system page.
Add support for this capability so that VfioRegion stores the correct
mmaps information.
Also, fix a couple break conditions to avoid breaking out early.
BUG=b:184904868
TEST=boot Linux kernel and verify MSIX-capable passthru devices work
properly
Change-Id: Ie451b154ccd4779f1694a1ffed0bd02127f5ecdb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2972487
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
BUG=b:191784608
TEST=Build and run atest in Android tree
Cq-Depend: chromium:3073700
Change-Id: I5fcfa166caf8c5a5f759a8f62ef78a293db95f1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3071900
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andrew Walbran <qwandor@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Protected VMs require all virtio data to be bounced through a memory
window shared between the host and the guest. Although this can be
achieved by forcing the guest to use swiotlb bouncing for all DMA
transfers, the recent introduction of "Restricted DMA" in Linux allows
these buffers to be sized and allocated on a per-device basis.
Remove the 'swiotlb=force' option when '--protected-vm' is set in favour
of describing a reserved memory region to be used as the swiotlb buffer
for all virtio-pci devices, adjustable via the new '--swiotlb' option.
BUG=b:190593703
TEST=cargo test on x86 and arm64 machines
Cc: David Brazdil <dbrazdil@google.com>
Cc: Claire Chang <tientzu@chromium.org>
Cc: Quentin Perret <qperret@google.com>
Cc: Andrew Walbran <qwandor@google.com>
Cc: Marc Zyngier <mzyngier@google.com>
Change-Id: I2d48a7c77740e7f3ad996ad33592f0acd53b7144
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3064198
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Will Deacon <willdeacon@google.com>
Reviewed-by: Andrew Walbran <qwandor@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Having both renderers running at the same time can work,
but not without changes. For now, allowing building both
at the same time.
BUG=b:181869105, b:182174209
Test: launch_cvd --gpu_mode=gfxstream
Test: launch_cvd --gpu_mode=virgl_renderer
Change-Id: Ib8a3fd4927401b9f7ebc4a4425a3ddba6621a3e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3092405
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
When nothing fails, output is ignored, but when something fails, you'd
want to look at the error messages.
BUG=None
TEST=time ./builder --vm ./run_tests
Change-Id: If6e73588b33714dea1e7f097a91c80f7c249be48
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3083207
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
The conversion code for KVM <-> hypervisor representation of the Local
APIC state used the unsafe mem::transmute() function to view an array of
i8 as u8 instead for use with the Rust endian conversion functions.
Casting between integer types of the same size with `as` is defined in
Rust as a "no-op" (the bitwise representation is preserved), just like
in C, so transmuting at the slice level is not needed. These can instead
be written as simple loops to avoid the unsafe code.
To ensure this does not regress code quality, I have compared the code
generated for the x86-64 release build. The kvm_lapic_state to
LapicState conversion compiles to identical code, and the reverse
compiles to slightly different code (the compiler decides to emit a loop
instead of unrolling the 64-element copy), but the conversion of each
element still compiles down to a pair of MOV instructions.
The corresponding unit test has also been updated to avoid transmute, as
it was unnecessary there - the individual array element can be cast with
the `as` operator rather than transmuting the whole array.
BUG=None
TEST=cargo test -p hypervisor
Change-Id: I7e792b5507235e5234afe114a1ca744931e047d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2947934
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Improve the log message for unexpected commands received on control
endpoints to include the type of command.
BUG=chromium:1231779
TEST=./test_all
Change-Id: I29963739bf5c5cb9fa427011fe5468a7378b67e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3083225
Reviewed-by: Abhishek Bhardwaj <abhishekbh@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Cathedral enthusiant Victor Hugo once said:
“Nothing else in the world ... not all the armies ... is so
powerful as an idea whose time has come.”
He was talking about republicanism vs. monarchy. My friends,
we are on the verge on a change quite possibly bigger than
that: seamless wayland windowing!!
The revolution started by the virtio_wl device is finally making
it's way to virtio_gpu, bringing best-in-class display
virtualization to a wider audience.
The overall approach is described here:
goto.google.com/virtio-gpu-wayland-context
At it's core, virtio-gpu wayland windowing uses the same mechanisms
that another virtio-gpu consumer (say gfxstream or virglrenderer)
uses to submit an opaque command stream to the host. A response
page is allocated by the guest where host commands are place
(gfxstream has been using this mechanism for years).
There are various tables to track the internal context state and
resources. A thread is spun up to poll the Wayland socket. The
asynchronous callback and upcoming virtio-gpu multiple timelines
feature is used to make 3D consumers (gfxstream, virglrenderer)
don't interfere with the Wayland signalling.
In the future, virtio-gpu may be further modifed to perform
multi-queue virtio in-case the single virtio-queue turns out to be
a bottleneck.
As always, look forward to your feedback & questions.
BUG=b:150239451
TEST=Launch Sublime text + weston-terminal with Sommelier changes
Copy + paste into VM window
Copy + paste out of VM window
Change-Id: Ifb74644cc71a561fd278700d91e4bc66d16107a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3055850
Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Add an optional deadline to BlockingPool::shutdown. Any worker threads
that have not yet exited once the deadline expires will be detached.
This ensures that we don't end up blocking indefinitely while waiting
for worker threads to exit.
BUG=none
TEST=unit tests
Change-Id: I6d7e73e1c95a934a4fd80825a9d44187532408b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3058842
Auto-Submit: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
According to pci bridge spec, some registers are writable and should
be marked correctly.
BUG=b:185084350
TEST=Boot a guest with pcie root port
Change-Id: I501fa05cc9ea6b6ea02d5d8bcbb29ba291a4b49e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2954675
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Some pci capability register is writable, and guest could write it
and control it(like msix control and pcie cap control), let each
pci capability returns its writable bits, so guest could write the
value into config register.
BUG=b:185084350
TEST=Boot a guest with and without passthrough device
Change-Id: Ic98a569823c762e7165f83d29ee90d2ba762dead
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2954674
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This is used to finally make a "delay-rt" VM's RT VCPUs RT.
BUG=b:142777321
TEST="grep policy /proc/<pid of rt vcpu>/sched" to make sure RT vcpu
isn't RT until "make_rt".
Change-Id: I73177f8adadf3d1099c2b09871ee9d5feab82587
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2703225
Auto-Submit: Suleiman Souhlal <suleiman@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Suleiman Souhlal <suleiman@chromium.org>
This flag is intended to be used to delay making a VM's RT VCPUs
RT until "make_rt" is called, in order to avoid boot time
regressions with RT.
BUG=b:142777321
TEST="grep policy /proc/<pid of rt vcpu>/sched" to make sure RT vcpu
isn't RT until "make_rt".
Change-Id: I1b9132e11f0acc626434c60cecc2f4afe350961a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2703224
Auto-Submit: Suleiman Souhlal <suleiman@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Suleiman Souhlal <suleiman@chromium.org>
The ForceKeyFrame control is a button control, which means that it
doesn't have a value. This CL performs some minor cleanup and removes
the empty parentheses after the ForceKeyFrame CtrlVal as these are not
required.
BUG=None
TEST=tast run DUT arc.VideoEncodeAccel.h264_192p_i420_vm
Change-Id: Ic86eb92e097de46ce68ed71bfe24299e07f8b78e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3064155
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: David Staessens <dstaessens@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
/tmp is mounted as tmpfs, and tmpfs does not provide O_DIRECT capabilities. Try
using a ext4 file system.
BUG=b:190435784
TEST=time ./ci/builder --vm # boot_test_vm_odirect passes
Change-Id: I3f8245052ed06c703cc3aa320d300d5f21254e90
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3083206
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
Stale balloon stats results can be returned from a stats request for the
following reasons:
* The initial stats buffer from the guest is posted to the
balloon_host_tube without a request.
* Balloon stats requests can fail because the balloon device isn't
completely set up yet; writing a stats request to the tube without
reading the response.
* Balloon stats requests can time out, returning an error. When the
balloon stats are eventually computed, they will be queued to the tube
without a read to consume them.
Possibly other reasons too.
This CL fixes this by adding an id to the balloon stats request. The id
is then returned with the computed stats. When consuming stats results
from the balloon_host_tube, we check that the ID is the one we expect,
if not, we keep reading from the tube until we do.
BUG=b:189282316
TEST=tast run dut multivm.Lifecycle.arc_host
Change-Id: I08e50196a45383b30c9e510b3bacbe32888aef80
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3056310
Auto-Submit: Charles William Dick <cwd@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Charles William Dick <cwd@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Hikaru Nishida <hikalium@chromium.org>
Instead of requiring crosvm to be checked out via the chromeos manifest
to access dependencies in the ChromeOS monorepo, this change adds
git submodules to third_party/.
The CI scripts and Cargo.toml are updated to use the new paths.
BUG=b:194336213
TEST=git clone --recursive https://chromium.googlesource.com/chromiumos/platform/crosvm
cd crosvm
cargo test
./test_all
./ci/kokoro/simulate_all
Change-Id: I9859d18176e21909ac3a140976fbd67cc14129bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3049003
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
We need to call Queue::ack_features to actually enable virtqueue specific
features like VIRTIO_RING_F_EVENT_IDX.
BUG=none
TEST=start a vm with a vhost-user block device
Change-Id: I82d04ad940850b53e17cfaf3ee5cdb4318190424
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3070721
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
VIRTIO_IOMMU_F_TOPOLOGY is not needed as DT/VIOT are the preferred
methods for vIOMMU discovery.
BUG=b:181736020
TEST=boot Linux kernel and verify passthru devices work properly with
iommu=on
Change-Id: I07b2924a8a903ccd5def817af6f7e74c8eb91162
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2976056
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Add generate_acpi() to traits PciDevice and VirtioDevice to allow each
device to generate its ACPI table elements. The default implementation
is to generate nothing.
BUG=b:181736020
TEST=boot Linux kernel
Change-Id: I9d8d2cb81d571e608a45e7fecb82c3f0922d0898
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2846423
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: David Stevens <stevensd@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This wrappers allow for permissions and ownership changes that are less
sensitive to time-of-check-time-of-use vulnerabilities.
BUG=None
TEST=CQ passes
Change-Id: I6d5e4809a0b0113f3a95b0395d3cfb82431a3fd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3049330
Auto-Submit: Allen Webb <allenwebb@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Allen Webb <allenwebb@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This CL adds support for the VIRTIO_VIDEO_CONTROL_PREPEND_SPSPPS_TO_IDR
control to the virtio encoder. When this control is enabled SPS and PPS
NAL units are prepended to IDR frames, to improve the resilience of
encoded video streams.
Note: Currently the libvda backend always prepends SPS and PPS NAL
units to IDR frames. This behavior can not be disabled, so when
querying this control it will always be reported as enabled. Trying to
set the control to disabled will result in an error.
BUG=b:161495502
TEST=tast run DUT arc.VideoEncodeAccel.h264_192p_i420_vm
Cq-Depend: chromium:3058721
Change-Id: I2a53b635553cfbdbc483c4d678f124953721dba0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3060098
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: David Staessens <dstaessens@chromium.org>
and trigger the callback function for the buffer automatically
without relying on Drop. There is no drop guarantee in rust.
Moreover, the callback function is also async in the async code.
We cannot block wait in the callback function.
BUG=b:192912354
TEST=cargo test
Cq-Depend: chromium:3007841
Change-Id: I57902cdb0e083f61349f7124602e957ffa84b3c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3062163
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Woody Chow <woodychow@google.com>
On trogdor devices, fstatfs64 is not used. Instead, 32bit
fstatfs is used. We need to add both to all 32bit Arm
policy files which were originally determined to be
problematic.
This adds fstsatfs to all 32bit Arm policy files which
were modified for the original glibc security change.
Additionally, this commit sorts the syscalls lexicographically
if the policy file was already sorted.
BUG=chromium:1182687
TEST=CQ of http://crrev.com/c/2910526
Change-Id: I42eb12456625d400ee3422af08d56d648e3f9075
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3066144
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Jordan R Abrahams <ajordanr@google.com>
Updates path and includes the libraries in the test runner.
BUG=b:193243281,b:191509642
TEST=./run_tests passes and executes the new tests
Change-Id: If38126fa6bdf2a0a3dca5a79c6e4d76857617fd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3049671
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
This CL contains a 1:1 copy of the code from the platform2 repo.
The follow-up CL will integrate them with the crosvm build.
History of these files is available at:
267497a7f7/cros-fuzz267497a7f7/vm_tools/p9
This is a prerequisite for the externalization of crosvm.
BUG=b:191509642,b:193243281
TEST=None. This is dead code.
Change-Id: Ia25d9642f2de1febc83bcd48b4b81fcd805c7c1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3049670
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
This CL adds support for dynamically changing the peak bitrate in
addition to the target bitrate. This is done by adapting the
request_encoding_params_change function to use the new Bitrate data
structure, similar to the changes done in the Chrome
VideoEncodeAccelerator.
BUG=b:190336806,b:181514834
TEST=tast run DUT arc.VideoEncodeAccel.h264_192p_i420_vm
Cq-Depend: chromium:3032331
Change-Id: Id0fd3fa2b3d818c8880d4a02a96f84b218b19cef
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3033225
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: David Staessens <dstaessens@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
The feature was never finished (crbug.com/911799), but adds a
build-time dependency on the trunks proto in platform2.
BUG=b:193267897
TEST=cargo build with and without tpm feature
Change-Id: I7299ba0779bb04ebca6284cfd11873e99500c993
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3043491
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Previously, gaps(or holes) between component disk images were filled
with "GPT header". Rather than relying on arbitrary filler, it'd be nice
those gaps are filled with zeros.
BUG=b:190503456
TEST=cargo test
Change-Id: Ie7bcec5049ddc6c2e852bac6cd9bffc61f9d79d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3058836
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Andrew Walbran <qwandor@google.com>
Commit-Queue: Jooyung Han <jooyung@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Auto-Submit: Jooyung Han <jooyung@google.com>
We don't need to support multi-file partition for composite disk images.
This will make the code simpler.
BUG=b:190503456
TEST=cargo test
Change-Id: I9e115ec73ad451ea46fe91c0d0a3c2e85aa1f010
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3058835
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Andrew Walbran <qwandor@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Jooyung Han <jooyung@google.com>
Auto-Submit: Jooyung Han <jooyung@google.com>
Introduce a new disk flag o_direct=true, which uses O_DIRECT for open.
Block access and memory buffer needs to be aligned to 512 bytes.
BUG=b:190435784
BUG=b:184204645
TEST=boot tests (boot_test_suspend_resume, boot_test_vm) keep running with o_direct=true.
Change-Id: I17888f8a6ef2a38baba2c17dbb0d7aa18b70dbfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2821112
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
fs/worker.rs and fs/mod.rs were still using the old std::sync::Mutex
version instead of the crosvm-specific wrapper sync::Mutex
BUG=b:179636297
TEST=build crosvm and run shared-dir with virtio-fs
Change-Id: I773a885fd0ef35e25bc7a090f067d8a6f60636da
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3058837
Auto-Submit: Morg <morg@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Morg <morg@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
This CL adds support for the VIRTIO_VIDEO_CONTROL_BITRATE_PEAK control
to the crosvm encoder. This control allows configuring the peak bitrate
used when encoding a video. The peak bitrate is only used when the
bitrate mode is set to VBR (variable bitrate), and is ignored for CBR
(constant bitrate).
BUG=b:190336806,b:181514834
TEST=tast run DUT arc.VideoEncodeAccel.h264_192p_i420
Cq-Depend: chromium:2946469
Change-Id: Ie513b474f48f09a710a68c9f06111e0fc6627aa6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2944321
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: David Staessens <dstaessens@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
... by not holding locks while data is being copied around, but only
when the buffers are being allocated.
BUG=b:174713663
Change-Id: I558e14422eeff690c09f031f6c5564ee7de21e39
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2994806
Tested-by: kokoro <noreply+kokoro@google.com>
Auto-Submit: Jorge Moreira Broche <jemoreira@google.com>
Commit-Queue: Jorge Moreira Broche <jemoreira@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>