x86/cpuid: Move VMX/SVM out of the default policy
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 30 Sep 2020 09:17:33 +0000 (10:17 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 6 Oct 2020 11:28:37 +0000 (12:28 +0100)
commit35679b221ee731a957f180051ede70ef49bb4fe0
tree462bd93f342690433300df5243d71a4599edce2a
parent345fd6d01e6730ea9024ae3b98e1832c35b34a28
x86/cpuid: Move VMX/SVM out of the default policy

Nested virt is still experimental, and requires explicitly opting in to at
domain create time.  The VMX/SVM features should not be visible by default.

Also correct them from all HVM guests, to just HAP-enabled guests.  This has
been the restriction for SVM right from the outset (c/s e006a0e0aaa), while
VMX was first introduced supporting shadow mode (c/s 9122c69c8d3) but later
adjusted to HAP-only (c/s 77751ed79e3).

There is deliberately no adjustment to xc_cpuid_apply_policy() for pre-4.14
migration compatibility.  The migration stream doesn't contain the required
architectural state for either VMX/SVM, and a nested virt VM which migrates
will explode in weird and wonderful ways.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
xen/include/public/arch-x86/cpufeatureset.h