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>
Showing
- arch/x86/kvm/cpuid.h 8 additions, 0 deletionsarch/x86/kvm/cpuid.h
- arch/x86/kvm/mmu.c 31 additions, 3 deletionsarch/x86/kvm/mmu.c
- arch/x86/kvm/mmu.h 36 additions, 8 deletionsarch/x86/kvm/mmu.h
- arch/x86/kvm/paging_tmpl.h 1 addition, 1 deletionarch/x86/kvm/paging_tmpl.h
- arch/x86/kvm/x86.c 8 additions, 1 deletionarch/x86/kvm/x86.c
Loading
Please register or sign in to comment