]>
Commit | Line | Data |
---|---|---|
8713734e TL |
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Eduardo Habkost <ehabkost@redhat.com> | |
3 | Date: Mon, 17 Dec 2018 22:34:18 -0200 | |
4 | Subject: [PATCH] kvm: x86: Add AMD's EX_CFG to the list of ignored MSRs | |
5 | ||
6 | Some guests OSes (including Windows 10) write to MSR 0xc001102c | |
7 | on some cases (possibly while trying to apply a CPU errata). | |
8 | Make KVM ignore reads and writes to that MSR, so the guest won't | |
9 | crash. | |
10 | ||
11 | The MSR is documented as "Execution Unit Configuration (EX_CFG)", | |
12 | at AMD's "BIOS and Kernel Developer's Guide (BKDG) for AMD Family | |
13 | 15h Models 00h-0Fh Processors". | |
14 | ||
15 | Cc: stable@vger.kernel.org | |
16 | Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> | |
17 | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | |
18 | Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |
19 | --- | |
20 | arch/x86/include/asm/msr-index.h | 1 + | |
21 | arch/x86/kvm/x86.c | 2 ++ | |
22 | 2 files changed, 3 insertions(+) | |
23 | ||
24 | diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h | |
a599f53d | 25 | index 7ca92f9b5eae..4eb78a908544 100644 |
8713734e TL |
26 | --- a/arch/x86/include/asm/msr-index.h |
27 | +++ b/arch/x86/include/asm/msr-index.h | |
a599f53d | 28 | @@ -382,6 +382,7 @@ |
8713734e TL |
29 | #define MSR_F15H_NB_PERF_CTR 0xc0010241 |
30 | #define MSR_F15H_PTSC 0xc0010280 | |
31 | #define MSR_F15H_IC_CFG 0xc0011021 | |
32 | +#define MSR_F15H_EX_CFG 0xc001102c | |
33 | ||
34 | /* Fam 10h MSRs */ | |
35 | #define MSR_FAM10H_MMIO_CONF_BASE 0xc0010058 | |
36 | diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c | |
a599f53d | 37 | index ac17f53812af..1154795459de 100644 |
8713734e TL |
38 | --- a/arch/x86/kvm/x86.c |
39 | +++ b/arch/x86/kvm/x86.c | |
81801c56 | 40 | @@ -2240,6 +2240,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) |
8713734e TL |
41 | case MSR_AMD64_PATCH_LOADER: |
42 | case MSR_AMD64_BU_CFG2: | |
43 | case MSR_AMD64_DC_CFG: | |
44 | + case MSR_F15H_EX_CFG: | |
45 | break; | |
46 | ||
47 | case MSR_IA32_UCODE_REV: | |
81801c56 | 48 | @@ -2528,6 +2529,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) |
8713734e TL |
49 | case MSR_AMD64_BU_CFG2: |
50 | case MSR_IA32_PERF_CTL: | |
51 | case MSR_AMD64_DC_CFG: | |
52 | + case MSR_F15H_EX_CFG: | |
53 | msr_info->data = 0; | |
54 | break; | |
81801c56 | 55 | case MSR_K7_EVNTSEL0 ... MSR_K7_EVNTSEL3: |