]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
KVM: x86: trap AMD MSRs for the TSeg base and mask
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Sep 2015 15:33:04 +0000 (17:33 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 21 Sep 2015 05:41:22 +0000 (07:41 +0200)
These have roughly the same purpose as the SMRR, which we do not need
to implement in KVM.  However, Linux accesses MSR_K8_TSEG_ADDR at
boot, which causes problems when running a Xen dom0 under KVM.
Just return 0, meaning that processor protection of SMRAM is not
in effect.

Reported-by: M A Young <m.a.young@durham.ac.uk>
Cc: stable@vger.kernel.org
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/msr-index.h
arch/x86/kvm/x86.c

index c1c0a1c14344c111158ac5f7f30a4fca13650d16..b98b471a3b7e660c35910ec5bde5d3580af3f498 100644 (file)
 /* C1E active bits in int pending message */
 #define K8_INTP_C1E_ACTIVE_MASK                0x18000000
 #define MSR_K8_TSEG_ADDR               0xc0010112
+#define MSR_K8_TSEG_MASK               0xc0010113
 #define K8_MTRRFIXRANGE_DRAM_ENABLE    0x00040000 /* MtrrFixDramEn bit    */
 #define K8_MTRRFIXRANGE_DRAM_MODIFY    0x00080000 /* MtrrFixDramModEn bit */
 #define K8_MTRR_RDMEM_WRMEM_MASK       0x18181818 /* Mask: RdMem|WrMem    */
index 6bbb0dfb99d0a5e222131c9b2f8e0fb38e990cb3..991466bf8dee4ab202f422e64c0d211bb5f439fe 100644 (file)
@@ -2190,6 +2190,8 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
        case MSR_IA32_LASTINTFROMIP:
        case MSR_IA32_LASTINTTOIP:
        case MSR_K8_SYSCFG:
+       case MSR_K8_TSEG_ADDR:
+       case MSR_K8_TSEG_MASK:
        case MSR_K7_HWCR:
        case MSR_VM_HSAVE_PA:
        case MSR_K8_INT_PENDING_MSG: