Stefano Stabellini
2010-Nov-18 14:58 UTC
[Xen-devel] [PATCH] libxl: accout for shadow memory for PV guests too
Accout for shadow memory for PV guests too We need to accout for the memory needed by shadow pagetables even for PV guests, because in that case shadow pagetables are used during live migration. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> diff -r 7d2fdc083c9c tools/libxl/libxl.c --- a/tools/libxl/libxl.c Thu Nov 18 12:28:31 2010 +0000 +++ b/tools/libxl/libxl.c Thu Nov 18 14:46:26 2010 +0000 @@ -3023,7 +3023,7 @@ int libxl_domain_need_memory(libxl_ctx * if (strstr(dm_info->device_model, "stubdom-dm")) *need_memkb += 32 * 1024; } else - *need_memkb += LIBXL_PV_EXTRA_MEMORY; + *need_memkb += b_info->shadow_memkb + LIBXL_PV_EXTRA_MEMORY; if (*need_memkb % (2 * 1024)) *need_memkb += (2 * 1024) - (*need_memkb % (2 * 1024)); return 0; diff -r 7d2fdc083c9c tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Thu Nov 18 12:28:31 2010 +0000 +++ b/tools/libxl/xl_cmdimpl.c Thu Nov 18 14:46:26 2010 +0000 @@ -332,8 +332,8 @@ static void init_build_info(libxl_domain b_info->target_memkb = b_info->max_memkb; b_info->disable_migrate = 0; b_info->cpuid = NULL; + b_info->shadow_memkb = 0; if (c_info->hvm) { - b_info->shadow_memkb = 0; /* Set later */ b_info->video_memkb = 8 * 1024; b_info->kernel.path = strdup("hvmloader"); b_info->hvm = 1; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2010-Nov-23 19:25 UTC
Re: [Xen-devel] [PATCH] libxl: accout for shadow memory for PV guests too
Stefano Stabellini writes ("[Xen-devel] [PATCH] libxl: accout for shadow memory for PV guests too"):> Accout for shadow memory for PV guests too > > We need to accout for the memory needed by shadow pagetables even for PV > guests, because in that case shadow pagetables are used during live > migration.Applied, thanks. (With spelling fix "account".) Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel