Enable SVE when available in AVF
Bug: 376260018
Test: /apex/com.android.virt/bin/vm run-microdroid --cpu-topology
one_cpu|match_host, connect to VM, cat proc/cpuinfo
Change-Id: Ief96181d68917a6541a1f02b0a4c833ecf9b9275
diff --git a/android/virtmgr/src/crosvm.rs b/android/virtmgr/src/crosvm.rs
index 096d3b5..b3825eb 100644
--- a/android/virtmgr/src/crosvm.rs
+++ b/android/virtmgr/src/crosvm.rs
@@ -1110,7 +1110,7 @@
command.arg("--mem").arg(memory_mib.to_string());
if let Some(cpus) = config.cpus {
- command.arg("--cpus").arg(cpus.to_string());
+ command.arg("--cpus").arg(cpus.to_string() + ",sve=[auto=true]");
}
if config.host_cpu_topology {
@@ -1121,8 +1121,9 @@
command.arg("--virt-cpufreq");
}
}
+ command.arg("--cpus").arg("sve=[auto=true]");
} else if let Some(cpus) = get_num_cpus() {
- command.arg("--cpus").arg(cpus.to_string());
+ command.arg("--cpus").arg(cpus.to_string() + ",sve=[auto=true]");
} else {
bail!("Could not determine the number of CPUs in the system");
}