From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDwfP-0000qU-SH for qemu-devel@nongnu.org; Fri, 08 Mar 2013 07:44:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDwfO-0002rw-0N for qemu-devel@nongnu.org; Fri, 08 Mar 2013 07:44:55 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:56439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDwfN-0002mM-J5 for qemu-devel@nongnu.org; Fri, 08 Mar 2013 07:44:53 -0500 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 8 Mar 2013 12:42:20 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 4D8441B0805D for ; Fri, 8 Mar 2013 12:44:16 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r28Ci6EH25559240 for ; Fri, 8 Mar 2013 12:44:07 GMT Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r28CiFqT022691 for ; Fri, 8 Mar 2013 05:44:15 -0700 Date: Fri, 8 Mar 2013 13:44:13 +0100 From: Cornelia Huck Message-ID: <20130308134413.74dc62bf@gondolin> In-Reply-To: <5139ADDC.1040101@redhat.com> References: <1362388531-32305-1-git-send-email-stefanha@redhat.com> <1362388531-32305-4-git-send-email-stefanha@redhat.com> <5139A359.9030407@de.ibm.com> <5139ADDC.1040101@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/9] dataplane: remove EventPoll in favor of AioContext List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Anthony Liguori , qemu-devel@nongnu.org, Dominik Dingel , Christian Borntraeger , Jens Freimann , Stefan Hajnoczi On Fri, 08 Mar 2013 10:22:36 +0100 Paolo Bonzini wrote: > Il 08/03/2013 09:37, Christian Borntraeger ha scritto: > > + if (assign) { > > + int r = event_notifier_init(notifier, 0); > > + > > + if (r < 0) { > > + return r; > > + } > > + virtio_queue_set_guest_notifier_fd_handler(vq, true, with_irqfd); > > Perhaps you can simply hard-code with_irqfd to false in this call to > virtio_queue_set_guest_notifier_fd_handler and the one below? Then the > guest notifier will be emulated in userspace and processed via > vdev->binding->notify. Well, effectively with_irqfd is already hardcoded to false (as virtio_ccw_set_guest_notifiers() always calls this function with with_irqfd=false), so that doesn't seem to be the problem here. > > You will not need to overwrite the EventNotifier which is IMO a pretty > ufly violation of encapsulation. :) > > Paolo > > > + /* We do not support irqfd for classic I/O interrupts, because the > > + * classic interrupts are intermixed with the subchannel status, that > > + * is queried with test subchannel. We want to use vhost, though. > > + * Lets make sure to have vhost running and wire up the irq fd to > > + * land in qemu (and only the irq fd) in this code. > > + */ > > + if (dev->vdev->guest_notifier_mask) { > > + dev->vdev->guest_notifier_mask(dev->vdev, n, false); > > + } > > + /* get lost events and re-inject */ > > + if (dev->vdev->guest_notifier_pending && > > + dev->vdev->guest_notifier_pending(dev->vdev, n)) { > > + event_notifier_set(notifier); > > + } > > + } else { > > + if (dev->vdev->guest_notifier_mask) { > > + dev->vdev->guest_notifier_mask(dev->vdev, n, true); > > + } > > + virtio_queue_set_guest_notifier_fd_handler(vq, false, with_irqfd); > > + event_notifier_cleanup(notifier); >