|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 10/62] xen/domctl: Return arch_config via getdomaininfo
From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
This allows toolstack software to distinguish HVM from PVH guests.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: bump domctl version number
---
tools/libxc/include/xenctrl.h | 1 +
tools/libxc/xc_domain.c | 1 +
xen/arch/x86/domctl.c | 2 ++
xen/include/public/domctl.h | 3 ++-
4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
index 09e1363be2..7d7a7c5999 100644
--- a/tools/libxc/include/xenctrl.h
+++ b/tools/libxc/include/xenctrl.h
@@ -456,6 +456,7 @@ typedef struct xc_dominfo {
unsigned int max_vcpu_id;
xen_domain_handle_t handle;
unsigned int cpupool;
+ struct xen_arch_domainconfig arch_config;
} xc_dominfo_t;
typedef xen_domctl_getdomaininfo_t xc_domaininfo_t;
diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
index 3ccd27f101..8169284dc1 100644
--- a/tools/libxc/xc_domain.c
+++ b/tools/libxc/xc_domain.c
@@ -421,6 +421,7 @@ int xc_domain_getinfo(xc_interface *xch,
info->nr_online_vcpus = domctl.u.getdomaininfo.nr_online_vcpus;
info->max_vcpu_id = domctl.u.getdomaininfo.max_vcpu_id;
info->cpupool = domctl.u.getdomaininfo.cpupool;
+ info->arch_config = domctl.u.getdomaininfo.arch_config;
memcpy(info->handle, domctl.u.getdomaininfo.handle,
sizeof(xen_domain_handle_t));
diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index 5973d9fdaa..2585d4e14b 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -348,6 +348,8 @@ void arch_get_domain_info(const struct domain *d,
{
if ( paging_mode_hap(d) )
info->flags |= XEN_DOMINF_hap;
+
+ info->arch_config.emulation_flags = d->arch.emulation_flags;
}
#define MAX_IOPORTS 0x10000
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index 9ae7295919..a8921dd7ed 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -38,7 +38,7 @@
#include "hvm/save.h"
#include "memory.h"
-#define XEN_DOMCTL_INTERFACE_VERSION 0x0000000e
+#define XEN_DOMCTL_INTERFACE_VERSION 0x0000000f
/*
* NB. xen_domctl.domain is an IN/OUT parameter for this operation.
@@ -116,6 +116,7 @@ struct xen_domctl_getdomaininfo {
uint32_t ssidref;
xen_domain_handle_t handle;
uint32_t cpupool;
+ struct xen_arch_domainconfig arch_config;
};
typedef struct xen_domctl_getdomaininfo xen_domctl_getdomaininfo_t;
DEFINE_XEN_GUEST_HANDLE(xen_domctl_getdomaininfo_t);
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |