You are not logged in.

#1 2022-01-17 07:36:03

Maybegus
Member
Registered: 2021-05-09
Posts: 9

OVMF GPU passthrough virtual machine freezes host

I have tried to setup a windows 10 GPU passthrough virtual machine by following this guide https://wiki.archlinux.org/title/PCI_pa … h_via_OVMF
I have also enabled ACS override through the linux-zen kernel and have 2 GPUs, an AMD GPU which I am passing through and a NVIDIA GPU for my host system.
When I startup the VM, after ~20 seconds pass X freezes on the archlinux host, and around 10 seconds after that I am kicked to a black screen with a blinking cursor, both my keyboard and mouse loose power for a couple of seconds, and I cannot go back to tty or poweroff using the power button, and qemu, libvirtd, dmesg, and journalctl logs don't show any errors.

CAD.xml

<domain type="kvm">
  <name>CAD</name>
  <uuid>278cbf70-70b4-459d-b6cc-5ae16ca38809</uuid>
  <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">4194304</memory>
  <currentMemory unit="KiB">4194304</currentMemory>
  <vcpu placement="static">4</vcpu>
  <os>
    <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/CAD_VARS.fd</nvram>
    <boot dev="hd"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
      <vendor_id state="on" value="randomid"/>
    </hyperv>
    <kvm>
      <hidden state="on"/>
    </kvm>
    <vmport state="off"/>
  </features>
  <cpu mode="host-passthrough" check="partial" migratable="on"/>
  <clock offset="localtime">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
    <timer name="hypervclock" present="yes"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/home/maybegus/vms/win10.qcow2"/>
      <target dev="sda" bus="sata"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/maybegus/Downloads/Win10_21H2_English_x64.iso"/>
      <target dev="sdb" bus="sata"/>
      <readonly/>
      <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"/>
      <target chassis="1" port="0x10"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="2" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="2" port="0x11"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
    </controller>
    <controller type="pci" index="3" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="3" port="0x12"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
    </controller>
    <controller type="pci" index="4" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="4" port="0x13"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
    </controller>
    <controller type="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0x14"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
    </controller>
    <controller type="pci" index="6" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="6" port="0x15"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
    </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:ac:35:31"/>
      <source network="default"/>
      <model type="e1000e"/>
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </interface>
    <serial type="pty">
      <target type="isa-serial" port="0">
        <model name="isa-serial"/>
      </target>
    </serial>
    <console type="pty">
      <target type="serial" port="0"/>
    </console>
    <channel type="spicevmc">
      <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="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <graphics type="spice" autoport="yes">
      <listen type="address"/>
      <image compression="off"/>
    </graphics>
    <sound model="ich9">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
    </sound>
    <audio id="1" type="spice"/>
    <video>
      <model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
    </video>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x03" 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="0x03" 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="0x04" slot="0x00" function="0x0"/>
    </memballoon>
  </devices>
</domain>

CAD.log

2022-01-17 05:48:02.004+0000: starting up libvirt version: 7.10.0, qemu version: 6.2.0, kernel: 5.16.0-zen1-1-zen, hostname: a
LC_ALL=C \
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin \
HOME=/var/lib/libvirt/qemu/domain-1-CAD \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-1-CAD/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-1-CAD/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-1-CAD/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=CAD,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain-1-CAD/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/edk2-ovmf/x64/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/CAD_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-6.2,usb=off,vmport=off,dump-guest-core=off,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,memory-backend=pc.ram \
-accel kvm \
-cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,tsc-scale=on,svme-addr-chk=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on,hv-time=on,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x1fff \
-m 4096 \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":4294967296}' \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
-uuid 278cbf70-70b4-459d-b6cc-5ae16ca38809 \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=32,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=localtime,driftfix=slew \
-global kvm-pit.lost_tick_policy=delay \
-no-hpet \
-no-shutdown \
-global ICH9-LPC.disable_s3=1 \
-global ICH9-LPC.disable_s4=1 \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \
-device '{"driver":"pcie-root-port","port":17,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x2.0x1"}' \
-device '{"driver":"pcie-root-port","port":18,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x2"}' \
-device '{"driver":"pcie-root-port","port":19,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x3"}' \
-device '{"driver":"pcie-root-port","port":20,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x4"}' \
-device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.2","addr":"0x0"}' \
-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.3","addr":"0x0"}' \
-blockdev '{"driver":"file","filename":"/home/maybegus/vms/win10.qcow2","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage","backing":null}' \
-device '{"driver":"ide-hd","bus":"ide.0","drive":"libvirt-2-format","id":"sata0-0-0","bootindex":2}' \
-blockdev '{"driver":"file","filename":"/home/maybegus/Downloads/Win10_21H2_English_x64.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \
-device '{"driver":"ide-cd","bus":"ide.1","drive":"libvirt-1-format","id":"sata0-0-1","bootindex":1}' \
-netdev tap,fd=34,id=hostnet0 \
-device '{"driver":"e1000e","netdev":"hostnet0","id":"net0","mac":"52:54:00:ac:35:31","bus":"pci.1","addr":"0x0"}' \
-chardev pty,id=charserial0 \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
-chardev spicevmc,id=charchannel0,name=vdagent \
-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"com.redhat.spice.0"}' \
-device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \
-audiodev '{"id":"audio1","driver":"spice"}' \
-spice port=5900,addr=127.0.0.1,disable-ticketing=on,image-compression=off,seamless-migration=on \
-device '{"driver":"qxl-vga","id":"video0","ram_size":67108864,"vram_size":67108864,"vram64_size_mb":0,"vgamem_mb":16,"max_outputs":1,"bus":"pcie.0","addr":"0x1"}' \
-device '{"driver":"ich9-intel-hda","id":"sound0","bus":"pcie.0","addr":"0x1b"}' \
-device '{"driver":"hda-duplex","id":"sound0-codec0","bus":"sound0.0","cad":0,"audiodev":"audio1"}' \
-chardev spicevmc,id=charredir0,name=usbredir \
-device '{"driver":"usb-redir","chardev":"charredir0","id":"redir0","bus":"usb.0","port":"2"}' \
-chardev spicevmc,id=charredir1,name=usbredir \
-device '{"driver":"usb-redir","chardev":"charredir1","id":"redir1","bus":"usb.0","port":"3"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.4","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
char device redirected to /dev/pts/1 (label charserial0)
2022-01-17T05:48:02.068116Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.tsc-scale [bit 4]
2022-01-17T05:48:02.068150Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2022-01-17T05:48:02.068549Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.tsc-scale [bit 4]
2022-01-17T05:48:02.068553Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2022-01-17T05:48:02.068804Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.tsc-scale [bit 4]
2022-01-17T05:48:02.068809Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2022-01-17T05:48:02.069022Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.tsc-scale [bit 4]
2022-01-17T05:48:02.069028Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
qxl_send_events: spice-server bug: guest stopped, ignoring
2022-01-17T05:51:13.840841Z qemu-system-x86_64: terminating on signal 15 from pid 3246 (/usr/bin/libvirtd)
2022-01-17 05:51:14.081+0000: shutting down, reason=shutdown
2022-01-17 06:05:33.884+0000: starting up libvirt version: 7.10.0, qemu version: 6.2.0, kernel: 5.16.0-zen1-1-zen, hostname: a
LC_ALL=C \
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin \
HOME=/var/lib/libvirt/qemu/domain-2-CAD \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-2-CAD/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-2-CAD/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-2-CAD/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=CAD,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain-2-CAD/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/edk2-ovmf/x64/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/CAD_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-6.2,usb=off,vmport=off,dump-guest-core=off,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,memory-backend=pc.ram \
-accel kvm \
-cpu host,migratable=on,hv-time=on,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x1fff,hv-vendor-id=randomid,kvm=off \
-m 4096 \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":4294967296}' \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
-uuid 278cbf70-70b4-459d-b6cc-5ae16ca38809 \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=32,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=localtime,driftfix=slew \
-global kvm-pit.lost_tick_policy=delay \
-no-hpet \
-no-shutdown \
-global ICH9-LPC.disable_s3=1 \
-global ICH9-LPC.disable_s4=1 \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \
-device '{"driver":"pcie-root-port","port":17,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x2.0x1"}' \
-device '{"driver":"pcie-root-port","port":18,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x2"}' \
-device '{"driver":"pcie-root-port","port":19,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x3"}' \
-device '{"driver":"pcie-root-port","port":20,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x4"}' \
-device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.2","addr":"0x0"}' \
-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.3","addr":"0x0"}' \
-blockdev '{"driver":"file","filename":"/home/maybegus/vms/win10.qcow2","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage","backing":null}' \
-device '{"driver":"ide-hd","bus":"ide.0","drive":"libvirt-2-format","id":"sata0-0-0","bootindex":1}' \
-blockdev '{"driver":"file","filename":"/home/maybegus/Downloads/Win10_21H2_English_x64.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \
-device '{"driver":"ide-cd","bus":"ide.1","drive":"libvirt-1-format","id":"sata0-0-1"}' \
-netdev tap,fd=34,id=hostnet0 \
-device '{"driver":"e1000e","netdev":"hostnet0","id":"net0","mac":"52:54:00:ac:35:31","bus":"pci.1","addr":"0x0"}' \
-chardev pty,id=charserial0 \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
-chardev spicevmc,id=charchannel0,name=vdagent \
-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"com.redhat.spice.0"}' \
-device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \
-audiodev '{"id":"audio1","driver":"spice"}' \
-spice port=5900,addr=127.0.0.1,disable-ticketing=on,image-compression=off,seamless-migration=on \
-device '{"driver":"qxl-vga","id":"video0","ram_size":67108864,"vram_size":67108864,"vram64_size_mb":0,"vgamem_mb":16,"max_outputs":1,"bus":"pcie.0","addr":"0x1"}' \
-device '{"driver":"ich9-intel-hda","id":"sound0","bus":"pcie.0","addr":"0x1b"}' \
-device '{"driver":"hda-duplex","id":"sound0-codec0","bus":"sound0.0","cad":0,"audiodev":"audio1"}' \
-chardev spicevmc,id=charredir0,name=usbredir \
-device '{"driver":"usb-redir","chardev":"charredir0","id":"redir0","bus":"usb.0","port":"2"}' \
-chardev spicevmc,id=charredir1,name=usbredir \
-device '{"driver":"usb-redir","chardev":"charredir1","id":"redir1","bus":"usb.0","port":"3"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.4","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
char device redirected to /dev/pts/1 (label charserial0)
qxl_send_events: spice-server bug: guest stopped, ignoring
2022-01-17T06:11:08.621316Z qemu-system-x86_64: terminating on signal 15 from pid 3246 (/usr/bin/libvirtd)
2022-01-17 06:11:08.840+0000: shutting down, reason=shutdown
2022-01-17 06:11:50.194+0000: shutting down, reason=failed
\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00

Offline

#2 2022-01-17 14:19:08

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: OVMF GPU passthrough virtual machine freezes host

2022-01-17T05:48:02.068116Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.tsc-scale [bit 4]
2022-01-17T05:48:02.068150Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2022-01-17T05:48:02.068549Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.tsc-scale [bit 4]
2022-01-17T05:48:02.068553Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2022-01-17T05:48:02.068804Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.tsc-scale [bit 4]
2022-01-17T05:48:02.068809Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2022-01-17T05:48:02.069022Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.tsc-scale [bit 4]
2022-01-17T05:48:02.069028Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]

Looks very similar to https://gitlab.com/qemu-project/qemu/-/issues/776


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2022-01-18 02:35:06

Maybegus
Member
Registered: 2021-05-09
Posts: 9

Re: OVMF GPU passthrough virtual machine freezes host

I tried adding the setting in the link you provided to my xml

<qemu:commandline>
    <qemu:arg value="-display"/>
    <qemu:arg value="gtk,gl=on"/>
  </qemu:commandline>

But the machine doesn't start with this error in the qemu logs

2022-01-18 02:29:18.887+0000: 81923: debug : virLockManagerFree:381 : lock=0x7fb86001cd40
2022-01-18 02:29:18.887+0000: 81923: info : virObjectUnref:380 : OBJECT_UNREF: obj=0x7fb824042020
2022-01-18 02:29:18.887+0000: 81923: debug : qemuProcessHook:3279 : Hook complete ret=0
2022-01-18 02:29:18.887+0000: 81923: debug : virExec:843 : Done hook 0
2022-01-18 02:29:18.887+0000: 81923: debug : virExecCommon:439 : Setting child uid:gid to 65534:992 with caps 0
2022-01-18 02:29:18.887+0000: 81923: debug : virCommandHandshakeChild:401 : Notifying parent for handshake start on 36
2022-01-18 02:29:18.887+0000: 81923: debug : virCommandHandshakeChild:409 : Waiting on parent for handshake complete on 37
2022-01-18 02:29:18.927+0000: 81923: debug : virCommandHandshakeChild:430 : Handshake with parent is done
2022-01-18T02:29:18.951491Z qemu-system-x86_64: OpenGL is not supported by the display
2022-01-18 02:29:18.985+0000: shutting down, reason=failed

Offline

#4 2022-01-18 11:45:16

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: OVMF GPU passthrough virtual machine freezes host

It's possible you would need -display sdl,gl=on , or those settings only work with virtio-va-gl , not qxl-vga what your are using (according to the cad.log ).

When the passthrough is succesfull windows will use its own driver for direct access to the gpu and not need any virtio hw acceleration .

Try disabling the hardware acceleration in virt-manager .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2022-01-19 07:30:22

Maybegus
Member
Registered: 2021-05-09
Posts: 9

Re: OVMF GPU passthrough virtual machine freezes host

I removed the qxl-vga virtual display but the machine still locks up host completely, nothing but a spice audio driver warning on qemu logs.

2022-01-19 07:21:51.789+0000: 27209: debug : virProcessSetMaxMemLock:964 : Locked memory for process 27209 limited to 5368709120 bytes
2022-01-19 07:21:51.789+0000: 27209: debug : virExec:841 : Run hook 0x7f0afed0b290 0x7f0b1ea28570
2022-01-19 07:21:51.789+0000: 27209: debug : qemuProcessHook:3235 : Obtaining domain lock
2022-01-19 07:21:51.789+0000: 27209: debug : virDomainLockProcessStart:178 : plugin=0x7f0ad4089c10 dom=0x7f0ad42d8210 paused=1 fd=0x7f0b1ea28284
2022-01-19 07:21:51.789+0000: 27209: debug : virDomainLockManagerNew:133 : plugin=0x7f0ad4089c10 dom=0x7f0ad42d8210 withResources=1
2022-01-19 07:21:51.789+0000: 27209: debug : virLockManagerPluginGetDriver:276 : plugin=0x7f0ad4089c10
2022-01-19 07:21:51.789+0000: 27209: debug : virLockManagerNew:299 : driver=0x7f0b241f15c0 type=0 nparams=5 params=0x7f0b1ea28160 flags=0x1
2022-01-19 07:21:51.789+0000: 27209: debug : virLockManagerLogParams:97 :   key=uuid type=uuid value=278cbf70-70b4-459d-b6cc-5ae16ca38809
2022-01-19 07:21:51.789+0000: 27209: debug : virLockManagerLogParams:90 :   key=name type=string value=CAD
2022-01-19 07:21:51.789+0000: 27209: debug : virLockManagerLogParams:78 :   key=id type=uint value=4
2022-01-19 07:21:51.789+0000: 27209: debug : virLockManagerLogParams:78 :   key=pid type=uint value=27209
2022-01-19 07:21:51.789+0000: 27209: debug : virLockManagerLogParams:93 :   key=uri type=cstring value=qemu:///system
2022-01-19 07:21:51.789+0000: 27209: debug : virDomainLockManagerNew:146 : Adding leases
2022-01-19 07:21:51.789+0000: 27209: debug : virDomainLockManagerNew:151 : Adding disks
2022-01-19 07:21:51.789+0000: 27209: debug : virDomainLockManagerAddImage:90 : Add disk /home/maybegus/vms/win10.qcow2
2022-01-19 07:21:51.789+0000: 27209: debug : virLockManagerAddResource:325 : lock=0x7f0b0802f540 type=0 name=/home/maybegus/vms/win10.qcow2 nparams=0 params=(nil) flags=0x0
2022-01-19 07:21:51.789+0000: 27209: debug : virDomainLockManagerAddImage:90 : Add disk /home/maybegus/Downloads/Win10_21H2_English_x64.iso
2022-01-19 07:21:51.789+0000: 27209: debug : virLockManagerAddResource:325 : lock=0x7f0b0802f540 type=0 name=/home/maybegus/Downloads/Win10_21H2_English_x64.iso nparams=0 params=(nil) flags=0x1
2022-01-19 07:21:51.789+0000: 27209: debug : virLockManagerAcquire:343 : lock=0x7f0b0802f540 state='<null>' flags=0x3 action=0 fd=0x7f0b1ea28284
2022-01-19 07:21:51.789+0000: 27209: debug : virLockManagerFree:381 : lock=0x7f0b0802f540
2022-01-19 07:21:51.789+0000: 27209: info : virObjectUnref:380 : OBJECT_UNREF: obj=0x7f0ad4042020
2022-01-19 07:21:51.789+0000: 27209: debug : qemuProcessHook:3279 : Hook complete ret=0
2022-01-19 07:21:51.789+0000: 27209: debug : virExec:843 : Done hook 0
2022-01-19 07:21:51.789+0000: 27209: debug : virExecCommon:439 : Setting child uid:gid to 65534:992 with caps 0
2022-01-19 07:21:51.789+0000: 27209: debug : virCommandHandshakeChild:401 : Notifying parent for handshake start on 36
2022-01-19 07:21:51.789+0000: 27209: debug : virCommandHandshakeChild:409 : Waiting on parent for handshake complete on 37
2022-01-19 07:21:51.824+0000: 27209: debug : virCommandHandshakeChild:430 : Handshake with parent is done
audio: Could not init `spice' audio driver
audio: warning: Using timer based audio emulation

Offline

#6 2022-01-19 07:31:55

Maybegus
Member
Registered: 2021-05-09
Posts: 9

Re: OVMF GPU passthrough virtual machine freezes host

There's also this after IOMMU groups are setup in dmesg

[    0.602461] AMD-Vi: Completion-Wait loop timed out
[    0.728005] Freeing initrd memory: 13160K
[    0.727780] AMD-Vi: Completion-Wait loop timed out
[    0.852679] AMD-Vi: Completion-Wait loop timed out
[    0.977776] AMD-Vi: Completion-Wait loop timed out
[    1.102819] AMD-Vi: Completion-Wait loop timed out
[    1.227814] AMD-Vi: Completion-Wait loop timed out
[    1.352864] AMD-Vi: Completion-Wait loop timed out
[    1.477857] AMD-Vi: Completion-Wait loop timed out
[    1.604617] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[    1.604619] AMD-Vi: Extended features (0x58f77ef22294a5a): PPR NX GT IA PC GA_vAPIC
[    1.604622] AMD-Vi: Interrupt remapping enabled
[    1.604716] software IO TLB: tearing down default memory pool
[    1.604723] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=03:00.0 address=0x10020a6e0]
[    1.604726] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=03:00.0 address=0x10020a700]

Offline

Board footer

Powered by FluxBB