On x86-64, set KVM's supported CPUID as the vCPU's CPUID when recreating a VM+vCPU to deduplicate code for state save/restore tests, and to provide symmetry of sorts with respect to vm_create_with_one_vcpu(). The extra KVM_SET_CPUID2 call is wasteful for Hyper-V, but ultimately is nothing more than an expensive nop, and overriding the vCPU's CPUID with the Hyper-V CPUID information is the only known scenario where a state save/restore test wouldn't need/want the default CPUID. Opportunistically use __weak for the default vm_compute_max_gfn(), it's provided by tools' compiler.h. Signed-off-by: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20220614200707.3315957-2-seanjc@google.com |
||
|---|---|---|
| .. | ||
| aarch64 | ||
| riscv | ||
| s390x | ||
| x86_64 | ||
| guest_modes.h | ||
| kvm_util.h | ||
| kvm_util_base.h | ||
| numaif.h | ||
| perf_test_util.h | ||
| sparsebit.h | ||
| test_util.h | ||
| ucall_common.h | ||