From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stijn Tintel Subject: Host hard lockup when rebooting VM with GPU assigned via VT-d Date: Sat, 16 Mar 2013 17:26:29 +0100 Message-ID: <51449D35.2080905@linux-ipv6.be> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from mail.tintel.eu ([62.213.201.86]:49360 "EHLO mail.tintel.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751073Ab3CPQfp (ORCPT ); Sat, 16 Mar 2013 12:35:45 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.tintel.eu (Postfix) with ESMTP id F1E47A0199 for ; Sat, 16 Mar 2013 17:26:33 +0100 (CET) Received: from mail.tintel.eu ([127.0.0.1]) by localhost (mail.tintel.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GKS1OU6ZeaE1 for ; Sat, 16 Mar 2013 17:26:30 +0100 (CET) Received: from [IPv6:2001:470:1f15:911:b0e7:8024:3401:31f1] (unknown [IPv6:2001:470:1f15:911:b0e7:8024:3401:31f1]) by mail.tintel.eu (Postfix) with ESMTPSA id 51139A017B for ; Sat, 16 Mar 2013 17:26:30 +0100 (CET) Sender: kvm-owner@vger.kernel.org List-ID: While I know that assignment of graphics cards isn't officially supported, I'm reporting this problem nonetheless. This was suggested by danpb on irc.oftc.net/virt. I am able to pass through an ATI HD7970 via VT-d, to a VM, and the guest OS can successfully use it. I tested this with a Windows 7 VM, and with an Ubuntu 12.10 and a Gentoo VM. I was able to run games or use OpenCL in the VMs. Unfortunately, when I reboot the VM, the host system completely locks up. Even the reset button no longer responds as usual (when I hit reset, the system does nothing for ~15s, then powers down, and powers up again a few seconds later). There are a few exceptions: - when I shut down the VM, suspend and resume the host, then boot the VM again, the host doesn't lock - if I don't start X in the Linux VM, I can reboot it as much as I want, the host doesn't lock - with the Ubuntu 12.10 VM, and older fglrx driver, I could reboot the VM without the host locking up, but am unable to use the GPU in the VM until I reboot or suspend/resume the host I suspect this problem happens because the GPU BIOS is left in a bad state after shutting down the VM, and the ATI driver not being able to handle that. To confirm this I tried to save the state of the GPU in the VM with vbetool before starting X, but I did not succeed, so I couldn't try restoring it either. And this wouldn't work for Windows anyway. This happens with any host kernel between 3.0 and 3.8 I have tested, and with qemu-kvm 1.0.1 and 1.1.1, qemu 1.1.1, 1.1.2, 1.2.1, 1.3.0 and 1.4.0. Hardware information: ASUS P9X79 WS Intel Core i7-3930K Gainward GTX480 used by the host OS ASUS HD7970 passed through with VT-D If anyone thinks of something I can try to work around (or solve) this problem, I would very much appreciate hearing about it. Should you need more detailed information, don't hesitate to ask. Lastly I want to thank everybody involved with KVM for delivering such an awesome, open and free product. Kind regards, Stijn