mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: cpu: Set CPU physical bits based on user input
If the user specified a maximum physical bits value through the `max_phys_bits` option from `--cpus` parameter, the guest CPUID will be patched accordingly to ensure the guest will find the right amount of physical bits. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
+1
-1
@@ -433,7 +433,7 @@ impl VmmOps for VmOps {
|
||||
}
|
||||
}
|
||||
|
||||
fn physical_bits(max_phys_bits: Option<u8>) -> u8 {
|
||||
pub fn physical_bits(max_phys_bits: Option<u8>) -> u8 {
|
||||
let host_phys_bits = get_host_cpu_phys_bits();
|
||||
cmp::min(host_phys_bits, max_phys_bits.unwrap_or(host_phys_bits))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user