From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52415 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaACg-00026A-SH for qemu-devel@nongnu.org; Tue, 04 Jan 2011 11:57:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PaACe-0000gg-Rr for qemu-devel@nongnu.org; Tue, 04 Jan 2011 11:57:45 -0500 Received: from mail-wy0-f173.google.com ([74.125.82.173]:65099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PaACe-0000gQ-K7 for qemu-devel@nongnu.org; Tue, 04 Jan 2011 11:57:44 -0500 Received: by wyg36 with SMTP id 36so16014555wyg.4 for ; Tue, 04 Jan 2011 08:57:43 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20101229145245.GA8847@redhat.com> References: <1292587312-24511-1-git-send-email-stefanha@linux.vnet.ibm.com> <20101229145245.GA8847@redhat.com> Date: Tue, 4 Jan 2011 16:57:43 +0000 Message-ID: Subject: Re: [Qemu-devel] [PATCH] ioeventfd: minor fixups From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Stefan Hajnoczi , qemu-devel@nongnu.org On Wed, Dec 29, 2010 at 2:52 PM, Michael S. Tsirkin wrote: > I'll probably split this patch in two, and merge into the > appropriate patches in the ioeventfd series. > > Compile-tested only so far, would appreciate feedback/test reports. virtio-ioeventfd works as expected. > diff --git a/hw/vhost.c b/hw/vhost.c > index 6082da2..1d09ed0 100644 > --- a/hw/vhost.c > +++ b/hw/vhost.c > @@ -630,6 +630,17 @@ void vhost_dev_cleanup(struct vhost_dev *hdev) > =A0int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev) > =A0{ > =A0 =A0 int i, r; > + =A0 =A0/* A binding must support vmstate notifiers (for migration to wo= rk) */ > + =A0 =A0if (!vdev->binding->vmstate_change) { > + =A0 =A0 =A0 =A0fprintf(stderr, "binding does not support vmstate notifi= ers\n"); > + =A0 =A0 =A0 =A0r =3D -ENOSYS; > + =A0 =A0 =A0 =A0goto fail; > + =A0 =A0} > + =A0 =A0if (!vdev->binding->set_guest_notifiers) { > + =A0 =A0 =A0 =A0fprintf(stderr, "binding does not support guest notifier= s\n"); > + =A0 =A0 =A0 =A0r =3D -ENOSYS; > + =A0 =A0 =A0 =A0goto fail; > + =A0 =A0} Merge error? The set_guest_notifiers check is already present. Stefan