disable virtio-balloon by default for VirtualMachineRawConfig
So that we don't need to add an LL-NDK API to disable it.
To reduce the impact of this change, I've kept the balloon enabled for
rialto and Trusty even though it is likely not needed.
Test: TH
Bug: 369588412
Change-Id: If22280957d735bd40e86b4d43869a4b70a233cd4
diff --git a/android/virtmgr/src/aidl.rs b/android/virtmgr/src/aidl.rs
index 82a5573..79c7d81 100644
--- a/android/virtmgr/src/aidl.rs
+++ b/android/virtmgr/src/aidl.rs
@@ -787,7 +787,7 @@
boost_uclamp: config.boostUclamp,
gpu_config,
audio_config,
- no_balloon: config.noBalloon,
+ balloon: config.balloon,
usb_config,
dump_dt_fd,
};
diff --git a/android/virtmgr/src/crosvm.rs b/android/virtmgr/src/crosvm.rs
index a385b82..2bfa4e1 100644
--- a/android/virtmgr/src/crosvm.rs
+++ b/android/virtmgr/src/crosvm.rs
@@ -133,7 +133,7 @@
pub boost_uclamp: bool,
pub gpu_config: Option<GpuConfig>,
pub audio_config: Option<AudioConfig>,
- pub no_balloon: bool,
+ pub balloon: bool,
pub usb_config: UsbConfig,
pub dump_dt_fd: Option<File>,
}
@@ -975,8 +975,7 @@
.arg("--cid")
.arg(config.cid.to_string());
- if system_properties::read_bool("hypervisor.memory_reclaim.supported", false)?
- && !config.no_balloon
+ if system_properties::read_bool("hypervisor.memory_reclaim.supported", false)? && config.balloon
{
command.arg("--balloon-page-reporting");
} else {