linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: avi@redhat.com, gleb@redhat.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 6/6] kvm: Add de-assert option to KVM_IRQ_ACKFD
Date: Wed, 15 Aug 2012 11:24:03 -0600	[thread overview]
Message-ID: <1345051443.4683.425.camel@ul30vt.home> (raw)
In-Reply-To: <20120815141113.GE3068@redhat.com>

On Wed, 2012-08-15 at 17:11 +0300, Michael S. Tsirkin wrote:
> On Fri, Aug 10, 2012 at 04:37:56PM -0600, Alex Williamson wrote:
> > It's likely (vfio) that one of the reasons to watch for an IRQ ACK
> > is to de-assert and re-enable an interrupt.  As the IRQ ACK notfier
> > is already watching a GSI for an IRQ source ID we can easily couple
> > these together.
> > 
> > Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> 
> This source id is required the only way to assert
> in the 1st place is with irqfd.

ioctl(fd, KVM_IRQ_ACKFD, kvm_irq_ackfd.{flags = 0, fd = eventfd, gsi = $GSI});
ioctl(fd, KVM_IRQ_LINE, kvm_irq_level.{irq = $GSI, level = 1);
/* eventfd notification */
ioctl(fd, KVM_IRQ_LINE, kvm_irq_level.{irq = $GSI, level = 0);

> So why is this an ackfd flag and not an irqfd flag?
> I am guessing because this way you do not need
> an extra ack notifier, but isn't this an internal
> optimization leaking out to userspace?

If irqfd were to setup it's own irq ack notifier for de-assert, we can
guarantee the ordering of de-assert vs eventfd trigger.  So, whoever
does one, needs to do both.  Thanks,

Alex


  reply	other threads:[~2012-08-15 17:24 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10 22:37 [PATCH v8 0/6] kvm: level irqfd support Alex Williamson
2012-08-10 22:37 ` [PATCH v8 1/6] kvm: Allow filtering of acked irqs Alex Williamson
2012-08-15 12:27   ` Michael S. Tsirkin
2012-08-15 16:47     ` Alex Williamson
2012-08-15 19:24       ` Michael S. Tsirkin
2012-08-10 22:37 ` [PATCH v8 2/6] kvm: Expose IRQ source IDs to userspace Alex Williamson
2012-08-15 12:59   ` Michael S. Tsirkin
2012-08-15 17:05     ` Alex Williamson
2012-08-10 22:37 ` [PATCH v8 3/6] kvm: Add IRQ source ID option to KVM_IRQFD Alex Williamson
2012-08-15 13:49   ` Michael S. Tsirkin
2012-08-15 17:08     ` Alex Williamson
2012-08-10 22:37 ` [PATCH v8 4/6] kvm: Add assert-only " Alex Williamson
2012-08-10 22:37 ` [PATCH v8 5/6] kvm: KVM_IRQ_ACKFD Alex Williamson
2012-08-15 14:05   ` Michael S. Tsirkin
2012-08-15 17:17     ` Alex Williamson
2012-08-10 22:37 ` [PATCH v8 6/6] kvm: Add de-assert option to KVM_IRQ_ACKFD Alex Williamson
2012-08-15 14:11   ` Michael S. Tsirkin
2012-08-15 17:24     ` Alex Williamson [this message]
2012-08-15 14:28 ` [PATCH v8 0/6] kvm: level irqfd support Michael S. Tsirkin
2012-08-15 17:36   ` Alex Williamson
2012-08-15 19:22     ` Michael S. Tsirkin
2012-08-15 19:59       ` Alex Williamson
2012-08-16 12:34         ` Alex Williamson
2012-08-16 12:53           ` Michael S. Tsirkin
2012-08-16 16:29       ` Avi Kivity
2012-08-16 16:36         ` Michael S. Tsirkin
2012-08-16 16:39           ` Avi Kivity
2012-08-16 16:54             ` Michael S. Tsirkin
2012-08-16 16:54               ` Avi Kivity
2012-08-16 17:01                 ` Michael S. Tsirkin
2012-08-16 16:37         ` Alex Williamson
2012-08-16 16:32 ` Avi Kivity
2012-08-16 16:45   ` Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345051443.4683.425.camel@ul30vt.home \
    --to=alex.williamson@redhat.com \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).