KVM: Add SMAP support when setting CR4
authorFeng Wu <feng.wu@intel.com>
Tue, 1 Apr 2014 09:46:34 +0000 (17:46 +0800)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 14 Apr 2014 20:50:34 +0000 (17:50 -0300)
commit97ec8c067d322d32effdc1701760d3babbc5595f
tree16892fd16ce9e3d60c68b01f7bf11a8821eb3295
parent56d6efc2de5fcf76d3c7b33a7671bc04c53cb0e5
KVM: Add SMAP support when setting CR4

This patch adds SMAP handling logic when setting CR4 for guests

Thanks a lot to Paolo Bonzini for his suggestion to use the branchless
way to detect SMAP violation.

Signed-off-by: Feng Wu <feng.wu@intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/cpuid.h
arch/x86/kvm/mmu.c
arch/x86/kvm/mmu.h
arch/x86/kvm/paging_tmpl.h
arch/x86/kvm/x86.c