qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: "Michael S . Tsirkin" <mst@redhat.com>,
	Alexey Kardashevskiy <aik@ozlabs.ru>,
	Alexander Graf <agraf@suse.de>,
	qemu-devel <qemu-devel@nongnu.org>,
	qemu-trivial@nongnu.org,
	Alex Williamson <alex.williamson@redhat.com>,
	qemu-ppc@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	Paul Mackerras <paulus@samba.org>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support
Date: Mon, 24 Jun 2013 19:35:49 +0300	[thread overview]
Message-ID: <20130624163549.GA8351@redhat.com> (raw)
In-Reply-To: <87hagnhbsz.fsf@codemonkey.ws>

On Mon, Jun 24, 2013 at 08:34:52AM -0500, Anthony Liguori wrote:
> Gleb Natapov <gleb@redhat.com> writes:
> 
> > On Mon, Jun 24, 2013 at 07:32:32AM -0500, Anthony Liguori wrote:
> >> Gleb Natapov <gleb@redhat.com> writes:
> >> 
> >> This should be a per-device mapping, yes.  But I'm not sure that VCPUs
> >> should even see anything.  I don't think a VCPU can generate an MSI
> >> interrupt by writing to this location.
> >> 
> > No, and lower 4k of this space is where APIC is mapped as seen from CPU.
> >> Is there anything that prevents us from using IRQFDs corresponding to
> >> the target of an MSI mapping and get rid of the MSI info in the kernel?
> >> 
> > Again, you assume that x86 has some pin that MSI triggers. This is not
> > the case; address/data is minimum that is needed to inject interrupt
> > there (or moving APIC into userspace, since this is where "translation"
> > is happening).
> 
> An APIC message contains:
> 
> 1) Destination Mode
> 2) Delivery mode
> 3) Level
> 4) Trigger mode
> 5) Vector
> 6) Destination
> 
> Which is more or less what the MSI addr/data pair encodes.
> 
Not if interrupt remapping is in use.

> But we can certainly have a userspace interface to inject such a message
> into the LAPICs.  In fact, this is more or less what KVM_SIGNAL_MSI is
> doing except that it's called MSI and encodes things in an addr/pair.
> 
Good that it does that otherwise it would have been broken after
interrupt remapping implementation.

> Such an interface would also allow for a QEMU implementation of an IO
> APIC while still having the in-kernel LAPIC.
> 
Yes.

> It would also allow QEMU to do per-device MSI decoding.
> 
Why can't it be done now with existing interfaces?

> Isn't this more or less what Avi's previous proposal was around changing
> the APIC interfaces to userspace?
> 
Avi actually was against adding KVM_SIGNAL_MSI initially since it
duplicated the functionality we already had. Don't remember how Jan
managed to persuade him in the end :)

--
			Gleb.

      parent reply	other threads:[~2013-06-24 16:36 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 14:08 [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support Alexey Kardashevskiy
2013-06-20 15:38 ` Michael S. Tsirkin
2013-06-20 16:37 ` Anthony Liguori
2013-06-20 23:51   ` Alexey Kardashevskiy
2013-06-23 14:07     ` Michael S. Tsirkin
2013-06-23 15:02       ` Anthony Liguori
2013-06-23 21:39         ` [Qemu-devel] [Qemu-ppc] " Benjamin Herrenschmidt
2013-06-23 21:58           ` Anthony Liguori
2013-06-24  4:46             ` Alex Williamson
2013-06-24 12:24               ` Anthony Liguori
2013-06-24 12:39                 ` Gleb Natapov
2013-06-23 21:36       ` [Qemu-devel] " Benjamin Herrenschmidt
2013-06-24 12:10         ` Michael S. Tsirkin
2013-06-20 16:51 ` Alex Williamson
2013-06-21  1:56   ` Alexey Kardashevskiy
2013-06-21  2:34     ` Alex Williamson
2013-06-21  2:49       ` Alexey Kardashevskiy
2013-06-21  4:46         ` Alex Williamson
2013-06-21  5:12           ` Benjamin Herrenschmidt
2013-06-21  6:03             ` Alex Williamson
2013-06-21  6:12               ` Benjamin Herrenschmidt
2013-06-21  6:40                 ` Alexey Kardashevskiy
2013-06-23 15:06           ` Anthony Liguori
2013-06-24  4:44             ` Alex Williamson
2013-06-24 12:25               ` Anthony Liguori
2013-06-24  7:13             ` Gleb Natapov
2013-06-24 12:32               ` Anthony Liguori
2013-06-24 12:37                 ` Alexander Graf
2013-06-24 13:06                 ` Gleb Natapov
2013-06-24 13:34                   ` Anthony Liguori
2013-06-24 13:41                     ` Michael S. Tsirkin
2013-06-24 14:31                       ` Anthony Liguori
2013-06-24 14:34                         ` Alexander Graf
2013-06-24 15:17                           ` Anthony Liguori
2013-06-24 16:48                             ` Gleb Natapov
2013-06-24 16:35                     ` Gleb Natapov [this message]

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=20130624163549.GA8351@redhat.com \
    --to=gleb@redhat.com \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=david@gibson.dropbear.id.au \
    --cc=mst@redhat.com \
    --cc=paulus@samba.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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).