From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGgj0-0006Kh-E4 for qemu-devel@nongnu.org; Sat, 25 Jun 2016 02:05:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGgiw-0004Ff-7N for qemu-devel@nongnu.org; Sat, 25 Jun 2016 02:05:49 -0400 Received: from indium.canonical.com ([91.189.90.7]:48060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGgiv-0004FZ-VC for qemu-devel@nongnu.org; Sat, 25 Jun 2016 02:05:46 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1bGgiv-0000YF-7X for ; Sat, 25 Jun 2016 06:05:45 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 322CC2E80C6 for ; Sat, 25 Jun 2016 06:05:45 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Sat, 25 Jun 2016 05:57:56 -0000 From: Jimi <1580459@bugs.launchpad.net> Reply-To: Bug 1580459 <1580459@bugs.launchpad.net> Sender: bounces@canonical.com References: <20160511061916.21125.98809.malonedeb@wampee.canonical.com> Message-Id: <20160625055756.1867.79434.malone@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1580459] Re: Windows (10?) guest freezes entire host on shutdown if using PCI passthrough List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I enabled MSI interrupts, and now for 2 nights in a row I gamed 2 hours straight and shut down the Windows VM without a freeze. Never in my 7 months of living with this bug have I gotten no freeze twice in a row. I think the MSI interrupts have fixed it for me, and no, I did not remove my HDMI sound card from the VM, so that wasn't part of the issue and should be safe to leave in for those who needed this fix. That's 2 people who this fix has worked for now. Hopefully it'll work for the rest of you, too. I'll post back if I ever get this freeze again after confirmed it hasn't suddenly switched my hardware off MSI interrupts or anything. Note: I didn't just make my video card use MSI interrupts. Most of the VM's hardware was already set to use them by default--namely the VirtIO stuff--and I set EVERYTHING else to also use it, which is the video card, its HDMI, the USB3 card, and the virtual USB2 controller that I don't need but libvirt refuses to remove. I figured that'd work out because the USB3 card is also PCIe, which works better with MSI, and the USB2 controller doesn't matter. So, if this doesn't fix it for you, try making every last MSI-capable device use MSI interrupts. -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1580459 Title: Windows (10?) guest freezes entire host on shutdown if using PCI passthrough Status in libvirt: New Status in QEMU: New Status in Arch Linux: New Status in Debian: New Status in Fedora: New Bug description: Problem: after leaving a Windows VM that uses PCI passthrough (as we do for gaming graphics cards, sound cards, and in my case, a USB card) running for some amount of time between 1 and 2 hours (it's not consistent with exactly how long), and for any amount of time longer than that, shutting down that guest will, right as it finishes shutting down, freeze the host computer, making it require a hard reboot. Unbinding (or in the other user's case, unbinding and THEN binding) any PCI device in sysfs, even one that has nothing to do with the VM, also has the same effect as shutting down the VM (if the VM has been running long enough). So, it's probably an issue related to unbinding and binding PCI devices. There's a lot of info on this problem over at https://bbs.archlinux.org/v= iewtopic.php?id=3D206050 Here's a better-organized list of main details: -at least 2 confirmed victims of this bug; 2 (including me) have provided= lots of info in the link -I'm on Arch Linux and the other one is on Gentoo (distro-nonspecific) -issue affects my Windows 10 guest and others' Windows guests, but not my= Arch Linux guest (the others don't have non-Windows guests to test) -I'm using libvirt but the other user is not, so it's not an issue with l= ibvirt -It seems to be version non-specific, too. I first noticed it at, or when= testing versions still had the issue at (whichever version is lower), Linu= x 4.1 and qemu 2.4.0. It still persists in all releases of both since, incl= uding the newest ones. -I can't track down exactly what package downgrade can fix it, as downgra= ding further than Linux 4.1 and qemu 2.4.0 requires Herculean and system-de= stroying changes such as downgrading ncurses, meaning I don't know whether = it's a bug in QEMU, the Linux kernel, or some weird seemingly unrelated thi= ng. -According to the other user, "graphics intensive gameplay (GTA V) can ca= use the crash to happen sooner," as soon as "15 minutes" -Also, "bringing up a second passthrough VM with separate hardware will c= ause the same crash," and "bringing up another VM before the two-hour mark = will not result in a crash," further cementing that it's triggered by the u= n/binding of PCI devices. -This is NOT related to the very similar bug that can be worked around by= not passing through the HDMI device or sound card. Even when we removed al= l traces of any sort of sound card from the VM, it still had the same behav= ior. To manage notifications about this bug go to: https://bugs.launchpad.net/libvirt/+bug/1580459/+subscriptions