VMX: disable SMAP feature when guest is in non-paging mode
authorFeng Wu <feng.wu@intel.com>
Mon, 12 May 2014 15:03:09 +0000 (17:03 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 12 May 2014 15:03:09 +0000 (17:03 +0200)
commit67fa47753f55cbfdada11f8f517ddd07bc9f6be8
treed52fa98612b02c58d541556d43a54c1899eb4da9
parent64178638ffa2271539a90197c09a3b623f9ad808
VMX: disable SMAP feature when guest is in non-paging mode

SMAP is disabled if CPU is in non-paging mode in hardware.
However Xen always uses paging mode to emulate guest non-paging
mode with HAP. To emulate this behavior, SMAP needs to be manually
disabled when guest switches to non-paging mode.

This logic is similiar with SMEP.

Signed-off-by: Feng Wu <feng.wu@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vmx.c