aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorYu Zhang <yu.c.zhang@linux.intel.com>2019-02-01 00:09:23 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2019-02-22 19:25:10 +0100
commitde3ccd26fafc707b09792d9b633c8b5b48865315 (patch)
tree0a8d3d19ab24b7accfe02d160445688224fa238d /arch/x86/include
parentkvm: x86: Return LA57 feature based on hardware capability (diff)
downloadlinux-dev-de3ccd26fafc707b09792d9b633c8b5b48865315.tar.xz
linux-dev-de3ccd26fafc707b09792d9b633c8b5b48865315.zip
KVM: MMU: record maximum physical address width in kvm_mmu_extended_role
Previously, commit 7dcd57552008 ("x86/kvm/mmu: check if tdp/shadow MMU reconfiguration is needed") offered some optimization to avoid the unnecessary reconfiguration. Yet one scenario is broken - when cpuid changes VM's maximum physical address width, reconfiguration is needed to reset the reserved bits. Also, the TDP may need to reset its shadow_root_level when this value is changed. To fix this, a new field, maxphyaddr, is introduced in the extended role structure to keep track of the configured guest physical address width. Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/kvm_host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 593e17b7797e..180373360e34 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -299,6 +299,7 @@ union kvm_mmu_extended_role {
unsigned int cr4_smap:1;
unsigned int cr4_smep:1;
unsigned int cr4_la57:1;
+ unsigned int maxphyaddr:6;
};
};