summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2020-01-09 17:42:16 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-05 16:43:48 +0100
commit487113220d0b5ac4763accf2ba5a552f5e44cbd3 (patch)
tree665917dd4e6ae2583443ec5e25a9e97ff38e7bd1 /virt
parent4aa42ab64edd76af94f1cb32d00fafd19741ff94 (diff)
KVM: SVM: Override default MMIO mask if memory encryption is enabled
commit 52918ed5fcf05d97d257f4131e19479da18f5d16 upstream. The KVM MMIO support uses bit 51 as the reserved bit to cause nested page faults when a guest performs MMIO. The AMD memory encryption support uses a CPUID function to define the encryption bit position. Given this, it is possible that these bits can conflict. Use svm_hardware_setup() to override the MMIO mask if memory encryption support is enabled. Various checks are performed to ensure that the mask is properly defined and rsvd_bits() is used to generate the new mask (as was done prior to the change that necessitated this patch). Fixes: 28a1f3ac1d0c ("kvm: x86: Set highest physical address bits in non-present/reserved SPTEs") Suggested-by: Sean Christopherson <sean.j.christopherson@intel.com> Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions