Patch 1 adjusts the execution flow of CPUID instruction emulation, which
checks the leaf number first per CPUID specification.
Patch 2 moves physical address width updating to where we check the virtual
address width in function kvm_update_cpuid() since they two use the same
cpuid leaf, which makes it more reasonable and no functional change.
Xiaoyao Li (2):
KVM: CPUID: Check limit first when emulating CPUID instruction
KVM: CPUID: Put maxphyaddr updating together with virtual address
width checking
arch/x86/kvm/cpuid.c | 56 +++++++++++++++++++++++++-------------------
1 file changed, 32 insertions(+), 24 deletions(-)