|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH xencons] Sync util.h from XenBus
On 14/10/2026 10:08, Owen Smith wrote:
> Pulls XenBus changes from:
> 04a0331ca73e7d32502a101724fe6972673fb910
> Set SkipBytes to 0 for contiguous allocations
>
> 0cc8590c6f7e55a785c77370e80e95cb882ada70
> Move TIME_* macros to util.h
>
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
All 4 patches:
Reviewed-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
> ---
> src/xencons/util.h | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/src/xencons/util.h b/src/xencons/util.h
> index fb4134a..9709a10 100644
> --- a/src/xencons/util.h
> +++ b/src/xencons/util.h
> @@ -30,8 +30,8 @@
> * SUCH DAMAGE.
> */
>
> -#ifndef _XENCONS_UTIL_H
> -#define _XENCONS_UTIL_H
> +#ifndef _COMMON_UTIL_H
> +#define _COMMON_UTIL_H
>
> #include <ntddk.h>
> #include <intrin.h>
> @@ -41,6 +41,11 @@
> #define P2ROUNDUP(_t, _x, _a) \
> (-(-((_t)(_x)) & -(((_t)(_a)))))
>
> +#define TIME_US(_us) ((_us) * 10ll)
> +#define TIME_MS(_ms) (TIME_US((_ms) * 1000ll))
> +#define TIME_S(_s) (TIME_MS((_s) * 1000ll))
> +#define TIME_RELATIVE(_t) (-(_t))
> +
> static FORCEINLINE LONG
> __ffs(
> _In_ unsigned long long mask
> @@ -196,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;
> }
>
> @@ -377,4 +381,4 @@ __tolower(
> return 'a' + Character - 'A';
> }
>
> -#endif // _XENCONS_UTIL_H
> +#endif // _COMMON_UTIL_H
--
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 |