aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xenguest.h
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2012-03-01 15:16:22 +0000
committerDavid Vrabel <david.vrabel@citrix.com>2012-03-01 15:16:22 +0000
commitb831d3c00f7c6c871cc7efb435e9a6660bd29947 (patch)
tree744364f33270593cd1bb11b4db0bc4a7844f7176 /tools/libxc/xenguest.h
parent5edb0601cec5f3194752c3dfc3d4da5111e3ff9e (diff)
downloadxen-b831d3c00f7c6c871cc7efb435e9a6660bd29947.tar.gz
xen-b831d3c00f7c6c871cc7efb435e9a6660bd29947.tar.bz2
xen-b831d3c00f7c6c871cc7efb435e9a6660bd29947.zip
libxc: pass arguments to xc_hvm_build() in a structure
To allow new parameters to be added to the xc_hvm_build*() family of functions, pass them in a structure. Make the other variants fill in the structure and call xc_hvm_build() (except for xc_hvm_build_mem() which had no users and is removed). The units of the mem_size and mem_target arguments are in bytes (not MiB like the old functions). Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxc/xenguest.h')
-rw-r--r--tools/libxc/xenguest.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/tools/libxc/xenguest.h b/tools/libxc/xenguest.h
index 533e70279b..f52ca74231 100644
--- a/tools/libxc/xenguest.h
+++ b/tools/libxc/xenguest.h
@@ -171,10 +171,23 @@ int xc_linux_build_mem(xc_interface *xch,
unsigned int console_evtchn,
unsigned long *console_mfn);
-int xc_hvm_build(xc_interface *xch,
- uint32_t domid,
- int memsize,
- const char *image_name);
+struct xc_hvm_build_args {
+ uint64_t mem_size; /* Memory size in bytes. */
+ uint64_t mem_target; /* Memory target in bytes. */
+ const char *image_file_name; /* File name of the image to load. */
+};
+
+/**
+ * Build a HVM domain.
+ * @parm xch libxc context handle.
+ * @parm domid domain ID for the new domain.
+ * @parm hvm_args parameters for the new domain.
+ *
+ * The memory size and image file parameters are required, the rest
+ * are optional.
+ */
+int xc_hvm_build(xc_interface *xch, uint32_t domid,
+ const struct xc_hvm_build_args *hvm_args);
int xc_hvm_build_target_mem(xc_interface *xch,
uint32_t domid,
@@ -182,12 +195,6 @@ int xc_hvm_build_target_mem(xc_interface *xch,
int target,
const char *image_name);
-int xc_hvm_build_mem(xc_interface *xch,
- uint32_t domid,
- int memsize,
- const char *image_buffer,
- unsigned long image_size);
-
int xc_suspend_evtchn_release(xc_interface *xch, xc_evtchn *xce, int domid, int suspend_evtchn);
int xc_suspend_evtchn_init(xc_interface *xch, xc_evtchn *xce, int domid, int port);