Introduce a minimum value for the memory assigned to dom0.
[fixed up for conflicts with libxl__ naming policy changes -iwj]
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
abort = 1;
goto out;
}
+ if (!domid && new_target_memkb < LIBXL_MIN_DOM0_MEM) {
+ LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+ "new target for dom0 is below the minimum threshold\n");
+ abort = 1;
+ goto out;
+ }
if (relative)
new_target_memkb = current_target_memkb + target_memkb;
#define LIBXL_MAXMEM_CONSTANT 1024
#define LIBXL_PV_EXTRA_MEMORY 1024
#define LIBXL_HVM_EXTRA_MEMORY 2048
+#define LIBXL_MIN_DOM0_MEM (128*1024)
#define QEMU_SIGNATURE "QemuDeviceModelRecord"
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))