VFIO Success
This commit is contained in:
10
README.md
Normal file → Executable file
10
README.md
Normal file → Executable file
@@ -4,15 +4,17 @@ VFIO scripts, notes, and configs for the Lenovo Legion 7 (2021).
|
||||
|
||||
The `notes` directory mainly contains command outputs and other useful pieces of information such as IOMMU groups on various kernels.
|
||||
|
||||
The `resources` directory contains the necessary files for creating the VM.
|
||||
|
||||
The `scripts` directory contains:
|
||||
|
||||
- `iommu.sh` which can be used to see your system's IOMMU groups
|
||||
- `kvm.conf` which contains necessary environment variables
|
||||
- multiple QEMU hook scripts
|
||||
- Multiple QEMU hook scripts
|
||||
|
||||
The `xml` directory contains the final XML files for two Windows 10 virtual machines.
|
||||
The `xml` directory contains the final XML files for two Windows 10 virtual machines:
|
||||
|
||||
- `Win10-nopass.xml` is a virtual machine without any passthrough
|
||||
- `Win10.xml` is a virtual machine with GPU, Audio, Network Card, Keyboard, Touchpad, and USB Mouse passthrough
|
||||
- `win10.xml` is a virtual machine without any passthrough
|
||||
- `win10-igpu.xml` is a virtual machine with GPU passthrough for when the laptop is in hybrid graphics mode
|
||||
|
||||
Full guide on how to create a Windows 10 gaming virtual machine available on my [blog](https://blog.karaolidis.com/vfio/).
|
||||
|
0
notes/iommu-groups-linux-vfio.txt
Normal file → Executable file
0
notes/iommu-groups-linux-vfio.txt
Normal file → Executable file
0
notes/iommu-groups-linux.txt
Normal file → Executable file
0
notes/iommu-groups-linux.txt
Normal file → Executable file
BIN
resources/SSDT1.dat
Normal file
BIN
resources/SSDT1.dat
Normal file
Binary file not shown.
5
scripts/hooks/kvm.conf
Normal file
5
scripts/hooks/kvm.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
## Virsh devices
|
||||
VIRSH_GPU_VIDEO=pci_0000_01_00_0
|
||||
VIRSH_GPU_AUDIO=pci_0000_01_00_1
|
||||
MEMORY=20480
|
||||
WIN=/dev/nvme1n1p3
|
65
scripts/hooks/win10-igpu/prepare/begin/start.sh
Normal file
65
scripts/hooks/win10-igpu/prepare/begin/start.sh
Normal file
@@ -0,0 +1,65 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
# Load Variables
|
||||
source "/etc/libvirt/hooks/kvm.conf"
|
||||
|
||||
# Unmount the Windows drive
|
||||
umount $WIN || /bin/true
|
||||
|
||||
# Stop LightDM
|
||||
systemctl stop lightdm.service
|
||||
sleep 2
|
||||
|
||||
# Calculate number of hugepages to allocate from memory (in MB)
|
||||
HUGEPAGES="$(($MEMORY/$(($(grep Hugepagesize /proc/meminfo | awk '{print $2}')/1024))))"
|
||||
|
||||
echo "Allocating hugepages..."
|
||||
echo $HUGEPAGES > /proc/sys/vm/nr_hugepages
|
||||
ALLOC_PAGES=$(cat /proc/sys/vm/nr_hugepages)
|
||||
|
||||
TRIES=0
|
||||
while (( $ALLOC_PAGES != $HUGEPAGES && $TRIES < 1000 ))
|
||||
do
|
||||
echo 1 > /proc/sys/vm/compact_memory ## defrag ram
|
||||
echo $HUGEPAGES > /proc/sys/vm/nr_hugepages
|
||||
ALLOC_PAGES=$(cat /proc/sys/vm/nr_hugepages)
|
||||
echo "Succesfully allocated $ALLOC_PAGES / $HUGEPAGES"
|
||||
let TRIES+=1
|
||||
done
|
||||
|
||||
if [ "$ALLOC_PAGES" -ne "$HUGEPAGES" ]
|
||||
then
|
||||
echo "Not able to allocate all hugepages. Reverting..."
|
||||
echo 0 > /proc/sys/vm/nr_hugepages
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Unload all Nvidia drivers
|
||||
modprobe -r nvidia_drm
|
||||
modprobe -r nvidia_modeset
|
||||
modprobe -r nvidia_uvm
|
||||
modprobe -r nvidia
|
||||
|
||||
# Unbind the GPU from display driver
|
||||
virsh nodedev-detach $VIRSH_GPU_VIDEO
|
||||
virsh nodedev-detach $VIRSH_GPU_AUDIO
|
||||
|
||||
# Load VFIO kernel module
|
||||
modprobe vfio
|
||||
modprobe vfio_pci
|
||||
modprobe vfio_iommu_type1
|
||||
|
||||
# Create looking glass shm
|
||||
systemd-tmpfiles --create /etc/tmpfiles.d/10-looking-glass.conf
|
||||
|
||||
# Enable CPU governor performance mode
|
||||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "performance" > $file; done
|
||||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
|
||||
# Isolate host
|
||||
systemctl set-property --runtime -- user.slice AllowedCPUs=12,13,14,15
|
||||
systemctl set-property --runtime -- system.slice AllowedCPUs=12,13,14,15
|
||||
systemctl set-property --runtime -- init.scope AllowedCPUs=12,13,14,15
|
43
scripts/hooks/win10-igpu/release/end/revert.sh
Normal file
43
scripts/hooks/win10-igpu/release/end/revert.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
# Load Variables
|
||||
source "/etc/libvirt/hooks/kvm.conf"
|
||||
|
||||
# Unload VFIO kernel module
|
||||
modprobe -r vfio_pci
|
||||
modprobe -r vfio_iommu_type1
|
||||
modprobe -r vfio
|
||||
|
||||
# Rebind the GPU to display driver
|
||||
virsh nodedev-reattach $VIRSH_GPU_VIDEO
|
||||
virsh nodedev-reattach $VIRSH_GPU_AUDIO
|
||||
|
||||
# Read our nvidia configuration when before starting our graphics
|
||||
nvidia-xconfig --query-gpu-info > /dev/null 2>&1
|
||||
|
||||
# Load all Nvidia drivers
|
||||
modprobe nvidia_drm
|
||||
modprobe nvidia_modeset
|
||||
modprobe nvidia_uvm
|
||||
modprobe nvidia
|
||||
|
||||
# Dealloc hugepages
|
||||
echo 0 > /proc/sys/vm/nr_hugepages
|
||||
|
||||
## Enable CPU governor schedutil mode
|
||||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "schedutil" > $file; done
|
||||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
|
||||
# Deisolate host
|
||||
systemctl set-property --runtime -- user.slice AllowedCPUs=0-15
|
||||
systemctl set-property --runtime -- system.slice AllowedCPUs=0-15
|
||||
systemctl set-property --runtime -- init.scope AllowedCPUs=0-15
|
||||
|
||||
# Delete looking glass shm
|
||||
rm /dev/shm/looking-glass
|
||||
|
||||
# Mount the Windows drive
|
||||
mount -a || /bin/true
|
17
scripts/hooks/win10-igpu/started/begin/lightdm.sh
Normal file
17
scripts/hooks/win10-igpu/started/begin/lightdm.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Uncomment autologin lines in /etc/lightdm/lightdm.conf
|
||||
sed -i 's/^#autologin-user=/autologin-user=/' /etc/lightdm/lightdm.conf
|
||||
sed -i 's/^#autologin-user-timeout=/autologin-user-timeout=/' /etc/lightdm/lightdm.conf
|
||||
sed -i 's/^#autologin-session=/autologin-session=/' /etc/lightdm/lightdm.conf
|
||||
|
||||
# Restart lightdm
|
||||
systemctl restart lightdm.service
|
||||
|
||||
# Sleep 10 seconds
|
||||
sleep 10
|
||||
|
||||
# Comment out autologin lines in /etc/lightdm/lightdm.conf
|
||||
sed -i 's/^autologin-user=/#autologin-user=/' /etc/lightdm/lightdm.conf
|
||||
sed -i 's/^autologin-user-timeout=/#autologin-user-timeout=/' /etc/lightdm/lightdm.conf
|
||||
sed -i 's/^autologin-session=/#autologin-session=/' /etc/lightdm/lightdm.conf
|
@@ -1,9 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Load the config file
|
||||
set -x
|
||||
|
||||
# Load Variables
|
||||
source "/etc/libvirt/hooks/kvm.conf"
|
||||
|
||||
## Calculate number of hugepages to allocate from memory (in MB)
|
||||
# Calculate number of hugepages to allocate from memory (in MB)
|
||||
HUGEPAGES="$(($MEMORY/$(($(grep Hugepagesize /proc/meminfo | awk '{print $2}')/1024))))"
|
||||
|
||||
echo "Allocating hugepages..."
|
||||
@@ -26,3 +28,13 @@ then
|
||||
echo 0 > /proc/sys/vm/nr_hugepages
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Enable CPU governor performance mode
|
||||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "performance" > $file; done
|
||||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
|
||||
# Isolate host
|
||||
systemctl set-property --runtime -- user.slice AllowedCPUs=14,15
|
||||
systemctl set-property --runtime -- system.slice AllowedCPUs=14,15
|
||||
systemctl set-property --runtime -- init.scope AllowedCPUs=14,15
|
16
scripts/hooks/win10/release/end/revert.sh
Normal file
16
scripts/hooks/win10/release/end/revert.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
# Enable CPU governor schedutil mode
|
||||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "schedutil" > $file; done
|
||||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
|
||||
# Deisolate host
|
||||
systemctl set-property --runtime -- user.slice AllowedCPUs=0-15
|
||||
systemctl set-property --runtime -- system.slice AllowedCPUs=0-15
|
||||
systemctl set-property --runtime -- init.scope AllowedCPUs=0-15
|
||||
|
||||
# Dealloc hugepages
|
||||
echo 0 > /proc/sys/vm/nr_hugepages
|
0
scripts/iommu.sh
Normal file → Executable file
0
scripts/iommu.sh
Normal file → Executable file
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Enable CPU governor performance mode
|
||||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "performance" > $file; done
|
||||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
@@ -1,36 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
# Load Variables
|
||||
source "/etc/libvirt/hooks/kvm.conf"
|
||||
|
||||
# Stop LightDM
|
||||
systemctl stop lightdm.service
|
||||
sleep 2
|
||||
|
||||
# Unbind VTconsoles
|
||||
echo 0 > /sys/class/vtconsole/vtcon0/bind
|
||||
echo 0 > /sys/class/vtconsole/vtcon1/bind
|
||||
|
||||
# Unbind EFI-Framebuffer
|
||||
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
|
||||
|
||||
# Avoid a race condition by waiting a couple of seconds. This can be calibrated to be shorter or longer if required for your system
|
||||
sleep 2
|
||||
|
||||
# Unload all Nvidia drivers
|
||||
modprobe -r nvidia_drm
|
||||
modprobe -r nvidia_modeset
|
||||
modprobe -r drm_kms_helper
|
||||
modprobe -r nvidia
|
||||
modprobe -r drm
|
||||
|
||||
# Unbind the GPU from display driver
|
||||
virsh nodedev-detach $VIRSH_GPU_VIDEO
|
||||
virsh nodedev-detach $VIRSH_GPU_AUDIO
|
||||
|
||||
# Load VFIO kernel module
|
||||
modprobe vfio
|
||||
modprobe vfio_pci
|
||||
modprobe vfio_iommu_type1
|
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Enable CPU governor on-demand mode
|
||||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "schedutil" > $file; done
|
||||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Load the config file
|
||||
source "/etc/libvirt/hooks/kvm.conf"
|
||||
|
||||
echo 0 > /proc/sys/vm/nr_hugepages
|
@@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
|
||||
# Load the config file with our environmental variables
|
||||
source "/etc/libvirt/hooks/kvm.conf"
|
||||
|
||||
# Unload VFIO-PCI Kernel Driver
|
||||
modprobe -r vfio_pci
|
||||
modprobe -r vfio_iommu_type1
|
||||
modprobe -r vfio
|
||||
|
||||
# Re-Bind GPU to our display drivers
|
||||
virsh nodedev-reattach $VIRSH_GPU_VIDEO
|
||||
virsh nodedev-reattach $VIRSH_GPU_AUDIO
|
||||
|
||||
# Rebind VT consoles
|
||||
echo 1 > /sys/class/vtconsole/vtcon0/bind
|
||||
echo 1 > /sys/class/vtconsole/vtcon1/bind
|
||||
|
||||
# Read our nvidia configuration when before starting our graphics
|
||||
nvidia-xconfig --query-gpu-info > /dev/null 2>&1
|
||||
|
||||
# Re-Bind EFI-Framebuffer
|
||||
echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind
|
||||
|
||||
# Load nvidia drivers
|
||||
modprobe nvidia_drm
|
||||
modprobe nvidia_modeset
|
||||
modprobe drm_kms_helper
|
||||
modprobe nvidia
|
||||
modprobe drm
|
||||
|
||||
# Restart Display Manager
|
||||
systemctl start lightdm.service
|
@@ -1,52 +1,50 @@
|
||||
<!--
|
||||
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
|
||||
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
|
||||
virsh edit Win10-nopass
|
||||
virsh edit win10-igpu
|
||||
or other application using the libvirt API.
|
||||
-->
|
||||
|
||||
<domain type='kvm'>
|
||||
<name>Win10-nopass</name>
|
||||
<uuid>550b0a1a-a823-467f-9632-a100834cb900</uuid>
|
||||
<title>Windows 10 - No Passthrough</title>
|
||||
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
|
||||
<name>win10-igpu</name>
|
||||
<uuid>fcac9afe-ee92-4803-a744-62b940e23e18</uuid>
|
||||
<title>Windows 10 - Passthrough (Hybrid Mode)</title>
|
||||
<metadata>
|
||||
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
|
||||
<libosinfo:os id="http://microsoft.com/win/10"/>
|
||||
</libosinfo:libosinfo>
|
||||
</metadata>
|
||||
<memory unit='KiB'>25165824</memory>
|
||||
<currentMemory unit='KiB'>25165824</currentMemory>
|
||||
<memory unit='KiB'>20971520</memory>
|
||||
<currentMemory unit='KiB'>20971520</currentMemory>
|
||||
<memoryBacking>
|
||||
<hugepages/>
|
||||
</memoryBacking>
|
||||
<vcpu placement='static'>12</vcpu>
|
||||
<iothreads>2</iothreads>
|
||||
<cputune>
|
||||
<vcpupin vcpu='0' cpuset='4'/>
|
||||
<vcpupin vcpu='1' cpuset='5'/>
|
||||
<vcpupin vcpu='2' cpuset='6'/>
|
||||
<vcpupin vcpu='3' cpuset='7'/>
|
||||
<vcpupin vcpu='4' cpuset='8'/>
|
||||
<vcpupin vcpu='5' cpuset='9'/>
|
||||
<vcpupin vcpu='6' cpuset='10'/>
|
||||
<vcpupin vcpu='7' cpuset='11'/>
|
||||
<vcpupin vcpu='8' cpuset='12'/>
|
||||
<vcpupin vcpu='9' cpuset='13'/>
|
||||
<vcpupin vcpu='10' cpuset='14'/>
|
||||
<vcpupin vcpu='11' cpuset='15'/>
|
||||
<emulatorpin cpuset='0-1'/>
|
||||
<iothreadpin iothread='1' cpuset='0-1'/>
|
||||
<iothreadpin iothread='2' cpuset='2-3'/>
|
||||
<vcpupin vcpu='0' cpuset='0'/>
|
||||
<vcpupin vcpu='1' cpuset='1'/>
|
||||
<vcpupin vcpu='2' cpuset='2'/>
|
||||
<vcpupin vcpu='3' cpuset='3'/>
|
||||
<vcpupin vcpu='4' cpuset='4'/>
|
||||
<vcpupin vcpu='5' cpuset='5'/>
|
||||
<vcpupin vcpu='6' cpuset='6'/>
|
||||
<vcpupin vcpu='7' cpuset='7'/>
|
||||
<vcpupin vcpu='8' cpuset='8'/>
|
||||
<vcpupin vcpu='9' cpuset='9'/>
|
||||
<vcpupin vcpu='10' cpuset='10'/>
|
||||
<vcpupin vcpu='11' cpuset='11'/>
|
||||
</cputune>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc-q35-6.1'>hvm</type>
|
||||
<type arch='x86_64' machine='pc-q35-6.2'>hvm</type>
|
||||
<loader readonly='yes' type='pflash'>/usr/share/edk2-ovmf/x64/OVMF_CODE.fd</loader>
|
||||
<nvram>/var/lib/libvirt/qemu/nvram/Win10-nopass_VARS.fd</nvram>
|
||||
<nvram>/var/lib/libvirt/qemu/nvram/win10-igpu_VARS.fd</nvram>
|
||||
<boot dev='hd'/>
|
||||
<bootmenu enable='no'/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
<hyperv>
|
||||
<hyperv mode='custom'>
|
||||
<relaxed state='on'/>
|
||||
<vapic state='on'/>
|
||||
<spinlocks state='on' retries='8191'/>
|
||||
@@ -54,13 +52,13 @@ or other application using the libvirt API.
|
||||
<synic state='on'/>
|
||||
<stimer state='on'/>
|
||||
<reset state='on'/>
|
||||
<vendor_id state='on' value='eirene'/>
|
||||
<frequencies state='on'/>
|
||||
</hyperv>
|
||||
<kvm>
|
||||
<hidden state='on'/>
|
||||
</kvm>
|
||||
<vmport state='off'/>
|
||||
<ioapic driver='kvm'/>
|
||||
</features>
|
||||
<cpu mode='host-passthrough' check='none' migratable='on'>
|
||||
<topology sockets='1' dies='1' cores='6' threads='2'/>
|
||||
@@ -82,26 +80,22 @@ or other application using the libvirt API.
|
||||
</pm>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='qemu' type='raw' cache='writeback' io='threads' discard='unmap'/>
|
||||
<source file='/home/nick/VMs/Win10/win10.img'/>
|
||||
<disk type='block' device='disk'>
|
||||
<driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/>
|
||||
<source dev='/dev/nvme1n1'/>
|
||||
<target dev='vda' bus='virtio'/>
|
||||
<boot order='1'/>
|
||||
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
|
||||
</disk>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
<source file='/home/nick/VMs/Win10/virtio-win-0.1.208.iso'/>
|
||||
<target dev='sdc' bus='sata'/>
|
||||
<source file='/home/nick/VMs/Win10/virtio-win-0.1.215.iso'/>
|
||||
<target dev='sdb' bus='sata'/>
|
||||
<readonly/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='2'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
|
||||
</disk>
|
||||
<controller type='usb' index='0' model='qemu-xhci' ports='15'>
|
||||
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
|
||||
</controller>
|
||||
<controller type='sata' index='0'>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
|
||||
</controller>
|
||||
<controller type='pci' index='0' model='pcie-root'/>
|
||||
<controller type='pci' index='1' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
@@ -140,63 +134,56 @@ or other application using the libvirt API.
|
||||
</controller>
|
||||
<controller type='pci' index='8' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='8' port='0x8'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
|
||||
<target chassis='8' port='0x17'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
|
||||
</controller>
|
||||
<controller type='pci' index='9' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='9' port='0x9'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
|
||||
<target chassis='9' port='0x18'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
|
||||
</controller>
|
||||
<controller type='pci' index='10' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='10' port='0xa'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||
<target chassis='10' port='0x19'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
|
||||
</controller>
|
||||
<controller type='pci' index='11' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='11' port='0xb'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
|
||||
<target chassis='11' port='0x1a'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
|
||||
</controller>
|
||||
<controller type='pci' index='12' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='12' port='0xc'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
|
||||
<target chassis='12' port='0x1b'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
|
||||
</controller>
|
||||
<controller type='pci' index='13' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='13' port='0xd'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
|
||||
<target chassis='13' port='0x1c'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
|
||||
</controller>
|
||||
<controller type='pci' index='14' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='14' port='0xe'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
|
||||
<target chassis='14' port='0x1d'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
|
||||
</controller>
|
||||
<controller type='pci' index='15' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='15' port='0xf'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/>
|
||||
<target chassis='15' port='0x1e'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x6'/>
|
||||
</controller>
|
||||
<controller type='pci' index='16' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='16' port='0x17'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
|
||||
</controller>
|
||||
<controller type='pci' index='17' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='17' port='0x18'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</controller>
|
||||
<controller type='pci' index='18' model='pcie-to-pci-bridge'>
|
||||
<controller type='pci' index='16' model='pcie-to-pci-bridge'>
|
||||
<model name='pcie-pci-bridge'/>
|
||||
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
|
||||
</controller>
|
||||
<controller type='sata' index='0'>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
|
||||
</controller>
|
||||
<controller type='virtio-serial' index='0'>
|
||||
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
|
||||
</controller>
|
||||
<interface type='network'>
|
||||
<mac address='52:54:00:6b:c9:22'/>
|
||||
<mac address='52:54:00:a7:98:7b'/>
|
||||
<source network='default'/>
|
||||
<model type='virtio'/>
|
||||
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
|
||||
@@ -206,36 +193,54 @@ or other application using the libvirt API.
|
||||
<address type='virtio-serial' controller='0' bus='0' port='1'/>
|
||||
</channel>
|
||||
<input type='mouse' bus='virtio'>
|
||||
<address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
|
||||
</input>
|
||||
<input type='keyboard' bus='virtio'>
|
||||
<address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
|
||||
</input>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<input type='keyboard' bus='ps2'/>
|
||||
<graphics type='spice' autoport='yes'>
|
||||
<graphics type='spice' port='5900' autoport='no'>
|
||||
<listen type='address'/>
|
||||
<image compression='off'/>
|
||||
<gl enable='no'/>
|
||||
</graphics>
|
||||
<sound model='ich9'>
|
||||
<codec type='micro'/>
|
||||
<audio id='1'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
|
||||
</sound>
|
||||
<audio id='1' type='none'/>
|
||||
<audio id='1' type='pulseaudio' serverName='/run/user/1000/pulse/native'/>
|
||||
<video>
|
||||
<model type='virtio' heads='1' primary='yes'>
|
||||
<acceleration accel3d='no'/>
|
||||
</model>
|
||||
<address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
|
||||
<model type='none'/>
|
||||
</video>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
|
||||
</source>
|
||||
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
|
||||
</hostdev>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
|
||||
</source>
|
||||
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
|
||||
</hostdev>
|
||||
<redirdev bus='usb' type='spicevmc'>
|
||||
<address type='usb' bus='0' port='2'/>
|
||||
</redirdev>
|
||||
<redirdev bus='usb' type='spicevmc'>
|
||||
<address type='usb' bus='0' port='3'/>
|
||||
</redirdev>
|
||||
<memballoon model='virtio'>
|
||||
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
<shmem name='looking-glass'>
|
||||
<model type='ivshmem-plain'/>
|
||||
<size unit='M'>64</size>
|
||||
<address type='pci' domain='0x0000' bus='0x10' slot='0x01' function='0x0'/>
|
||||
</shmem>
|
||||
</devices>
|
||||
<qemu:commandline>
|
||||
<qemu:arg value='-acpitable'/>
|
||||
<qemu:arg value='file=/home/nick/VMs/Win10/SSDT1.dat'/>
|
||||
</qemu:commandline>
|
||||
</domain>
|
@@ -1,73 +1,68 @@
|
||||
<!--
|
||||
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
|
||||
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
|
||||
virsh edit Win10
|
||||
virsh edit win10
|
||||
or other application using the libvirt API.
|
||||
-->
|
||||
|
||||
<domain type='kvm'>
|
||||
<name>Win10</name>
|
||||
<uuid>aa9e4adc-b229-453d-8578-1fa8840e931c</uuid>
|
||||
<title>Windows 10</title>
|
||||
<name>win10</name>
|
||||
<uuid>f2e93cfa-83b9-4f55-ab44-da4fe7373ac4</uuid>
|
||||
<title>Windows 10 - No Passthrough</title>
|
||||
<metadata>
|
||||
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
|
||||
<libosinfo:os id="http://microsoft.com/win/10"/>
|
||||
</libosinfo:libosinfo>
|
||||
</metadata>
|
||||
<memory unit='KiB'>25165824</memory>
|
||||
<currentMemory unit='KiB'>25165824</currentMemory>
|
||||
<memory unit='KiB'>20971520</memory>
|
||||
<currentMemory unit='KiB'>20971520</currentMemory>
|
||||
<memoryBacking>
|
||||
<hugepages/>
|
||||
</memoryBacking>
|
||||
<vcpu placement='static'>12</vcpu>
|
||||
<iothreads>2</iothreads>
|
||||
<cputune>
|
||||
<vcpupin vcpu='0' cpuset='4'/>
|
||||
<vcpupin vcpu='1' cpuset='5'/>
|
||||
<vcpupin vcpu='2' cpuset='6'/>
|
||||
<vcpupin vcpu='3' cpuset='7'/>
|
||||
<vcpupin vcpu='4' cpuset='8'/>
|
||||
<vcpupin vcpu='5' cpuset='9'/>
|
||||
<vcpupin vcpu='6' cpuset='10'/>
|
||||
<vcpupin vcpu='7' cpuset='11'/>
|
||||
<vcpupin vcpu='8' cpuset='12'/>
|
||||
<vcpupin vcpu='9' cpuset='13'/>
|
||||
<vcpupin vcpu='10' cpuset='14'/>
|
||||
<vcpupin vcpu='11' cpuset='15'/>
|
||||
<emulatorpin cpuset='0-1'/>
|
||||
<iothreadpin iothread='1' cpuset='0-1'/>
|
||||
<iothreadpin iothread='2' cpuset='2-3'/>
|
||||
<vcpupin vcpu='0' cpuset='0'/>
|
||||
<vcpupin vcpu='1' cpuset='1'/>
|
||||
<vcpupin vcpu='2' cpuset='2'/>
|
||||
<vcpupin vcpu='3' cpuset='3'/>
|
||||
<vcpupin vcpu='4' cpuset='4'/>
|
||||
<vcpupin vcpu='5' cpuset='5'/>
|
||||
<vcpupin vcpu='6' cpuset='6'/>
|
||||
<vcpupin vcpu='7' cpuset='7'/>
|
||||
<vcpupin vcpu='8' cpuset='8'/>
|
||||
<vcpupin vcpu='9' cpuset='9'/>
|
||||
<vcpupin vcpu='10' cpuset='10'/>
|
||||
<vcpupin vcpu='11' cpuset='11'/>
|
||||
</cputune>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc-q35-6.1'>hvm</type>
|
||||
<type arch='x86_64' machine='pc-q35-6.2'>hvm</type>
|
||||
<loader readonly='yes' type='pflash'>/usr/share/edk2-ovmf/x64/OVMF_CODE.fd</loader>
|
||||
<nvram>/var/lib/libvirt/qemu/nvram/Win10_VARS.fd</nvram>
|
||||
<nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
|
||||
<boot dev='hd'/>
|
||||
<bootmenu enable='no'/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
<hyperv>
|
||||
<hyperv mode='custom'>
|
||||
<relaxed state='on'/>
|
||||
<vapic state='on'/>
|
||||
<spinlocks state='on' retries='8191'/>
|
||||
<vpindex state='on'/>
|
||||
<runtime state='on'/>
|
||||
<synic state='on'/>
|
||||
<stimer state='on'/>
|
||||
<reset state='on'/>
|
||||
<vendor_id state='on' value='eirene'/>
|
||||
<frequencies state='on'/>
|
||||
</hyperv>
|
||||
<kvm>
|
||||
<hidden state='on'/>
|
||||
</kvm>
|
||||
<vmport state='off'/>
|
||||
<ioapic driver='kvm'/>
|
||||
</features>
|
||||
<cpu mode='host-passthrough' check='none' migratable='on'>
|
||||
<topology sockets='1' dies='1' cores='6' threads='2'/>
|
||||
<cache mode='passthrough'/>
|
||||
<feature policy='require' name='topoext'/>
|
||||
<feature policy='disable' name='hypervisor'/>
|
||||
</cpu>
|
||||
<clock offset='localtime'>
|
||||
<timer name='rtc' tickpolicy='catchup'/>
|
||||
@@ -84,26 +79,22 @@ or other application using the libvirt API.
|
||||
</pm>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='qemu' type='raw' cache='writeback' io='threads' discard='unmap'/>
|
||||
<source file='/home/nick/VMs/Win10/win10.img'/>
|
||||
<disk type='block' device='disk'>
|
||||
<driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/>
|
||||
<source dev='/dev/nvme1n1'/>
|
||||
<target dev='vda' bus='virtio'/>
|
||||
<boot order='1'/>
|
||||
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
|
||||
</disk>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
<source file='/home/nick/VMs/Win10/virtio-win-0.1.208.iso'/>
|
||||
<target dev='sdc' bus='sata'/>
|
||||
<source file='/home/nick/VMs/Win10/virtio-win-0.1.215.iso'/>
|
||||
<target dev='sdb' bus='sata'/>
|
||||
<readonly/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='2'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
|
||||
</disk>
|
||||
<controller type='usb' index='0' model='qemu-xhci' ports='15'>
|
||||
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
|
||||
</controller>
|
||||
<controller type='sata' index='0'>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
|
||||
</controller>
|
||||
<controller type='pci' index='0' model='pcie-root'/>
|
||||
<controller type='pci' index='1' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
@@ -142,54 +133,47 @@ or other application using the libvirt API.
|
||||
</controller>
|
||||
<controller type='pci' index='8' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='8' port='0x8'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
|
||||
<target chassis='8' port='0x17'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
|
||||
</controller>
|
||||
<controller type='pci' index='9' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='9' port='0x9'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
|
||||
<target chassis='9' port='0x18'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
|
||||
</controller>
|
||||
<controller type='pci' index='10' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='10' port='0xa'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||
<target chassis='10' port='0x19'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
|
||||
</controller>
|
||||
<controller type='pci' index='11' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='11' port='0xb'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
|
||||
<target chassis='11' port='0x1a'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
|
||||
</controller>
|
||||
<controller type='pci' index='12' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='12' port='0xc'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
|
||||
<target chassis='12' port='0x1b'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
|
||||
</controller>
|
||||
<controller type='pci' index='13' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='13' port='0xd'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
|
||||
<target chassis='13' port='0x1c'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
|
||||
</controller>
|
||||
<controller type='pci' index='14' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='14' port='0xe'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
|
||||
<target chassis='14' port='0x1d'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
|
||||
</controller>
|
||||
<controller type='pci' index='15' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='15' port='0xf'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/>
|
||||
</controller>
|
||||
<controller type='pci' index='16' model='pcie-root-port'>
|
||||
<model name='pcie-root-port'/>
|
||||
<target chassis='16' port='0x17'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
|
||||
<controller type='sata' index='0'>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
|
||||
</controller>
|
||||
<controller type='virtio-serial' index='0'>
|
||||
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
|
||||
</controller>
|
||||
<interface type='network'>
|
||||
<mac address='52:54:00:9b:07:9e'/>
|
||||
<mac address='52:54:00:68:c6:5f'/>
|
||||
<source network='default'/>
|
||||
<model type='virtio'/>
|
||||
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
|
||||
@@ -198,65 +182,32 @@ or other application using the libvirt API.
|
||||
<target type='virtio' name='com.redhat.spice.0'/>
|
||||
<address type='virtio-serial' controller='0' bus='0' port='1'/>
|
||||
</channel>
|
||||
<input type='tablet' bus='usb'>
|
||||
<address type='usb' bus='0' port='1'/>
|
||||
</input>
|
||||
<input type='mouse' bus='virtio'>
|
||||
<address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
|
||||
</input>
|
||||
<input type='keyboard' bus='virtio'>
|
||||
<address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
|
||||
</input>
|
||||
<input type='evdev'>
|
||||
<source dev='/dev/input/touchpad'/>
|
||||
</input>
|
||||
<input type='evdev'>
|
||||
<source dev='/dev/input/by-id/usb-ITE_Tech._Inc._ITE_Device_8258_-event-kbd' grab='all' repeat='on'/>
|
||||
<address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
|
||||
</input>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<input type='keyboard' bus='ps2'/>
|
||||
<audio id='1' type='none'/>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
|
||||
</source>
|
||||
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
|
||||
</hostdev>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
|
||||
</source>
|
||||
<address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
|
||||
</hostdev>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x05' slot='0x00' function='0x6'/>
|
||||
</source>
|
||||
<address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
|
||||
</hostdev>
|
||||
<hostdev mode='subsystem' type='usb' managed='yes'>
|
||||
<source>
|
||||
<vendor id='0x13d3'/>
|
||||
<product id='0x56bb'/>
|
||||
</source>
|
||||
<address type='usb' bus='0' port='4'/>
|
||||
</hostdev>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
|
||||
</source>
|
||||
<address type='pci' domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/>
|
||||
</hostdev>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
|
||||
</source>
|
||||
<address type='pci' domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/>
|
||||
</hostdev>
|
||||
<hostdev mode='subsystem' type='usb' managed='yes'>
|
||||
<source>
|
||||
<vendor id='0x1532'/>
|
||||
<product id='0x005c'/>
|
||||
</source>
|
||||
<address type='usb' bus='0' port='1'/>
|
||||
</hostdev>
|
||||
<graphics type='spice'>
|
||||
<listen type='none'/>
|
||||
<image compression='off'/>
|
||||
<gl enable='yes' rendernode='/dev/dri/by-path/pci-0000:06:00.0-render'/>
|
||||
</graphics>
|
||||
<sound model='ich9'>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
|
||||
</sound>
|
||||
<audio id='1' type='spice'/>
|
||||
<video>
|
||||
<model type='virtio' heads='1' primary='yes'>
|
||||
<acceleration accel3d='yes'/>
|
||||
</model>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
|
||||
</video>
|
||||
<redirdev bus='usb' type='spicevmc'>
|
||||
<address type='usb' bus='0' port='2'/>
|
||||
</redirdev>
|
Reference in New Issue
Block a user