vmm: Set a default maximum physical address size

When using PVH for booting (which we use for all firmwares and direct
kernel boot) the Linux kernel does not configure LA57 correctly. As such
we need to limit the address space to the maximum 4-level paging address
space.

If the user knows that their guest image can take advantage of the
5-level addressing and they need it for their workload then they can
increase the physical address space appropriately.

This PR removes the TDX specific handling as the new address space limit
is below the one that that code specified.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-10-01 10:54:27 +01:00
committed by Bo Chen
parent 495e444ca6
commit 83066cf58e
5 changed files with 27 additions and 57 deletions

View File

@@ -117,7 +117,8 @@ impl log::Log for Logger {
}
fn prepare_default_values() -> (String, String, String) {
let default_vcpus = format! {"boot={}", config::DEFAULT_VCPUS};
let default_vcpus =
format! {"boot={},max_phys_bits={}", config::DEFAULT_VCPUS,config::DEFAULT_MAX_PHYS_BITS};
let default_memory = format! {"size={}M", config::DEFAULT_MEMORY_MB};
let default_rng = format! {"src={}", config::DEFAULT_RNG_SOURCE};
@@ -636,7 +637,7 @@ mod unit_tests {
max_vcpus: 1,
topology: None,
kvm_hyperv: false,
max_phys_bits: None,
max_phys_bits: 46,
},
memory: MemoryConfig {
size: 536_870_912,