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

Re: [RFC PATCH 2/7] xeniface: Match the grant request identifier mode in queue lookups


  • To: Rafał Wojdyła <omeg@xxxxxxxxxxxxxxxxxxxxxx>, win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
  • Date: Sat, 21 Nov 2026 13:52:13 +0100
  • 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:Cc:MIME-Version:Content-Type:In-Reply-To:References:Feedback-ID"
  • Cc: Rafał Wojdyła <omeg@xxxxxxx>
  • Delivery-date: Sat, 21 Nov 2026 12:52:16 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

On 10/11/2026 19:36, Rafał Wojdyła wrote:
> From: Rafał Wojdyła <omeg@xxxxxxx>
> 
> Require both requests to use the same identifier mode before comparing
> their request IDs or user addresses. An address-based lookup must not
> select or collide with a legacy request that happens to use the same address.
> 
> Assisted-by: LLM
> Signed-off-by: Rafał Wojdyła <omeg@xxxxxxxxxxxxxxxxxxxxxx>

Reviewed-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>

> ---
>   src/xeniface/irp_queue.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/xeniface/irp_queue.c b/src/xeniface/irp_queue.c
> index 511a36a..e2506b6 100644
> --- a/src/xeniface/irp_queue.c
> +++ b/src/xeniface/irp_queue.c
> @@ -100,10 +100,10 @@ CsqPeekNextIrp(
>   
>               BOOL Match = TargetContext->Type == Context->Type &&
>                            TargetContext->Process == Context->Process;
> -            if (TargetContext->UseRequestId)
> -                Match = Match &&
> -                        TargetContext->UseRequestId == Context->UseRequestId 
> &&
> -                        TargetContext->RequestId == Context->RequestId;
> +            if (TargetContext->UseRequestId != Context->UseRequestId)
> +                Match = FALSE;
> +            else if (TargetContext->UseRequestId)
> +                Match = Match && (TargetContext->RequestId == 
> Context->RequestId);
>               else
>                   Match = Match && (TargetContext->UserVa == Context->UserVa);
>   



--
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®.