From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVc9j-0007m2-BK for qemu-devel@nongnu.org; Tue, 16 Feb 2016 04:42:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVc9f-00039O-AA for qemu-devel@nongnu.org; Tue, 16 Feb 2016 04:42:51 -0500 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:44778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVc9e-00039D-VE for qemu-devel@nongnu.org; Tue, 16 Feb 2016 04:42:47 -0500 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 16 Feb 2016 09:42:45 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 923412190019 for ; Tue, 16 Feb 2016 09:42:27 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u1G9ggMK3146050 for ; Tue, 16 Feb 2016 09:42:42 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u1G9ggjB009542 for ; Tue, 16 Feb 2016 02:42:42 -0700 Date: Tue, 16 Feb 2016 10:42:40 +0100 From: Cornelia Huck Message-ID: <20160216104240.15a93489.cornelia.huck@de.ibm.com> In-Reply-To: <20160216072017.GK18664@ad.usersys.redhat.com> References: <1455470231-5223-1-git-send-email-pbonzini@redhat.com> <1455470231-5223-4-git-send-email-pbonzini@redhat.com> <20160216072017.GK18664@ad.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/8] virtio: add AioContext-specific function for host notifiers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Paolo Bonzini , qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com On Tue, 16 Feb 2016 15:20:17 +0800 Fam Zheng wrote: > On Sun, 02/14 18:17, Paolo Bonzini wrote: > > +void virtio_queue_aio_set_host_notifier_handler(VirtQueue *vq, AioContext *ctx, > > + bool assign, bool set_handler) > > +{ > > + if (assign && set_handler) { > > + aio_set_event_notifier(ctx, &vq->host_notifier, true, > > + virtio_queue_host_notifier_read); > > + } else { > > + aio_set_event_notifier(ctx, &vq->host_notifier, true, NULL); > > + } > > + if (!assign) { > > + /* Test and clear notifier before after disabling event, > > Does "before after" mean "after"? :) I think that was copied verbatim from virtio_queue_set_host_notifier_fd_handler :)