summaryrefslogtreecommitdiffstats
path: root/hw/virtio.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-29 17:02:13 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-29 17:02:13 +0000
commit7625162ca4e7be6359571d98b1c9e983393e9d91 (patch)
tree0a9f8faf05b8663d2340ed38058216aae18a5b67 /hw/virtio.c
parent22bf14582af9e25e31b926fab23c9be2d4a0298f (diff)
downloadhqemu-7625162ca4e7be6359571d98b1c9e983393e9d91.zip
hqemu-7625162ca4e7be6359571d98b1c9e983393e9d91.tar.gz
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 <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6471 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/virtio.c')
-rw-r--r--hw/virtio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/virtio.c b/hw/virtio.c
index 2e3984e..bb941ed 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);
}
OpenPOWER on IntegriCloud