[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH xencons] Sync util.h from XenBus


  • To: Owen Smith <owen.smith@xxxxxxxxxx>, win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
  • Date: Wed, 14 Oct 2026 10:16:02 +0200
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:MIME-Version:Content-Type:In-Reply-To:References:Feedback-ID"
  • Delivery-date: Wed, 14 Oct 2026 08:17:12 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.