vmm: remove nested virtualization check for arm64/riscv64

Remove the architecture check that prevented nested virtualization
control on arm64 and riscv64. This allows nested virtualization to
be disabled where supported, particularly when using MSHV.

Note that on arm64 disabling nested virtualization may not fully
disable the capability depending on the underlying platform.
Use of this functionality is left to the user's discretion.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2026-03-12 12:52:16 -07:00
committed by Rob Bradford
parent 2df41986b7
commit 4e7f9595c8

View File

@@ -717,14 +717,6 @@ 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(),
)));
}
let core_scheduling = parser
.convert("core_scheduling")
.map_err(Error::ParseCpus)?