Commit e87555e5 authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Paolo Bonzini
Browse files

KVM: x86: svm: report MSR_IA32_MCG_EXT_CTL as unsupported



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>
parent ed8e4812
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -5840,6 +5840,13 @@ static bool svm_cpu_has_accelerated_tpr(void)

static bool svm_has_emulated_msr(int index)
{
	switch (index) {
	case MSR_IA32_MCG_EXT_CTL:
		return false;
	default:
		break;
	}

	return true;
}