* [Qemu-devel] [PATCH] Don't notify virtio devices before S_DRIVER_OK
@ 2009-01-29 15:33 Mark McLoughlin
2009-01-29 17:03 ` [Qemu-devel] " Anthony Liguori
0 siblings, 1 reply; 3+ messages in thread
From: Mark McLoughlin @ 2009-01-29 15:33 UTC (permalink / raw)
To: Anthony Liguori
Cc: Rusty, Mark McLoughlin, qemu-devel, "Russell <rusty"
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH] Don't notify virtio devices before S_DRIVER_OK
2009-01-29 15:33 [Qemu-devel] [PATCH] Don't notify virtio devices before S_DRIVER_OK Mark McLoughlin
@ 2009-01-29 17:03 ` Anthony Liguori
2009-01-29 17:25 ` Mark McLoughlin
0 siblings, 1 reply; 3+ messages in thread
From: Anthony Liguori @ 2009-01-29 17:03 UTC (permalink / raw)
To: Mark McLoughlin; +Cc: Rusty Russell, qemu-devel@nongnu.org
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 <markmc@redhat.com>
>
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);
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH] Don't notify virtio devices before S_DRIVER_OK
2009-01-29 17:03 ` [Qemu-devel] " Anthony Liguori
@ 2009-01-29 17:25 ` Mark McLoughlin
0 siblings, 0 replies; 3+ messages in thread
From: Mark McLoughlin @ 2009-01-29 17:25 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Rusty Russell, qemu-devel@nongnu.org
On Thu, 2009-01-29 at 11:03 -0600, Anthony Liguori wrote:
> 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 <markmc@redhat.com>
> >
> Applied. Thanks.
>
> Please don't send patches against kvm-userspace though.
Yep, sorry - I usually don't, just slipped my mind.
Thanks,
Mark.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-29 17:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-29 15:33 [Qemu-devel] [PATCH] Don't notify virtio devices before S_DRIVER_OK Mark McLoughlin
2009-01-29 17:03 ` [Qemu-devel] " Anthony Liguori
2009-01-29 17:25 ` Mark McLoughlin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).