Exposes the maximum number of USB ports that can be retrieved through a
call to crosvm_client_usb_list.
BUG=b:188858559
TEST=cq
Change-Id: I87c788f755763afaab021eb4126dadbcc3ac4090
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3757173
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
Merge the Translate trait into the Mapper trait, and add a translate
method directly to IpcMemoryMapper. This is preparation for when the
frontend IpcMemoryMapper struct and the backend Translate trait will
diverge.
BUG=b:237620529
TEST=compiles
Change-Id: Iaeb98237aef2fb8d46719d6e6ec5669e49582ae7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3737407
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Replace thiserror enum with anyhow. The only error that needs to be
checked for is IovaPartialOverlap, which can be handled by changing the
add/remove map return types from () to bool. This CL also adds proper
handling of that case to the iommu device.
BUG=b:237620529
TEST=compiles
Change-Id: I066cf2d609d1264b235b019ec098f9a761535f9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3737405
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Adds another dashboard of all presubmit / CQ builders and
enables windows in presubmit as well.
BUG=None
TEST=None
Change-Id: I36af76cec1306648993331dc8f9b9bfbec4637d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3759329
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This was previously untested, so split it into its own function and add
a few basic tests.
BUG=None
TEST=cargo test
Change-Id: I36ae7876d22684dfae1ec3f0edf1d06d3fc04cdd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3749940
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Fix two small bugs in the code that handles options that are valid with
or without extra options (--battery, --video-encoder, --video-decoder,
--gpu, and --gpu-display):
- If the next arg was a short option (e.g. `-p`), we didn't consider it
the start of a new flag, so it would have been used as the parameters
for a switch-or-option arg (e.g. `--gpu -p something` would parse as
`--gpu=-p`). Fix this by only requiring a single dash instead of two.
- The `crosvm run` command requires a positional argument at the end
(kernel filename), and the check for the switch-or-option arg had an
off-by-one that did not consider the positional argument. This broke
the case where one of these switches occurred right before the kernel
filename argument, e.g. `crosvm run [...] --gpu vm_kernel`. Fix this
by comparing against len - 2 instead of len - 1.
BUG=b:237334804
TEST=crosvm run --battery -p init=/bin/bash -r vm_rootfs.img vm_kernel
TEST=crosvm run -p init=/bin/bash -r vm_roofs.img --battery vm_kernel
Change-Id: I2c44ca124ba35b980e655f4f0cf9a9366e6be33d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3749939
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
de7835d9b rutagaba_gfx: set envvar "radv_require_etc2=true" to fix ARCVM CTS regression
500c403a5 devices: virtio: console: Fix stuck vm when virtio-console has no output
f436e2706 vmm_vhost: add shared memory region support
894b82c591..de7835d9b0
BUG=b:238440998
BUG=b:201745804
BUG=b:237493180
Change-Id: I3e19e957a5c7fbc889e5796de63b4bbbf7360172
This workaround is needed to fix an ARCVM CTS regression:
CtsGraphicsTestCases - android.graphics.cts.VulkanFeaturesTest#testVulkanHardwareFeatures
The test regressed after virgl_render_server changed it's execname in
crrev/c/3711405 to match each guest app's execname and mesa's dri-conf
no longer applies this setting automatically.
BUG=b:237493180
TEST=(passing on guybrush/nipperkin):
cts-tradefed run commandAndExit cts -m CtsGraphicsTestCases \
-t android.graphics.cts.VulkanFeaturesTest#testVulkanHardwareFeatures
(on guybrush/nipperkin)
Change-Id: I60d16ecceb8dd84e40a3a4a76fb1d7e72f448b60
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3753417
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Ryan Neph <ryanneph@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
If a virtio-console has type "sink" and the guest keeps writing to it,
the virtio queue would fill and then further writes would block the
guest.
Using an `io::sink` fallback matches the non-async virtio-console's
behavior.
TEST=android microdroid tests
BUG=b:238440998
Change-Id: I145e09052ec8ed166055ad73195c57bf63551efc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3756726
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Frederick Mayle <fmayle@google.com>
Add support for shared memory regions to vhost-user. This is adding
support for a front-end message to query for necessary shared memory
regions plus back-end message to support mapping/unmapping files from
the shared memory region.
go/vvu-shared-memory
BUG=b:201745804
TEST=compiles
Change-Id: I35c5d260ee09175b68f6778b81883e0070ee0265
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3716344
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Tests run fast natively, 10 repetitions only take 5 minutes to run.
However for aarch64/armhf it can take >30 minutes. Which is ok for
post-submit but still unnecessarily slow.
3 repetitions is enough to find flakes.
BUG=b:238232551
TEST=None
Change-Id: I958ec734c85047c65a13d1cc172468622073d360
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3751033
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This reverts commit 213f9fe8a7.
Reason for revert: breaks the ChromeOS builder.
Original change's description:
> Add a VAAPI wrapper crate
>
> In light of the upcoming VAAPI video decoder backend, add a VAAPI
> wrapper crate that exposes a safe Rust API for a subset of the VAAPI C
> code. This crate will be called from the VAAPI video decoder backend in
> order to decode frames.
>
> BUG=b:214478588
> TEST=cargo build --features "video-decoder,vaapi"
> TEST=`cargo test -- --include-ignored` in `media/libva` passes on a
> device with Intel GPU and libva installed.
>
> Change-Id: I4afa96c49d045251827b97bd78faeba57575aedc
Bug: b:214478588
Change-Id: Ib5a88cd4c5fdd2df2e69fd3a0896ee789585840d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3752267
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
In light of the upcoming VAAPI video decoder backend, add a VAAPI
wrapper crate that exposes a safe Rust API for a subset of the VAAPI C
code. This crate will be called from the VAAPI video decoder backend in
order to decode frames.
BUG=b:214478588
TEST=cargo build --features "video-decoder,vaapi"
TEST=`cargo test -- --include-ignored` in `media/libva` passes on a
device with Intel GPU and libva installed.
Change-Id: I4afa96c49d045251827b97bd78faeba57575aedc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3422779
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
The new builder will generate the mdbook and api docs, then
uploads them to GCS.
BUG=b:233411583
TEST=luci-auth context ./infra/recipes.py run build_docs
Change-Id: Ia22cdb20d73f9268db6299cd6f0875950d174b3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3751832
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Rustup does not seem to like to be re-installed on windows. So we can
just skip running rustup-init if it does not exist yet.
BUG=b:238232551
TEST=led get-build 8809175137568661169 | led edit-recipe-bundle | led launch
https://ci.chromium.org/swarming/task/5bf87806f4627f10
Change-Id: Ice0861a8d52499660b26ee259daf135b595aa053
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3751029
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Normally we run test binaries in parallel, this change allows some to be
executed exclusively.
This fixes some of the odd issues and flakes we have been seeing.
integration_tests can hang if run in parallel with other tests and
cros_async has the odd habit of throwing the test_runner process into
the background.
Neither happens when the tests are the only ones being executed.
Also adds the capability to specify which test binaries to run,
which was helpful in debugging this issue.
BUG=b:238232551
TEST=./tools/run_tests --repeat 10
Change-Id: Ie5b82e329007399e95bf38111ec6e7cb6761ec0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3751027
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
The test runner can now repeat tests in two ways:
- Via --repeat to run tests multiple times and fail if any one of them
fails. Which will help us find flakes in post-submit.
- Via --retry, which will retry a test if it has failed. Which makes
pre-submit tests more resilient to flakes.
Both can be configured by builder configs to adjust as needed.
Also slighly changes the repeat behavior to repeat tests in batches, so
we do not run the same test multiple times simultaneously, which can
cause some of them to fail. It's also easier to read the results.
BUG=b:238232551
TEST=added a random flake into some tests and used --repeat and --retry
Change-Id: I78e0ff0751da40a99a56080d9baf207307c9e93a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3751835
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
- Use anyhow errors in run_vm
- Initialize logs in a separate function
- Add and use to_command_status()
- Avoid using "platform"
BUG=b:213146388
TEST=presubmit
Change-Id: I31dde911b13a77065e12b32c0981f13c33c39f04
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3749942
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
970811a70 hypervisor: x86: remove apic_base and interrupt_bitmap from Sregs
0367dadf7 x86_64: pass Sregs via vcpu_init
0cba994f3 x86_64: expose setup_sregs steps as pub
91a4b090d hypervisor: x86_64: add Default impl for Sregs
6f576dd81 hypervisor: x86_64: default Regs::rip to reset vector
814114c64 x86_64: call set_lint() for BIOS as well
ad3914cd9 x86_64: move MSRs to vcpu_init
aef95d207 infra: Repeat tests in post-submit
b1abe5864 infra: Optimize cache usage among builders
909f10fef infra: Repack repo before running container
123061360 infra: Fix container cache after bad rebase
0c09cdbdb cros_async: Fix windows timer flake
5e7c6b1ab infra: Add email notifications for postsubmit and infra
aa52701db infra: Use latest version of github secret
365c8f9201..970811a704
BUG=b:233230027
BUG=b:238333690
BUG=b:237095693
BUG=b:238232551
BUG=b:238328665
Change-Id: If9ab8219e709da75068e2ab831f8ef2a8e4155c4
These are only used in KVM, not the other x86 hypervisors, and they
don't really fit into the same category as the rest of Sregs. The
apic_base can be set via set_msrs(), and the interrupt_bitmap is
part of the irqchip state.
To enable this removal, we change the KVM set_sregs() call to retrieve
the current state and use the existing apic_base and interrupt_bitmap.
BUG=b:237095693
TEST=Boot x86-64 kernel on KVM
Change-Id: I275eec83b74f1c364b7a543882f3ac5960201143
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3728988
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
Now that we have a Default implementation of Sregs that sets the
architecturally defined reset values, we can initialize the Sregs values
during build_vm(). This allows removal of the set_reset_vector()
function, as all of the values it set are now the defaults in Sregs and
Regs.
This also lets us set up the page tables and GDT only once during
build_vm() instead of rewriting them for every configure_vcpu() call.
This allows consolidation of the BIOS and non-BIOS configure_vcpu()
code.
BUG=b:237095693
TEST=Boot x86-64 Linux kernel
TEST=Boot --bios u-boot.rom
Change-Id: Ief19f983fd252dffa668ff2cfe96a64298e06cf2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3723802
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This will be used to move the page table initialization out of the
per-vcpu setup in an upcoming commit.
The names of the individual steps are a slight improvement over the
previous setup_sregs() as well, since that doesn't really say what it
does in any detail.
BUG=b:237095693
TEST=Boot x86-64 Linux kernel
TEST=cargo test -p x86_64
Change-Id: Ifecf00107d923d0c37389956a1b006fe370e2591
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3735641
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Replace the Sregs Default implementation with one that provides the
register values at reset, based on the Intel software developer
manual.
The x86_64 tests need to be adjusted to only check the CR0 bits they
intend to match, since the default Sregs value now includes other set
bits.
BUG=b:237095693
TEST=Boot x86-64 Linux kernel
TEST=cargo test -p x86_64
Change-Id: If966941df43225572e79ebd9213671348e2846f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3735640
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This matches the reset value of the registers defined by the Intel
manuals. It is currently overwritten on all paths initializing Regs, but
it will be used in an upcoming commit to simplify the BIOS boot path.
BUG=b:237095693
TEST=Boot x86_64 Linux
TEST=cargo test -p x86_64
Change-Id: I7a96882fad05440c98bde2fad7ad15c0890f1cfa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3735639
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This configures the IRQ chip and is not called anywhere else for the
normal BIOS path, so it should be moved above the `if has_bios` check.
BUG=b:237095693
TEST=crosvm run --bios u-boot.rom --disk test.img # virtio-blk works
Change-Id: I1813d59d7921a824c46a49de98d272f639cc5c07
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3723801
Reviewed-by: Steven Richman <srichman@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
The MTRR-related MSR setup is split out into its own pub function for
clarity and to allow future reuse. The maximum variable MTRR check is
split out so we can generate MTRRs before having a valid VCPU object.
This unifies the MSR set calls in configure_vcpu() so that the BIOS and
non-BIOS cases use the same code.
BUG=b:237095693
TEST=Boot x86-64 Linux kernel
TEST=Boot x86 u-boot.rom
Change-Id: Ifa0020257a043190de69b7192c2d6b35c01d216e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3723800
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
This will help us find flaky test. Runtime increase is not that
significant (~10min).
BUG=b:238232551
TEST=Builder config needs to be tested in luci
Change-Id: Ie75cc9620177115623500fe2206f33464f4c8580
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3751831
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Then 'builder' cache dir is set up by default to be a cache directory
for each builder, so luci will try to schedule a builder to run on
the same bot as before.
We can optimize that by sharing the cache among all linux builders.
BUG=b:238333690
TEST=lucicfg validate main.star
Change-Id: If4639658271881f1bf1ad001ae54f50645e8890a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3751828
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
gclient will cache objects in a separate repo and points to them
via .git/objects/info/alternates
That cache won't be available in the container, which will prevent
us from properly using the repo.
git repack will ensure all those objects are brought into the
main repository.
BUG=b:238328665
TEST=led get-build 8809354906626249393 | led edit-recipe-bundle | led
launch
Change-Id: Iba1374a4d34e410e2d2b565cbf5cfbaa0be2fe5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3751827
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
An early return snuck in during a rebase.
BUG=b:233230027
TEST=./recipes.py test run
Change-Id: I152281dd55148ca56fc7300a66b6bdcc1eef0ada
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3751830
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
The test is flaky by nature since there is no API guarantee on how
long SetWaitableTimer will sleep. This is flaky on our Luci bots, so
increase the permitted deviation a bit.
BUG=b:238232551
TEST=./tools/run_tests --build-target=mingw64
Change-Id: Ib227be097a0a5559898571cb6b77c37e7fd61cff
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3749936
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Both only notify myself for now as the luci infra is not
launched yet.
BUG=None
TEST=None
Change-Id: I4794bb118f6c27f145af9027ec317da2fb578af7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3739370
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
The previous token expired and a new one was created and added to
GCP secrets manager.
This CL updates the script run by CI to always use the latest
secret instead of a fixed version.
BUG=None
TEST=sh push_to_github.sh
Change-Id: I7eff1a8b385b5cd48206ef54aad65151dfbbc961
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3751430
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
This Allows Luci builders to cache cargo home between builds. So we
do not have to download so many third party crates with each build.
CARGO_HOME is specifically intended to be cached in CI systems.
BUG=b:233230027
TEST=CROSVM_CONTAINER_CACHE=/tmp/test ./tools/dev_container --clean
cargo build
Change-Id: I11580c5ed3151519ece4a651cb22d059c7c3eb87
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3739368
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Builders are already scoped to the crosvm.ci/try buckets, so there is
no need for the prefix.
BUG=None
TEST=lucicfg validate main.star
Change-Id: I997442e12c14d35e52b1a2c5bf145f0dc5bfd8f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3749938
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Similar to the one we added to kokoro, run tests with --crosvm-direct.
BUG=b:238234098
TEST=recipe tests included
Change-Id: I2b03ca02fbfb577fd5cebf346eec468ebd625626
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3749937
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
The format string wasn't actually formatted, so it just printed out the
literal "{shorthand}" string in the error message.
BUG=None
TEST=tools/run_tests --target=host --build-target=bogus
Change-Id: Idad47064db3112a37df3a630b92a4a4da8da82de
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3750069
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
mdbook apparently does not support this syntax and just includes the
text in the section title.
BUG=None
TEST=mdbook build
Change-Id: I3dc4ae25e392b1260df59889926eba2044c4adc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3749605
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Present a generic shared memory region API to virtio devices, and take
care of pci transport specific parts in the core VirtioPciDevice code.
This will make it easier to share the same device implementation across
different virtio transports (i.e. vhost-user and vvu).
BUG=b:201745804
TEST=builds
Change-Id: Ic08ab3de0440f18aeaf9e946dc83c7565cd32eda
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3716341
Commit-Queue: David Stevens <stevensd@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Send rx vq notification immediately after copying data out of the
descriptors, rather than later on when the data is actually processed.
BUG=b:201745804
TEST=launch sibling VM on manatee
Change-Id: I387a1573bde0157b1ab6f585fd6bb2a311448f7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3716348
Commit-Queue: David Stevens <stevensd@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Make Listener type depend on Endpoint, instead of Endpoint type
depending on Listener. This will allow Endpoints to be used for the
slave_req_fd.
BUG=b:201745804
TEST=compiles
Change-Id: I1a0732bf7477a4e768f348f78e352a3b53607633
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3716342
Commit-Queue: David Stevens <stevensd@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Use anyhow context consistently rather than logging with error!()
inside the helper functions.
BUG=None
TEST=Run crosvm twice with the same VVU socket name
Change-Id: Idadd4a65f5ce6188e9623b3311842e2f90eb4916
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3739586
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
CrOS checkouts are experimenting with using git worktree, where
the path to the hook directory is not .git/hooks. So ask git
where the hooks are stored instead.
BUG=b:236645893
TEST=./tools/cl upload in a worktree checkout
Change-Id: Ib353da0aea5d27ce29d1c082268a326adb429d23
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3739373
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Clock now has a single now() function that returns a std::time::Instant
rather than wrapping an Instant itself.
FakeClock provides the same now() API, except the Instant it reports is
only advanced when test code calls add_ns(). FakeClock continues to
provide the add_event() and add_ns() APIs used by tests.
The only functional difference is that the epoch used by FakeClock is
now whatever moment in (real) time it is created, rather than a fixed
timestamp, but this should not change the results of the tests. The only
way to observe the contents of an Instant is by comparing it to other
Instants, which should all be derived from the Clock/FakeClock now()
API.
BUG=None
TEST=cargo test -p base -- --test-threads=1
TEST=cargo test -p devices
Change-Id: I9a0ed8d252f213d85dba3dfbbcd1182e2db981f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3736922
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>