]> xenbits.xensource.com Git - xen.git/commit
x86/sm{e, a}p: do not enable SMEP/SMAP in PV shim by default on AMD
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Fri, 17 Jan 2020 15:18:20 +0000 (16:18 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Jan 2020 15:18:20 +0000 (16:18 +0100)
commitb05ec9263e56ef0784da766e829cfe08569d1d88
treeb03fc2b4a5076c4bdde6a144e31928b573d0470e
parenta2d194b2579f66bb53cab740bba39090a3190158
x86/sm{e, a}p: do not enable SMEP/SMAP in PV shim by default on AMD

Due to AMD and Hygon being unable to selectively trap CR4 bit modifications
running 32-bit PV guest inside PV shim comes with significant performance
hit. Moreover, for SMEP in particular every time CR4.SMEP changes on context
switch to/from 32-bit PV guest, it gets trapped by L0 Xen which then
tries to perform global TLB invalidation for PV shim domain. This usually
results in eventual hang of a PV shim with at least several vCPUs.

Since the overall security risk is generally lower for shim Xen as it being
there more of a defense-in-depth mechanism, choose to disable SMEP/SMAP in
it by default on AMD and Hygon unless a user chose otherwise.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
docs/misc/xen-command-line.pandoc
xen/arch/x86/setup.c