From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSaJ1-0001Tk-TK for qemu-devel@nongnu.org; Thu, 29 Jan 2009 12:03:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSaJ1-0001SM-1y for qemu-devel@nongnu.org; Thu, 29 Jan 2009 12:03:55 -0500 Received: from [199.232.76.173] (port=59336 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSaJ0-0001Rx-Pp for qemu-devel@nongnu.org; Thu, 29 Jan 2009 12:03:54 -0500 Received: from e5.ny.us.ibm.com ([32.97.182.145]:39964) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LSaJ0-0005xb-AJ for qemu-devel@nongnu.org; Thu, 29 Jan 2009 12:03:54 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e5.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n0TH1moi016966 for ; Thu, 29 Jan 2009 12:01:48 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n0TH3rJj134816 for ; Thu, 29 Jan 2009 12:03:53 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n0TH3qSS015917 for ; Thu, 29 Jan 2009 12:03:53 -0500 Message-ID: <4981E16B.6080404@us.ibm.com> Date: Thu, 29 Jan 2009 11:03:39 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1233243230-8280-1-git-send-email-markmc@redhat.com> In-Reply-To: <1233243230-8280-1-git-send-email-markmc@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] Don't notify virtio devices before S_DRIVER_OK Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 > 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); > } >