xen/arm: Introduce gpaddr_bits field to struct xen_domctl_getdomaininfo
authorOleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Thu, 14 Oct 2021 11:40:44 +0000 (14:40 +0300)
committerIan Jackson <iwj@xenproject.org>
Thu, 14 Oct 2021 14:18:32 +0000 (15:18 +0100)
commit1e6706b0d12300a81db91e07af8340720a8d67c6
tree3f8a67cf57daf53bedcf87de8fc95541cb4ecba8
parent2f5f0a1b77161993c16c4cc243467d75e5b7633b
xen/arm: Introduce gpaddr_bits field to struct xen_domctl_getdomaininfo

We need to pass info about maximum supported guest physical
address space size to the toolstack on Arm in order to properly
calculate the base and size of the extended region (safe range)
for the guest. The extended region is unused address space which
could be safely used by domain for foreign/grant mappings on Arm.
The extended region itself will be handled by the subsequent
patch.

Currently the same guest physical address space size is used
for all guests (p2m_ipa_bits variable on Arm, the x86 equivalent
is hap_paddr_bits).

Add an explicit padding after "gpaddr_bits" field and also
(while at it) after "domain" field.

Also make sure that full structure is cleared in all cases by
moving the clearing into getdomaininfo(). Currently it is only
cleared by the sysctl caller (and only once).

Please note, we do not need to bump XEN_DOMCTL_INTERFACE_VERSION
as a bump has already occurred in this release cycle. But we do
need to bump XEN_SYSCTL_INTERFACE_VERSION as the structure is
re-used in a sysctl.

Suggested-by: Julien Grall <jgrall@amazon.com>
Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
[hypervisor parts]
Reviewed-by: Jan Beulich <jbeulich@suse.com>
tools/include/libxl.h
tools/include/xenctrl.h
tools/libs/ctrl/xc_domain.c
tools/libs/light/libxl_domain.c
tools/libs/light/libxl_types.idl
xen/arch/arm/domctl.c
xen/arch/x86/domctl.c
xen/common/domctl.c
xen/common/sysctl.c
xen/include/public/domctl.h
xen/include/public/sysctl.h