Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSaHU-00009x-DJ for qemu-devel@nongnu.org; Thu, 29 Jan 2009 12:02:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSaHQ-00006i-FY for qemu-devel@nongnu.org; Thu, 29 Jan 2009 12:02:18 -0500 Received: from [199.232.76.173] (port=59288 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSaHO-00006U-Qi for qemu-devel@nongnu.org; Thu, 29 Jan 2009 12:02:15 -0500 Received: from savannah.gnu.org ([199.232.41.3]:49420 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LSaHO-0005jh-Bb for qemu-devel@nongnu.org; Thu, 29 Jan 2009 12:02:14 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LSaHN-0006Xu-MW for qemu-devel@nongnu.org; Thu, 29 Jan 2009 17:02:13 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LSaHN-0006Xq-Ga for qemu-devel@nongnu.org; Thu, 29 Jan 2009 17:02:13 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Thu, 29 Jan 2009 17:02:13 +0000 Subject: [Qemu-devel] [6471] Don't notify virtio devices before S_DRIVER_OK (Mark McLoughlin) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6471 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6471 Author: aliguori Date: 2009-01-29 17:02:13 +0000 (Thu, 29 Jan 2009) Log Message: ----------- Don't notify virtio devices before S_DRIVER_OK (Mark McLoughlin) Current Linux guests oops if the host notifies of a config change before a driver has been bound to the device. It's pretty pointless for us to do notify of config changes before status is S_DRIVER_OK anyway, so let's just not do it. Signed-off-by: Mark McLoughlin Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/hw/virtio.c Modified: trunk/hw/virtio.c =================================================================== --- trunk/hw/virtio.c 2009-01-29 17:02:08 UTC (rev 6470) +++ trunk/hw/virtio.c 2009-01-29 17:02:13 UTC (rev 6471) @@ -738,6 +738,9 @@ void virtio_notify_config(VirtIODevice *vdev) { + if (!(vdev->status & VIRTIO_CONFIG_S_DRIVER_OK)) + return; + vdev->isr |= 0x03; virtio_update_irq(vdev); }