sysctl/libxl: choose a sane default for HAP
authorRoger Pau Monné <roger.pau@citrix.com>
Wed, 11 Sep 2019 12:55:20 +0000 (14:55 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 11 Sep 2019 12:55:20 +0000 (14:55 +0200)
commit948a4f6af38fa1a189c2874702b7dc025181dabe
treedd7bae499e20e5883f4577c290d8d9ac079cd82e
parent8e8ae158c85fd8b26ff7c0abc52fc5767905d7f9
sysctl/libxl: choose a sane default for HAP

Current libxl code will always enable Hardware Assisted Paging (HAP),
expecting that the hypervisor will fallback to shadow if HAP is not
available. With the changes to DOMCTL_createdomain that's not the case
any longer, and the hypervisor will raise an error if HAP is not
available instead of silently falling back to shadow.

In order to keep the previous functionality report whether HAP is
available or not in XEN_SYSCTL_physinfo, so that the toolstack can
select a sane default if there's no explicit user selection of whether
HAP should be used.

Note that on ARM hardware HAP capability is always reported since it's
a required feature in order to run Xen.

Fixes: d0c0ba7d3de ('x86/hvm/domain: remove the 'hap_enabled' flag')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl.h
tools/libxl/libxl_create.c
tools/libxl/libxl_types.idl
tools/ocaml/libs/xc/xenctrl.ml
tools/ocaml/libs/xc/xenctrl.mli
tools/xl/xl_info.c
xen/arch/arm/sysctl.c
xen/arch/x86/sysctl.c
xen/include/public/sysctl.h