x86/altp2m: add altp2m_vcpu_disable_notify
authorRazvan Cojocaru <rcojocaru@bitdefender.com>
Tue, 18 Dec 2018 15:11:44 +0000 (17:11 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 2 Jan 2019 12:20:42 +0000 (12:20 +0000)
commit9b97818c3d5854caa95d8af20fe7ef6112ff1b06
treecb1b0fd9ddb11b76c9a23fe1ee3e254c64737b77
parent7b6e05c50fc39466fcc685fb6d4216f99af58743
x86/altp2m: add altp2m_vcpu_disable_notify

Allow altp2m users to disable #VE/VMFUNC alone. Currently it is
only possible to disable this functionality when we disable altp2m
completely; #VE/VMFUNC can only be enabled once per altp2m session.

In addition to making things complete, disabling #VE is also a
workaround for CFW116 ("When Virtualization Exceptions are Enabled,
EPT Violations May Generate Erroneous Virtualization Exceptions")
on Xeon E-2100 CPUs.

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/include/xenctrl.h
tools/libxc/xc_altp2m.c
xen/arch/x86/hvm/hvm.c
xen/include/public/hvm/hvm_op.h