* All non-crosvm users of crosvm_defaults are gone, so we don't need a
separate internal defaults module.
* Edition is set automatically by cargo_embargo.
* authfs only needs visibility on libfuse_rust, which is done via
cargo_embargo.
Bug: 269356487
Test: m
Change-Id: I3091e76e86435021bc3b1c5deb77a5b5d514ca32
https://r.android.com/3484205 changed the Android.bp files directly to
fix an issue with setting apex_available on test modules. This commit
refixes the issue in a different way that works better with
cargo_embargo.
Instead of setting apex_available via the rust_defaults, which is used
for every module type, we use cargo_embargo's apex_available config
option, which only applies to non-test modules.
Bug: 269356487
Test: m
Change-Id: Ib7a10e23342ead86553232a7014747b46ffefaf2
Soong was accidentally allowing a corner case where modules that
were not supposed to be available to the platform (due to
apex_available being set to an apex and not including
"//apex_available:platform") were being made available to the
platform as long as no apex modules depended on them. Split
crosvm_defaults into crosvm_defaults and crosvm_test_defaults,
where only crosvm_defaults gets apex_available: ["com.android.virt"],
and switch all the rust_test modules to use crosvm_test_defaults.
Bug: 394664568
Test: compare out/soong/installs-${TARGET_PRODUCT}.mk
Change-Id: I7ce4dabbcf1600cf44833b7883977e27a4ad7561
Create a new patch file for power_monitor
Fix rutabaga_gfx and disk Android.bp.patch files.
Test: m
Bug: 335312770
Change-Id: Ie08db8cabf55b38976be0343a8a41b7111a8d0f1
Had to update the rust version to compile the new nix version.
The metrics protos have been deleted upstream, so those `out` files are
deleted (and we don't need to `sed` them in the script).
Added default_team for `hypervisor` to satisify a lint error, will add
it everywhere else later.
* aosp/upstream-main: (86 commits)
Roll recipe dependencies (trivial).
devices: vhost-user: fix test flake
Roll recipe dependencies (trivial).
Cargo.lock: switch to tokio 1.29.1
Roll recipe dependencies (trivial).
Roll recipe dependencies (trivial).
Roll recipe dependencies (trivial).
cros_async: Tokio IoSource for windows
cros_async: Add AsyncFd to Tokio linux implementation
cros_async: Blocking tokio executor for linux
devices: Fix nested executor invocation in async virtio-console
cros_async: Move `concurrency` to Overlapped enum
Roll recipe dependencies (trivial).
Create a minimal virtualization and hypervisor integration test.
gpu_display: add max_num_displays to GpuParameters.
Roll recipe dependencies (trivial).
Roll recipe dependencies (trivial).
Roll recipe dependencies (trivial).
Refactor android display backend
e2e_tests: wait for restore to complete before sending commands
...
Bug: 332584046
Test: TH
Change-Id: I25dd0124d719a59c312ba31f060c1b37f1d2a1b6
Rerun the tool to update the comments in the bp file. Also re-generate
the patch file for rutabaga_gfx. Below were what I did.
0. sync to ToT
1. delete rutabaga_gfx/patches/Android.bp.patch
2. stash rutabaga_gfx/Android.bp to somewhere else
3. run ./android-merge-2-cargo-embargo.sh (without the step 1)
4. create a temp commit
5. re-apply #2 and manually update the comment
6. git diff > rutabaga_gfx_patches/Android.bp.patch
7. amend the commit #4 with the changes in #5 and #6.
Bug: N/A
Test: N/A
Change-Id: Ieb9c8c6a811e9fd09b52910f504c454eaec9b80f
Bug: 268061413
Test: TEST_MAPPING
* aosp/upstream-main:
Roll recipe dependencies (trivial).
swap: refine swap status response
base: fix mmap doc test on Windows.
Roll recipe dependencies (trivial).
tools: make scripts windows/downstream friendly
Roll recipe dependencies (trivial).
Roll recipe dependencies (trivial).
crosvm: unix: add bind_mounts to SandboxConfig
crosvm: unix: refactor the interface of jail_helpers
Roll recipe dependencies (trivial).
New nextest based test runner
Roll recipe dependencies (trivial).
base: Add custom_serde lib for custom serializers
Roll recipe dependencies (trivial).
Roll recipe dependencies (trivial).
devices: use base::error instead of eprintln
e2e_tests: suspend_resume: consume exec_command_async response
crosvm: Partially convert DataInit to zerocopy (1/n)
Roll recipe dependencies (trivial).
Change-Id: I6339fed9f53069fba52015987657c6c5167386a1
The scripts need to be updated to use the new tool. That will come in a
later CL.
Summary of Android.bp changes:
* Deleted apex_available fields.
- The default is "//apex_available:platform", so no change in
behavior.
* Deleted "// has rustc warnings" comments.
- Will re-add support for reporting warnings later, in a different
form.
* Added cargo_pkg_version always.
- New tool is better at detecting the pkg version. No behavior
change expected.
* Removed "libprebuilts" deps.
- This lib is used to download prebuilt binaries. Including it
before was a mistake.
* Deleted auto-generated "rust_defaults".
- They made the Android.bp files shorter, but more difficult to read
and added complexity to the tool.
* More accurate "crate_name" in "rust_test" modules.
* disk/patches/Android.bp.patch is a bit smaller.
- "qcow" and "android-sparse" features flags are enabled via the
root package, so the tool infers more of this correctly, including
enabling the features in the unit tests (!!).
* third_party/vmm_vhost/Android.bp sets the "default" feature flag.
- "default" just implies the existing flags. No behavior change.
Bug: 261486161
Test: TH
Change-Id: Ie2d211046ff228b44abf362afed008b4a64d6245
This undoes some of the changes made in https://r.android.com/2138858.
Rust modules now are apex_available by default, but we don't want that
for crosvm's crates.
Test: ./all2android.sh
Bug: 238440998
Change-Id: I7226d929a10ffd6a48fa5413c7710ef0eaf2185c
The "virtio-iommu" flag was dropped because of a cmdline arg
refactoring. I'm reintroducing it in a separate commit.
The many "apex_available" changes are a result of cargo2android's
defaults changing in https://r.android.com/2128853.
Had to enable a feature flag for serde_keyvalue now that more of the
library is used in android-enabled code paths.
Added the "no_presubmit" flag to the root crate, which controls whether
the tests are considered unit tests. Necessary because some of the tests
now check if "/dev/kvm" exists (and it doesn't in TH host tests).
* aosp/upstream-main: (125 commits)
crosvm: implement lock-guest-memory feature.
hypervisor: enable TSC cpuid leaf synthesis for haxm.
x86_64: add TSC leaf synthesis.
virtio: Enable build and tests for some virtio mods
ffmpeg: specify supported resolution range for input formats
vcpu: refactor scheduler config into a new function
tools: Set host as default target
seccomp: add arm policy for Goldfish battery
hypervisor: update CpuIdEntry uses for haxm and whpx
crosvm: rename DevicesCommand to DeviceCommand
vm_control: use Protection in mapping requests
tools: Make run_tests python3.8 compatible
base: Upstream stream_channel
base: add nanoseconds to log timestamps.
devices: virtio: snd: Support num_{output,input}_devices
crosvm: Add documentation for crosvm_control
devices: virtio: console: use ReadNotifier trait for polling
devices: virtio: console: add async console device shared with vhost-user
base: Add safety comments in net.rs
examples/baremetal: exit instead of hanging
...
Test: TODO
Bug: 236873276
Change-Id: I2bd8fe8580cf2bdee1dbe0d20594e4090afc4125
There have been some changes to cargo2android.py which affect the
output. This will make the following merge from upstream cleaner.
Some host tests were failing which for reasons unclear apparently
weren't being run previously, so I had to disable them from presubmit.
Test: atest VirtualizationTestCases
Change-Id: Iec700d1c7c7746bd5ac9beca329eb493c605e2ae
... and update Android.bp to update Crosvm for Cuttlefish to pull
in multi-display virtio gpu support.
Bug: b/189933900
Test: launch_cvd
Test: launch_cvd --gpu_mode=gfxstream
Change-Id: I8af7120a22ebd35739805333536f95b94c4795f7
Notable changes:
- fuse crate was introduced.
* Path of depended crates (base and data_model) are edited to refer
to local directories.
Bug: 174797066
Test: lunch aosp_cf_x86_phone-eng; m
Test: lunch aosp_cf_x86_64_phone-eng; m
Change-Id: I9b6c6f8ab47507f0c0555af9c4ef905fcbb30c18
Merge the version of upstream-master just before the dependency on
downcast_rs, which hasn't been imported into AOSP yet. This merges
to ~Oct 1.
Change-Id: If89c81d17acb255556852d390fa2bf1dd10ba77d
Exclude graphics and audio features for device builds.
Don't try to build libx86_64_rust for Arm targets.
Bug: 158290206
Test: atest -c -m --include-subdirs .
Change-Id: I2a71245466eee54f25b8c4dc27693f0b4ad6c0bf
* Problems to solve:
* Running cargo2android.py under crosvm does not
generate .bp files in some subdirectories because
the workspace does not include them.
* Even when .bp files are generated, rust test modules
are not generated because cargo test does not run
tests in subdirectories.
* Solution: run cargo2android.py in subdirectories:
cargo2android.py --run --tests --dependencies
--global_defaults=crosvm_defaults --add_workspace
* If a directory contains subdirectory, run cargo2android.py
with additional flag --no-subdir to avoid wrong changes to
the subdirectory .bp files.
* When cargo2android.py is running with --add_workspace in a directory,
the Cargo.toml file is changed temporarily and cargo or
cargo2android.py should not be run at the same time in any parent
directory.
* Upgrade cros_async/Cargo.toml to use paste-1.0.0.
* Result: In 40 subdirectories, 14 need manual changes in Android.bp
and/or have commented out tests in TEST_MAPPING.
The commented out tests passed locally but failed in TH sandbox.
Bug: 161716839
Test: atest -c --include-subdirs external/crosvm
Change-Id: Ic14d461cd1b47e5cb38511cb6204a5e655092d2c
Adds a rust_defaults module that ensures that our crosvm modules are
only built on supported platforms.
Bug: 144553403
Bug: 140938178
Test: m -j crosvm.experimental
Test: modules disabled for unsupported platforms.
Change-Id: I0baec2b4f8c6839c858678270c1c6d527ba4716d
* Use a script cargo2android.py to generate Android.bp files
from cargo build -v output. Cargo.toml and some build.rs
files were temporarily changed to pass cargo build.
* Missing output are copied from old Android.bp file:
* Rerun cargo2android.py in:
./tempfile ./gpu_display ./gpu_buffer ./gpu_renderer
* Native code modules are not handled by cargo2android.py:
* Copy modules from old Android.bp to ./gpu_display
* Copy attributes of crosvm from old Android.bp to ./Android.bp
* Copy libhost_cpuid to x86_64/Android.bp
Test: mm in crosvm and other rust directories.
Change-Id: I987dd881d088d950e073dc127d19240b6abc57f2