]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
KVM: X86: #GP when guest attempts to write MCi_STATUS register w/o 0
authorWanpeng Li <wanpeng.li@hotmail.com>
Thu, 19 Oct 2017 13:47:56 +0000 (06:47 -0700)
committerRadim Krčmář <rkrcmar@redhat.com>
Fri, 20 Oct 2017 16:21:15 +0000 (18:21 +0200)
commit9ffd986c6e4e59c11857cbc78e4217e9569f3725
tree43c3fd682b35dc3092c45f149da484562690622f
parent61f1dd9099aba56b7e6e3c3c4b9ad13199bba06e
KVM: X86: #GP when guest attempts to write MCi_STATUS register w/o 0

Both Intel SDM and AMD APM mentioned that MCi_STATUS, when the register is
implemented, this register can be cleared by explicitly writing 0s to this
register. Writing 1s to this register will cause a general-protection
exception.

The mce is emulated in qemu, so just the guest attempts to write 1 to this
register should cause a #GP, this patch does it.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Jim Mattson <jmattson@google.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/x86.c