mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: add nested option to CPU config
Add an option in the CLI to enable nested support. Adding an option --cpu nested=on|off to the CPU argument to enable nested support for Microsoft Hypervisor. By default it is enabled for both KVM and MSHV. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
0d5c914bdd
commit
f10d0bb33d
@@ -598,7 +598,8 @@ impl CpusConfig {
|
||||
.add("kvm_hyperv")
|
||||
.add("max_phys_bits")
|
||||
.add("affinity")
|
||||
.add("features");
|
||||
.add("features")
|
||||
.add("nested");
|
||||
parser.parse(cpus).map_err(Error::ParseCpus)?;
|
||||
|
||||
let boot_vcpus: u32 = parser
|
||||
@@ -653,6 +654,11 @@ impl CpusConfig {
|
||||
}?;
|
||||
}
|
||||
|
||||
let nested = parser
|
||||
.convert::<Toggle>("nested")
|
||||
.map_err(Error::ParseCpus)?
|
||||
.is_none_or(|toggle| toggle.0);
|
||||
|
||||
Ok(CpusConfig {
|
||||
boot_vcpus,
|
||||
max_vcpus,
|
||||
@@ -661,6 +667,7 @@ impl CpusConfig {
|
||||
max_phys_bits,
|
||||
affinity,
|
||||
features,
|
||||
nested,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user