qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/9] dataplane: remove EventPoll in favor of Aio


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH 3/9] dataplane: remove EventPoll in favor of AioContext
Date: Fri, 8 Mar 2013 13:44:13 +0100

On Fri, 08 Mar 2013 10:22:36 +0100
Paolo Bonzini <address@hidden> 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);
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]