]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
xen/domctl: Return arch_config via getdomaininfo
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 23 Nov 2017 11:09:09 +0000 (11:09 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 6 Dec 2017 11:54:20 +0000 (11:54 +0000)
This allows toolstack software to distinguish HVM from PVH guests.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libxc/include/xenctrl.h
tools/libxc/xc_domain.c
xen/arch/x86/domctl.c
xen/include/public/domctl.h

index 666db0b9193ef4e8817a27e8d05261eb63effaf6..a92a8d7a53554692089413b79500e7ea96f9ceb6 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 075ee92cd7854db1efcaa6bd46649ba91f918079..b52d6d95526043ed9c842fe4024d1247a75b24af 100644 (file)
@@ -345,6 +345,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 70027abc005c2ac6caa67e309433f874355d41d4..772c7b27b25e9d534f285495c93ecf9494f1583c 100644 (file)
@@ -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);