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>
Mon, 11 May 2015 15:17:23 +0000 (17:17 +0200)
commit7cbeed9bce7580479bb97457dad220cb3594b875
treeb38bc1552670fc368b60fa5788ae3e66f23316eb
parent17d489019c5249d059768184c80e9b2b0269b81e
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>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.h
arch/x86/kvm/paging_tmpl.h