x86/cpuid: Hide VT-x/SVM from HVM-based control domains
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 18 Jan 2017 18:10:41 +0000 (18:10 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 20 Jan 2017 16:12:10 +0000 (16:12 +0000)
commit6949ce5c325b21e6639fcdeb5685f24962f3d9b5
treebc06f68d03bc4afc263d5cb22fb5375e8f8809f6
parent926c1e32b2351197cc19bc39f9047b703509372c
x86/cpuid: Hide VT-x/SVM from HVM-based control domains

The VT-x/SVM features are hidden from PV dom0 by the pv_featureset[] upper
mask, but nothing thus far has prevented the features being visible in
HVM-based control domains (where there is no toolstack decision to hide the
features).

As a side effect of calling nestedhvm_enabled() earlier during domain
creation, it needs to cope with the params[] array not having been allocated.

Reported-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpuid.c
xen/arch/x86/hvm/nestedhvm.c