From win-pv-devel-bounces@lists.xenproject.org Mon Dec 11 16:21:17 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 11 Dec 2023 16:21:17 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652367.1018174 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCj1v-0004hx-7D; Mon, 11 Dec 2023 16:21:15 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652367.1018174; Mon, 11 Dec 2023 16:21:15 +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 1rCj1v-0004hp-4P; Mon, 11 Dec 2023 16:21:15 +0000
Received: by outflank-mailman (input) for mailman id 652367;
 Mon, 11 Dec 2023 16:21:14 +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=DOfJ=HW=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rCj1u-0004hQ-5b
 for win-pv-devel@lists.xenproject.org; Mon, 11 Dec 2023 16:21:14 +0000
Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com
 [2a00:1450:4864:20::32f])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id 4c7d1256-9841-11ee-98e8-6d05b1d4d9a1;
 Mon, 11 Dec 2023 17:21:13 +0100 (CET)
Received: by mail-wm1-x32f.google.com with SMTP id
 5b1f17b1804b1-40c2c5a8150so43274545e9.2
 for <win-pv-devel@lists.xenproject.org>; Mon, 11 Dec 2023 08:21:12 -0800 (PST)
Received: from [10.95.102.129] (54-240-197-226.amazon.com. [54.240.197.226])
 by smtp.gmail.com with ESMTPSA id
 u17-20020a05600c19d100b0040c440f9393sm5803943wmq.42.2023.12.11.08.21.10
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 11 Dec 2023 08:21:11 -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: 4c7d1256-9841-11ee-98e8-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702311671; x=1702916471; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:from:content-language
         :references:to:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=aFHC9OMTVp5rg0Ufe0PJImFFbGb9Q3DLRrTMDSkJk1I=;
        b=SQctIIiVx0rd4mb5BesSsiUVeGBLwuXjUKs1/Ay/t3XJwlyjC+aQexrlWuNcwpFDcB
         baCFHGRXt5ZP7tGJRzbVNLPE8yyD+v4dqcnYE2ru/IRe0Nd/7BqCQC/s9XmjYZq2w0Sj
         DQprjjkRkOdeGetAN83q1VFWNgP7xa3ithHFIehED8c1ONy/DWfJ3XHoZu+xyj02or73
         uxKBxKGa8hgB6WuabG0T8whJHQhY1dLnWhSnoSgX7wABMFwTSkCr4DAJVw4El3F35Zk8
         omc6+CzPjcjdsuMI2pMaadZuTFLNmynjomoJdxido2XYwaGLJiBoJ8fUFft0eh8eD0/O
         h5nA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702311671; x=1702916471;
        h=content-transfer-encoding:in-reply-to:from:content-language
         :references:to:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=aFHC9OMTVp5rg0Ufe0PJImFFbGb9Q3DLRrTMDSkJk1I=;
        b=bks9XUAkIvXzzhqT17De4zs1mYyhWuf/j4QsRJ3aahm329rzXopc01kOOeaTuTkcw+
         KAx8OyD8GflZ+e39godnBk6BtmeCSoL+nDd1w744F4VDXSyQqfD3aTWM9dqRNiCSRxGp
         uswSpyIbW/774YWmaiyQpuWJRShEvlukmbcpIORH7BMggIpiSGsgcXHxsaXDWi4MAGxD
         Bi6muyAyDUlrBdhmwIu3bIpflth4gpiUBrEYOO01zthCa7VDQtaSUNmzhbRcbO5kqBda
         QGEwXG2QZowsjJ3izibFHPFmUM6diUfqaU/9qVkJxFvJa79o9TXyIpq3FLL9TTGVgJiQ
         meOQ==
X-Gm-Message-State: AOJu0YybXeICEEkBiJNTbrxfod8qKAye3uRiheX/1fUG44/qiulcy+VP
	x0bpS0w7lb75CaiSANYey5/ZXJ9mEYGklg==
X-Google-Smtp-Source: AGHT+IG2zSlqsIRPjmvquyqNjbwzapNlHupVzk6TGaiHpqyxcm6PkoM333czndmOCHYDNkIBoO8F3w==
X-Received: by 2002:a05:600c:3403:b0:401:daf2:2735 with SMTP id y3-20020a05600c340300b00401daf22735mr2542225wmp.31.1702311671317;
        Mon, 11 Dec 2023 08:21:11 -0800 (PST)
Message-ID: <84af7425-4367-4d5f-99cf-b4f139515663@gmail.com>
Date: Mon, 11 Dec 2023 16:21:08 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: paul@xen.org
Subject: Re: [PATCH] Windows 0xEF Bugcheck Handler
To: win-pv-devel@lists.xenproject.org
References: <20231127111611.1502-1-owen.smith@cloud.com>
Content-Language: en-US
From: "Durrant, Paul" <xadimgnik@gmail.com>
In-Reply-To: <20231127111611.1502-1-owen.smith@cloud.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 27/11/2023 11:16, Owen Smith wrote:
> Adds a bugcheck handler for 0xEF (CRITICAL_PROCESS_DIED) which dumps the
> process image file name (if available)
> Adds ProcessGetImageFileName() to get the image file name, which relies
> on calling MmGetSystemRoutineAddress("PsGetProcessImageFileName")
> 
> Suggested-by: Rabish Kumar <rabish.kumar@citrix.com>
> Signed-off-by: Owen Smith <owen.smith@cloud.com>

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

> ---
>   src/xen/bug_check.c | 64 +++++++++++++++++++++++++++++++++++++++++++++
>   src/xen/process.c   | 34 ++++++++++++++++++++++--
>   src/xen/process.h   |  5 ++++
>   3 files changed, 101 insertions(+), 2 deletions(-)
> 
> diff --git a/src/xen/bug_check.c b/src/xen/bug_check.c
> index e1da159..41b5f73 100644
> --- a/src/xen/bug_check.c
> +++ b/src/xen/bug_check.c
> @@ -43,6 +43,7 @@
>   #include "bug_check.h"
>   #include "dbg_print.h"
>   #include "assert.h"
> +#include "process.h"
>   
>   static KBUGCHECK_CALLBACK_RECORD BugCheckBugCheckCallbackRecord;
>   
> @@ -1014,6 +1015,68 @@ BugCheckAssertionFailure(
>       }
>   }
>   
> +/// <summary>
> +/// Bug check handler for critocal process died.
> +/// https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-0xef--critical-process-died
> +/// </summary>
> +/// <param name="Parameter1">process object.</param>
> +/// <param name="Parameter2">If 0, a process terminated. If 1, a thread terminated.</param>
> +/// <param name="Parameter3">reserved.</param>
> +/// <param name="Parameter4">reserved.</param>
> +static VOID
> +BugCheckBugEFCriticalProcessDied(
> +    IN  ULONG_PTR   Parameter1,
> +    IN  ULONG_PTR   Parameter2,
> +    IN  ULONG_PTR   Parameter3,
> +    IN  ULONG_PTR   Parameter4
> +    )
> +{
> +    __try {
> +        ULONG_PTR       Code = Parameter2;
> +        CONTEXT         Context;
> +
> +        UNREFERENCED_PARAMETER(Parameter3);
> +        UNREFERENCED_PARAMETER(Parameter4);
> +
> +        switch (Code) {
> +        case 0x0: {
> +            PEPROCESS   EProcess = (PEPROCESS)Parameter1;
> +            PCHAR       Name = ProcessGetImageFileName(EProcess);
> +
> +            if (Name == NULL)
> +                Name = "(unknown)";
> +
> +            LogPrintf(LOG_LEVEL_CRITICAL,
> +                      "%s|BUGCHECK: CRITICAL PROCESS: %p Name:%s DIED IRQL:%d \n",
> +                      __MODULE__,
> +                      EProcess,
> +                      Name,
> +                      KeGetCurrentIrql());
> +            break;
> +        }
> +
> +        case 0x1: {
> +            PETHREAD    EThread = (PETHREAD)Parameter1;
> +
> +            LogPrintf(LOG_LEVEL_CRITICAL,
> +                      "%s|BUGCHECK: CRITICAL THREAD: %p DIED IRQL:%d \n",
> +                      __MODULE__,
> +                      EThread,
> +                      KeGetCurrentIrql());
> +            break;
> +        }
> +
> +        default:
> +            break;
> +        }
> +
> +        RtlCaptureContext(&Context);
> +        BugCheckStackDump(&Context);
> +    } __except (EXCEPTION_EXECUTE_HANDLER) {
> +        // Error of some kind
> +    }
> +}
> +
>   struct _BUG_CODE_ENTRY {
>       ULONG       Code;
>       const CHAR  *Name;
> @@ -1035,6 +1098,7 @@ struct _BUG_CODE_ENTRY   BugCodeTable[] = {
>       DEFINE_HANDLER(INACCESSIBLE_BOOT_DEVICE, BugCheckInaccessibleBootDevice),
>       DEFINE_HANDLER(DRIVER_POWER_STATE_FAILURE, BugCheckDriverPowerStateFailure),
>       DEFINE_HANDLER(ASSERTION_FAILURE, BugCheckAssertionFailure),
> +    DEFINE_HANDLER(CRITICAL_PROCESS_DIED, BugCheckBugEFCriticalProcessDied),
>       { 0, NULL, NULL }
>   };
>   
> diff --git a/src/xen/process.c b/src/xen/process.c
> index 4491196..2ba6599 100644
> --- a/src/xen/process.c
> +++ b/src/xen/process.c
> @@ -40,8 +40,11 @@
>   #include "dbg_print.h"
>   #include "assert.h"
>   
> +typedef PCHAR (*GET_PROCESS_IMAGE_NAME)(PEPROCESS Process);
> +
>   typedef struct _PROCESS_CONTEXT {
> -    LONG            References;
> +    LONG                    References;
> +    GET_PROCESS_IMAGE_NAME  PsGetProcFileName;
>   } PROCESS_CONTEXT, *PPROCESS_CONTEXT;
>   
>   static PROCESS_CONTEXT  ProcessContext;
> @@ -74,6 +77,24 @@ ProcessNotify(
>       KeLowerIrql(Irql);
>   }
>   
> +PCHAR
> +ProcessGetImageFileName(
> +    IN  PEPROCESS   Process
> +    )
> +{
> +    PPROCESS_CONTEXT    Context = &ProcessContext;
> +
> +    if (Context->PsGetProcFileName == NULL)
> +        goto fail1;
> +
> +    return Context->PsGetProcFileName(Process);
> +
> +fail1:
> +    Error("Fail1 (process=%p)\n", Process);
> +
> +    return NULL;
> +}
> +
>   VOID
>   ProcessTeardown(
>       VOID
> @@ -81,6 +102,8 @@ ProcessTeardown(
>   {
>       PPROCESS_CONTEXT    Context = &ProcessContext;
>   
> +    Context->PsGetProcFileName = NULL;
> +
>       (VOID) PsSetCreateProcessNotifyRoutine(ProcessNotify, TRUE);
>   
>       (VOID) InterlockedDecrement(&Context->References);
> @@ -90,11 +113,12 @@ ProcessTeardown(
>   
>   NTSTATUS
>   ProcessInitialize(
> -    VOID
> +    VOID
>       )
>   {
>       PPROCESS_CONTEXT    Context = &ProcessContext;
>       ULONG               References;
> +    UNICODE_STRING      Unicode;
>       NTSTATUS            status;
>   
>       References = InterlockedIncrement(&Context->References);
> @@ -107,6 +131,12 @@ ProcessInitialize(
>       if (!NT_SUCCESS(status))
>           goto fail2;
>   
> +    RtlInitUnicodeString(&Unicode, L"PsGetProcessImageFileName");
> +
> +    Context->PsGetProcFileName = (GET_PROCESS_IMAGE_NAME)MmGetSystemRoutineAddress(&Unicode);
> +    if (Context->PsGetProcFileName == NULL)
> +        Warning("Unable to get PsGetProcessImageFileName Address\n");
> +
>       return STATUS_SUCCESS;
>   
>   fail2:
> diff --git a/src/xen/process.h b/src/xen/process.h
> index 3b0233e..d25c8f0 100644
> --- a/src/xen/process.h
> +++ b/src/xen/process.h
> @@ -44,4 +44,9 @@ ProcessTeardown(
>       VOID
>       );
>   
> +extern PCHAR
> +ProcessGetImageFileName(
> +    IN  PEPROCESS   Process
> +    );
> +
>   #endif  // _XEN_PROCESS_H



From win-pv-devel-bounces@lists.xenproject.org Mon Dec 11 16:24:39 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 11 Dec 2023 16:24:39 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652377.1018187 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCj5C-0005y3-Mk; Mon, 11 Dec 2023 16:24:38 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652377.1018187; Mon, 11 Dec 2023 16:24:38 +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 1rCj5C-0005xw-KG; Mon, 11 Dec 2023 16:24:38 +0000
Received: by outflank-mailman (input) for mailman id 652377;
 Mon, 11 Dec 2023 16:24:37 +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=DOfJ=HW=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rCj5B-0005wg-4E
 for win-pv-devel@lists.xenproject.org; Mon, 11 Dec 2023 16:24:37 +0000
Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com
 [2a00:1450:4864:20::32c])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id c53fc541-9841-11ee-9b0f-b553b5be7939;
 Mon, 11 Dec 2023 17:24:35 +0100 (CET)
Received: by mail-wm1-x32c.google.com with SMTP id
 5b1f17b1804b1-40c2d50bfbfso21831275e9.0
 for <win-pv-devel@lists.xenproject.org>; Mon, 11 Dec 2023 08:24:34 -0800 (PST)
Received: from [10.95.102.129] (54-240-197-226.amazon.com. [54.240.197.226])
 by smtp.gmail.com with ESMTPSA id
 m23-20020adfa3d7000000b00334b2272a7asm9125677wrb.2.2023.12.11.08.24.33
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 11 Dec 2023 08:24:33 -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: c53fc541-9841-11ee-9b0f-b553b5be7939
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702311874; x=1702916674; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=w+KHIYVo9fjQIW7D4aARge+KkaREetpBqQgrJQsPEJs=;
        b=VX3KS4srpYJIFiMAxOy1pDtd2tzlDoP/eayG+0xJ1X2qWq1N6/AB3GRTV3rQFxYOUs
         KvsciYT62GDrE366VmPFM34bfMv1IT/X0XBVhR9U1i7rf9GyJQBecogECiZfXS6oFuwV
         clC2uK46d+Jf97b//FnyvHAqCj+cf2925fM74Ruu3J96N9w8hiUSkbEn4q4aZY9oLXSr
         EjxWbbB4aRK8Urxe0XShQO4EHkbvIEC2esi3VYfmjQn2jCLFXoJgdJSQdMqYDEkqo5pn
         QKUzaZjXCTR4z1pZ+OZG2bhpe1V9sPz8F0cWixCj7KhAu1xJ5qgYs+aPegdGesG0Qgt9
         4k4A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702311874; x=1702916674;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=w+KHIYVo9fjQIW7D4aARge+KkaREetpBqQgrJQsPEJs=;
        b=a9c7z/0ama2jTcaUWCJ9sv+bi9S1EibG/OQHuefnWLFeUsgCBccyo4HX3uk6URFPSS
         9Qj4kTfQfZdX+Lsm5sW3KOHQq3y2P4p0X7wFqB0jo8cymHm4JH57aZpq7vH0rS8oHYdh
         H/xO2TtCafrqBgtqwWT2KNI34tEYSPrVPvFyGBruy1ai6hnkKGgscQT6FpZJFxigLZGZ
         bwreeyyf1D4XztHpQbq3J5w/lexiIUzMvyNVGKg9Ze2fcW+geAcC44iFpnGch1ASq7sb
         tLkGYgPBOBNI3QJ7+wE4OHxO8Acwbn9ZKTqhCb1kPeoMkZYmiiNmbxLZryq/MXS0rIOs
         wdZw==
X-Gm-Message-State: AOJu0YwX+Ne4ZumTgkAkJ32h2Mzc2qvOyTtLVa3wvWnHZncItVyYN9K4
	5ggxelgkLu8IzvdRCoClte+BZyQr8FKC6Q==
X-Google-Smtp-Source: AGHT+IGNDKZxAX6ZKKJfTAAOhAFSZ9clyxsseIu7ZlRoZcmpLtN4jPX0tOm1wIBQXLUi2lAYxXE+Hg==
X-Received: by 2002:a05:600c:4f8d:b0:40c:20f7:adec with SMTP id n13-20020a05600c4f8d00b0040c20f7adecmr2800871wmq.15.1702311873907;
        Mon, 11 Dec 2023 08:24:33 -0800 (PST)
Message-ID: <5ae708ce-626f-4ba9-93fa-54bf8f9be182@gmail.com>
Date: Mon, 11 Dec 2023 16:24:32 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: paul@xen.org
Subject: Re: [PATCH 1/2] Added MSBuild map file generation and handling.
Content-Language: en-US
To: win-pv-devel@lists.xenproject.org
References: <20231129084737.337-1-owen.smith@cloud.com>
From: "Durrant, Paul" <xadimgnik@gmail.com>
In-Reply-To: <20231129084737.337-1-owen.smith@cloud.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 29/11/2023 08:47, Owen Smith wrote:
> Suggested-by: Alex Burke <Alex.Burke@citrix.com>
> Signed-off-by: Owen Smith <owen.smith@cloud.com>
> ---
>   build.ps1                                    | 8 ++++++++
>   vs2019/xen/xen.vcxproj                       | 2 ++
>   vs2019/xenbus/xenbus.vcxproj                 | 2 ++
>   vs2019/xenbus_monitor/xenbus_monitor.vcxproj | 2 ++
>   vs2019/xenfilt/xenfilt.vcxproj               | 2 ++
>   vs2022/xen/xen.vcxproj                       | 2 ++
>   vs2022/xenbus/xenbus.vcxproj                 | 2 ++
>   vs2022/xenbus_monitor/xenbus_monitor.vcxproj | 2 ++
>   vs2022/xenfilt/xenfilt.vcxproj               | 2 ++
>   9 files changed, 24 insertions(+)
> 

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



From win-pv-devel-bounces@lists.xenproject.org Mon Dec 11 16:25:17 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 11 Dec 2023 16:25:17 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652381.1018192 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCj5p-0006CG-PV; Mon, 11 Dec 2023 16:25:17 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652381.1018192; Mon, 11 Dec 2023 16:25:17 +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 1rCj5p-0006C9-Mz; Mon, 11 Dec 2023 16:25:17 +0000
Received: by outflank-mailman (input) for mailman id 652381;
 Mon, 11 Dec 2023 16:25:15 +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=DOfJ=HW=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rCj5n-0006Bq-Rj
 for win-pv-devel@lists.xenproject.org; Mon, 11 Dec 2023 16:25:15 +0000
Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com
 [2a00:1450:4864:20::432])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id dcc82002-9841-11ee-9b0f-b553b5be7939;
 Mon, 11 Dec 2023 17:25:14 +0100 (CET)
Received: by mail-wr1-x432.google.com with SMTP id
 ffacd0b85a97d-32f8441dfb5so4447592f8f.0
 for <win-pv-devel@lists.xenproject.org>; Mon, 11 Dec 2023 08:25:14 -0800 (PST)
Received: from [10.95.102.129] (54-240-197-226.amazon.com. [54.240.197.226])
 by smtp.gmail.com with ESMTPSA id
 m23-20020adfa3d7000000b00334b2272a7asm9125677wrb.2.2023.12.11.08.25.12
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 11 Dec 2023 08:25:13 -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: dcc82002-9841-11ee-9b0f-b553b5be7939
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702311913; x=1702916713; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=VzuqTKskzTM9ojbryWzcDKTWEFWXqAh0gH3d5inl0NQ=;
        b=FT5ulRMtgpjNrZkyWNoVDtZ8eNVUjqSJF0pUVxAdSI9ZnP3wQMYFSeVUFpAVCRh94D
         BhkSQzd3RAMyZOzcyX+zkjdvhEBGN0JQBmtVMnoTkIerVJKnBWj94z0Sb3NiOLIi1aeB
         ChqCue3eGcXE4CLJzd0Eex9pOW61vVDDcGq4hThgKlc+4e2EBzOBCWTN6DVVwkZ/AaQB
         ZsKUfCAZmzf1QJFR3m+9zrggwUrgU1brEKk2tX+O2W6Ev/cZoEutnv89KqdSIC2G7Ajb
         P+sxsi4JJX8er09H1li4fx+/iXa2sC6kYWs9YxgxreVBglk3pllLZNlsP7TATM0hxYCz
         nkqw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702311913; x=1702916713;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=VzuqTKskzTM9ojbryWzcDKTWEFWXqAh0gH3d5inl0NQ=;
        b=Sw1xv1hnWsQXP6/DD/70EatXIGIS/o5XOansP4NJxiKyrBHLwWNz++/cdLjx7P0br0
         E/J88JD8863d0/NrtQkNiw9ydY4pJBT6P5WiIHVDOa0CXGlpcbWpI1g2pzBO7IaBHS3O
         dbTLeXNDiAm5nA89tKx/a95W3YsK2ZhppE/7RzyVbyWhiDkjHN8K1QhBcFg4stuB4Gwq
         iWDvO2IShI+CquQastAobFCgeinxViiX9o0Ygo6+ssGglxW5Kh11j+j3KirHMRiW26Mc
         +peSWGox+zGf0eKkcRm2wms21lUjfGb8XIUKluBAVhHK0p7XxNLUEN6wdZErVq5Jx3Nj
         2Ctg==
X-Gm-Message-State: AOJu0YwSRzpBsbFa01QtaSmrVM9MAc63ioliIWWGO4ozPskGIU8/KMGQ
	YtBZnU+0jc6H12gR89m7Vv1gR3mg1uIcaQ==
X-Google-Smtp-Source: AGHT+IFG9dpWchGs2LRYQ8tZlXHc9fBADNQv2857x9OGESmQeJmj+/A12+tl/whmUe94FA8nPn9HAQ==
X-Received: by 2002:a5d:457b:0:b0:333:129d:239 with SMTP id a27-20020a5d457b000000b00333129d0239mr2733376wrc.0.1702311913529;
        Mon, 11 Dec 2023 08:25:13 -0800 (PST)
Message-ID: <3578ada8-410e-481c-9223-df22500ee6f5@gmail.com>
Date: Mon, 11 Dec 2023 16:25:12 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: paul@xen.org
Subject: Re: [PATCH 2/2] Enable Integrity Check
Content-Language: en-US
To: win-pv-devel@lists.xenproject.org
References: <20231129084737.337-1-owen.smith@cloud.com>
 <20231129084737.337-2-owen.smith@cloud.com>
From: "Durrant, Paul" <xadimgnik@gmail.com>
In-Reply-To: <20231129084737.337-2-owen.smith@cloud.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 29/11/2023 08:47, Owen Smith wrote:
> Suggested-by: Rabish Kumar <rabish.kumar@citrix.com>
> Signed-off-by: Owen Smith <owen.smith@cloud.com>
> ---
>   vs2019/xen/xen.vcxproj         | 1 +
>   vs2019/xenbus/xenbus.vcxproj   | 1 +
>   vs2019/xenfilt/xenfilt.vcxproj | 1 +
>   vs2022/xen/xen.vcxproj         | 1 +
>   vs2022/xenbus/xenbus.vcxproj   | 1 +
>   vs2022/xenfilt/xenfilt.vcxproj | 1 +
>   6 files changed, 6 insertions(+)
> 

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



From win-pv-devel-bounces@lists.xenproject.org Mon Dec 11 16:32:41 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 11 Dec 2023 16:32:41 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652390.1018195 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCjCy-0008Ma-B2; Mon, 11 Dec 2023 16:32:40 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652390.1018195; Mon, 11 Dec 2023 16:32:40 +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 1rCjCy-0008MT-8a; Mon, 11 Dec 2023 16:32:40 +0000
Received: by outflank-mailman (input) for mailman id 652390;
 Mon, 11 Dec 2023 16:32:38 +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=DOfJ=HW=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rCjCw-0008Ky-T2
 for win-pv-devel@lists.xenproject.org; Mon, 11 Dec 2023 16:32:38 +0000
Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com
 [2a00:1450:4864:20::333])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id e4b9dbd3-9842-11ee-9b0f-b553b5be7939;
 Mon, 11 Dec 2023 17:32:37 +0100 (CET)
Received: by mail-wm1-x333.google.com with SMTP id
 5b1f17b1804b1-40c38e292c8so14509995e9.0
 for <win-pv-devel@lists.xenproject.org>; Mon, 11 Dec 2023 08:32:36 -0800 (PST)
Received: from [10.95.102.129] (54-240-197-226.amazon.com. [54.240.197.226])
 by smtp.gmail.com with ESMTPSA id
 b16-20020a05600c4e1000b0040c310abc4bsm13856237wmq.43.2023.12.11.08.32.35
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 11 Dec 2023 08:32:35 -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: e4b9dbd3-9842-11ee-9b0f-b553b5be7939
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702312356; x=1702917156; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=yaVRt/SGPVIvpHOuM1CvQDPS3LtfkqzJRwjDr7WUX/Y=;
        b=Q6YYiKPPGW94gwiF0Nt1j/Vpg1ZaTGMNnM4zDGsGV17AwHFZ5HdKE782YvQvvB9z8t
         luLVQlXx3ehabUjDAGIu68aY0R4tVwjOU1pU8q7dKdg4BhxW77hKBy9beL3t1LN84maU
         r1OTJboa+k6qWc0y+JADuOblE/P//GfGqS16ZDm6VVGEqEaZbLgeViR5FQUtPIbJ8iMY
         oGX/p/MKRNRaIgeoHr+pcYW4Iz860xgNCBm28CNwKvM+og/nQEtClZ6VB3izUt6VGoic
         21E3Le2ZGapOyo+344szN9vNXGDAJIF5oeYIdgZiriPsGpKG4niKFhW9YLQ8koDOT8zW
         OMpQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702312356; x=1702917156;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=yaVRt/SGPVIvpHOuM1CvQDPS3LtfkqzJRwjDr7WUX/Y=;
        b=vLvHGABNe6bPlZQWgLzjCyRwfJKyPKUOdKemklDge2wSR3Phy2LSCdhgcgcCHVIiz1
         6G7qVsfrtssbap+ZCPFWsyTj36d4guaBOp/5tVSgJTA45c0BkmsYxnC50I19V4WdaNUl
         8YWkQukn4hSBKqQOSXAJlnXWTK3fJZl+tu22kGxYTM59xeHTV6a/jbQvmgvEIVfNOWK/
         rAG5/9QWAt7t0gnBBT+iUPFw0h1JWoDru6Dh0FYzXDFmRnHpc972Dp2g9V/+wuizAVRz
         N49O1ivvvNRz/I9xFuBXm40Iepvdro9e7V++W887yA94FROnceBcbn2in6QtYNePvJf1
         rbgQ==
X-Gm-Message-State: AOJu0YwjVijrTWao5BihBCy5+Xu9BjNeGhhqiIhNKJepceGRYwaG/xa6
	EKWRV4Qd89goWKYls4phPtoCgNHzMB+f1w==
X-Google-Smtp-Source: AGHT+IFZ232A8OwwPLOi7MKm5B17Je52tU4c3QK944uydd++YpVqpQARti4WncPf/MN6hD0H7lJJsA==
X-Received: by 2002:a05:600c:16c9:b0:40c:3dd7:98d9 with SMTP id l9-20020a05600c16c900b0040c3dd798d9mr1999496wmn.21.1702312356232;
        Mon, 11 Dec 2023 08:32:36 -0800 (PST)
Message-ID: <f6d6de79-3f25-43d6-ae52-37701473ba3c@gmail.com>
Date: Mon, 11 Dec 2023 16:32:35 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: paul@xen.org
Subject: Re: [PATCH 1/3] Remove VS2015 and VS2017 projects and configurations
Content-Language: en-US
To: win-pv-devel@lists.xenproject.org, Owen Smith <owen.smith@cloud.com>
References: <20231120150315.539-1-owen.smith@cloud.com>
From: "Durrant, Paul" <xadimgnik@gmail.com>
In-Reply-To: <20231120150315.539-1-owen.smith@cloud.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Owen,

   I think I have acked and applied everything outstanding now. I don't 
think I have seen a series like this for XENNET. Did I miss it?

   Paul


From win-pv-devel-bounces@lists.xenproject.org Tue Dec 12 08:31:41 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 12 Dec 2023 08:31:41 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652701.1018723 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCyB0-0003YI-IK; Tue, 12 Dec 2023 08:31:38 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652701.1018723; Tue, 12 Dec 2023 08:31:38 +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 1rCyB0-0003YB-Fa; Tue, 12 Dec 2023 08:31:38 +0000
Received: by outflank-mailman (input) for mailman id 652701;
 Tue, 12 Dec 2023 08:31:37 +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=6BRB=HX=cloud.com=owen.smith@srs-se1.protection.inumbo.net>)
 id 1rCyAz-0003Y5-4R
 for win-pv-devel@lists.xenproject.org; Tue, 12 Dec 2023 08:31:37 +0000
Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com
 [2a00:1450:4864:20::231])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id dcd3acb6-98c8-11ee-98e8-6d05b1d4d9a1;
 Tue, 12 Dec 2023 09:31:36 +0100 (CET)
Received: by mail-lj1-x231.google.com with SMTP id
 38308e7fff4ca-2cb20b965dbso51518681fa.1
 for <win-pv-devel@lists.xenproject.org>; Tue, 12 Dec 2023 00:31:36 -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: dcd3acb6-98c8-11ee-98e8-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=cloud.com; s=cloud; t=1702369895; x=1702974695; 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=xugGqSzMd4FOT4xoMzYQspNghpn+jWNnXJep8F3pTlg=;
        b=KAPeQQDE2A7+APeipJ6YiKzuoXuNrNrkOePNIAfyfHEXliMLn2BloY4ZtetuNjq0Wj
         u9JVrvgZT4UBjcdT7bFyeLHNZ8LfongY94BK55t3FrOGHDNHVk0WBCRtQz0FZ7GnPp/p
         ChUJiA576xGzj4+Z/tHnpZss7DdZTN0uux1Ew=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702369895; x=1702974695;
        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=xugGqSzMd4FOT4xoMzYQspNghpn+jWNnXJep8F3pTlg=;
        b=skOmMyWef+xB8VAFeoZ6qIPuSF0wIRZCPMxkLxE4+mNNEFsNRJ0Zsu5gHunU3Nbtva
         S0yjCNWz0qvlbyNY0u1BMypHHJf1+zA+NeqBSSlSviM75JLGhS29SW926QesW3Guxu+P
         1MX+YR85GzO49x6S2Rrny9fTeqWk8KKLAijN1d8ZlGgG7l/KtEmLuvzUShyZ1/lXM92u
         sbLnJhffB7YwZwpY5lPqwOcDMEOuwSkEUf/59Xh3MT4T0EaWPPwSo6XN+2FjOLeB+GJx
         HVRX7FQVz4juqaf9ms6xnOHfAM1ErB4kKF3BSpjHnNYihjW0eSdmbOzIk3gSA8QqgHDJ
         uDkQ==
X-Gm-Message-State: AOJu0Yyo61GJfDHdZTFI6P47hJb2wHaxAfGvSTjLP/hVKGY57zDAlscR
	neSehe0wyTBMCpidetosm5IM/Im4WWcex4Xhe3UZSzmNUXmjqD4=
X-Google-Smtp-Source: AGHT+IEkezv19RLFkRYKi1JS7Q7RAqRpVwFVmm6xzdcn3PpUSwR7wDwUVakJH1F1CLI3ILh17x1tlSi5pJ8wA98Td10=
X-Received: by 2002:a2e:8754:0:b0:2c9:efa1:aa5f with SMTP id
 q20-20020a2e8754000000b002c9efa1aa5fmr1010927ljj.74.1702369895581; Tue, 12
 Dec 2023 00:31:35 -0800 (PST)
MIME-Version: 1.0
References: <20231120150315.539-1-owen.smith@cloud.com> <f6d6de79-3f25-43d6-ae52-37701473ba3c@gmail.com>
In-Reply-To: <f6d6de79-3f25-43d6-ae52-37701473ba3c@gmail.com>
From: Owen Smith <owen.smith@cloud.com>
Date: Tue, 12 Dec 2023 08:31:24 +0000
Message-ID: <CAC_UY8_EVapKQDn6Y4cnBSaHNCML2xJ7xRjcGvDghKk+-cHu3g@mail.gmail.com>
Subject: Re: [PATCH 1/3] Remove VS2015 and VS2017 projects and configurations
To: paul@xen.org
Cc: win-pv-devel@lists.xenproject.org
Content-Type: multipart/alternative; boundary="000000000000e723f7060c4be073"

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

I thought I did... resending

Owen

On Mon, Dec 11, 2023 at 4:32=E2=80=AFPM Durrant, Paul <xadimgnik@gmail.com>=
 wrote:

> Hi Owen,
>
>    I think I have acked and applied everything outstanding now. I don't
> think I have seen a series like this for XENNET. Did I miss it?
>
>    Paul
>

--000000000000e723f7060c4be073
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">I thought I did... resending</div><div class=3D"gmail_default" style=3D"=
font-family:monospace"><br></div><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">On Mon, Dec 11, 2023 at 4:32=E2=80=AFPM Durra=
nt, Paul &lt;<a href=3D"mailto:xadimgnik@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 solid rgb(204,204,204);padding-left:1ex">Hi O=
wen,<br>
<br>
=C2=A0 =C2=A0I think I have acked and applied everything outstanding now. I=
 don&#39;t <br>
think I have seen a series like this for XENNET. Did I miss it?<br>
<br>
=C2=A0 =C2=A0Paul<br>
</blockquote></div>

--000000000000e723f7060c4be073--


From win-pv-devel-bounces@lists.xenproject.org Tue Dec 12 08:32:10 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 12 Dec 2023 08:32:10 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652704.1018726 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCyBW-0003cK-Ks; Tue, 12 Dec 2023 08:32:10 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652704.1018726; Tue, 12 Dec 2023 08:32:10 +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 1rCyBW-0003cD-I6; Tue, 12 Dec 2023 08:32:10 +0000
Received: by outflank-mailman (input) for mailman id 652704;
 Tue, 12 Dec 2023 08:32:09 +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=6BRB=HX=cloud.com=owen.smith@srs-se1.protection.inumbo.net>)
 id 1rCyBV-0003c0-FN
 for win-pv-devel@lists.xenproject.org; Tue, 12 Dec 2023 08:32:09 +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 ef6f98df-98c8-11ee-98e8-6d05b1d4d9a1;
 Tue, 12 Dec 2023 09:32:07 +0100 (CET)
Received: by mail-wm1-x334.google.com with SMTP id
 5b1f17b1804b1-40c0fc1cf3dso56108405e9.0
 for <win-pv-devel@lists.xenproject.org>; Tue, 12 Dec 2023 00:32:07 -0800 (PST)
Received: from localhost.localdomain ([185.25.65.68])
 by smtp.gmail.com with ESMTPSA id
 fm14-20020a05600c0c0e00b00407b93d8085sm17996468wmb.27.2023.12.12.00.32.04
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 12 Dec 2023 00:32:05 -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: ef6f98df-98c8-11ee-98e8-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=cloud.com; s=cloud; t=1702369926; x=1702974726; darn=lists.xenproject.org;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to;
        bh=Ct51y6BOuZxHr8JDdFCCqdUbkPB0YsmJeueF44BNszA=;
        b=Y+/AfHTk/yEpVOGPX+G5F82OBxOsl8/X/VcnzX8mKFtQZzhHYv6uXCnJjQudVwkODm
         IqzKXEDO8isxKXO7xsLl5FG2NW9RpSZczaMiO93m8plHB7crSXTfkJdLlM+r0ROEW1fi
         fvTnuHdJkmRKkZ/kcO54y/8wjSBRzk4xHuuLg=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702369926; x=1702974726;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=Ct51y6BOuZxHr8JDdFCCqdUbkPB0YsmJeueF44BNszA=;
        b=pwZUA8immaU5lnkBFJaS0nAIuhBumIEyodz57mnT2MAsoAMqAIVHV1MImzx01gRrmF
         JrUH5X2zwcM9w7AYc12AU18fmWmcajIBn2Jz5MuDOzubGU2ii6Gi8D2VyLi4BTyD9sP5
         XRxTGKiPAettjYbIGJV2S0aD5pl/i/0XcPeztxs0u1JrAk3tKK/3kWlkzo4dpEw6nt5I
         a5HuYfFIlO1QHjSb9Ci+7ICbFmDd5S6tttgpJTuXyyyjdSep8Gi+H30eTyINqn4k6uPP
         baROhQln2huHS2mFOFo6jLKoN1KWZaUXiHtxH/xcIM+zU1OaalW3K3nFnGP6mC6DaLZN
         n8Ng==
X-Gm-Message-State: AOJu0Yw7gOgxajwujbjvhCf0Cnnrp7pl4H6bUJ3LZDEhgzML8RjaaS/Q
	i1oNU83h+DBv402vVAXVW6shvG+LE/9FV0dQ8A==
X-Google-Smtp-Source: AGHT+IFhM7Oohuow2+x69P2VyNmk8QGtkY8YRJMrNzshZ8gJBXvdC6OybE8IVfLXv2nyQYGHwFKNNw==
X-Received: by 2002:a05:600c:2147:b0:40c:23ca:1444 with SMTP id v7-20020a05600c214700b0040c23ca1444mr2851821wml.80.1702369925660;
        Tue, 12 Dec 2023 00:32:05 -0800 (PST)
From: Owen Smith <owen.smith@cloud.com>
To: win-pv-devel@lists.xenproject.org
Cc: Owen Smith <owen.smith@cloud.com>
Subject: [PATCH 1/3] Remove VS2015 and VS2017 projects and configurations
Date: Tue, 12 Dec 2023 08:31:41 +0000
Message-ID: <20231212083143.1359-1-owen.smith@cloud.com>
X-Mailer: git-send-email 2.41.0.windows.3
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Signed-off-by: Owen Smith <owen.smith@cloud.com>
---
 build.ps1                           | 12 ++--
 vs2015/configs.props                | 45 -------------
 vs2015/package/package.vcxproj      | 62 ------------------
 vs2015/package/package.vcxproj.user |  8 ---
 vs2015/targets.props                | 35 -----------
 vs2015/version/version.vcxproj      | 19 ------
 vs2015/xennet.sln                   | 97 -----------------------------
 vs2015/xennet/xennet.vcxproj        | 67 --------------------
 vs2015/xennet/xennet.vcxproj.user   |  8 ---
 vs2017/configs.props                | 45 -------------
 vs2017/package/package.vcxproj      | 62 ------------------
 vs2017/package/package.vcxproj.user |  8 ---
 vs2017/targets.props                | 35 -----------
 vs2017/version/version.vcxproj      | 16 -----
 vs2017/xennet.sln                   | 94 ----------------------------
 vs2017/xennet/xennet.vcxproj        | 75 ----------------------
 vs2017/xennet/xennet.vcxproj.user   |  8 ---
 17 files changed, 6 insertions(+), 690 deletions(-)
 delete mode 100644 vs2015/configs.props
 delete mode 100644 vs2015/package/package.vcxproj
 delete mode 100644 vs2015/package/package.vcxproj.user
 delete mode 100644 vs2015/targets.props
 delete mode 100644 vs2015/version/version.vcxproj
 delete mode 100644 vs2015/xennet.sln
 delete mode 100644 vs2015/xennet/xennet.vcxproj
 delete mode 100644 vs2015/xennet/xennet.vcxproj.user
 delete mode 100644 vs2017/configs.props
 delete mode 100644 vs2017/package/package.vcxproj
 delete mode 100644 vs2017/package/package.vcxproj.user
 delete mode 100644 vs2017/targets.props
 delete mode 100644 vs2017/version/version.vcxproj
 delete mode 100644 vs2017/xennet.sln
 delete mode 100644 vs2017/xennet/xennet.vcxproj
 delete mode 100644 vs2017/xennet/xennet.vcxproj.user

diff --git a/build.ps1 b/build.ps1
index 8ea904f..4ff02c1 100644
--- a/build.ps1
+++ b/build.ps1
@@ -22,8 +22,8 @@ Function Build {
 	)
 
 	$visualstudioversion = $Env:VisualStudioVersion
-	$solutiondir = @{ "14.0" = "vs2015"; "15.0" = "vs2017"; "16.0" = "vs2019"; "17.0" = "vs2022"; }
-       $configurationbase = @{ "14.0" = "Windows 10"; "15.0" = "Windows 10"; "16.0" = "Windows 10"; "17.0" = "Windows 10"; }
+	$solutiondir = @{ "16.0" = "vs2019"; "17.0" = "vs2022"; }
+	$configurationbase = @{ "16.0" = "Windows 10"; "17.0" = "Windows 10"; }
 
 	$params = @{
 		SolutionDir = $solutiondir[$visualstudioversion];
@@ -41,8 +41,8 @@ Function Build {
 
 Function SdvBuild {
 	$visualstudioversion = $Env:VisualStudioVersion
-	$solutiondir = @{ "14.0" = "vs2015"; "15.0" = "vs2017"; "16.0" = "vs2019"; "17.0" = "vs2022"; }
-       $configurationbase = @{ "14.0" = "Windows 10"; "15.0" = "Windows 10"; "16.0" = "Windows 10"; "17.0" = "Windows 10"; }
+	$solutiondir = @{ "16.0" = "vs2019"; "17.0" = "vs2022"; }
+	$configurationbase = @{ "16.0" = "Windows 10"; "17.0" = "Windows 10"; }
 	$arch = "x64"
 
 	$params = @{
@@ -57,8 +57,8 @@ Function SdvBuild {
 
 function CodeQLBuild {
 	$visualstudioversion = $Env:VisualStudioVersion
-	$solutiondir = @{ "14.0" = "vs2015"; "15.0" = "vs2017"; "16.0" = "vs2019"; "17.0" = "vs2022"; }
-       $configurationbase = @{ "14.0" = "Windows 10"; "15.0" = "Windows 10"; "16.0" = "Windows 10"; "17.0" = "Windows 10"; }
+	$solutiondir = @{ "16.0" = "vs2019"; "17.0" = "vs2022"; }
+	$configurationbase = @{ "16.0" = "Windows 10"; "17.0" = "Windows 10"; }
 	$arch = "x64"
 
 	$params = @{
diff --git a/vs2015/configs.props b/vs2015/configs.props
deleted file mode 100644
index cdbb3c8..0000000
--- a/vs2015/configs.props
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-	<ItemGroup Label="ProjectConfigurations">
-		<ProjectConfiguration Include="Windows 10 Debug|Win32">
-			<Configuration>Windows 10 Debug</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 10 Release|Win32">
-			<Configuration>Windows 10 Release</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 10 Debug|x64">
-			<Configuration>Windows 10 Debug</Configuration>
-			<Platform>x64</Platform>
-			<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 10 Release|x64">
-			<Configuration>Windows 10 Release</Configuration>
-			<Platform>x64</Platform>
-			<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Debug|Win32">
-			<Configuration>Windows 8 Debug</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Release|Win32">
-			<Configuration>Windows 8 Release</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Debug|x64">
-			<Configuration>Windows 8 Debug</Configuration>
-			<Platform>x64</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Release|x64">
-			<Configuration>Windows 8 Release</Configuration>
-			<Platform>x64</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-	</ItemGroup>
-</Project>
diff --git a/vs2015/package/package.vcxproj b/vs2015/package/package.vcxproj
deleted file mode 100644
index cce27d2..0000000
--- a/vs2015/package/package.vcxproj
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\configs.props" />
-  <PropertyGroup Label="PropertySheets">
-    <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
-    <ConfigurationType>Utility</ConfigurationType>
-    <DriverType>Package</DriverType>
-    <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
-    <SupportsPackaging>true</SupportsPackaging>
-    <DriverTargetPlatform>Desktop</DriverTargetPlatform>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{445FD18F-97E3-4E5D-825F-151026242C05}</ProjectGuid>
-  </PropertyGroup>
-  <Import Project="..\targets.props" />
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <PropertyGroup>
-    <EnableInf2cat>true</EnableInf2cat>
-    <Inf2CatWindowsVersionList Condition="'$(Platform)'=='x64'">8_x64;Server8_x64;10_x64;Server10_x64</Inf2CatWindowsVersionList>
-    <Inf2CatWindowsVersionList Condition="'$(Platform)'=='Win32'">8_x86;10_x86</Inf2CatWindowsVersionList>
-    <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
-    <EnableDeployment>False</EnableDeployment>
-    <ImportToStore>False</ImportToStore>
-    <InstallMode>None</InstallMode>
-    <ScriptDeviceQuery>%PathToInf%</ScriptDeviceQuery>
-    <EnableVerifier>False</EnableVerifier>
-    <AllDrivers>False</AllDrivers>
-    <VerifyProjectOutput>True</VerifyProjectOutput>
-    <VerifyFlags>133563</VerifyFlags>
-    <IntDir>..\$(ProjectName)\$(ConfigurationName)\$(Platform)\</IntDir>
-    <OutDir>..\$(ConfigurationName)\$(Platform)\</OutDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Platform)'=='Win32'">
-    <ArchiveDir>..\..\$(SolutionName)\x86</ArchiveDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Platform)'=='x64'">
-    <ArchiveDir>..\..\$(SolutionName)\x64</ArchiveDir>
-  </PropertyGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\xennet\xennet.vcxproj">
-      <Project>{97D9942B-5EA3-488C-B512-C96E5D077F8E}</Project>
-    </ProjectReference>
-    <FilesToPackage Include="..\xennet.inf" />
-  </ItemGroup>
-  <ItemGroup Condition="Exists('$(DPINST_REDIST)')">
-    <FilesToPackage Include="$(DPINST_REDIST)\x86\dpinst.exe" Condition="'$(Platform)'=='Win32'" />
-    <FilesToPackage Include="$(DPINST_REDIST)\x64\dpinst.exe" Condition="'$(Platform)'=='x64'" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-  <ItemGroup>
-    <PackageFiles Include="$(OutDir)\$(ProjectName)\*" />
-  </ItemGroup>
-  <Target Name="Archive" AfterTargets="TestSign">
-    <Copy
-       SourceFiles="@(PackageFiles)"
-       DestinationFiles="@(PackageFiles->'$(ArchiveDir)\%(FileName)%(Extension)')"
-    />
-  </Target>
-</Project>
diff --git a/vs2015/package/package.vcxproj.user b/vs2015/package/package.vcxproj.user
deleted file mode 100644
index 8b034c4..0000000
--- a/vs2015/package/package.vcxproj.user
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <SignMode>TestSign</SignMode>
-    <TestCertificate>..\..\src\xennet.pfx</TestCertificate>
-    <TimeStampServer>http://timestamp.verisign.com/scripts/timstamp.dll</TimeStampServer>
-  </PropertyGroup>
-</Project>
diff --git a/vs2015/targets.props b/vs2015/targets.props
deleted file mode 100644
index 64598fc..0000000
--- a/vs2015/targets.props
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 10 Debug|Win32'">
-		<TargetVersion>Windows10</TargetVersion>
-		<UseDebugLibraries>true</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 10 Release|Win32'">
-		<TargetVersion>Windows10</TargetVersion>
-		<UseDebugLibraries>false</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 10 Debug|x64'">
-		<TargetVersion>Windows10</TargetVersion>
-		<UseDebugLibraries>true</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 10 Release|x64'">
-		<TargetVersion>Windows10</TargetVersion>
-		<UseDebugLibraries>false</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Debug|Win32'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>true</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Release|Win32'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>false</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Debug|x64'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>true</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Release|x64'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>false</UseDebugLibraries>
-	</PropertyGroup>
-</Project>
diff --git a/vs2015/version/version.vcxproj b/vs2015/version/version.vcxproj
deleted file mode 100644
index e3c95c4..0000000
--- a/vs2015/version/version.vcxproj
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\configs.props" />
-  <Import Project="..\targets.props" />
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{65FA97EA-A569-4FC1-BFE7-D68E109143F7}</ProjectGuid>
-  </PropertyGroup>
-  <PropertyGroup>
-    <Script>..\..\scripts\genfiles.ps1</Script>
-    <SolutionDir>..</SolutionDir>
-    <IncludeDir>..\..\include</IncludeDir>
-    <SourceDir>..\..\src</SourceDir>
-  </PropertyGroup>
-  <Target Name="GetNativeManifest"></Target>
-  <Target Name="Build">
-    <Exec Command="powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive -File $(Script) $(Platform) $(SolutionDir) $(IncludeDir) $(SourceDir)" />
-  </Target>
-  <Target Name="GetCopyToOutputDirectoryItems"></Target>
-</Project>
diff --git a/vs2015/xennet.sln b/vs2015/xennet.sln
deleted file mode 100644
index 875f691..0000000
--- a/vs2015/xennet.sln
+++ /dev/null
@@ -1,97 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version\version.vcxproj", "{65FA97EA-A569-4FC1-BFE7-D68E109143F7}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xennet", "xennet\xennet.vcxproj", "{97D9942B-5EA3-488C-B512-C96E5D077F8E}"
-	ProjectSection(ProjectDependencies) = postProject
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7} = {65FA97EA-A569-4FC1-BFE7-D68E109143F7}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "package", "package\package.vcxproj", "{445FD18F-97E3-4E5D-825F-151026242C05}"
-	ProjectSection(ProjectDependencies) = postProject
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7} = {65FA97EA-A569-4FC1-BFE7-D68E109143F7}
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Windows 8 Debug|Win32 = Windows 8 Debug|Win32
-		Windows 8 Debug|x64 = Windows 8 Debug|x64
-		Windows 8 Release|Win32 = Windows 8 Release|Win32
-		Windows 8 Release|x64 = Windows 8 Release|x64
-		Windows 10 Debug|Win32 = Windows 10 Debug|Win32
-		Windows 10 Debug|x64 = Windows 10 Debug|x64
-		Windows 10 Release|Win32 = Windows 10 Release|Win32
-		Windows 10 Release|x64 = Windows 10 Release|x64
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Debug|Win32.ActiveCfg = Windows 10 Debug|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Debug|Win32.Build.0 = Windows 10 Debug|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Debug|x64.ActiveCfg = Windows 10 Debug|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Debug|x64.Build.0 = Windows 10 Debug|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|Win32.ActiveCfg = Windows 10 Release|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|Win32.Build.0 = Windows 10 Release|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|x64.ActiveCfg = Windows 10 Release|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|x64.Build.0 = Windows 10 Release|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|Win32.Deploy.0 = Windows 8 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|x64.Deploy.0 = Windows 8 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|Win32.Deploy.0 = Windows 8 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|x64.Deploy.0 = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.ActiveCfg = Windows 10 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.Build.0 = Windows 10 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.Deploy.0 = Windows 10 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|x64.ActiveCfg = Windows 10 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|x64.Build.0 = Windows 10 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|x64.Deploy.0 = Windows 10 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|Win32.ActiveCfg = Windows 10 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|Win32.Build.0 = Windows 10 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|Win32.Deploy.0 = Windows 10 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.ActiveCfg = Windows 10 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.Build.0 = Windows 10 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.Deploy.0 = Windows 10 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|Win32.Deploy.0 = Windows 8 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|x64.Deploy.0 = Windows 8 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|Win32.Deploy.0 = Windows 8 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|x64.Deploy.0 = Windows 8 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.ActiveCfg = Windows 10 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.Build.0 = Windows 10 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.Deploy.0 = Windows 10 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|x64.ActiveCfg = Windows 10 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|x64.Build.0 = Windows 10 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|x64.Deploy.0 = Windows 10 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|Win32.ActiveCfg = Windows 10 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|Win32.Build.0 = Windows 10 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|Win32.Deploy.0 = Windows 10 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|x64.ActiveCfg = Windows 10 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|x64.Build.0 = Windows 10 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|x64.Deploy.0 = Windows 10 Release|x64
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
diff --git a/vs2015/xennet/xennet.vcxproj b/vs2015/xennet/xennet.vcxproj
deleted file mode 100644
index 966de3a..0000000
--- a/vs2015/xennet/xennet.vcxproj
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\configs.props" />
-  <PropertyGroup Label="PropertySheets">
-    <ConfigurationType>Driver</ConfigurationType>
-    <DriverType>WDM</DriverType>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Label="Configuration">
-    <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{97D9942B-5EA3-488C-B512-C96E5D077F8E}</ProjectGuid>
-  </PropertyGroup>
-  <Import Project="..\targets.props" />
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <PropertyGroup>
-    <RunCodeAnalysis>true</RunCodeAnalysis>
-    <EnableInf2cat>false</EnableInf2cat>
-    <IntDir>..\$(ProjectName)\$(ConfigurationName)\$(Platform)\</IntDir>
-    <OutDir>..\$(ConfigurationName)\$(Platform)\</OutDir>
-  </PropertyGroup>
-  <ItemDefinitionGroup>
-    <ClCompile>
-      <PreprocessorDefinitions>PROJECT=$(ProjectName);NDIS_MINIPORT_DRIVER;NDIS_WDM=1;NDIS630_MINIPORT=1;NDIS660_MINIPORT=1;POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;</AdditionalIncludeDirectories>
-      <WarningLevel>EnableAllWarnings</WarningLevel>
-      <DisableSpecificWarnings>4464;4711;4548;4820;4668;4255;6001;6054;28160;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>
-      <EnablePREfast>true</EnablePREfast>
-    </ClCompile>
-    <ResourceCompile>
-      <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-    </ResourceCompile>
-    <Link>
-      <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
-      <AdditionalDependencies>$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/aux_klib.lib;$(DDK_LIB_PATH)/procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <EnableCOMDATFolding>false</EnableCOMDATFolding>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
-    <ClCompile>
-      <PreprocessorDefinitions>__i386__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
-    <ClCompile>
-      <PreprocessorDefinitions>__x86_64__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <FilesToPackage Include="$(TargetPath)" />
-    <FilesToPackage Include="$(OutDir)$(TargetName).pdb" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="../../src/xennet/adapter.c" />
-    <ClCompile Include="../../src/xennet/driver.c" />
-    <ClCompile Include="../../src/xennet/miniport.c" />
-    <ClCompile Include="../../src/xennet/receiver.c" />
-    <ClCompile Include="../../src/xennet/string.c" />
-    <ClCompile Include="../../src/xennet/transmitter.c" />
-  </ItemGroup>
-  <ItemGroup>
-    <ResourceCompile Include="..\..\src\xennet\xennet.rc" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project>
diff --git a/vs2015/xennet/xennet.vcxproj.user b/vs2015/xennet/xennet.vcxproj.user
deleted file mode 100644
index 8b034c4..0000000
--- a/vs2015/xennet/xennet.vcxproj.user
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <SignMode>TestSign</SignMode>
-    <TestCertificate>..\..\src\xennet.pfx</TestCertificate>
-    <TimeStampServer>http://timestamp.verisign.com/scripts/timstamp.dll</TimeStampServer>
-  </PropertyGroup>
-</Project>
diff --git a/vs2017/configs.props b/vs2017/configs.props
deleted file mode 100644
index 6fe9a33..0000000
--- a/vs2017/configs.props
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-	<ItemGroup Label="ProjectConfigurations">
-		<ProjectConfiguration Include="Windows 10 Debug|Win32">
-			<Configuration>Windows 10 Debug</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 10 Release|Win32">
-			<Configuration>Windows 10 Release</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 10 Debug|x64">
-			<Configuration>Windows 10 Debug</Configuration>
-			<Platform>x64</Platform>
-			<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 10 Release|x64">
-			<Configuration>Windows 10 Release</Configuration>
-			<Platform>x64</Platform>
-			<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Debug|Win32">
-			<Configuration>Windows 8 Debug</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Release|Win32">
-			<Configuration>Windows 8 Release</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Debug|x64">
-			<Configuration>Windows 8 Debug</Configuration>
-			<Platform>x64</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Release|x64">
-			<Configuration>Windows 8 Release</Configuration>
-			<Platform>x64</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-	</ItemGroup>
-</Project>
diff --git a/vs2017/package/package.vcxproj b/vs2017/package/package.vcxproj
deleted file mode 100644
index 975bef2..0000000
--- a/vs2017/package/package.vcxproj
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\configs.props" />
-  <PropertyGroup Label="PropertySheets">
-    <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
-    <ConfigurationType>Utility</ConfigurationType>
-    <DriverType>Package</DriverType>
-    <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
-    <SupportsPackaging>true</SupportsPackaging>
-    <DriverTargetPlatform>Desktop</DriverTargetPlatform>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{445FD18F-97E3-4E5D-825F-151026242C05}</ProjectGuid>
-  </PropertyGroup>
-  <Import Project="..\targets.props" />
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <PropertyGroup>
-    <EnableInf2cat>true</EnableInf2cat>
-    <Inf2CatWindowsVersionList Condition="'$(Platform)'=='x64'">8_x64;Server8_x64;10_x64;Server10_x64</Inf2CatWindowsVersionList>
-    <Inf2CatWindowsVersionList Condition="'$(Platform)'=='Win32'">8_x86;10_x86</Inf2CatWindowsVersionList>
-    <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
-    <EnableDeployment>False</EnableDeployment>
-    <ImportToStore>False</ImportToStore>
-    <InstallMode>None</InstallMode>
-    <ScriptDeviceQuery>%PathToInf%</ScriptDeviceQuery>
-    <EnableVerifier>False</EnableVerifier>
-    <AllDrivers>False</AllDrivers>
-    <VerifyProjectOutput>True</VerifyProjectOutput>
-    <VerifyFlags>133563</VerifyFlags>
-    <IntDir>..\$(ProjectName)\$(ConfigurationName)\$(Platform)\</IntDir>
-    <OutDir>..\$(ConfigurationName)\$(Platform)\</OutDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Platform)'=='Win32'">
-    <ArchiveDir>..\..\$(SolutionName)\x86</ArchiveDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Platform)'=='x64'">
-    <ArchiveDir>..\..\$(SolutionName)\x64</ArchiveDir>
-  </PropertyGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\xennet\xennet.vcxproj">
-      <Project>{97D9942B-5EA3-488C-B512-C96E5D077F8E}</Project>
-    </ProjectReference>
-    <FilesToPackage Include="..\xennet.inf" />
-  </ItemGroup>
-  <ItemGroup Condition="Exists('$(DPINST_REDIST)')">
-    <FilesToPackage Include="$(DPINST_REDIST)\x86\dpinst.exe" Condition="'$(Platform)'=='Win32'" />
-    <FilesToPackage Include="$(DPINST_REDIST)\x64\dpinst.exe" Condition="'$(Platform)'=='x64'" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-  <ItemGroup>
-    <PackageFiles Include="$(OutDir)\$(ProjectName)\*" />
-  </ItemGroup>
-  <Target Name="Archive" AfterTargets="TestSign">
-    <Copy
-       SourceFiles="@(PackageFiles)"
-       DestinationFiles="@(PackageFiles->'$(ArchiveDir)\%(FileName)%(Extension)')"
-    />
-  </Target>
-</Project>
diff --git a/vs2017/package/package.vcxproj.user b/vs2017/package/package.vcxproj.user
deleted file mode 100644
index bcbee4f..0000000
--- a/vs2017/package/package.vcxproj.user
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <SignMode>TestSign</SignMode>
-    <TestCertificate>..\..\src\xennet.pfx</TestCertificate>
-    <TimeStampServer>http://timestamp.verisign.com/scripts/timstamp.dll</TimeStampServer>
-  </PropertyGroup>
-</Project>
diff --git a/vs2017/targets.props b/vs2017/targets.props
deleted file mode 100644
index d045434..0000000
--- a/vs2017/targets.props
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 10 Debug|Win32'">
-		<TargetVersion>Windows10</TargetVersion>
-		<UseDebugLibraries>true</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 10 Release|Win32'">
-		<TargetVersion>Windows10</TargetVersion>
-		<UseDebugLibraries>false</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 10 Debug|x64'">
-		<TargetVersion>Windows10</TargetVersion>
-		<UseDebugLibraries>true</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 10 Release|x64'">
-		<TargetVersion>Windows10</TargetVersion>
-		<UseDebugLibraries>false</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Debug|Win32'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>true</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Release|Win32'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>false</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Debug|x64'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>true</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Release|x64'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>false</UseDebugLibraries>
-	</PropertyGroup>
-</Project>
diff --git a/vs2017/version/version.vcxproj b/vs2017/version/version.vcxproj
deleted file mode 100644
index 9d149d0..0000000
--- a/vs2017/version/version.vcxproj
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\configs.props" />
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{65FA97EA-A569-4FC1-BFE7-D68E109143F7}</ProjectGuid>
-  </PropertyGroup>
-  <PropertyGroup>
-    <Script>..\..\scripts\genfiles.ps1</Script>
-    <SolutionDir>..</SolutionDir>
-    <IncludeDir>..\..\include</IncludeDir>
-    <SourceDir>..\..\src</SourceDir>
-  </PropertyGroup>
-  <Target Name="Build">
-    <Exec Command="powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive -File $(Script) $(Platform) $(SolutionDir) $(IncludeDir) $(SourceDir)" />
-  </Target>
-</Project>
diff --git a/vs2017/xennet.sln b/vs2017/xennet.sln
deleted file mode 100644
index 0d24a12..0000000
--- a/vs2017/xennet.sln
+++ /dev/null
@@ -1,94 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version\version.vcxproj", "{65FA97EA-A569-4FC1-BFE7-D68E109143F7}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xennet", "xennet\xennet.vcxproj", "{97D9942B-5EA3-488C-B512-C96E5D077F8E}"
-	ProjectSection(ProjectDependencies) = postProject
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7} = {65FA97EA-A569-4FC1-BFE7-D68E109143F7}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "package", "package\package.vcxproj", "{445FD18F-97E3-4E5D-825F-151026242C05}"
-	ProjectSection(ProjectDependencies) = postProject
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7} = {65FA97EA-A569-4FC1-BFE7-D68E109143F7}
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Windows 8 Debug|Win32 = Windows 8 Debug|Win32
-		Windows 8 Debug|x64 = Windows 8 Debug|x64
-		Windows 8 Release|Win32 = Windows 8 Release|Win32
-		Windows 8 Release|x64 = Windows 8 Release|x64
-		Windows 10 Debug|Win32 = Windows 10 Debug|Win32
-		Windows 10 Debug|x64 = Windows 10 Debug|x64
-		Windows 10 Release|Win32 = Windows 10 Release|Win32
-		Windows 10 Release|x64 = Windows 10 Release|x64
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Debug|Win32.ActiveCfg = Windows 10 Debug|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Debug|Win32.Build.0 = Windows 10 Debug|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Debug|x64.ActiveCfg = Windows 10 Debug|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Debug|x64.Build.0 = Windows 10 Debug|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|Win32.ActiveCfg = Windows 10 Release|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|Win32.Build.0 = Windows 10 Release|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|x64.ActiveCfg = Windows 10 Release|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|x64.Build.0 = Windows 10 Release|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|Win32.Deploy.0 = Windows 8 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|x64.Deploy.0 = Windows 8 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|Win32.Deploy.0 = Windows 8 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|x64.Deploy.0 = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.ActiveCfg = Windows 10 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.Build.0 = Windows 10 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.Deploy.0 = Windows 10 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|x64.ActiveCfg = Windows 10 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|x64.Build.0 = Windows 10 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|x64.Deploy.0 = Windows 10 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|Win32.ActiveCfg = Windows 10 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|Win32.Build.0 = Windows 10 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|Win32.Deploy.0 = Windows 10 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.ActiveCfg = Windows 10 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.Build.0 = Windows 10 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.Deploy.0 = Windows 10 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|Win32.Deploy.0 = Windows 8 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|x64.Deploy.0 = Windows 8 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|Win32.Deploy.0 = Windows 8 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|x64.Deploy.0 = Windows 8 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.ActiveCfg = Windows 10 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.Build.0 = Windows 10 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.Deploy.0 = Windows 10 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|x64.ActiveCfg = Windows 10 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|x64.Build.0 = Windows 10 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|x64.Deploy.0 = Windows 10 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|Win32.ActiveCfg = Windows 10 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|Win32.Build.0 = Windows 10 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|Win32.Deploy.0 = Windows 10 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|x64.ActiveCfg = Windows 10 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|x64.Build.0 = Windows 10 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|x64.Deploy.0 = Windows 10 Release|x64
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
diff --git a/vs2017/xennet/xennet.vcxproj b/vs2017/xennet/xennet.vcxproj
deleted file mode 100644
index 8df9840..0000000
--- a/vs2017/xennet/xennet.vcxproj
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\configs.props" />
-  <PropertyGroup Label="PropertySheets">
-    <ConfigurationType>Driver</ConfigurationType>
-    <DriverType>WDM</DriverType>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Label="Configuration">
-    <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{97D9942B-5EA3-488C-B512-C96E5D077F8E}</ProjectGuid>
-  </PropertyGroup>
-  <Import Project="..\targets.props" />
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <PropertyGroup>
-    <RunCodeAnalysis>true</RunCodeAnalysis>
-    <EnableInf2cat>false</EnableInf2cat>
-    <IntDir>..\$(ProjectName)\$(ConfigurationName)\$(Platform)\</IntDir>
-    <OutDir>..\$(ConfigurationName)\$(Platform)\</OutDir>
-  </PropertyGroup>
-  <ItemDefinitionGroup>
-    <ClCompile>
-      <PreprocessorDefinitions>PROJECT=$(ProjectName);NDIS_MINIPORT_DRIVER;NDIS_WDM=1;NDIS630_MINIPORT=1;NDIS660_MINIPORT=1;POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;</AdditionalIncludeDirectories>
-      <WarningLevel>EnableAllWarnings</WarningLevel>
-      <DisableSpecificWarnings>4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;28160;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>
-      <EnablePREfast>true</EnablePREfast>
-    </ClCompile>
-    <ResourceCompile>
-      <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-    </ResourceCompile>
-    <Link>
-      <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
-      <AdditionalDependencies>$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/aux_klib.lib;$(DDK_LIB_PATH)/procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
-    <ClCompile>
-      <PreprocessorDefinitions>__i386__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
-    <ClCompile>
-      <PreprocessorDefinitions>__x86_64__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)'=='Windows 8 Release'">
-    <ClCompile>
-      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
-      <WholeProgramOptimization>true</WholeProgramOptimization>
-      <AdditionalOptions>/Qspectre %(AdditionalOptions)</AdditionalOptions>
-    </ClCompile>
-  </ItemDefinitionGroup>
-<ItemGroup>
-    <FilesToPackage Include="$(TargetPath)" />
-    <FilesToPackage Include="$(OutDir)$(TargetName).pdb" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="../../src/xennet/adapter.c" />
-    <ClCompile Include="../../src/xennet/driver.c" />
-    <ClCompile Include="../../src/xennet/miniport.c" />
-    <ClCompile Include="../../src/xennet/receiver.c" />
-    <ClCompile Include="../../src/xennet/string.c" />
-    <ClCompile Include="../../src/xennet/transmitter.c" />
-  </ItemGroup>
-  <ItemGroup>
-    <ResourceCompile Include="..\..\src\xennet\xennet.rc" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project>
diff --git a/vs2017/xennet/xennet.vcxproj.user b/vs2017/xennet/xennet.vcxproj.user
deleted file mode 100644
index bcbee4f..0000000
--- a/vs2017/xennet/xennet.vcxproj.user
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <SignMode>TestSign</SignMode>
-    <TestCertificate>..\..\src\xennet.pfx</TestCertificate>
-    <TimeStampServer>http://timestamp.verisign.com/scripts/timstamp.dll</TimeStampServer>
-  </PropertyGroup>
-</Project>
-- 
2.41.0.windows.3



From win-pv-devel-bounces@lists.xenproject.org Tue Dec 12 08:32:11 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 12 Dec 2023 08:32:11 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652705.1018731 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCyBX-0003eJ-No; Tue, 12 Dec 2023 08:32:11 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652705.1018731; Tue, 12 Dec 2023 08:32:11 +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 1rCyBX-0003eB-Kr; Tue, 12 Dec 2023 08:32:11 +0000
Received: by outflank-mailman (input) for mailman id 652705;
 Tue, 12 Dec 2023 08:32:10 +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=6BRB=HX=cloud.com=owen.smith@srs-se1.protection.inumbo.net>)
 id 1rCyBW-0003c0-4z
 for win-pv-devel@lists.xenproject.org; Tue, 12 Dec 2023 08:32:10 +0000
Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com
 [2a00:1450:4864:20::32e])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id efd814c6-98c8-11ee-98e8-6d05b1d4d9a1;
 Tue, 12 Dec 2023 09:32:08 +0100 (CET)
Received: by mail-wm1-x32e.google.com with SMTP id
 5b1f17b1804b1-40c3984f0cdso38119175e9.1
 for <win-pv-devel@lists.xenproject.org>; Tue, 12 Dec 2023 00:32:08 -0800 (PST)
Received: from localhost.localdomain ([185.25.65.68])
 by smtp.gmail.com with ESMTPSA id
 fm14-20020a05600c0c0e00b00407b93d8085sm17996468wmb.27.2023.12.12.00.32.05
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 12 Dec 2023 00:32:06 -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: efd814c6-98c8-11ee-98e8-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=cloud.com; s=cloud; t=1702369926; x=1702974726; darn=lists.xenproject.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=MjvV9AlWVYnrKXThj6/5b1RpBgyubMjGrRcviXsxGNk=;
        b=AOT2UshUUHN2+fJ68NpBLd7x4rV338TSx29ii7lFG57PuPolR5Awv1KahUem3WCNeh
         8fnLTAsAd33i+Rw+TI1VrVJ9sMEpsjM2ucMOD2dtOZQtL7rE60HwvJOkCRRmLHGo2vA9
         C1Ku3QF8ZGkhwPk012CdxAubNQ307wbHXhAG0=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702369926; x=1702974726;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=MjvV9AlWVYnrKXThj6/5b1RpBgyubMjGrRcviXsxGNk=;
        b=I0KarafV8pcyEQirXrEgahq2XhRrcrGaTaRntaaFJ00Xs1H8a39/mHLVq4CJMvYffY
         CvmBjXMy5oKmMVAyAE2m6s7fIcFqwGqatrnuLgc52LRGfhkIjF7DiDR9op4c1jdOxpcN
         gIIL/N/ppcJgkN5aqp/LbXrcHRntTrfJgiM+xu35z+xKfvxnH+kh4bW/EQW1acdsw1/n
         ElJqsCZw0xogh1HP2J40OG8Injp7cY638uBKXr2OGTyH/cgNOAer0/q4iCAEpLxtvX2K
         8uPSACSbYmxB23v/27mxciwNsuxAGQoW2+fZi72pwbY9xvwgM81v/t5RRZg8plABhoiY
         xQ2Q==
X-Gm-Message-State: AOJu0Yy4CilhTearCEmU2flVY1Gbc9EF8yU1FDB54u2zcG065c6/v6AX
	bWu6fLzrTH5tFKpBhMgu9rPE50DdmGBg52EBVg==
X-Google-Smtp-Source: AGHT+IEfLnCNVrXj3QGJwYfo8uYRrMUHglCFMq8C8YQyXR/ai2wot//QGgbK7z4mq0ETHtTb5s9ICQ==
X-Received: by 2002:a05:600c:4193:b0:40c:3276:253e with SMTP id p19-20020a05600c419300b0040c3276253emr3444712wmh.86.1702369926419;
        Tue, 12 Dec 2023 00:32:06 -0800 (PST)
From: Owen Smith <owen.smith@cloud.com>
To: win-pv-devel@lists.xenproject.org
Cc: Owen Smith <owen.smith@cloud.com>
Subject: [PATCH 2/3] Remove "Windows 8" as a build target
Date: Tue, 12 Dec 2023 08:31:42 +0000
Message-ID: <20231212083143.1359-2-owen.smith@cloud.com>
X-Mailer: git-send-email 2.41.0.windows.3
In-Reply-To: <20231212083143.1359-1-owen.smith@cloud.com>
References: <20231212083143.1359-1-owen.smith@cloud.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Windows 8 is no longer a supported build target with Microsoft, remove
this as a build target

Signed-off-by: Owen Smith <owen.smith@cloud.com>
---
 vs2019/configs.props           | 20 -------------------
 vs2019/package/package.vcxproj |  4 ++--
 vs2019/targets.props           | 16 ---------------
 vs2019/xennet.sln              | 36 ----------------------------------
 vs2019/xennet/xennet.vcxproj   |  2 +-
 vs2022/configs.props           | 20 -------------------
 vs2022/package/package.vcxproj |  4 ++--
 vs2022/targets.props           | 16 ---------------
 vs2022/xennet.sln              | 36 ----------------------------------
 vs2022/xennet/xennet.vcxproj   |  2 +-
 10 files changed, 6 insertions(+), 150 deletions(-)

diff --git a/vs2019/configs.props b/vs2019/configs.props
index cdbb3c8..df5f23a 100644
--- a/vs2019/configs.props
+++ b/vs2019/configs.props
@@ -21,25 +21,5 @@
 			<Platform>x64</Platform>
 			<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
 		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Debug|Win32">
-			<Configuration>Windows 8 Debug</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Release|Win32">
-			<Configuration>Windows 8 Release</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Debug|x64">
-			<Configuration>Windows 8 Debug</Configuration>
-			<Platform>x64</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Release|x64">
-			<Configuration>Windows 8 Release</Configuration>
-			<Platform>x64</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
 	</ItemGroup>
 </Project>
diff --git a/vs2019/package/package.vcxproj b/vs2019/package/package.vcxproj
index 232227e..22056ae 100644
--- a/vs2019/package/package.vcxproj
+++ b/vs2019/package/package.vcxproj
@@ -17,8 +17,8 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <PropertyGroup>
     <EnableInf2cat>true</EnableInf2cat>
-    <Inf2CatWindowsVersionList Condition="'$(Platform)'=='x64'">8_x64;Server8_x64;10_x64;Server10_x64;ServerRS5_X64;ServerFE_X64;10_CO_X64</Inf2CatWindowsVersionList>
-    <Inf2CatWindowsVersionList Condition="'$(Platform)'=='Win32'">8_x86;10_x86</Inf2CatWindowsVersionList>
+    <Inf2CatWindowsVersionList Condition="'$(Platform)'=='x64'">10_x64;Server10_x64;ServerRS5_X64;ServerFE_X64;10_CO_X64</Inf2CatWindowsVersionList>
+    <Inf2CatWindowsVersionList Condition="'$(Platform)'=='Win32'">10_x86</Inf2CatWindowsVersionList>
     <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
     <EnableDeployment>False</EnableDeployment>
     <ImportToStore>False</ImportToStore>
diff --git a/vs2019/targets.props b/vs2019/targets.props
index 64598fc..53a8662 100644
--- a/vs2019/targets.props
+++ b/vs2019/targets.props
@@ -16,20 +16,4 @@
 		<TargetVersion>Windows10</TargetVersion>
 		<UseDebugLibraries>false</UseDebugLibraries>
 	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Debug|Win32'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>true</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Release|Win32'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>false</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Debug|x64'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>true</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Release|x64'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>false</UseDebugLibraries>
-	</PropertyGroup>
 </Project>
diff --git a/vs2019/xennet.sln b/vs2019/xennet.sln
index 50ef6c3..a73524b 100644
--- a/vs2019/xennet.sln
+++ b/vs2019/xennet.sln
@@ -16,10 +16,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "package", "package\package.
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Windows 8 Debug|Win32 = Windows 8 Debug|Win32
-		Windows 8 Debug|x64 = Windows 8 Debug|x64
-		Windows 8 Release|Win32 = Windows 8 Release|Win32
-		Windows 8 Release|x64 = Windows 8 Release|x64
 		Windows 10 Debug|Win32 = Windows 10 Debug|Win32
 		Windows 10 Debug|x64 = Windows 10 Debug|x64
 		Windows 10 Release|Win32 = Windows 10 Release|Win32
@@ -34,26 +30,6 @@ Global
 		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|Win32.Build.0 = Windows 10 Release|Win32
 		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|x64.ActiveCfg = Windows 10 Release|x64
 		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|x64.Build.0 = Windows 10 Release|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|Win32.Deploy.0 = Windows 8 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|x64.Deploy.0 = Windows 8 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|Win32.Deploy.0 = Windows 8 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|x64.Deploy.0 = Windows 8 Release|x64
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.ActiveCfg = Windows 10 Debug|Win32
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.Build.0 = Windows 10 Debug|Win32
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.Deploy.0 = Windows 10 Debug|Win32
@@ -66,18 +42,6 @@ Global
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.ActiveCfg = Windows 10 Release|x64
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.Build.0 = Windows 10 Release|x64
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.Deploy.0 = Windows 10 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|Win32.Deploy.0 = Windows 8 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|x64.Deploy.0 = Windows 8 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|Win32.Deploy.0 = Windows 8 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|x64.Deploy.0 = Windows 8 Release|x64
 		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.ActiveCfg = Windows 10 Debug|Win32
 		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.Build.0 = Windows 10 Debug|Win32
 		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.Deploy.0 = Windows 10 Debug|Win32
diff --git a/vs2019/xennet/xennet.vcxproj b/vs2019/xennet/xennet.vcxproj
index 469ad09..5549d9b 100644
--- a/vs2019/xennet/xennet.vcxproj
+++ b/vs2019/xennet/xennet.vcxproj
@@ -58,7 +58,7 @@
       <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
     </Link>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)'=='Windows 8 Release'">
+  <ItemDefinitionGroup Condition="'$(Configuration)'=='Windows 10 Release'">
     <ClCompile>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>true</WholeProgramOptimization>
diff --git a/vs2022/configs.props b/vs2022/configs.props
index cdbb3c8..df5f23a 100644
--- a/vs2022/configs.props
+++ b/vs2022/configs.props
@@ -21,25 +21,5 @@
 			<Platform>x64</Platform>
 			<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
 		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Debug|Win32">
-			<Configuration>Windows 8 Debug</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Release|Win32">
-			<Configuration>Windows 8 Release</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Debug|x64">
-			<Configuration>Windows 8 Debug</Configuration>
-			<Platform>x64</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 8 Release|x64">
-			<Configuration>Windows 8 Release</Configuration>
-			<Platform>x64</Platform>
-			<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
 	</ItemGroup>
 </Project>
diff --git a/vs2022/package/package.vcxproj b/vs2022/package/package.vcxproj
index 5df9967..7419174 100644
--- a/vs2022/package/package.vcxproj
+++ b/vs2022/package/package.vcxproj
@@ -17,8 +17,8 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <PropertyGroup>
     <EnableInf2cat>true</EnableInf2cat>
-    <Inf2CatWindowsVersionList Condition="'$(Platform)'=='x64'">8_x64;Server8_x64;10_x64;Server10_x64;ServerRS5_X64;ServerFE_X64;10_CO_X64</Inf2CatWindowsVersionList>
-    <Inf2CatWindowsVersionList Condition="'$(Platform)'=='Win32'">8_x86;10_x86</Inf2CatWindowsVersionList>
+    <Inf2CatWindowsVersionList Condition="'$(Platform)'=='x64'">10_x64;Server10_x64;ServerRS5_X64;ServerFE_X64;10_CO_X64</Inf2CatWindowsVersionList>
+    <Inf2CatWindowsVersionList Condition="'$(Platform)'=='Win32'">10_x86</Inf2CatWindowsVersionList>
     <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
     <EnableDeployment>False</EnableDeployment>
     <ImportToStore>False</ImportToStore>
diff --git a/vs2022/targets.props b/vs2022/targets.props
index 64598fc..53a8662 100644
--- a/vs2022/targets.props
+++ b/vs2022/targets.props
@@ -16,20 +16,4 @@
 		<TargetVersion>Windows10</TargetVersion>
 		<UseDebugLibraries>false</UseDebugLibraries>
 	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Debug|Win32'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>true</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Release|Win32'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>false</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Debug|x64'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>true</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 8 Release|x64'">
-		<TargetVersion>Windows8</TargetVersion>
-		<UseDebugLibraries>false</UseDebugLibraries>
-	</PropertyGroup>
 </Project>
diff --git a/vs2022/xennet.sln b/vs2022/xennet.sln
index 50ef6c3..a73524b 100644
--- a/vs2022/xennet.sln
+++ b/vs2022/xennet.sln
@@ -16,10 +16,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "package", "package\package.
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Windows 8 Debug|Win32 = Windows 8 Debug|Win32
-		Windows 8 Debug|x64 = Windows 8 Debug|x64
-		Windows 8 Release|Win32 = Windows 8 Release|Win32
-		Windows 8 Release|x64 = Windows 8 Release|x64
 		Windows 10 Debug|Win32 = Windows 10 Debug|Win32
 		Windows 10 Debug|x64 = Windows 10 Debug|x64
 		Windows 10 Release|Win32 = Windows 10 Release|Win32
@@ -34,26 +30,6 @@ Global
 		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|Win32.Build.0 = Windows 10 Release|Win32
 		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|x64.ActiveCfg = Windows 10 Release|x64
 		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|x64.Build.0 = Windows 10 Release|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|Win32.Deploy.0 = Windows 8 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Debug|x64.Deploy.0 = Windows 8 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|Win32.Deploy.0 = Windows 8 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 8 Release|x64.Deploy.0 = Windows 8 Release|x64
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.ActiveCfg = Windows 10 Debug|Win32
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.Build.0 = Windows 10 Debug|Win32
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.Deploy.0 = Windows 10 Debug|Win32
@@ -66,18 +42,6 @@ Global
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.ActiveCfg = Windows 10 Release|x64
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.Build.0 = Windows 10 Release|x64
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.Deploy.0 = Windows 10 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|Win32.Deploy.0 = Windows 8 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Debug|x64.Deploy.0 = Windows 8 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|Win32.Deploy.0 = Windows 8 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 8 Release|x64.Deploy.0 = Windows 8 Release|x64
 		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.ActiveCfg = Windows 10 Debug|Win32
 		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.Build.0 = Windows 10 Debug|Win32
 		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.Deploy.0 = Windows 10 Debug|Win32
diff --git a/vs2022/xennet/xennet.vcxproj b/vs2022/xennet/xennet.vcxproj
index 469ad09..5549d9b 100644
--- a/vs2022/xennet/xennet.vcxproj
+++ b/vs2022/xennet/xennet.vcxproj
@@ -58,7 +58,7 @@
       <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
     </Link>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)'=='Windows 8 Release'">
+  <ItemDefinitionGroup Condition="'$(Configuration)'=='Windows 10 Release'">
     <ClCompile>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>true</WholeProgramOptimization>
-- 
2.41.0.windows.3



From win-pv-devel-bounces@lists.xenproject.org Tue Dec 12 08:32:14 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 12 Dec 2023 08:32:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652707.1018734 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCyBa-0003h7-PT; Tue, 12 Dec 2023 08:32:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652707.1018734; Tue, 12 Dec 2023 08:32:14 +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 1rCyBa-0003h0-MY; Tue, 12 Dec 2023 08:32:14 +0000
Received: by outflank-mailman (input) for mailman id 652707;
 Tue, 12 Dec 2023 08:32:13 +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=6BRB=HX=cloud.com=owen.smith@srs-se1.protection.inumbo.net>)
 id 1rCyBZ-0003gK-52
 for win-pv-devel@lists.xenproject.org; Tue, 12 Dec 2023 08:32:13 +0000
Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com
 [2a00:1450:4864:20::32f])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id f0c50a66-98c8-11ee-9b0f-b553b5be7939;
 Tue, 12 Dec 2023 09:32:09 +0100 (CET)
Received: by mail-wm1-x32f.google.com with SMTP id
 5b1f17b1804b1-40c3f68b69aso27589885e9.1
 for <win-pv-devel@lists.xenproject.org>; Tue, 12 Dec 2023 00:32:09 -0800 (PST)
Received: from localhost.localdomain ([185.25.65.68])
 by smtp.gmail.com with ESMTPSA id
 fm14-20020a05600c0c0e00b00407b93d8085sm17996468wmb.27.2023.12.12.00.32.06
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 12 Dec 2023 00:32:06 -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: f0c50a66-98c8-11ee-9b0f-b553b5be7939
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=cloud.com; s=cloud; t=1702369928; x=1702974728; darn=lists.xenproject.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=AYPSoG9qOHAt18rxsCw/9hcCt4SmgycJraY2y19dHjY=;
        b=SV5lgoB9UK+Q/fUYFjzf3AKFDYZdVn5SvM+2NTE3x2Tu28uNiwQBKIw3MwKRNkG6zb
         SmPIefZVieIaK14LWXkh0gxLUbFWZKFa0GXkvdx5xo04x8LQCYiV6OhJoMLGLTHN4NDQ
         8sSll4Ad6A6sXqygxgbeZU5D0suL3zD7cfyng=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702369928; x=1702974728;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=AYPSoG9qOHAt18rxsCw/9hcCt4SmgycJraY2y19dHjY=;
        b=nolnnsIx38PvmXPheB+8jFtsDzCWGzq13hvO+++UXZGd3fYcGldJkoMaL4THAPXDbS
         hHjFk/kQQcQxScbFTulv8nGzOYsY0sJrheWtfKw6FpGr1PrqjiqKlw2CAdIBBCC5YLnw
         4JF5lwc6KxVYU6rt2kXFB9OuzsOncJT0Rq3XX80U2mFajVHIff9UIZNJP3vjJmHZ+eLe
         +vIjVYdzH+HKSHiFId0oyDOEPVLpT3FdJFK/bwOowkTuLBodP33cjXz1lsItIVce/0Lq
         9Qos9OZnLRpjCXaFRC6XRocdRL9p5UOH4VpKOdZCbNirjfYZrYAD8FJ798B1b0u9QZgV
         bpAQ==
X-Gm-Message-State: AOJu0Yya8Y33U4P9v3kzKYUjHQaD/uHrzogWeybL5b4SyIEgNThn/dGP
	HeBjYGkBUL1bfIQCUxv0M+9SIumK3q2QCiBxlA==
X-Google-Smtp-Source: AGHT+IH9CLqJmg5uPvb1j/bBvyrOqmYNeSiGMvgSJKFXooSmmObkG2vbsBN/sg3s/RlInhQfH/tWKw==
X-Received: by 2002:a05:600c:1913:b0:40c:9d9:b87a with SMTP id j19-20020a05600c191300b0040c09d9b87amr3105500wmq.93.1702369928410;
        Tue, 12 Dec 2023 00:32:08 -0800 (PST)
From: Owen Smith <owen.smith@cloud.com>
To: win-pv-devel@lists.xenproject.org
Cc: Owen Smith <owen.smith@cloud.com>
Subject: [PATCH 3/3] Remove "Win32" as a build target from VS2022 projects
Date: Tue, 12 Dec 2023 08:31:43 +0000
Message-ID: <20231212083143.1359-3-owen.smith@cloud.com>
X-Mailer: git-send-email 2.41.0.windows.3
In-Reply-To: <20231212083143.1359-1-owen.smith@cloud.com>
References: <20231212083143.1359-1-owen.smith@cloud.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

VS2022 is used with EWDK 22621 and later. Win32 is no longer a valid build
target for this set of tools.

Signed-off-by: Owen Smith <owen.smith@cloud.com>
---
 vs2022/configs.props           | 10 ----------
 vs2022/package/package.vcxproj |  5 -----
 vs2022/targets.props           |  8 --------
 vs2022/xennet.sln              | 18 ------------------
 vs2022/xennet/xennet.vcxproj   |  9 ---------
 5 files changed, 50 deletions(-)

diff --git a/vs2022/configs.props b/vs2022/configs.props
index df5f23a..63d8dd4 100644
--- a/vs2022/configs.props
+++ b/vs2022/configs.props
@@ -1,16 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 	<ItemGroup Label="ProjectConfigurations">
-		<ProjectConfiguration Include="Windows 10 Debug|Win32">
-			<Configuration>Windows 10 Debug</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
-		<ProjectConfiguration Include="Windows 10 Release|Win32">
-			<Configuration>Windows 10 Release</Configuration>
-			<Platform>Win32</Platform>
-			<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
-		</ProjectConfiguration>
 		<ProjectConfiguration Include="Windows 10 Debug|x64">
 			<Configuration>Windows 10 Debug</Configuration>
 			<Platform>x64</Platform>
diff --git a/vs2022/package/package.vcxproj b/vs2022/package/package.vcxproj
index 7419174..6f20d8a 100644
--- a/vs2022/package/package.vcxproj
+++ b/vs2022/package/package.vcxproj
@@ -18,7 +18,6 @@
   <PropertyGroup>
     <EnableInf2cat>true</EnableInf2cat>
     <Inf2CatWindowsVersionList Condition="'$(Platform)'=='x64'">10_x64;Server10_x64;ServerRS5_X64;ServerFE_X64;10_CO_X64</Inf2CatWindowsVersionList>
-    <Inf2CatWindowsVersionList Condition="'$(Platform)'=='Win32'">10_x86</Inf2CatWindowsVersionList>
     <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
     <EnableDeployment>False</EnableDeployment>
     <ImportToStore>False</ImportToStore>
@@ -36,9 +35,6 @@
       <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
     </DriverSign>
   </ItemDefinitionGroup>
-  <PropertyGroup Condition="'$(Platform)'=='Win32'">
-    <ArchiveDir>..\..\$(SolutionName)\x86</ArchiveDir>
-  </PropertyGroup>
   <PropertyGroup Condition="'$(Platform)'=='x64'">
     <ArchiveDir>..\..\$(SolutionName)\x64</ArchiveDir>
   </PropertyGroup>
@@ -49,7 +45,6 @@
     <FilesToPackage Include="..\xennet.inf" />
   </ItemGroup>
   <ItemGroup Condition="Exists('$(DPINST_REDIST)')">
-    <FilesToPackage Include="$(DPINST_REDIST)\x86\dpinst.exe" Condition="'$(Platform)'=='Win32'" />
     <FilesToPackage Include="$(DPINST_REDIST)\x64\dpinst.exe" Condition="'$(Platform)'=='x64'" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/vs2022/targets.props b/vs2022/targets.props
index 53a8662..3c31b6c 100644
--- a/vs2022/targets.props
+++ b/vs2022/targets.props
@@ -1,13 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 10 Debug|Win32'">
-		<TargetVersion>Windows10</TargetVersion>
-		<UseDebugLibraries>true</UseDebugLibraries>
-	</PropertyGroup>
-	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 10 Release|Win32'">
-		<TargetVersion>Windows10</TargetVersion>
-		<UseDebugLibraries>false</UseDebugLibraries>
-	</PropertyGroup>
 	<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Windows 10 Debug|x64'">
 		<TargetVersion>Windows10</TargetVersion>
 		<UseDebugLibraries>true</UseDebugLibraries>
diff --git a/vs2022/xennet.sln b/vs2022/xennet.sln
index a73524b..7107b71 100644
--- a/vs2022/xennet.sln
+++ b/vs2022/xennet.sln
@@ -16,41 +16,23 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "package", "package\package.
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Windows 10 Debug|Win32 = Windows 10 Debug|Win32
 		Windows 10 Debug|x64 = Windows 10 Debug|x64
-		Windows 10 Release|Win32 = Windows 10 Release|Win32
 		Windows 10 Release|x64 = Windows 10 Release|x64
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Debug|Win32.ActiveCfg = Windows 10 Debug|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Debug|Win32.Build.0 = Windows 10 Debug|Win32
 		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Debug|x64.ActiveCfg = Windows 10 Debug|x64
 		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Debug|x64.Build.0 = Windows 10 Debug|x64
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|Win32.ActiveCfg = Windows 10 Release|Win32
-		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|Win32.Build.0 = Windows 10 Release|Win32
 		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|x64.ActiveCfg = Windows 10 Release|x64
 		{65FA97EA-A569-4FC1-BFE7-D68E109143F7}.Windows 10 Release|x64.Build.0 = Windows 10 Release|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.ActiveCfg = Windows 10 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.Build.0 = Windows 10 Debug|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|Win32.Deploy.0 = Windows 10 Debug|Win32
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|x64.ActiveCfg = Windows 10 Debug|x64
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|x64.Build.0 = Windows 10 Debug|x64
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Debug|x64.Deploy.0 = Windows 10 Debug|x64
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|Win32.ActiveCfg = Windows 10 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|Win32.Build.0 = Windows 10 Release|Win32
-		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|Win32.Deploy.0 = Windows 10 Release|Win32
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.ActiveCfg = Windows 10 Release|x64
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.Build.0 = Windows 10 Release|x64
 		{97D9942B-5EA3-488C-B512-C96E5D077F8E}.Windows 10 Release|x64.Deploy.0 = Windows 10 Release|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.ActiveCfg = Windows 10 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.Build.0 = Windows 10 Debug|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|Win32.Deploy.0 = Windows 10 Debug|Win32
 		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|x64.ActiveCfg = Windows 10 Debug|x64
 		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|x64.Build.0 = Windows 10 Debug|x64
 		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Debug|x64.Deploy.0 = Windows 10 Debug|x64
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|Win32.ActiveCfg = Windows 10 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|Win32.Build.0 = Windows 10 Release|Win32
-		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|Win32.Deploy.0 = Windows 10 Release|Win32
 		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|x64.ActiveCfg = Windows 10 Release|x64
 		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|x64.Build.0 = Windows 10 Release|x64
 		{445FD18F-97E3-4E5D-825F-151026242C05}.Windows 10 Release|x64.Deploy.0 = Windows 10 Release|x64
diff --git a/vs2022/xennet/xennet.vcxproj b/vs2022/xennet/xennet.vcxproj
index 5549d9b..159b9a5 100644
--- a/vs2022/xennet/xennet.vcxproj
+++ b/vs2022/xennet/xennet.vcxproj
@@ -41,15 +41,6 @@
       <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
     </DriverSign>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
-    <ClCompile>
-      <PreprocessorDefinitions>__i386__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <Link>
-      <ImageHasSafeExceptionHandlers>true</ImageHasSafeExceptionHandlers>
-    </Link>
-
-  </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
     <ClCompile>
       <PreprocessorDefinitions>__x86_64__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-- 
2.41.0.windows.3



From win-pv-devel-bounces@lists.xenproject.org Tue Dec 12 09:39:43 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 12 Dec 2023 09:39:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652791.1018843 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCzEt-0003I7-0s; Tue, 12 Dec 2023 09:39:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652791.1018843; Tue, 12 Dec 2023 09:39:42 +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 1rCzEs-0003I0-UN; Tue, 12 Dec 2023 09:39:42 +0000
Received: by outflank-mailman (input) for mailman id 652791;
 Tue, 12 Dec 2023 09:39:41 +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=HVvx=HX=invisiblethingslab.com=omeg@srs-se1.protection.inumbo.net>)
 id 1rCzEr-00036s-NQ
 for win-pv-devel@lists.xenproject.org; Tue, 12 Dec 2023 09:39:41 +0000
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com
 [64.147.123.24]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id 5f09429e-98d2-11ee-98e8-6d05b1d4d9a1;
 Tue, 12 Dec 2023 10:39:41 +0100 (CET)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.west.internal (Postfix) with ESMTP id 64C8E3200AB0;
 Tue, 12 Dec 2023 04:39:39 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Tue, 12 Dec 2023 04:39:39 -0500
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 12 Dec 2023 04:39:37 -0500 (EST)
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: 5f09429e-98d2-11ee-98e8-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	invisiblethingslab.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:from:from:in-reply-to
	:in-reply-to:message-id:mime-version:references:reply-to:subject
	:subject:to:to; s=fm1; t=1702373978; x=1702460378; bh=HlZv3m66lD
	i+PiY2t9n2DOo3eAueNeEAIWPpaKau3v0=; b=W42PaaQNfwHSr+Z+lzrSdNyMug
	6GInXAQn3oWF5cvpbEIVvKcCnfEx+MXMR8w63X84O6dmSsPvBHpIqClr+elG0gDM
	qoLX+qTzzI0F4nmvw4stYiWVg45pPYAPqmRhekz5OZxXo3sxUj3Bbp2+sjncbe4z
	uYS69WGgDVwXZf3VKhCNuC7T2NLP5iNNlrM1ajH1WQlcIuxp37dTW4E21wnKWVAq
	ZsLD4J/LL4LXavjQRGIOlYL0kEmEEeEsyPhYsEYwKN45X1y5YwlkSBP6jCHMpe/C
	UqI6kJiUmv+vdKUJusKTZIf+NNBRoJ+TYCqDNz1E8kn7qUHsQFGJI+cuHjCA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:feedback-id:feedback-id
	:from:from:in-reply-to:in-reply-to:message-id:mime-version
	:references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
	:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1702373978; x=
	1702460378; bh=HlZv3m66lDi+PiY2t9n2DOo3eAueNeEAIWPpaKau3v0=; b=Z
	ukF4FBuNACOgkQuQZafGLfFsTD5oQpBj/hW7dKtaB5yjT4p+bbMGw3AIOMOLBmku
	JQ5Y8Q7J96YoYCAPSG4mgIbCYHnGgQiH+ekPkWuzl2W6dtkpkKstOXZD+6luOhLJ
	4ZSEpcAGcSaFXM51mGi9e+dftDPmYuJ7ZqrscgXYyt/nudTW3SxHSLLwjV07Ibvi
	bGrKccBFz7ZcaajBxoaHdoP+McA6JC07HNS87dvyGVdsECQb5Lq7xYDLbnS4RfV3
	badEHb5bFPkW4dyEgFFHEfGoeyTcQWVDqnhBtPOg2PU0pgj69cVPh/ZrZOHFaNVM
	paDO12hG4QF2FWL+t4Jfg==
X-ME-Sender: <xms:Wip4ZQeeQVYD6-zZiIDlux1no3YcB7-Y_PcJ_hS4nKvY3puxsML3Vg>
    <xme:Wip4ZSOvVLaDsLoFDC1uHIxv4gepsO531PMW1fJBvpeuXkxaVH32H55uCCuGoug2b
    9xw6LuWvJECloI>
X-ME-Received: <xmr:Wip4ZRhcDH0zChYpz0UBMAyguWWO--arkEygWc2JIUGQUDuQFQ9E062Zx1giThXIriVKkOaxutOMnToJzdASjlaiy8DA9T4OCC1-AlfcDaQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelgedgtdehucetufdoteggodetrfdotf
    fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
    uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesth
    ekredtredtjeenucfhrhhomheptfgrfhgrlhcuhghojhguhihlrgcuoehomhgvghesihhn
    vhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehhf
    evvdetvdekkeeglefhhfeijeetuedvkeejjeeutdevgeejleevvdfgteehtdenucevlhhu
    shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehomhgvghesihhnvh
    hishhisghlvghthhhinhhgshhlrggsrdgtohhm
X-ME-Proxy: <xmx:Wip4ZV8yBFSyhCd1Ekm6aVCnKLh3XSQjllud-yrIKDmprx0vj3coSg>
    <xmx:Wip4ZcuQ4pierVjwXhkIHxaw8s0t-Q0bwpQ1uLC6qvAWMFK_vCsgAA>
    <xmx:Wip4ZcGkmKwW033-mwuHFZfHFA57DWGbRKz5aJvZ78SjB_8DmOBWLA>
    <xmx:Wip4ZV6DhJaFGjGzv8jdXO8VR9fKvlQw9WhQHqp3i7EAA9iXs6hTFw>
Feedback-ID: i409c4082:Fastmail
From: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
To: win-pv-devel@lists.xenproject.org
Cc: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
Subject: [RFC PATCH 1/6] Fix minor xencontrol issues
Date: Tue, 12 Dec 2023 10:38:43 +0100
Message-Id: <228b54a2a8bb4caf84b58cff76b10f3575dcb750.1702373837.git.omeg@invisiblethingslab.com>
X-Mailer: git-send-email 2.40.1.windows.1
In-Reply-To: <cover.1702373837.git.omeg@invisiblethingslab.com>
References: <cover.1702373837.git.omeg@invisiblethingslab.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- Fix mismatched XcStoreRead() function signatures
- Fix memory leak in XcOpen()
- Fix IOCTL names in error messages

Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
---
 include/xencontrol.h        |  2 +-
 src/xencontrol/xencontrol.c | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/xencontrol.h b/include/xencontrol.h
index 4560bc6..29cd208 100644
--- a/include/xencontrol.h
+++ b/include/xencontrol.h
@@ -244,7 +244,7 @@ XENCONTROL_API
 DWORD
 XcStoreRead(
     IN  PXENCONTROL_CONTEXT Xc,
-    IN  PCHAR Path,
+    IN  PSTR Path,
     IN  DWORD cbValue,
     OUT CHAR *Value
     );
diff --git a/src/xencontrol/xencontrol.c b/src/xencontrol/xencontrol.c
index 777fd29..5cd9461 100644
--- a/src/xencontrol/xencontrol.c
+++ b/src/xencontrol/xencontrol.c
@@ -168,6 +168,8 @@ fail:
          L"Error: 0x%x", GetLastError());
 
     free(DetailData);
+    free(Context);
+    *Xc = NULL;
     return GetLastError();
 }
 
@@ -208,7 +210,7 @@ XcEvtchnOpenUnbound(
                               NULL);
 
     if (!Success) {
-        Log(XLL_ERROR, L"IOCTL_XENIFACE_EVTCHN_BIND_UNBOUND_PORT failed");
+        Log(XLL_ERROR, L"IOCTL_XENIFACE_EVTCHN_BIND_UNBOUND failed");
         goto fail;
     }
 
@@ -442,11 +444,11 @@ XcGnttabPermitForeignAccess(
     // this IOCTL is expected to be pending on success
     if (!Success) {
         if (Status != ERROR_IO_PENDING) {
-            Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_GRANT_PAGES failed");
+            Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS failed");
             goto fail;
         }
     } else {
-        Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_GRANT_PAGES not pending");
+        Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS not pending");
         Status = ERROR_UNIDENTIFIED_ERROR;
         goto fail;
     }
@@ -506,7 +508,7 @@ XcGnttabRevokeForeignAccess(
 
     Status = GetLastError();
     if (!Success) {
-        Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_UNGRANT_PAGES failed");
+        Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS failed");
         goto fail;
     }
 
-- 
2.40.1.windows.1



From win-pv-devel-bounces@lists.xenproject.org Tue Dec 12 09:39:43 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 12 Dec 2023 09:39:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652790.1018838 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCzEr-0003E8-VU; Tue, 12 Dec 2023 09:39:41 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652790.1018838; Tue, 12 Dec 2023 09:39: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 1rCzEr-0003E1-St; Tue, 12 Dec 2023 09:39:41 +0000
Received: by outflank-mailman (input) for mailman id 652790;
 Tue, 12 Dec 2023 09:39:40 +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=HVvx=HX=invisiblethingslab.com=omeg@srs-se1.protection.inumbo.net>)
 id 1rCzEq-00036s-KG
 for win-pv-devel@lists.xenproject.org; Tue, 12 Dec 2023 09:39:40 +0000
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com
 [64.147.123.24]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id 5c725e14-98d2-11ee-98e8-6d05b1d4d9a1;
 Tue, 12 Dec 2023 10:39:38 +0100 (CET)
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.west.internal (Postfix) with ESMTP id 129F13200A3B;
 Tue, 12 Dec 2023 04:39:33 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute3.internal (MEProxy); Tue, 12 Dec 2023 04:39:34 -0500
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 12 Dec 2023 04:39:32 -0500 (EST)
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: 5c725e14-98d2-11ee-98e8-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	invisiblethingslab.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:from:from:in-reply-to
	:message-id:mime-version:reply-to:subject:subject:to:to; s=fm1;
	 t=1702373973; x=1702460373; bh=tlaEsyAUkQazvI5u8Tb9RxwCWLtoqc8d
	NIi4Mj7nvko=; b=P5e14/2LufbCaynpLyrzoPG7/iO8VqZ9GYEYatMWdl/QpqAS
	2+Qpp9zI3Is/lNaM7Ed/CMAt2abyhSRan4BRodFdkq1xtBa/QZ38G2s5O0KKOSkN
	sgDr7UlxcY/8x/0lfahSxdYSjj41gy4Dwo6FV/SORVqSRcKS2og28aj6z7vYYz/Z
	k/usK1RlwyELJrAC6iN9iyMa6n3B0IRNR32GFWmq0EuWPVw/dMUxlPDrZxuJTZSh
	tZaoQ2DBtfGBVMzde8+1iapY/UkaBhbwg7ThPOtgipca0HPspFKySPXV2Rlv3+XC
	0QVKsmDxx44GfS1JpZRe3D8d3f5g79NND2SLbw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:feedback-id:feedback-id
	:from:from:in-reply-to:message-id:mime-version:reply-to:subject
	:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
	:x-sasl-enc; s=fm1; t=1702373973; x=1702460373; bh=tlaEsyAUkQazv
	I5u8Tb9RxwCWLtoqc8dNIi4Mj7nvko=; b=ZdBx5yuRpEqwEOayHoqkVbnRLjz00
	pYuKTjaFLQ+ylRM6MjyUrhXPEKFk7Ji9HKrnae8DIEJynLImJWuuJhWAImX1LHO7
	oCrKz75SRLisoPbKXM4dxhR3cS448Nh99w8DgLHwS5rYnYLO3nDQ1KopqcnSJVRS
	xZMewoBLKqlZRQwg4I+PXpvIcIlTDb3T9klbw/IL3e+xKYZsWP1LPC/xC3bT1EHI
	Qj02UDe0blD8rnH12znXM4EBetBx6BnWO5qPz41EedmoQFH33hZXapdwDjOirRjH
	0S4byBK3chfxpW61Cw0h2ERtNjqjEtHT05cMFizKvEKk+0097EcMQcVNw==
X-ME-Sender: <xms:VSp4ZSCQkarEb0rxRaDZhPYsqiB-x_zp2BwD_cut6U4WtdJCNGz0dg>
    <xme:VSp4Zcg57Uy20ow_5gZdcDcP3abRUDr9QXcrK_EXqUjjTimbea7gc4WLnLTFLLVB_
    RcqM2eWsAiWnAM>
X-ME-Received: <xmr:VSp4ZVmiq44GRlWndQMXc-9szu2gbqWdmyUQrLIxbQfLEHRYzEJ7dShjOolswtGZFXI4WTUXgnwL-5j-ToQIXWYj2OyJhN6_wf697S79bvQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelgedgtdehucetufdoteggodetrfdotf
    fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
    uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffogggtgfesthekre
    dtredtjeenucfhrhhomheptfgrfhgrlhcuhghojhguhihlrgcuoehomhgvghesihhnvhhi
    shhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeffhfekge
    elgfevtddvgffgjeetfffgfefggeejueelhffgvdehgefggeeftdeutdenucevlhhushht
    vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehomhgvghesihhnvhhish
    hisghlvghthhhinhhgshhlrggsrdgtohhm
X-ME-Proxy: <xmx:VSp4ZQyC3w_377BTEI_lrXrobd3tivB9JQA9hTUEefUXKnYbXbkSrw>
    <xmx:VSp4ZXTrVBhYIQasoHNA1PeodDpd_HH1DKSCWAjnD34fX03AJOv-ng>
    <xmx:VSp4ZbYUic_rq0YciP7R3K7K472ffeGvZcbKrRpxDkTXfSX-WF4wSw>
    <xmx:VSp4ZaPdI0MH0ExHyHRHHdwi8wqS_Ekm67WlDGXcXsocs4isE0dt5g>
Feedback-ID: i409c4082:Fastmail
From: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
To: win-pv-devel@lists.xenproject.org
Cc: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
Subject: [RFC PATCH 0/6] Add gnttab IOCTLs that allow sharing already existing memory
Date: Tue, 12 Dec 2023 10:38:42 +0100
Message-Id: <cover.1702373837.git.omeg@invisiblethingslab.com>
X-Mailer: git-send-email 2.40.1.windows.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This series of patches adds new GNTTAB IOCTLs that allow sharing memory
that the client has already prepared (existing IOCTLs share driver-allocated
memory). The new IOCTLs don't use RequestId numbers as input to simplify
client code. Xencontrol is updated to use the new IOCTLs.

Rafał Wojdyła (6):
  Fix minor xencontrol issues
  Fix parameter annotation for __FreeCapturedBuffer()
  __CaptureUserBuffer(): zero CapturedBuffer on failure in all cases
  Remove unused function declarations from ioctls.h
  Add gnttab IOCTLs that allow sharing already existing memory
  xencontrol: use IOCTL_XENIFACE_GNTTAB_*_V2 IOCTLs

 include/xencontrol.h                |  30 +-
 include/xeniface_ioctls.h           |  94 +++-
 src/xencontrol/xencontrol.c         | 186 +++-----
 src/xencontrol/xencontrol_private.h |  33 --
 src/xeniface/ioctl_gnttab.c         | 711 +++++++++++++++++-----------
 src/xeniface/ioctls.c               |  31 +-
 src/xeniface/ioctls.h               |  97 ++--
 src/xeniface/irp_queue.c            |  27 +-
 src/xeniface/irp_queue.h            |   2 +-
 9 files changed, 696 insertions(+), 515 deletions(-)

-- 
2.40.1.windows.1



From win-pv-devel-bounces@lists.xenproject.org Tue Dec 12 09:39:47 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 12 Dec 2023 09:39:47 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652793.1018848 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCzEx-0003QI-3Z; Tue, 12 Dec 2023 09:39:47 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652793.1018848; Tue, 12 Dec 2023 09:39:47 +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 1rCzEw-0003QB-Vy; Tue, 12 Dec 2023 09:39:46 +0000
Received: by outflank-mailman (input) for mailman id 652793;
 Tue, 12 Dec 2023 09:39:45 +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=HVvx=HX=invisiblethingslab.com=omeg@srs-se1.protection.inumbo.net>)
 id 1rCzEv-00036s-Lr
 for win-pv-devel@lists.xenproject.org; Tue, 12 Dec 2023 09:39:45 +0000
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com
 [64.147.123.24]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id 616bbcb6-98d2-11ee-98e8-6d05b1d4d9a1;
 Tue, 12 Dec 2023 10:39:45 +0100 (CET)
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.west.internal (Postfix) with ESMTP id 67AF23200ABA;
 Tue, 12 Dec 2023 04:39:43 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute3.internal (MEProxy); Tue, 12 Dec 2023 04:39:43 -0500
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 12 Dec 2023 04:39:41 -0500 (EST)
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: 616bbcb6-98d2-11ee-98e8-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	invisiblethingslab.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:from:from:in-reply-to
	:in-reply-to:message-id:mime-version:references:reply-to:subject
	:subject:to:to; s=fm1; t=1702373982; x=1702460382; bh=uK84LJZqV4
	685TWENdpyUDgCMOFLkoNJzF0uDZyG10A=; b=mfQUcFPBoNL5bLli1LSXkO/Lk+
	N1gZ3HjaopvuJMj0L30xONVYog823A+91a29d1pK8Ojaxc4zRr9SBahAcZnjp6/R
	aSsTesTkymvoi8KgMYCJ0beJAtQOM7bXSZ7/7iGIn5AQI7VkG69p7YXoQfaJYcDo
	ESuSxwN70vZ7B/tZ6FaG5SbBflsgJRyvzMK/Zqy1BAO+VXUrbaaevW5xAYZXVQhk
	vNKBSFae/UwW2OVZqnnwwgkwRph9ETgjfSoWl+TILW9d/7Y7HG7cBnbDw+pw9qN4
	QWd9tUFmRDKn2SonuazO6OYHGAVCDuuASswvboQMx41h89Lx7cL1rV6YrApg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:feedback-id:feedback-id
	:from:from:in-reply-to:in-reply-to:message-id:mime-version
	:references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
	:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1702373982; x=
	1702460382; bh=uK84LJZqV4685TWENdpyUDgCMOFLkoNJzF0uDZyG10A=; b=q
	Ye/AVUWEwGMeClezmWnzIGaMUW41VQbaGs5v3UYUANmsABpnYvhnCd7YxCLZwpG1
	21OmN+H3urwqsitR7fS6hFwP1RYbbGeF/09GEQe5Ik7zmXb8dgr1tVe7JbXSIVzR
	5f897wxrb1apLLRvK92bCWtL+SlH0xXVSNLZ3HZ6fqbaBUF1mZpZgzEb9l8S+aDd
	gCunav4grd94ShVqee4x5IHMF8+TA3jBi/OCYtyaGVSTBtPre9UEEjCyxhjmhJPa
	x8TVFUSYLhipXU/onIVutrlgMemyBoZbs4lO3fnPQRGtr1dLYv4N+UzYkeKSRPDa
	FVYlOl4isq9nWuG/YYBQg==
X-ME-Sender: <xms:Xip4ZUUtOdNpS8UaEgN8zN42J3iRGgTvz4ke5lerGKiBnYW9qSCpIw>
    <xme:Xip4ZYlglieNfHDKckKOZwYdWR3X0Kh50we_e2a-z_iPt37EuAmSew71sYXPF1cxN
    B4HUq-OFpzaxSA>
X-ME-Received: <xmr:Xip4ZYaIbrk7zgr10QhR1IICS7TbRvP-LmLhPTHG7S_D-PEe-U9qfOcpT2BbJGsDuLD1L7UVQkXL4vm7lHl5TH5lzjiqsurd49FdTS-ZBio>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelgedgtdehucetufdoteggodetrfdotf
    fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
    uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesth
    ekredtredtjeenucfhrhhomheptfgrfhgrlhcuhghojhguhihlrgcuoehomhgvghesihhn
    vhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehhf
    evvdetvdekkeeglefhhfeijeetuedvkeejjeeutdevgeejleevvdfgteehtdenucevlhhu
    shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehomhgvghesihhnvh
    hishhisghlvghthhhinhhgshhlrggsrdgtohhm
X-ME-Proxy: <xmx:Xip4ZTXxI5dXvB4EwOX21N81G8hnSC8i4sL452Asi7f6PZivpyqnuQ>
    <xmx:Xip4ZekVIzTcr2FINUL5pPOhSU7jcfBtBJ28x4lj1yUDy_AY6CjBMA>
    <xmx:Xip4ZYdGUnp0R5400eicQRnCs-4aGaogVyNPsR8-74R5vk67BuaLTg>
    <xmx:Xip4ZYS76PqL5Wrxel3mSGV0EhiyW04XjB4PRDQkRYqoN-vr3vCVGQ>
Feedback-ID: i409c4082:Fastmail
From: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
To: win-pv-devel@lists.xenproject.org
Cc: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
Subject: [RFC PATCH 3/6] __CaptureUserBuffer(): zero CapturedBuffer on failure in all cases
Date: Tue, 12 Dec 2023 10:38:45 +0100
Message-Id: <5655177819cab6c17ec8934fd05691176679257b.1702373837.git.omeg@invisiblethingslab.com>
X-Mailer: git-send-email 2.40.1.windows.1
In-Reply-To: <cover.1702373837.git.omeg@invisiblethingslab.com>
References: <cover.1702373837.git.omeg@invisiblethingslab.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
---
 src/xeniface/ioctls.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/xeniface/ioctls.c b/src/xeniface/ioctls.c
index 6298fef..479f0f6 100644
--- a/src/xeniface/ioctls.c
+++ b/src/xeniface/ioctls.c
@@ -56,8 +56,10 @@ __CaptureUserBuffer(
 
     Status = STATUS_NO_MEMORY;
     TempBuffer = __AllocatePoolWithTag(NonPagedPool, Length, XENIFACE_POOL_TAG);
-    if (TempBuffer == NULL)
+    if (TempBuffer == NULL) {
+        *CapturedBuffer = NULL;
         return STATUS_INSUFFICIENT_RESOURCES;
+    }
 
     Status = STATUS_SUCCESS;
 
-- 
2.40.1.windows.1



From win-pv-devel-bounces@lists.xenproject.org Tue Dec 12 09:39:47 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 12 Dec 2023 09:39:47 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652794.1018850 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCzEx-0003Qb-5Z; Tue, 12 Dec 2023 09:39:47 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652794.1018850; Tue, 12 Dec 2023 09:39:47 +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 1rCzEx-0003QN-11; Tue, 12 Dec 2023 09:39:47 +0000
Received: by outflank-mailman (input) for mailman id 652794;
 Tue, 12 Dec 2023 09:39:46 +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=HVvx=HX=invisiblethingslab.com=omeg@srs-se1.protection.inumbo.net>)
 id 1rCzEw-0003Po-2Q
 for win-pv-devel@lists.xenproject.org; Tue, 12 Dec 2023 09:39:46 +0000
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com
 [64.147.123.24]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id 60396da1-98d2-11ee-9b0f-b553b5be7939;
 Tue, 12 Dec 2023 10:39:43 +0100 (CET)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.west.internal (Postfix) with ESMTP id 6413B3200AB1;
 Tue, 12 Dec 2023 04:39:41 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Tue, 12 Dec 2023 04:39:41 -0500
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 12 Dec 2023 04:39:39 -0500 (EST)
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: 60396da1-98d2-11ee-9b0f-b553b5be7939
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	invisiblethingslab.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:from:from:in-reply-to
	:in-reply-to:message-id:mime-version:references:reply-to:subject
	:subject:to:to; s=fm1; t=1702373980; x=1702460380; bh=uNe0qcRSM1
	btKGGFUFWhVrdkmQUeNGKlILL3iuygxWs=; b=RfwvNCYQX4Lb28Y1Rl5rwyEnt2
	rwJ5delstJseHCiiYkcXEdFHAcSJX2d2ajS+4+04ACvS36KL2vZM6ERXuLG2LbzV
	xhMFRm7SzdPPNO/TBW5GO185F/BJ+0ti4PaSVPu0xjSf8157kYK04ZOfu5ZqJtcx
	BKnoewgO2TjQ27i+kcIYD0mhX2SQU9cMMfZZswhHdW5LzpjMUTLcwRCOY9L17CoH
	n/hdI5CzWVshAn7SGzZHJHJO9MDgqpYXMMqP8VWRglFvgo3y6MuXerEzLkIAj2EH
	0ZMY4AOuWR6shuyEUe2Z2ocnP680MaOC6bgJcIZQOFNpiaJTgHG8CBl7FkxQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:feedback-id:feedback-id
	:from:from:in-reply-to:in-reply-to:message-id:mime-version
	:references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
	:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1702373980; x=
	1702460380; bh=uNe0qcRSM1btKGGFUFWhVrdkmQUeNGKlILL3iuygxWs=; b=b
	QPh+e+hszx+gA9UyfiQhQg2QCSj111Fj2Fb5INV1DEe3JyBblv/U3uTHbD2SSYrA
	RO1tYFU2HHkjOuCDosVBv/QZNP9Sraqyzib7UojRMI4epQq2/8B6cS5UMvioxx0a
	IlSeY/9vriNPDGCjkGIF01xQ2ogTrrKW9clmlVCVvsL1eVNp2+FVfsiNKflbA+db
	u2bybhFGwaB9GENHV0ftHzkN8pNUCA1DQlzS3yKauKP3Du2QMBqqMGMguMfMxRfb
	Zsr//sB1UxXeZCAjvHkhrDZ0ow0RmTg9tAHs9QhnBRZiBF8dKA4oN0jI3IL+U+oF
	bapBZsPRqQ3nBCu1YFlQw==
X-ME-Sender: <xms:XCp4ZY6SCEzsuXJORNzq46p2CyT67ty0yAudp2DNt-rtS0aRFzBdFw>
    <xme:XCp4ZZ4WMJrrr7tb1kX0-Ijc1PSVeUIsbuzBzp19mV7TSDimuY2H8BziFpuoUVv5r
    GUFH03Pkx_ddU0>
X-ME-Received: <xmr:XCp4ZXft06_ZHHjNKp7-BPyimXNUOIQKwEroau_qH5Z-4oy1s2jqAo7URaBcvCkXh-OKUS8wPPP7XDvDi8WPMatdK9qCJadBUlZSnZb1YOo>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelgedgtdehucetufdoteggodetrfdotf
    fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
    uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesth
    ekredtredtjeenucfhrhhomheptfgrfhgrlhcuhghojhguhihlrgcuoehomhgvghesihhn
    vhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehhf
    evvdetvdekkeeglefhhfeijeetuedvkeejjeeutdevgeejleevvdfgteehtdenucevlhhu
    shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehomhgvghesihhnvh
    hishhisghlvghthhhinhhgshhlrggsrdgtohhm
X-ME-Proxy: <xmx:XCp4ZdJxLKWLbiHn0-hZB8bnGZ21FoI2guOP1ZdqWnS0VUw-xIVqsw>
    <xmx:XCp4ZcLmCog2BmCbsCKAfUFnLdQMMWz4-RV_AMs6_zRku7OptgbK9A>
    <xmx:XCp4ZewotS_PiaCB3nPtOhi-cMs03t3j_iMYAoPW0a8gNnkzpQYBVw>
    <xmx:XCp4ZTk_2ZSBA_QHaNF6GzY904UMDw5JENqsYITeblh1byU62-leWw>
Feedback-ID: i409c4082:Fastmail
From: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
To: win-pv-devel@lists.xenproject.org
Cc: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
Subject: [RFC PATCH 2/6] Fix parameter annotation for __FreeCapturedBuffer()
Date: Tue, 12 Dec 2023 10:38:44 +0100
Message-Id: <864c94b17f4e6bfbf575ce3896a068ebcf02daa5.1702373837.git.omeg@invisiblethingslab.com>
X-Mailer: git-send-email 2.40.1.windows.1
In-Reply-To: <cover.1702373837.git.omeg@invisiblethingslab.com>
References: <cover.1702373837.git.omeg@invisiblethingslab.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

CapturedBuffer is optional, mark it so.

Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
---
 src/xeniface/ioctls.c | 2 +-
 src/xeniface/ioctls.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xeniface/ioctls.c b/src/xeniface/ioctls.c
index 9808adc..6298fef 100644
--- a/src/xeniface/ioctls.c
+++ b/src/xeniface/ioctls.c
@@ -79,7 +79,7 @@ __CaptureUserBuffer(
 
 VOID
 __FreeCapturedBuffer(
-    __in  PVOID CapturedBuffer
+    __in_opt  PVOID CapturedBuffer
     )
 {
     if (CapturedBuffer != NULL) {
diff --git a/src/xeniface/ioctls.h b/src/xeniface/ioctls.h
index 4c932ed..c89f173 100644
--- a/src/xeniface/ioctls.h
+++ b/src/xeniface/ioctls.h
@@ -109,7 +109,7 @@ __CaptureUserBuffer(
 
 VOID
 __FreeCapturedBuffer(
-    __in  PVOID CapturedBuffer
+    __in_opt  PVOID CapturedBuffer
     );
 
 NTSTATUS
-- 
2.40.1.windows.1



From win-pv-devel-bounces@lists.xenproject.org Tue Dec 12 09:39:49 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 12 Dec 2023 09:39:49 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652795.1018855 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCzEz-0003WA-5m; Tue, 12 Dec 2023 09:39:49 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652795.1018855; Tue, 12 Dec 2023 09:39:49 +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 1rCzEz-0003W3-2n; Tue, 12 Dec 2023 09:39:49 +0000
Received: by outflank-mailman (input) for mailman id 652795;
 Tue, 12 Dec 2023 09:39:47 +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=HVvx=HX=invisiblethingslab.com=omeg@srs-se1.protection.inumbo.net>)
 id 1rCzEx-00036s-L1
 for win-pv-devel@lists.xenproject.org; Tue, 12 Dec 2023 09:39:47 +0000
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com
 [64.147.123.24]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id 62966e9e-98d2-11ee-98e8-6d05b1d4d9a1;
 Tue, 12 Dec 2023 10:39:47 +0100 (CET)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.west.internal (Postfix) with ESMTP id 59F613200AB5;
 Tue, 12 Dec 2023 04:39:45 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Tue, 12 Dec 2023 04:39:45 -0500
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 12 Dec 2023 04:39:43 -0500 (EST)
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: 62966e9e-98d2-11ee-98e8-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	invisiblethingslab.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:from:from:in-reply-to
	:in-reply-to:message-id:mime-version:references:reply-to:subject
	:subject:to:to; s=fm1; t=1702373984; x=1702460384; bh=wV2JKKuCCX
	zDccjtMKcL4FNsWovTPLtmBE+gWiBolUI=; b=txzjHAfX8wA2x53um1aV8SF8PG
	KzHI1l8mmuguFQEXctlXNsPrW4ry9gTg5apUbvHTu+BPN1X1klgz3Nx5q+phznBC
	QO2R+DSs4xaAwzFnOZ2/nq5gT3E0gW71rEWa6OwZdHeoh4SEEvFbiSxJzCNQrSB5
	roXnBUhxSd6bLW56bRR4nDPGky5ChaqblsPk2HZDvjiWgRD7JMQYHQrSSDMSV7O8
	1BCffcFQhZYzlRCVZD1sn66HsjrlNMj04Kz12hXTpolESAt2vBIW78JwpfSAv1bM
	CQRr+CimqEmnOHZi1D2sYbK2lbgWaE8/pvh4USmgOHUmscsHKbbC53QCn6dQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:feedback-id:feedback-id
	:from:from:in-reply-to:in-reply-to:message-id:mime-version
	:references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
	:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1702373984; x=
	1702460384; bh=wV2JKKuCCXzDccjtMKcL4FNsWovTPLtmBE+gWiBolUI=; b=E
	Ky+6mvjIRaZZZWGS2bx5rg1dsW9M+/e1340Dx1q5iUB8iljNJyLxSBBM0w5tHwQk
	snZE+RWG5Y+Ka82OFvTpWCLh627+eHQzqItrm6XbwK41uYExnVfpY26jfcN/+eeY
	PKA91OV6k5wuuqT3y1MSVQW8NwEB7fbYflImeSA0A/InSV2ykr5f+U3ovuUdUddn
	1H/FfM6aFYCNOjjeyp0BqG0hGHubnKhiH7XDH36RvLQ2k7uFosWcFVw52tIQQ6r+
	KpPUr+RhwAN2X6GihEyg2nRhZZ273uDGNEXZU4iYfjNZT247P18bawItVzzur+gd
	+9sMJqwiZmRd7VYRqx2hQ==
X-ME-Sender: <xms:YCp4ZW2wZNp2GtHdGt9S5IOGEatHJ9uZjTh_MsxLWr21JVxYWK71LA>
    <xme:YCp4ZZEo0-V5ZNMX2FusqP-88zhJWCuc-UX_8UFk3R0_VIGQJNSlt-NkY6hd1O5Wv
    SsDa0xuC6fJk28>
X-ME-Received: <xmr:YCp4Ze7jZqz7QuxfRVfcesADpIMIJBHaiUNNGoYEXAkEdpqvet-fDvCeAIi5fRrzMrfBveuo3opPLg-JOdMhbQcWzmmWL9Lpmf3CVUheLs0>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelgedgtdehucetufdoteggodetrfdotf
    fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
    uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesth
    ekredtredtjeenucfhrhhomheptfgrfhgrlhcuhghojhguhihlrgcuoehomhgvghesihhn
    vhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehhf
    evvdetvdekkeeglefhhfeijeetuedvkeejjeeutdevgeejleevvdfgteehtdenucevlhhu
    shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehomhgvghesihhnvh
    hishhisghlvghthhhinhhgshhlrggsrdgtohhm
X-ME-Proxy: <xmx:YCp4ZX1M4qCUZdJpQeDHFrCHjX6p7vRWtN-agDub2uEYkSvMVp074w>
    <xmx:YCp4ZZGjkvZd5Ys1VPHlt9Gp3dzGZs1gIverWzqywCkWeEYvivCkEg>
    <xmx:YCp4ZQ-H9sMDCFpSiF8X7HncRV6kRZle-6c4--AFrTXrKwPAdqRnMQ>
    <xmx:YCp4ZYx8IyLnP2tEi8x2rL0jEZC3z1Ii4G_UX4naSe2uBaXm0SXYMw>
Feedback-ID: i409c4082:Fastmail
From: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
To: win-pv-devel@lists.xenproject.org
Cc: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
Subject: [RFC PATCH 4/6] Remove unused function declarations from ioctls.h
Date: Tue, 12 Dec 2023 10:38:46 +0100
Message-Id: <f016a634c6c45e535793eb0d319d576d2e2bde99.1702373837.git.omeg@invisiblethingslab.com>
X-Mailer: git-send-email 2.40.1.windows.1
In-Reply-To: <cover.1702373837.git.omeg@invisiblethingslab.com>
References: <cover.1702373837.git.omeg@invisiblethingslab.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
---
 src/xeniface/ioctls.h | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/src/xeniface/ioctls.h b/src/xeniface/ioctls.h
index c89f173..09946fd 100644
--- a/src/xeniface/ioctls.h
+++ b/src/xeniface/ioctls.h
@@ -289,16 +289,6 @@ IoctlGnttabPermitForeignAccess(
     __inout  PIRP           Irp
     );
 
-DECLSPEC_NOINLINE
-NTSTATUS
-IoctlGnttabGetGrantResult(
-    __in  PXENIFACE_FDO     Fdo,
-    __in  PVOID             Buffer,
-    __in  ULONG             InLen,
-    __in  ULONG             OutLen,
-    __out PULONG_PTR        Info
-    );
-
 DECLSPEC_NOINLINE
 NTSTATUS
 IoctlGnttabRevokeForeignAccess(
@@ -318,16 +308,6 @@ IoctlGnttabMapForeignPages(
     __inout  PIRP              Irp
     );
 
-DECLSPEC_NOINLINE
-NTSTATUS
-IoctlGnttabGetMapResult(
-    __in  PXENIFACE_FDO     Fdo,
-    __in  PVOID             Buffer,
-    __in  ULONG             InLen,
-    __in  ULONG             OutLen,
-    __out PULONG_PTR        Info
-    );
-
 DECLSPEC_NOINLINE
 NTSTATUS
 IoctlGnttabUnmapForeignPages(
-- 
2.40.1.windows.1



From win-pv-devel-bounces@lists.xenproject.org Tue Dec 12 09:39:53 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 12 Dec 2023 09:39:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652796.1018859 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCzF3-0003by-8d; Tue, 12 Dec 2023 09:39:53 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652796.1018859; Tue, 12 Dec 2023 09:39:53 +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 1rCzF3-0003bh-5A; Tue, 12 Dec 2023 09:39:53 +0000
Received: by outflank-mailman (input) for mailman id 652796;
 Tue, 12 Dec 2023 09:39:51 +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=HVvx=HX=invisiblethingslab.com=omeg@srs-se1.protection.inumbo.net>)
 id 1rCzF1-00036s-JN
 for win-pv-devel@lists.xenproject.org; Tue, 12 Dec 2023 09:39:51 +0000
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com
 [64.147.123.24]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id 63f2d443-98d2-11ee-98e8-6d05b1d4d9a1;
 Tue, 12 Dec 2023 10:39:49 +0100 (CET)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.west.internal (Postfix) with ESMTP id 89D733200ABA;
 Tue, 12 Dec 2023 04:39:47 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Tue, 12 Dec 2023 04:39:47 -0500
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 12 Dec 2023 04:39:45 -0500 (EST)
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: 63f2d443-98d2-11ee-98e8-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	invisiblethingslab.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:from:from:in-reply-to
	:in-reply-to:message-id:mime-version:references:reply-to:subject
	:subject:to:to; s=fm1; t=1702373987; x=1702460387; bh=99XWeELplw
	lqmUk22hRUm/Qvi8Mq77JMqSYbrGpbWEk=; b=KXm7ZpSvE+0n1fefRjQzcGyqzP
	PAHHFxSPA8N4p6cO/qyygsjkifb+r/+MEN6EAiabX+mVV3bJGVTyfmXz+Swk5oHH
	bnkViILgrcdoZLhaXdAaLAgCyCF5W0O4gikdL5I8Y0/anXJwxtdTZQ/xEEq5Fni+
	KyPUfKl85Z+b5zQ8aWgnd9v1s395G6qmyrdvJCAdnc5Jys2XcmEVp2T3MMONNsTM
	iCuHsy2USy8T87Yj1P+fubCxhMdAI/ybUx9ykCBj0GB4n6EFkiU9r+3G1EzxnK7V
	Bt+WenPAeig+FojVZjQTX/MTIlUw1KDPAfVipkh9hLe3V/8ByPTjLVmlUwLA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:feedback-id:feedback-id
	:from:from:in-reply-to:in-reply-to:message-id:mime-version
	:references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
	:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1702373987; x=
	1702460387; bh=99XWeELplwlqmUk22hRUm/Qvi8Mq77JMqSYbrGpbWEk=; b=P
	niSz1vgcQ2sytRP06kC8wLO5Q0WfxndKqKgbX+8Xswqi+UUbo16L2fqzHevtW9XE
	o6/RtG7nN6uvK4Erlm72jpzBwzzvfRvhkQHYEIopDlV3i5Qom/JPCEWACK31Y3NV
	2RZY8hZSBLCDbxA5ZaZJ1mqAuh2tuWCP+i2+n8fFdvX40jx6BB0iaAKnhFsSQ+GN
	gwBe10h2R9QsznZsizp4N40SW7rSvDdbEx4GXr14ESlBtbcrEEworoxyqWf1wvzI
	J/bZr/RspSV1z7CxG2pSbf50ps/uDdg7EzTywItoRP92wIdGBcRfGRqplAlstD0L
	YhOZhVyu0fMMZVbFnyPSQ==
X-ME-Sender: <xms:Yip4ZTIldnKdiytWMVBYE6mKos7wWst8JIkSSTRUWVKFeohLZUuBUA>
    <xme:Yip4ZXLexs8lMoigDqxYRETRX_iIamzAfRFOOlyAkgP5Ip089xe6zct9nMMIPlg1E
    eX59pCbEEnC17w>
X-ME-Received: <xmr:Yip4Zbt6_wcKE03x55IZhsW6zeomQzFf1bncMtB3U8MMAecHkcMaYjT57b3m_kDK_Xr5cHMxmm--A89HmpJtlg0dhohqXoK_MGmT6QOn5WU>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelgedgtdehucetufdoteggodetrfdotf
    fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
    uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesth
    ekredtredtjeenucfhrhhomheptfgrfhgrlhcuhghojhguhihlrgcuoehomhgvghesihhn
    vhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehhf
    evvdetvdekkeeglefhhfeijeetuedvkeejjeeutdevgeejleevvdfgteehtdenucevlhhu
    shhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehomhgvghesihhnvh
    hishhisghlvghthhhinhhgshhlrggsrdgtohhm
X-ME-Proxy: <xmx:Yip4ZcavUoPQx49FAwNe6s_kf-ph3EFn8ucbHLHikfW85PTrxQ5OCQ>
    <xmx:Yip4ZaZ_7C7zBPW08MU-2RQy_l-lAJpMIlOpHq01eb92gaBpNDZ2uw>
    <xmx:Yip4ZQAaUJdv2r0dmot93ybiDldmna9BgoXyOxpjmsNoAHuEUmRgGg>
    <xmx:Yyp4ZY2tCbG9xwkUlA7VXYjNgW4ChnSEaA0X_-4gynAVEHCEAKIsfA>
Feedback-ID: i409c4082:Fastmail
From: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
To: win-pv-devel@lists.xenproject.org
Cc: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
Subject: [RFC PATCH 5/6] Add gnttab IOCTLs that allow sharing already existing memory
Date: Tue, 12 Dec 2023 10:38:47 +0100
Message-Id: <f219c23e8bee0af908c820aa0440a496231be1cb.1702373837.git.omeg@invisiblethingslab.com>
X-Mailer: git-send-email 2.40.1.windows.1
In-Reply-To: <cover.1702373837.git.omeg@invisiblethingslab.com>
References: <cover.1702373837.git.omeg@invisiblethingslab.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS shares pages that are
newly allocated by the driver. This commit adds new IOCTLs:
IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2,
IOCTL_XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_V2,
IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_V2
and IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_V2.

IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2 allows specifying
user-mode address of a memory region that will be shared
(the region is locked for the duration).

All _V2 IOCTLs use user-mode address of the shared region
as a unique (per-process) request identifier. This differs from
the existing IOCTLs that use client-supplied RequestId. _V2 IOCTLs
should be considered as preferable since they don't require
the client to manage IDs.

Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
---
 include/xeniface_ioctls.h   |  94 ++++-
 src/xeniface/ioctl_gnttab.c | 711 ++++++++++++++++++++++--------------
 src/xeniface/ioctls.c       |  25 +-
 src/xeniface/ioctls.h       |  75 ++--
 src/xeniface/irp_queue.c    |  27 +-
 src/xeniface/irp_queue.h    |   2 +-
 6 files changed, 596 insertions(+), 338 deletions(-)

diff --git a/include/xeniface_ioctls.h b/include/xeniface_ioctls.h
index 1a8bcb5..67deedf 100644
--- a/include/xeniface_ioctls.h
+++ b/include/xeniface_ioctls.h
@@ -245,8 +245,10 @@ typedef enum _XENIFACE_GNTTAB_PAGE_FLAGS {
 } XENIFACE_GNTTAB_PAGE_FLAGS;
 
 /*! \brief Grant permission to access local memory pages to a foreign domain
+    \deprecated Use the _V2 IOCTLs that don't need RequestId input instead
     \note This IOCTL must be asynchronous. The driver doesn't complete the request
           until the grant is explicitly revoked or the calling thread terminates.
+          Granted memory is allocated by the driver.
 
     Input: XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_IN
 
@@ -271,7 +273,35 @@ typedef struct _XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT {
     ULONG References[ANYSIZE_ARRAY]; /*!< An array of Xen-assigned references for each granted page */
 } XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT, *PXENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT;
 
-/*! \brief Revoke a foreign domain access to previously granted memory region
+/*! \brief Grant permission to access local memory pages to a foreign domain
+    \note This IOCTL must be asynchronous. The driver doesn't complete the request
+          until the grant is explicitly revoked or the calling thread terminates.
+          Granted memory may be already mapped or allocated by the driver.
+
+    Input: XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_IN_V2
+
+    Output: XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT_V2
+*/
+#define IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2 \
+    CTL_CODE(FILE_DEVICE_UNKNOWN, 0x824, METHOD_NEITHER, FILE_ANY_ACCESS)
+
+/*! \brief Input for IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2 */
+typedef struct _XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_IN_V2 {
+    USHORT                     RemoteDomain; /*!< Remote domain that is being granted access */
+    PVOID                      Address;      /*!< Address of the granted memory region, allocated by the driver if NULL */
+    ULONG                      NumberPages;  /*!< Number of 4k pages to grant access to */
+    XENIFACE_GNTTAB_PAGE_FLAGS Flags;        /*!< Additional flags */
+    ULONG                      NotifyOffset; /*!< Offset of a byte in the granted region that will be set to 0 when the grant is revoked */
+    ULONG                      NotifyPort;   /*!< Local port number of an open event channel that will be notified when the grant is revoked */
+} XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_IN_V2, *PXENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_IN_V2;
+
+/*! \brief Output for IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2 */
+typedef struct _XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT \
+    XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT_V2, *PXENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT_V2;
+
+/*! \brief Revoke a foreign domain access to a memory region
+           previously granted by IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS
+    \deprecated Use the _V2 IOCTLs that don't need RequestId input instead
 
     Input: XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN
 
@@ -285,7 +315,23 @@ typedef struct _XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN {
     ULONG RequestId; /*! Request ID used in the corresponding IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS call */
 } XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN, *PXENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN;
 
+/*! \brief Revoke a foreign domain access to a memory region
+           previously granted by IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2
+
+    Input: XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN_V2
+
+    Output: None
+*/
+#define IOCTL_XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_V2 \
+    CTL_CODE(FILE_DEVICE_UNKNOWN, 0x825, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+/*! \brief Input for IOCTL_XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_V2 */
+typedef struct _XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN_V2 {
+    PVOID Address; /*!< User-mode address of the shared memory region */
+} XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN_V2, * PXENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN_V2;
+
 /*! \brief Map a foreign memory region into the current address space
+    \deprecated Use the _V2 IOCTLs that don't need RequestId input instead
     \note This IOCTL must be asynchronous. The driver doesn't complete the request
           until the memory is explicitly unmapped or the calling thread terminates.
 
@@ -309,10 +355,37 @@ typedef struct _XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN {
 
 /*! \brief Output for IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES */
 typedef struct _XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT {
-    PVOID Address; /*!< User-mode address of the mapped memory region */
+    PVOID Address; /*!< User-mode address of the shared memory region */
 } XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT, *PXENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT;
 
-/*! \brief Unmap a foreign memory region from the current address space
+/*! \brief Map a foreign memory region into the current address space
+    \note This IOCTL must be asynchronous. The driver doesn't complete the request
+          until the memory is explicitly unmapped or the calling thread terminates.
+
+    Input: XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN_V2
+
+    Output: XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT_V2
+*/
+#define IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_V2 \
+    CTL_CODE(FILE_DEVICE_UNKNOWN, 0x826, METHOD_NEITHER, FILE_ANY_ACCESS)
+
+/*! \brief Input for IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_V2 */
+typedef struct _XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN_V2 {
+    USHORT                     RemoteDomain;              /*!< Remote domain that has granted access to the pages */
+    ULONG                      NumberPages;               /*!< Number of 4k pages to map */
+    XENIFACE_GNTTAB_PAGE_FLAGS Flags;                     /*!< Additional flags */
+    ULONG                      NotifyOffset;              /*!< Offset of a byte in the mapped region that will be set to 0 when the region is unmapped */
+    ULONG                      NotifyPort;                /*!< Local port number of an open event channel that will be notified when the region is unmapped */
+    ULONG                      References[ANYSIZE_ARRAY]; /*!< An array of Xen-assigned references for each granted page */
+} XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN_V2, *PXENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN_V2;
+
+/*! \brief Output for IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_V2 */
+typedef struct _XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT \
+    XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT_V2, *PXENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT_V2;
+
+/*! \brief Unmap a foreign memory region mapped by IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES
+           from the current address space
+    \deprecated Use the _V2 IOCTLs that don't need RequestId input instead
 
     Input: XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN
 
@@ -326,6 +399,21 @@ typedef struct _XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN {
     ULONG RequestId; /*! Request ID used in the corresponding IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES call */
 } XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN, *PXENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN;
 
+/*! \brief Unmap a foreign memory region mapped by IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_V2
+           from the current address space
+
+    Input: XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN_V2
+
+    Output: None
+*/
+#define IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_V2 \
+    CTL_CODE(FILE_DEVICE_UNKNOWN, 0x827, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+/*! \brief Input for IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_V2 */
+typedef struct _XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN_V2 {
+    PVOID Address; /*!< User-mode address of the shared memory region */
+} XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN_V2, *PXENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN_V2;
+
 /*! \brief Gets the current suspend count.
 
     Input: None
diff --git a/src/xeniface/ioctl_gnttab.c b/src/xeniface/ioctl_gnttab.c
index b6b7327..c496f1b 100644
--- a/src/xeniface/ioctl_gnttab.c
+++ b/src/xeniface/ioctl_gnttab.c
@@ -47,35 +47,35 @@ CompleteGnttabIrp(
     PXENIFACE_DX Dx = (PXENIFACE_DX)DeviceObject->DeviceExtension;
     PXENIFACE_FDO Fdo = Dx->Fdo;
     PIRP Irp = Context;
-    PXENIFACE_CONTEXT_ID Id;
+    PXENIFACE_GNTTAB_CONTEXT GnttabContext;
     PIO_WORKITEM WorkItem;
     KAPC_STATE ApcState;
     BOOLEAN ChangeProcess;
 
     ASSERT(Context != NULL);
 
-    Id = Irp->Tail.Overlay.DriverContext[0];
+    GnttabContext = Irp->Tail.Overlay.DriverContext[0];
     WorkItem = Irp->Tail.Overlay.DriverContext[1];
 
     // We are not guaranteed to be in the context of the process that initiated the IRP,
     // but we need to be there to unmap memory.
-    ChangeProcess = PsGetCurrentProcess() != Id->Process;
+    ChangeProcess = PsGetCurrentProcess() != GnttabContext->Process;
     if (ChangeProcess) {
-        Trace("Changing process from %p to %p\n", PsGetCurrentProcess(), Id->Process);
-        KeStackAttachProcess(Id->Process, &ApcState);
+        Trace("Changing process from %p to %p\n", PsGetCurrentProcess(), GnttabContext->Process);
+        KeStackAttachProcess(GnttabContext->Process, &ApcState);
     }
 
     Trace("Irp %p, Process %p, Id %lu, Type %d, IRQL %d\n",
-          Irp, Id->Process, Id->RequestId, Id->Type, KeGetCurrentIrql());
+          Irp, GnttabContext->Process, GnttabContext->RequestId, GnttabContext->Type, KeGetCurrentIrql());
 
-    switch (Id->Type) {
+    switch (GnttabContext->Type) {
 
-    case XENIFACE_CONTEXT_GRANT:
-        GnttabFreeGrant(Fdo, CONTAINING_RECORD(Id, XENIFACE_GRANT_CONTEXT, Id));
+    case XENIFACE_GNTTAB_CONTEXT_GRANT:
+        GnttabFreeGrant(Fdo, GnttabContext);
         break;
 
-    case XENIFACE_CONTEXT_MAP:
-        GnttabFreeMap(Fdo, CONTAINING_RECORD(Id, XENIFACE_MAP_CONTEXT, Id));
+    case XENIFACE_GNTTAB_CONTEXT_MAP:
+        GnttabFreeMap(Fdo, GnttabContext);
         break;
 
     default:
@@ -125,18 +125,194 @@ static
 PIRP
 FindGnttabIrp(
     __in  PXENIFACE_FDO Fdo,
-    __in  PXENIFACE_CONTEXT_ID Id
+    __in  PXENIFACE_GNTTAB_CONTEXT Context
     )
 {
     KIRQL Irql;
     PIRP Irp;
 
     CsqAcquireLock(&Fdo->IrpQueue, &Irql);
-    Irp = CsqPeekNextIrp(&Fdo->IrpQueue, NULL, Id);
+    Irp = CsqPeekNextIrp(&Fdo->IrpQueue, NULL, Context);
     CsqReleaseLock(&Fdo->IrpQueue, Irql);
     return Irp;
 }
 
+// Undo (possibly partially done) sharing, free/clear associated context fields.
+// Does not trigger notifications if the flags are set.
+static
+void
+GnttabStopSharing(
+    __in     PXENIFACE_FDO             Fdo,
+    __inout  PXENIFACE_GNTTAB_CONTEXT  Context,
+    __in     ULONG                     NumberPages
+)
+{
+    if (Context->Grants != NULL) {
+        for (ULONG Page = 0; Page < NumberPages; Page++) {
+            ASSERT(NT_SUCCESS(XENBUS_GNTTAB(RevokeForeignAccess,
+                                            &Fdo->GnttabInterface,
+                                            Fdo->GnttabCache,
+                                            FALSE,
+                                            Context->Grants[Page])));
+        }
+
+        RtlZeroMemory(Context->Grants, Context->NumberPages * sizeof(Context->Grants[0]));
+        __FreePoolWithTag(Context->Grants, XENIFACE_POOL_TAG);
+        Context->Grants = NULL;
+    }
+
+    if (Context->Mdl != NULL) {
+        if (Context->KernelVa != NULL) {
+            // driver-allocated memory
+            MmUnmapLockedPages(Context->UserVa, Context->Mdl);
+        } else {
+            // user-supplied memory
+            try {
+                MmUnlockPages(Context->Mdl);
+            } except(EXCEPTION_EXECUTE_HANDLER) {
+                Error("Failed to unlock user pages: 0x%x\n", GetExceptionCode());
+                // this shouldn't happen and will BSOD the system when the user process exits with locked pages
+            }
+        }
+
+        IoFreeMdl(Context->Mdl);
+        Context->Mdl = NULL;
+    }
+
+    if (Context->KernelVa != NULL) {
+        __FreePoolWithTag(Context->KernelVa, XENIFACE_POOL_TAG);
+        Context->KernelVa = NULL;
+    }
+}
+
+static
+NTSTATUS
+GnttabPermitForeignAccess(
+    __in     PXENIFACE_FDO             Fdo,
+    __inout  PXENIFACE_GNTTAB_CONTEXT  Context
+    )
+{
+    NTSTATUS Status;
+    ULONG Page = 0;
+    size_t GrantsSize = 0;
+    ULONG SharedSize = 0;
+
+    Trace("> RemoteDomain %d, UserVa %p, NumberPages %lu, Flags 0x%x, Offset 0x%x, Port %d, Process %p, Id %lu\n",
+          Context->RemoteDomain, Context->UserVa, Context->NumberPages, Context->Flags,
+          Context->NotifyOffset, Context->NotifyPort, Context->Process, Context->RequestId);
+
+    // Check if the request ID/address is unique for this process.
+    // This doesn't protect us from simultaneous requests with the same ID arriving here
+    // but another check for duplicate ID is performed when the context/IRP is queued at the end.
+    // Ideally we would lock the whole section but that's not really an option since we touch user memory.
+    Status = STATUS_INVALID_PARAMETER;
+    if (FindGnttabIrp(Fdo, Context) != NULL)
+        goto fail1;
+
+    GrantsSize = Context->NumberPages * sizeof(PXENBUS_GNTTAB_ENTRY);
+    SharedSize = Context->NumberPages * PAGE_SIZE;
+    Status = STATUS_NO_MEMORY;
+    Context->Grants = __AllocatePoolWithTag(NonPagedPool, GrantsSize, XENIFACE_POOL_TAG);
+    if (Context->Grants == NULL)
+        goto fail2;
+
+    if (Context->UserVa == NULL) {
+        // sharing driver-allocated pages
+        Status = STATUS_NO_MEMORY;
+        Context->KernelVa = __AllocatePoolWithTag(NonPagedPool, SharedSize, XENIFACE_POOL_TAG);
+        if (Context->KernelVa == NULL)
+            goto fail3;
+
+        Context->Mdl = IoAllocateMdl(Context->KernelVa, SharedSize, FALSE, FALSE, NULL);
+        if (Context->Mdl == NULL)
+            goto fail4;
+
+        MmBuildMdlForNonPagedPool(Context->Mdl);
+        ASSERT(MmGetMdlByteCount(Context->Mdl) == SharedSize);
+    } else {
+        // sharing existing memory
+        Context->KernelVa = NULL;
+        Context->Mdl = IoAllocateMdl(Context->UserVa, SharedSize, FALSE, FALSE, NULL);
+        if (Context->Mdl == NULL)
+            goto fail4;
+
+        try {
+            MmProbeAndLockPages(Context->Mdl,
+                                UserMode,
+                                (Context->Flags & XENIFACE_GNTTAB_READONLY) != 0 ? IoReadAccess : IoWriteAccess);
+        } except(EXCEPTION_EXECUTE_HANDLER) {
+            Status = GetExceptionCode();
+            Error("Failed to lock user pages: 0x%x\n", Status);
+            Page = 0;
+            goto fail5;
+        }
+    }
+
+    // perform sharing
+    for (Page = 0; Page < Context->NumberPages; Page++) {
+        Status = XENBUS_GNTTAB(PermitForeignAccess,
+                               &Fdo->GnttabInterface,
+                               Fdo->GnttabCache,
+                               FALSE,
+                               Context->RemoteDomain,
+                               MmGetMdlPfnArray(Context->Mdl)[Page],
+                               (Context->Flags & XENIFACE_GNTTAB_READONLY) != 0,
+                               &(Context->Grants[Page]));
+#if DBG
+        Info("Grants[%lu] = %p\n", Page, Context->Grants[Page]);
+#endif
+        if (!NT_SUCCESS(Status))
+            goto fail5;
+    }
+
+    if (Context->KernelVa != NULL) {
+        // map driver-allocated memory into user mode
+#pragma prefast(suppress:6320) // we want to catch all exceptions
+        try {
+            Context->UserVa = MmMapLockedPagesSpecifyCache(Context->Mdl,
+                                                           UserMode,
+                                                           MmCached,
+                                                           NULL,
+                                                           FALSE,
+                                                           NormalPagePriority);
+        } except (EXCEPTION_EXECUTE_HANDLER) {
+            Status = GetExceptionCode();
+            goto fail6;
+        }
+    }
+
+    Trace("< Context %p, KernelVa %p, UserVa %p\n",
+          Context, Context->KernelVa, Context->UserVa);
+
+    return STATUS_SUCCESS;
+
+fail6:
+    Error("Fail6\n");
+
+fail5:
+    Error("Fail5\n");
+
+fail4:
+    Error("Fail4\n");
+
+fail3:
+    Error("Fail3\n");
+
+fail2:
+    Error("Fail2\n");
+
+fail1:
+    Error("Fail1\n");
+    GnttabStopSharing(Fdo, Context, Page);
+
+    if (Context != NULL) {
+        RtlZeroMemory(Context, sizeof(*Context));
+        __FreePoolWithTag(Context, XENIFACE_POOL_TAG);
+    }
+
+    return Status;
+}
+
 DECLSPEC_NOINLINE
 NTSTATUS
 IoctlGnttabPermitForeignAccess(
@@ -147,123 +323,91 @@ IoctlGnttabPermitForeignAccess(
     __inout  PIRP           Irp
     )
 {
-    NTSTATUS status;
-    PXENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_IN In;
+    NTSTATUS Status;
+    PXENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_IN In1 = NULL;
+    PXENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_IN_V2 In = NULL;
+    // XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT_V2 is the same as XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT
     PXENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT Out = Irp->UserBuffer;
-    PXENIFACE_GRANT_CONTEXT Context;
+    PXENIFACE_GNTTAB_CONTEXT Context;
     ULONG Page;
+    ULONG ControlCode = IoGetCurrentIrpStackLocation(Irp)->Parameters.DeviceIoControl.IoControlCode;
 
-    status = STATUS_INVALID_BUFFER_SIZE;
-    if (InLen != sizeof(XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_IN))
+    Status = STATUS_INVALID_BUFFER_SIZE;
+    if ((InLen != sizeof(XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_IN) && ControlCode == IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS)
+        || (InLen != sizeof(XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_IN_V2) && ControlCode == IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2))
         goto fail1;
 
     // This IOCTL uses METHOD_NEITHER so we directly access user memory.
-    status = __CaptureUserBuffer(Buffer, InLen, &In);
-    if (!NT_SUCCESS(status))
-        goto fail2;
+    if (ControlCode == IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS) {
+        // legacy IOCTL, convert the input to v2
+        Status = __CaptureUserBuffer(Buffer, InLen, &In1);
+        if (!NT_SUCCESS(Status))
+            goto fail2;
+
+        Status = STATUS_NO_MEMORY;
+        In = __AllocatePoolWithTag(NonPagedPool, sizeof(*In), XENIFACE_POOL_TAG);
+        if (!In)
+            goto fail3;
+
+        In->RemoteDomain = In1->RemoteDomain;
+        In->Address = NULL;
+        In->NumberPages = In->NumberPages;
+        In->Flags = In1->Flags;
+        In->NotifyOffset = In1->NotifyOffset;
+        In->NotifyPort = In1->NotifyPort;
+    } else {
+        Status = __CaptureUserBuffer(Buffer, InLen, &In);
+        if (!NT_SUCCESS(Status))
+            goto fail2;
+    }
 
-    status = STATUS_INVALID_PARAMETER;
-    if (In->NumberPages == 0 ||
-        In->NumberPages > 1024 * 1024) {
-        goto fail3;
+    Status = STATUS_INVALID_PARAMETER;
+    if (In->NumberPages == 0 || In->NumberPages > 1024 * 1024) {
+        goto fail4;
     }
 
     if ((In->Flags & XENIFACE_GNTTAB_USE_NOTIFY_OFFSET) &&
         (In->NotifyOffset >= In->NumberPages * PAGE_SIZE)) {
-        goto fail4;
+        goto fail5;
     }
 
-    status = STATUS_INVALID_BUFFER_SIZE;
+    Status = STATUS_INVALID_BUFFER_SIZE;
     if (OutLen != (ULONG)FIELD_OFFSET(XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT, References[In->NumberPages]))
-        goto fail5;
+        goto fail6;
 
-    status = STATUS_NO_MEMORY;
-    Context = __AllocatePoolWithTag(NonPagedPool, sizeof(XENIFACE_GRANT_CONTEXT), XENIFACE_POOL_TAG);
+    Status = STATUS_NO_MEMORY;
+    Context = __AllocatePoolWithTag(NonPagedPool, sizeof(XENIFACE_GNTTAB_CONTEXT), XENIFACE_POOL_TAG);
     if (Context == NULL)
-        goto fail6;
+        goto fail7;
 
-    RtlZeroMemory(Context, sizeof(XENIFACE_GRANT_CONTEXT));
-    Context->Id.Type = XENIFACE_CONTEXT_GRANT;
-    Context->Id.Process = PsGetCurrentProcess();
-    Context->Id.RequestId = In->RequestId;
+    Context->Type = XENIFACE_GNTTAB_CONTEXT_GRANT;
+    Context->Process = PsGetCurrentProcess();
     Context->RemoteDomain = In->RemoteDomain;
+    Context->UserVa = In->Address;
     Context->NumberPages = In->NumberPages;
     Context->Flags = In->Flags;
     Context->NotifyOffset = In->NotifyOffset;
     Context->NotifyPort = In->NotifyPort;
 
-    Trace("> RemoteDomain %d, NumberPages %lu, Flags 0x%x, Offset 0x%x, Port %d, Process %p, Id %lu\n",
-                       Context->RemoteDomain, Context->NumberPages, Context->Flags, Context->NotifyOffset, Context->NotifyPort,
-                       Context->Id.Process, Context->Id.RequestId);
-
-    // Check if the request ID is unique for this process.
-    // This doesn't protect us from simultaneous requests with the same ID arriving here
-    // but another check for duplicate ID is performed when the context/IRP is queued at the end.
-    // Ideally we would lock the whole section but that's not really an option since we touch user memory.
-    status = STATUS_INVALID_PARAMETER;
-    if (FindGnttabIrp(Fdo, &Context->Id) != NULL)
-        goto fail7;
-
-    status = STATUS_NO_MEMORY;
-    Context->Grants = __AllocatePoolWithTag(NonPagedPool, Context->NumberPages * sizeof(PXENBUS_GNTTAB_ENTRY), XENIFACE_POOL_TAG);
-    if (Context->Grants == NULL)
-        goto fail8;
-
-    RtlZeroMemory(Context->Grants, Context->NumberPages * sizeof(PXENBUS_GNTTAB_ENTRY));
-
-    // allocate memory to share
-    status = STATUS_NO_MEMORY;
-    Context->KernelVa = __AllocatePoolWithTag(NonPagedPool, Context->NumberPages * PAGE_SIZE, XENIFACE_POOL_TAG);
-    if (Context->KernelVa == NULL)
-        goto fail9;
-
-    RtlZeroMemory(Context->KernelVa, Context->NumberPages * PAGE_SIZE);
-    Context->Mdl = IoAllocateMdl(Context->KernelVa, Context->NumberPages * PAGE_SIZE, FALSE, FALSE, NULL);
-    if (Context->Mdl == NULL)
-        goto fail10;
-
-    MmBuildMdlForNonPagedPool(Context->Mdl);
-    ASSERT(MmGetMdlByteCount(Context->Mdl) == Context->NumberPages * PAGE_SIZE);
-
-    // perform sharing
-    for (Page = 0; Page < Context->NumberPages; Page++) {
-        status = XENBUS_GNTTAB(PermitForeignAccess,
-                               &Fdo->GnttabInterface,
-                               Fdo->GnttabCache,
-                               FALSE,
-                               Context->RemoteDomain,
-                               MmGetMdlPfnArray(Context->Mdl)[Page],
-                               (Context->Flags & XENIFACE_GNTTAB_READONLY) != 0,
-                               &(Context->Grants[Page]));
-
-// prefast somehow thinks that this call can modify Page...
-#pragma prefast(suppress:6385)
-        Info("Grants[%lu] = %p\n", Page, Context->Grants[Page]);
-        if (!NT_SUCCESS(status))
-            goto fail11;
-    }
-
-    // map into user mode
-#pragma prefast(suppress:6320) // we want to catch all exceptions
-    __try {
-        Context->UserVa = MmMapLockedPagesSpecifyCache(Context->Mdl,
-                                                       UserMode,
-                                                       MmCached,
-                                                       NULL,
-                                                       FALSE,
-                                                       NormalPagePriority);
-    }
-    __except (EXCEPTION_EXECUTE_HANDLER) {
-        status = GetExceptionCode();
-        goto fail12;
+    __FreeCapturedBuffer(In);
+    In = NULL;
+
+    if (ControlCode == IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS) {
+        Context->UseRequestId = TRUE;
+        Context->RequestId = In1->RequestId;
+        __FreeCapturedBuffer(In1);
+        In1 = NULL;
+    } else {
+        Context->UseRequestId = FALSE;
+        Context->RequestId = 0;
     }
 
-    status = STATUS_UNSUCCESSFUL;
-    if (Context->UserVa == NULL)
-        goto fail13;
+    Status = GnttabPermitForeignAccess(Fdo, Context);
+    if (!NT_SUCCESS(Status))
+        goto fail8;
 
     Trace("< Context %p, Irp %p, KernelVa %p, UserVa %p\n",
-                       Context, Irp, Context->KernelVa, Context->UserVa);
+          Context, Irp, Context->KernelVa, Context->UserVa);
 
     // Pass the result to user mode.
 #pragma prefast(suppress: 6320) // we want to catch all exceptions
@@ -277,64 +421,34 @@ IoctlGnttabPermitForeignAccess(
                                                   Context->Grants[Page]);
         }
     } except(EXCEPTION_EXECUTE_HANDLER) {
-        status = GetExceptionCode();
-        Error("Exception 0x%lx while probing/writing output buffer at %p, size 0x%lx\n", status, Out, OutLen);
-        goto fail14;
+        Status = GetExceptionCode();
+        Error("Exception 0x%lx while probing/writing output buffer at %p, size 0x%lx\n", Status, Out, OutLen);
+        goto fail9;
     }
 
     // Insert the IRP/context into the pending queue.
-    // This also checks (again) if the request ID is unique for the calling process.
-    Irp->Tail.Overlay.DriverContext[0] = &Context->Id;
-    status = IoCsqInsertIrpEx(&Fdo->IrpQueue, Irp, NULL, &Context->Id);
-    if (!NT_SUCCESS(status))
-        goto fail15;
-
-    __FreeCapturedBuffer(In);
+    // This also checks (again) if the request ID/address is unique for the calling process.
+    Irp->Tail.Overlay.DriverContext[0] = Context;
+    Status = IoCsqInsertIrpEx(&Fdo->IrpQueue, Irp, NULL, Context);
+    if (!NT_SUCCESS(Status))
+        goto fail10;
 
     return STATUS_PENDING;
 
-fail15:
-    Error("Fail15\n");
-
-fail14:
-    Error("Fail14\n");
-    MmUnmapLockedPages(Context->UserVa, Context->Mdl);
-
-fail13:
-    Error("Fail13\n");
-
-fail12:
-    Error("Fail12\n");
-
-fail11:
-    Error("Fail11: Page = %lu\n", Page);
-
-    while (Page > 0) {
-        ASSERT(NT_SUCCESS(XENBUS_GNTTAB(RevokeForeignAccess,
-                                        &Fdo->GnttabInterface,
-                                        Fdo->GnttabCache,
-                                        FALSE,
-                                        Context->Grants[Page - 1])));
-
-        --Page;
-    }
-    IoFreeMdl(Context->Mdl);
-
 fail10:
     Error("Fail10\n");
-    __FreePoolWithTag(Context->KernelVa, XENIFACE_POOL_TAG);
 
 fail9:
     Error("Fail9\n");
-    __FreePoolWithTag(Context->Grants, XENIFACE_POOL_TAG);
+    GnttabStopSharing(Fdo, Context, Context->NumberPages);
 
 fail8:
     Error("Fail8\n");
+    RtlZeroMemory(Context, sizeof(*Context));
+    __FreePoolWithTag(Context, XENIFACE_POOL_TAG);
 
 fail7:
     Error("Fail7\n");
-    RtlZeroMemory(Context, sizeof(XENIFACE_GRANT_CONTEXT));
-    __FreePoolWithTag(Context, XENIFACE_POOL_TAG);
 
 fail6:
     Error("Fail6\n");
@@ -344,33 +458,34 @@ fail5:
 
 fail4:
     Error("Fail4\n");
+    __FreeCapturedBuffer(In);
 
 fail3:
     Error("Fail3\n");
-    __FreeCapturedBuffer(In);
+    __FreeCapturedBuffer(In1); // NULL-safe
 
 fail2:
     Error("Fail2\n");
 
 fail1:
-    Error("Fail1 (%08x)\n", status);
-    return status;
+    Error("Fail1 (%08x)\n", Status);
+    return Status;
 }
 
 _IRQL_requires_max_(APC_LEVEL)
 VOID
 GnttabFreeGrant(
-    __in     PXENIFACE_FDO            Fdo,
-    __inout  PXENIFACE_GRANT_CONTEXT  Context
+    __in     PXENIFACE_FDO             Fdo,
+    __inout  PXENIFACE_GNTTAB_CONTEXT  Context
 )
 {
     NTSTATUS status;
-    ULONG Page;
-
-    ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
 
     Trace("Context %p\n", Context);
 
+    ASSERT(Context->Type == XENIFACE_GNTTAB_CONTEXT_GRANT);
+    ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
+
     if (Context->Flags & XENIFACE_GNTTAB_USE_NOTIFY_OFFSET) {
         ((PCHAR)Context->KernelVa)[Context->NotifyOffset] = 0;
     }
@@ -382,67 +497,56 @@ GnttabFreeGrant(
             Error("failed to notify port %lu: 0x%x\n", Context->NotifyPort, status);
     }
 
-    // unmap from user address space
-    MmUnmapLockedPages(Context->UserVa, Context->Mdl);
+    GnttabStopSharing(Fdo, Context, Context->NumberPages);
 
-    // stop sharing
-    for (Page = 0; Page < Context->NumberPages; Page++) {
-        status = XENBUS_GNTTAB(RevokeForeignAccess,
-                               &Fdo->GnttabInterface,
-                               Fdo->GnttabCache,
-                               FALSE,
-                               Context->Grants[Page]);
-
-        ASSERT(NT_SUCCESS(status)); // failure here is fatal, something must've gone catastrophically wrong
-    }
-
-    IoFreeMdl(Context->Mdl);
-
-    RtlZeroMemory(Context->KernelVa, Context->NumberPages * PAGE_SIZE);
-    __FreePoolWithTag(Context->KernelVa, XENIFACE_POOL_TAG);
-
-    RtlZeroMemory(Context->Grants, Context->NumberPages * sizeof(PXENBUS_GNTTAB_ENTRY));
-    __FreePoolWithTag(Context->Grants, XENIFACE_POOL_TAG);
-
-    RtlZeroMemory(Context, sizeof(XENIFACE_GRANT_CONTEXT));
+    RtlZeroMemory(Context, sizeof(*Context));
     __FreePoolWithTag(Context, XENIFACE_POOL_TAG);
 }
 
 DECLSPEC_NOINLINE
 NTSTATUS
 IoctlGnttabRevokeForeignAccess(
-    __in  PXENIFACE_FDO     Fdo,
-    __in  PVOID             Buffer,
-    __in  ULONG             InLen,
-    __in  ULONG             OutLen
+    __in  PXENIFACE_FDO  Fdo,
+    __in  PVOID          Buffer,
+    __in  ULONG          InLen,
+    __in  ULONG          OutLen,
+    __in  ULONG          ControlCode
     )
 {
-    NTSTATUS status;
-    PXENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN In = Buffer;
-    PXENIFACE_GRANT_CONTEXT Context = NULL;
-    XENIFACE_CONTEXT_ID Id;
+    NTSTATUS Status;
+    XENIFACE_GNTTAB_CONTEXT SeekContext;
     PIRP PendingIrp;
-    PXENIFACE_CONTEXT_ID ContextId;
+    PXENIFACE_GNTTAB_CONTEXT Context = NULL;
 
     UNREFERENCED_PARAMETER(OutLen);
 
-    status = STATUS_INVALID_BUFFER_SIZE;
-    if (InLen != sizeof(XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN))
-        goto fail1;
+    Status = STATUS_INVALID_BUFFER_SIZE;
 
-    Id.Type = XENIFACE_CONTEXT_GRANT;
-    Id.Process = PsGetCurrentProcess();
-    Id.RequestId = In->RequestId;
+    SeekContext.Type = XENIFACE_GNTTAB_CONTEXT_GRANT;
+    SeekContext.Process = PsGetCurrentProcess();
 
-    Trace("> Process %p, Id %lu\n", Id.Process, Id.RequestId);
+    if (ControlCode == IOCTL_XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS) {
+        if (InLen != sizeof(XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN))
+            goto fail1;
 
-    status = STATUS_NOT_FOUND;
-    PendingIrp = IoCsqRemoveNextIrp(&Fdo->IrpQueue, &Id);
+        SeekContext.UseRequestId = TRUE;
+        SeekContext.RequestId = ((PXENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN)Buffer)->RequestId;
+        Trace("> Process %p, Id %lu\n", SeekContext.Process, SeekContext.RequestId);
+    } else {
+        if (InLen != sizeof(XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN_V2))
+            goto fail1;
+
+        SeekContext.UseRequestId = FALSE;
+        SeekContext.UserVa = ((PXENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN_V2)Buffer)->Address;
+        Trace("> Process %p, Address %p\n", SeekContext.Process, SeekContext.UserVa);
+    }
+
+    Status = STATUS_NOT_FOUND;
+    PendingIrp = IoCsqRemoveNextIrp(&Fdo->IrpQueue, &SeekContext);
     if (PendingIrp == NULL)
         goto fail2;
 
-    ContextId = PendingIrp->Tail.Overlay.DriverContext[0];
-    Context = CONTAINING_RECORD(ContextId, XENIFACE_GRANT_CONTEXT, Id);
+    Context = PendingIrp->Tail.Overlay.DriverContext[0];
     GnttabFreeGrant(Fdo, Context);
 
     PendingIrp->IoStatus.Status = STATUS_SUCCESS;
@@ -455,67 +559,103 @@ fail2:
     Error("Fail2\n");
 
 fail1:
-    Error("Fail1 (%08x)\n", status);
-    return status;
+    Error("Fail1 (%08x)\n", Status);
+    return Status;
 }
 
 DECLSPEC_NOINLINE
 NTSTATUS
 IoctlGnttabMapForeignPages(
-    __in     PXENIFACE_FDO     Fdo,
-    __in     PVOID             Buffer,
-    __in     ULONG             InLen,
-    __in     ULONG             OutLen,
-    __inout  PIRP              Irp
+    __in     PXENIFACE_FDO  Fdo,
+    __in     PVOID          Buffer,
+    __in     ULONG          InLen,
+    __in     ULONG          OutLen,
+    __inout  PIRP           Irp
     )
 {
     NTSTATUS status;
-    PXENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN In = Buffer;
+    PXENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN In1 = NULL;
+    PXENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN_V2 In = NULL;
+    // XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT_V2 is the same as XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT
     PXENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT Out = Irp->UserBuffer;
     ULONG NumberPages;
-    ULONG PageIndex;
-    PXENIFACE_MAP_CONTEXT Context;
+    PXENIFACE_GNTTAB_CONTEXT Context;
+    ULONG ControlCode = IoGetCurrentIrpStackLocation(Irp)->Parameters.DeviceIoControl.IoControlCode;
 
-    status = STATUS_INVALID_BUFFER_SIZE;
-    if (InLen < sizeof(XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN) ||
-        OutLen != sizeof(XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT)) {
+    ASSERT(ControlCode == IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES || ControlCode == IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_V2);
+
+    status = STATUS_NO_MEMORY;
+    Context = __AllocatePoolWithTag(NonPagedPool, sizeof(*Context), XENIFACE_POOL_TAG);
+    if (Context == NULL)
         goto fail1;
-    }
 
-    // This IOCTL uses METHOD_NEITHER so we directly access user memory.
+    Context->Type = XENIFACE_GNTTAB_CONTEXT_MAP;
+    Context->Process = PsGetCurrentProcess();
 
-    // Calculate the expected number of pages based on input buffer size.
-    NumberPages = (InLen - (ULONG)FIELD_OFFSET(XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN, References)) / sizeof(In->References[0]);
+    // This IOCTL uses METHOD_NEITHER so we directly access user memory.
+    if (ControlCode == IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES) {
+        status = STATUS_INVALID_BUFFER_SIZE;
+        if (InLen < sizeof(XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN)
+            || OutLen != sizeof(XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT))
+            goto fail2;
+
+        In1 = Buffer;
+        NumberPages = (InLen - (ULONG)FIELD_OFFSET(XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN, References)) / sizeof(ULONG);
+        status = __CaptureUserBuffer(Buffer, InLen, &In1);
+        if (!NT_SUCCESS(status))
+            goto fail3;
+
+        Context->UseRequestId = TRUE;
+        Context->RequestId = In1->RequestId;
+
+        // legacy IOCTL, convert the input to v2
+        status = STATUS_NO_MEMORY;
+        In = __AllocatePoolWithTag(NonPagedPool, sizeof(*In), XENIFACE_POOL_TAG);
+        if (In == NULL)
+            goto fail4;
+
+        In->RemoteDomain = In1->RemoteDomain;
+        In->NumberPages = In1->NumberPages;
+        In->NotifyOffset = In1->NotifyOffset;
+        In->NotifyPort = In1->NotifyPort;
+        In->Flags = In1->Flags;
+        memcpy(&In->References, &In1->References, NumberPages * sizeof(ULONG));
+
+        __FreeCapturedBuffer(In1);
+        In1 = NULL;
+    } else {
+        status = STATUS_INVALID_BUFFER_SIZE;
+        if (InLen < sizeof(XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN_V2)
+            || OutLen != sizeof(XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT_V2))
+            goto fail2;
+
+        In = Buffer;
+        NumberPages = (InLen - (ULONG)FIELD_OFFSET(XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN_V2, References)) / sizeof(ULONG);
+        status = __CaptureUserBuffer(Buffer, InLen, &In);
+        if (!NT_SUCCESS(status))
+            goto fail3;
 
-    status = __CaptureUserBuffer(Buffer, InLen, &In);
-    if (!NT_SUCCESS(status))
-        goto fail2;
+        Context->UseRequestId = FALSE;
+        Context->RequestId = 0;
+    }
 
+    // At this point we only access In.
     status = STATUS_INVALID_PARAMETER;
     if (In->NumberPages == 0 ||
         In->NumberPages > 1024 * 1024 ||
         In->NumberPages != NumberPages) {
-        goto fail3;
+        goto fail5;
     }
 
     if ((In->Flags & XENIFACE_GNTTAB_USE_NOTIFY_OFFSET) &&
         (In->NotifyOffset >= In->NumberPages * PAGE_SIZE)) {
-        goto fail4;
+        goto fail6;
     }
 
     status = STATUS_INVALID_BUFFER_SIZE;
-    if (InLen != (ULONG)FIELD_OFFSET(XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN, References[In->NumberPages]))
-        goto fail5;
-
-    status = STATUS_NO_MEMORY;
-    Context = __AllocatePoolWithTag(NonPagedPool, sizeof(XENIFACE_MAP_CONTEXT), XENIFACE_POOL_TAG);
-    if (Context == NULL)
-        goto fail6;
+    if (InLen != (ULONG)FIELD_OFFSET(XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN_V2, References[In->NumberPages]))
+        goto fail7;
 
-    RtlZeroMemory(Context, sizeof(XENIFACE_MAP_CONTEXT));
-    Context->Id.Type = XENIFACE_CONTEXT_MAP;
-    Context->Id.Process = PsGetCurrentProcess();
-    Context->Id.RequestId = In->RequestId;
     Context->RemoteDomain = In->RemoteDomain;
     Context->NumberPages = In->NumberPages;
     Context->Flags = In->Flags;
@@ -523,15 +663,17 @@ IoctlGnttabMapForeignPages(
     Context->NotifyPort = In->NotifyPort;
 
     Trace("> RemoteDomain %d, NumberPages %lu, Flags 0x%x, Offset 0x%x, Port %d, Process %p, Id %lu\n",
-                       Context->RemoteDomain, Context->NumberPages, Context->Flags, Context->NotifyOffset, Context->NotifyPort,
-                       Context->Id.Process, Context->Id.RequestId);
+          Context->RemoteDomain, Context->NumberPages, Context->Flags, Context->NotifyOffset, Context->NotifyPort,
+          Context->Process, Context->RequestId);
 
-    for (PageIndex = 0; PageIndex < In->NumberPages; PageIndex++)
+#if DBG
+    for (ULONG PageIndex = 0; PageIndex < In->NumberPages; PageIndex++)
         Info("> Ref %d\n", In->References[PageIndex]);
+#endif
 
     status = STATUS_INVALID_PARAMETER;
-    if (FindGnttabIrp(Fdo, &Context->Id) != NULL)
-        goto fail7;
+    if (FindGnttabIrp(Fdo, Context) != NULL)
+        goto fail8;
 
     status = XENBUS_GNTTAB(MapForeignPages,
                            &Fdo->GnttabInterface,
@@ -542,41 +684,36 @@ IoctlGnttabMapForeignPages(
                            &Context->Address);
 
     if (!NT_SUCCESS(status))
-        goto fail8;
+        goto fail9;
 
-    status = STATUS_NO_MEMORY;
+    status = STATUS_INSUFFICIENT_VIRTUAL_ADDR_RESOURCES;
     Context->KernelVa = MmMapIoSpace(Context->Address, Context->NumberPages * PAGE_SIZE, MmCached);
     if (Context->KernelVa == NULL)
-        goto fail9;
+        goto fail10;
 
     status = STATUS_NO_MEMORY;
     Context->Mdl = IoAllocateMdl(Context->KernelVa, Context->NumberPages * PAGE_SIZE, FALSE, FALSE, NULL);
     if (Context->Mdl == NULL)
-        goto fail10;
+        goto fail11;
 
     MmBuildMdlForNonPagedPool(Context->Mdl);
 
     // map into user mode
 #pragma prefast(suppress: 6320) // we want to catch all exceptions
-    __try {
+    try {
         Context->UserVa = MmMapLockedPagesSpecifyCache(Context->Mdl,
                                                        UserMode,
                                                        MmCached,
                                                        NULL,
                                                        FALSE,
                                                        NormalPagePriority);
-    }
-    __except (EXCEPTION_EXECUTE_HANDLER) {
+    } except (EXCEPTION_EXECUTE_HANDLER) {
         status = GetExceptionCode();
-        goto fail11;
-    }
-
-    status = STATUS_UNSUCCESSFUL;
-    if (Context->UserVa == NULL)
         goto fail12;
+    }
 
     Trace("< Context %p, Irp %p, Address %p, KernelVa %p, UserVa %p\n",
-                       Context, Irp, Context->Address, Context->KernelVa, Context->UserVa);
+          Context, Irp, Context->Address, Context->KernelVa, Context->UserVa);
 
     // Pass the result to user mode.
 #pragma prefast(suppress: 6320) // we want to catch all exceptions
@@ -591,8 +728,8 @@ IoctlGnttabMapForeignPages(
 
     // Insert the IRP/context into the pending queue.
     // This also checks (again) if the request ID is unique for the calling process.
-    Irp->Tail.Overlay.DriverContext[0] = &Context->Id;
-    status = IoCsqInsertIrpEx(&Fdo->IrpQueue, Irp, NULL, &Context->Id);
+    Irp->Tail.Overlay.DriverContext[0] = Context;
+    status = IoCsqInsertIrpEx(&Fdo->IrpQueue, Irp, NULL, Context);
     if (!NT_SUCCESS(status))
         goto fail14;
 
@@ -609,45 +746,46 @@ fail13:
 
 fail12:
     Error("Fail12\n");
+    IoFreeMdl(Context->Mdl);
 
 fail11:
     Error("Fail11\n");
-    IoFreeMdl(Context->Mdl);
+    MmUnmapIoSpace(Context->KernelVa, Context->NumberPages * PAGE_SIZE);
 
 fail10:
     Error("Fail10\n");
-    MmUnmapIoSpace(Context->KernelVa, Context->NumberPages * PAGE_SIZE);
-
-fail9:
-    Error("Fail9\n");
     ASSERT(NT_SUCCESS(XENBUS_GNTTAB(UnmapForeignPages,
                                     &Fdo->GnttabInterface,
                                     Context->Address
                                     )));
 
+fail9:
+    Error("Fail9\n");
+
 fail8:
     Error("Fail8\n");
 
 fail7:
     Error("Fail7\n");
-    RtlZeroMemory(Context, sizeof(XENIFACE_MAP_CONTEXT));
-    __FreePoolWithTag(Context, XENIFACE_POOL_TAG);
 
 fail6:
     Error("Fail6\n");
 
 fail5:
     Error("Fail5\n");
+    __FreeCapturedBuffer(In);
 
 fail4:
     Error("Fail4\n");
+    __FreeCapturedBuffer(In1);
 
 fail3:
     Error("Fail3\n");
-    __FreeCapturedBuffer(In);
 
 fail2:
     Error("Fail2\n");
+    RtlZeroMemory(Context, sizeof(*Context));
+    __FreePoolWithTag(Context, XENIFACE_POOL_TAG);
 
 fail1:
     Error("Fail1 (%08x)\n", status);
@@ -658,12 +796,13 @@ _IRQL_requires_max_(APC_LEVEL)
 DECLSPEC_NOINLINE
 VOID
 GnttabFreeMap(
-    __in     PXENIFACE_FDO            Fdo,
-    __inout  PXENIFACE_MAP_CONTEXT    Context
+    __in     PXENIFACE_FDO             Fdo,
+    __inout  PXENIFACE_GNTTAB_CONTEXT  Context
     )
 {
     NTSTATUS status;
 
+    ASSERT(Context->Type == XENIFACE_GNTTAB_CONTEXT_MAP);
     ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
 
     Trace("Context %p\n", Context);
@@ -694,45 +833,61 @@ GnttabFreeMap(
 
     ASSERT(NT_SUCCESS(status));
 
-    RtlZeroMemory(Context, sizeof(XENIFACE_MAP_CONTEXT));
+    RtlZeroMemory(Context, sizeof(*Context));
     __FreePoolWithTag(Context, XENIFACE_POOL_TAG);
 }
 
 DECLSPEC_NOINLINE
 NTSTATUS
 IoctlGnttabUnmapForeignPages(
-    __in  PXENIFACE_FDO     Fdo,
-    __in  PVOID             Buffer,
-    __in  ULONG             InLen,
-    __in  ULONG             OutLen
+    __in  PXENIFACE_FDO  Fdo,
+    __in  PVOID          Buffer,
+    __in  ULONG          InLen,
+    __in  ULONG          OutLen,
+    __in  ULONG          ControlCode
     )
 {
     NTSTATUS status;
-    PXENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN In = Buffer;
-    PXENIFACE_MAP_CONTEXT Context = NULL;
-    XENIFACE_CONTEXT_ID Id;
+    XENIFACE_GNTTAB_CONTEXT SeekContext;
+    PXENIFACE_GNTTAB_CONTEXT Context;
     PIRP PendingIrp;
-    PXENIFACE_CONTEXT_ID ContextId;
 
-    status = STATUS_INVALID_BUFFER_SIZE;
-    if (InLen != sizeof(XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN) ||
-        OutLen != 0) {
-        goto fail1;
-    }
+    ASSERT(ControlCode == IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES
+        || ControlCode == IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_V2);
+
+    SeekContext.Type = XENIFACE_GNTTAB_CONTEXT_MAP;
+    SeekContext.Process = PsGetCurrentProcess();
+
+    if (ControlCode == IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES) {
+        status = STATUS_INVALID_BUFFER_SIZE;
+        if (InLen != sizeof(XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN) || OutLen != 0) {
+            goto fail1;
+        }
 
-    Id.Type = XENIFACE_CONTEXT_MAP;
-    Id.Process = PsGetCurrentProcess();
-    Id.RequestId = In->RequestId;
+        PXENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN In = Buffer;
+        SeekContext.UseRequestId = TRUE;
+        SeekContext.RequestId = In->RequestId;
 
-    Trace("> Process %p, Id %lu\n", Id.Process, Id.RequestId);
+        Trace("> Process %p, Id %lu\n", SeekContext.Process, SeekContext.RequestId);
+    } else {
+        status = STATUS_INVALID_BUFFER_SIZE;
+        if (InLen != sizeof(XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN_V2) || OutLen != 0) {
+            goto fail1;
+        }
+
+        PXENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN_V2 In = Buffer;
+        SeekContext.UseRequestId = FALSE;
+        SeekContext.UserVa = In->Address;
+
+        Trace("> Process %p, UserVa %p\n", SeekContext.Process, SeekContext.UserVa);
+    }
 
     status = STATUS_NOT_FOUND;
-    PendingIrp = IoCsqRemoveNextIrp(&Fdo->IrpQueue, &Id);
+    PendingIrp = IoCsqRemoveNextIrp(&Fdo->IrpQueue, &SeekContext);
     if (PendingIrp == NULL)
         goto fail2;
 
-    ContextId = PendingIrp->Tail.Overlay.DriverContext[0];
-    Context = CONTAINING_RECORD(ContextId, XENIFACE_MAP_CONTEXT, Id);
+    Context = PendingIrp->Tail.Overlay.DriverContext[0];
     GnttabFreeMap(Fdo, Context);
 
     PendingIrp->IoStatus.Status = STATUS_SUCCESS;
diff --git a/src/xeniface/ioctls.c b/src/xeniface/ioctls.c
index 479f0f6..6282e77 100644
--- a/src/xeniface/ioctls.c
+++ b/src/xeniface/ioctls.c
@@ -151,7 +151,7 @@ fail1:
 _IRQL_requires_(PASSIVE_LEVEL) // EvtchnFree calls KeFlushQueuedDpcs
 VOID
 XenIfaceCleanup(
-    __in  PXENIFACE_FDO Fdo,
+    __in      PXENIFACE_FDO Fdo,
     __in_opt  PFILE_OBJECT  FileObject
     )
 {
@@ -247,12 +247,13 @@ XenIfaceIoctl(
     PVOID               Buffer = Irp->AssociatedIrp.SystemBuffer;
     ULONG               InLen = Stack->Parameters.DeviceIoControl.InputBufferLength;
     ULONG               OutLen = Stack->Parameters.DeviceIoControl.OutputBufferLength;
+    ULONG               ControlCode = Stack->Parameters.DeviceIoControl.IoControlCode;
 
     status = STATUS_DEVICE_NOT_READY;
     if (Fdo->InterfacesAcquired == FALSE)
         goto done;
 
-    switch (Stack->Parameters.DeviceIoControl.IoControlCode) {
+    switch (ControlCode) {
         // store
     case IOCTL_XENIFACE_STORE_READ:
         status = IoctlStoreRead(Fdo, (PCHAR)Buffer, InLen, OutLen, &Irp->IoStatus.Information);
@@ -308,16 +309,32 @@ XenIfaceIoctl(
         status = IoctlGnttabPermitForeignAccess(Fdo, Stack->Parameters.DeviceIoControl.Type3InputBuffer, InLen, OutLen, Irp);
         break;
 
+    case IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2: // this is a METHOD_NEITHER IOCTL
+        status = IoctlGnttabPermitForeignAccess(Fdo, Stack->Parameters.DeviceIoControl.Type3InputBuffer, InLen, OutLen, Irp);
+        break;
+
     case IOCTL_XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS:
-        status = IoctlGnttabRevokeForeignAccess(Fdo, Buffer, InLen, OutLen);
+        status = IoctlGnttabRevokeForeignAccess(Fdo, Buffer, InLen, OutLen, ControlCode);
+        break;
+
+    case IOCTL_XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_V2:
+        status = IoctlGnttabRevokeForeignAccess(Fdo, Buffer, InLen, OutLen, ControlCode);
         break;
 
     case IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES: // this is a METHOD_NEITHER IOCTL
         status = IoctlGnttabMapForeignPages(Fdo, Stack->Parameters.DeviceIoControl.Type3InputBuffer, InLen, OutLen, Irp);
         break;
 
+    case IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_V2: // this is a METHOD_NEITHER IOCTL
+        status = IoctlGnttabMapForeignPages(Fdo, Stack->Parameters.DeviceIoControl.Type3InputBuffer, InLen, OutLen, Irp);
+        break;
+
     case IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES:
-        status = IoctlGnttabUnmapForeignPages(Fdo, Buffer, InLen, OutLen);
+        status = IoctlGnttabUnmapForeignPages(Fdo, Buffer, InLen, OutLen, ControlCode);
+        break;
+
+    case IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_V2:
+        status = IoctlGnttabUnmapForeignPages(Fdo, Buffer, InLen, OutLen, ControlCode);
         break;
 
         // suspend
diff --git a/src/xeniface/ioctls.h b/src/xeniface/ioctls.h
index 09946fd..b4c8de2 100644
--- a/src/xeniface/ioctls.h
+++ b/src/xeniface/ioctls.h
@@ -36,17 +36,6 @@
 
 #include "xeniface_ioctls.h"
 
-typedef enum _XENIFACE_CONTEXT_TYPE {
-    XENIFACE_CONTEXT_GRANT = 1,
-    XENIFACE_CONTEXT_MAP
-} XENIFACE_CONTEXT_TYPE;
-
-typedef struct _XENIFACE_CONTEXT_ID {
-    XENIFACE_CONTEXT_TYPE  Type;
-    ULONG                  RequestId;
-    PEPROCESS              Process;
-} XENIFACE_CONTEXT_ID, *PXENIFACE_CONTEXT_ID;
-
 typedef struct _XENIFACE_STORE_CONTEXT {
     LIST_ENTRY             Entry;
     PCHAR                  Path;
@@ -72,33 +61,33 @@ typedef struct _XENIFACE_SUSPEND_CONTEXT {
     PVOID                   FileObject;
 } XENIFACE_SUSPEND_CONTEXT, *PXENIFACE_SUSPEND_CONTEXT;
 
-typedef struct _XENIFACE_GRANT_CONTEXT {
-    XENIFACE_CONTEXT_ID        Id;
-    LIST_ENTRY                 Entry;
-    PXENBUS_GNTTAB_ENTRY       *Grants;
-    USHORT                     RemoteDomain;
-    ULONG                      NumberPages;
-    XENIFACE_GNTTAB_PAGE_FLAGS Flags;
-    ULONG                      NotifyOffset;
-    ULONG                      NotifyPort;
-    PVOID                      KernelVa;
-    PVOID                      UserVa;
-    PMDL                       Mdl;
-} XENIFACE_GRANT_CONTEXT, *PXENIFACE_GRANT_CONTEXT;
-
-typedef struct _XENIFACE_MAP_CONTEXT {
-    XENIFACE_CONTEXT_ID        Id;
-    LIST_ENTRY                 Entry;
-    USHORT                     RemoteDomain;
-    ULONG                      NumberPages;
-    XENIFACE_GNTTAB_PAGE_FLAGS Flags;
-    ULONG                      NotifyOffset;
-    ULONG                      NotifyPort;
-    PHYSICAL_ADDRESS           Address;
-    PVOID                      KernelVa;
-    PVOID                      UserVa;
-    PMDL                       Mdl;
-} XENIFACE_MAP_CONTEXT, *PXENIFACE_MAP_CONTEXT;
+typedef enum _XENIFACE_GNTTAB_CONTEXT_TYPE {
+    XENIFACE_GNTTAB_CONTEXT_GRANT = 1,
+    XENIFACE_GNTTAB_CONTEXT_MAP
+} XENIFACE_GNTTAB_CONTEXT_TYPE;
+
+#pragma warning(push)
+#pragma warning(disable:4201) // nonstandard extension used: nameless struct/union
+typedef struct _XENIFACE_GNTTAB_CONTEXT {
+    LIST_ENTRY                   Entry;
+    XENIFACE_GNTTAB_CONTEXT_TYPE Type;
+    BOOLEAN                      UseRequestId; // true for legacy IOCTLs
+    ULONG                        RequestId;
+    PEPROCESS                    Process;
+    USHORT                       RemoteDomain;
+    ULONG                        NumberPages;
+    XENIFACE_GNTTAB_PAGE_FLAGS   Flags;
+    ULONG                        NotifyOffset;
+    ULONG                        NotifyPort;
+    union {
+        PXENBUS_GNTTAB_ENTRY     *Grants; // permit
+        PHYSICAL_ADDRESS         Address; // map
+    };
+    PVOID                        KernelVa;
+    PVOID                        UserVa;
+    PMDL                         Mdl;
+} XENIFACE_GNTTAB_CONTEXT, *PXENIFACE_GNTTAB_CONTEXT;
+#pragma warning(pop)
 
 NTSTATUS
 __CaptureUserBuffer(
@@ -295,7 +284,8 @@ IoctlGnttabRevokeForeignAccess(
     __in  PXENIFACE_FDO     Fdo,
     __in  PVOID             Buffer,
     __in  ULONG             InLen,
-    __in  ULONG             OutLen
+    __in  ULONG             OutLen,
+    __in  ULONG             ControlCode
     );
 
 DECLSPEC_NOINLINE
@@ -314,7 +304,8 @@ IoctlGnttabUnmapForeignPages(
     __in  PXENIFACE_FDO     Fdo,
     __in  PVOID             Buffer,
     __in  ULONG             InLen,
-    __in  ULONG             OutLen
+    __in  ULONG             OutLen,
+    __in  ULONG             ControlCode
     );
 
 _Acquires_exclusive_lock_(((PXENIFACE_FDO)Argument)->GnttabCacheLock)
@@ -342,14 +333,14 @@ _IRQL_requires_max_(APC_LEVEL)
 VOID
 GnttabFreeGrant(
     __in     PXENIFACE_FDO Fdo,
-    __inout  PXENIFACE_GRANT_CONTEXT Context
+    __inout  PXENIFACE_GNTTAB_CONTEXT Context
     );
 
 _IRQL_requires_max_(APC_LEVEL)
 VOID
 GnttabFreeMap(
     __in     PXENIFACE_FDO Fdo,
-    __inout  PXENIFACE_MAP_CONTEXT Context
+    __inout  PXENIFACE_GNTTAB_CONTEXT Context
     );
 
 NTSTATUS
diff --git a/src/xeniface/irp_queue.c b/src/xeniface/irp_queue.c
index 37191bc..dcc5ba0 100644
--- a/src/xeniface/irp_queue.c
+++ b/src/xeniface/irp_queue.c
@@ -40,14 +40,14 @@ NTSTATUS
 CsqInsertIrpEx(
     _In_  PIO_CSQ Csq,
     _In_  PIRP    Irp,
-    _In_  PVOID   InsertContext // PXENIFACE_CONTEXT_ID
+    _In_  PVOID   InsertContext // PXENIFACE_GNTTAB_CONTEXT
     )
 {
     PXENIFACE_FDO Fdo;
 
     Fdo = CONTAINING_RECORD(Csq, XENIFACE_FDO, IrpQueue);
 
-    // Fail if a request with the same ID already exists.
+    // Fail if a request with the same ID/address already exists.
     if (CsqPeekNextIrp(Csq, NULL, InsertContext) != NULL)
         return STATUS_INVALID_PARAMETER;
 
@@ -70,16 +70,16 @@ PIRP
 CsqPeekNextIrp(
     _In_      PIO_CSQ Csq,
     _In_opt_  PIRP    Irp,
-    _In_opt_  PVOID   PeekContext // PXENIFACE_CONTEXT_ID
+    _In_opt_  PVOID   PeekContext // PXENIFACE_GNTTAB_CONTEXT
     )
 {
-    PXENIFACE_FDO        Fdo;
-    PIRP                 NextIrp = NULL;
-    PLIST_ENTRY          Head, NextEntry;
-    PXENIFACE_CONTEXT_ID Id, TargetId;
+    PXENIFACE_FDO            Fdo;
+    PIRP                     NextIrp = NULL;
+    PLIST_ENTRY              Head, NextEntry;
+    PXENIFACE_GNTTAB_CONTEXT Context, TargetContext;
 
     Fdo = CONTAINING_RECORD(Csq, XENIFACE_FDO, IrpQueue);
-    TargetId = PeekContext;
+    TargetContext = PeekContext;
     Head = &Fdo->IrpList;
 
     // If the IRP is NULL, we will start peeking from the list head,
@@ -96,8 +96,15 @@ CsqPeekNextIrp(
         NextIrp = CONTAINING_RECORD(NextEntry, IRP, Tail.Overlay.ListEntry);
 
         if (PeekContext) {
-            Id = NextIrp->Tail.Overlay.DriverContext[0];
-            if (Id->RequestId == TargetId->RequestId && Id->Process == TargetId->Process)
+            Context = NextIrp->Tail.Overlay.DriverContext[0];
+
+            BOOL Match = TargetContext->Type == Context->Type;
+            if (TargetContext->UseRequestId)
+                Match = Match && (TargetContext->RequestId == Context->RequestId);
+            else
+                Match = Match && (TargetContext->UserVa == Context->UserVa);
+
+            if (Match)
                 break;
         } else {
             break;
diff --git a/src/xeniface/irp_queue.h b/src/xeniface/irp_queue.h
index 6b0e28f..04b9877 100644
--- a/src/xeniface/irp_queue.h
+++ b/src/xeniface/irp_queue.h
@@ -51,7 +51,7 @@ PIRP
 CsqPeekNextIrp(
     _In_      PIO_CSQ Csq,
     _In_opt_  PIRP    Irp,
-    _In_opt_  PVOID   PeekContext // PXENIFACE_CONTEXT_ID
+    _In_opt_  PVOID   PeekContext // PXENIFACE_GNTTAB_CONTEXT
     );
 
 _IRQL_raises_(DISPATCH_LEVEL)
-- 
2.40.1.windows.1



From win-pv-devel-bounces@lists.xenproject.org Tue Dec 12 09:39:54 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 12 Dec 2023 09:39:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.652797.1018862 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rCzF4-0003eb-Ay; Tue, 12 Dec 2023 09:39:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 652797.1018862; Tue, 12 Dec 2023 09:39:54 +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 1rCzF4-0003eT-7w; Tue, 12 Dec 2023 09:39:54 +0000
Received: by outflank-mailman (input) for mailman id 652797;
 Tue, 12 Dec 2023 09:39: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=HVvx=HX=invisiblethingslab.com=omeg@srs-se1.protection.inumbo.net>)
 id 1rCzF2-00036s-JV
 for win-pv-devel@lists.xenproject.org; Tue, 12 Dec 2023 09:39:52 +0000
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com
 [64.147.123.24]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id 652970c2-98d2-11ee-98e8-6d05b1d4d9a1;
 Tue, 12 Dec 2023 10:39:51 +0100 (CET)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.west.internal (Postfix) with ESMTP id A83F33200A3B;
 Tue, 12 Dec 2023 04:39:49 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Tue, 12 Dec 2023 04:39:49 -0500
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 12 Dec 2023 04:39:48 -0500 (EST)
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: 652970c2-98d2-11ee-98e8-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	invisiblethingslab.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:from:from:in-reply-to
	:in-reply-to:message-id:mime-version:references:reply-to:subject
	:subject:to:to; s=fm1; t=1702373989; x=1702460389; bh=mBe5CqC2Fw
	h8xkScEhnqvfS0EUzRKgfVtLY49IXqtRY=; b=mZFXtVxfbxmNSIIBG7kVFiYs9T
	RKwvyDvGUtmfsFFBBJRBtcBZiDmZwE9j5vD5Ouohd1/Cap+D/PzR4uD7tgCQSf6v
	cWGNkD5Inc40W5suKW3ONSmMtQdSqeYyLXX9XDQOFBOXvrjcpT/Smqi36GDuVNdD
	85BRiFqCGZMDk6MXXSDOZ7cUDSZLi0YLNl5t07f2UKvqWdJzQdvQpDmdb2DFokWi
	8+BOG3+gWk07L6P1lBt+Jl19OkooAbNQBg3N+ZZDi6tk+kEHjKLe93cUwcV1ryAz
	Hf+Pagckm08umpCuTYjTysJujEDrvQCe7DDf5zCCEUdwIl++TxfE5zZPKv5A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:feedback-id:feedback-id
	:from:from:in-reply-to:in-reply-to:message-id:mime-version
	:references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
	:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1702373989; x=
	1702460389; bh=mBe5CqC2Fwh8xkScEhnqvfS0EUzRKgfVtLY49IXqtRY=; b=i
	MG3RZq5OYBrp8cKfGWCVe1fMJpTuRSEG00bUme1hLtQgkzp3GTvDqB1y6MWebcqN
	u3X5YyMV5L3FXYmFmRBP8xWzXpsA11QOlWJy2cVRR5dGij2TWWyR9t/eEbIIUfzB
	fIY9atWDMv7nLfgc86brwDlFlIXUTYwHx+qWLCJcTf37rQ4xzspkQ6FhV2ViSLg7
	guFA+S63jYf+oxs7ARbiu90Pfhxs90jMBshiWDdhi6v5IGSa1PkJT194PCLZP6tI
	AxS1FglxiPuzvN86UGV/T5nrSoWpuNgNFFXgLbqm3oKpynDAtkKEE4TLz0g9QKnB
	xdKx5HaKDe14JuiogRw+w==
X-ME-Sender: <xms:ZCp4ZS-eMg9oWGM_pO21f5hYGSrOV4MJIFR0vDA9Q7R-LReRHT-XTg>
    <xme:ZCp4ZSuw9c9XHWzl9J9tHuG1G9yd4TZujcfKVk6TRnPJABQhPsFpuTYExqdXKHMB4
    KTAZCjQfIAn5nc>
X-ME-Received: <xmr:ZCp4ZYD85vB_bI9RiSEqxYnndCZItX52zafWgjjGk5TNgK8x6Os-OxZzYy6EcQp2pcuVxMxJAuPg_Db7cSFeCOrthQqwNJ-vHJL08h2j79o>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelgedgtdehucetufdoteggodetrfdotf
    fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
    uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesth
    ekredtredtjeenucfhrhhomheptfgrfhgrlhcuhghojhguhihlrgcuoehomhgvghesihhn
    vhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehhf
    evvdetvdekkeeglefhhfeijeetuedvkeejjeeutdevgeejleevvdfgteehtdenucevlhhu
    shhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehomhgvghesihhnvh
    hishhisghlvghthhhinhhgshhlrggsrdgtohhm
X-ME-Proxy: <xmx:ZSp4ZafuFyTNx7GHCbASoyge3Gzl6aTwIS3UZXr2lwcUroMu5dZW9Q>
    <xmx:ZSp4ZXNr0u4TI44natOgxj43567DEWazaNUdM39EnqFcCNnQQsLrog>
    <xmx:ZSp4ZUmuCwXD6ZCjQCc1z4oj5MnGeR3UpcsaeboPg7kArM0agrwtoA>
    <xmx:ZSp4ZWadEQJE4iUhNQyfS2S7AuPOI4PS8_d7su_CFxpCrWwSG5RSgw>
Feedback-ID: i409c4082:Fastmail
From: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
To: win-pv-devel@lists.xenproject.org
Cc: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= <omeg@invisiblethingslab.com>
Subject: [RFC PATCH 6/6] xencontrol: use IOCTL_XENIFACE_GNTTAB_*_V2 IOCTLs
Date: Tue, 12 Dec 2023 10:38:48 +0100
Message-Id: <c488827b1271f5ed8439cf64c1b8b718a73ccb94.1702373837.git.omeg@invisiblethingslab.com>
X-Mailer: git-send-email 2.40.1.windows.1
In-Reply-To: <cover.1702373837.git.omeg@invisiblethingslab.com>
References: <cover.1702373837.git.omeg@invisiblethingslab.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

By using the _V2 IOCTLs we can remove all code used for handling
RequestIds in legacy IOCTLs.

Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
---
 include/xencontrol.h                |  28 ++++-
 src/xencontrol/xencontrol.c         | 182 ++++++++++------------------
 src/xencontrol/xencontrol_private.h |  33 -----
 3 files changed, 91 insertions(+), 152 deletions(-)

diff --git a/include/xencontrol.h b/include/xencontrol.h
index 29cd208..04ef858 100644
--- a/include/xencontrol.h
+++ b/include/xencontrol.h
@@ -161,7 +161,7 @@ XcEvtchnUnmask(
     IN  ULONG LocalPort
     );
 
-/*! \brief Grant a \a RemoteDomain permission to access local memory pages
+/*! \brief Grant a \a RemoteDomain permission to access local newly allocated memory pages
     \param Xc Xencontrol handle returned by XcOpen()
     \param RemoteDomain ID of a remote domain that is being granted access
     \param NumberPages Number of 4k pages to grant access to
@@ -185,6 +185,32 @@ XcGnttabPermitForeignAccess(
     OUT ULONG *References
     );
 
+/*! \brief Grant a \a RemoteDomain permission to access local memory pages
+    \param Xc Xencontrol handle returned by XcOpen()
+    \param RemoteDomain ID of a remote domain that is being granted access
+    \param Address Address of the granted memory region, allocated by the driver if NULL
+    \param NumberPages Number of 4k pages to grant access to
+    \param NotifyOffset Offset of a byte in the granted region that will be set to 0 when the grant is revoked
+    \param NotifyPort Local port number of an open event channel that will be notified when the grant is revoked
+    \param Flags Grant options
+    \param SharedAddress Local user mode address of the granted memory region
+    \param References An array of Xen grant numbers for every granted page
+    \return Error code
+*/
+XENCONTROL_API
+DWORD
+XcGnttabPermitForeignAccess2(
+    IN  PXENCONTROL_CONTEXT Xc,
+    IN  USHORT RemoteDomain,
+    IN  PVOID Address,
+    IN  ULONG NumberPages,
+    IN  ULONG NotifyOffset,
+    IN  ULONG NotifyPort,
+    IN  XENIFACE_GNTTAB_PAGE_FLAGS Flags,
+    OUT PVOID* SharedAddress,
+    OUT ULONG* References
+);
+
 /*! \brief Revoke a foreign domain access to previously granted memory region
     \param Xc Xencontrol handle returned by XcOpen()
     \param Address Local user mode address of the granted memory region
diff --git a/src/xencontrol/xencontrol.c b/src/xencontrol/xencontrol.c
index 5cd9461..fe39e87 100644
--- a/src/xencontrol/xencontrol.c
+++ b/src/xencontrol/xencontrol.c
@@ -101,9 +101,6 @@ XcOpen(
 
     Context->Logger = Logger;
     Context->LogLevel = XLL_INFO;
-    Context->RequestId = 1;
-    InitializeListHead(&Context->RequestList);
-    InitializeCriticalSection(&Context->RequestListLock);
 
     DevInfo = SetupDiGetClassDevs(&GUID_INTERFACE_XENIFACE, 0, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
     if (DevInfo == INVALID_HANDLE_VALUE) {
@@ -179,7 +176,6 @@ XcClose(
     )
 {
     CloseHandle(Xc->XenIface);
-    DeleteCriticalSection(&Xc->RequestListLock);
     free(Xc);
 }
 
@@ -364,115 +360,104 @@ fail:
     return GetLastError();
 }
 
-static PXENCONTROL_GNTTAB_REQUEST
-FindRequest(
+DWORD
+XcGnttabPermitForeignAccess(
     IN  PXENCONTROL_CONTEXT Xc,
-    IN  PVOID Address
-    )
+    IN  USHORT RemoteDomain,
+    IN  ULONG NumberPages,
+    IN  ULONG NotifyOffset,
+    IN  ULONG NotifyPort,
+    IN  XENIFACE_GNTTAB_PAGE_FLAGS Flags,
+    OUT PVOID* SharedAddress,
+    OUT ULONG* References
+)
 {
-    PLIST_ENTRY Entry;
-    PXENCONTROL_GNTTAB_REQUEST ReturnRequest = NULL;
-
-    EnterCriticalSection(&Xc->RequestListLock);
-    Entry = Xc->RequestList.Flink;
-    while (Entry != &Xc->RequestList) {
-        PXENCONTROL_GNTTAB_REQUEST Request = CONTAINING_RECORD(Entry, XENCONTROL_GNTTAB_REQUEST, ListEntry);
-
-        if (Request->Address == Address) {
-            ReturnRequest = Request;
-            break;
-        }
-
-        Entry = Entry->Flink;
-    }
-    LeaveCriticalSection(&Xc->RequestListLock);
-
-    return ReturnRequest;
+    Log(XLL_DEBUG, L"RemoteDomain: %d, NumberPages: %lu, NotifyOffset: 0x%x, NotifyPort: %lu, Flags: 0x%x",
+        RemoteDomain, NumberPages, NotifyOffset, NotifyPort, Flags);
+
+    return XcGnttabPermitForeignAccess2(Xc,
+                                        RemoteDomain,
+                                        NULL,
+                                        NumberPages,
+                                        NotifyOffset,
+                                        NotifyPort,
+                                        Flags,
+                                        SharedAddress,
+                                        References);
 }
 
 DWORD
-XcGnttabPermitForeignAccess(
+XcGnttabPermitForeignAccess2(
     IN  PXENCONTROL_CONTEXT Xc,
     IN  USHORT RemoteDomain,
+    IN  PVOID Address,
     IN  ULONG NumberPages,
     IN  ULONG NotifyOffset,
     IN  ULONG NotifyPort,
     IN  XENIFACE_GNTTAB_PAGE_FLAGS Flags,
-    OUT PVOID *Address,
+    OUT PVOID *SharedAddress,
     OUT ULONG *References
     )
 {
-    XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_IN In;
-    XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT *Out;
-    PXENCONTROL_GNTTAB_REQUEST Request;
+    XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_IN_V2 In;
+    XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT_V2 *Out;
     DWORD Returned, Size;
+    OVERLAPPED Overlapped;
     BOOL Success;
     DWORD Status;
 
-    // lock the whole operation to not generate duplicate IDs
-    EnterCriticalSection(&Xc->RequestListLock);
-
-    In.RequestId = Xc->RequestId;
     In.RemoteDomain = RemoteDomain;
+    In.Address = Address;
     In.NumberPages = NumberPages;
     In.NotifyOffset = NotifyOffset;
     In.NotifyPort = NotifyPort;
     In.Flags = Flags;
 
-    Size = (ULONG)FIELD_OFFSET(XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT, References[NumberPages]);
+    Size = (ULONG)FIELD_OFFSET(XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_OUT_V2, References[NumberPages]);
     Out = malloc(Size);
-    Request = malloc(sizeof(*Request));
 
     Status = ERROR_OUTOFMEMORY;
-    if (!Request || !Out)
+    if (!Out)
         goto fail;
 
-    ZeroMemory(Request, sizeof(*Request));
-    Request->Id = In.RequestId;
-
-    Log(XLL_DEBUG, L"Id %lu, RemoteDomain: %d, NumberPages: %lu, NotifyOffset: 0x%x, NotifyPort: %lu, Flags: 0x%x",
-        In.RequestId, RemoteDomain, NumberPages, NotifyOffset, NotifyPort, Flags);
+    Log(XLL_DEBUG, L"RemoteDomain: %d, Address %p, NumberPages: %lu, NotifyOffset: 0x%x, NotifyPort: %lu, Flags: 0x%x",
+        RemoteDomain, Address, NumberPages, NotifyOffset, NotifyPort, Flags);
 
+    ZeroMemory(&Overlapped, sizeof(Overlapped));
     Success = DeviceIoControl(Xc->XenIface,
-                              IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS,
+                              IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2,
                               &In, sizeof(In),
                               Out, Size,
                               &Returned,
-                              &Request->Overlapped);
+                              &Overlapped);
 
     Status = GetLastError();
     // this IOCTL is expected to be pending on success
     if (!Success) {
         if (Status != ERROR_IO_PENDING) {
-            Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS failed");
+            Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2 failed");
             goto fail;
         }
     } else {
-        Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS not pending");
+        Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2 not pending");
         Status = ERROR_UNIDENTIFIED_ERROR;
         goto fail;
     }
 
-    Request->Address = Out->Address;
-
-    InsertTailList(&Xc->RequestList, &Request->ListEntry);
-    Xc->RequestId++;
-    LeaveCriticalSection(&Xc->RequestListLock);
-
-    *Address = Out->Address;
+    *SharedAddress = Out->Address;
     memcpy(References, &Out->References, NumberPages * sizeof(ULONG));
-    Log(XLL_DEBUG, L"Address: %p", *Address);
+    Log(XLL_DEBUG, L"Address: %p", Out->Address);
+#ifdef _DEBUG
     for (ULONG i = 0; i < NumberPages; i++)
         Log(XLL_DEBUG, L"Grant ref[%lu]: %lu", i, Out->References[i]);
+#endif
 
     free(Out);
     return ERROR_SUCCESS;
 
 fail:
-    LeaveCriticalSection(&Xc->RequestListLock);
     Log(XLL_ERROR, L"Error: 0x%x", Status);
     free(Out);
-    free(Request);
     return Status;
 }
 
@@ -482,25 +467,16 @@ XcGnttabRevokeForeignAccess(
     IN  PVOID Address
     )
 {
-    XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN In;
-    PXENCONTROL_GNTTAB_REQUEST Request;
+    XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_IN_V2 In;
     DWORD Returned;
     BOOL Success;
     DWORD Status;
 
     Log(XLL_DEBUG, L"Address: %p", Address);
-
-    Status = ERROR_NOT_FOUND;
-    Request = FindRequest(Xc, Address);
-    if (!Request) {
-        Log(XLL_ERROR, L"Address %p not granted", Address);
-        goto fail;
-    }
-
-    In.RequestId = Request->Id;
+    In.Address = Address;
 
     Success = DeviceIoControl(Xc->XenIface,
-                              IOCTL_XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS,
+                              IOCTL_XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_V2,
                               &In, sizeof(In),
                               NULL, 0,
                               &Returned,
@@ -508,15 +484,10 @@ XcGnttabRevokeForeignAccess(
 
     Status = GetLastError();
     if (!Success) {
-        Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS failed");
+        Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_V2 failed");
         goto fail;
     }
 
-    EnterCriticalSection(&Xc->RequestListLock);
-    RemoveEntryList(&Request->ListEntry);
-    LeaveCriticalSection(&Xc->RequestListLock);
-    free(Request);
-
     return Status;
 
 fail:
@@ -536,24 +507,19 @@ XcGnttabMapForeignPages(
     OUT PVOID *Address
     )
 {
-    XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN *In;
-    XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT Out;
-    PXENCONTROL_GNTTAB_REQUEST Request;
+    XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN_V2 *In;
+    XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_OUT_V2 Out;
     DWORD Returned, Size;
+    OVERLAPPED Overlapped;
     BOOL Success;
     DWORD Status;
 
-    // lock the whole operation to not generate duplicate IDs
-    EnterCriticalSection(&Xc->RequestListLock);
-
     Status = ERROR_OUTOFMEMORY;
-    Size = (ULONG)FIELD_OFFSET(XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN, References[NumberPages]);
+    Size = (ULONG)FIELD_OFFSET(XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_IN_V2, References[NumberPages]);
     In = malloc(Size);
-    Request = malloc(sizeof(*Request));
-    if (!In || !Request)
+    if (!In)
         goto fail;
 
-    In->RequestId = Xc->RequestId;
     In->RemoteDomain = RemoteDomain;
     In->NumberPages = NumberPages;
     In->NotifyOffset = NotifyOffset;
@@ -561,40 +527,35 @@ XcGnttabMapForeignPages(
     In->Flags = Flags;
     memcpy(&In->References, References, NumberPages * sizeof(ULONG));
 
-    ZeroMemory(Request, sizeof(*Request));
-    Request->Id = In->RequestId;
-
-    Log(XLL_DEBUG, L"Id %lu, RemoteDomain: %d, NumberPages: %lu, NotifyOffset: 0x%x, NotifyPort: %lu, Flags: 0x%x",
-        In->RequestId, RemoteDomain, NumberPages, NotifyOffset, NotifyPort, Flags);
+    Log(XLL_DEBUG, L"RemoteDomain: %d, NumberPages: %lu, NotifyOffset: 0x%x, NotifyPort: %lu, Flags: 0x%x",
+        RemoteDomain, NumberPages, NotifyOffset, NotifyPort, Flags);
 
+#ifdef _DEBUG
     for (ULONG i = 0; i < NumberPages; i++)
         Log(XLL_DEBUG, L"Grant ref[%lu]: %lu", i, References[i]);
+#endif
 
+    ZeroMemory(&Overlapped, sizeof(Overlapped));
     Success = DeviceIoControl(Xc->XenIface,
-                              IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES,
+                              IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_V2,
                               In, Size,
                               &Out, sizeof(Out),
                               &Returned,
-                              &Request->Overlapped);
+                              &Overlapped);
 
     Status = GetLastError();
     // this IOCTL is expected to be pending on success
     if (!Success) {
         if (Status != ERROR_IO_PENDING) {
-            Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES failed");
+            Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_V2 failed");
             goto fail;
         }
     } else {
-        Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES not pending");
+        Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_V2 not pending");
         Status = ERROR_UNIDENTIFIED_ERROR;
         goto fail;
     }
 
-    Request->Address = Out.Address;
-    InsertTailList(&Xc->RequestList, &Request->ListEntry);
-    Xc->RequestId++;
-    LeaveCriticalSection(&Xc->RequestListLock);
-
     *Address = Out.Address;
 
     Log(XLL_DEBUG, L"Address: %p", *Address);
@@ -603,10 +564,8 @@ XcGnttabMapForeignPages(
     return ERROR_SUCCESS;
 
 fail:
-    LeaveCriticalSection(&Xc->RequestListLock);
     Log(XLL_ERROR, L"Error: 0x%x", Status);
     free(In);
-    free(Request);
     return Status;
 }
 
@@ -616,25 +575,17 @@ XcGnttabUnmapForeignPages(
     IN  PVOID Address
     )
 {
-    XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN In;
-    PXENCONTROL_GNTTAB_REQUEST Request;
+    XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN_V2 In;
     DWORD Returned;
     BOOL Success;
     DWORD Status;
 
     Log(XLL_DEBUG, L"Address: %p", Address);
 
-    Status = ERROR_NOT_FOUND;
-    Request = FindRequest(Xc, Address);
-    if (!Request) {
-        Log(XLL_ERROR, L"Address %p not mapped", Address);
-        goto fail;
-    }
-
-    In.RequestId = Request->Id;
+    In.Address = Address;
 
     Success = DeviceIoControl(Xc->XenIface,
-                              IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES,
+                              IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_V2,
                               &In, sizeof(In),
                               NULL, 0,
                               &Returned,
@@ -642,15 +593,10 @@ XcGnttabUnmapForeignPages(
 
     Status = GetLastError();
     if (!Success) {
-        Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES failed");
+        Log(XLL_ERROR, L"IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_V2 failed");
         goto fail;
     }
 
-    EnterCriticalSection(&Xc->RequestListLock);
-    RemoveEntryList(&Request->ListEntry);
-    LeaveCriticalSection(&Xc->RequestListLock);
-    free(Request);
-
     return Status;
 
 fail:
diff --git a/src/xencontrol/xencontrol_private.h b/src/xencontrol/xencontrol_private.h
index 685bcfa..8a0076a 100644
--- a/src/xencontrol/xencontrol_private.h
+++ b/src/xencontrol/xencontrol_private.h
@@ -7,43 +7,10 @@
 #define Log(level, format, ...) \
         _Log(Xc->Logger, level, Xc->LogLevel, __FUNCTION__, format, __VA_ARGS__)
 
-#define InitializeListHead(ListHead) ( \
-    (ListHead)->Flink = (ListHead)->Blink = (ListHead))
-
-#define InsertTailList(ListHead, Entry) { \
-    PLIST_ENTRY _EX_Blink; \
-    PLIST_ENTRY _EX_ListHead; \
-    _EX_ListHead = (ListHead); \
-    _EX_Blink = _EX_ListHead->Blink; \
-    (Entry)->Flink = _EX_ListHead; \
-    (Entry)->Blink = _EX_Blink; \
-    _EX_Blink->Flink = (Entry); \
-    _EX_ListHead->Blink = (Entry); \
-    }
-
-#define RemoveEntryList(Entry) { \
-    PLIST_ENTRY _EX_Blink; \
-    PLIST_ENTRY _EX_Flink; \
-    _EX_Flink = (Entry)->Flink; \
-    _EX_Blink = (Entry)->Blink; \
-    _EX_Blink->Flink = _EX_Flink; \
-    _EX_Flink->Blink = _EX_Blink; \
-    }
-
 typedef struct _XENCONTROL_CONTEXT {
     HANDLE XenIface;
     XENCONTROL_LOGGER *Logger;
     XENCONTROL_LOG_LEVEL LogLevel;
-    ULONG RequestId;
-    LIST_ENTRY RequestList;
-    CRITICAL_SECTION RequestListLock;
 } XENCONTROL_CONTEXT, *PXENCONTROL_CONTEXT;
 
-typedef struct _XENCONTROL_GNTTAB_REQUEST {
-    LIST_ENTRY  ListEntry;
-    OVERLAPPED  Overlapped;
-    ULONG       Id;
-    PVOID       Address;
-} XENCONTROL_GNTTAB_REQUEST, *PXENCONTROL_GNTTAB_REQUEST;
-
 #endif // _XENCONTROL_PRIVATE_H_
-- 
2.40.1.windows.1



From win-pv-devel-bounces@lists.xenproject.org Wed Dec 13 08:15:32 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Wed, 13 Dec 2023 08:15:32 +0000
Received: from list by lists.xenproject.org with outflank-mailman.653747.1020245 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rDKOv-000298-Go; Wed, 13 Dec 2023 08:15:29 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 653747.1020245; Wed, 13 Dec 2023 08:15:29 +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 1rDKOv-000291-E2; Wed, 13 Dec 2023 08:15:29 +0000
Received: by outflank-mailman (input) for mailman id 653747;
 Wed, 13 Dec 2023 08:15:28 +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=Mec3=HY=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rDKOu-00028v-Pn
 for win-pv-devel@lists.xenproject.org; Wed, 13 Dec 2023 08:15:28 +0000
Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com
 [2a00:1450:4864:20::42b])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id c56308b4-998f-11ee-98e9-6d05b1d4d9a1;
 Wed, 13 Dec 2023 09:15:27 +0100 (CET)
Received: by mail-wr1-x42b.google.com with SMTP id
 ffacd0b85a97d-3332fc9b9b2so5794274f8f.1
 for <win-pv-devel@lists.xenproject.org>; Wed, 13 Dec 2023 00:15:26 -0800 (PST)
Received: from [192.168.1.147] (54-240-197-238.amazon.com. [54.240.197.238])
 by smtp.gmail.com with ESMTPSA id
 m3-20020a5d6a03000000b003363fd83503sm463765wru.42.2023.12.13.00.15.25
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 13 Dec 2023 00:15:25 -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: c56308b4-998f-11ee-98e9-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702455326; x=1703060126; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=k8tOkysEsvJGZO/pVreogY9yrLIOjGDYaSLaKwXdaI4=;
        b=T1ok+FvQ744+3UfUlaNpKJwxOrv+1BqlYZ8qvbWCu/m+6cYd97iZNy37RGrcBCWNi1
         KkPJZteqTgJrpwPogOqWyXaXTF0cZ/xPCXmLP8JIDHfIto1Hdf5vang+SuZU71LuwiEr
         UCknjyLLw9O0bQ9CONou5JSGUQlhhFKxU4pgf2FoMnw/sr5Uup38rmj6h8Hnw0MJ9/lJ
         nS1JqnHcDQZoUtv3fwTYCxBX3+3J2AKH4zcVydT5u9FZ/A5eCTKJlBJGPDP3ZZ6ski3I
         rACWXLbSxi6neifF7027FhBDXHx/TSAaqTgynS6HRd5J4WICUJgEY6bxQBfp3deaw0nG
         IzZQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702455326; x=1703060126;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=k8tOkysEsvJGZO/pVreogY9yrLIOjGDYaSLaKwXdaI4=;
        b=CSYHamWjYchF+/JlHtGwdeyDlsnOe5ozzOftoWI0HQX5vhEjJQw0bNl2zS6KhW+4ZD
         Tf0mEGwvmivrXAjPjsqiJuWkz7cGYUw/aqo6FiwOzSyM10o5KvaRkdLmWTKKbPTW0pRF
         mLkTTbdPKUhc5eHqA06PVyoNThPU9+T5a29H9tiOpg0AF3WYjbk9tNTgqQoFIYg+0JS/
         rIfCZG1EwAKGzIrjaqAhB3lfxK7PxZq2GLN6Qd4KhQOSbTB7x2ywXnw09f1I/kNjSFnC
         kHNjZsrd1CRFV3+cNCqayLnL4HHB2bPNlixBHzIx+zSzrr5HSQOyOYSzz5Hq2DnSY762
         qqYA==
X-Gm-Message-State: AOJu0YxqZGYJH8qKFMLb4/kuquaP1dswkv3G0RYuL22msuLPXv3bhkcD
	amNyzXVY7T+ldzJ3FHDwHoACAQ9LXKc=
X-Google-Smtp-Source: AGHT+IHnrPVB43IunmbEs173SGMFqlI3pK4SDXGWw3qisdyhwadNzdIpM2wwaMPETWCKRBbJDOjfDQ==
X-Received: by 2002:adf:e652:0:b0:333:3117:c47d with SMTP id b18-20020adfe652000000b003333117c47dmr1784519wrn.270.1702455326090;
        Wed, 13 Dec 2023 00:15:26 -0800 (PST)
Message-ID: <a3918582-ef13-4af7-a3ad-476783f19f1c@gmail.com>
Date: Wed, 13 Dec 2023 08:15:25 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: paul@xen.org
Subject: Re: [PATCH 1/3] Remove VS2015 and VS2017 projects and configurations
Content-Language: en-US
To: win-pv-devel@lists.xenproject.org
References: <20231212083143.1359-1-owen.smith@cloud.com>
From: "Durrant, Paul" <xadimgnik@gmail.com>
In-Reply-To: <20231212083143.1359-1-owen.smith@cloud.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 12/12/2023 08:31, Owen Smith wrote:
> Signed-off-by: Owen Smith <owen.smith@cloud.com>
> ---
>   build.ps1                           | 12 ++--
>   vs2015/configs.props                | 45 -------------
>   vs2015/package/package.vcxproj      | 62 ------------------
>   vs2015/package/package.vcxproj.user |  8 ---
>   vs2015/targets.props                | 35 -----------
>   vs2015/version/version.vcxproj      | 19 ------
>   vs2015/xennet.sln                   | 97 -----------------------------
>   vs2015/xennet/xennet.vcxproj        | 67 --------------------
>   vs2015/xennet/xennet.vcxproj.user   |  8 ---
>   vs2017/configs.props                | 45 -------------
>   vs2017/package/package.vcxproj      | 62 ------------------
>   vs2017/package/package.vcxproj.user |  8 ---
>   vs2017/targets.props                | 35 -----------
>   vs2017/version/version.vcxproj      | 16 -----
>   vs2017/xennet.sln                   | 94 ----------------------------
>   vs2017/xennet/xennet.vcxproj        | 75 ----------------------
>   vs2017/xennet/xennet.vcxproj.user   |  8 ---
>   17 files changed, 6 insertions(+), 690 deletions(-)
>   delete mode 100644 vs2015/configs.props
>   delete mode 100644 vs2015/package/package.vcxproj
>   delete mode 100644 vs2015/package/package.vcxproj.user
>   delete mode 100644 vs2015/targets.props
>   delete mode 100644 vs2015/version/version.vcxproj
>   delete mode 100644 vs2015/xennet.sln
>   delete mode 100644 vs2015/xennet/xennet.vcxproj
>   delete mode 100644 vs2015/xennet/xennet.vcxproj.user
>   delete mode 100644 vs2017/configs.props
>   delete mode 100644 vs2017/package/package.vcxproj
>   delete mode 100644 vs2017/package/package.vcxproj.user
>   delete mode 100644 vs2017/targets.props
>   delete mode 100644 vs2017/version/version.vcxproj
>   delete mode 100644 vs2017/xennet.sln
>   delete mode 100644 vs2017/xennet/xennet.vcxproj
>   delete mode 100644 vs2017/xennet/xennet.vcxproj.user
> 

Thanks. Series...

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



From win-pv-devel-bounces@lists.xenproject.org Thu Dec 14 15:33:00 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 14 Dec 2023 15:33:00 +0000
Received: from list by lists.xenproject.org with outflank-mailman.654639.1021791 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rDnhq-0007Wg-VS; Thu, 14 Dec 2023 15:32:58 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 654639.1021791; Thu, 14 Dec 2023 15:32:58 +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 1rDnhq-0007WZ-SY; Thu, 14 Dec 2023 15:32:58 +0000
Received: by outflank-mailman (input) for mailman id 654639;
 Thu, 14 Dec 2023 15:32:57 +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=7IN1=HZ=cloud.com=owen.smith@srs-se1.protection.inumbo.net>)
 id 1rDnhp-0007WL-MM
 for win-pv-devel@lists.xenproject.org; Thu, 14 Dec 2023 15:32:57 +0000
Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com
 [2a00:1450:4864:20::332])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id 0cfff789-9a96-11ee-9b0f-b553b5be7939;
 Thu, 14 Dec 2023 16:32:55 +0100 (CET)
Received: by mail-wm1-x332.google.com with SMTP id
 5b1f17b1804b1-40c39e936b4so58231785e9.1
 for <win-pv-devel@lists.xenproject.org>; Thu, 14 Dec 2023 07:32:55 -0800 (PST)
Received: from localhost.localdomain ([185.25.65.68])
 by smtp.gmail.com with ESMTPSA id
 j8-20020a05600c190800b0040c58e410a3sm7806563wmq.14.2023.12.14.07.32.52
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 14 Dec 2023 07:32:52 -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: 0cfff789-9a96-11ee-9b0f-b553b5be7939
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=cloud.com; s=cloud; t=1702567974; x=1703172774; darn=lists.xenproject.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=akL9QuW/PWJUXzAcVR5e1C+rRkXokivqGJtoDNjz464=;
        b=hFUF8LGGBPe2obncLnHTOF5EhM93IyjADMUNZppHjbbUD/KIafJaP9zYRiKlnHaYXV
         yBL+x6dHuXey9agZ2ZZPRQ1dIKUCXrazXBbLXt81m5qmBjePPJiol1pcS5lln7ogQoN0
         FGFQ4UOKeTNyGccVoLFMQbfS5gfMovZx6p7IY=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702567974; x=1703172774;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=akL9QuW/PWJUXzAcVR5e1C+rRkXokivqGJtoDNjz464=;
        b=lPXMgOzndvCSgKTQuUggtJGqSgFrj1HXThMF9jbUwrqB8CGTkikrtHozCU5JcGdocs
         hH/ON/VyzmPeoJXaszVk9zN5iabq1PEXrkaewrAw8HdWltBRrN7oNj7G6St9RLeZBwj/
         hegjEl8quTzbZ/w2XhY67dOeOSFmVv9c/ElHllQji9S/aWsCT6kCydveoJU5NSb89cU/
         eIyfvFc/J8Od1Euv5pRWjsYvHyhaqfeF1WrA2Ha819lF+WH0QWnbwGM89d8wPvMDtfqm
         SWkbJtonmiAqBA1sQBmfAHrdV9Xvv8WMyR5fBOmWPIbKFUlCcp7tQPKnwm+U8CkGdsM8
         aWOA==
X-Gm-Message-State: AOJu0YxMcenjXxxFvAJAsQ34LpA5kaFoq/dEq/1LRcFK+naHdcjK15cW
	8bOgdf2HnFcbYMcoLe+juK2qYDa8c7QQrlSN6w==
X-Google-Smtp-Source: AGHT+IHCAPbZksO6PhhizJvBtWfcIN/pBt7u903TAzWpkQr4HxAwsbYGQCyFgfwTq3RrqHZFcfc0jw==
X-Received: by 2002:a1c:7c08:0:b0:40b:5e59:f72c with SMTP id x8-20020a1c7c08000000b0040b5e59f72cmr2611498wmc.158.1702567974135;
        Thu, 14 Dec 2023 07:32:54 -0800 (PST)
From: Owen Smith <owen.smith@cloud.com>
To: win-pv-devel@lists.xenproject.org
Cc: Owen Smith <owen.smith@cloud.com>
Subject: [PATCH 2/3] Fix issues in PdoStartDevice()
Date: Thu, 14 Dec 2023 15:32:39 +0000
Message-ID: <20231214153240.1934-2-owen.smith@cloud.com>
X-Mailer: git-send-email 2.41.0.windows.3
In-Reply-To: <20231214153240.1934-1-owen.smith@cloud.com>
References: <20231214153240.1934-1-owen.smith@cloud.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

HardwareKey was not being closed in normal operation.
SoftwareKey only requires KEY_READ access.
Move DriverRequestReboot() to the point it is required to avoid a 'goto' in
the error handlers.

Signed-off-by: Owen Smith <owen.smith@cloud.com>
---
 src/xenvif/pdo.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/xenvif/pdo.c b/src/xenvif/pdo.c
index 29d4bdd..f23b047 100644
--- a/src/xenvif/pdo.c
+++ b/src/xenvif/pdo.c
@@ -1296,7 +1296,7 @@ PdoStartDevice(
         goto fail2;
 
     status = RegistryOpenSoftwareKey(__PdoGetDeviceObject(Pdo),
-                                     KEY_ALL_ACCESS,
+                                     KEY_READ,
                                      &SoftwareKey);
     if (!NT_SUCCESS(status))
         goto fail3;
@@ -1370,12 +1370,12 @@ PdoStartDevice(
 
     if (Pdo->HasAlias || !PdoUnplugRequested(Pdo)) {
         PdoUnplugRequest(Pdo, TRUE);
+        DriverRequestReboot();
 
         status = STATUS_PNP_REBOOT_REQUIRED;
         goto fail9;
     }
 
-
     //
     // If there is a stack bound then restore any settings that
     // may have been saved from an aliasing device.
@@ -1431,6 +1431,7 @@ PdoStartDevice(
 
     __FreeMibTable(Table);
 
+    RegistryCloseKey(HardwareKey);
     RegistryCloseKey(SoftwareKey);
 
     return STATUS_SUCCESS;
@@ -1438,14 +1439,9 @@ PdoStartDevice(
 fail10:
     Error("fail10\n");
 
-    __FreeMibTable(Table);
-
-    goto fail6;
-
 fail9:
     Error("fail9\n");
 
-    DriverRequestReboot();
     __FreeMibTable(Table);
 
 fail8:
-- 
2.41.0.windows.3



From win-pv-devel-bounces@lists.xenproject.org Thu Dec 14 15:33:00 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 14 Dec 2023 15:33:00 +0000
Received: from list by lists.xenproject.org with outflank-mailman.654640.1021795 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rDnhr-0007XC-2Y; Thu, 14 Dec 2023 15:32:59 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 654640.1021795; Thu, 14 Dec 2023 15:32:59 +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 1rDnhq-0007Wn-UJ; Thu, 14 Dec 2023 15:32:58 +0000
Received: by outflank-mailman (input) for mailman id 654640;
 Thu, 14 Dec 2023 15:32:58 +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=7IN1=HZ=cloud.com=owen.smith@srs-se1.protection.inumbo.net>)
 id 1rDnhq-0007WL-CF
 for win-pv-devel@lists.xenproject.org; Thu, 14 Dec 2023 15:32:58 +0000
Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com
 [2a00:1450:4864:20::335])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id 0c18afff-9a96-11ee-9b0f-b553b5be7939;
 Thu, 14 Dec 2023 16:32:54 +0100 (CET)
Received: by mail-wm1-x335.google.com with SMTP id
 5b1f17b1804b1-40c38e292c8so4700035e9.0
 for <win-pv-devel@lists.xenproject.org>; Thu, 14 Dec 2023 07:32:53 -0800 (PST)
Received: from localhost.localdomain ([185.25.65.68])
 by smtp.gmail.com with ESMTPSA id
 j8-20020a05600c190800b0040c58e410a3sm7806563wmq.14.2023.12.14.07.32.51
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 14 Dec 2023 07:32:52 -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: 0c18afff-9a96-11ee-9b0f-b553b5be7939
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=cloud.com; s=cloud; t=1702567972; x=1703172772; darn=lists.xenproject.org;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to;
        bh=LoHAXpBrWNhQuBYE5WAk5znjuUtdZ4RMU4IDR3PdzkI=;
        b=b8zhrHbqRhQBm9epndQhaOw11LWKcz3e7njMZ5nACvrswhfXgv0ABo9fE0MjgVRjSv
         hvIvEZofG8VAS2ovk2T+6piglDyFnHb9Fzl618tHAujyufbZQObMvc4ukuQ7EqzbQQuF
         xdabRXEP/zG6q0EYyt9YUk5AMx5vgCiPqhw1U=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702567972; x=1703172772;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=LoHAXpBrWNhQuBYE5WAk5znjuUtdZ4RMU4IDR3PdzkI=;
        b=r0bbcGjdM5+8PTDQ74RnFhB80zBtRJR4b4se0yhGZfSlBhONTtP53IHTuUqCHYNbga
         2aM744EB9EMptpKUkk18+GEtXq47CDVBMMkDCBdXTisNgC8FBsQcZALJV9qosbK6D85s
         fZ7LULZM6LCFPQI2YqPRMp9PrWaFC4ASM3wuO1ZUDdRieJX83YH0jq1MESojhiBnFqOs
         GE+mAG8acDHyQcWj4PRdkYBv6cPt73ZmoqxSU5wHuZsGtf3fSDTPFH66HlD5rg8UQ9B0
         BlNaBqoysxDa+/j98xWOCfvPw/0meeT3Dw6Wu1MXF2dJPVi4kEr0VDBQAyz2D3towIEr
         nDQA==
X-Gm-Message-State: AOJu0Yysy9Qt8eX4+3DtvWeNW3OI3HVoJml2wcfzZHiEf+JBfto82aAH
	EeiTklaXs+xU3zGBWY9SY8v6Etj912xl17Eltw==
X-Google-Smtp-Source: AGHT+IEDGVGbgX7RNEk0QPxneZ780uHcyq4S3gdcyiVJdE7Of0p3LxSHJDb9lh+38JGOEgTWhBRkxQ==
X-Received: by 2002:a05:600c:1f96:b0:40c:53bb:71d4 with SMTP id je22-20020a05600c1f9600b0040c53bb71d4mr2119378wmb.123.1702567972477;
        Thu, 14 Dec 2023 07:32:52 -0800 (PST)
From: Owen Smith <owen.smith@cloud.com>
To: win-pv-devel@lists.xenproject.org
Cc: Owen Smith <owen.smith@cloud.com>
Subject: [PATCH 1/3] Define UNPLUG interface revisions
Date: Thu, 14 Dec 2023 15:32:38 +0000
Message-ID: <20231214153240.1934-1-owen.smith@cloud.com>
X-Mailer: git-send-email 2.41.0.windows.3
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Adds the UNPLUG version requirements to the revision list, as XenVif uses the
UNPLUG interface in PdoUnplugRequest() and PdoUnplugRequested().
Extends the output in PdoDumpRevisions() and always ASSERTs on STORE and
SUSPEND interface versions.
Also defines revision 0x09000004 which requires UPLUG v2, as its required for
PdoUnplugRequested().

Signed-off-by: Owen Smith <owen.smith@cloud.com>
---
 include/revision.h | 14 ++++++++------
 src/xenvif/pdo.c   | 36 ++++++++++++++++++++----------------
 2 files changed, 28 insertions(+), 22 deletions(-)

diff --git a/include/revision.h b/include/revision.h
index efad212..2f4ac80 100644
--- a/include/revision.h
+++ b/include/revision.h
@@ -38,12 +38,14 @@
 // V  - XENVIF_VIF_INTERFACE
 // ST - XENBUS_STORE_INTERFACE
 // SU - XENBUS_SUSPEND_INTERFACE
+// U  - XENBUS_UNPLUG_INTERFACE
 
-//                    REVISION   C   V    ST  SU
-#define DEFINE_REVISION_TABLE                       \
-    DEFINE_REVISION(0x09000000,  1,  8,   2,  1),   \
-    DEFINE_REVISION(0x09000001,  2,  8,   2,  1),   \
-    DEFINE_REVISION(0x09000002,  2,  9,   2,  1),   \
-    DEFINE_REVISION(0x09000003,  2,  10,  2,  1)
+//                    REVISION   C   V    ST  SU   U
+#define DEFINE_REVISION_TABLE                           \
+    DEFINE_REVISION(0x09000000,  1,  8,   2,  1,   1),  \
+    DEFINE_REVISION(0x09000001,  2,  8,   2,  1,   1),  \
+    DEFINE_REVISION(0x09000002,  2,  9,   2,  1,   1),  \
+    DEFINE_REVISION(0x09000003,  2,  10,  2,  1,   1),  \
+    DEFINE_REVISION(0x09000004,  2,  10,  2,  1,   2)
 
 #endif  // _REVISION_H
diff --git a/src/xenvif/pdo.c b/src/xenvif/pdo.c
index 5c951d9..29d4bdd 100644
--- a/src/xenvif/pdo.c
+++ b/src/xenvif/pdo.c
@@ -540,10 +540,11 @@ typedef struct _XENVIF_PDO_REVISION {
     ULONG   VifInterfaceVersion;
     ULONG   StoreInterfaceVersion;
     ULONG   SuspendInterfaceVersion;
+    ULONG   UnplugInterfaceVersion;
 } XENVIF_PDO_REVISION, *PXENVIF_PDO_REVISION;
 
-#define DEFINE_REVISION(_N, _C, _V, _ST, _SU) \
-    { (_N), (_C), (_V), (_ST), (_SU) }
+#define DEFINE_REVISION(_N, _C, _V, _ST, _SU, _U) \
+    { (_N), (_C), (_V), (_ST), (_SU), (_U) }
 
 static XENVIF_PDO_REVISION PdoRevision[] = {
     DEFINE_REVISION_TABLE
@@ -573,30 +574,33 @@ PdoDumpRevisions(
         ASSERT(IMPLY(Index == ARRAYSIZE(PdoRevision) - 1,
                      Revision->VifInterfaceVersion == XENVIF_VIF_INTERFACE_VERSION_MAX));
 
-        if (Revision->StoreInterfaceVersion != 0) {
-            ASSERT3U(Revision->StoreInterfaceVersion, >=, XENBUS_STORE_INTERFACE_VERSION_MIN);
-            ASSERT3U(Revision->StoreInterfaceVersion, <=, XENBUS_STORE_INTERFACE_VERSION_MAX);
-            ASSERT(IMPLY(Index == ARRAYSIZE(PdoRevision) - 1,
-                         Revision->StoreInterfaceVersion == XENBUS_STORE_INTERFACE_VERSION_MAX));
-        }
+        ASSERT3U(Revision->StoreInterfaceVersion, >=, XENBUS_STORE_INTERFACE_VERSION_MIN);
+        ASSERT3U(Revision->StoreInterfaceVersion, <=, XENBUS_STORE_INTERFACE_VERSION_MAX);
+        ASSERT(IMPLY(Index == ARRAYSIZE(PdoRevision) - 1,
+                     Revision->StoreInterfaceVersion == XENBUS_STORE_INTERFACE_VERSION_MAX));
 
-        if (Revision->SuspendInterfaceVersion != 0) {
-            ASSERT3U(Revision->SuspendInterfaceVersion, >=, XENBUS_SUSPEND_INTERFACE_VERSION_MIN);
-            ASSERT3U(Revision->SuspendInterfaceVersion, <=, XENBUS_SUSPEND_INTERFACE_VERSION_MAX);
-            ASSERT(IMPLY(Index == ARRAYSIZE(PdoRevision) - 1,
-                         Revision->SuspendInterfaceVersion == XENBUS_SUSPEND_INTERFACE_VERSION_MAX));
-        }
+        ASSERT3U(Revision->SuspendInterfaceVersion, >=, XENBUS_SUSPEND_INTERFACE_VERSION_MIN);
+        ASSERT3U(Revision->SuspendInterfaceVersion, <=, XENBUS_SUSPEND_INTERFACE_VERSION_MAX);
+        ASSERT(IMPLY(Index == ARRAYSIZE(PdoRevision) - 1,
+                     Revision->SuspendInterfaceVersion == XENBUS_SUSPEND_INTERFACE_VERSION_MAX));
+
+        ASSERT3U(Revision->UnplugInterfaceVersion, >=, XENBUS_UNPLUG_INTERFACE_VERSION_MIN);
+        ASSERT3U(Revision->UnplugInterfaceVersion, <=, XENBUS_UNPLUG_INTERFACE_VERSION_MAX);
+        ASSERT(IMPLY(Index == ARRAYSIZE(PdoRevision) - 1,
+                     Revision->UnplugInterfaceVersion == XENBUS_UNPLUG_INTERFACE_VERSION_MAX));
 
         Info("%08X -> "
              "CACHE v%u "
              "VIF v%u "
              "STORE v%u "
-             "SUSPEND v%u\n",
+             "SUSPEND v%u"
+             "UNPLUG v%u\n",
              Revision->Number,
              Revision->CacheInterfaceVersion,
              Revision->VifInterfaceVersion,
              Revision->StoreInterfaceVersion,
-             Revision->SuspendInterfaceVersion);
+             Revision->SuspendInterfaceVersion,
+             Revision->UnplugInterfaceVersion);
     }
 }
 
-- 
2.41.0.windows.3



From win-pv-devel-bounces@lists.xenproject.org Thu Dec 14 15:33:01 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 14 Dec 2023 15:33:01 +0000
Received: from list by lists.xenproject.org with outflank-mailman.654641.1021798 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rDnht-0007aZ-2L; Thu, 14 Dec 2023 15:33:01 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 654641.1021798; Thu, 14 Dec 2023 15:33: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 1rDnhs-0007aI-W7; Thu, 14 Dec 2023 15:33:00 +0000
Received: by outflank-mailman (input) for mailman id 654641;
 Thu, 14 Dec 2023 15:33:00 +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=7IN1=HZ=cloud.com=owen.smith@srs-se1.protection.inumbo.net>)
 id 1rDnhr-0007WL-Um
 for win-pv-devel@lists.xenproject.org; Thu, 14 Dec 2023 15:32:59 +0000
Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com
 [2a00:1450:4864:20::32a])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id 0eb7ec92-9a96-11ee-9b0f-b553b5be7939;
 Thu, 14 Dec 2023 16:32:57 +0100 (CET)
Received: by mail-wm1-x32a.google.com with SMTP id
 5b1f17b1804b1-40c60dfa5bfso10777195e9.0
 for <win-pv-devel@lists.xenproject.org>; Thu, 14 Dec 2023 07:32:58 -0800 (PST)
Received: from localhost.localdomain ([185.25.65.68])
 by smtp.gmail.com with ESMTPSA id
 j8-20020a05600c190800b0040c58e410a3sm7806563wmq.14.2023.12.14.07.32.54
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 14 Dec 2023 07:32:54 -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: 0eb7ec92-9a96-11ee-9b0f-b553b5be7939
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=cloud.com; s=cloud; t=1702567977; x=1703172777; darn=lists.xenproject.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=sc2iviYe/6QHWxodYH9SaYabUjC71dfm4zSvKq9CueE=;
        b=c9P0PrC7kKPsTap70Rb6vjKdW+ljQ5KuF1alZOq8DA2Tt5WtoxIg+/BNm729vLoYil
         /HhYUGjdm1Zt6tgY58RfFYRlQovOy4l9KeOojXkr22lRxoM2BaGJGBoRg+6U32rkwrhg
         KPZgYx8+2AGZA0YA8y6HYAqnz+kaO0AsHSOLc=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702567977; x=1703172777;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=sc2iviYe/6QHWxodYH9SaYabUjC71dfm4zSvKq9CueE=;
        b=FeUzKrsemHpZc/47KODGWfYQchzzsd93qvEU09RR5h67WCNdN4UXt1Tfak6HjpQBpZ
         +/1C/XFgr3cCIsNNyiANAuNcMIvXpir3+TkPpLWuQ3hhCACXw09ApZ/xDATc0rEtzhN+
         uhfook9utVgrNiDwSeRhz6X3Zyzx2ZodcJvHwF81VW8E9jMHKyZ+GlJJFpMJLKkukhxy
         6DhasT2CZ5gNX2CKWawfLx4gOQzKJ1MUMs+lL2bufzo7HmzbQy7U3/h6wxktUng9wGko
         Y9NxBayKb8XZnCUViz2HdKhENVGK5sLQBKoj7QDD5rzI844pTgLfzHRLAAUXRG8c2adE
         zG3g==
X-Gm-Message-State: AOJu0YyNfpuhOtDHFthIZbao/h8Eox1dBzOXFKAyAjKx6dy96U4C4rb1
	IRCHwGO5a88t0s8NHdOrHdjQ0A1VDkMwf4grjA==
X-Google-Smtp-Source: AGHT+IGE99CYI90RFj/v8oOJuzXSqqEVSsCZ7ODPzezDlHwRCPGBKDo2l14wDjne3hZt3mWQ0NoqvA==
X-Received: by 2002:a05:600c:2804:b0:40c:3eab:d987 with SMTP id m4-20020a05600c280400b0040c3eabd987mr4787844wmb.125.1702567977577;
        Thu, 14 Dec 2023 07:32:57 -0800 (PST)
From: Owen Smith <owen.smith@cloud.com>
To: win-pv-devel@lists.xenproject.org
Cc: Owen Smith <owen.smith@cloud.com>
Subject: [PATCH 3/3] Rework PdoStartDevice()
Date: Thu, 14 Dec 2023 15:32:40 +0000
Message-ID: <20231214153240.1934-3-owen.smith@cloud.com>
X-Mailer: git-send-email 2.41.0.windows.3
In-Reply-To: <20231214153240.1934-1-owen.smith@cloud.com>
References: <20231214153240.1934-1-owen.smith@cloud.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Moves MIB table parsing, detection of aliased device and copying of network
settings to a seperate function, to avoid any failures to the START_DEVICE
IRP if network alias detection and settings copying code fails. The only failure
of note is STATUS_PNP_REBOOT_REQUIRED, indicating the VM requires a reboot to
replace emulated devices.
Windows Update will reject driver updates if sufficient install failures or
failures within 2 days of install are detected (> 5% of installs). Completing
the START_DEVICE IRP with any failure other than STATUS_PNP_REBOOT_REQUIRED will
cause an installation failure (Code 10) and lead to driver updates being removed
from Windows Update.

Signed-off-by: Owen Smith <owen.smith@cloud.com>
---
 src/xenvif/pdo.c | 146 +++++++++++++++++++++++++----------------------
 1 file changed, 77 insertions(+), 69 deletions(-)

diff --git a/src/xenvif/pdo.c b/src/xenvif/pdo.c
index f23b047..0cef2d5 100644
--- a/src/xenvif/pdo.c
+++ b/src/xenvif/pdo.c
@@ -95,8 +95,6 @@ struct _XENVIF_PDO {
 
     PXENVIF_VIF_CONTEXT         VifContext;
     XENVIF_VIF_INTERFACE        VifInterface;
-
-    BOOLEAN                     HasAlias;
 };
 
 static FORCEINLINE PVOID
@@ -1272,64 +1270,34 @@ PdoUnplugRequested(
     return State;
 }
 
-static DECLSPEC_NOINLINE NTSTATUS
-PdoStartDevice(
+static FORCEINLINE NTSTATUS
+PdoParseMibTable(
     IN  PXENVIF_PDO     Pdo,
-    IN  PIRP            Irp
+    IN  HANDLE          SoftwareKey
     )
 {
     NTSTATUS            (*__GetIfTable2)(PMIB_IF_TABLE2 *);
     VOID                (*__FreeMibTable)(PVOID);
     PMIB_IF_TABLE2      Table;
     ULONG               Index;
-    PIO_STACK_LOCATION  StackLocation;
-    HANDLE              SoftwareKey;
-    HANDLE              HardwareKey;
     GUID                Guid;
     NTSTATUS            status;
 
-    status = STATUS_UNSUCCESSFUL;
-    if (Pdo->HasAlias)
-        goto fail1;
-
-    if (DriverSafeMode())
-        goto fail2;
-
-    status = RegistryOpenSoftwareKey(__PdoGetDeviceObject(Pdo),
-                                     KEY_READ,
-                                     &SoftwareKey);
-    if (!NT_SUCCESS(status))
-        goto fail3;
-
-    status = RegistryOpenHardwareKey(__PdoGetDeviceObject(Pdo),
-                                     KEY_ALL_ACCESS,
-                                     &HardwareKey);
-    if (!NT_SUCCESS(status))
-        goto fail4;
-
-    (VOID) PdoSetFriendlyName(Pdo,
-                              SoftwareKey,
-                              HardwareKey);
-
-    status = __PdoSetCurrentAddress(Pdo, SoftwareKey);
-    if (!NT_SUCCESS(status))
-        goto fail5;
-
     status = LinkGetRoutineAddress("netio.sys",
                                    "GetIfTable2",
                                    (PVOID *)&__GetIfTable2);
     if (!NT_SUCCESS(status))
-        goto fail6;
+        goto fail1;
 
     status = LinkGetRoutineAddress("netio.sys",
                                    "FreeMibTable",
                                    (PVOID *)&__FreeMibTable);
     if (!NT_SUCCESS(status))
-        goto fail7;
+        goto fail2;
 
     status = __GetIfTable2(&Table);
     if (!NT_SUCCESS(status))
-        goto fail8;
+        goto fail3;
 
     //
     // Look for a network interface with the same permanent address
@@ -1364,16 +1332,8 @@ PdoStartDevice(
                             &Row->InterfaceGuid,
                             &Row->InterfaceLuid);
 
-        Pdo->HasAlias = TRUE;
-        break;
-    }
-
-    if (Pdo->HasAlias || !PdoUnplugRequested(Pdo)) {
-        PdoUnplugRequest(Pdo, TRUE);
-        DriverRequestReboot();
-
         status = STATUS_PNP_REBOOT_REQUIRED;
-        goto fail9;
+        goto fail4;
     }
 
     //
@@ -1416,11 +1376,76 @@ PdoStartDevice(
                                &Luid);
     }
 
+    __FreeMibTable(Table);
+
+    return STATUS_SUCCESS;
+
+fail4:
+    Error("fail4\n");
+
+    __FreeMibTable(Table);
+
+fail3:
+    Error("fail3\n");
+
+fail2:
+    Error("fail2\n");
+
+fail1:
+    Error("fail1 (%08x)\n", status);
+
+    return status;
+}
+
+static DECLSPEC_NOINLINE NTSTATUS
+PdoStartDevice(
+    IN  PXENVIF_PDO     Pdo,
+    IN  PIRP            Irp
+    )
+{
+    PIO_STACK_LOCATION  StackLocation;
+    HANDLE              SoftwareKey;
+    HANDLE              HardwareKey;
+    NTSTATUS            status;
+
+    status = STATUS_UNSUCCESSFUL;
+    if (DriverSafeMode())
+        goto fail1;
+
+    status = RegistryOpenSoftwareKey(__PdoGetDeviceObject(Pdo),
+                                     KEY_READ,
+                                     &SoftwareKey);
+    if (!NT_SUCCESS(status))
+        goto fail2;
+
+    status = RegistryOpenHardwareKey(__PdoGetDeviceObject(Pdo),
+                                     KEY_ALL_ACCESS,
+                                     &HardwareKey);
+    if (!NT_SUCCESS(status))
+        goto fail3;
+
+    (VOID) PdoSetFriendlyName(Pdo,
+                              SoftwareKey,
+                              HardwareKey);
+
+    status = __PdoSetCurrentAddress(Pdo, SoftwareKey);
+    if (!NT_SUCCESS(status))
+        goto fail4;
+
+    status = PdoParseMibTable(Pdo, SoftwareKey);
+    if (status == STATUS_PNP_REBOOT_REQUIRED || !PdoUnplugRequested(Pdo)) {
+        PdoUnplugRequest(Pdo, TRUE);
+        DriverRequestReboot();
+
+        status = STATUS_PNP_REBOOT_REQUIRED;
+        goto fail5;
+    }
+
     StackLocation = IoGetCurrentIrpStackLocation(Irp);
 
     status = PdoD3ToD0(Pdo);
     if (!NT_SUCCESS(status))
-        goto fail10;
+        goto fail6;
 
     PdoUnplugRequest(Pdo, TRUE);
 
@@ -1429,45 +1454,29 @@ PdoStartDevice(
     Irp->IoStatus.Status = STATUS_SUCCESS;
     IoCompleteRequest(Irp, IO_NO_INCREMENT);
 
-    __FreeMibTable(Table);
-
     RegistryCloseKey(HardwareKey);
     RegistryCloseKey(SoftwareKey);
 
     return STATUS_SUCCESS;
 
-fail10:
-    Error("fail10\n");
-
-fail9:
-    Error("fail9\n");
-
-    __FreeMibTable(Table);
-
-fail8:
-    Error("fail8\n");
-
-fail7:
-    Error("fail7\n");
-
 fail6:
     Error("fail6\n");
 
-    RtlZeroMemory(&Pdo->CurrentAddress, sizeof (ETHERNET_ADDRESS));
-
 fail5:
     Error("fail5\n");
 
-    RegistryCloseKey(HardwareKey);
+    RtlZeroMemory(&Pdo->CurrentAddress, sizeof (ETHERNET_ADDRESS));
 
 fail4:
     Error("fail4\n");
 
-    RegistryCloseKey(SoftwareKey);
+    RegistryCloseKey(HardwareKey);
 
 fail3:
     Error("fail3\n");
 
+    RegistryCloseKey(SoftwareKey);
+
 fail2:
     Error("fail2\n");
 
@@ -2892,7 +2901,6 @@ PdoDestroy(
     PXENVIF_FDO     Fdo = __PdoGetFdo(Pdo);
 
     Pdo->UnplugRequested = FALSE;
-    Pdo->HasAlias = FALSE;
 
     ASSERT3U(__PdoGetDevicePnpState(Pdo), ==, Deleted);
 
-- 
2.41.0.windows.3



From win-pv-devel-bounces@lists.xenproject.org Fri Dec 15 16:11:14 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 15 Dec 2023 16:11:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.655201.1022910 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rEAmN-0007Oh-9A; Fri, 15 Dec 2023 16:11:11 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 655201.1022910; Fri, 15 Dec 2023 16:11:11 +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 1rEAmN-0007Oa-6N; Fri, 15 Dec 2023 16:11:11 +0000
Received: by outflank-mailman (input) for mailman id 655201;
 Fri, 15 Dec 2023 16:11:09 +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=AZg/=H2=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rEAmL-0007OS-N1
 for win-pv-devel@lists.xenproject.org; Fri, 15 Dec 2023 16:11:09 +0000
Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com
 [2a00:1450:4864:20::333])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id 8e0afd3b-9b64-11ee-98ea-6d05b1d4d9a1;
 Fri, 15 Dec 2023 17:11:08 +0100 (CET)
Received: by mail-wm1-x333.google.com with SMTP id
 5b1f17b1804b1-40c4846847eso8988245e9.1
 for <win-pv-devel@lists.xenproject.org>; Fri, 15 Dec 2023 08:11:07 -0800 (PST)
Received: from [192.168.2.38] (54-240-197-238.amazon.com. [54.240.197.238])
 by smtp.gmail.com with ESMTPSA id
 fl9-20020a05600c0b8900b0040b43da0bbasm29926937wmb.30.2023.12.15.08.11.06
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 15 Dec 2023 08:11:06 -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: 8e0afd3b-9b64-11ee-98ea-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702656667; x=1703261467; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=rVCuMgG9iBf+atjruXdBqHBnjtHDerqE3+UL8xnWCf0=;
        b=D11Y+9EjRxWMD1D1sEU/zO4++bO/piFqcRMoh7GU1Sxw63i5Q2AE1tmyYYd978vXQd
         LmLA9QlVFzIjVYd2XdpKIwsW6r7zvU9u/lCWY7Zmfn6WIqbnfmf12io151B4sIg4TcYk
         hdX4p4x2lDvbCNTaK4XVylbGrS/XBfdcX1Pek5kYMrOvfGXJVFkmgP5yLAJTUZw4g0/X
         a/zz5PEFZqzFwe8lCfy5B4aEIXrgsuDJNVESGnSzg+tJQ5gkceKNjmQ24sZYVcM7vUFI
         C2UI2ZkXdZn6VAer+FX1Y1iiQt6j3aRB7bj8yqdvqNE+Dq8rMA12nqmq4EWxS7p3BzAj
         e5uw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702656667; x=1703261467;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=rVCuMgG9iBf+atjruXdBqHBnjtHDerqE3+UL8xnWCf0=;
        b=WIrNyXaaKXUt95HAfc9BVEn+zmA+zE+o8VbVDL9cxaoE+DgLfPf5AoiVlPXFoQdf9N
         CDaRhCpVilU+qAmORIKWy5GNhNbIGZ0dRoqGfL4tx/Pglrlvr6DpH3jP/g9Hn4l4fV2K
         /NI85NexXM5MNqQqiaR0pZGPr8ZQFjb12tBc/bYltJrJtOeXFSBJvfcrXTuF4HrsXQfl
         IBFANXAVDBWPRPx/J2owTwM5uWzTtrvAtuTX3D/+yYZt98/9PPsBvra1xyyNq9O88ky1
         7uCyCY3ahLwSM944Y++pG54B6pjoThNkpVDPRPqEw9QJk2YFOhn73FtbGihZclqYQfW+
         ieVg==
X-Gm-Message-State: AOJu0YwYaoWMMmcqczziUvR1HYy0P/WYeZ5e+V3EnO9qxMCPfD5FubQS
	oWvZcPG8savujjFl5WiiNOJF4THh7+SvPg==
X-Google-Smtp-Source: AGHT+IEVrjRwGWGVy+Wr3f9kDqdKuaGoo0tkj9XB3ugVdkMOXuqxtgOkNtAXziLlh5UVaGTHhYa1PQ==
X-Received: by 2002:a05:600c:601f:b0:40c:33d9:6998 with SMTP id az31-20020a05600c601f00b0040c33d96998mr6456730wmb.132.1702656667125;
        Fri, 15 Dec 2023 08:11:07 -0800 (PST)
Message-ID: <4ac5014a-17c3-4448-947d-afbc60ca4d88@gmail.com>
Date: Fri, 15 Dec 2023 16:11:05 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: paul@xen.org
Subject: Re: [RFC PATCH 1/6] Fix minor xencontrol issues
Content-Language: en-US
To: win-pv-devel@lists.xenproject.org
References: <cover.1702373837.git.omeg@invisiblethingslab.com>
 <228b54a2a8bb4caf84b58cff76b10f3575dcb750.1702373837.git.omeg@invisiblethingslab.com>
From: "Durrant, Paul" <xadimgnik@gmail.com>
In-Reply-To: <228b54a2a8bb4caf84b58cff76b10f3575dcb750.1702373837.git.omeg@invisiblethingslab.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

On 12/12/2023 09:38, Rafał Wojdyła wrote:
> - Fix mismatched XcStoreRead() function signatures
> - Fix memory leak in XcOpen()
> - Fix IOCTL names in error messages
> 
> Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
> ---
>   include/xencontrol.h        |  2 +-
>   src/xencontrol/xencontrol.c | 10 ++++++----
>   2 files changed, 7 insertions(+), 5 deletions(-)
> 

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



From win-pv-devel-bounces@lists.xenproject.org Fri Dec 15 16:11:52 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 15 Dec 2023 16:11:52 +0000
Received: from list by lists.xenproject.org with outflank-mailman.655203.1022915 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rEAn2-0007UH-Cs; Fri, 15 Dec 2023 16:11:52 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 655203.1022915; Fri, 15 Dec 2023 16:11: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 1rEAn2-0007U8-9O; Fri, 15 Dec 2023 16:11:52 +0000
Received: by outflank-mailman (input) for mailman id 655203;
 Fri, 15 Dec 2023 16:11:51 +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=AZg/=H2=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rEAn1-0007Tw-0u
 for win-pv-devel@lists.xenproject.org; Fri, 15 Dec 2023 16:11:51 +0000
Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com
 [2a00:1450:4864:20::331])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id a6032c77-9b64-11ee-9b0f-b553b5be7939;
 Fri, 15 Dec 2023 17:11:49 +0100 (CET)
Received: by mail-wm1-x331.google.com with SMTP id
 5b1f17b1804b1-40c236624edso8946485e9.1
 for <win-pv-devel@lists.xenproject.org>; Fri, 15 Dec 2023 08:11:48 -0800 (PST)
Received: from [192.168.2.38] (54-240-197-238.amazon.com. [54.240.197.238])
 by smtp.gmail.com with ESMTPSA id
 fl9-20020a05600c0b8900b0040b43da0bbasm29926937wmb.30.2023.12.15.08.11.47
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 15 Dec 2023 08:11:47 -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: a6032c77-9b64-11ee-9b0f-b553b5be7939
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702656707; x=1703261507; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=Opgq8iQ9VwwEdeM9VDq46tz0J5c8YTvkkZHcGmODqyM=;
        b=ZhT1ARt+6ocZf0InoVAK6cYVxDO1waRtZMozaoSJJOOakQ7mma499U4BFjTeK28WHJ
         onU0w3u18ILXhraoHZRMa6ezCs+zX/uYiKlcWju/MNSdgAYrTje7fnxi+fnLguEI1OQF
         8CcznzG8+mC2ie2cpehhd8a7QtCynRc95zlgQWUqBZ6GsPDeVazPkHmyMJsyG1TCexYv
         uSYSBKhg+58VrnESuO8tvZjMwkdotcaADuT2up6VuHvOy7WyLnBWpF6CE90UftAo8lKa
         VTqFUocZ/o8nDSIkZmTRO26K0QuSFYql61FcSxk+DGpOOq8Evk4yrc/EK7EqY72qLCSW
         Fiyw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702656707; x=1703261507;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=Opgq8iQ9VwwEdeM9VDq46tz0J5c8YTvkkZHcGmODqyM=;
        b=RZunaMiz2cWDf4c1t7qkzQlhK9sGjoySh0ep98q/Bhli/UiXAIGhTpRdyZO3C0NfIA
         dndwK6pkKA3qcNSi/euGOyb1q5KA1jcxz9vP8JXgyRs7R+MH7FiUD0G8UROAKtEcueM0
         IX3lLHP0E3yajDcJtqiHfWaKlQqZUKvkU0kqkyVXI+P9HXgdy1eUjKK32kS9KqL85NHE
         yHWEzyuo7bCo9wpjmEHeZ33DkSmqbh5cb5DEUIXYO71xg4rxN0Kj+TsZTX6oPwvMLPJg
         JjR17Zhkx0KReGwLPzBD4ZxH/svhcr9KN8oVBRcm5cRaQGiLavG2TcWmEyg29P+zY6/5
         qPxg==
X-Gm-Message-State: AOJu0YyiH1hRBHeeoqVYTBnolGXXrZ5LIfIpAys4wSluDh2dhGh+Q7xB
	TIp2m36fb6bGuZ2rO1zfbYIUQYI5a7lQWw==
X-Google-Smtp-Source: AGHT+IGV+Xs3Dp2pcnSTOWXeCG1CbJ/8SIyZVEC3lTs4ciPwXSHec/mYQlS4LqlwzZZUjdfXVTz0sg==
X-Received: by 2002:a05:600c:4285:b0:40c:1df2:c9a2 with SMTP id v5-20020a05600c428500b0040c1df2c9a2mr6222335wmc.126.1702656707579;
        Fri, 15 Dec 2023 08:11:47 -0800 (PST)
Message-ID: <0f0ae660-1d7b-4d92-9a89-257e4a93f063@gmail.com>
Date: Fri, 15 Dec 2023 16:11:47 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: paul@xen.org
Subject: Re: [RFC PATCH 2/6] Fix parameter annotation for
 __FreeCapturedBuffer()
Content-Language: en-US
To: win-pv-devel@lists.xenproject.org
References: <cover.1702373837.git.omeg@invisiblethingslab.com>
 <864c94b17f4e6bfbf575ce3896a068ebcf02daa5.1702373837.git.omeg@invisiblethingslab.com>
From: "Durrant, Paul" <xadimgnik@gmail.com>
In-Reply-To: <864c94b17f4e6bfbf575ce3896a068ebcf02daa5.1702373837.git.omeg@invisiblethingslab.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

On 12/12/2023 09:38, Rafał Wojdyła wrote:
> CapturedBuffer is optional, mark it so.
> 
> Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
> ---
>   src/xeniface/ioctls.c | 2 +-
>   src/xeniface/ioctls.h | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 

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



From win-pv-devel-bounces@lists.xenproject.org Fri Dec 15 16:13:24 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 15 Dec 2023 16:13:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.655221.1022947 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rEAoW-0000Zj-CR; Fri, 15 Dec 2023 16:13:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 655221.1022947; Fri, 15 Dec 2023 16:13:24 +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 1rEAoW-0000Zc-9p; Fri, 15 Dec 2023 16:13:24 +0000
Received: by outflank-mailman (input) for mailman id 655221;
 Fri, 15 Dec 2023 16:13:23 +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=AZg/=H2=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rEAoV-00080g-3W
 for win-pv-devel@lists.xenproject.org; Fri, 15 Dec 2023 16:13:23 +0000
Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com
 [2a00:1450:4864:20::32a])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id de56f047-9b64-11ee-98ea-6d05b1d4d9a1;
 Fri, 15 Dec 2023 17:13:22 +0100 (CET)
Received: by mail-wm1-x32a.google.com with SMTP id
 5b1f17b1804b1-40c2c65e6aaso9741855e9.2
 for <win-pv-devel@lists.xenproject.org>; Fri, 15 Dec 2023 08:13:22 -0800 (PST)
Received: from [192.168.2.38] (54-240-197-238.amazon.com. [54.240.197.238])
 by smtp.gmail.com with ESMTPSA id
 fl9-20020a05600c0b8900b0040b43da0bbasm29926937wmb.30.2023.12.15.08.13.21
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 15 Dec 2023 08:13:21 -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: de56f047-9b64-11ee-98ea-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702656802; x=1703261602; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=FnqSuB4aea/ecw+YtNggvMlyJghwwTn/SFgOOib7jeg=;
        b=m41FUWMWcDyaFCON4dGNFcE07Gz81urndZKjhts+w7Q3LTxlZYH39DVW/afrfwq0Nj
         dK80nvXjhoxxzf6oCGfIUcXhstfaj21A3YwWyU106moqa9GPYzyOMZVJIm+jiohEzf9c
         oxO0kHVo3bEF3UTZqxJpItPsCW1791JTi3Y9HB+vbyXuL+ULWinn6TRzd8MSgLZgEBWM
         9+J9+rc2ufKLJXY6e+35SivesqolEmhj2rsdh9ek2XfB8ReOsC8PInp68dnHyQc/1T7u
         y0iXgu4kWCRhT+Aqy4n1Cr7EpSKOP1VqsRHG7W+5mVRU0eH9r08ptHiolWpILLgEXNAU
         dyEA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702656802; x=1703261602;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=FnqSuB4aea/ecw+YtNggvMlyJghwwTn/SFgOOib7jeg=;
        b=BQf36h8ZLvcbh4Hyk+CW8ZblBVFMZzCsEulTFsPcWoKcXGRWFTXDwe6wftGYLRVUuU
         3Xx5scALqa12Avx8Okw8wUab4tq+eU7NKhnU41ZY1BFksbSKXK4bGpleCtbUgJD6irfU
         x2oNc+BeissbuoIu/Z+WUXIooK/x8YPxeEjzMaGQ5a47vFZvRNMGiVOpQ4KviqWUNuUu
         vDFWGbotYez9PP9r647xATMLeULRxwxx6Y5dn28EpN7buA4U6HsjD6/DvPnW4HlbU3mG
         Y9gw3zK9GrXb5A+74bkaDqxYbK/aP7cxr1NFAlXpfYnUsYtQm5TeYAGaiRpGoSHR1U/y
         ETAg==
X-Gm-Message-State: AOJu0YwzqqWpY4NN5dTQlySHtKjqY+lmlFdid+sbxt/+e85xS5X/QWcl
	S8oxu+Sp9gUhZQOUhz4nrBg+x7Y4kQL7NQ==
X-Google-Smtp-Source: AGHT+IHApydfxT0pKgcjKXtqnaupwXyG/jP7FT5z/iEAUe4gEu1L1bKaBjaJDcsSY7u1P7RFJnSrbg==
X-Received: by 2002:a7b:c4ca:0:b0:40c:2b87:de8b with SMTP id g10-20020a7bc4ca000000b0040c2b87de8bmr5970921wmk.132.1702656801924;
        Fri, 15 Dec 2023 08:13:21 -0800 (PST)
Message-ID: <427f7225-912e-4690-a400-d4d64ba5bdd7@gmail.com>
Date: Fri, 15 Dec 2023 16:13:21 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: paul@xen.org
Subject: Re: [RFC PATCH 3/6] __CaptureUserBuffer(): zero CapturedBuffer on
 failure in all cases
Content-Language: en-US
To: win-pv-devel@lists.xenproject.org
References: <cover.1702373837.git.omeg@invisiblethingslab.com>
 <5655177819cab6c17ec8934fd05691176679257b.1702373837.git.omeg@invisiblethingslab.com>
From: "Durrant, Paul" <xadimgnik@gmail.com>
In-Reply-To: <5655177819cab6c17ec8934fd05691176679257b.1702373837.git.omeg@invisiblethingslab.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

On 12/12/2023 09:38, Rafał Wojdyła wrote:
> Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
> ---
>   src/xeniface/ioctls.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 

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



From win-pv-devel-bounces@lists.xenproject.org Fri Dec 15 16:14:55 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 15 Dec 2023 16:14:55 +0000
Received: from list by lists.xenproject.org with outflank-mailman.655228.1022951 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rEApz-0000tN-H3; Fri, 15 Dec 2023 16:14:55 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 655228.1022951; Fri, 15 Dec 2023 16:14:55 +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 1rEApz-0000tG-Ea; Fri, 15 Dec 2023 16:14:55 +0000
Received: by outflank-mailman (input) for mailman id 655228;
 Fri, 15 Dec 2023 16:14:54 +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=AZg/=H2=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rEApy-0000t6-I9
 for win-pv-devel@lists.xenproject.org; Fri, 15 Dec 2023 16:14:54 +0000
Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com
 [2a00:1450:4864:20::329])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id 149b1519-9b65-11ee-98ea-6d05b1d4d9a1;
 Fri, 15 Dec 2023 17:14:53 +0100 (CET)
Received: by mail-wm1-x329.google.com with SMTP id
 5b1f17b1804b1-40b5155e154so9737735e9.3
 for <win-pv-devel@lists.xenproject.org>; Fri, 15 Dec 2023 08:14:53 -0800 (PST)
Received: from [192.168.2.38] (54-240-197-238.amazon.com. [54.240.197.238])
 by smtp.gmail.com with ESMTPSA id
 fl9-20020a05600c0b8900b0040b43da0bbasm29926937wmb.30.2023.12.15.08.14.52
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 15 Dec 2023 08:14:52 -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: 149b1519-9b65-11ee-98ea-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702656893; x=1703261693; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=5C3k2Xp0zXkRQzh0GRPHZCC1Mbm5j4dMwVI8/HAD3k8=;
        b=jGNCnpi5WbvP8fuNjfXwXxtb1eBSqlF4KBNVX3Y22n4O60bEaZKiYTGFf28C6bcrwQ
         S+bUnlDmfWtxbJ7jhhDf0O1xwOqlRDF9Uo+2csDtr22kj+gfLEx4bRbvcOQrV7ym1TS2
         CjeMPt600N5+K4PiNgTl8gFnprgoZv9DyObbGd6QjH8Ltb6IsB4LC2tXJZvlWxkeT8a8
         DrMx6TaxKhr93sol6h/0NouuVZRcEj71CHG7LTrgCY14rf0PP2FxOhTWzIgsHzbgYjGx
         MyVKLws9Bw8hpQ6dUs+eRxtZcdS5/Mli2U9t90SVHrmbe8+FqrGr6pfz4xP7iYDpNyFu
         yHzw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702656893; x=1703261693;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=5C3k2Xp0zXkRQzh0GRPHZCC1Mbm5j4dMwVI8/HAD3k8=;
        b=J49OQsxjWiBxYSLDw8s/sRdNCKguAVRQ9ps9BvkhyzQawUA2wBNpU77C/k0l28wAR8
         fDBYsXFsBNt7KMti/e+XKgDfvjt9i00xQJ6aWD2eRpjic1fR6QYalO0iKzsMKxNnEh3N
         lHDpclLpE10RBujKcQP85mYzKag8S8meo17MM+JWGrI/2MQI2qRl9zXHEG+Nlp2Jvnbz
         d3g35EICDOD3p8cdSRFUFjaAdAeabrdyk1HAGvXkc4m2LHub5l/8vnflpBgt5QsIneEV
         xp5gGkEIF52tNcwqQeSEsy03K4LGCBDQWVx6LsGT+r3nnB2e3fpQiO3mQJc4ddYyAXHC
         03bA==
X-Gm-Message-State: AOJu0Yy24+PZfFg/Idn+Y8uyUVNeosxBXCaWYT2gbnv9kjWMnfN6zrNc
	fiyKYd62+y49CiwNKDjcAeLMD6ULxDTAQg==
X-Google-Smtp-Source: AGHT+IG7fRiMefeuEZ4GnkhK+X6nNvaZMJZBoLRYaovgBCI7wgBUhxpEmGNxGvCQ0EASiWoaAjOL9A==
X-Received: by 2002:a05:600c:2945:b0:40c:3c72:608f with SMTP id n5-20020a05600c294500b0040c3c72608fmr5618021wmd.17.1702656893034;
        Fri, 15 Dec 2023 08:14:53 -0800 (PST)
Message-ID: <f92e48bd-e1ad-4dfd-91e1-4284c3230be4@gmail.com>
Date: Fri, 15 Dec 2023 16:14:52 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: paul@xen.org
Subject: Re: [RFC PATCH 4/6] Remove unused function declarations from ioctls.h
Content-Language: en-US
To: win-pv-devel@lists.xenproject.org
References: <cover.1702373837.git.omeg@invisiblethingslab.com>
 <f016a634c6c45e535793eb0d319d576d2e2bde99.1702373837.git.omeg@invisiblethingslab.com>
From: "Durrant, Paul" <xadimgnik@gmail.com>
In-Reply-To: <f016a634c6c45e535793eb0d319d576d2e2bde99.1702373837.git.omeg@invisiblethingslab.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

On 12/12/2023 09:38, Rafał Wojdyła wrote:
> Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
> ---
>   src/xeniface/ioctls.h | 20 --------------------
>   1 file changed, 20 deletions(-)
> 

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



From win-pv-devel-bounces@lists.xenproject.org Fri Dec 15 16:33:06 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 15 Dec 2023 16:33:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.655271.1022977 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rEB7Z-0004vD-Bt; Fri, 15 Dec 2023 16:33:05 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 655271.1022977; Fri, 15 Dec 2023 16:33:05 +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 1rEB7Z-0004v6-7X; Fri, 15 Dec 2023 16:33:05 +0000
Received: by outflank-mailman (input) for mailman id 655271;
 Fri, 15 Dec 2023 16:33:03 +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=AZg/=H2=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rEB7X-0004uW-9E
 for win-pv-devel@lists.xenproject.org; Fri, 15 Dec 2023 16:33:03 +0000
Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com
 [2a00:1450:4864:20::42d])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id 9cc9522b-9b67-11ee-9b0f-b553b5be7939;
 Fri, 15 Dec 2023 17:33:01 +0100 (CET)
Received: by mail-wr1-x42d.google.com with SMTP id
 ffacd0b85a97d-3333074512bso1147243f8f.1
 for <win-pv-devel@lists.xenproject.org>; Fri, 15 Dec 2023 08:33:01 -0800 (PST)
Received: from [192.168.2.38] (54-240-197-238.amazon.com. [54.240.197.238])
 by smtp.gmail.com with ESMTPSA id
 p16-20020a5d48d0000000b0033616ea5a0fsm16211397wrs.45.2023.12.15.08.33.00
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 15 Dec 2023 08:33:00 -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: 9cc9522b-9b67-11ee-9b0f-b553b5be7939
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702657980; x=1703262780; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=/ElSRCvbJktooPRaT/vdYkGQ/rNK76e/iaW3xCSI+Os=;
        b=cpIr6JWGDMawXQb79pmQ7J50ByiwoE9+/RIYohLWspGuQ0leBi7YcdCMBYPIr7AZ2I
         6/A5ZotvEyENBqxIOFF4rcrtqJtNUdpmgtllSim1K7ybe53BMg8DafVoZpDshcC58my7
         MrcoDAmhkdzNB/q9R5OFxqbHM33a5pNDbu0uQ5sqFGIHwsduFcFPOohxepJ+kRtjwrm3
         DpbWLEK61SWqvMv9JL+jf4g1WWmktXlpSCujBdWJEWwpacZwxT7XXy53iebJvovPF3UL
         IbesylcG/OWUzyqDI+4D1flWYOx7ifdDhyGVN/Ds1nRPoEaM3X5r5XCbp/K9ULhpiETF
         qI8w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702657980; x=1703262780;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=/ElSRCvbJktooPRaT/vdYkGQ/rNK76e/iaW3xCSI+Os=;
        b=WE+jHhPGVEKk7uZk2rCE45N6b4djXBzoPBb0DKbv4rNGcGxeQVWKaeNFllgIcYhDnh
         CJvWoqGBHUiFJF6YxF7whfzL+Ruy55wcEJETj1ZX/GOs1Bu/05xMieOI5RPHhkDe2m9a
         vBt2MBHKBd2aB6VfpYRqWTLeKhZnczY359+GJ7fMt57b8nQhWn51pfvNoyhFsBxfVEaL
         J6nYuTLCJUo0vLVaL+Q06uhZqeuhBxVy8vx/EoHOXSOWDPygRZ7bqu1bAwqHkJhvIYOp
         2j6MBhMrCQxhYCCGyzCA1HovZbgHeG5E1uflQSVSh+edy2CXAvG7kUlnOzxmMI5q3s90
         JGyw==
X-Gm-Message-State: AOJu0Yw9nzfWAIbzz/zZ8rdQstnfTeOPeHH7Gmkcfo5qNYxAUVC7Als0
	hhfz8+Obqc3hnBjl7zpY7/1jtCnl8bhgCw==
X-Google-Smtp-Source: AGHT+IE7cBVBDtLEolTJ9OOLnaSlpqkn73tZjG7ZmRg/YxiKVst7ZdAqMC5DGlDsA7cTgd+ePGu05g==
X-Received: by 2002:a5d:6dc5:0:b0:333:1755:4638 with SMTP id d5-20020a5d6dc5000000b0033317554638mr6625507wrz.11.1702657980596;
        Fri, 15 Dec 2023 08:33:00 -0800 (PST)
Message-ID: <46373dad-cc87-40fd-864e-e2b467a97e8b@gmail.com>
Date: Fri, 15 Dec 2023 16:32:59 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: paul@xen.org
Subject: Re: [RFC PATCH 5/6] Add gnttab IOCTLs that allow sharing already
 existing memory
Content-Language: en-US
To: win-pv-devel@lists.xenproject.org
References: <cover.1702373837.git.omeg@invisiblethingslab.com>
 <f219c23e8bee0af908c820aa0440a496231be1cb.1702373837.git.omeg@invisiblethingslab.com>
From: "Durrant, Paul" <xadimgnik@gmail.com>
In-Reply-To: <f219c23e8bee0af908c820aa0440a496231be1cb.1702373837.git.omeg@invisiblethingslab.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

On 12/12/2023 09:38, Rafał Wojdyła wrote:
> IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS shares pages that are
> newly allocated by the driver. This commit adds new IOCTLs:
> IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2,
> IOCTL_XENIFACE_GNTTAB_REVOKE_FOREIGN_ACCESS_V2,
> IOCTL_XENIFACE_GNTTAB_MAP_FOREIGN_PAGES_V2
> and IOCTL_XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_V2.
> 
> IOCTL_XENIFACE_GNTTAB_PERMIT_FOREIGN_ACCESS_V2 allows specifying
> user-mode address of a memory region that will be shared
> (the region is locked for the duration).
> 
> All _V2 IOCTLs use user-mode address of the shared region
> as a unique (per-process) request identifier. This differs from
> the existing IOCTLs that use client-supplied RequestId. _V2 IOCTLs
> should be considered as preferable since they don't require
> the client to manage IDs.
> 
> Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
> ---
>   include/xeniface_ioctls.h   |  94 ++++-
>   src/xeniface/ioctl_gnttab.c | 711 ++++++++++++++++++++++--------------
>   src/xeniface/ioctls.c       |  25 +-
>   src/xeniface/ioctls.h       |  75 ++--
>   src/xeniface/irp_queue.c    |  27 +-
>   src/xeniface/irp_queue.h    |   2 +-
>   6 files changed, 596 insertions(+), 338 deletions(-)
> 

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



From win-pv-devel-bounces@lists.xenproject.org Fri Dec 15 16:34:21 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 15 Dec 2023 16:34:21 +0000
Received: from list by lists.xenproject.org with outflank-mailman.655278.1022980 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rEB8n-0005Fo-Eb; Fri, 15 Dec 2023 16:34:21 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 655278.1022980; Fri, 15 Dec 2023 16:34: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 1rEB8n-0005Fh-Bi; Fri, 15 Dec 2023 16:34:21 +0000
Received: by outflank-mailman (input) for mailman id 655278;
 Fri, 15 Dec 2023 16:34:19 +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=AZg/=H2=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rEB8l-0005FZ-Px
 for win-pv-devel@lists.xenproject.org; Fri, 15 Dec 2023 16:34:19 +0000
Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com
 [2a00:1450:4864:20::430])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id cb29ca8d-9b67-11ee-98ea-6d05b1d4d9a1;
 Fri, 15 Dec 2023 17:34:18 +0100 (CET)
Received: by mail-wr1-x430.google.com with SMTP id
 ffacd0b85a97d-333536432e0so727909f8f.3
 for <win-pv-devel@lists.xenproject.org>; Fri, 15 Dec 2023 08:34:18 -0800 (PST)
Received: from [192.168.2.38] (54-240-197-238.amazon.com. [54.240.197.238])
 by smtp.gmail.com with ESMTPSA id
 p16-20020a5d48d0000000b0033616ea5a0fsm16211397wrs.45.2023.12.15.08.34.17
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 15 Dec 2023 08:34:18 -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: cb29ca8d-9b67-11ee-98ea-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702658058; x=1703262858; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=cOTxcZOMd7mr4dri9PNKyTD6jyI2ubzkV9UIaYnuQDI=;
        b=ED8E1Ir0D34CuA/f5uwg10cNKKRk2xNdcknduOpFbkKlBDIpxshfLjVsK10GtAjQu6
         mgN6v+sgZdXTn0ojBfluidD2qwun49GdQQG9B9PPemzx625wwdo9NNuxhe6FlIxsupIq
         bBuGMEjdXNtI/XEU+hTJ4Xq7I6l8GI2noJdnkUROpbAgxuFQbSVsOqdFjn7t3d5NhT/v
         r+VmdJQItevOZwgOsQjfq7uqMLDFUDr9S04tNCwAl0WsTw9mWJc1pEpZYOssN2L7zNeq
         vN6Daz5qOLzMheWgYg/XTclsM5M0YZ8fYpvmsTw7VZVjJkGqWJCYPt+s7S9EQnYSTnG4
         vkww==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702658058; x=1703262858;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=cOTxcZOMd7mr4dri9PNKyTD6jyI2ubzkV9UIaYnuQDI=;
        b=Ii2uS5t/jJTcAgVazXSlv1EE8wQXV98JiT8m61WoWhERNOSxVI7Amcu0jf+z04qt9j
         NrZanGVHE2FJgJq3Zr3n07KRCnpgGWS/Vy8wPzN2JJc1KNkq8n2qBhtIDThWnERCKnx7
         XVerHV4DmWWprNJ87KnsfKtyON13BtvoP+9hrLKxkeE/h+6u9s1/aNxi9Cnw3M5C0YaV
         Lp18F5P7sdvfTSc8pYTi03OvPA0HKkMLwywD1knoue26siAebHaFYQsK+1KxUJDLzkTj
         0E3W5Uhia46fnDl0VktJGxNJJBAXqvNo2pWSdjAvdL0wIUXdFtAfwwHSKKn2SuRNUj73
         Ej9w==
X-Gm-Message-State: AOJu0Yxno8TFQUO3wHDoyUTAH+gnx7WqZAKEfz418lD9Kc5oZPi0btk+
	sbmiR+Y/M8vT8eyE6s5h7329ON6nc2VRlg==
X-Google-Smtp-Source: AGHT+IHmKHBBZRipmyIgkL3T5PkVgZM3vjfditSdfDSHl/L85Y/uaSyu+4xqDrQlOpL9Bx27qVvzYg==
X-Received: by 2002:adf:f652:0:b0:333:2fd2:6f5c with SMTP id x18-20020adff652000000b003332fd26f5cmr6274214wrp.102.1702658058285;
        Fri, 15 Dec 2023 08:34:18 -0800 (PST)
Message-ID: <0f2c5335-2d4f-4fc7-9e64-678ac27bbf74@gmail.com>
Date: Fri, 15 Dec 2023 16:34:17 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: paul@xen.org
Subject: Re: [RFC PATCH 6/6] xencontrol: use IOCTL_XENIFACE_GNTTAB_*_V2 IOCTLs
Content-Language: en-US
To: win-pv-devel@lists.xenproject.org
References: <cover.1702373837.git.omeg@invisiblethingslab.com>
 <c488827b1271f5ed8439cf64c1b8b718a73ccb94.1702373837.git.omeg@invisiblethingslab.com>
From: "Durrant, Paul" <xadimgnik@gmail.com>
In-Reply-To: <c488827b1271f5ed8439cf64c1b8b718a73ccb94.1702373837.git.omeg@invisiblethingslab.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

On 12/12/2023 09:38, Rafał Wojdyła wrote:
> By using the _V2 IOCTLs we can remove all code used for handling
> RequestIds in legacy IOCTLs.
> 
> Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
> ---
>   include/xencontrol.h                |  28 ++++-
>   src/xencontrol/xencontrol.c         | 182 ++++++++++------------------
>   src/xencontrol/xencontrol_private.h |  33 -----
>   3 files changed, 91 insertions(+), 152 deletions(-)
> 

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



From win-pv-devel-bounces@lists.xenproject.org Tue Dec 19 08:25:09 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 19 Dec 2023 08:25:09 +0000
Received: from list by lists.xenproject.org with outflank-mailman.656592.1024878 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rFVPW-0005qY-SU; Tue, 19 Dec 2023 08:25:06 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 656592.1024878; Tue, 19 Dec 2023 08:25:06 +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 1rFVPW-0005qR-Pj; Tue, 19 Dec 2023 08:25:06 +0000
Received: by outflank-mailman (input) for mailman id 656592;
 Tue, 19 Dec 2023 08:25:05 +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=qbwo=H6=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rFVPV-0005qL-Kc
 for win-pv-devel@lists.xenproject.org; Tue, 19 Dec 2023 08:25:05 +0000
Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com
 [2a00:1450:4864:20::129])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id 1b2895d3-9e48-11ee-98eb-6d05b1d4d9a1;
 Tue, 19 Dec 2023 09:25:04 +0100 (CET)
Received: by mail-lf1-x129.google.com with SMTP id
 2adb3069b0e04-50bce78f145so4866472e87.0
 for <win-pv-devel@lists.xenproject.org>; Tue, 19 Dec 2023 00:25:02 -0800 (PST)
Received: from ?IPV6:2a00:23c7:dfa2:4f01:a880:b3e1:ea41:7d62?
 ([2a00:23c7:dfa2:4f01:a880:b3e1:ea41:7d62])
 by smtp.gmail.com with ESMTPSA id
 c11-20020adfef4b000000b003366f4406f6sm1904734wrp.97.2023.12.19.00.25.01
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 19 Dec 2023 00:25:01 -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: 1b2895d3-9e48-11ee-98eb-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702974302; x=1703579102; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:from:content-language
         :references:to:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=MLYrQu7V5DA/0/ipFbyzsakB5iQ4xb7qnQgBJ/VRafo=;
        b=JNgBdFKd5S5zBcKlMtZdBOPVxnJOTe5BnjmM7k9YJXIZxemvBvKrHHwGB66Lq7883/
         ifr/5aCZRTnr10oD+/6NeRmlSxVElafrzQ7CUGeeCBRDkFYu9QTfsHpeoOUc8C5V7H5U
         xbxs9TgW+8lNBM72nWNVPPDtutGmvICxChpx5Cte0VD0KX33eLwQaw+9Hm+++XuQJT9P
         L7U8gGm3cBEeTu07tgshrTaePsZXrDRk2J586m1/44UjNbBI40McxcAfD0JGzpjCtCEZ
         gsyKAYuFNTkcTRviTAht8294U/QsU8g/hzHpgzsvcLl7h32D7SPWYWz0T98wQQaBK+RF
         PkIQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702974302; x=1703579102;
        h=content-transfer-encoding:in-reply-to:from:content-language
         :references:to:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=MLYrQu7V5DA/0/ipFbyzsakB5iQ4xb7qnQgBJ/VRafo=;
        b=sXi0bmoglWQwU3GiMjqHWwgubi2DZJmUG+go8S4M66/hayb3kKgnhsTEoHRuSWHRUh
         bEZaVBh1sywgn3nPJan3a0ZrbqYQz0dKZv6xEYPlL3S9XjqSDSpPMUGW/gdY0ZPc3hvV
         zlK8crztVa1t79RPlPtU/Jnwl3egmVPW8OFFY46OMii0b2CA+Eu4wtN+PRsrBihIc21A
         HfKHdbWbZMUtfy4q6grUCo9UpkVenCzMe1KqOu3YkpiyTmmGBfgbP01Dsd74wkR/C0Mx
         2A9Sh/ixo8fHIev7ZT0kAYU0hDhg9KpeZyWXTQyvd0TlwXIvVxtGvmzo7lweB3Uc/LoV
         PKRg==
X-Gm-Message-State: AOJu0YwLkFsFFazg7GNpctllGSyrOXhNY6HYFvkqYPXhNc/gVOgRx50v
	6ZVKRt55ARVK40B4hvgUfBr+sFZlQC/5Rw==
X-Google-Smtp-Source: AGHT+IEedtw1Ze/WPpgih8tP3kAZ3kT1Em+KqTtL883XjxowDv+rTW2iL/J6P8znP34svbEPGt/7Rw==
X-Received: by 2002:a05:6512:31cf:b0:50e:3d28:c544 with SMTP id j15-20020a05651231cf00b0050e3d28c544mr802580lfe.78.1702974301850;
        Tue, 19 Dec 2023 00:25:01 -0800 (PST)
Message-ID: <c7ba98f4-6e78-48f9-9ac1-699a57635344@gmail.com>
Date: Tue, 19 Dec 2023 08:25:02 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: paul@xen.org
Subject: Re: [PATCH 1/3] Define UNPLUG interface revisions
To: win-pv-devel@lists.xenproject.org
References: <20231214153240.1934-1-owen.smith@cloud.com>
Content-Language: en-US
From: "Durrant, Paul" <xadimgnik@gmail.com>
In-Reply-To: <20231214153240.1934-1-owen.smith@cloud.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 14/12/2023 15:32, Owen Smith wrote:
> Adds the UNPLUG version requirements to the revision list, as XenVif uses the
> UNPLUG interface in PdoUnplugRequest() and PdoUnplugRequested().
> Extends the output in PdoDumpRevisions() and always ASSERTs on STORE and
> SUSPEND interface versions.
> Also defines revision 0x09000004 which requires UPLUG v2, as its required for
> PdoUnplugRequested().
> 
> Signed-off-by: Owen Smith <owen.smith@cloud.com>
> ---
>   include/revision.h | 14 ++++++++------
>   src/xenvif/pdo.c   | 36 ++++++++++++++++++++----------------
>   2 files changed, 28 insertions(+), 22 deletions(-)
> 

Yeah, this has been missing since forever. Just didn't matter until now :-)

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



From win-pv-devel-bounces@lists.xenproject.org Tue Dec 19 08:27:40 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 19 Dec 2023 08:27:40 +0000
Received: from list by lists.xenproject.org with outflank-mailman.656598.1024882 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rFVS0-0005yH-31; Tue, 19 Dec 2023 08:27:40 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 656598.1024882; Tue, 19 Dec 2023 08:27:40 +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 1rFVS0-0005yA-0T; Tue, 19 Dec 2023 08:27:40 +0000
Received: by outflank-mailman (input) for mailman id 656598;
 Tue, 19 Dec 2023 08:27: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=qbwo=H6=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rFVRz-0005y4-6U
 for win-pv-devel@lists.xenproject.org; Tue, 19 Dec 2023 08:27:39 +0000
Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com
 [2a00:1450:4864:20::32d])
 by se1-gles-flk1.inumbo.com (Halon) with ESMTPS
 id 77170c84-9e48-11ee-9b0f-b553b5be7939;
 Tue, 19 Dec 2023 09:27:37 +0100 (CET)
Received: by mail-wm1-x32d.google.com with SMTP id
 5b1f17b1804b1-40c6e2a47f6so43590325e9.0
 for <win-pv-devel@lists.xenproject.org>; Tue, 19 Dec 2023 00:27:36 -0800 (PST)
Received: from ?IPV6:2a00:23c7:dfa2:4f01:a880:b3e1:ea41:7d62?
 ([2a00:23c7:dfa2:4f01:a880:b3e1:ea41:7d62])
 by smtp.gmail.com with ESMTPSA id
 n11-20020a05600c3b8b00b0040b3d8907fesm922380wms.29.2023.12.19.00.27.35
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 19 Dec 2023 00:27:35 -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: 77170c84-9e48-11ee-9b0f-b553b5be7939
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702974456; x=1703579256; darn=lists.xenproject.org;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=h0rKwNMeE8uqRg9ugLsFnzISww25R/WnAEoPYTyvmsI=;
        b=SpXMI8D7m8e+n/aPohyCWLRfduvpvLsbwtMTUGpxRGTzrqqz5aXaCiJgNdaEKuP7iN
         qT0OpAPAamGatvLkjkUbtN754Yqgb1/LuGYtIlXov1w9AldwHcWeU8S05hQuS8+9b2Qm
         9fX6AIM0BEB63NOaO4BXHZbuI34qyuIUZ3EIGGkqwvOsyMtdwL2msvErrlHIMXzPokKd
         OHBZjK6XoMdBSiY8vD89F3bGqvQPgytcmXMAeRXtlBkILKhX5UNc342U6LLr2ZoWVQ3X
         ZAUt6XF5/fbrW+zTw4yu3kiEUipA1vzUR5M2DdW/OS5NCP987cpo43ZQXRR4VVYZfF9c
         Z+Ow==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702974456; x=1703579256;
        h=content-transfer-encoding:in-reply-to:from:references:to
         :content-language:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=h0rKwNMeE8uqRg9ugLsFnzISww25R/WnAEoPYTyvmsI=;
        b=vDEUUPB3bz6wkssKwHMSNdWWZFwGC8O2mj7jsfoLYpr9pX0Xc22x3bCKquDE7dVkBh
         tdKzgIHkVniow9ncKv/ZEvzPJYtjlIHYxC48fChksy5aZeLmuwVA3FBFUuOBQYY5OQo1
         iXmce0/Dep1kUqfDOWZ0W8OkZKOzxw9r62DpduONqvrXkMnl+g7vgBCNZnDTIpf8L9RB
         sBasA6EVe5Wiw8ra6mDK7SGhjyXHq31F9i98NspDU9RSPtE/zKx7yH6NNmlyEme8GLju
         dX5TmpQ4qCeeXxGrUUBlvBa9YncD8WA+eaPdNhUzSCMfGVrborBuNOG5XHh5N6ufeBaT
         tXtw==
X-Gm-Message-State: AOJu0Yy/Gg/e3dM5dNy9+EE+o/Sm1bVzDvM1XVGs/5W0kfmmsWn+Kzz3
	oOlmtaxXo/ISujm5mlqMYleAYCJSiPPgDA==
X-Google-Smtp-Source: AGHT+IEZrI/SrSHUOeRLmCwsh7oT7W5YuL93+yKV8IPGajST2yluN3LzH39vKYgAjFi3SbAESU9UdQ==
X-Received: by 2002:a05:600c:4e8d:b0:40c:6ca7:f010 with SMTP id f13-20020a05600c4e8d00b0040c6ca7f010mr1833141wmq.91.1702974456097;
        Tue, 19 Dec 2023 00:27:36 -0800 (PST)
Message-ID: <c30bfb5b-831b-4934-b0a5-7525b992b9be@gmail.com>
Date: Tue, 19 Dec 2023 08:27:35 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: paul@xen.org
Subject: Re: [PATCH 2/3] Fix issues in PdoStartDevice()
Content-Language: en-US
To: win-pv-devel@lists.xenproject.org
References: <20231214153240.1934-1-owen.smith@cloud.com>
 <20231214153240.1934-2-owen.smith@cloud.com>
From: "Durrant, Paul" <xadimgnik@gmail.com>
In-Reply-To: <20231214153240.1934-2-owen.smith@cloud.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 14/12/2023 15:32, Owen Smith wrote:
> HardwareKey was not being closed in normal operation.
> SoftwareKey only requires KEY_READ access.
> Move DriverRequestReboot() to the point it is required to avoid a 'goto' in
> the error handlers.
> 
> Signed-off-by: Owen Smith <owen.smith@cloud.com>
> ---
>   src/xenvif/pdo.c | 10 +++-------
>   1 file changed, 3 insertions(+), 7 deletions(-)
> 

Small whitespace change too, but it's fine.

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



From win-pv-devel-bounces@lists.xenproject.org Tue Dec 19 09:49:35 2023
Return-path: <win-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 19 Dec 2023 09:49:35 +0000
Received: from list by lists.xenproject.org with outflank-mailman.656623.1024927 (Exim 4.92)
	(envelope-from <win-pv-devel-bounces@lists.xenproject.org>)
	id 1rFWjE-0000Kg-OP; Tue, 19 Dec 2023 09:49:32 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 656623.1024927; Tue, 19 Dec 2023 09:49:32 +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 1rFWjE-0000KZ-Lf; Tue, 19 Dec 2023 09:49:32 +0000
Received: by outflank-mailman (input) for mailman id 656623;
 Tue, 19 Dec 2023 09:49: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=qbwo=H6=gmail.com=xadimgnik@srs-se1.protection.inumbo.net>)
 id 1rFWjE-0000KT-4M
 for win-pv-devel@lists.xenproject.org; Tue, 19 Dec 2023 09:49:32 +0000
Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com
 [2a00:1450:4864:20::32f])
 by se1-gles-sth1.inumbo.com (Halon) with ESMTPS
 id e823652b-9e53-11ee-98eb-6d05b1d4d9a1;
 Tue, 19 Dec 2023 10:49:31 +0100 (CET)
Received: by mail-wm1-x32f.google.com with SMTP id
 5b1f17b1804b1-40b5155e154so54267105e9.3
 for <win-pv-devel@lists.xenproject.org>; Tue, 19 Dec 2023 01:49:31 -0800 (PST)
Received: from [192.168.0.245] (54-240-197-239.amazon.com. [54.240.197.239])
 by smtp.gmail.com with ESMTPSA id
 n11-20020a05600c3b8b00b0040b3d8907fesm1214194wms.29.2023.12.19.01.49.29
 for <win-pv-devel@lists.xenproject.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 19 Dec 2023 01:49:30 -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: e823652b-9e53-11ee-98eb-6d05b1d4d9a1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1702979370; x=1703584170; 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=vyilKNP2u7B8sbJPURh2zM2LkjfJACdTXLe8aajO1Mg=;
        b=GRff4yZmJIGf6MbcIk7FDzA6qICbU52JGNLxsfGwADjK+rOZhdYJmDdsYVlwPEKOos
         enaNF1nXzh2lTzsi9rP+KYQ1IsqLxjXCPvZlfv5LlDUqAbrsxVnWjrTi/+7W8Qsr1bMf
         vZbpcicJxzDM1TIuUXgz9/ugc2ZZGS1RPEn8C+l9wUKNIAaCi3uIoMSMl5Avo9CccqAG
         L0mXNeIq+C9Ncydgvf5h5NkH7jBmoEcKSOTp4tdocDX8bCtACiQHgAzmTCjoYuzaPS+o
         j4S/6JOmJYEgwKaWhlm8W3FBz8lqZ5ODBcIIKjp5PZdLEDrdJ/WO4iMt0uDdwdX/Sd2h
         zCcw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1702979370; x=1703584170;
        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=vyilKNP2u7B8sbJPURh2zM2LkjfJACdTXLe8aajO1Mg=;
        b=j7JEi2iap+tl4bJ0j641rcWmvISeY97CSWZzTr4GJy4UeYBNE7rQq3Mk9wjnx8Omt8
         BrnVRa2UGUcc1f2gicpzL1sGoq95M32wgduDy0htgopLufnL+TLaC341YeOUgbjOKUJR
         KnakwOKOhIifMYTLrJp6F4hfPo86DSTZx9xFovH00gl3TJ/ODqLH/bj4p8Cn5LM7PI6p
         Wdbjn3x14tTny5LbIpeU2NhyrdWIaLYa01ZlW6fCBx85C2IiL7fq6GQ3EBq3DL4wSpEN
         Oh7OfC7rjH0OzjDf8kA0Q6eq7ZNdNfM5mGN8xm8nGbcNcnm19W6zCUFz9/xRWo3sl5OU
         49xg==
X-Gm-Message-State: AOJu0YwSdIUGbdNeRSnfmHpxDcFgJU6GKkU/tS4CTc1RZbnYKbTr79kc
	aYKr9bD3aUNJN4pxyP88YMnBSHCGk4134g==
X-Google-Smtp-Source: AGHT+IFS/kTSyOOtXRvd6j+T1O5pS06+qzOaE4iPhXJOpBPVosNaLwnfgG/sZzTUWsDmwVHINbSAqg==
X-Received: by 2002:a05:600c:45ca:b0:40c:3dcd:de1e with SMTP id s10-20020a05600c45ca00b0040c3dcdde1emr8278403wmo.60.1702979370378;
        Tue, 19 Dec 2023 01:49:30 -0800 (PST)
From: Paul Durrant <xadimgnik@gmail.com>
X-Google-Original-From: Paul Durrant <paul@xen.org>
Message-ID: <6b9224f3-3923-4f6f-87b6-0e4e4ec866af@xen.org>
Date: Tue, 19 Dec 2023 09:49:29 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 3/3] Rework PdoStartDevice()
To: win-pv-devel@lists.xenproject.org
References: <20231214153240.1934-1-owen.smith@cloud.com>
 <20231214153240.1934-3-owen.smith@cloud.com>
Content-Language: en-US
Reply-To: paul@xen.org
Organization: Xen Project
In-Reply-To: <20231214153240.1934-3-owen.smith@cloud.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 14/12/2023 15:32, Owen Smith wrote:
> Moves MIB table parsing, detection of aliased device and copying of network
> settings to a seperate function, to avoid any failures to the START_DEVICE

typo... I'll fix

> IRP if network alias detection and settings copying code fails. The only failure
> of note is STATUS_PNP_REBOOT_REQUIRED, indicating the VM requires a reboot to
> replace emulated devices.
> Windows Update will reject driver updates if sufficient install failures or
> failures within 2 days of install are detected (> 5% of installs). Completing
> the START_DEVICE IRP with any failure other than STATUS_PNP_REBOOT_REQUIRED will
> cause an installation failure (Code 10) and lead to driver updates being removed
> from Windows Update.

Ouch. That's nasty.

> 
> Signed-off-by: Owen Smith <owen.smith@cloud.com>
> ---
>   src/xenvif/pdo.c | 146 +++++++++++++++++++++++++----------------------
>   1 file changed, 77 insertions(+), 69 deletions(-)
> 
> diff --git a/src/xenvif/pdo.c b/src/xenvif/pdo.c
> index f23b047..0cef2d5 100644
> --- a/src/xenvif/pdo.c
> +++ b/src/xenvif/pdo.c
> @@ -95,8 +95,6 @@ struct _XENVIF_PDO {
>   
>       PXENVIF_VIF_CONTEXT         VifContext;
>       XENVIF_VIF_INTERFACE        VifInterface;
> -
> -    BOOLEAN                     HasAlias;
>   };
>   
>   static FORCEINLINE PVOID
> @@ -1272,64 +1270,34 @@ PdoUnplugRequested(
>       return State;
>   }
>   
> -static DECLSPEC_NOINLINE NTSTATUS
> -PdoStartDevice(
> +static FORCEINLINE NTSTATUS
> +PdoParseMibTable(
>       IN  PXENVIF_PDO     Pdo,
> -    IN  PIRP            Irp
> +    IN  HANDLE          SoftwareKey
>       )
>   {
>       NTSTATUS            (*__GetIfTable2)(PMIB_IF_TABLE2 *);
>       VOID                (*__FreeMibTable)(PVOID);
>       PMIB_IF_TABLE2      Table;
>       ULONG               Index;
> -    PIO_STACK_LOCATION  StackLocation;
> -    HANDLE              SoftwareKey;
> -    HANDLE              HardwareKey;
>       GUID                Guid;
>       NTSTATUS            status;
>   
> -    status = STATUS_UNSUCCESSFUL;
> -    if (Pdo->HasAlias)
> -        goto fail1;
> -
> -    if (DriverSafeMode())
> -        goto fail2;
> -
> -    status = RegistryOpenSoftwareKey(__PdoGetDeviceObject(Pdo),
> -                                     KEY_READ,
> -                                     &SoftwareKey);
> -    if (!NT_SUCCESS(status))
> -        goto fail3;
> -
> -    status = RegistryOpenHardwareKey(__PdoGetDeviceObject(Pdo),
> -                                     KEY_ALL_ACCESS,
> -                                     &HardwareKey);
> -    if (!NT_SUCCESS(status))
> -        goto fail4;
> -
> -    (VOID) PdoSetFriendlyName(Pdo,
> -                              SoftwareKey,
> -                              HardwareKey);
> -
> -    status = __PdoSetCurrentAddress(Pdo, SoftwareKey);
> -    if (!NT_SUCCESS(status))
> -        goto fail5;
> -
>       status = LinkGetRoutineAddress("netio.sys",
>                                      "GetIfTable2",
>                                      (PVOID *)&__GetIfTable2);
>       if (!NT_SUCCESS(status))
> -        goto fail6;
> +        goto fail1;
>   
>       status = LinkGetRoutineAddress("netio.sys",
>                                      "FreeMibTable",
>                                      (PVOID *)&__FreeMibTable);
>       if (!NT_SUCCESS(status))
> -        goto fail7;
> +        goto fail2;
>   
>       status = __GetIfTable2(&Table);
>       if (!NT_SUCCESS(status))
> -        goto fail8;
> +        goto fail3;
>   
>       //
>       // Look for a network interface with the same permanent address
> @@ -1364,16 +1332,8 @@ PdoStartDevice(
>                               &Row->InterfaceGuid,
>                               &Row->InterfaceLuid);
>   
> -        Pdo->HasAlias = TRUE;
> -        break;
> -    }
> -
> -    if (Pdo->HasAlias || !PdoUnplugRequested(Pdo)) {
> -        PdoUnplugRequest(Pdo, TRUE);
> -        DriverRequestReboot();
> -
>           status = STATUS_PNP_REBOOT_REQUIRED;
> -        goto fail9;
> +        goto fail4;
>       }
>   
>       //
> @@ -1416,11 +1376,76 @@ PdoStartDevice(
>                                  &Luid);
>       }
>   
> +    __FreeMibTable(Table);
> +
> +    return STATUS_SUCCESS;
> +
> +fail4:
> +    Error("fail4\n");
> +
> +    __FreeMibTable(Table);
> +
> +fail3:
> +    Error("fail3\n");
> +
> +fail2:
> +    Error("fail2\n");
> +
> +fail1:
> +    Error("fail1 (%08x)\n", status);
> +
> +    return status;
> +}
> +
> +static DECLSPEC_NOINLINE NTSTATUS
> +PdoStartDevice(
> +    IN  PXENVIF_PDO     Pdo,
> +    IN  PIRP            Irp
> +    )
> +{
> +    PIO_STACK_LOCATION  StackLocation;
> +    HANDLE              SoftwareKey;
> +    HANDLE              HardwareKey;
> +    NTSTATUS            status;
> +
> +    status = STATUS_UNSUCCESSFUL;
> +    if (DriverSafeMode())
> +        goto fail1;
> +
> +    status = RegistryOpenSoftwareKey(__PdoGetDeviceObject(Pdo),
> +                                     KEY_READ,
> +                                     &SoftwareKey);
> +    if (!NT_SUCCESS(status))
> +        goto fail2;
> +
> +    status = RegistryOpenHardwareKey(__PdoGetDeviceObject(Pdo),
> +                                     KEY_ALL_ACCESS,
> +                                     &HardwareKey);
> +    if (!NT_SUCCESS(status))
> +        goto fail3;
> +
> +    (VOID) PdoSetFriendlyName(Pdo,
> +                              SoftwareKey,
> +                              HardwareKey);
> +
> +    status = __PdoSetCurrentAddress(Pdo, SoftwareKey);
> +    if (!NT_SUCCESS(status))
> +        goto fail4;
> +
> +    status = PdoParseMibTable(Pdo, SoftwareKey);
> +    if (status == STATUS_PNP_REBOOT_REQUIRED || !PdoUnplugRequested(Pdo)) {

So, if the parsing fails for some other reason then the settings restore 
will not happen... but meh. May as well make PdoParseMibTable() return a 
boolean; true if a reboot is require, false otherwise. It'll work as-is 
though so...

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

> +        PdoUnplugRequest(Pdo, TRUE);
> +        DriverRequestReboot();
> +
> +        status = STATUS_PNP_REBOOT_REQUIRED;
> +        goto fail5;
> +    }
> +



