|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] Set SkipBytes to 0 for contiguous allocations
Hi Owen,
Could you apply this to XenCons, XenHid, XenIface and XenNet as well?
Thanks,
On 13/10/2026 14:37, Owen Smith wrote:
> Reviewed-by: Owen Smith <owen.smith@xxxxxxxxxx>
>
> ________________________________________
> From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> on behalf of
> Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
> Sent: 13 October 2026 12:57 PM
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Tu Dinh
> Subject: [PATCH] Set SkipBytes to 0 for contiguous allocations
>
> MmAllocatePagesForMdlEx requires that for contiguous allocations, if
> MM_ALLOCATE_REQUIRE_CONTIGUOUS_CHUNKS is set and SkipBytes is nonzero,
> then SkipBytes must be a power of two. Setting SkipBytes here is
> unnecessary as contiguous allocations are still possible with SkipBytes
> set to 0 anyway.
>
> Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
> ---
> To be applied to XenCons, XenHid, XenIface and XenNet as well.
> ---
> src/common/util.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/common/util.h b/src/common/util.h
> index 36f71f9..9709a10 100644
> --- a/src/common/util.h
> +++ b/src/common/util.h
> @@ -201,13 +201,12 @@ __AllocatePages(
>
> LowAddress.QuadPart = 0ull;
> HighAddress.QuadPart = ~0ull;
> + SkipBytes.QuadPart = 0ull;
> TotalBytes = (SIZE_T)PAGE_SIZE * Count;
>
> if (Contiguous) {
> - SkipBytes.QuadPart = TotalBytes;
> Flags = MM_ALLOCATE_REQUIRE_CONTIGUOUS_CHUNKS;
> } else {
> - SkipBytes.QuadPart = 0ull;
> Flags = MM_ALLOCATE_FULLY_REQUIRED;
> }
>
> --
> 2.55.0.windows.3
>
>
> --
> Ngoc Tu Dinh | Vates XCP-ng Developer
>
> XCP-ng & Xen Orchestra - Vates solutions
>
> web: https://vates.tech
>
--
Ngoc Tu Dinh | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |