xen/domctl: Return arch_config via getdomaininfo
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 11 Jan 2018 17:47:59 +0000 (17:47 +0000)
committerWei Liu <wei.liu2@citrix.com>
Tue, 16 Jan 2018 18:34:04 +0000 (18:34 +0000)
This allows toolstack software to distinguish HVM from PVH guests.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
tools/libxc/include/xenctrl.h
tools/libxc/xc_domain.c
xen/arch/x86/domctl.c
xen/include/public/domctl.h

index 09e1363be2db4bf906f91bfd6f1e0870c686e764..7d7a7c5999aca7257bed0159188d567ff92c1260 100644 (file)
@@ -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;
index 3ccd27f101425ec4b5e2b280b278afdcd9908ceb..8169284dc1670115f180c8ddda98fff26b0fe50c 100644 (file)
@@ -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));
index 5973d9fdaa27d11cb5c6e1d86b09222bd2c20cf6..2585d4e14b694d66917d38c6425654e71ba7b413 100644 (file)
@@ -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
index 9ae7295919a273709b179f3b7f9f0d0820d9dc24..a8921dd7ed55c9005e36c0808cd09434ff287b7a 100644 (file)
@@ -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);