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

[XENBUS PATCH v2 7/7] Install Xenfilt with INF AddReg



With forced-activation Xenbus, there's little reason not to install
Xenfilt.

Add a new INF section to this effect, conditioned on the FORCE_ACTIVATE
environment variable.

Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
---
 scripts/genfiles.ps1 |  2 ++
 src/xenbus.inf       | 14 +++++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/scripts/genfiles.ps1 b/scripts/genfiles.ps1
index 4c58f03..5b99728 100644
--- a/scripts/genfiles.ps1
+++ b/scripts/genfiles.ps1
@@ -68,6 +68,8 @@ $Replacements = [ordered]@{
        'MICRO_VERSION' = $Env:MICRO_VERSION;
        'BUILD_NUMBER' = $Env:BUILD_NUMBER;
 
+       'FORCE_ACTIVATE' = $Env:FORCE_ACTIVATE;
+
        # generated values
        'GIT_REVISION' = $GitRevision;
 
diff --git a/src/xenbus.inf b/src/xenbus.inf
index 30274e2..47d9703 100644
--- a/src/xenbus.inf
+++ b/src/xenbus.inf
@@ -115,14 +115,20 @@ ErrorControl=%SERVICE_ERROR_NORMAL%
 ServiceBinary=%12%\xenfilt.sys 
 LoadOrderGroup="Boot Bus Extender"
 AddReg = XenFilt_Parameters
+; Attention: XenFilt_Filters should only be used with forced-activation Xenbus
+AddReg = XenFilt_Filters  ; @FORCE_ACTIVATE@
 
 [XenFilt_Parameters]
 HKR,"Parameters",,0x00000010
 HKR,"Parameters","*PNP0A03",0x00000000,"PCI"
 HKR,"Parameters","Internal_IDE_Channel",0x00000000,"IDE"
-HKR,"Parameters","PCI\VEN_5853&DEV_0001",0x00010001,0x0001
-HKR,"Parameters","PCI\VEN_5853&DEV_0002",0x00010001,0x0002
-HKR,"Parameters","PCI\VEN_5853&DEV_C000",0x00010001,0x@VENDOR_DEVICE_ID@
+HKR,"Parameters","PCI\VEN_5853&DEV_0001",0x00010001,0x0001  ; @FORCE_ACTIVATE@
+HKR,"Parameters","PCI\VEN_5853&DEV_0002",0x00010001,0x0002  ; @FORCE_ACTIVATE@
+HKR,"Parameters","PCI\VEN_5853&DEV_C000",0x00010001,0x@VENDOR_DEVICE_ID@  ; 
@FORCE_ACTIVATE@
+
+[XenFilt_Filters]  ; @FORCE_ACTIVATE@
+HKLM,%SystemClassKey%,"UpperFilters",0x00010008,"XENFILT"  ; @FORCE_ACTIVATE@
+HKLM,%HDCClassKey%,"UpperFilters",0x00010008,"XENFILT"  ; @FORCE_ACTIVATE@
 
 [Monitor_Service]
 DisplayName=%MonitorName%
@@ -160,6 +166,8 @@ MonitorName="@PRODUCT_NAME@ PV Driver Monitor"
 MonitorDesc="Provides support for @PRODUCT_NAME@ PV drivers"
 RequestKey="SYSTEM\CurrentControlSet\Services\xenbus_monitor\Request"
 UnplugKey="SYSTEM\CurrentControlSet\Services\XEN\Unplug"
+SystemClassKey="SYSTEM\CurrentControlSet\Control\Class\{4d36e97d-e325-11ce-bfc1-08002be10318}"
+HDCClassKey="SYSTEM\CurrentControlSet\Control\Class\{4d36e96a-e325-11ce-bfc1-08002be10318}"
 DialogTitle="@PRODUCT_NAME@"
 DialogText="needs to restart the system to complete installation."
 DialogQuestion="Press 'Yes' to restart the system now or 'No' if you plan to 
restart the system later."
-- 
2.50.1.windows.1



Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech




 


Rackspace

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