From: aliguori Date: Thu, 29 Jan 2009 17:02:13 +0000 (+0000) Subject: Don't notify virtio devices before S_DRIVER_OK (Mark McLoughlin) X-Git-Tag: xen-3.4.0-rc2~69^2~48 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7625162ca4e7be6359571d98b1c9e983393e9d91;p=qemu-xen-3.4-testing.git 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 git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6471 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/hw/virtio.c b/hw/virtio.c index 2e3984e6..bb941eda 100644 --- a/hw/virtio.c +++ b/hw/virtio.c @@ -738,6 +738,9 @@ void virtio_notify(VirtIODevice *vdev, VirtQueue *vq) void virtio_notify_config(VirtIODevice *vdev) { + if (!(vdev->status & VIRTIO_CONFIG_S_DRIVER_OK)) + return; + vdev->isr |= 0x03; virtio_update_irq(vdev); }