Files
yttrium-virtio-gpu/NetKVM/NotifyObject/vioprot.inf
T
Yuri Benditovich 66246289fd netkvm-prot: update protocol service binary at runtime
https://issues.redhat.com/browse/RHEL-31482
Before this commit: netkvmp.exe is installed by protocol INF
to system32 directory, INF also creates netkvmp service for
this binary. The netkvmp.exe works with netkvm driver using
IOCTLs and continues doing it in case the netkvm driver is
updated, so these binaries at some point might get out of sync.
In order to update the netkvmp.exe the protocol INF must be
reinstalled.
After this commit: netkvmp.exe is installed by netkvm INF to
system directory. When the netkvmp.exe is called to install
the protocol it first copies itself to system32\netkvmps.exe,
then it installs protocol INF, which creates netkvmp service
with existing netkvmps.exe file. The service from time to time
checks that the service binary (netkvmps.exe) is identical to
netkvmp.exe. When it detects they are out of sync, it starts
'netkvmp.exe restartservice' and stops. The netkvmp.exe
copies itself to netkvmps.exe and starts the service. Such a
way, the protocol service is always in sync with netkvm driver.

Signed-off-by: Yuri Benditovich <[email protected]>
2024-04-05 16:47:02 +03:00

85 lines
2.7 KiB
INI

;-----------------------------------
;INX_COPYRIGHT_1
;INX_COPYRIGHT_2
;-----------------------------------
; vioprot.inf
;-----------------------------------
; VIRTIO network protocol
;-----------------------------------
;Installation Notes:
; Step by step driver installation wiki:
; https://github.com/virtio-win/kvm-guest-drivers-windows/wiki/Driver-installation
;
[version]
Signature = "$Windows NT$"
Class = NetTrans
ClassGUID = {4d36e975-e325-11ce-bfc1-08002be10318}
Provider = %VENDOR%
DriverVer = 01/01/2020,1.1
CatalogFile = vioprot.cat
PnpLockDown = 1
[Manufacturer]
%VENDOR%=Standard,NT$ARCH$
[Standard.NT$ARCH$]
%NETKVMP_Desc%=Install,VIOPROT
;-------------------------------------------------------------------------
; Installation Section
;-------------------------------------------------------------------------
[Install]
AddReg=Inst_Ndi
Characteristics=0x0
CopyFiles=Copy.Exec
;-------------------------------------------------------------------------
; Ndi installation support
;-------------------------------------------------------------------------
[Inst_Ndi]
HKR, Ndi, ClsID, 0, {F69513F1-8E1A-4F35-82D9-046406970E6D}
HKR,Ndi,Service,,netkvmp
HKR,Ndi,HelpText,,%NETKVMP_HelpText%
HKR,Ndi\Interfaces, UpperRange,, noupper
HKR,Ndi\Interfaces, LowerRange,,"ndis5,ndis5_prot"
;-------------------------------------------------------------------------
; Service installation support
;-------------------------------------------------------------------------
[Install.Services]
AddService=netkvmp,0x800,NETKVMP.ServiceInst ;SPSVCSINST_STARTSERVICE
[NETKVMP.ServiceInst]
DisplayName = %NETKVMP_Desc%
ServiceType = 16 ;SERVICE_WIN32_OWN_PROCESS
StartType = 2 ;SERVICE_AUTO_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
ServiceBinary = %11%\netkvmps.exe
Description = %NETKVMP_Desc%
[Install.Remove.Services]
DelService=netkvmp,0x200 ;SPSVCINST_STOPSERVICE
;-------------------------------------------------------------------------
; Declare Destination Directories for file copy/deletion
;-------------------------------------------------------------------------
[SourceDisksNames]
1=%DiskDescription%,"",,
[SourceDisksFiles]
[DestinationDirs]
Copy.Exec = 11 ; %windir%\System32
;-------------------------------------------------------------------------
; Files to Copy/Delete - Referenced by Install and Remove sections above
;-------------------------------------------------------------------------
[Copy.Exec]
[Strings]
VENDOR = "INX_COMPANY"
DiskDescription = "INX_PREFIX_VENDORVirtIO NetKVM Protocol Driver Disk"
NETKVMP_Desc = "INX_PREFIX_VENDORVirtIO NetKVM Protocol Driver"
NETKVMP_HelpText = "A driver to support SRIOV Failover for VirtIO network devices"