KVM: allow bit 10 to be cleared in MSR_IA32_MC4_CTL
authorAndre Przywara <andre.przywara@amd.com>
Wed, 24 Mar 2010 16:46:42 +0000 (17:46 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:41:37 +0000 (07:41 -0700)
commit6abddbe74fac81296e4d3cee3ba7327c27a96dde
tree4e7ddafd272199c79435ca8523c9fae0fcddee1b
parent31e104dc1fbd6e72d8d3e07c38bc77437b82d116
KVM: allow bit 10 to be cleared in MSR_IA32_MC4_CTL

(Cherry-picked from commit 114be429c8cd44e57f312af2bbd6734e5a185b0d)

There is a quirk for AMD K8 CPUs in many Linux kernels (see
arch/x86/kernel/cpu/mcheck/mce.c:__mcheck_cpu_apply_quirks()) that
clears bit 10 in that MCE related MSR. KVM can only cope with all
zeros or all ones, so it will inject a #GP into the guest, which
will let it panic.
So lets add a quirk to the quirk and ignore this single cleared bit.
This fixes -cpu kvm64 on all machines and -cpu host on K8 machines
with some guest Linux kernels.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/x86.c