aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xenctrl.h
diff options
context:
space:
mode:
authorDario Faggioli <dario.faggioli@citrix.com>2013-09-10 19:53:40 +0200
committerIan Campbell <ian.campbell@citrix.com>2013-09-13 13:06:28 +0100
commit0dd5b654107103765994243017a7f0eb15fda341 (patch)
treeaa5f3648656674a0f48b8b6a3663f5799937b588 /tools/libxc/xenctrl.h
parentbd9a0528ebc68ddb723feef6be57f75096d9df52 (diff)
downloadxen-0dd5b654107103765994243017a7f0eb15fda341.tar.gz
xen-0dd5b654107103765994243017a7f0eb15fda341.tar.bz2
xen-0dd5b654107103765994243017a7f0eb15fda341.zip
libxc: introduce xc_domain_get_guest_width()
As a wrapper to XEN_DOMCTL_get_address_size, and use it wherever the call was being issued directly via do_domctl(), saving quite some line of code. Actually, the function returns the guest width in bytes, rather than directly what XEN_DOMCTL_get_address_size provides (which is a number of bits), since that is what it is useful almost everywhere. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxc/xenctrl.h')
-rw-r--r--tools/libxc/xenctrl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h
index f2cebafc9d..58d51f353a 100644
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -560,6 +560,19 @@ int xc_vcpu_getaffinity(xc_interface *xch,
int vcpu,
xc_cpumap_t cpumap);
+
+/**
+ * This function will return the guest_width (in bytes) for the
+ * specified domain.
+ *
+ * @param xch a handle to an open hypervisor interface.
+ * @param domid the domain id one wants the address size width of.
+ * @param addr_size the address size.
+ */
+int xc_domain_get_guest_width(xc_interface *xch, uint32_t domid,
+ unsigned int *guest_width);
+
+
/**
* This function will return information about one or more domains. It is
* designed to iterate over the list of domains. If a single domain is