Commit 2b556e8f authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Stefan Bader

KVM: x86: svm: report MSR_IA32_MCG_EXT_CTL as unsupported

BugLink: https://bugs.launchpad.net/bugs/1818813

[ Upstream commit e87555e5 ]

AMD doesn't seem to implement MSR_IA32_MCG_EXT_CTL and svm code in kvm
knows nothing about it, however, this MSR is among emulated_msrs and
thus returned with KVM_GET_MSR_INDEX_LIST. The consequent KVM_GET_MSRS,
of course, fails.

Report the MSR as unsupported to not confuse userspace.
Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent b49896eb
...@@ -4227,6 +4227,13 @@ static bool svm_cpu_has_accelerated_tpr(void) ...@@ -4227,6 +4227,13 @@ static bool svm_cpu_has_accelerated_tpr(void)
static bool svm_has_emulated_msr(int index) static bool svm_has_emulated_msr(int index)
{ {
switch (index) {
case MSR_IA32_MCG_EXT_CTL:
return false;
default:
break;
}
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment