From win-pv-devel-bounces@lists.xenproject.org Wed Nov 06 11:00:03 2024
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Wed, 06 Nov 2024 11:00:03 +0000
Received: from list by lists.xenproject.org with outflank-mailman.830706.1245783 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1t8dlZ-0006YQ-Tr; Wed, 06 Nov 2024 11:00:01 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 830706.1245783; Wed, 06 Nov 2024 11:00:01 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1t8dlZ-0006YJ-R1; Wed, 06 Nov 2024 11:00:01 +0000
Received: by outflank-mailman (input) for mailman id 830706;
 Wed, 06 Nov 2024 11:00:01 +0000
Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254]
 helo=se1-gles-sth1.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=tHtw=SB=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1t8dlZ-00062X-30
 for win-pv-devel@lists.xenproject.org; Wed, 06 Nov 2024 11:00:01 +0000
Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com
 [2a00:1450:4864:20::334])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id 42f47456-9c2e-11ef-a0c6-8be0dac302b0;
 Wed, 06 Nov 2024 11:59:58 +0100 (CET)
Received: by mail-wm1-x334.google.com with SMTP id
 5b1f17b1804b1-4315df7b43fso53383965e9.0
 for <win-pv-devel@lists.xenproject.org>; Wed, 06 Nov 2024 02:59:58 -0800 (PST)
Received: from [192.168.3.233] (54-240-197-224.amazon.com. [54.240.197.224])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-381c113e073sm18695202f8f.66.2024.11.06.02.59.56
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 06 Nov 2024 02:59:56 -0800 (PST)
X-BeenThere: win-pv-devel@lists.xenproject.org
List-Id: Developer list for the Windows PV Drivers subproject
 <win-pv-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:win-pv-devel@lists.xenproject.org>
List-Help: <mailto:win-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: win-pv-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "win-pv-devel" <win-pv-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 42f47456-9c2e-11ef-a0c6-8be0dac302b0
X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjozMzQiLCJoZWxvIjoibWFpbC13bTEteDMzNC5nb29nbGUuY29tIn0=
X-Custom-Transaction: eyJpZCI6IjQyZjQ3NDU2LTljMmUtMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMwODkwNzk4LjU4NjY3Mywic2VuZGVyIjoieGFkaW1nbmlrQGdtYWlsLmNvbSIsInJlY2lwaWVudCI6Indpbi1wdi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1730890797; x=1731495597; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:organization:reply-to
         :content-language:references:to:subject:user-agent:mime-version:date
         :message-id:from:from:to:cc:subject:date:message-id:reply-to;
        bh=X0Avxv+lOJoRULcspe18UG2CVwhjxnF8ZZ9apsgbfik=;
        b=CFyuXlbxcB57JST2QKIc0Gc50XdUFihyO3EAOlX2JhF1ZWv0D/D8huIq9QD+XwBtFy
         u39czwyuEBJLtLmGry05I1o5Ajm4iL2oqi8f7UBAHYl2HirzB1nxR0Gkm8ZQ8ngA7Mwu
         9eacFoKRYBExfhaU5ZGS8zCdCh4cTclCq0mD6MJL5bSz1mdCGV9UFFDc+KmS/E3p0qG+
         vKEcC/VAzagJeuPVGqPmTrAXqpJ8JoqIE12u+lrpXSJTp+ief5ROorxnTFgjQalqlN6F
         cMWaOrbsNUZV7330HTFjFASh2AKuCg/WVVbX4R2AfulLWtshzACGjlrR85y4u0MDpOVL
         NyEQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1730890797; x=1731495597;
        h=content-transfer-encoding:in-reply-to:organization:reply-to
         :content-language:references:to:subject:user-agent:mime-version:date
         :message-id:from:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to;
        bh=X0Avxv+lOJoRULcspe18UG2CVwhjxnF8ZZ9apsgbfik=;
        b=gJJk674R/Xqhp6ZZXTWPmoYAlC4inpwm8HTbj3Mi/ghetS9iRRBVS+ILs7tkMC65SG
         621Pw4qL6DjbplSXvZJlY8zNmZ1HhX93F5OHd0cM9gb+DMVxIJ+xtMPxuVCgK1kHWlne
         lhr51BnQXZRkvanhUBjTc5mkMQj5am6pLJCZUZmz2MPzw8j3RczICl8+9WXGT8WdKCFL
         /YQHGzMPw83UsVzdIRO88SDp14vE1tAN1gkV2Ep9IwdGTC18axFYhLn8NmG89mKeNn40
         RXkweQEgqMc8NIiQqtRlRZMzt2tcaXvL2wt9OzDy0Rg2tejZ7eYVPst1HkhYNs3m6g6l
         Vi+w==
X-Gm-Message-State: AOJu0Yy9xOjEgrT6VRNQ3UhbdO2/DSKjFqaLw/PrmpJcONTzDR4SkddN
	MszwkWngYGIR02yM1ZBJsEgB8De2CaYm+6JlYmCLDywbcUA66JAr37DNp+0f
X-Google-Smtp-Source: AGHT+IHCWL2fxDWWryseJMWo3sVPEBYKBo2Abm3p8AFK9Bss83FQzTQ61AkgJZ8K1EQtlu2wfx/3NQ==
X-Received: by 2002:a05:600c:4fc5:b0:42f:75cd:2566 with SMTP id 5b1f17b1804b1-4319ac77208mr356816645e9.2.1730890797061;
        Wed, 06 Nov 2024 02:59:57 -0800 (PST)
From: Paul Durrant <xadimgnik@gmail.com>
X-Google-Original-From: Paul Durrant <paul@xen.org>
Message-ID: <a23b26b8-b808-4412-a510-86c03e692750@xen.org>
Date: Wed, 6 Nov 2024 10:59:55 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] Allow BLKIF_OP_WRITE_BARRIER or
 BLKIF_OP_FLUSH_DISKCACHE...
To: win-pv-devel@lists.xenproject.org
References: <20241021114708.453-1-owen.smith@cloud.com>
Content-Language: en-US
Reply-To: paul@xen.org
Organization: Xen Project
In-Reply-To: <20241021114708.453-1-owen.smith@cloud.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 21/10/2024 12:47, Owen Smith wrote:
> ... when a SCSIOP_SYNCHRONIZE_CACHE is issued, which should be the last
> operation issued by the crash kernel.
> Certain backends do not advertise WriteBarrier support, and use SyncDiskCache
> instead. Add support for creating crashdumps on these backends.
> 
> Signed-off-by: Owen Smith <owen.smith@cloud.com>
> ---
>   src/xencrsh/frontend.c | 13 ++++++++++++-
>   src/xencrsh/frontend.h |  1 +
>   src/xencrsh/pdo.c      | 27 ++++++++++++++++++++++++---
>   3 files changed, 37 insertions(+), 4 deletions(-)
> 

Reviewed-by: Paul Durrant <paul@xen.org>

... with one query...

> diff --git a/src/xencrsh/frontend.c b/src/xencrsh/frontend.c
> index d88f498..0b9e46b 100644
> --- a/src/xencrsh/frontend.c
> +++ b/src/xencrsh/frontend.c
> @@ -268,6 +268,7 @@ FrontendInsertRequestOnRing(
>           }
>           break;
>       case BLKIF_OP_WRITE_BARRIER:
> +    case BLKIF_OP_FLUSH_DISKCACHE:
>           RingReq->operation          = Request->Operation;
>           RingReq->nr_segments        = 0;
>           RingReq->handle             = (USHORT)Frontend->DeviceId;
> @@ -470,6 +471,15 @@ __ReadFeatures(
>           Frontend->FeatureBarrier = FALSE;
>       }
>   
> +    Status = StoreRead(NULL, Frontend->BackendPath,
> +                        "feature-flush-cache", &Buffer);
> +    if (NT_SUCCESS(Status)) {
> +        Frontend->FeatureFlush = (strtoul(Buffer, NULL, 10) == 1);
> +        AustereFree(Buffer);
> +    } else {
> +        Frontend->FeatureFlush = FALSE;
> +    }
> +
>       Status = StoreRead(NULL, Frontend->BackendPath,
>                           "feature-discard", &Buffer);
>       if (NT_SUCCESS(Status)) {
> @@ -479,9 +489,10 @@ __ReadFeatures(
>           Frontend->FeatureDiscard = FALSE;
>       }
>   
> -    LogVerbose("Features: DomId=%d, RingOrder=0, %s %s\n",
> +    LogVerbose("Features: DomId=%d, RingOrder=0, %s %s %s\n",
>                   Frontend->BackendId,
>                   Frontend->FeatureBarrier ? "BARRIER" : "NOT_BARRIER",
> +                Frontend->FeatureFlush ? "FLUSH" : "NOT_FLUSH",
>                   Frontend->FeatureDiscard ? "DISCARD" : "NOT_DISCARD");
>   }
>   static VOID
> diff --git a/src/xencrsh/frontend.h b/src/xencrsh/frontend.h
> index 174e4d7..2e2c305 100644
> --- a/src/xencrsh/frontend.h
> +++ b/src/xencrsh/frontend.h
> @@ -62,6 +62,7 @@ typedef struct _XENVBD_FRONTEND {
>       // Capabilities
>       BOOLEAN                     Connected;
>       BOOLEAN                     FeatureBarrier;
> +    BOOLEAN                     FeatureFlush;
>       BOOLEAN                     FeatureDiscard;
>       BOOLEAN                     Paging;
>       BOOLEAN                     Hibernation;
> diff --git a/src/xencrsh/pdo.c b/src/xencrsh/pdo.c
> index 9fe3c53..76c4d59 100644
> --- a/src/xencrsh/pdo.c
> +++ b/src/xencrsh/pdo.c
> @@ -564,17 +564,31 @@ PrepareSyncCache(
>   {
>       PXENVBD_SRBEXT          SrbExt = GetSrbExt(Srb);
>       PXENVBD_REQUEST         Request;
> -
> +    UCHAR                   Operation;
> +
> +    if (Pdo->Frontend.FeatureBarrier) {
> +        Operation = BLKIF_OP_WRITE_BARRIER;
> +    } else if (Pdo->Frontend.FeatureFlush) {
> +        Operation = BLKIF_OP_FLUSH_DISKCACHE;
> +    } else {
> +        // cannot submit this to backend, just complete the SRB
> +        Srb->SrbStatus = SRB_STATUS_SUCCESS;
> +        Srb->ScsiStatus = 0x00; // SCSI_GOOD
> +
> +        FdoCompleteSrb(Pdo->Fdo, Srb);
> +        return;
> +    }
> +
>       SrbExt->NumRequests = 1;
>       Request = &SrbExt->Requests[0];
>       Request->Srb = Srb;
>   
> -    Request->Operation      = BLKIF_OP_WRITE_BARRIER;
> +    Request->Operation      = Operation;
>       Request->NrSegments     = 0;
>       Request->FirstSector    = Cdb_LogicalBlock(Srb);
>       Request->NrSectors      = 0;
>   
> -    __UpdateStats(Pdo, BLKIF_OP_WRITE_BARRIER);
> +    __UpdateStats(Pdo, Operation);
>       QueueInsertTail(&Pdo->PreparedSrbs, Srb);
>   }
>   
> @@ -692,6 +706,13 @@ PdoCompleteSubmittedRequest(
>               Pdo->Frontend.FeatureBarrier = FALSE;
>           }
>           break;
> +    case BLKIF_OP_FLUSH_DISKCACHE:
> +        LogVerbose("FLUSH\n");
> +        if (Status == BLKIF_RSP_EOPNOTSUPP) {
> +            // remove supported feature

Shouldn't this say 'remove unsupported feature'?

> +            Pdo->Frontend.FeatureFlush = FALSE;
> +        }
> +        break;
>       case BLKIF_OP_DISCARD:
>           LogVerbose("DISCARD\n");
>           if (Status == BLKIF_RSP_EOPNOTSUPP) {



From win-pv-devel-bounces@lists.xenproject.org Wed Nov 06 11:04:33 2024
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Wed, 06 Nov 2024 11:04:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.830715.1245787 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1t8dpx-0007cS-8Z; Wed, 06 Nov 2024 11:04:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 830715.1245787; Wed, 06 Nov 2024 11:04:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1t8dpx-0007cL-5u; Wed, 06 Nov 2024 11:04:33 +0000
Received: by outflank-mailman (input) for mailman id 830715;
 Wed, 06 Nov 2024 11:04:32 +0000
Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254]
 helo=se1-gles-sth1.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=tHtw=SB=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1t8dpw-0007cC-6u
 for win-pv-devel@lists.xenproject.org; Wed, 06 Nov 2024 11:04:32 +0000
Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com
 [2a00:1450:4864:20::32d])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id e4c73add-9c2e-11ef-a0c6-8be0dac302b0;
 Wed, 06 Nov 2024 12:04:29 +0100 (CET)
Received: by mail-wm1-x32d.google.com with SMTP id
 5b1f17b1804b1-43162cf1eaaso76913415e9.0
 for <win-pv-devel@lists.xenproject.org>; Wed, 06 Nov 2024 03:04:29 -0800 (PST)
Received: from [192.168.3.233] (54-240-197-224.amazon.com. [54.240.197.224])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-432aa6ae615sm18134705e9.8.2024.11.06.03.04.28
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 06 Nov 2024 03:04:28 -0800 (PST)
X-BeenThere: win-pv-devel@lists.xenproject.org
List-Id: Developer list for the Windows PV Drivers subproject
 <win-pv-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:win-pv-devel@lists.xenproject.org>
List-Help: <mailto:win-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: win-pv-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "win-pv-devel" <win-pv-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: e4c73add-9c2e-11ef-a0c6-8be0dac302b0
X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjozMmQiLCJoZWxvIjoibWFpbC13bTEteDMyZC5nb29nbGUuY29tIn0=
X-Custom-Transaction: eyJpZCI6ImU0YzczYWRkLTljMmUtMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMwODkxMDY5LjQ3MjYyLCJzZW5kZXIiOiJ4YWRpbWduaWtAZ21haWwuY29tIiwicmVjaXBpZW50Ijoid2luLXB2LWRldmVsQGxpc3RzLnhlbnByb2plY3Qub3JnIn0=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1730891069; x=1731495869; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:organization:reply-to
         :content-language:references:to:subject:user-agent:mime-version:date
         :message-id:from:from:to:cc:subject:date:message-id:reply-to;
        bh=r9Zkz2tjf3AVm9p0CiC98yz6reWVGfgoyBBNmEN7IoE=;
        b=CH+vrm6I6LbK/QsyN2Odsyy7zuL2ZqtTEOUBqT8mMH6m8+D2VZzXr6e4eZ5yvvHixM
         25KFdzhbrkkazDtcYBZIvplPHcGlQqhEqfGnW3PD+Av/qr6vDNZ72eIzwNKcDle4kXBg
         qY//N0DeTLhhd7sRp4Cg6SfPteNgPvCauX52qGCidMDcS07i5ddz3mjsswNZJenAEO60
         oH06oavrNaOtBmsWcEo7/ksH5UZ5tYeWqZEJnEZ8Fjj5qKQ1JmvWjuM5gunAxZ4mFRCf
         pkq1ONXKZxp/3hv2duXyOvShDOL8m/ufGuERSkK3kK//sodCSQdigy7t9ryp9LGUoBpv
         Upgg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1730891069; x=1731495869;
        h=content-transfer-encoding:in-reply-to:organization:reply-to
         :content-language:references:to:subject:user-agent:mime-version:date
         :message-id:from:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to;
        bh=r9Zkz2tjf3AVm9p0CiC98yz6reWVGfgoyBBNmEN7IoE=;
        b=cUur1ALuXR3domOeqU0W/tRx7u0nKoPPs3d0BaDUDYTbPpR7uYPQV7mgRhzPUrCKrN
         vuI4KFmbRWi0hpVI35CrLPO36RWtfoPJAddJDRURLjpmKwXDgE1FshB5kKaoWoZVJDOM
         FEThcIBprwkBDN09PcMvxyx+hQns9yEn+mFH5z0z70BxrgRyuh/+0z/ozzVyA8Ry9skV
         Ohm3hhoG4iBXna6q7RvTduPbdr27VNSrJhLj7gpAk7sWg0jFp4uDGoLTPTFePYNTsWMs
         34gBPyVZqyyJhDxNyYArsC+3JJ87ucYRphdae0CfyFMTrPA+UhkS//8XKzOCpTm0a8Ez
         ZYhg==
X-Gm-Message-State: AOJu0YzMPGJgYHWm0hBeC1AZaUEY7idfYCVFCKQsf3DQjkl5enO7eDOp
	G42TWtEPR6m3WojPWuRsQoTkoqBmXI77WtngZ+HRMVzscEc1VNLR45Dkjahx
X-Google-Smtp-Source: AGHT+IFLWb5R7AJbnSNnTqY1Wy2fhGtgZa/E+2ezUcQqMeaUohrJUCrkABPhfNhYC9SPyzPzNnUeuQ==
X-Received: by 2002:a05:600c:5250:b0:431:5465:8072 with SMTP id 5b1f17b1804b1-43283294a9emr229009275e9.31.1730891068734;
        Wed, 06 Nov 2024 03:04:28 -0800 (PST)
From: Paul Durrant <xadimgnik@gmail.com>
X-Google-Original-From: Paul Durrant <paul@xen.org>
Message-ID: <40dad162-0ee9-458d-9855-0f208738cb9c@xen.org>
Date: Wed, 6 Nov 2024 11:04:27 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] Add DeviceID info to DisplayNames
To: win-pv-devel@lists.xenproject.org
References: <20241028130217.816-1-owen.smith@cloud.com>
Content-Language: en-US
Reply-To: paul@xen.org
Organization: Xen Project
In-Reply-To: <20241028130217.816-1-owen.smith@cloud.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 28/10/2024 13:02, Owen Smith wrote:
> Append the DeviceID info to the strings used for the DisplayName strings.
> Use the current genfiles.ps1 script, as part of the version project, to

What is the 'version project'?

> populate the %XenBusName_VEND% value (or remove the lines) to match the
> binding hardware ID.
> 

Also, shouldn't the PRODUCT_NAME already convey the requisite information?

> Signed-off-by: Owen Smith <owen.smith@cloud.com>
> ---
>   src/xenbus.inf | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/src/xenbus.inf b/src/xenbus.inf
> index 73a2b11..7cc9ac2 100644
> --- a/src/xenbus.inf
> +++ b/src/xenbus.inf
> @@ -69,9 +69,9 @@ xenbus_monitor_@MAJOR_VERSION@_@MINOR_VERSION@_@MICRO_VERSION@_@BUILD_NUMBER@.dl
>   ; DisplayName		Section		DeviceID
>   ; -----------		-------		--------
>   
> -%XenBusName%		=XenBus_Inst,	PCI\VEN_5853&DEV_@VENDOR_DEVICE_ID@&SUBSYS_@VENDOR_DEVICE_ID@5853&REV_01
> -%XenBusName%		=XenBus_Inst,	PCI\VEN_5853&DEV_0002
> -%XenBusName%		=XenBus_Inst,	PCI\VEN_5853&DEV_0001
> +%XenBusName_VEND%	=XenBus_Inst,	PCI\VEN_5853&DEV_@VENDOR_DEVICE_ID@&SUBSYS_@VENDOR_DEVICE_ID@5853&REV_01
> +%XenBusName_0002%	=XenBus_Inst,	PCI\VEN_5853&DEV_0002
> +%XenBusName_0001%	=XenBus_Inst,	PCI\VEN_5853&DEV_0001
>   
>   [XenBus_Inst]
>   CopyFiles=XenBus_CopyFiles
> @@ -149,6 +149,9 @@ HKR,,TypesSupported,0x00010001,7
>   Vendor="@VENDOR_NAME@"
>   DiskDesc="@PRODUCT_NAME@ PV Bus Package"
>   XenBusName="@PRODUCT_NAME@ PV Bus"
> +XenBusName_VEND="@PRODUCT_NAME@ PV Bus (@VENDOR_DEVICE_ID@)"
> +XenBusName_0002="@PRODUCT_NAME@ PV Bus (0002)"
> +XenBusName_0001="@PRODUCT_NAME@ PV Bus (0001)"
>   XenFiltName="@PRODUCT_NAME@ Generic Bus Filter"
>   MonitorName="@PRODUCT_NAME@ PV Driver Monitor"
>   MonitorDesc="Provides support for @PRODUCT_NAME@ PV drivers"



From win-pv-devel-bounces@lists.xenproject.org Wed Nov 06 11:29:29 2024
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Wed, 06 Nov 2024 11:29:29 +0000
Received: from list by lists.xenproject.org with outflank-mailman.830737.1245811 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1t8eE4-0002uo-EE; Wed, 06 Nov 2024 11:29:28 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 830737.1245811; Wed, 06 Nov 2024 11:29:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1t8eE4-0002ug-AS; Wed, 06 Nov 2024 11:29:28 +0000
Received: by outflank-mailman (input) for mailman id 830737;
 Wed, 06 Nov 2024 11:29:26 +0000
Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254]
 helo=se1-gles-sth1.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hpEl=SB=cloud.com=owen.smith@srs-se1.protection.inumbo.net>)
 id 1t8eE2-0002uV-Mg
 for win-pv-devel@lists.xenproject.org; Wed, 06 Nov 2024 11:29:26 +0000
Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com
 [2a00:1450:4864:20::12d])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id 5f684cfd-9c32-11ef-a0c6-8be0dac302b0;
 Wed, 06 Nov 2024 12:29:23 +0100 (CET)
Received: by mail-lf1-x12d.google.com with SMTP id
 2adb3069b0e04-53c78ebe580so783245e87.1
 for <win-pv-devel@lists.xenproject.org>; Wed, 06 Nov 2024 03:29:23 -0800 (PST)
X-BeenThere: win-pv-devel@lists.xenproject.org
List-Id: Developer list for the Windows PV Drivers subproject
 <win-pv-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:win-pv-devel@lists.xenproject.org>
List-Help: <mailto:win-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: win-pv-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "win-pv-devel" <win-pv-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 5f684cfd-9c32-11ef-a0c6-8be0dac302b0
X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjoxMmQiLCJoZWxvIjoibWFpbC1sZjEteDEyZC5nb29nbGUuY29tIn0=
X-Custom-Transaction: eyJpZCI6IjVmNjg0Y2ZkLTljMzItMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMwODkyNTYzLjU0MDI5Nywic2VuZGVyIjoib3dlbi5zbWl0aEBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ3aW4tcHYtZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=citrix.com; s=google; t=1730892563; x=1731497363; darn=lists.xenproject.org;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:from:to:cc:subject:date:message-id:reply-to;
        bh=l+Tp9plt6bQDQdLElVyk7rZ2NhKGZ3maxN8iFnZ1G2s=;
        b=vUphreTZcqMLND8GWlDEVEKC061d9XixxpOr1EGGyrcMVenl1wq8lS0EUV5mFdxW8G
         QRZ3vj0tUEh6x+99WmxphV057SNS6ZmK6WLegq8y2q15mezvviexDqSLz6QcBd3gHNir
         PAejiPe7tmg/UZiQcJ7Lf048lKGAnQMyZvGf8=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1730892563; x=1731497363;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=l+Tp9plt6bQDQdLElVyk7rZ2NhKGZ3maxN8iFnZ1G2s=;
        b=CbcvgOtjk87MzW3Mm7jUvFBJ5pO3sGw6CS+U7Wkt6e6Q7CNnwNOtJC/Nrl8wgMRNHu
         Fm00joOEwIAu1koz1UjkykRS0O0yNjCVyeHqNyRr02oEQnExAhKk3vUYUVQJeu/PahpC
         QYvsC4EWZg6l7e1gnSWLzMzbtYBGnLvWjYR8OByXv89pFyRTh47vmRNpBAs1T8TYlFhU
         k6OFFgnbU8JPHMQ0VYu6425+zTNCdW3IH2AUZkJjE0rRNlEcLDn8oX5pGqTyFb2uZYM2
         Ss0OYdIy+WP0bjpkLrQth9EuLebIKc/GltP5UJYpjmjA57Db/DUSQhryVX6g4fkKScvK
         7jGQ==
X-Gm-Message-State: AOJu0YzdnC32dqEUiKkt7R5XKiZEIuSB1kPjQotNfaU3K7PdWNv2eErV
	yzseaHgFrbslSBUC6HIGVWb/PKP6vy+swaVChTEu5l46Y7yQCVeFM/NSQoR2V98rTLjWSfPpYPZ
	8vo01jXtSaDhzhHnNXTRthPRebg2ScaM1ArKY9xmoq7to8bGnvA==
X-Google-Smtp-Source: AGHT+IGFN1MyYqqMqZmDoz++XX08gla00dnKUYGZu/u2EFHFY2V9YjJi6vdI/nRJBIxiyT+nKyj0xldy02XfiPDSrqU=
X-Received: by 2002:a05:651c:1590:b0:2f7:6371:6c5a with SMTP id
 38308e7fff4ca-2ff0cce821bmr6779581fa.16.1730892562931; Wed, 06 Nov 2024
 03:29:22 -0800 (PST)
MIME-Version: 1.0
References: <20241021114708.453-1-owen.smith@cloud.com> <a23b26b8-b808-4412-a510-86c03e692750@xen.org>
In-Reply-To: <a23b26b8-b808-4412-a510-86c03e692750@xen.org>
From: Owen Smith <owen.smith@citrix.com>
Date: Wed, 6 Nov 2024 11:29:11 +0000
Message-ID: <CAC_UY89f9w+jzmsPMq58h57_h3U=UMrozWrjp3dhgoS0+mejFg@mail.gmail.com>
Subject: Re: [PATCH] Allow BLKIF_OP_WRITE_BARRIER or BLKIF_OP_FLUSH_DISKCACHE...
To: paul@xen.org
Cc: win-pv-devel@lists.xenproject.org
Content-Type: multipart/alternative; boundary="0000000000005bc6b806263cd4e9"

--0000000000005bc6b806263cd4e9
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Yes, "remove unsupported feature" should be the correct comment

Owen

On Wed, Nov 6, 2024 at 11:00=E2=80=AFAM Paul Durrant <xadimgnik@gmail.com> =
wrote:

> On 21/10/2024 12:47, Owen Smith wrote:
> > ... when a SCSIOP_SYNCHRONIZE_CACHE is issued, which should be the last
> > operation issued by the crash kernel.
> > Certain backends do not advertise WriteBarrier support, and use
> SyncDiskCache
> > instead. Add support for creating crashdumps on these backends.
> >
> > Signed-off-by: Owen Smith <owen.smith@cloud.com>
> > ---
> >   src/xencrsh/frontend.c | 13 ++++++++++++-
> >   src/xencrsh/frontend.h |  1 +
> >   src/xencrsh/pdo.c      | 27 ++++++++++++++++++++++++---
> >   3 files changed, 37 insertions(+), 4 deletions(-)
> >
>
> Reviewed-by: Paul Durrant <paul@xen.org>
>
> ... with one query...
>
> > diff --git a/src/xencrsh/frontend.c b/src/xencrsh/frontend.c
> > index d88f498..0b9e46b 100644
> > --- a/src/xencrsh/frontend.c
> > +++ b/src/xencrsh/frontend.c
> > @@ -268,6 +268,7 @@ FrontendInsertRequestOnRing(
> >           }
> >           break;
> >       case BLKIF_OP_WRITE_BARRIER:
> > +    case BLKIF_OP_FLUSH_DISKCACHE:
> >           RingReq->operation          =3D Request->Operation;
> >           RingReq->nr_segments        =3D 0;
> >           RingReq->handle             =3D (USHORT)Frontend->DeviceId;
> > @@ -470,6 +471,15 @@ __ReadFeatures(
> >           Frontend->FeatureBarrier =3D FALSE;
> >       }
> >
> > +    Status =3D StoreRead(NULL, Frontend->BackendPath,
> > +                        "feature-flush-cache", &Buffer);
> > +    if (NT_SUCCESS(Status)) {
> > +        Frontend->FeatureFlush =3D (strtoul(Buffer, NULL, 10) =3D=3D 1=
);
> > +        AustereFree(Buffer);
> > +    } else {
> > +        Frontend->FeatureFlush =3D FALSE;
> > +    }
> > +
> >       Status =3D StoreRead(NULL, Frontend->BackendPath,
> >                           "feature-discard", &Buffer);
> >       if (NT_SUCCESS(Status)) {
> > @@ -479,9 +489,10 @@ __ReadFeatures(
> >           Frontend->FeatureDiscard =3D FALSE;
> >       }
> >
> > -    LogVerbose("Features: DomId=3D%d, RingOrder=3D0, %s %s\n",
> > +    LogVerbose("Features: DomId=3D%d, RingOrder=3D0, %s %s %s\n",
> >                   Frontend->BackendId,
> >                   Frontend->FeatureBarrier ? "BARRIER" : "NOT_BARRIER",
> > +                Frontend->FeatureFlush ? "FLUSH" : "NOT_FLUSH",
> >                   Frontend->FeatureDiscard ? "DISCARD" : "NOT_DISCARD")=
;
> >   }
> >   static VOID
> > diff --git a/src/xencrsh/frontend.h b/src/xencrsh/frontend.h
> > index 174e4d7..2e2c305 100644
> > --- a/src/xencrsh/frontend.h
> > +++ b/src/xencrsh/frontend.h
> > @@ -62,6 +62,7 @@ typedef struct _XENVBD_FRONTEND {
> >       // Capabilities
> >       BOOLEAN                     Connected;
> >       BOOLEAN                     FeatureBarrier;
> > +    BOOLEAN                     FeatureFlush;
> >       BOOLEAN                     FeatureDiscard;
> >       BOOLEAN                     Paging;
> >       BOOLEAN                     Hibernation;
> > diff --git a/src/xencrsh/pdo.c b/src/xencrsh/pdo.c
> > index 9fe3c53..76c4d59 100644
> > --- a/src/xencrsh/pdo.c
> > +++ b/src/xencrsh/pdo.c
> > @@ -564,17 +564,31 @@ PrepareSyncCache(
> >   {
> >       PXENVBD_SRBEXT          SrbExt =3D GetSrbExt(Srb);
> >       PXENVBD_REQUEST         Request;
> > -
> > +    UCHAR                   Operation;
> > +
> > +    if (Pdo->Frontend.FeatureBarrier) {
> > +        Operation =3D BLKIF_OP_WRITE_BARRIER;
> > +    } else if (Pdo->Frontend.FeatureFlush) {
> > +        Operation =3D BLKIF_OP_FLUSH_DISKCACHE;
> > +    } else {
> > +        // cannot submit this to backend, just complete the SRB
> > +        Srb->SrbStatus =3D SRB_STATUS_SUCCESS;
> > +        Srb->ScsiStatus =3D 0x00; // SCSI_GOOD
> > +
> > +        FdoCompleteSrb(Pdo->Fdo, Srb);
> > +        return;
> > +    }
> > +
> >       SrbExt->NumRequests =3D 1;
> >       Request =3D &SrbExt->Requests[0];
> >       Request->Srb =3D Srb;
> >
> > -    Request->Operation      =3D BLKIF_OP_WRITE_BARRIER;
> > +    Request->Operation      =3D Operation;
> >       Request->NrSegments     =3D 0;
> >       Request->FirstSector    =3D Cdb_LogicalBlock(Srb);
> >       Request->NrSectors      =3D 0;
> >
> > -    __UpdateStats(Pdo, BLKIF_OP_WRITE_BARRIER);
> > +    __UpdateStats(Pdo, Operation);
> >       QueueInsertTail(&Pdo->PreparedSrbs, Srb);
> >   }
> >
> > @@ -692,6 +706,13 @@ PdoCompleteSubmittedRequest(
> >               Pdo->Frontend.FeatureBarrier =3D FALSE;
> >           }
> >           break;
> > +    case BLKIF_OP_FLUSH_DISKCACHE:
> > +        LogVerbose("FLUSH\n");
> > +        if (Status =3D=3D BLKIF_RSP_EOPNOTSUPP) {
> > +            // remove supported feature
>
> Shouldn't this say 'remove unsupported feature'?
>
> > +            Pdo->Frontend.FeatureFlush =3D FALSE;
> > +        }
> > +        break;
> >       case BLKIF_OP_DISCARD:
> >           LogVerbose("DISCARD\n");
> >           if (Status =3D=3D BLKIF_RSP_EOPNOTSUPP) {
>
>
>

--0000000000005bc6b806263cd4e9
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac=
e">Yes, &quot;remove unsupported feature&quot; should be the correct commen=
t</div><div class=3D"gmail_default" style=3D"font-family:monospace"><br></d=
iv><div class=3D"gmail_default" style=3D"font-family:monospace">Owen</div><=
/div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">O=
n Wed, Nov 6, 2024 at 11:00=E2=80=AFAM Paul Durrant &lt;<a href=3D"mailto:x=
adimgnik@gmail.com">xadimgnik@gmail.com</a>&gt; wrote:<br></div><blockquote=
 class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so=
lid rgb(204,204,204);padding-left:1ex">On 21/10/2024 12:47, Owen Smith wrot=
e:<br>
&gt; ... when a SCSIOP_SYNCHRONIZE_CACHE is issued, which should be the las=
t<br>
&gt; operation issued by the crash kernel.<br>
&gt; Certain backends do not advertise WriteBarrier support, and use SyncDi=
skCache<br>
&gt; instead. Add support for creating crashdumps on these backends.<br>
&gt; <br>
&gt; Signed-off-by: Owen Smith &lt;<a href=3D"mailto:owen.smith@cloud.com" =
target=3D"_blank">owen.smith@cloud.com</a>&gt;<br>
&gt; ---<br>
&gt;=C2=A0 =C2=A0src/xencrsh/frontend.c | 13 ++++++++++++-<br>
&gt;=C2=A0 =C2=A0src/xencrsh/frontend.h |=C2=A0 1 +<br>
&gt;=C2=A0 =C2=A0src/xencrsh/pdo.c=C2=A0 =C2=A0 =C2=A0 | 27 +++++++++++++++=
+++++++++---<br>
&gt;=C2=A0 =C2=A03 files changed, 37 insertions(+), 4 deletions(-)<br>
&gt; <br>
<br>
Reviewed-by: Paul Durrant &lt;<a href=3D"mailto:paul@xen.org" target=3D"_bl=
ank">paul@xen.org</a>&gt;<br>
<br>
... with one query...<br>
<br>
&gt; diff --git a/src/xencrsh/frontend.c b/src/xencrsh/frontend.c<br>
&gt; index d88f498..0b9e46b 100644<br>
&gt; --- a/src/xencrsh/frontend.c<br>
&gt; +++ b/src/xencrsh/frontend.c<br>
&gt; @@ -268,6 +268,7 @@ FrontendInsertRequestOnRing(<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0case BLKIF_OP_WRITE_BARRIER:<br>
&gt; +=C2=A0 =C2=A0 case BLKIF_OP_FLUSH_DISKCACHE:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0RingReq-&gt;operation=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D Request-&gt;Operation;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0RingReq-&gt;nr_segments=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =3D 0;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0RingReq-&gt;handle=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D (USHORT)Frontend-&gt;DeviceId;<br=
>
&gt; @@ -470,6 +471,15 @@ __ReadFeatures(<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Frontend-&gt;FeatureBarrier =
=3D FALSE;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0}<br>
&gt;=C2=A0 =C2=A0<br>
&gt; +=C2=A0 =C2=A0 Status =3D StoreRead(NULL, Frontend-&gt;BackendPath,<br=
>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 &quot;feature-flush-cache&quot;, &amp;Buffer);<br>
&gt; +=C2=A0 =C2=A0 if (NT_SUCCESS(Status)) {<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 Frontend-&gt;FeatureFlush =3D (strtoul(Bu=
ffer, NULL, 10) =3D=3D 1);<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 AustereFree(Buffer);<br>
&gt; +=C2=A0 =C2=A0 } else {<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 Frontend-&gt;FeatureFlush =3D FALSE;<br>
&gt; +=C2=A0 =C2=A0 }<br>
&gt; +<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0Status =3D StoreRead(NULL, Frontend-&gt;Back=
endPath,<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;feature-discard&quot;, &amp;Buffer);<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0if (NT_SUCCESS(Status)) {<br>
&gt; @@ -479,9 +489,10 @@ __ReadFeatures(<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Frontend-&gt;FeatureDiscard =
=3D FALSE;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0}<br>
&gt;=C2=A0 =C2=A0<br>
&gt; -=C2=A0 =C2=A0 LogVerbose(&quot;Features: DomId=3D%d, RingOrder=3D0, %=
s %s\n&quot;,<br>
&gt; +=C2=A0 =C2=A0 LogVerbose(&quot;Features: DomId=3D%d, RingOrder=3D0, %=
s %s %s\n&quot;,<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Fr=
ontend-&gt;BackendId,<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Fr=
ontend-&gt;FeatureBarrier ? &quot;BARRIER&quot; : &quot;NOT_BARRIER&quot;,<=
br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Frontend-&gt;=
FeatureFlush ? &quot;FLUSH&quot; : &quot;NOT_FLUSH&quot;,<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Fr=
ontend-&gt;FeatureDiscard ? &quot;DISCARD&quot; : &quot;NOT_DISCARD&quot;);=
<br>
&gt;=C2=A0 =C2=A0}<br>
&gt;=C2=A0 =C2=A0static VOID<br>
&gt; diff --git a/src/xencrsh/frontend.h b/src/xencrsh/frontend.h<br>
&gt; index 174e4d7..2e2c305 100644<br>
&gt; --- a/src/xencrsh/frontend.h<br>
&gt; +++ b/src/xencrsh/frontend.h<br>
&gt; @@ -62,6 +62,7 @@ typedef struct _XENVBD_FRONTEND {<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0// Capabilities<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0BOOLEAN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Connected;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0BOOLEAN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FeatureBarrier;<br>
&gt; +=C2=A0 =C2=A0 BOOLEAN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0FeatureFlush;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0BOOLEAN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FeatureDiscard;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0BOOLEAN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Paging;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0BOOLEAN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Hibernation;<br>
&gt; diff --git a/src/xencrsh/pdo.c b/src/xencrsh/pdo.c<br>
&gt; index 9fe3c53..76c4d59 100644<br>
&gt; --- a/src/xencrsh/pdo.c<br>
&gt; +++ b/src/xencrsh/pdo.c<br>
&gt; @@ -564,17 +564,31 @@ PrepareSyncCache(<br>
&gt;=C2=A0 =C2=A0{<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0PXENVBD_SRBEXT=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 SrbExt =3D GetSrbExt(Srb);<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0PXENVBD_REQUEST=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0Request;<br>
&gt; -<br>
&gt; +=C2=A0 =C2=A0 UCHAR=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0Operation;<br>
&gt; +<br>
&gt; +=C2=A0 =C2=A0 if (Pdo-&gt;Frontend.FeatureBarrier) {<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 Operation =3D BLKIF_OP_WRITE_BARRIER;<br>
&gt; +=C2=A0 =C2=A0 } else if (Pdo-&gt;Frontend.FeatureFlush) {<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 Operation =3D BLKIF_OP_FLUSH_DISKCACHE;<b=
r>
&gt; +=C2=A0 =C2=A0 } else {<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 // cannot submit this to backend, just co=
mplete the SRB<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 Srb-&gt;SrbStatus =3D SRB_STATUS_SUCCESS;=
<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 Srb-&gt;ScsiStatus =3D 0x00; // SCSI_GOOD=
<br>
&gt; +<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 FdoCompleteSrb(Pdo-&gt;Fdo, Srb);<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 return;<br>
&gt; +=C2=A0 =C2=A0 }<br>
&gt; +<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0SrbExt-&gt;NumRequests =3D 1;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0Request =3D &amp;SrbExt-&gt;Requests[0];<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0Request-&gt;Srb =3D Srb;<br>
&gt;=C2=A0 =C2=A0<br>
&gt; -=C2=A0 =C2=A0 Request-&gt;Operation=C2=A0 =C2=A0 =C2=A0 =3D BLKIF_OP_=
WRITE_BARRIER;<br>
&gt; +=C2=A0 =C2=A0 Request-&gt;Operation=C2=A0 =C2=A0 =C2=A0 =3D Operation=
;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0Request-&gt;NrSegments=C2=A0 =C2=A0 =C2=A0=
=3D 0;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0Request-&gt;FirstSector=C2=A0 =C2=A0 =3D Cdb=
_LogicalBlock(Srb);<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0Request-&gt;NrSectors=C2=A0 =C2=A0 =C2=A0 =
=3D 0;<br>
&gt;=C2=A0 =C2=A0<br>
&gt; -=C2=A0 =C2=A0 __UpdateStats(Pdo, BLKIF_OP_WRITE_BARRIER);<br>
&gt; +=C2=A0 =C2=A0 __UpdateStats(Pdo, Operation);<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0QueueInsertTail(&amp;Pdo-&gt;PreparedSrbs, S=
rb);<br>
&gt;=C2=A0 =C2=A0}<br>
&gt;=C2=A0 =C2=A0<br>
&gt; @@ -692,6 +706,13 @@ PdoCompleteSubmittedRequest(<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Pdo-&gt;Frontend=
.FeatureBarrier =3D FALSE;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt; +=C2=A0 =C2=A0 case BLKIF_OP_FLUSH_DISKCACHE:<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 LogVerbose(&quot;FLUSH\n&quot;);<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (Status =3D=3D BLKIF_RSP_EOPNOTSUPP) {=
<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // remove supported feature=
<br>
<br>
Shouldn&#39;t this say &#39;remove unsupported feature&#39;?<br>
<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Pdo-&gt;Frontend.FeatureFlu=
sh =3D FALSE;<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 }<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0case BLKIF_OP_DISCARD:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0LogVerbose(&quot;DISCARD\n&quo=
t;);<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (Status =3D=3D BLKIF_RSP_EO=
PNOTSUPP) {<br>
<br>
<br>
</blockquote></div>

--0000000000005bc6b806263cd4e9--


From win-pv-devel-bounces@lists.xenproject.org Wed Nov 06 11:41:49 2024
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Wed, 06 Nov 2024 11:41:49 +0000
Received: from list by lists.xenproject.org with outflank-mailman.830778.1245855 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1t8eQ0-0007XN-AY; Wed, 06 Nov 2024 11:41:48 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 830778.1245855; Wed, 06 Nov 2024 11:41:48 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1t8eQ0-0007XG-7f; Wed, 06 Nov 2024 11:41:48 +0000
Received: by outflank-mailman (input) for mailman id 830778;
 Wed, 06 Nov 2024 11:41:47 +0000
Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50]
 helo=se1-gles-flk1.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=tHtw=SB=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1t8ePz-0007RL-6w
 for win-pv-devel@lists.xenproject.org; Wed, 06 Nov 2024 11:41:47 +0000
Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com
 [2a00:1450:4864:20::42a])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id 185b63e2-9c34-11ef-99a3-01e77a169b0f;
 Wed, 06 Nov 2024 12:41:44 +0100 (CET)
Received: by mail-wr1-x42a.google.com with SMTP id
 ffacd0b85a97d-37d49ffaba6so4459627f8f.0
 for <win-pv-devel@lists.xenproject.org>; Wed, 06 Nov 2024 03:41:43 -0800 (PST)
Received: from [192.168.3.233] (54-240-197-232.amazon.com. [54.240.197.232])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-381c10b7b50sm19165261f8f.6.2024.11.06.03.41.42
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 06 Nov 2024 03:41:42 -0800 (PST)
X-BeenThere: win-pv-devel@lists.xenproject.org
List-Id: Developer list for the Windows PV Drivers subproject
 <win-pv-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:win-pv-devel@lists.xenproject.org>
List-Help: <mailto:win-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: win-pv-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "win-pv-devel" <win-pv-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 185b63e2-9c34-11ef-99a3-01e77a169b0f
X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo0MmEiLCJoZWxvIjoibWFpbC13cjEteDQyYS5nb29nbGUuY29tIn0=
X-Custom-Transaction: eyJpZCI6IjE4NWI2M2UyLTljMzQtMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMwODkzMzA0LjAyMjczMSwic2VuZGVyIjoieGFkaW1nbmlrQGdtYWlsLmNvbSIsInJlY2lwaWVudCI6Indpbi1wdi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1730893303; x=1731498103; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:organization:reply-to
         :content-language:references:to:subject:user-agent:mime-version:date
         :message-id:from:from:to:cc:subject:date:message-id:reply-to;
        bh=HfANUCWlyUJMlvGgohWI57VdlsoYG6JUlJ0/vvohtkg=;
        b=TofQbup11Hi3N4Gt0yfyhcxVYBFLY4hNMnDZkF7egE1JrW4yRg015tc4Ocviemnzgy
         c2CP3VFhWJ3UuQbTavA4pR3RVUwuiOBO0B7uw7FZ8ozn7X/mhayx1NAYJa92SOco9utL
         FkV8P2bSzK6OqnFFIy/GO9RNFCjXEMHe9eBnjZav0zhgcoEjURI3t4BIMWmeYKzbwX/Y
         Fp35r6MQ6/7rOeJ7vONxLeWiPM8c04zwHKAPIgQLdyRP5Zw9Z5YTLBSYPgaGPbj5Ymz2
         3oYuR/L4g+M0eV8R3CogV55JyQgee05fhrudUOk5NzGUYrGlVpufEuEZ9Ol1syyjkaQ1
         az6Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1730893303; x=1731498103;
        h=content-transfer-encoding:in-reply-to:organization:reply-to
         :content-language:references:to:subject:user-agent:mime-version:date
         :message-id:from:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to;
        bh=HfANUCWlyUJMlvGgohWI57VdlsoYG6JUlJ0/vvohtkg=;
        b=H+Hp38Vv92L7BEhaiPH9fJbsxZnY1FgD5RvSyBT/vqtzJG9S6EV59r9nXr5lYuDuS1
         gseFWmVMpzOgrtsNDAyiGs0I+JSs3TeBR71ovVz9enV/i5EACxhAsKrYaiVRh6X0if4u
         sNBezMNWuLAUJqicsUdjsBmS1x08AkL74soiZhovr6v/iynY8pNxY7Kf/fwh4E/57m33
         PcqFQ/6LU4gesNUyMYcfcGGXy+Pna1NGt4vPsjEuS9zo32XrpfGmin1mhcoVP7rHRXnl
         9+HFHBDuK6ruOKranjj3N5TX2KwxPFS06iuSu2eJPz3EpuccxUZgbvSl7yM6ueSiBGpa
         cw9g==
X-Gm-Message-State: AOJu0YzAbH029ceK5DtT5m5czbm8k5BdpiKPf1KlBlnEwvJHWgM/RnSC
	nCVsb/knM9BXCPRmnIYqtDVb0QL4cge4xwV1iY0aq7Cb64qxUne+vW7LcBAs
X-Google-Smtp-Source: AGHT+IEyNhuhZYjrnD55evCvbytYbmMpCbPCEdFhk2CwnNiAoNcSJPOVpNxbY+sXtq1/2EJRBcsBkw==
X-Received: by 2002:adf:e686:0:b0:37d:3964:e0f1 with SMTP id ffacd0b85a97d-381b70578b3mr21118817f8f.4.1730893302689;
        Wed, 06 Nov 2024 03:41:42 -0800 (PST)
From: Paul Durrant <xadimgnik@gmail.com>
X-Google-Original-From: Paul Durrant <paul@xen.org>
Message-ID: <148c98ca-41a7-4ec2-abf3-ae083ea31f21@xen.org>
Date: Wed, 6 Nov 2024 11:41:41 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] Add DeviceID info to DisplayNames
To: win-pv-devel@lists.xenproject.org
References: <20241028130217.816-1-owen.smith@cloud.com>
 <40dad162-0ee9-458d-9855-0f208738cb9c@xen.org>
Content-Language: en-US
Reply-To: paul@xen.org
Organization: Xen Project
In-Reply-To: <40dad162-0ee9-458d-9855-0f208738cb9c@xen.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

On 06/11/2024 11:04, Paul Durrant wrote:
> On 28/10/2024 13:02, Owen Smith wrote:
>> Append the DeviceID info to the strings used for the DisplayName strings.
>> Use the current genfiles.ps1 script, as part of the version project, to
> 
> What is the 'version project'?
> 
>> populate the %XenBusName_VEND% value (or remove the lines) to match the
>> binding hardware ID.
>>
> 
> Also, shouldn't the PRODUCT_NAME already convey the requisite information?
> 
>> Signed-off-by: Owen Smith <owen.smith@cloud.com>
>> ---
>>   src/xenbus.inf | 9 ++++++---
>>   1 file changed, 6 insertions(+), 3 deletions(-)
>>

After further explanation from Owen...

Acked-by: Paul Durrant <paul@xen.org>

>> diff --git a/src/xenbus.inf b/src/xenbus.inf
>> index 73a2b11..7cc9ac2 100644
>> --- a/src/xenbus.inf
>> +++ b/src/xenbus.inf
>> @@ -69,9 +69,9 @@ 
>> xenbus_monitor_@MAJOR_VERSION@_@MINOR_VERSION@_@MICRO_VERSION@_@BUILD_NUMBER@.dl
>>   ; DisplayName        Section        DeviceID
>>   ; -----------        -------        --------
>> -%XenBusName%        =XenBus_Inst,    
>> PCI\VEN_5853&DEV_@VENDOR_DEVICE_ID@&SUBSYS_@VENDOR_DEVICE_ID@5853&REV_01
>> -%XenBusName%        =XenBus_Inst,    PCI\VEN_5853&DEV_0002
>> -%XenBusName%        =XenBus_Inst,    PCI\VEN_5853&DEV_0001
>> +%XenBusName_VEND%    =XenBus_Inst,    
>> PCI\VEN_5853&DEV_@VENDOR_DEVICE_ID@&SUBSYS_@VENDOR_DEVICE_ID@5853&REV_01
>> +%XenBusName_0002%    =XenBus_Inst,    PCI\VEN_5853&DEV_0002
>> +%XenBusName_0001%    =XenBus_Inst,    PCI\VEN_5853&DEV_0001
>>   [XenBus_Inst]
>>   CopyFiles=XenBus_CopyFiles
>> @@ -149,6 +149,9 @@ HKR,,TypesSupported,0x00010001,7
>>   Vendor="@VENDOR_NAME@"
>>   DiskDesc="@PRODUCT_NAME@ PV Bus Package"
>>   XenBusName="@PRODUCT_NAME@ PV Bus"
>> +XenBusName_VEND="@PRODUCT_NAME@ PV Bus (@VENDOR_DEVICE_ID@)"
>> +XenBusName_0002="@PRODUCT_NAME@ PV Bus (0002)"
>> +XenBusName_0001="@PRODUCT_NAME@ PV Bus (0001)"
>>   XenFiltName="@PRODUCT_NAME@ Generic Bus Filter"
>>   MonitorName="@PRODUCT_NAME@ PV Driver Monitor"
>>   MonitorDesc="Provides support for @PRODUCT_NAME@ PV drivers"
> 



From win-pv-devel-bounces@lists.xenproject.org Mon Nov 25 13:04:58 2024
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 25 Nov 2024 13:04:58 +0000
Received: from list by lists.xenproject.org with outflank-mailman.842538.1258067 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1tFYls-0006t4-CN; Mon, 25 Nov 2024 13:04:56 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 842538.1258067; Mon, 25 Nov 2024 13:04:56 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1tFYls-0006sx-9g; Mon, 25 Nov 2024 13:04:56 +0000
Received: by outflank-mailman (input) for mailman id 842538;
 Mon, 25 Nov 2024 13:04:55 +0000
Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254]
 helo=se1-gles-sth1.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=CYeM=SU=bounce.vates.tech=bounce-md_30504962.674475f1.v1-b229ea1826e3476db3b4488908f4fc3b@srs-se1.protection.inumbo.net>)
 id 1tFYlr-0006sr-4h
 for win-pv-devel@lists.xenproject.org; Mon, 25 Nov 2024 13:04:55 +0000
Received: from mail179-37.suw41.mandrillapp.com
 (mail179-37.suw41.mandrillapp.com [198.2.179.37])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id da93c490-ab2d-11ef-a0cd-8be0dac302b0;
 Mon, 25 Nov 2024 14:04:51 +0100 (CET)
Received: from pmta12.mandrill.prod.suw01.rsglab.com (localhost [127.0.0.1])
 by mail179-37.suw41.mandrillapp.com (Mailchimp) with ESMTP id
 4XxmBn654kzG0Jn2W
 for <win-pv-devel@lists.xenproject.org>; Mon, 25 Nov 2024 13:04:49 +0000 (GMT)
Received: from [37.26.189.201] by mandrillapp.com id
 b229ea1826e3476db3b4488908f4fc3b; Mon, 25 Nov 2024 13:04:49 +0000
X-BeenThere: win-pv-devel@lists.xenproject.org
List-Id: Developer list for the Windows PV Drivers subproject
 <win-pv-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:win-pv-devel@lists.xenproject.org>
List-Help: <mailto:win-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: win-pv-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "win-pv-devel" <win-pv-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: da93c490-ab2d-11ef-a0cd-8be0dac302b0
X-Custom-Connection: eyJyZW1vdGVpcCI6IjE5OC4yLjE3OS4zNyIsImhlbG8iOiJtYWlsMTc5LTM3LnN1dzQxLm1hbmRyaWxsYXBwLmNvbSJ9
X-Custom-Transaction: eyJpZCI6ImRhOTNjNDkwLWFiMmQtMTFlZi1hMGNkLThiZTBkYWMzMDJiMCIsInRzIjoxNzMyNTM5ODkxLjU3NDgwNiwic2VuZGVyIjoiYm91bmNlLW1kXzMwNTA0OTYyLjY3NDQ3NWYxLnYxLWIyMjllYTE4MjZlMzQ3NmRiM2I0NDg4OTA4ZjRmYzNiQGJvdW5jZS52YXRlcy50ZWNoIiwicmVjaXBpZW50Ijoid2luLXB2LWRldmVsQGxpc3RzLnhlbnByb2plY3Qub3JnIn0=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com;
	s=mte1; t=1732539889; x=1732800389;
	bh=kUkE9F7ozfL24uV4HK1qogkT7ZH3McTAfAwXNl9QssE=;
	h=From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version:
	 Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From;
	b=fci6zEw75TR2bn/UmqHDDX9O6ants2HgGTWnrTtH9x1kfPe7LJDiAGrnb6sB43JZL
	 o0Tkj9cIwnDV9i8wawkwDnPoPY2nrlT+UTC4mYI2re9i//7c9Ooe8Ab7QTFe1ENjLu
	 hpM4M/EglC64ZPlcwhTpJSHFPnpkbyd7gNIVdyp4yUISCmPEOO3upbeFCFWhd0sd2S
	 mMNHHGsFlmkwf4T47iV1+onWD5q/pr1lLUHs5NQEaI7djxmhcM53zYpUWXL4I0RYVX
	 dztP+Vi7/NqBPAL+s2BuAkf2MdAvypYz7nbR+2jigiskxSEsHOmF/A5TvU1OxFrqAQ
	 Gen1Z1QtTn0tg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1;
	t=1732539889; x=1732800389; i=ngoc-tu.dinh@vates.tech;
	bh=kUkE9F7ozfL24uV4HK1qogkT7ZH3McTAfAwXNl9QssE=;
	h=From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version:
	 Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From;
	b=KYjXWWrJLf+0sCnf5yWgnhK7KWoNfsbydgMssneWA31NRthJPSQALeRDwFcsECvo2
	 TgtQGbshnXpM5lCd2Ytf8E2B1Z/9KTaDqvdju+b0MBtFZkRXq7hyh4gtIZYmxDxoon
	 sn9SzSr74vAIJesn08jIDuNWkFJdJv/61cdvYsYqMcVAgoAxkNLWpL36nyoaTck4A0
	 38gFIX7JYcqy3thWDWt1LYN5AULtd0gy22CZBBm/c0XJYgVRnCfoAl5l3QkAauXPqA
	 EmtBo+8n2cIyOA6BJTCbuW7xNHubPZGhsmZtxp4oXKJIp0+gmgJo6POW9KlqjCS9yB
	 KE+ypr0T0Egyw==
From: "Tu Dinh" <ngoc-tu.dinh@vates.tech>
Subject: =?utf-8?Q?[PATCH]=20Fix=20=5F=5FFrontendUpdateHash?=
X-Mailer: git-send-email 2.47.0.windows.2
X-Bm-Disclaimer: Yes
X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2
X-Bm-Transport-Timestamp: 1732539889087
To: win-pv-devel@lists.xenproject.org
Cc: "Paul Durrant" <paul@xen.org>, "Owen Smith" <owen.smith@cloud.com>, "Tu Dinh" <ngoc-tu.dinh@vates.tech>
Message-Id: <20241125130415.665-1-ngoc-tu.dinh@vates.tech>
X-Native-Encoded: 1
X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.b229ea1826e3476db3b4488908f4fc3b?=
X-Mandrill-User: md_30504962
Feedback-ID: 30504962:30504962.20241125:md
Date: Mon, 25 Nov 2024 13:04:49 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Fix an issue where __FrontendUpdateHash tries to
set controller hash algorithm to Toeplitz even if
its hash parameter was set to
XEN_NETIF_CTRL_HASH_ALGORITHM_NONE.

Signed-off-by: Tu Dinh <ngoc-tu.dinh@vates.tech>
---
 src/xenvif/frontend.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/xenvif/frontend.c b/src/xenvif/frontend.c
index dab0ebb..79b04fb 100644
--- a/src/xenvif/frontend.c
+++ b/src/xenvif/frontend.c
@@ -1911,10 +1911,13 @@ __FrontendUpdateHash(
     }
 
     status = ControllerSetHashAlgorithm(Controller,
-                                        XEN_NETIF_CTRL_HASH_ALGORITHM_TOEPLITZ);
+                                        Hash->Algorithm);
     if (!NT_SUCCESS(status))
         goto fail1;
 
+    if (Hash->Algorithm == XEN_NETIF_CTRL_HASH_ALGORITHM_NONE)
+        goto done;
+
     status = ControllerSetHashMappingSize(Controller, Size);
     if (!NT_SUCCESS(status))
         goto fail2;
-- 
2.47.0.windows.2



Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech


From win-pv-devel-bounces@lists.xenproject.org Mon Nov 25 13:05:12 2024
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 25 Nov 2024 13:05:12 +0000
Received: from list by lists.xenproject.org with outflank-mailman.842539.1258070 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1tFYm8-0006vc-EA; Mon, 25 Nov 2024 13:05:12 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 842539.1258070; Mon, 25 Nov 2024 13:05:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1tFYm8-0006vV-Bi; Mon, 25 Nov 2024 13:05:12 +0000
Received: by outflank-mailman (input) for mailman id 842539;
 Mon, 25 Nov 2024 13:05:11 +0000
Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254]
 helo=se1-gles-sth1.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=76d+=SU=bounce.vates.tech=bounce-md_30504962.67447603.v1-ec678d3070a74ac7be01a0c597592d30@srs-se1.protection.inumbo.net>)
 id 1tFYm7-0006sr-EK
 for win-pv-devel@lists.xenproject.org; Mon, 25 Nov 2024 13:05:11 +0000
Received: from mail179-37.suw41.mandrillapp.com
 (mail179-37.suw41.mandrillapp.com [198.2.179.37])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id e53cbec7-ab2d-11ef-a0cd-8be0dac302b0;
 Mon, 25 Nov 2024 14:05:08 +0100 (CET)
Received: from pmta12.mandrill.prod.suw01.rsglab.com (localhost [127.0.0.1])
 by mail179-37.suw41.mandrillapp.com (Mailchimp) with ESMTP id
 4XxmC76rs2zG0CCPB
 for <win-pv-devel@lists.xenproject.org>; Mon, 25 Nov 2024 13:05:07 +0000 (GMT)
Received: from [37.26.189.201] by mandrillapp.com id
 ec678d3070a74ac7be01a0c597592d30; Mon, 25 Nov 2024 13:05:07 +0000
X-BeenThere: win-pv-devel@lists.xenproject.org
List-Id: Developer list for the Windows PV Drivers subproject
 <win-pv-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:win-pv-devel@lists.xenproject.org>
List-Help: <mailto:win-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: win-pv-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "win-pv-devel" <win-pv-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: e53cbec7-ab2d-11ef-a0cd-8be0dac302b0
X-Custom-Connection: eyJyZW1vdGVpcCI6IjE5OC4yLjE3OS4zNyIsImhlbG8iOiJtYWlsMTc5LTM3LnN1dzQxLm1hbmRyaWxsYXBwLmNvbSJ9
X-Custom-Transaction: eyJpZCI6ImU1M2NiZWM3LWFiMmQtMTFlZi1hMGNkLThiZTBkYWMzMDJiMCIsInRzIjoxNzMyNTM5OTA5LjAwMjk3Mywic2VuZGVyIjoiYm91bmNlLW1kXzMwNTA0OTYyLjY3NDQ3NjAzLnYxLWVjNjc4ZDMwNzBhNzRhYzdiZTAxYTBjNTk3NTkyZDMwQGJvdW5jZS52YXRlcy50ZWNoIiwicmVjaXBpZW50Ijoid2luLXB2LWRldmVsQGxpc3RzLnhlbnByb2plY3Qub3JnIn0=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com;
	s=mte1; t=1732539908; x=1732800408;
	bh=RDeIfh50t6a+IYujT9qmLrwJ7fu4R4hWwUDd4csu83Y=;
	h=From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version:
	 Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From;
	b=Bh2x8uozy+1mRZbRnzkZa+SuBnE+nyX6oAE2ajhcKikR2CDu2AN+G2dDC8psLLjq8
	 KNGuCZTKpzgCPgTOAkY/eWvEsu4fgNWb2C7UGoynBbyYZ5Vx+5ot/KWmMQaPaAnMiy
	 mgqFTTac71SgC10CPToLpyAWB56SV7vUewGPjv3HuHqGnxiwUfsX/8eqVj1ZbuFoe1
	 6ZAAdZ/DFlGKtaalHpMTRSZK3DbexIAUcq0JkR5SQzZJls/n+rPBqz0Mk+y7ys8U/q
	 +qigBfS4ry3ui2NZNBKsE5mbTZow3Lce6i/GaEJpZnuznLrpU6cZVtcZBonWdwPvjm
	 WZNejbhb+4wYA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1;
	t=1732539908; x=1732800408; i=ngoc-tu.dinh@vates.tech;
	bh=RDeIfh50t6a+IYujT9qmLrwJ7fu4R4hWwUDd4csu83Y=;
	h=From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version:
	 Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From;
	b=B2QVLG7JlWuvNPpMW4sFd01Tdc9sfiIHVYE9h/OAUlIVEAZDWCRyoHME+/0hG9kRn
	 58kR3Fujv4ZZhfQCLmW5MVPn18I93saq4t+ldh+jnmbLqhKl7FHSTCp4nvIlxaeIE6
	 AvCsjLIAwVhNQgGm6vg/IL/vmpM81Stn+UhcENokCmi+sS8PdZt5SmRd66/iwZqiOZ
	 tOrCScM5Z9FKM5yf+6fvfB93KZQJnu6o7tO3LGg5cDIf9k7xZ++97WLsOA64kGfJaz
	 SurGwBK1jZFeCAnEpq8ffOCPlh2F/8vpoMps70cc0ZZaXdpiHeekL6ShimGT+kVO6W
	 xyDGqNDvaPWuQ==
From: "Tu Dinh" <ngoc-tu.dinh@vates.tech>
Subject: =?utf-8?Q?[PATCH]=20Fix=20signed=20comparison=20in=20Mrsw.h?=
X-Mailer: git-send-email 2.47.0.windows.2
X-Bm-Disclaimer: Yes
X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2
X-Bm-Transport-Timestamp: 1732539907287
To: win-pv-devel@lists.xenproject.org
Cc: "Paul Durrant" <paul@xen.org>, "Owen Smith" <owen.smith@cloud.com>, "Tu Dinh" <ngoc-tu.dinh@vates.tech>
Message-Id: <20241125130501.1395-1-ngoc-tu.dinh@vates.tech>
X-Native-Encoded: 1
X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.ec678d3070a74ac7be01a0c597592d30?=
X-Mandrill-User: md_30504962
Feedback-ID: 30504962:30504962.20241125:md
Date: Mon, 25 Nov 2024 13:05:07 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Signed-off-by: Tu Dinh <ngoc-tu.dinh@vates.tech>
---
 src/xenvif/mrsw.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/xenvif/mrsw.h b/src/xenvif/mrsw.h
index f82d329..e1ff056 100644
--- a/src/xenvif/mrsw.h
+++ b/src/xenvif/mrsw.h
@@ -64,7 +64,7 @@ InitializeMrswLock(
 
     RtlZeroMemory(Lock, sizeof (XENVIF_MRSW_LOCK));
 
-    for (Slot = 0; Slot < sizeof (Lock->Mask) * 8; Slot++)
+    for (Slot = 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++)
         Lock->Holder[Slot].Level = -1;
 
     KeInitializeEvent(&Lock->Event, NotificationEvent, FALSE);
@@ -103,7 +103,7 @@ __AcquireMrswLockExclusive(
     Self = KeGetCurrentThread();
 
     // Make sure we do not already hold the lock
-    for (Slot = 0; Slot < sizeof (Lock->Mask) * 8; Slot++)
+    for (Slot = 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++)
         ASSERT(Lock->Holder[Slot].Thread != Self);
 
     for (;;) {
@@ -218,7 +218,7 @@ AcquireMrswLockShared(
 
     // Do we already hold the lock? If so, get the nesting level
     Level = -1;
-    for (Slot = 0; Slot < sizeof (Lock->Mask) * 8; Slot++) {
+    for (Slot = 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++) {
         if (Lock->Holder[Slot].Thread == Self && Lock->Holder[Slot].Level > Level)
             Level = Lock->Holder[Slot].Level;
     }
@@ -261,7 +261,7 @@ ReleaseMrswLockShared(
 
     Level = -1;
     Deepest = -1;
-    for (Slot = 0; Slot < sizeof (Lock->Mask) * 8; Slot++) {
+    for (Slot = 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++) {
         if (Lock->Holder[Slot].Thread == Self && Lock->Holder[Slot].Level > Level) {
             Level = Lock->Holder[Slot].Level;
             Deepest = Slot;
-- 
2.47.0.windows.2



Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech


From win-pv-devel-bounces@lists.xenproject.org Mon Nov 25 13:53:54 2024
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 25 Nov 2024 13:53:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.842575.1258171 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1tFZXE-0005JQ-JG; Mon, 25 Nov 2024 13:53:52 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 842575.1258171; Mon, 25 Nov 2024 13:53:52 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1tFZXE-0005JJ-Fj; Mon, 25 Nov 2024 13:53:52 +0000
Received: by outflank-mailman (input) for mailman id 842575;
 Mon, 25 Nov 2024 13:53:52 +0000
Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254]
 helo=se1-gles-sth1.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=vV+b=SU=bounce.vates.tech=bounce-md_30504962.6744816a.v1-d734db5b2c3c4d76b5f9fef5fe1843da@srs-se1.protection.inumbo.net>)
 id 1tFZXD-0005JD-SV
 for win-pv-devel@lists.xenproject.org; Mon, 25 Nov 2024 13:53:52 +0000
Received: from mail134-5.atl141.mandrillapp.com
 (mail134-5.atl141.mandrillapp.com [198.2.134.5])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id b1462efb-ab34-11ef-a0cd-8be0dac302b0;
 Mon, 25 Nov 2024 14:53:48 +0100 (CET)
Received: from pmta10.mandrill.prod.atl01.rsglab.com (localhost [127.0.0.1])
 by mail134-5.atl141.mandrillapp.com (Mailchimp) with ESMTP id
 4XxnHG2nsjzG0CBYf
 for <win-pv-devel@lists.xenproject.org>; Mon, 25 Nov 2024 13:53:46 +0000 (GMT)
Received: from [37.26.189.201] by mandrillapp.com id
 d734db5b2c3c4d76b5f9fef5fe1843da; Mon, 25 Nov 2024 13:53:46 +0000
X-BeenThere: win-pv-devel@lists.xenproject.org
List-Id: Developer list for the Windows PV Drivers subproject
 <win-pv-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:win-pv-devel@lists.xenproject.org>
List-Help: <mailto:win-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: win-pv-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "win-pv-devel" <win-pv-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: b1462efb-ab34-11ef-a0cd-8be0dac302b0
X-Custom-Connection: eyJyZW1vdGVpcCI6IjE5OC4yLjEzNC41IiwiaGVsbyI6Im1haWwxMzQtNS5hdGwxNDEubWFuZHJpbGxhcHAuY29tIn0=
X-Custom-Transaction: eyJpZCI6ImIxNDYyZWZiLWFiMzQtMTFlZi1hMGNkLThiZTBkYWMzMDJiMCIsInRzIjoxNzMyNTQyODI4LjM2NDI1OCwic2VuZGVyIjoiYm91bmNlLW1kXzMwNTA0OTYyLjY3NDQ4MTZhLnYxLWQ3MzRkYjViMmMzYzRkNzZiNWY5ZmVmNWZlMTg0M2RhQGJvdW5jZS52YXRlcy50ZWNoIiwicmVjaXBpZW50Ijoid2luLXB2LWRldmVsQGxpc3RzLnhlbnByb2plY3Qub3JnIn0=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com;
	s=mte1; t=1732542826; x=1732803326;
	bh=/rY86Y9r40Dg3HV7LHcdw7zD2MU6CoyDaVCl/5nMKX8=;
	h=From:Subject:Message-Id:To:Feedback-ID:Date:MIME-Version:
	 Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From;
	b=nPxcSLuFAaQ1DfJ3ZxY+ruL/gGcbtDTWJYD1QwMbQsqWMvemuMuucmgTiesjcXKMB
	 gm3oIS0t/0rAgkkXqfYTgNzoQSPGKK7D1353YiU2fxHi8hcAr96Mycw1pUlG4fQ+Qd
	 WLM+i6EvKpSDpoeqUCl7xVdePYp0EpK4V5rE04RIy0abu9/oMOUK9RZsX92US9zQJh
	 TVsGEtZZ2xCa5gtMHL4KTY9+WTPI4yOxa/+QHucNOuGtpKaHAA9RCL6as0ufh4RhSC
	 kgouHwL66AEG2RoK6qqSNYJQlcsrm/HA/Wg50QT1F7pADf18R/vbj+DhG7q54UT6xv
	 XoV/3V4VFtwjw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1;
	t=1732542826; x=1732803326; i=ngoc-tu.dinh@vates.tech;
	bh=/rY86Y9r40Dg3HV7LHcdw7zD2MU6CoyDaVCl/5nMKX8=;
	h=From:Subject:Message-Id:To:Feedback-ID:Date:MIME-Version:
	 Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From;
	b=QPo6YJcaWg1jHnSrSH2flP8VO9N960tlNAwZl2NRAgMRVAY2KrqoeO+0goNQgO50r
	 TsL3OehNYpG9ji76SGvx7pWq54xNfpfGCNKSgT/Q9Xg5/7Wpgdq5r+X2doc7DyiTjd
	 jPGl7YOLxSOFYV2/U108oOvuHLIBy+oxFH+Jrs736PFhLvJiBzUDbnTm4+3HMftF5L
	 XnDFul3/O1rseZ6c3Recp0xz+KnkE51kQcN4iPCh8a42XlhTNAuT1oSLOz4jzPXx+h
	 1zy1+HlnQxc4vsjy+IAsi71frnBQX1Qg+XmFmYwlKWt93ZyuNBAw1jN5MHa2QOII6w
	 WePfSgPPjKbUA==
From: "Tu Dinh" <ngoc-tu.dinh@vates.tech>
Subject: =?utf-8?Q?Network=20lockup=20when=20recreating=20VIF?=
X-Bm-Disclaimer: Yes
X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2
X-Bm-Transport-Timestamp: 1732542825752
Message-Id: <a8ff5edf-f77a-45a9-ab10-c6f8cc48d6f2@vates.tech>
To: win-pv-devel@lists.xenproject.org
X-Native-Encoded: 1
X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.d734db5b2c3c4d76b5f9fef5fe1843da?=
X-Mandrill-User: md_30504962
Feedback-ID: 30504962:30504962.20241125:md
Date: Mon, 25 Nov 2024 13:53:46 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Hello,

When removing and recreating a VIF on a Windows Server 2022 VM (build
20348.2762), sometimes the network driver will lock up, preventing any
user from logging in. The lockup is also reported by Windbg.

This issue is easier to reproduce when there's an active RDP session to
the VM.

Backtrace is below:

00 nt!KiSwapContext+0x76
01 nt!KiSwapThread+0x545
02 nt!KiCommitThreadWait+0x15a
03 nt!KeWaitForSingleObject+0x267
04 nt!ExWaitForRundownProtectionReleaseCacheAware+0xb5
05 tcpip!FlpWaitForMiniportToReturnTransmittedPackets+0xf
06 tcpip!FlpUninitializePacketProviderInterface+0x52
07 tcpip!FlPnpEvent+0x93
08 tcpip!Fl68PnpEvent+0xe
09 NDIS!ndisInvokeNetPnPEvent+0x7e
0a NDIS!ndisDeliverNetPnPEventSynchronously+0xf5
0b NDIS!ndisPnPNotifyBinding+0x17f
0c NDIS!ndisPnPNotifyBindingUnlocked+0x35
0d NDIS!ndisPauseProtocolInner+0x79
0e NDIS!ndisPauseProtocol+0xb1
0f NDIS!Ndis::BindEngine::Iterate+0x13c
10 NDIS!Ndis::BindEngine::UpdateBindings+0x98
11 NDIS!Ndis::BindEngine::DispatchPendingWork+0x76
12 NDIS!Ndis::BindEngine::ApplyBindChanges+0x54
13 NDIS!ndisPnPRemoveDevice+0x2ed
14 NDIS!ndisPnPRemoveDeviceEx+0x13f
15 NDIS!ndisPnPIrpRemoveDevice+0x10a
16 NDIS!ndisPnPDispatch+0x169c6
17 xennet!DispatchPnp+0x76 [xennet\driver.c @ 138]
18 nt!IopfCallDriver+0x53
19 nt!IovCallDriver+0x264
1a nt!IofCallDriver+0x109471
1b nt!IopSynchronousCall+0xf8
1c nt!IopRemoveDevice+0x105
1d nt!PnpRemoveLockedDeviceNode+0x1a9
1e nt!PnpDeleteLockedDeviceNode+0x52
1f nt!PnpDeleteLockedDeviceNodes+0xc8
20 nt!PnpProcessQueryRemoveAndEject+0x389
21 nt!PnpProcessTargetDeviceEvent+0x109
22 nt!PnpDeviceEventWorker+0x2d6
23 nt!ExpWorkerThread+0x161
24 nt!PspSystemThreadStartup+0x55
25 nt!KiStartSystemThread+0x28


Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech


From win-pv-devel-bounces@lists.xenproject.org Tue Nov 26 07:26:44 2024
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 26 Nov 2024 07:26:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.843368.1258981 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1tFpy5-0004hz-Kr; Tue, 26 Nov 2024 07:26:41 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 843368.1258981; Tue, 26 Nov 2024 07:26:41 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1tFpy5-0004hs-Hx; Tue, 26 Nov 2024 07:26:41 +0000
Received: by outflank-mailman (input) for mailman id 843368;
 Tue, 26 Nov 2024 07:26:39 +0000
Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50]
 helo=se1-gles-flk1.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=bDUl=SV=cloud.com=owen.smith@srs-se1.protection.inumbo.net>)
 id 1tFpy3-0004hi-QG
 for win-pv-devel@lists.xenproject.org; Tue, 26 Nov 2024 07:26:39 +0000
Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com
 [2a00:1450:4864:20::12f])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id c2df3d93-abc7-11ef-99a3-01e77a169b0f;
 Tue, 26 Nov 2024 08:26:35 +0100 (CET)
Received: by mail-lf1-x12f.google.com with SMTP id
 2adb3069b0e04-53ddd4705f8so2475782e87.0
 for <win-pv-devel@lists.xenproject.org>; Mon, 25 Nov 2024 23:26:32 -0800 (PST)
X-BeenThere: win-pv-devel@lists.xenproject.org
List-Id: Developer list for the Windows PV Drivers subproject
 <win-pv-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:win-pv-devel@lists.xenproject.org>
List-Help: <mailto:win-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: win-pv-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "win-pv-devel" <win-pv-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: c2df3d93-abc7-11ef-99a3-01e77a169b0f
X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjoxMmYiLCJoZWxvIjoibWFpbC1sZjEteDEyZi5nb29nbGUuY29tIn0=
X-Custom-Transaction: eyJpZCI6ImMyZGYzZDkzLWFiYzctMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMyNjA1OTk1Ljc4MzQ4MSwic2VuZGVyIjoib3dlbi5zbWl0aEBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ3aW4tcHYtZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=cloud.com; s=cloud; t=1732605992; x=1733210792; darn=lists.xenproject.org;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:from:to:cc:subject:date:message-id:reply-to;
        bh=KTJ8b/bX7X3RqYExwgxpVpZIO2EIdJImsovfNlUay5k=;
        b=U4XZnF7Thzyu3J7yAO9G49+L3pNZR7WPsPRfZ06J0auDxYQo20q4iHBEG3aXfCaVbC
         YtoKo0wf+s+Jq5mK/eGzNCGTRIChMSu5X2z5CPEsEcBdbB9/cFD2F2/tGkOG6LRzhh9a
         x+PsQkYpRi3xm9+2ZDUAon0+6yuiLacb98ZEg=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1732605992; x=1733210792;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=KTJ8b/bX7X3RqYExwgxpVpZIO2EIdJImsovfNlUay5k=;
        b=V/0Yvh/TvtiklFIdHa/nzWQrFo+YIlt5MJwhxE53aJrJ+Pjakoglkm+OrLm3IIk4FR
         AbGZLZCeXqZg8e3OZCSQmlvSb9K9m2Ls2pAg6X26uDzCLaQKcxHFKzMk+Mqt+Q91BFTj
         Ft6+iTc5IgHZEZMaaoedciGfZYqZiWKllU0kSFz+KyBTuLKcOkDPQdcT+xC3a0ixYgE2
         WZisBuro+XoYmZs0lwFQj+keERIUToSNDN2/c2pd2AOXSd4+XYLXteI1nm8n73FH51vW
         cxQ1RMdHjoh1ZKa3s/QMuBHal6hAe1g7pHwNCzTkImk0W+vQ6hj5wn19OhRSKDs0P5NQ
         foBg==
X-Gm-Message-State: AOJu0YytRtszWwg0a4k8xY5rZ+sR3072vNmN8ZLCsZ+TBJctIBoyennK
	gfP1mb9qF1OB1En2/PdgE2IiGwgrOG7PbJ18+SK6u682UAGlOntLHh2e4rPuVNwT9gbukuFkNwC
	yJogH1+QyyGuRz26k3hGdIw5+Y4Pnr25jnbfM
X-Gm-Gg: ASbGncsVsTsr97mlUgc3RQGzU55IyymqNJd5js/6qgdhDsTiLgbX2FEpCVLWlYj2WTs
	WLE4OW0grevSY4Rb6MdSOhB0jcFXkebo=
X-Google-Smtp-Source: AGHT+IFetPh3742K7mKDKBZe6XBL48fgMzo5f37QyktXcFYB/ejQFSCu1Vz7soQcksuDyhkRfkqpmaeG64MZuxdt9uQ=
X-Received: by 2002:a05:6512:3d93:b0:53d:e5fd:a431 with SMTP id
 2adb3069b0e04-53de884b61emr603690e87.19.1732605992165; Mon, 25 Nov 2024
 23:26:32 -0800 (PST)
MIME-Version: 1.0
References: <20241125130501.1395-1-ngoc-tu.dinh@vates.tech>
In-Reply-To: <20241125130501.1395-1-ngoc-tu.dinh@vates.tech>
From: Owen Smith <owen.smith@cloud.com>
Date: Tue, 26 Nov 2024 07:26:21 +0000
Message-ID: <CAC_UY88=Kj4r69szuLr_fGMfVVSaDS1pxV57pctjTg2aWSeTyg@mail.gmail.com>
Subject: Re: [PATCH] Fix signed comparison in Mrsw.h
To: Tu Dinh <ngoc-tu.dinh@vates.tech>
Cc: win-pv-devel@lists.xenproject.org, Paul Durrant <paul@xen.org>
Content-Type: multipart/alternative; boundary="000000000000b3038a0627cbc48e"

--000000000000b3038a0627cbc48e
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Looks good.

Acked-by: Owen Smith <owen.smith@cloud.com>

On Mon, Nov 25, 2024 at 1:05=E2=80=AFPM Tu Dinh <ngoc-tu.dinh@vates.tech> w=
rote:

> Signed-off-by: Tu Dinh <ngoc-tu.dinh@vates.tech>
> ---
>  src/xenvif/mrsw.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/xenvif/mrsw.h b/src/xenvif/mrsw.h
> index f82d329..e1ff056 100644
> --- a/src/xenvif/mrsw.h
> +++ b/src/xenvif/mrsw.h
> @@ -64,7 +64,7 @@ InitializeMrswLock(
>
>      RtlZeroMemory(Lock, sizeof (XENVIF_MRSW_LOCK));
>
> -    for (Slot =3D 0; Slot < sizeof (Lock->Mask) * 8; Slot++)
> +    for (Slot =3D 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++)
>          Lock->Holder[Slot].Level =3D -1;
>
>      KeInitializeEvent(&Lock->Event, NotificationEvent, FALSE);
> @@ -103,7 +103,7 @@ __AcquireMrswLockExclusive(
>      Self =3D KeGetCurrentThread();
>
>      // Make sure we do not already hold the lock
> -    for (Slot =3D 0; Slot < sizeof (Lock->Mask) * 8; Slot++)
> +    for (Slot =3D 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++)
>          ASSERT(Lock->Holder[Slot].Thread !=3D Self);
>
>      for (;;) {
> @@ -218,7 +218,7 @@ AcquireMrswLockShared(
>
>      // Do we already hold the lock? If so, get the nesting level
>      Level =3D -1;
> -    for (Slot =3D 0; Slot < sizeof (Lock->Mask) * 8; Slot++) {
> +    for (Slot =3D 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++) {
>          if (Lock->Holder[Slot].Thread =3D=3D Self && Lock->Holder[Slot].=
Level
> > Level)
>              Level =3D Lock->Holder[Slot].Level;
>      }
> @@ -261,7 +261,7 @@ ReleaseMrswLockShared(
>
>      Level =3D -1;
>      Deepest =3D -1;
> -    for (Slot =3D 0; Slot < sizeof (Lock->Mask) * 8; Slot++) {
> +    for (Slot =3D 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++) {
>          if (Lock->Holder[Slot].Thread =3D=3D Self && Lock->Holder[Slot].=
Level
> > Level) {
>              Level =3D Lock->Holder[Slot].Level;
>              Deepest =3D Slot;
> --
> 2.47.0.windows.2
>
>
>
> Ngoc Tu Dinh | Vates XCP-ng Developer
>
> XCP-ng & Xen Orchestra - Vates solutions
>
> web: https://vates.tech
>

--000000000000b3038a0627cbc48e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac=
e">Looks good.</div><div class=3D"gmail_default" style=3D"font-family:monos=
pace"><br></div><div class=3D"gmail_default" style=3D"font-family:monospace=
">Acked-by: Owen Smith &lt;<a href=3D"mailto:owen.smith@cloud.com">owen.smi=
th@cloud.com</a>&gt;</div></div><br><div class=3D"gmail_quote"><div dir=3D"=
ltr" class=3D"gmail_attr">On Mon, Nov 25, 2024 at 1:05=E2=80=AFPM Tu Dinh &=
lt;ngoc-tu.dinh@vates.tech&gt; wrote:<br></div><blockquote class=3D"gmail_q=
uote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,2=
04);padding-left:1ex">Signed-off-by: Tu Dinh &lt;ngoc-tu.dinh@vates.tech&gt=
;<br>
---<br>
=C2=A0src/xenvif/mrsw.h | 8 ++++----<br>
=C2=A01 file changed, 4 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/src/xenvif/mrsw.h b/src/xenvif/mrsw.h<br>
index f82d329..e1ff056 100644<br>
--- a/src/xenvif/mrsw.h<br>
+++ b/src/xenvif/mrsw.h<br>
@@ -64,7 +64,7 @@ InitializeMrswLock(<br>
<br>
=C2=A0 =C2=A0 =C2=A0RtlZeroMemory(Lock, sizeof (XENVIF_MRSW_LOCK));<br>
<br>
-=C2=A0 =C2=A0 for (Slot =3D 0; Slot &lt; sizeof (Lock-&gt;Mask) * 8; Slot+=
+)<br>
+=C2=A0 =C2=A0 for (Slot =3D 0; Slot &lt; (LONG) sizeof (Lock-&gt;Mask) * 8=
; Slot++)<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Lock-&gt;Holder[Slot].Level =3D -1;<br>
<br>
=C2=A0 =C2=A0 =C2=A0KeInitializeEvent(&amp;Lock-&gt;Event, NotificationEven=
t, FALSE);<br>
@@ -103,7 +103,7 @@ __AcquireMrswLockExclusive(<br>
=C2=A0 =C2=A0 =C2=A0Self =3D KeGetCurrentThread();<br>
<br>
=C2=A0 =C2=A0 =C2=A0// Make sure we do not already hold the lock<br>
-=C2=A0 =C2=A0 for (Slot =3D 0; Slot &lt; sizeof (Lock-&gt;Mask) * 8; Slot+=
+)<br>
+=C2=A0 =C2=A0 for (Slot =3D 0; Slot &lt; (LONG) sizeof (Lock-&gt;Mask) * 8=
; Slot++)<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ASSERT(Lock-&gt;Holder[Slot].Thread !=3D =
Self);<br>
<br>
=C2=A0 =C2=A0 =C2=A0for (;;) {<br>
@@ -218,7 +218,7 @@ AcquireMrswLockShared(<br>
<br>
=C2=A0 =C2=A0 =C2=A0// Do we already hold the lock? If so, get the nesting =
level<br>
=C2=A0 =C2=A0 =C2=A0Level =3D -1;<br>
-=C2=A0 =C2=A0 for (Slot =3D 0; Slot &lt; sizeof (Lock-&gt;Mask) * 8; Slot+=
+) {<br>
+=C2=A0 =C2=A0 for (Slot =3D 0; Slot &lt; (LONG) sizeof (Lock-&gt;Mask) * 8=
; Slot++) {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (Lock-&gt;Holder[Slot].Thread =3D=3D S=
elf &amp;&amp; Lock-&gt;Holder[Slot].Level &gt; Level)<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Level =3D Lock-&gt;Holder[S=
lot].Level;<br>
=C2=A0 =C2=A0 =C2=A0}<br>
@@ -261,7 +261,7 @@ ReleaseMrswLockShared(<br>
<br>
=C2=A0 =C2=A0 =C2=A0Level =3D -1;<br>
=C2=A0 =C2=A0 =C2=A0Deepest =3D -1;<br>
-=C2=A0 =C2=A0 for (Slot =3D 0; Slot &lt; sizeof (Lock-&gt;Mask) * 8; Slot+=
+) {<br>
+=C2=A0 =C2=A0 for (Slot =3D 0; Slot &lt; (LONG) sizeof (Lock-&gt;Mask) * 8=
; Slot++) {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (Lock-&gt;Holder[Slot].Thread =3D=3D S=
elf &amp;&amp; Lock-&gt;Holder[Slot].Level &gt; Level) {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Level =3D Lock-&gt;Holder[S=
lot].Level;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Deepest =3D Slot;<br>
-- <br>
2.47.0.windows.2<br>
<br>
<br>
<br>
Ngoc Tu Dinh | Vates XCP-ng Developer<br>
<br>
XCP-ng &amp; Xen Orchestra - Vates solutions<br>
<br>
web: <a href=3D"https://vates.tech" rel=3D"noreferrer" target=3D"_blank">ht=
tps://vates.tech</a><br>
</blockquote></div>

--000000000000b3038a0627cbc48e--


From win-pv-devel-bounces@lists.xenproject.org Wed Nov 27 10:48:39 2024
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Wed, 27 Nov 2024 10:48:39 +0000
Received: from list by lists.xenproject.org with outflank-mailman.844646.1260137 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1tGFb2-0001Q3-Tk; Wed, 27 Nov 2024 10:48:36 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 844646.1260137; Wed, 27 Nov 2024 10:48:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1tGFb2-0001Pv-Qx; Wed, 27 Nov 2024 10:48:36 +0000
Received: by outflank-mailman (input) for mailman id 844646;
 Wed, 27 Nov 2024 10:48:35 +0000
Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50]
 helo=se1-gles-flk1.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=6Z7A=SW=bounce.vates.tech=bounce-md_30504962.6746f8fb.v1-ca53c352aa6d48a2b0807338a2f5e5de@srs-se1.protection.inumbo.net>)
 id 1tGFb1-0001Pp-GZ
 for win-pv-devel@lists.xenproject.org; Wed, 27 Nov 2024 10:48:35 +0000
Received: from mail179-37.suw41.mandrillapp.com
 (mail179-37.suw41.mandrillapp.com [198.2.179.37])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id 22be1816-acad-11ef-99a3-01e77a169b0f;
 Wed, 27 Nov 2024 11:48:30 +0100 (CET)
Received: from pmta12.mandrill.prod.suw01.rsglab.com (localhost [127.0.0.1])
 by mail179-37.suw41.mandrillapp.com (Mailchimp) with ESMTP id
 4Xyx4W6SJ6zG0CW7B
 for <win-pv-devel@lists.xenproject.org>; Wed, 27 Nov 2024 10:48:27 +0000 (GMT)
Received: from [37.26.189.201] by mandrillapp.com id
 ca53c352aa6d48a2b0807338a2f5e5de; Wed, 27 Nov 2024 10:48:27 +0000
X-BeenThere: win-pv-devel@lists.xenproject.org
List-Id: Developer list for the Windows PV Drivers subproject
 <win-pv-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:win-pv-devel@lists.xenproject.org>
List-Help: <mailto:win-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: win-pv-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "win-pv-devel" <win-pv-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 22be1816-acad-11ef-99a3-01e77a169b0f
X-Custom-Connection: eyJyZW1vdGVpcCI6IjE5OC4yLjE3OS4zNyIsImhlbG8iOiJtYWlsMTc5LTM3LnN1dzQxLm1hbmRyaWxsYXBwLmNvbSJ9
X-Custom-Transaction: eyJpZCI6IjIyYmUxODE2LWFjYWQtMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMyNzA0NTEwLjM3MDQxNCwic2VuZGVyIjoiYm91bmNlLW1kXzMwNTA0OTYyLjY3NDZmOGZiLnYxLWNhNTNjMzUyYWE2ZDQ4YTJiMDgwNzMzOGEyZjVlNWRlQGJvdW5jZS52YXRlcy50ZWNoIiwicmVjaXBpZW50Ijoid2luLXB2LWRldmVsQGxpc3RzLnhlbnByb2plY3Qub3JnIn0=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com;
	s=mte1; t=1732704507; x=1732965007;
	bh=LvgXLtCNr5MjHkn0C0rYi4pBNsXDytTVjVzh5PTNwDI=;
	h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID:
	 Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date:
	 Subject:From;
	b=IjjuA2Ukn8xIjoK31hk9cToZNiuFRVRw3kkKT084qPED1f3XLNdeM1uN9m9whCvnc
	 fYTEShvce/PjkAIojFRprYYEWfONxhWrumE8cob298XOYzNxY/nVcK389x7tbeNqSj
	 mKq3pvaeCkKoLhHWYAE+WkpJ/BSlTy+ddz2Jvu873NEKNeNBDHgWR+TUpA5+0ycPXH
	 pMULcp4xdluE/oK28+MmrAIBUrQBV+FA62sTdLSS82RjTdVV51pp8cfS+Ph/WjAIrQ
	 Xd3r7xp33SbKJBgPUqZ31iS+BNGXuxAZ7Il+Uggkk8L4YaIScfA+a/Eqj26fVfUhdq
	 coB5mD04cBo3g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1;
	t=1732704507; x=1732965007; i=ngoc-tu.dinh@vates.tech;
	bh=LvgXLtCNr5MjHkn0C0rYi4pBNsXDytTVjVzh5PTNwDI=;
	h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID:
	 Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date:
	 Subject:From;
	b=Hox7faoQ7Y3stZTmdtTlTSC5va2HPfC/dl2AlO5ubBZz6D1N6XuliOta+ByrjdOdo
	 NNvrmQWaVBUcOAdh2/wqTz2zqjrqifEIFjejRrCH4an7yWBgj0YigrOZvEEIVC9kLL
	 Oqs2q6lNsJ0HdL5bknQZqDepEtb/urngDQ5XiG0/HehwyuSVPNKBd3M6SDcXdoRcN6
	 Gzzhvw8MsMN7UtUp2LPItAap5oMjzWJYhbTYAWF87R+AT8+lMd6QVvRjesxnwSpXlm
	 vsQMTdBP0oTOBVqUzbKi/pZDUhwVZc1wDjPlmiXtuHr33JqVUkbii2DOmzs5zlxAQt
	 3D7ZYujletFYA==
From: "Tu Dinh" <ngoc-tu.dinh@vates.tech>
Subject: =?utf-8?Q?[XENVIF=20PATCH]=20Fix=20signed=20comparison=20in=20Mrsw.h?=
X-Mailer: git-send-email 2.47.1.windows.1
X-Bm-Disclaimer: Yes
X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2
X-Bm-Transport-Timestamp: 1732704507118
To: win-pv-devel@lists.xenproject.org
Cc: "Paul Durrant" <paul@xen.org>, "Owen Smith" <owen.smith@cloud.com>, "Tu Dinh" <ngoc-tu.dinh@vates.tech>
Message-Id: <20241127104817.1446-1-ngoc-tu.dinh@vates.tech>
In-Reply-To: <20241125130501.1395-1-ngoc-tu.dinh@vates.tech>
References: <20241125130501.1395-1-ngoc-tu.dinh@vates.tech>
X-Native-Encoded: 1
X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.ca53c352aa6d48a2b0807338a2f5e5de?=
X-Mandrill-User: md_30504962
Feedback-ID: 30504962:30504962.20241127:md
Date: Wed, 27 Nov 2024 10:48:27 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Signed-off-by: Tu Dinh <ngoc-tu.dinh@vates.tech>
---
 src/xenvkbd/mrsw.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/xenvkbd/mrsw.h b/src/xenvkbd/mrsw.h
index 929415e..bddc49d 100644
--- a/src/xenvkbd/mrsw.h
+++ b/src/xenvkbd/mrsw.h
@@ -64,7 +64,7 @@ InitializeMrswLock(
 
     RtlZeroMemory(Lock, sizeof (XENVKBD_MRSW_LOCK));
 
-    for (Slot = 0; Slot < sizeof (Lock->Mask) * 8; Slot++)
+    for (Slot = 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++)
         Lock->Holder[Slot].Level = -1;
 
     KeInitializeEvent(&Lock->Event, NotificationEvent, FALSE);
@@ -103,7 +103,7 @@ __AcquireMrswLockExclusive(
     Self = KeGetCurrentThread();
 
     // Make sure we do not already hold the lock
-    for (Slot = 0; Slot < sizeof (Lock->Mask) * 8; Slot++)
+    for (Slot = 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++)
         ASSERT(Lock->Holder[Slot].Thread != Self);
 
     for (;;) {
@@ -218,7 +218,7 @@ AcquireMrswLockShared(
 
     // Do we already hold the lock? If so, get the nesting level
     Level = -1;
-    for (Slot = 0; Slot < sizeof (Lock->Mask) * 8; Slot++) {
+    for (Slot = 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++) {
         if (Lock->Holder[Slot].Thread == Self && Lock->Holder[Slot].Level > Level)
             Level = Lock->Holder[Slot].Level;
     }
@@ -261,7 +261,7 @@ ReleaseMrswLockShared(
 
     Level = -1;
     Deepest = -1;
-    for (Slot = 0; Slot < sizeof (Lock->Mask) * 8; Slot++) {
+    for (Slot = 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++) {
         if (Lock->Holder[Slot].Thread == Self && Lock->Holder[Slot].Level > Level) {
             Level = Lock->Holder[Slot].Level;
             Deepest = Slot;
-- 
2.47.1.windows.1



Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech


From win-pv-devel-bounces@lists.xenproject.org Wed Nov 27 10:49:21 2024
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Wed, 27 Nov 2024 10:49:21 +0000
Received: from list by lists.xenproject.org with outflank-mailman.844652.1260152 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1tGFbl-0001oc-AP; Wed, 27 Nov 2024 10:49:21 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 844652.1260152; Wed, 27 Nov 2024 10:49:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1tGFbl-0001oV-7J; Wed, 27 Nov 2024 10:49:21 +0000
Received: by outflank-mailman (input) for mailman id 844652;
 Wed, 27 Nov 2024 10:49:20 +0000
Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50]
 helo=se1-gles-flk1.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=nIXr=SW=bounce.vates.tech=bounce-md_30504962.6746f92b.v1-75990b49175c45fb9354577c68ea29bc@srs-se1.protection.inumbo.net>)
 id 1tGFbk-0001mw-Fd
 for win-pv-devel@lists.xenproject.org; Wed, 27 Nov 2024 10:49:20 +0000
Received: from mail179-37.suw41.mandrillapp.com
 (mail179-37.suw41.mandrillapp.com [198.2.179.37])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id 3f622a7d-acad-11ef-99a3-01e77a169b0f;
 Wed, 27 Nov 2024 11:49:17 +0100 (CET)
Received: from pmta12.mandrill.prod.suw01.rsglab.com (localhost [127.0.0.1])
 by mail179-37.suw41.mandrillapp.com (Mailchimp) with ESMTP id
 4Xyx5R6bFYzG0CW8j
 for <win-pv-devel@lists.xenproject.org>; Wed, 27 Nov 2024 10:49:15 +0000 (GMT)
Received: from [37.26.189.201] by mandrillapp.com id
 75990b49175c45fb9354577c68ea29bc; Wed, 27 Nov 2024 10:49:15 +0000
X-BeenThere: win-pv-devel@lists.xenproject.org
List-Id: Developer list for the Windows PV Drivers subproject
 <win-pv-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:win-pv-devel@lists.xenproject.org>
List-Help: <mailto:win-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/win-pv-devel>, 
 <mailto:win-pv-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: win-pv-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "win-pv-devel" <win-pv-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 3f622a7d-acad-11ef-99a3-01e77a169b0f
X-Custom-Connection: eyJyZW1vdGVpcCI6IjE5OC4yLjE3OS4zNyIsImhlbG8iOiJtYWlsMTc5LTM3LnN1dzQxLm1hbmRyaWxsYXBwLmNvbSJ9
X-Custom-Transaction: eyJpZCI6IjNmNjIyYTdkLWFjYWQtMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMyNzA0NTU3LjMxMDY3Mywic2VuZGVyIjoiYm91bmNlLW1kXzMwNTA0OTYyLjY3NDZmOTJiLnYxLTc1OTkwYjQ5MTc1YzQ1ZmI5MzU0NTc3YzY4ZWEyOWJjQGJvdW5jZS52YXRlcy50ZWNoIiwicmVjaXBpZW50Ijoid2luLXB2LWRldmVsQGxpc3RzLnhlbnByb2plY3Qub3JnIn0=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com;
	s=mte1; t=1732704555; x=1732965055;
	bh=FnRnqoGXAVOdvmLZeSJQv7zNlwgkM2dbUH9NWZEs7ss=;
	h=From:Subject:Message-Id:To:Cc:References:In-Reply-To:Feedback-ID:
	 Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date:
	 Subject:From;
	b=BHwRCg26/M3fHLAbsT/OjiZEZjxgI24oozOPADphHmoAbnDUVzrOs6mQBkGy+b1la
	 0ycuPgrVZZ3Zog3YczRpd42zMZGF0Wxcv+ogtsLSWPfMHM8eM9QSFhqAb0kRz0vMoV
	 Q6J5g8a1YyKOWW6JhBOJXJe56g3YoDf34ibQEFogQwIaMNpIR6SBdFlc7s0TSngw10
	 zVNsooo17q5Tx5azhNQmx5PHgn5jM3YB0PVac9EXpRxjJvOsTuobsSxgqoQb+L2GiY
	 MAEHnxsQCC1edNtyC7J6bDwQ3AJo9mxZJnUrSr7pxSrsDJGfnlcg6EpHBCRI9VznAK
	 al2lde5JpQL5w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1;
	t=1732704555; x=1732965055; i=ngoc-tu.dinh@vates.tech;
	bh=FnRnqoGXAVOdvmLZeSJQv7zNlwgkM2dbUH9NWZEs7ss=;
	h=From:Subject:Message-Id:To:Cc:References:In-Reply-To:Feedback-ID:
	 Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date:
	 Subject:From;
	b=DHeCNcRpB/AN86qGWhNeHFlK/NONcflybYk85wufStuR+T9Jp2VmRPVhOuFJaPeYI
	 P9ifcjwlAlYs1O+hGqGDC1OkcfKBXc2Irh/j0Jq+iuMLW9pDQk/ZQFotlb1Eg5E3Mx
	 aE/IKRnmK6wT9Yrm7VnIYxAriBJ4sYLUmZA9TR2jLh3jusvBkpjVtezZOYP0eAC9ZZ
	 zu+dYARLDKMY3PFIsxAQUKSIGO/lXdzqRBhCwKYpNb3hra3Elavex2Z9pj7qwQB/sP
	 sVIB23YySXC1/pn9g4/LMx/jwI81AvoBMxlLYNZrpntyi9rMYZmnzIeDQa3KoU28pp
	 4q/5U2Gcy4Njw==
From: "Tu Dinh" <ngoc-tu.dinh@vates.tech>
Subject: =?utf-8?Q?Re:=20[XENVIF=20PATCH]=20Fix=20signed=20comparison=20in=20Mrsw.h?=
X-Bm-Disclaimer: Yes
X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2
X-Bm-Transport-Timestamp: 1732704554725
Message-Id: <3ed966f1-8fd3-4d01-8909-ddfb9a011977@vates.tech>
To: win-pv-devel@lists.xenproject.org
Cc: "Paul Durrant" <paul@xen.org>, "Owen Smith" <owen.smith@cloud.com>
References: <20241125130501.1395-1-ngoc-tu.dinh@vates.tech> <20241127104817.1446-1-ngoc-tu.dinh@vates.tech>
In-Reply-To: <20241127104817.1446-1-ngoc-tu.dinh@vates.tech>
X-Native-Encoded: 1
X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.75990b49175c45fb9354577c68ea29bc?=
X-Mandrill-User: md_30504962
Feedback-ID: 30504962:30504962.20241127:md
Date: Wed, 27 Nov 2024 10:49:15 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

On 27/11/2024 11:48, Tu Dinh wrote:
> Signed-off-by: Tu Dinh <ngoc-tu.dinh@vates.tech>
> ---
>   src/xenvkbd/mrsw.h | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)

My bad, it's meant to be [XENVKBD PATCH] not [XENVIF PATCH].


Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech


