* 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
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
jail/seccomp/gen_android.sh:
Path update because the "seccomp" dir was moved to "jail/seccomp".
jail/seccomp/x86_64/gpu_common.policy:
Modified policy to avoid duplicate syscall error. Upstream isn't
seeing the same issue because they precompile the policies and
minijail has a bug where duplicates are allowed for precompiled
policies but not runtime-compiled policies (http://b/268567700).
Bug: 268120263
Test: TH, etc
Change-Id: If0821bb43c9972da8353d345500b099d45d80fbe
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
Some tests are being removed. Notes on each below.
* aarch64: has tests, but not mentioned in cargo.out, likely because we aren't cross compiling
* anti_tamper: no tests
* bit_field: no tests
* broker_ipc: no tests
* common/balloon_control: no tests
* common/sync: no tests
* crosvm_control: no tests
* gpu_display: tests guarded by unused feature flag
* kvm_sys: no tests (in src/lib.rs, there are tests in basic.rs, but that has a separate target)
* libcras_stub: no tests
* linux_input_sys: no tests
* metrics: no tests
* net_sys: no tests
* power_monitor: no tests
* protos: no tests
* system_api_stub: no tests
* tracing: no tests
* usb_sys: no tests
* vfio_sys: no tests
* virtio_sys: no tests
I spot checked a few to see if there were relevant changes in the merge
(e.g. if the tests got deleted) and didn't find any (e.g. libcras_stub
has never had code, let alone tests).
Test: virtualization tests on CF
Bug: 243039383
Change-Id: I653b4f7669c18560663f3d62dcce64cce8276c94
Due to a cargo2android bug and various tool
changes, these were not included sometimes.
In two cases (serde_keyvalue_derive and arg_helpers),
we don't have the required dependencies for these
tests setup, b/c the component is a rust_proc_macro.
In the case of rutabaga_gfx, no change is made here
because it does not compile with the in-tree cargo
install.
Bug: 242733327
Test: build only
Change-Id: Ib0a1f80b62286cd5e77f7ff116f839ace34ebc81
Restore to clean output state.
all2android.sh should not change the ToT build files. It's unclear
currently why the tests were generated in some cases. The bug is
filed to make sure we generate all tests and run them, though
for minimal merges, we need to keep this delta at zero.
Bug: 242733327
Test: n/a
Change-Id: Ic9e295f19e7055116c0495361df358ee48520cf2
* aosp/upstream-main: (44 commits)
Reformat imports with tools/fmt --nightly
main: print parsing errors to stderr
vm_control: use HotplugCommand for hotplug devices
devices: pci: impl pci root worker
config: convert --file-backed-mapping to serde_keyvalue
Roll recipe dependencies (trivial).
media: ffmpeg: Free AvPacket through av_free_packet.
Roll recipe dependencies (trivial).
Roll recipe dependencies (trivial).
Roll recipe dependencies (trivial).
Roll recipe dependencies (trivial).
x86_64: configure MSRs needed by intel_pstate in initramfs
Roll recipe dependencies (trivial).
Roll recipe dependencies (trivial).
x86_64: add new option enable-hwp to expose HWP feature to guests
media: ffmpeg: add pixel format wrapper and iterator
virtio: video: decoder: ffmpeg: use zero-copy for input buffers
Revert "crosvm: Embed seccomp filters into binary"
devices: vhost: user: snd:: Implement VVU snd
audio: Support null backend for Vhost User Snd
...
Bug: 241784778
Test: m && TH
Test: launch_cvd
Change-Id: I17fbe1468ad4d539fc716e34d4b408431436cb70
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
This uses a combination of cargo2android.py and manual changes
to enable the latest crosvm build (parent commit) to build via
Test: m crosvm.experimental (but need to pin external/minijail to aosp
master first)
Bug: b/146066070
Change-Id: I82095f31ddc683c556eb5fb04e6e072f3e648eaf