1 From 455db39fce93411afb01cd33f4eb43942f4e2316 Mon Sep 17 00:00:00 2001
2 From: Vitaly Kuznetsov <vkuznets@redhat.com>
3 Date: Wed, 19 Dec 2018 12:06:13 +0100
4 Subject: KVM: x86: svm: report MSR_IA32_MCG_EXT_CTL as unsupported
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 [ Upstream commit e87555e550cef4941579cd879759a7c0dee24e68 ]
11 AMD doesn't seem to implement MSR_IA32_MCG_EXT_CTL and svm code in kvm
12 knows nothing about it, however, this MSR is among emulated_msrs and
13 thus returned with KVM_GET_MSR_INDEX_LIST. The consequent KVM_GET_MSRS,
16 Report the MSR as unsupported to not confuse userspace.
18 Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
19 Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
20 Signed-off-by: Sasha Levin <sashal@kernel.org>
22 arch/x86/kvm/svm.c | 7 +++++++
23 1 file changed, 7 insertions(+)
25 diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
26 index 4dc79d139810..656ac12f5439 100644
27 --- a/arch/x86/kvm/svm.c
28 +++ b/arch/x86/kvm/svm.c
29 @@ -5319,6 +5319,13 @@ static bool svm_cpu_has_accelerated_tpr(void)
31 static bool svm_has_emulated_msr(int index)
34 + case MSR_IA32_MCG_EXT_CTL: