On Wed, Apr 27, 2022 at 12:57:17PM +0200, Jan Beulich wrote:
> The reference "to shadow the resident processes" is applicable to
> domains (potentially) running in shadow mode only. Adjust the
> calculations accordingly. This, however, requires further parameters.
> Since the original function is deprecated anyway, and since it can't be
> changed (for being part of a stable ABI), introduce a new (internal
> only) function, with the deprecated one simply becoming a wrapper.
> 
> In dom0_paging_pages() also take the opportunity and stop open-coding
> DIV_ROUND_UP().
> 
> Signed-off-by: Jan Beulich <[email protected]>
> ---
> v3: Refine expression in dom0_paging_pages(). Update comment there as
>     well.
> v2: Introduce libxl__get_required_paging_memory().
> 
> --- a/tools/libs/light/libxl_create.c
> +++ b/tools/libs/light/libxl_create.c
> @@ -1017,7 +1017,7 @@ static bool ok_to_default_memkb_in_creat
>       * The result is that the behaviour with old callers is the same
>       * as in 4.13: no additional memory is allocated for shadow and
>       * iommu (unless the caller set shadow_memkb, eg from a call to
> -     * libxl_get_required_shadow_memory).
> +     * libxl__get_required_paging_memory).

I think in this comment, the "caller" is an application using libxl,
which might set shadow_memkb with a value from
libxl_get_required_shadow_memory(). So I don't think there's a need to
change the comment.


Otherwise, the patch looks good.
So with this chunk removed: Reviewed-by: Anthony PERARD 
<[email protected]>

Thanks,

-- 
Anthony PERARD

Reply via email to