From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NrkfQ-0008OF-1h for qemu-devel@nongnu.org; Wed, 17 Mar 2010 00:15:36 -0400 Received: from [199.232.76.173] (port=54999 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NrkfP-0008O7-Mr for qemu-devel@nongnu.org; Wed, 17 Mar 2010 00:15:35 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NrkfO-0000Hn-F2 for qemu-devel@nongnu.org; Wed, 17 Mar 2010 00:15:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34588) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NrkfO-0000Hj-3a for qemu-devel@nongnu.org; Wed, 17 Mar 2010 00:15:34 -0400 Date: Wed, 17 Mar 2010 09:44:05 +0530 From: Amit Shah Message-ID: <20100317041405.GD20122@amit-x200.redhat.com> References: <8cc7396586d6e6caf90611dbddd8eb901b3ecaf4.1268758544.git.mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8cc7396586d6e6caf90611dbddd8eb901b3ecaf4.1268758544.git.mst@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: "Michael S. Tsirkin" Cc: quintela@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com 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 -- http://log.amitshah.net/