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

RE: [PATCH 6/6] Dont always remove XenFilt from UpperFilters


  • To: "paul@xxxxxxx" <paul@xxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Mon, 21 Jun 2021 15:37:09 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yjYovU7n1mZc7UC2n6TFKOeISAPIQKIZA745vTAPxhc=; b=Jm9snA6PeFhh0pJNhaZ3TqoFhlhWR/3PBmzYJlgPt4K474Xgmwsf9ai16mUMJOMb42DSpNqliNeKID+NR8yiBuTH/7qYFnGmtjvudF/tTRCNK3+SYcZL1cPq3hNX/gJRKj9V1p94leuJNDLbiviP0KvW0l6Lhbm+Aq8Enl4ict+s+CHEP6WLKqkBcN2fraaNjRGEVOYyBk+pUj16prPBLZFUDJcytGw/9iZc8x8IcNswm+aP1fz/yLa9s4Qmj8eq+r7uIwuhCJOhPcUtkmwrphEWewKeqWp7roKZcRr+/Tj1Z6b0SZRGZ1PZrAg3gVoHQrRSEi6TcrwGNmmoYA38/w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y0XZGouQJi/FC2iTd/BAjRHK93Mpp5hByA0caFHTbncXFfYEl9247sqOHgYaRjL+XVyAFASJt9VUWv6eKOmjftoCZsdXvuteIorlPvNlelAK/rdaXE4V27OcwJXjo9KZa1R9LvYzVWdvUHSbV2loEWwRcZuA3eOhigc3p0r7nTDd1cnUFcRC1o/13HC/BLYqIEFo/PKD8CesN4jvjl1qa5/UNjPypP9MM/U7mPFBICBW7oSpLXtlo66kibNa2FvgRMdKMhImqqa5JEXnMyWXoN3/CDXCkpxtiecvMJfJJ6J+eaFzYu5Kagwq1xYD0kRHMI7EVhDGvDD33/AUB+dloQ==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Delivery-date: Mon, 21 Jun 2021 15:37:17 +0000
  • Ironport-hdrordr: A9a23:qpEFga6ZpXw5nACCzgPXwUOBI+orL9Y04lQ7vn2ZFiY6TiXIra +TdaoguSMc0AxhJU3I6urwRJVoJkmsu6KdgLNhcotKOTOGhILGFvAa0WKP+UyDJ8S6zJ8m6U 4CSdk+NDSTNykDsS+S2mDReLxMoKjlzEnrv5ak854Ed3AwV0gK1XYcNu/vKDwReOAwP+tfKH Pz3LsjmxOQPVAsKuirDHgMWObO4/fRkoj9XBIADxk7rCGTkDKB8tfBYlil9yZbdwkK7aYp8G DDnQC8zL6kqeuHxhjV0HKWx4hKmeHm1sBICKW3+4sow3TX+0SVjbZaKvm/VQMO0aaSAZER4Z /xSiIbToFOArXqDziISFXWqlHdOX0VmgDfIBej8AXeSIrCNWgH4oN69PNkWwqc5Ew6sN5m1q VXm2qfqppMFBvF2D/w/t7SSnhR5wGJSFcZ4KcuZkZkIMMjgX5q3Pgi1VIQFI1FEDPx6YghHu UrBMbA5OxOeVffa3zCpGFgzNGlQ3x2R369MwU/k93Q1yITkGFyzkMeysBalnAc9IglQ50B4+ jfKKxnmLxHU8dTZ6NgA+UKR9exFwX2MFjx2aKpUCLa/YQ8Sj7wQrLMkccIDdCRCes1JcEJ6e f8uXtjxBsPkmzVeL2z4KE=
  • Ironport-sdr: +e+ADFu+NSLpQ4HP86Zrae0D7XHhS8Pru38kngf48nGlJ6l6g+1a0kEsPLUvNVe+QjrF9GCJki vV5Hrv7NvMCPwtQ9tSJE/oBO2SuFeQeiY7IUntlZY4So9cJnTuNHbxoqeYZ6ld7el1/rO9jYOi sfzKOnRYSL/YhdaQRbmvqTMjr+kUS5h5Ta9/+2opDcokqGXtdpIjlx2AWrSZsUALr/i/E8vBFx hTRX+GXBBmmy2tfYK9/xBkk5NWjGghTpgSZa7kn4mrpCNzvqsY0wbEG0eQWGcigGZ+1uYkt9AP Vl0=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Thread-index: AQHXY3UWblttKwXY60+1knhbDKpq0KsehU4AgAAZsEA=
  • Thread-topic: [PATCH 6/6] Dont always remove XenFilt from UpperFilters


-----Original Message-----
From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of 
Paul Durrant
Sent: Monday, June 21, 2021 3:03 PM
To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH 6/6] Dont always remove XenFilt from UpperFilters

[CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments 
unless you have verified the sender and know the content is safe.

On 17/06/2021 13:33, Owen Smith wrote:
> There is a race which can prevent XenFilt from having AddDevice 
> correctly called on some devices. This seems to happen more frequently 
> after driver upgrades.
> It seems this is due to XenBus!DriverEntry removing XenFilt before 
> XenBus!AddDevice inserts XenFilt into the UpperFilters value. In this 
> gap, PnP manager can sample the UpperFilters key and fail to bind 
> XenFilt to the required device stacks. This leads to XenFilt failing 
> to determine the active device, which prevents the device unplugs from 
> occuring, leading to a constant cycle of reboot prompts from 
> xenbus_monitor.
> 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>

This is a partial reversion of 9d28a9e9b798f "Avoid removing filters on upgrade 
installations". I think you need to state why that commit was wrong (assuming 
it was).

   Paul


I have encountered upgrade issues, particularly involving Win10 in-place OS 
upgrade, that can affect the ordering the PnP manager handles driver load. I 
will see if I can pin down exactly the conditions that trigger the race here in 
9d28a9e9b798f.

Owen

> ---
>   src/xenbus/driver.c | 12 +++++++-----
>   1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/src/xenbus/driver.c b/src/xenbus/driver.c index 
> 1b621fa..e66bf45 100644
> --- a/src/xenbus/driver.c
> +++ b/src/xenbus/driver.c
> @@ -296,6 +296,9 @@ DriverRemoveFunctionDeviceObject(
>       RemoveEntryList(&Dx->ListEntry);
>       ASSERT3U(Driver.References, !=, 0);
>       References = --Driver.References;
> +
> +    if (References == 1)
> +        FiltersUninstall();
>   }
>   
>   //
> @@ -859,16 +862,15 @@ DriverEntry(
>                         MICRO_VERSION,
>                         BUILD_NUMBER);
>       if (!NT_SUCCESS(status)) {
> -        if (status == STATUS_INCOMPATIBLE_DRIVER_BLOCKED)
> +        if (status == STATUS_INCOMPATIBLE_DRIVER_BLOCKED) {
> +            // Re-instate XenFilt to avoid a second required reboot
> +            FiltersInstall();
>               __DriverRequestReboot();
> +        }
>   
>           goto done;
>       }
>   
> -    // Remove the filters from the registry. They will be re-instated by
> -    // the first successful AddDevice.
> -    FiltersUninstall();
> -
>       DriverObject->DriverExtension->AddDevice = DriverAddDevice;
>   
>       for (Index = 0; Index <= IRP_MJ_MAXIMUM_FUNCTION; Index++) {
> 



 


Rackspace

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