From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nrqrc-0003M8-Vz for qemu-devel@nongnu.org; Wed, 17 Mar 2010 06:52:37 -0400 Received: from [199.232.76.173] (port=35459 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nrqrc-0003Lt-Ho for qemu-devel@nongnu.org; Wed, 17 Mar 2010 06:52:36 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nrqra-0000Ys-Ut for qemu-devel@nongnu.org; Wed, 17 Mar 2010 06:52:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17767) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nrqra-0000Ye-Ic for qemu-devel@nongnu.org; Wed, 17 Mar 2010 06:52:34 -0400 Date: Wed, 17 Mar 2010 12:48:57 +0200 From: "Michael S. Tsirkin" Message-ID: <20100317104857.GB10425@redhat.com> References: <8cc7396586d6e6caf90611dbddd8eb901b3ecaf4.1268758544.git.mst@redhat.com> <20100317041405.GD20122@amit-x200.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100317041405.GD20122@amit-x200.redhat.com> Subject: [Qemu-devel] Re: [PATCHv5 04/11] virtio: notifier support + APIs for queue fields List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: quintela@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com On Wed, Mar 17, 2010 at 09:44:05AM +0530, Amit Shah wrote: > On (Tue) Mar 16 2010 [19:10:58], Michael S. Tsirkin wrote: > > > > diff --git a/hw/virtio.c b/hw/virtio.c > > index 7c020a3..f54129f 100644 > > --- a/hw/virtio.c > > +++ b/hw/virtio.c > > @@ -73,6 +73,9 @@ struct VirtQueue > > int inuse; > > uint16_t vector; > > void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq); > > + VirtIODevice *vdev; > > + EventNotifier guest_notifier; > > + EventNotifier host_notifier; > > Another thing that terribly confused me was this: in the vq struct you > have guest_notifier and host_notifier of type EventNotifier and in the > virtio binding structs you have guest_notifier and host_notifier which > are function callbacks. > Also, these vq->{guest_|host_}notifier assignments weren't easily found > using grep because they're assigned by assigning a pointer value and > initialising that pointer. Thanks to Juan for finding that for me :-) > > Amit I've renamed them to set_xxx_notifier to avoid confusion. > -- > http://log.amitshah.net/