]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/commitdiff
Remove CoInstaller from INF
authorOwen Smith <owen.smith@cloud.com>
Wed, 13 Sep 2023 14:15:23 +0000 (15:15 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Fri, 29 Sep 2023 13:43:51 +0000 (14:43 +0100)
Windows 11 22H2 WHQL requires INF file pass "InfVerif /k", which highlights
several issues
- PnpLockdown=1 needs to be specified
- CoInstallers are no longer allowed

The CoInstaller has several functions that will need alternative solutions:
- The AllowUpdate mechanism is no longer possible
- The safety checks that ensure interface versionings remain compatible
- The writing of 'current' network identifiers to the registry in order to
  copy network settings.

Interface safety checks need to be handled by changes to child device bindings,
and assuming upgrade via emulated devices is safe. The unplug key is cleared
in the INF to revert to emulated NICs on the next boot, incase the current child
drivers rely on an interface that is no longer present (note: in this case,
child drivers will need updating).

Signed-off-by: Owen Smith <owen.smith@cloud.com>
src/xenvif.inf

index 3db059dab64cdd9132334209c399cf40e9badec4..8bfc37cc73bc7d911bc130c77c67efdb1ed0f3cf 100644 (file)
@@ -38,20 +38,16 @@ Provider=%Vendor%
 CatalogFile=xenvif.cat
 DriverVer=@INF_DATE@,@MAJOR_VERSION@.@MINOR_VERSION@.@MICRO_VERSION@.@BUILD_NUMBER@
 DriverPackageDisplayName=%DiskDesc%
+PnpLockdown=1
 
 [DestinationDirs] 
 DefaultDestDir=12 
-CoInst_CopyFiles=11
 
 [SourceDisksNames]
 0=%DiskDesc%
 
 [SourceDisksFiles]
 xenvif.sys=0,,
-xenvif_coinst.dll=0,,
-
-[CoInst_CopyFiles]
-xenvif_coinst_@MAJOR_VERSION@_@MINOR_VERSION@_@MICRO_VERSION@_@BUILD_NUMBER@.dll,xenvif_coinst.dll
 
 [Manufacturer] 
 %Vendor%=Inst,NT@INF_ARCH@
@@ -80,7 +76,7 @@ StartType=%SERVICE_DEMAND_START%
 ErrorControl=%SERVICE_ERROR_NORMAL% 
 ServiceBinary=%12%\xenvif.sys 
 LoadOrderGroup="NDIS"
-AddReg = XenVif_BootFlags, XenVif_Parameters
+AddReg = XenVif_BootFlags, XenVif_Parameters, XenVif_Unplug
 
 [XenVif_BootFlags]
 HKR,,"BootFlags",0x00010003,0x81
@@ -90,12 +86,8 @@ HKR,"Parameters",,0x00000010
 HKR,"Parameters","RequestKey",0x00000000,%RequestKey%
 HKR,"Parameters","FrontendMaxQueues",0x00010001,0x00000008
 
-[XenVif_Inst.CoInstallers]
-CopyFiles=CoInst_CopyFiles
-AddReg=CoInst_AddReg
-
-[CoInst_AddReg]
-HKR,,CoInstallers32,0x00010000,"xenvif_coinst_@MAJOR_VERSION@_@MINOR_VERSION@_@MICRO_VERSION@_@BUILD_NUMBER@.dll,Entry"
+[XenVif_Unplug]
+HKLM,%UnplugKey%,"NICS",0x00010001,0
 
 [Strings] 
 
@@ -103,6 +95,7 @@ Vendor="@VENDOR_NAME@"
 DiskDesc="@PRODUCT_NAME@ PV Network Class Package"
 XenVifName="@PRODUCT_NAME@ PV Network Class"
 RequestKey="SYSTEM\CurrentControlSet\Services\xenbus_monitor\Request"
+UnplugKey="SYSTEM\CurrentControlSet\Services\XEN\Unplug"
 
 SERVICE_BOOT_START=0x0 
 SERVICE_SYSTEM_START=0x1