|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |