|
From: | Anthony Liguori |
Subject: | [Qemu-devel] Re: [PATCH] Don't notify virtio devices before S_DRIVER_OK |
Date: | Thu, 29 Jan 2009 11:03:39 -0600 |
User-agent: | Thunderbird 2.0.0.19 (X11/20090105) |
Mark McLoughlin wrote:
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>
Applied. Thanks. Please don't send patches against kvm-userspace though. Regards, Anthony Liguori
--- 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); }
[Prev in Thread] | Current Thread | [Next in Thread] |