]> xenbits.xensource.com Git - xen.git/commit
x86/vvmx: Fix livelock with XSA-304 fix
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 28 Nov 2019 14:37:17 +0000 (15:37 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 28 Nov 2019 14:37:17 +0000 (15:37 +0100)
commit25f5530fc43b9c5d63f840be5d7be8ed4d1ed92e
treeb79276b218b986ebef0f03b69d1c8bc6e335c2c8
parent49db55fb3ba51a12613cb019ef13d452bc382ccb
x86/vvmx: Fix livelock with XSA-304 fix

It turns out that the XSA-304 / CVE-2018-12207 fix of disabling executable
superpages doesn't work well with the nested p2m code.

Nested virt is experimental and not security supported, but is useful for
development purposes.  In order to not regress the status quo, disable the
XSA-304 workaround until the nested p2m code can be improved.

Introduce a per-domain exec_sp control and set it based on the current
opt_ept_exec_sp setting.  Take the oppotunity to omit a PVH hardware domain
from the performance hit, because it is already permitted to DoS the system in
such ways as issuing a reboot.

When nested virt is enabled on a domain, force it to using executable
superpages and rebuild the p2m.

Having the setting per-domain involves rearranging the internals of
parse_ept_param_runtime() but it still retains the same overall semantics -
for each applicable domain whose setting needs to change, rebuild the p2m.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/hvm/vmx/vvmx.c
xen/arch/x86/mm/p2m-ept.c
xen/include/asm-x86/hvm/vmx/vmcs.h