KVM, pkeys: introduce pkru_mask to cache conditions
authorHuaitong Han <huaitong.han@intel.com>
Tue, 22 Mar 2016 08:51:19 +0000 (16:51 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 22 Mar 2016 15:21:06 +0000 (16:21 +0100)
commit2d344105f57ca77fc9c5d4377f65d1082f71ac4b
treeb1455c8e0ee021c59d7a702f1828a69dec42030b
parent1be0e61c1f255faaeab04a390e00c8b9b9042870
KVM, pkeys: introduce pkru_mask to cache conditions

PKEYS defines a new status bit in the PFEC. PFEC.PK (bit 5), if some
conditions is true, the fault is considered as a PKU violation.
pkru_mask indicates if we need to check PKRU.ADi and PKRU.WDi, and
does cache some conditions for permission_fault.

[ Huaitong: Xiao helps to modify many sections. ]

Signed-off-by: Huaitong Han <huaitong.han@intel.com>
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c