Don't notify virtio devices before S_DRIVER_OK
PATCH 1/1 Don't notify virtio devices before S_DRIVER_OK
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.
--- qemu/hw/virtio.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
qemu/hw/virtio.c +3 -0
@@ -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); }
Signature · 1 line
1.6.0.6
Anthony Liguori
AppliedQuoted 10 lines · 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_OKanyway, so let's just not do it.Signed-off-by Mark McLoughlin <[email protected]>
Applied. Thanks.
Please don't send patches against kvm-userspace though.
Regards,
Anthony Liguori
Quoted 19 lines
--- qemu/hw/virtio.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)qemu/hw/virtio.c +3
-0@@ -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); }
Quoted 9 lines · Anthony Liguori
Quoted 8 lines · 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_OKanyway, so let's just not do it.
Quoted 5 lines
Quoted 2 lines
Signed-off-by Mark McLoughlin <[email protected]>Applied. Thanks.
Please don't send patches against kvm-userspace though.
Yep, sorry - I usually don't, just slipped my mind.
Thanks,
Mark.