OSDN Git Service

kvm/svm: Setup MCG_CAP on AMD properly
authorBorislav Petkov <bp@suse.de>
Sun, 26 Mar 2017 21:51:24 +0000 (23:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Mar 2018 08:17:48 +0000 (09:17 +0100)
commitb0d7b1af256cedf0cd1af08c32c56279e15b601e
treeccdd3c669ca74faabda100ebb7743c130328e714
parent79a6866647f91c27af165aa1223d305b2c118e44
kvm/svm: Setup MCG_CAP on AMD properly

[ Upstream commit 74f169090b6f36b867c9df0454366dd9af6f62d1 ]

MCG_CAP[63:9] bits are reserved on AMD. However, on an AMD guest, this
MSR returns 0x100010a. More specifically, bit 24 is set, which is simply
wrong. That bit is MCG_SER_P and is present only on Intel. Thus, clean
up the reserved bits in order not to confuse guests.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/svm.c