From: Rob Hoes Subject: [PATCH v2-resend 03/30] libxl: idl: add domain_type field to libxl_dominfo struct Date: Thu, 22 Aug 2013 11:50:51 +0100 Message-ID: <1377168678-25492-4-git-send-email-rob.hoes@citrix.com> References: <1377168678-25492-1-git-send-email-rob.hoes@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1377168678-25492-1-git-send-email-rob.hoes@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: ian.campbell@citrix.com, Rob Hoes List-Id: xen-devel@lists.xenproject.org This allows a toolstack to find out whether a VM has booted as PV or HVM. Signed-off-by: Rob Hoes --- tools/libxl/libxl.c | 2 ++ tools/libxl/libxl_types.idl | 1 + 2 files changed, 3 insertions(+) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 7fba2ee..1bce4bb 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -537,6 +537,8 @@ static void xcinfo2xlinfo(const xc_domaininfo_t *xcinfo, xlinfo->vcpu_max_id = xcinfo->max_vcpu_id; xlinfo->vcpu_online = xcinfo->nr_online_vcpus; xlinfo->cpupool = xcinfo->cpupool; + xlinfo->domain_type = (xcinfo->flags & XEN_DOMINF_hvm_guest) ? + LIBXL_DOMAIN_TYPE_HVM : LIBXL_DOMAIN_TYPE_PV; } libxl_dominfo * libxl_list_domain(libxl_ctx *ctx, int *nb_domain_out) diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index 027d066..c780a2d 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -209,6 +209,7 @@ libxl_dominfo = Struct("dominfo",[ ("vcpu_max_id", uint32), ("vcpu_online", uint32), ("cpupool", uint32), + ("domain_type", libxl_domain_type), ], dir=DIR_OUT) libxl_cpupoolinfo = Struct("cpupoolinfo", [ -- 1.7.10.4