aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_utils.h
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2011-01-06 14:27:33 +0000
committerAnthony PERARD <anthony.perard@citrix.com>2011-01-06 14:27:33 +0000
commit7e600e448519040d4857d291ddc8f34277d2c67e (patch)
treef2aa9323ae9e5a01884ae271a8672f8b9fedd9e3 /tools/libxl/libxl_utils.h
parentd8318dc19b559da05efc2cccabe4290dc3e5d446 (diff)
downloadxen-7e600e448519040d4857d291ddc8f34277d2c67e.tar.gz
xen-7e600e448519040d4857d291ddc8f34277d2c67e.tar.bz2
xen-7e600e448519040d4857d291ddc8f34277d2c67e.zip
libxl: Specify the target ram size to Qemu (new) when calling it
This patch adds target_ram in device_model_info structure, to be used in libxl_build_device_model_args_new. Qemu upstream needs to know about it. It introduces also libxl__sizekb_to_mb to convert size from KB to MB by rounding up the result. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_utils.h')
-rw-r--r--tools/libxl/libxl_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/libxl/libxl_utils.h b/tools/libxl/libxl_utils.h
index 075197e4cb..3ec67e5eb0 100644
--- a/tools/libxl/libxl_utils.h
+++ b/tools/libxl/libxl_utils.h
@@ -85,5 +85,9 @@ void libxl_cpumap_reset(libxl_cpumap *cpumap, int cpu);
int libxl_cpuarray_alloc(libxl_ctx *ctx, libxl_cpuarray *cpuarray);
+static inline uint32_t libxl__sizekb_to_mb(uint32_t s) {
+ return (s + 1023) / 1024;
+}
+
#endif