The test has been failing every ~10 test runs. The removed check
can be racy since we cannot wait for all threads to complete.
BUG=None
TEST=./test_all passes consistently
Change-Id: I231ae0734bc1a0d0c0fc991448f6ebf63b11fc56
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2768678
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
More recent Intel IO-APICs can support more than 24 interrupt
lines. This change enables variable size of IO-APIC lines for
user level IO-APIC emulation code (split-irqchip).
Reported version and supported IO-APIC registes matching ICH10
implementation of IO-APIC device.
BUG=b:181795297
TEST=boot and allocate irq from upper range.
Change-Id: I56480befb39c4c268266f04e4a93105402248772
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2733579
Tested-by: Tomasz Jeznach <tjeznach@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Tomasz Jeznach <tjeznach@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Bug: 181664980
Test: Launch cuttlefish with crosvm, observe switches /dev/input
device with `getevent -lp`.
Test: cargo test
Change-Id: I209b93421bcfcc4ab26efc8981fcd2d680717d59
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2765762
Reviewed-by: Zach Reizner <zachr@chromium.org>
Auto-Submit: Daniel Norman <danielnorman@google.com>
Commit-Queue: Daniel Norman <danielnorman@google.com>
Tested-by: Daniel Norman <danielnorman@google.com>
PollSource keeps a strong reference to the FdExecutor, which can lead to
a memory leak via a circular reference if the caller spawns a future
that owns a PollSource and then detaches it. Avoid this by using weak
references instead.
With this change, we now only use weak references internally. The only
way to increase the strong reference count is by cloning the FdExecutor.
BUG=none
TEST=unit tests
Change-Id: Ic58ff475a31c6fca831c3ced73b26b87ceeda028
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2760378
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Previously each executor had to call RunnableQueue::set_waker at the
beginning of every loop before it started executing futures, which was a
bit tedious. This call was needed so that the RunnableQueue would wake
up the executor if a new future was scheduled.
Instead move responsibility for waking the executor when a future is
scheduled back to the executor. This lets us get rid of the set_waker
method and is arguably a better separation of responsibilities.
BUG=none
TEST=unit tests
Change-Id: Ica46437f78c822d87096eaa215954d118c6578f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2760377
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Increases the communication timeout to 10 secs since we are running
twice nested KVMs, and things get a bit slower.
BUG=b:181675114
TEST=./test_all
Change-Id: Ifa3ea05952cd8a4f7fbe4fefb12143098243c21a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2752341
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Wrap the link to the FDT spec in <> so it becomes a clickable link in
the doc output.
Also fix a parenthesized abbreviation of Devicetree Blob to be DTB
rather than FDT.
BUG=None
TEST=cargo doc
Change-Id: Ie607acb6388820e7dfdb436bdad34ff077289666
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2763204
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Indicate that the code block with instructions for running bindgen is
not Rust code to avoid this warning:
warning: could not parse code block as Rust code
BUG=None
TEST=cargo doc --all-features
Change-Id: I38a9d49487dc1da8e41d3fca5dfa1b8bc8ae5e84
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2762064
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
To allow for porting to non POSIX platforms, we've brought the
libchromeos::sync module into cros_async (which was the only
consumer).
BUG=b:180978556
TEST=builds
Change-Id: I97256b1dc37124cebc693c035e63d2c5b29e94b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2757280
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Add the privileged requirement so that these tests run in a VM and can
successfully call memfd_create().
BUG=b:181672913
BUG=b:181675101
TEST=./test_all
Change-Id: Ic0eadade4e625e50e73682771a9c6fbb92468af2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2754487
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
When the V4L2 output queue is streamoff, crosvm gets QueueClear
command. All the V4L2 output buffers are dropped, but VDA doesn't drop
output buffers at this point. We should only clear the enqueued
resource ids, and not clear the whole output resources.
BUG=b:181541291
TEST=android.media.cts.AdaptivePlaybackTest
TEST=com.google.android.exoplayer.gts.DashTest
Change-Id: I343b809e80d5bc56679b76baa5593aebb4558a74
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2756068
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Some of the multi-threaded tests had race conditions that show up when
running inside the Kokoro Test VMs.
To wake up and complete all running threads, no-ops are inserted into
the uring. However, each thread can grab a list of results. On the
test VMs, all no-ops are read by one thread, leaving the others running,
blocking the test from completing.
Since this is just a test.. let's just leave the threads hanging and
let the OS take care of them.
BUG=b:181673923
TEST=./test_all
Change-Id: I504b6db9cf934e2454d27c1155667b4b0f7fbc77
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2750783
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
The io_uring and fuzz crate cannot be tested in the same workspace
via `cargo test -p io_uring -p fuzz`.
This change allows test_runner.py to run tests independently by
cd'ing into the crates directory and running cargo test in there.
BUG=b:181672910
BUG=b:181673923
TEST=Tests for the above mentioned crates can be enabled and run, but
test failures prevent them from being enabled so far.
Change-Id: Ia03868d53e508549fe2f071da399b982359a8834
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2749772
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Updates the guest_under_test Makefile / upload script to build
for aarch64 as well.
BUG=b:176748319
TEST=Unfortunately KVM is not fully functional in our arch64 VM, so I have
not been able to test the prebuilt yet.
Change-Id: I554da6a620b26ffa1db34baa13d529f0b1de1616
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2676994
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
This change is to cleanup some dead_code warnings that appear if certain
features aren't enabled.
This also updates the Cargo.lock when changed due to zeroize being added
to libchromeos-rs.
TEST=cargo check --all-features
BUG=None
Change-Id: I5347b584a7426dc37f3933b1e907b23a71145749
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2753128
Reviewed-by: Allen Webb <allenwebb@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Zach Reizner <zachr@chromium.org>
Commit-Queue: Zach Reizner <zachr@chromium.org>
This change is similar to http://crrev.com/c/2736520, which made the
path of the KVM device configurable. Similarly, most users will want
to keep the default paths of `/dev/vhost-vsock` and `/dev/vhost-net`.
In certain environments, namely Borg, those device nodes may be located
elsewhere.
BUG=None
TEST=./ci/builder --vm ./run_tests
Change-Id: I4bd7944d8f84fc0e7d255a3930c27f48a980e617
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2749235
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Set the SECBIT_NO_SETUID_FIXUP securebit so that we don't lose
capabilities when changing the thread uid/gid. This allows us to
simplify the create and mkdir functions so that all the checks we
currently carry out are only done once by the host kernel.
To ensure that the setuid and setgid bits still get dropped when a file
is modified by a process that doesn't hold CAP_FSETID, check for
WRITE_KILL_PRIV in the write flags and temporarily drop CAP_FSETID when
it is set.
BUG=none
TEST=Check that default posix acls, setgid bits, and file/directory
creation via membership of a supplementary group all work as
expected.
Change-Id: I420484e357a970e997cb3e968a433278e82d8ad4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2684067
Auto-Submit: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
For historical reasons, crosvm switched to sending `IntoIobuf`, this
isn't implementable for a slice of slices as it would require an
allocation. The rust-vmm fork of sys_util still supports sending
`&[&[u8]]`. Adding that ability back makes it easier to use their
crates.
In addition crosvm allows receiving to slices by not iovecs, again the
opposite of the rust-vmm version. Add that ability as well.
Change-Id: I4566f232adb47a0802e39e3f6c09c03f97190eb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2740533
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Use tempfile rather than SharedMemory for temporary files in the
composite disk unit tests. This fixes an API incompatibility that was
missed because these tests are only enabled with the composite-disk
feature.
This also enables the disk tests in test_all with the privileged option
so that they run in the VM; this allows the memfd_create syscall used in
the async_read/write tests to work.
BUG=b:181674168
TEST=cargo test -p disk --features=composite-disk
TEST=./test_all
Change-Id: I869b5daa29904b3558440e7b650713e8e5085d81
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2743401
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Make the forked child processess easier to distinguish.
Also tweak the debug_label for virtio-pci devices so that more of the
name can fit into a limited-length thread name.
BUG=None
TEST=pstree
Change-Id: I74a8c1f5ab869e814bed4f2bd71c3de5179f7855
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2740526
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Kokoro was failing since http://crrev.com/c/2744968 depends on recent
cras changes that were not included in the current Kokoro manifest.
BUG=None
TEST=./ci/kokoro/simulate_all passes
Change-Id: I470844af73b9f89ac8cbf9f5fcf8706d01924279
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2746014
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
This change updates the test VM to debian bullseye, primarily to enable
io_uring features that are not available in the 4.16 kernel shipping
with debian buster.
We are not updating the builder containers to bullseye, as newer
versions of qemu fail to start on kokoro. See b/181359683
Since it was needed for debugging this CL, it includes a feature to
debug kokoro builders via SSH. It can be enabled by setting
DEBUG_SSH_KEY from the fusion2 UI.
BUG=b:178228512
TEST=./test_all passes
Change-Id: I22f1678577183a0aace80245a87c31907221cc09
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2721062
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Crosvm pre-allocate mmio for device, but it doesn't enable memory/io
space in pci command config register, then OVMF doesn't use the pre-allocated
mmio and reallocate device mmio.
BUG=b:179053182
TEST='crosvm run -bios OVMF.fd' and check device info in efi shell
Change-Id: I7176e7f9716d829efff1ea023666eb705b525e5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2741920
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
All virtio devices have virtio version 1.0 as base feature, but this revision
id isn't in pci configuration register, then OVMF won't start virtio 1.0
driver, and virtio device couldn't be used in OVMF.
BUG=b:179053182
TEST='crosvm run -bios OVMF.fd' and check virito blk device in EFI shell.
Change-Id: I8cbcd71b9b6ccef07b56853b7450b74e4dcbae1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2741919
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Ovmf goes through all entries in smbios table, without end entry,
assert() failure occurs.
BUG=b:179053182
TEST='crosvm run -bios OVMF.fd' and boot OVMF into efi shell
Change-Id: I0068133c75583dc4a3477d01a58f0ee8775b509e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2741918
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This essentially duplicates the same implicit fd-passing support in
create_block_device. By accepting the FD directly instead of opening the
file under `/proc/self/fd/...` we can inherit the same permissions that
a caller to concierge, for example, gets. This simultaneously allows
crosvm to access files it might not otherwise be able to, and prevents
it from misusing its privileges to potentially elevate a read-only FD to
wa read/write FD.
BUG=b:181347894
TEST=Start pmem VM passed from concierge via FD. Ensured the FD itself
was used instead of crosvm re-opening the file under `/proc/self/fd...`.
Change-Id: Ic4d4e6155a1978b45e82141609fdadff45ca987b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2724473
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Commit-Queue: Mike Gerow <gerow@google.com>
To track arc in VM in UMA and to separate it
from other linux VMs.
Changes:
- Add client_type options to Ac97Parameters.
- Add client_type option for the ac97 devices with CRAS backend.
BUG=b:177393225
TEST=Apply full patch set and start audio in ARCVM with
`cras_test_client --dump_a`
Cq-Depend: chromium:2744525
Change-Id: I27201aa65baed0ee59cf689dd7f22b5b91f00946
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2744968
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
Most users will want to keep the default `/dev/kvm` path. However, in
certain environments, namely Borg, the KVM device node may be located
elsewhere.
This is the first of a set of related changes that will make hard-coded
device paths configurable.
BUG=None
TEST=./ci/builder --vm ./run_tests
Change-Id: I6087879c535be3779e20eff1f8fb5080f80cf020
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2736520
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
Starting with 2.32 glibc nanosleep() was refactored to use the
clock_nanosleep syscall so various software will fail unless
the new syscall is allowed. We can't just drop the old nanosleep
syscall because it will break glibc 2.27 which is still used.
See glibc commits:
807edded25 nptl: Refactor thrd_sleep in terms of clock_nanosleep
3537ecb49c Refactor nanosleep in terms of clock_nanosleep
79a547b162 nptl: Move nanosleep implementation to libc
This is a bulk edit done with the following command:
git grep -rl 'nanosleep: 1' | xargs sed -i \
'/^nanosleep: 1/a clock_nanosleep: 1'
BUG=chromium:1171287
TEST=Local builds and booting on kevin/64/eve/minnie.
Change-Id: I975535078d88200f52319c7eea3a4c7ebf299933
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2735575
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
While a host virtio device provides |num_queues| virtqueues, a guest virtio driver doesn't necessarily use all of them. For example, the virtio-blk driver uses only |nr_cpu_ids| virtqueues at most [1].
To avoid checking whether each queue is ready in each device implementation, we can filter them before starting device activation.
[1]:
https://patchwork.kernel.org/project/linux-block/cover/1553682995-5682-1-git-send-email-dongli.zhang@oracle.com/
BUG=b:179671351, b:181753022
TEST=CQ
Change-Id: I29d21d8d9db2d99aa9591ca55c18d06d2368797e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2732735
Tested-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Add #[repr(packed)] to struct virtio_blk_config to make its size same with the
the origianl C struct. The packed annotation will remove 4-byte padding at the
end of the struct and make the size of the struct smaller. (64 bytes -> 60 bytes)
Since it won't affect offsets of any fields, it shouldn't change any behavior
when the guest reads a config field. But, it can matter when the entire config
struct is passed via vhost-user protocol.
BUG=none
TEST=run a VM
Change-Id: I4dca9f1bdd93166192eca4d05d542ce851852aa7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2726059
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
After the userspace streamoff the input queue, the crosvm should not
return the previous frames. However, VDA might still return frames
before notifying reset is done. This CL drops the decoded frames after
calling VDA::Reset() until reset is completed.
BUG=b:181087034
TEST=android.media.cts.AdaptivePlaybackTest
Change-Id: Ieaa40ef27f1b37a262c80f9f30698c03ef16bdb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2728584
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
When the video is flushed, V4L2DecodeComponent streamoff V4L2 output
and input queue. Then crosvm releases all output buffers and calls
VDA::Reset(). However, VaapiVDA implementation doesn't release output
buffer at Reset(). If Vaapi decodes the following frame before
V4L2DecodeComponent QBUF any output buffer, then crosvm will drop the
decoded frame.
This CL makes crosvm postpone sending the decoded frame if this
situation happens. Crosvm would sends the decoded frame when receiving
the buffer again.
BUG=b:181087034
TEST=emerge-hatch-arc-r crosvm
TEST=android.media.cts.AdaptivePlaybackTest
TEST=seek video many times and check no error occurs at the end of video
Change-Id: I0c8e59e2a206d6b2cd2009fd70380e7d5a366953
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2719245
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Originally, process_cmd function can only return the response of the
procesesed cmd. However, we need to return the response of events for
some commands. This CL makes the process_cmd function could return
the responses of both command and event.
BUG=b:181087034
TEST=emerge-hatch-arc-r crosvm
Change-Id: Ie781795f8cee1c66e8462c602f876043b0dea9bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2719244
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Originally process_cmd() return VideoResult<VideoCmdResponseType>.
However, VideoCmdResponseType could return the error result by
Sync(CmdResponse::Error). VideoResult is not needed.
This CL change the returned type of process_cmd() to
VideoCmdResponseType to reduce code complexity.
BUG=b:181087034
TEST=emerge-hatch-arc-r crosvm
Change-Id: I1795a3eb09fe36076f5ad43fdd8d1eb9e21ffcd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2731607
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
By using these traits in crosvm, we also add serde as a dependency.
BUG=b:176847362
TEST=run_tests
Cq-Depend: chromium:2729637
Change-Id: Icd16a6e163d9e1dedbe3924cb94f29d777eb2216
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2613690
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Zach Reizner <zachr@chromium.org>
Commit-Queue: Zach Reizner <zachr@chromium.org>
This is replaced by test_all and the new builders for kokoro.
See ci/README.md for details.
BUG=b:178233937
TEST=None
Change-Id: Id8bf721e026e71d9f284f920ef8287beb414c621
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2705292
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
The args may be interpreted as pointers for some capabilities, so the
caller must ensure that any such pointers are allocated appropriately.
BUG=b:181564686
TEST=cargo test
Change-Id: I244f4d9417e588a6be5681f4718bb9ad7b262c3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2726709
Auto-Submit: Andrew Walbran <qwandor@google.com>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
This removes some unsafe code, improving the interface so that it cannot
be misused (e.g. previously, different Vec<u8> instances could be passed
to fdt functions that did not validate the contents).
The new implementation also adds some extra error checking to catch
invalid string values in all API entry points that accept strings, as
well as out-of-order node nesting that would result in DTB data that did
not conform to the spec.
BUG=b:175729255
TEST=cargo test -p arch
TEST=Boot Crostini on kevin (arm)
TEST=diff old and new dts from `dtc -I fs -O dts /proc/device-tree`
Change-Id: I567d562ed1b447aa0d282b68c71758edea13ffc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2713569
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>