[RHEL7,COMMIT] ms/kvm: x86: Add AMD's EX_CFG to the list of ignored MSRs

Submitted by Konstantin Khorenko on June 14, 2019, 4:20 p.m.


Message ID 201906141620.x5EGK4jx009538@finist-ce7.sw.ru
State New
Series "kvm: x86: Add AMD's EX_CFG to the list of ignored MSRs"
Headers show

Commit Message

Konstantin Khorenko June 14, 2019, 4:20 p.m.
The commit is pushed to "branch-rh7-3.10.0-957.12.2.vz7.96.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.12.2.vz7.96.15
commit 2a1690b4e2adf60f8d9986dda0b3ce291de6ed15
Author: Eduardo Habkost <ehabkost@redhat.com>
Date:   Fri Jun 14 19:20:04 2019 +0300

    ms/kvm: x86: Add AMD's EX_CFG to the list of ignored MSRs
    Some guests OSes (including Windows 10) write to MSR 0xc001102c
    on some cases (possibly while trying to apply a CPU errata).
    Make KVM ignore reads and writes to that MSR, so the guest won't
    The MSR is documented as "Execution Unit Configuration (EX_CFG)",
    at AMD's "BIOS and Kernel Developer's Guide (BKDG) for AMD Family
    15h Models 00h-0Fh Processors".
    Cc: stable@vger.kernel.org
    Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    ms commit: 0e1b869fff60 ("kvm: x86: Add AMD's EX_CFG to the list of ignored
    Cherry-picked-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
    Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
 arch/x86/include/asm/msr-index.h | 1 +
 arch/x86/kvm/x86.c               | 2 ++
 2 files changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index c7337374678f..ef643f32ae9a 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -374,6 +374,7 @@ 
 #define MSR_F15H_PTSC			0xc0010280
 #define MSR_F15H_IC_CFG			0xc0011021
 #define MSR_F15H_IC_CFG_DIS_IND		BIT_ULL(14)
+#define MSR_F15H_EX_CFG			0xc001102c
 /* Fam 10h MSRs */
 #define MSR_FAM10H_MMIO_CONF_BASE	0xc0010058
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index b855f03477f4..fa5ba1994c46 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2122,6 +2122,7 @@  int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
 	case MSR_AMD64_BU_CFG2:
 	case MSR_AMD64_DC_CFG:
+	case MSR_F15H_EX_CFG:
 	case MSR_EFER:
@@ -2391,6 +2392,7 @@  int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
 	case MSR_AMD64_BU_CFG2:
 	case MSR_IA32_PERF_CTL:
 	case MSR_AMD64_DC_CFG:
+	case MSR_F15H_EX_CFG:
 		msr_info->data = 0;