qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Don't notify virtio devices before S_DRIVER_OK


From: Mark McLoughlin
Subject: [Qemu-devel] [PATCH] Don't notify virtio devices before S_DRIVER_OK
Date: Thu, 29 Jan 2009 15:33:50 +0000

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 <address@hidden>
---
 qemu/hw/virtio.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/qemu/hw/virtio.c b/qemu/hw/virtio.c
index 35f4669..78bcc2e 100644
--- a/qemu/hw/virtio.c
+++ b/qemu/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);
 }
-- 
1.6.0.6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]