Skip to content

Commit 0e1b869

Browse files
ehabkostbonzini
authored andcommitted
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 crash. 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>
1 parent dcbd3e4 commit 0e1b869

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

arch/x86/include/asm/msr-index.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@
390390
#define MSR_F15H_NB_PERF_CTR 0xc0010241
391391
#define MSR_F15H_PTSC 0xc0010280
392392
#define MSR_F15H_IC_CFG 0xc0011021
393+
#define MSR_F15H_EX_CFG 0xc001102c
393394

394395
/* Fam 10h MSRs */
395396
#define MSR_FAM10H_MMIO_CONF_BASE 0xc0010058

arch/x86/kvm/x86.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2426,6 +2426,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
24262426
case MSR_AMD64_PATCH_LOADER:
24272427
case MSR_AMD64_BU_CFG2:
24282428
case MSR_AMD64_DC_CFG:
2429+
case MSR_F15H_EX_CFG:
24292430
break;
24302431

24312432
case MSR_IA32_UCODE_REV:
@@ -2721,6 +2722,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
27212722
case MSR_AMD64_BU_CFG2:
27222723
case MSR_IA32_PERF_CTL:
27232724
case MSR_AMD64_DC_CFG:
2725+
case MSR_F15H_EX_CFG:
27242726
msr_info->data = 0;
27252727
break;
27262728
case MSR_F15H_PERF_CTL0 ... MSR_F15H_PERF_CTR5:

0 commit comments

Comments
 (0)