Skip to content

Commit 9e8af81

Browse files
authored
Merge pull request #3 from intel/SudharsanRaman_Dev2
ZC v632 : Enabled child node support for DVServer
2 parents a448f1a + a9c8a91 commit 9e8af81

File tree

5 files changed

+93
-190
lines changed

5 files changed

+93
-190
lines changed

DVApp.ps1

Lines changed: 0 additions & 114 deletions
This file was deleted.

DVInstaller.ps1

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,52 @@
55
#SPDX-License-Identifier: MIT
66
#--------------------------------------------------------------------------*/
77

8-
Write-Host "Start Windows GFX installation..."
9-
pnputil.exe /add-driver .\GraphicsDriver\Graphics\iigd_dch.inf /install
8+
#check if file present
9+
function is_present($filepath)
10+
{
11+
$isavailable = Test-Path $filepath
12+
return $isavailable
13+
}
1014

11-
Write-Host "Start DVServerKMD installation..."
12-
pnputil.exe /add-driver .\DVServerKMD\DVServerKMD.inf /install
15+
#check if all the required binaries are present or not
16+
function check_executables()
17+
{
18+
if ((is_present("DVServer\dvserver.cat") -eq $true) -and
19+
(is_present("DVServer\DVServer.dll") -eq $true) -and
20+
(is_present("DVServer\DVServer.inf") -eq $true) -and
21+
(is_present("DVServer\dvserverkmd.cat") -eq $true) -and
22+
(is_present("DVServer\DVServerKMD.inf") -eq $true) -and
23+
(is_present("DVServer\DVServerKMD.sys") -eq $true) -and
24+
(is_present("DVEnabler.exe") -eq $true) -and
25+
(is_present("GraphicsDriver\Graphics\iigd_dch.inf") -eq $true)){
26+
Write-Host "Setup files present"
27+
return "SUCCESS"
28+
}
29+
Write-Host "Setup files don't exist.. Exiting.."
30+
return "FAIL"
31+
}
1332

14-
Write-Host "Rebooting Windows VM in 10 secs..."
15-
Timeout /T 10
16-
Restart-Computer
33+
##Main##
34+
$ret = check_executables
35+
if ($ret -eq "FAIL") {
36+
Exit
37+
}
38+
else {
39+
Write-Host "Start Windows GFX Driver installation..."
40+
pnputil.exe /add-driver .\GraphicsDriver\Graphics\iigd_dch.inf /install
41+
42+
Write-Host "Start Zerocopy Driver installation..."
43+
pnputil.exe /add-driver .\DVServer\DVServerKMD.inf /install
44+
45+
Timeout /T 10
46+
Write-Host "Running DVEnabler..."
47+
& ".\DVEnabler.exe"
48+
if ($LASTEXITCODE -eq 0) {
49+
Write-Host "DVEnabler Success. DVServerUMD has taken over MSBDA!"
50+
} else {
51+
Write-Host "DVEnabler failed. DVServerUMD has not taken over MSBDA!"
52+
}
53+
54+
Write-Host "Rebooting Windows VM..."
55+
Restart-Computer
56+
}

DVServerKMD/DVServerKMD.inf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with
4444
[DVServerKMD_Device.NT]
4545
CopyFiles=Drivers_Dir
4646
FeatureScore=01
47+
CopyINF = DVServer.inf
4748

4849
[Drivers_Dir]
4950
DVServerKMD.sys
@@ -60,9 +61,20 @@ StartType = 3 ; SERVICE_DEMAND_START
6061
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
6162
ServiceBinary = %12%\DVServerKMD.sys
6263

64+
[DVServerKMD_Device.NT.HW]
65+
AddReg = Hw_AddReg
66+
67+
[Hw_AddReg]
68+
HKR,,Security,,"D:P(A;;GA;;;BA)(A;;GA;;;SY)(A;;GA;;;UD)"
69+
6370
;
6471
;--- DVServerKMD_Device Coinstaller installation ------
6572
;
73+
[DVServerKMD_Device.NT.Components]
74+
AddComponent=%ComponentName%,,component-install-section
75+
76+
[component-install-section]
77+
ComponentIDs= %ComponentId%
6678

6779
[DVServerKMD_Device.NT.CoInstallers]
6880
AddReg=DVServerKMD_Device_CoInstaller_AddReg
@@ -86,3 +98,5 @@ ClassName="System"
8698
DiskName = "DVServerKMD Installation Disk"
8799
DVServerKMD.DeviceDesc = "DVServerKMD Device"
88100
DVServerKMD.SVCDESC = "DVServerKMD Service"
101+
ComponentName = "DVServer"
102+
ComponentId = "DVServer"

DVServerUMD/DVServer/DVServer.inf

-390 Bytes
Binary file not shown.

Readme.txt

Lines changed: 32 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -15,78 +15,41 @@ full-screen=on,monitor.1=0,monitor.0=1
1515
Secondary display to monitor 0 & Primary display to monitor 1
1616

1717
-----------------------------------------------------------
18-
##### Common Steps #####
18+
##### Pre-requisites #####
1919
-----------------------------------------------------------
2020
1) Use the above QEMU cmd and boot to Windows VM
21-
2) Copy the Zero Copy Binaries and Windows GFX driver to the VM
21+
2) Copy the Signed Zero Copy Binaries and Windows GFX driver to the VM
2222

2323
-----------------------------------------------------------
24-
##### Using "Signed" 0Copy Binaries (DVServerKMD) #####
24+
##### Configuring 0Copy #####
2525
-----------------------------------------------------------
26-
1) Run these commands
27-
1.1) Open Powershell / CMD prompt in admin mode and run the below command
28-
>powershell Set-ExecutionPolicy RemoteSigned
29-
1.2) Reboot the windows VM
30-
26+
1) Run this command in Powershell (admin mode). DVInstaller Script will be signed, follow below step before running the DVInstaller
27+
> Set-ExecutionPolicy -ExecutionPolicy AllSigned -Scope CurrentUser
28+
> This will prompt user to allow access, Press �Y/Yes� to continue
3129
2) Create a folder with name "GraphicsDriver\Graphics" in the location where we have "DVInstaller.ps1" and extract the GFX driver zip into that folder
32-
3) GFX Installation and ZC DVServerKMD Installation
33-
3.1) Open powershell in admin mode and goto ZeroCopy binary folder
34-
3.2) run : ".\DVInstaller.ps1" this will install both GFX driver and DVServerKMD
35-
4) Reboot the Windows VM
36-
5) After successful reboot, check the device manager "Display Adapter --> GFX driver" and "System -->DVServerKMD driver" is loaded properly or not
37-
38-
-----------------------------------------------------------
39-
##### Using "Unsigned" 0Copy Binaries (DVServerKMD) #####
40-
-----------------------------------------------------------
41-
1) Run these commands
42-
1.1) Open Powershell / CMD prompt in admin mode and run the below commands
43-
> bcdedit /set testsigning on
44-
> powershell Set-ExecutionPolicy RemoteSigned
45-
1.2) Reboot the windows VM
46-
47-
2) GFX Installation : Open Device Manager --> Display Adapter --> Select the "MSBDA" which is having the YellowBang (PCI ID 0.2.0) --> this is our SRIOV GFX VF device and install the GFX driver via "Have Disk" method > Choose DCH driver in the driver selection during installation
48-
3) After a successful installation ensure the GFX driver is loaded properly with the correct version number
49-
4) Zero Copy KMD Installation : Open Device Manager --> Display Adapter --> Select the other "MSBDA" which will have the PCI ID as 0.4.0 --> go to DVServerKMD folder and install this via "Have Disk" method
50-
5) After a successful installation an entry will be created under system device with a name "DVServerKMD Device"
51-
6) Reboot the Windows VM
52-
53-
-----------------------------------------------------------
54-
##### Configuring DVServerUMD #####
55-
-----------------------------------------------------------
56-
(1) DVServerUMD : It's a user mode driver which provides indirect display. It will request DVServerKMD via IOCTL's for QEMU display edid info. Depending upon resolution set in the indrect display, the windows graphics driver will generate frame buffers. The Swapchain in the UMD driver will receive the frame buffer address from GFX driver, which will be further sent to the KMD driver for scanning out the contents on the QEMU display.
57-
58-
(2) DVServerUMD_Node: This will create software node entry in device manager & DVServerUMD driver loads on to that software device
59-
60-
(3) DVEnabler.exe: This will cut off Microsoft Basic Display Adpater Path; So that Intel GPU can be stiched with Indirect display and will be used for workload processing on GPU
61-
62-
(4) Installation:
63-
(4.1)1st time installation of DVServerUMD:
64-
[Pre-requisites]
65-
- DVServer\dvserver.cat, DVServer\DVServer.dll, DVServer\DVServer.inf, DVEnabler.exe and DVServerUMD_Node.exe
66-
- Open Powershell in admin mode
67-
[CMD] : .\DVApp.ps1 setup
68-
69-
(4.2) Run DVServerUMD after every reboot / shutdown:
70-
[Pre-requisites]
71-
- DVEnabler.exe and DVServerUMD_Node.exe
72-
- Open Powershell in admin mode
73-
[CMD] : .\DVApp.ps1 run
74-
75-
(4.3) Subsequent installation of DVServerUMD:
76-
- If there are any changes in DVServerUMD driver, copy the updated binaries to DVServer folder
77-
[Pre-requisites]
78-
- DVServer\dvserver.cat, DVServer\DVServer.dll, DVServer\DVServer.inf, DVEnabler.exe and DVServerUMD_Node.exe
79-
- Open Powershell in admin mode
80-
[CMD] : .\DVApp.ps1 setup
81-
82-
-----------------------------------------------------------
83-
##### Setting / Executing DVServerUMD #####
84-
-----------------------------------------------------------
85-
1) Open powershell in admin mode and goto ZeroCopy binary folder
86-
2) 1st time installation of DVServerUMD execute --> ".\DVApp.ps1 setup"
87-
3) It will popup with the driver installation window, click install.
88-
4) After successful installation of UMD open Device Manager --> Display Adapter ? we should see "DVServerUMD Device"
89-
5) Run your test cases and use cases
90-
6) We need to run DVServerUMD script for every reboot / shutdown --> ".\DVApp.ps1 run"
91-
7) If there are any changes in DVServerUMD driver, copy the updated binaries to DVServer folder --> ".\DVApp.ps1 setup"
92-
30+
3) Make sure ZC files copied in respective folder structure -
31+
3.1) DVServer\dvserverkmd.cat, DVServer\DVServerKMD.inf, DVServer\DVServerKMD.sys
32+
3.2) DVServer\dvserver.cat, DVServer\DVServer.dll, DVServer\DVServer.inf
33+
3.3) DVEnabler.exe
34+
4) GFX Installation and ZC Installation
35+
4.1) Open powershell in admin mode and goto ZeroCopy binary folder
36+
4.2) Run : ".\DVInstaller.ps1" - This will install both GFX driver and ZC driver
37+
4.3) Auto reboot will happen
38+
5) After successfully rebooting, check below driver entry inside device manager. There should not be a yellow bang on any of the below drivers.
39+
5.1) Display Adapter --> GFX driver
40+
5.2) System -->DVServerKMD driver
41+
5.3) Display Adapter -->DVServerUMD Device
42+
6) After subsequent reboot, ZC will be kicked in automatically (No need to run any other script for ZC)
43+
7) To update the Graphics/ZC drivers, Just repeat steps 2-5
44+
45+
------------------------------------------------------------------
46+
##### Installation of VIOSerial and QGA for S4 support #####
47+
------------------------------------------------------------------
48+
1) Download & extract �virtio-win-0.1.221.iso� from https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.221-1/virtio-win.iso
49+
2) We need to install 2 components, vioserial & qemu-guest-agent
50+
2.1) Open Powershell in admin mode and goto root folder of extracted ISO
51+
2.2) Installing VIOSerial: pnputil.exe /add-driver .\vioserial\w10\amd64\vioser.inf /install
52+
2.3) Installing qemu-guest agent: Start-Process .\guest-agent\qemu-ga-x86_64.msi
53+
3) After successful installtion check the componets are functioning properly or not
54+
3.1) In services.msc, we need to check if QEMU Guest Agent in running state
55+
3.2) Open Device Manager --> under system devices --> VirtIO Serial Driver should showup

0 commit comments

Comments
 (0)