KVM: VMX: Set IGMT bit in EPT entry
authorSheng Yang <sheng@linux.intel.com>
Thu, 6 Aug 2009 17:39:56 +0000 (14:39 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:17:14 +0000 (20:17 -0700)
commit66b7e6fe99e9486f4a61acfcfd32f6a7094c9cd0
tree31f3c60edb4fc8390bea8e0e122523fedccc575b
parent6bbd18645e02de44d024e738bb1469ef0977f7f6
KVM: VMX: Set IGMT bit in EPT entry

(cherry picked from commit 928d4bf747e9c290b690ff515d8f81e8ee226d97)

There is a potential issue that, when guest using pagetable without vmexit when
EPT enabled, guest would use PAT/PCD/PWT bits to index PAT msr for it's memory,
which would be inconsistent with host side and would cause host MCE due to
inconsistent cache attribute.

The patch set IGMT bit in EPT entry to ignore guest PAT and use WB as default
memory type to protect host (notice that all memory mapped by KVM should be WB).

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/vmx.c
arch/x86/kvm/vmx.h