From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Hoes Subject: [PATCH v2 03/30] libxl: idl: add domain_type field to libxl_dominfo struct Date: Thu, 13 Jun 2013 16:24:45 +0100 Message-ID: <1371137112-16692-4-git-send-email-rob.hoes@citrix.com> References: <1371137112-16692-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: <1371137112-16692-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: 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 b9ec689..564b4c1 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 81fb25a..1b8fd44 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -205,6 +205,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