summaryrefslogtreecommitdiff
path: root/xen/include
diff options
context:
space:
mode:
authorOleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>2021-10-14 14:40:44 +0300
committerIan Jackson <iwj@xenproject.org>2021-10-14 15:18:32 +0100
commit1e6706b0d12300a81db91e07af8340720a8d67c6 (patch)
tree3f8a67cf57daf53bedcf87de8fc95541cb4ecba8 /xen/include
parent2f5f0a1b77161993c16c4cc243467d75e5b7633b (diff)
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>
Diffstat (limited to 'xen/include')
-rw-r--r--xen/include/public/domctl.h3
-rw-r--r--xen/include/public/sysctl.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index 238384b5ae..51017b47bc 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -107,6 +107,7 @@ struct xen_domctl_createdomain {
struct xen_domctl_getdomaininfo {
/* OUT variables. */
domid_t domain; /* Also echoed in domctl.domain */
+ uint16_t pad1;
/* Domain is scheduled to die. */
#define _XEN_DOMINF_dying 0
#define XEN_DOMINF_dying (1U<<_XEN_DOMINF_dying)
@@ -151,6 +152,8 @@ struct xen_domctl_getdomaininfo {
uint32_t ssidref;
xen_domain_handle_t handle;
uint32_t cpupool;
+ uint8_t gpaddr_bits; /* Guest physical address space size. */
+ uint8_t pad2[7];
struct xen_arch_domainconfig arch_config;
};
typedef struct xen_domctl_getdomaininfo xen_domctl_getdomaininfo_t;
diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h
index fead0e5b53..3e53681b43 100644
--- a/xen/include/public/sysctl.h
+++ b/xen/include/public/sysctl.h
@@ -35,7 +35,7 @@
#include "domctl.h"
#include "physdev.h"
-#define XEN_SYSCTL_INTERFACE_VERSION 0x00000013
+#define XEN_SYSCTL_INTERFACE_VERSION 0x00000014
/*
* Read console content from Xen buffer ring.