From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDtVn-0003kU-JF for qemu-devel@nongnu.org; Fri, 08 Mar 2013 04:22:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDtVm-00089s-6S for qemu-devel@nongnu.org; Fri, 08 Mar 2013 04:22:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDtVl-00089k-UG for qemu-devel@nongnu.org; Fri, 08 Mar 2013 04:22:46 -0500 Message-ID: <5139ADDC.1040101@redhat.com> Date: Fri, 08 Mar 2013 10:22:36 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1362388531-32305-1-git-send-email-stefanha@redhat.com> <1362388531-32305-4-git-send-email-stefanha@redhat.com> <5139A359.9030407@de.ibm.com> In-Reply-To: <5139A359.9030407@de.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 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: Christian Borntraeger Cc: Anthony Liguori , qemu-devel@nongnu.org, Dominik Dingel , Jens Freimann , Stefan Hajnoczi , Cornelia Huck 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. 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);