]> git.baikalelectronics.ru Git - kernel.git/commit
KVM, pkeys: expose CPUID/CR4 to guest
authorHuaitong Han <huaitong.han@intel.com>
Tue, 22 Mar 2016 08:51:21 +0000 (16:51 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 22 Mar 2016 15:38:17 +0000 (16:38 +0100)
commit77bbcf0a52866a90c16bfc45f745941367e596e5
tree28a3d76b7d602a2b886356b08097e82d4a7169ed
parenta0097b7672853699eee22c8d813f48c7e262a44b
KVM, pkeys: expose CPUID/CR4 to guest

X86_FEATURE_PKU is referred to as "PKU" in the hardware documentation:
CPUID.7.0.ECX[3]:PKU. X86_FEATURE_OSPKE is software support for pkeys,
enumerated with CPUID.7.0.ECX[4]:OSPKE, and it reflects the setting of
CR4.PKE(bit 22).

This patch disables CPUID:PKU without ept, because pkeys is not yet
implemented for shadow paging.

Signed-off-by: Huaitong Han <huaitong.han@intel.com>
Reviewed-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/cpuid.c
arch/x86/kvm/cpuid.h
arch/x86/kvm/x86.c