Commit Graph

7 Commits

Author SHA1 Message Date
David Brazdil 4b4c510ffb Start using virtmgr for running VMs
Make the final changes to start running VMs using virtmgr:

  * Have virtualizationservice host the VirtualizationServiceInternal
    AIDL service.

  * Remove memlock rlimit of virtmgr (instead of virtualizationservice)
    via a method on VirtualizationServiceInternal.

  * Have VirtualizationServiceInternal create the VM's temporary folder
    and change its owner to the client's UID. The files keep the same
    virtualizationservice_data_file SELinux label, but are now owned by
    the client's virtmgr instance. To this end, virtualizationservice
    requires CAP_CHOWN.

  * Switch all users to the new vmclient/javalib API for spawning
    virtmgr.

Bug: 245727626
Test: atest -p packages/modules/Virtualization:avf-presubmit
Change-Id: I93b2cadb67a8c125e1a86f9c1ba9cb98336f0cd4
2023-01-05 10:31:00 +00:00
Andrew Walbran b713baa048 Test reading from a VirtIO block device.
Bug: 237250092
Test: atest vmbase_example.integration_test
Change-Id: I42b57d5b07f397becf954ef949c1a2c5c4067b19
2022-12-07 17:18:44 +00:00
Pierre-Clément Tosi 0d1aed03fa vmbase: integration_test: Use Android logger
Use the Android logger instead of env_logger in order for the logs of
vmbase_example to be part of the tests's capture logs (logcat_test*.txt)
as they were previously discarded.

Test: atest vmbase_example.integration_test
Change-Id: I9844c515e5ee54070bcead8670526f01fb8679ff
2022-11-17 17:22:03 +00:00
Victor Hsieh f219cd8fd2 Delete cpu affinity config
Bug: 245746308
Test: TH
Change-Id: I0d74f55b7b41e5d6c38be0705582bf12fc9169d9
2022-09-09 13:46:08 -07:00
Seungjae Yoo 62085c0e65 Send UID and VM identifier to existing atoms
Bug: 236252851
Test: N/A

Change-Id: I5e4db74f9a5cefd071676b9d248e9c5d91c5bfdd
2022-08-22 02:08:34 +00:00
Alan Stokes 0e82b50e23 Move VM callback to vmclient
Instead of having clients directly register a callback with VS,
implement a Rust level callback interface in vmclient. This saves an
extra binder call on each notification, a bunch of boilerplate code,
and allows us to provide a slightly better interface (e.g. we can use
the Rust DeathReason enum, as elsewhere in vmclient, for instantly
better logging).

I also replaced all our usages of <some_interface>::binder::{...} with
direct access to binder::{...}. That makes it clearer what depends on
the interface itself and what is just generic binder code. I realise
this should be a separate change, but I only realised that after doing
bits of both.

Test: composd_cmd test-compile, observe logs (on both success & failure)
Test: atest -b (to make sure all our tests build)
Test: Presubmits
Change-Id: Iceda8d7b8f8008f9d7a2c51106c2794f09bb378e
2022-08-09 17:43:29 +01:00
Andrew Walbran 94bbf2f6d5 Add test to run vmbase example VM.
Bug: 223166344
Test: atest vmbase_example.integration_test
Change-Id: Idef13afb2466a920c1ead9626c81e7a36f6f67c5
2022-05-25 15:00:59 +00:00