Contemplate a memory space slack for PV domains,
since they do ballooning (or flipping network rx)
and need some extra room in their pfn space.
Note that this does not allocate any extra memory
to the domain, it simply extends the physmap with
some extra room for "bounce bufffering back" pfn's
that are yielded to dom0.
The default slack is set at 8MB.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.com>
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
b_info->u.hvm.acpi = 1;
b_info->u.hvm.nx = 1;
b_info->u.hvm.viridian = 0;
+ } else {
+ b_info->u.pv.slack_memkb = 8 * 1024;
}
}
char *timeoffset;
} hvm;
struct {
+ uint32_t slack_memkb;
const char *cmdline;
const char *ramdisk;
const char *features;
xc_set_hvm_param(ctx->xch, domid, HVM_PARAM_VPT_ALIGN, (unsigned long) info->vpt_align);
xc_domain_max_vcpus(ctx->xch, domid, info->max_vcpus);
xc_domain_setmaxmem(ctx->xch, domid, info->max_memkb + info->video_memkb);
- xc_domain_set_memmap_limit(ctx->xch, domid, info->max_memkb);
+ xc_domain_set_memmap_limit(ctx->xch, domid,
+ (info->hvm) ? info->max_memkb :
+ (info->max_memkb + info->u.pv.slack_memkb));
if (info->hvm) {
unsigned long shadow;