libxenlight: physmap slack for pv domains

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>
This commit is contained in:
Keir Fraser committed 2009-12-05 12:30:46 +00:00
1 parent a05bf36813
commit 1f29decb33
3 files changed
+6 -1

No files matched your search

+2
View File
@@ -2100,6 +2100,8 @@ void init_build_info(libxl_domain_build_info *b_info, libxl_domain_create_info *
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;
}
}
+1
View File
@@ -80,6 +80,7 @@ typedef struct {
char *timeoffset;
} hvm;
struct {
uint32_t slack_memkb;
const char *cmdline;
const char *ramdisk;
const char *features;
+3 -1
View File
@@ -53,7 +53,9 @@ int build_pre(struct libxl_ctx *ctx, uint32_t domid,
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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.