x86/hvm: Obsolete the use of HVM_PARAM_NESTEDHVM
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 29 Sep 2020 15:51:07 +0000 (16:51 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 6 Oct 2020 11:28:37 +0000 (12:28 +0100)
commitf5bdb4aaa165c6fe1d2c42e1d67619e7d8217cdd
tree52cdc609a343de5d3ca58a04f621f5b145a89d41
parentdbe399b174e471c97d63a3e3f2c00cd8c753106c
x86/hvm: Obsolete the use of HVM_PARAM_NESTEDHVM

With XEN_DOMCTL_CDF_nested_virt now passed properly to domain_create(),
reimplement nestedhvm_enabled() to use the property which is fixed for the
lifetime of the domain.

This makes the call to nestedhvm_vcpu_initialise() from hvm_vcpu_initialise()
no longer dead.  It became logically dead with the Xend => XL transition, as
they initialise HVM_PARAM_NESTEDHVM in opposite orders with respect to
XEN_DOMCTL_max_vcpus.

There is one opencoded user of nestedhvm_enabled() in HVM_PARAM_ALTP2M's
safety check.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wl@xen.org>
tools/libs/light/libxl_x86.c
xen/arch/x86/hvm/hvm.c
xen/include/asm-x86/hvm/nestedhvm.h
xen/include/public/hvm/params.h