OSDN Git Service

KVM: MMU: fix smap permission check
authorXiao Guangrong <guangrong.xiao@linux.intel.com>
Thu, 7 May 2015 08:20:15 +0000 (16:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Jun 2015 15:20:48 +0000 (08:20 -0700)
commit496862ce1ec797b80c7761f6770a3e225bb79035
tree0731bb6d9078e97a0205157e6e95aeaeb96ddc5f
parentb3aa70cdd11149c696c03ab8fc0fef13c4c07973
KVM: MMU: fix smap permission check

commit 7cbeed9bce7580479bb97457dad220cb3594b875 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/mmu.h
arch/x86/kvm/paging_tmpl.h