You are not logged in.

#26 2016-05-06 13:10:59

kachaffeous
Member
Registered: 2016-05-06
Posts: 3

Re: [SOLVED?] Qemu/KVM freezes host on guest shutdown if PCI passthrough

I'm also seeing this issue running Arch with a win10 gaming vm with qemu.   Exact same symptoms.  If i open the vm and close it w/o gaming everything works fine.  If I game for a couple hours, on VM shutdown the entire host locks up.  Nothing gets written to any logs so it is hard to troubleshoot.    Going to try to not pass through the sound to see if that works.

Here is my startup script fyi.

#!/bin/bash


echo "Starting virtual machine..."

cp /usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd /tmp/my_vars.fd

sudo \
 qemu-system-x86_64  \
  -name "Windows 10" \
  -enable-kvm \
  -m 12288 \
  -cpu host,kvm=off \
  -smp threads=2,cores=4,sockets=1 \
  -vga none \
  -soundhw hda \
  -net nic -net bridge,br=br0  \
  -usb -usbdevice host:1af3:0001 -usbdevice host:04d9:2221 -usbdevice host:046d:0a4d  \
  -device vfio-pci,host=01:00.0,multifunction=on \
  -device vfio-pci,host=01:00.1 \
  -drive if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd \
  -drive if=pflash,format=raw,file=/tmp/my_vars.fd \
  -boot order=cd \
  -device virtio-scsi-pci,id=scsi \
  -drive file=/home/jason/kvm/win.img,id=disk,format=qcow2,if=none,cache=writeback -device scsi-hd,drive=disk \

exit 0

Installed Packages

Last edited by kachaffeous (2016-05-06 13:17:22)

Offline

#27 2016-05-11 06:39:18

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: [SOLVED?] Qemu/KVM freezes host on guest shutdown if PCI passthrough

It's still not fixed in how many updates. I've finally made a bug report over at https://bugs.launchpad.net/qemu/+bug/1580459
I was waiting to find out what package was to blame first, but I don't think that can happen at this point.

Offline

#28 2016-05-11 17:15:48

kachaffeous
Member
Registered: 2016-05-06
Posts: 3

Re: [SOLVED?] Qemu/KVM freezes host on guest shutdown if PCI passthrough

Thanks for that;  removing my hdmi audio did nothing to alleviate the problem.  I'm half tempted to rebuild with fedora to see if the issue is there also.

Last edited by kachaffeous (2016-05-11 17:16:32)

Offline

#29 2016-05-17 15:56:58

kachaffeous
Member
Registered: 2016-05-06
Posts: 3

Re: [SOLVED?] Qemu/KVM freezes host on guest shutdown if PCI passthrough

Just fyi; Same issue on F24.

Offline

#30 2016-05-17 16:12:07

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: [SOLVED?] Qemu/KVM freezes host on guest shutdown if PCI passthrough

If you have this issue, please comment on the bug report with any new info you have (including if you're a distro that hasn't been reported in yet, like Fedora^). It'll get all the info right on there and also make the bug appear as active as it is in this thread, making them pay attention to it.

Offline

#31 2016-06-26 08:55:50

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: [SOLVED?] Qemu/KVM freezes host on guest shutdown if PCI passthrough

In case someone trying to fix this is too lazy to check the whole bug report thread, I managed to finally fix this after 7 long months by enabling MSI interrupts. The info for that is at:
https://bugs.launchpad.net/qemu/+bug/15 … omments/44
https://bugs.launchpad.net/qemu/+bug/15 … omments/45
https://bugs.launchpad.net/qemu/+bug/15 … omments/46
If it does fix it for you, please say so in the bug report! That way we have more confirmations of it as a fix.

Offline

#32 2016-09-24 20:48:46

oztheogre
Member
Registered: 2011-02-24
Posts: 6

Re: [SOLVED?] Qemu/KVM freezes host on guest shutdown if PCI passthrough

Literally logged in just to say I think this is one of the most helpful threads on the internet smile I was having this same issue, and have enabled MSI (within the Windows 10 guest) for my Nvidia integrated sound (GTX 950). With initial testing, it seems to of resolved this issue and will try to report back if the problem happens again.

Offline

#33 2017-12-09 17:20:07

avenger337
Member
Registered: 2017-07-21
Posts: 1

Re: [SOLVED?] Qemu/KVM freezes host on guest shutdown if PCI passthrough

This solution also works for me with a Windows 10 guest and an Nvidia GTX 780.  I wanted to add that when Windows 10 does updates, it will occasionally revert the MSI interrupts for your device.  So if you've recently done an update you may need to re-apply the registry change -- I exported the change so that I can apply it automatically in the future.

Offline

#34 2017-12-10 15:15:46

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,788
Website

Re: [SOLVED?] Qemu/KVM freezes host on guest shutdown if PCI passthrough

Mod note: Closing this old thread.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB