KVM: MMU: fix smap permission check
authorXiao Guangrong <guangrong.xiao@linux.intel.com>
Thu, 7 May 2015 08:20:15 +0000 (16:20 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 8 May 2015 08:51:47 +0000 (10:51 +0200)
commitceee7df749da03fa17ab5dc7d06dffb4980a32db
tree1a909678834a1a1757f47658b2eaaffd4adb329a
parenta4cca3b419a5081788bb7559023159e3147f66f0
KVM: MMU: fix smap permission check

Current permission check assumes that RSVD bit in PFEC is always zero,
however, it is not true since MMIO #PF will use it to quickly identify
MMIO access

Fix it by clearing the bit if walking guest page table is needed

Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.h
arch/x86/kvm/paging_tmpl.h