mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
arch: vmm: disable nested virtualization if needed
User can now disable nested virtualization for Intel and AMD if configured by the CLI. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
d8360ddc8e
commit
658a7f9175
@@ -659,6 +659,14 @@ impl CpusConfig {
|
||||
.map_err(Error::ParseCpus)?
|
||||
.is_none_or(|toggle| toggle.0);
|
||||
|
||||
// Nested virtualization is always turned on for aarch64 and riscv64
|
||||
// TODO: revisit this when nested support can be turned of on these architectures
|
||||
#[cfg(any(target_arch = "aarch64", target_arch = "riscv64"))]
|
||||
if !nested {
|
||||
return Err(Error::ParseCpus(OptionParserError::InvalidValue(
|
||||
"nested=off is not supported on aarch64 and riscv64 architectures".to_string(),
|
||||
)));
|
||||
}
|
||||
Ok(CpusConfig {
|
||||
boot_vcpus,
|
||||
max_vcpus,
|
||||
|
||||
Reference in New Issue
Block a user