All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	qemu-trivial@nongnu.org, qemu-devel@nongnu.org,
	Alexander Graf <agraf@suse.de>,
	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-trivial] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support
Date: Fri, 21 Jun 2013 16:40:18 +1000	[thread overview]
Message-ID: <51C3F552.6050609@ozlabs.ru> (raw)
In-Reply-To: <1371795171.3944.52.camel@pasglop>

On 06/21/2013 04:12 PM, Benjamin Herrenschmidt wrote:
> On Fri, 2013-06-21 at 00:03 -0600, Alex Williamson wrote:
>> On Fri, 2013-06-21 at 15:12 +1000, Benjamin Herrenschmidt wrote:
>>> On Thu, 2013-06-20 at 22:46 -0600, Alex Williamson wrote:
>>>> Maybe you could add a device parameter to kvm_irqchip_add_msi_route so
>>>> that it can be implemented on POWER without this pci_bus_map_msi
>>>> interface that seems very unique to POWER.  Thanks,
>>>
>>> You mean unique to all non-x86 ? :-)
>>>
>>> I believe almost everybody eventually turn MSIs into "normal"
>>> interrupts...
>>>
>>> Most often than not, the logic to do so is in the PCI Host Bridge.
>>>
>>> The whole concept of passing the message address/data accross the
>>> user/kernel interface is an x86 crackpotery but as is the entire
>>> remapping/routing layer so ... :-)
>>
>> Regardless, this is exactly what kvm_irqchip_add_msi_route does.  It
>> says, here's an MSIMessage, give me an IRQ that sends that. 
> 
> Yes, and in our case, what happens is that the guest said to use "I want
> an MSI", we picked up an IRQ, and made up a message for it :-) The
> actual message address/data we use is a complete invention that only
> exists within qemu. So here we need to basically turn it back into an
> IRQ, which we might be able to do by ... just making the message (or
> part of the address) be the IRQ number or something like that.
> 
>>  In the x86
>> case, that means pick a free IRQ and program it to send that MSIMessage
>> when we hit the irqfd.  In the case of POWER it means lookup which IRQ
>> gets fired by that MSIMessage and return it.  In a non-accelerated QEMU
>> case I'd think msi_notify() would write the MSIMessage to this IRQ
>> remapper device and let it toggle the next qemu_irq down the line.  If
>> we ever add an IOMMU based IRQ remapper to the x86 model, we'd need
>> something similar.  Thanks,


Yes, I am changing IRQ to MSI message conversion (and some other things as
replacing per PHB MSI windows to one for a whole system) and I am going to
post something tonight.



-- 
Alexey


WARNING: multiple messages have this Message-ID (diff)
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	qemu-trivial@nongnu.org, qemu-devel@nongnu.org,
	Alexander Graf <agraf@suse.de>,
	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: Fri, 21 Jun 2013 16:40:18 +1000	[thread overview]
Message-ID: <51C3F552.6050609@ozlabs.ru> (raw)
In-Reply-To: <1371795171.3944.52.camel@pasglop>

On 06/21/2013 04:12 PM, Benjamin Herrenschmidt wrote:
> On Fri, 2013-06-21 at 00:03 -0600, Alex Williamson wrote:
>> On Fri, 2013-06-21 at 15:12 +1000, Benjamin Herrenschmidt wrote:
>>> On Thu, 2013-06-20 at 22:46 -0600, Alex Williamson wrote:
>>>> Maybe you could add a device parameter to kvm_irqchip_add_msi_route so
>>>> that it can be implemented on POWER without this pci_bus_map_msi
>>>> interface that seems very unique to POWER.  Thanks,
>>>
>>> You mean unique to all non-x86 ? :-)
>>>
>>> I believe almost everybody eventually turn MSIs into "normal"
>>> interrupts...
>>>
>>> Most often than not, the logic to do so is in the PCI Host Bridge.
>>>
>>> The whole concept of passing the message address/data accross the
>>> user/kernel interface is an x86 crackpotery but as is the entire
>>> remapping/routing layer so ... :-)
>>
>> Regardless, this is exactly what kvm_irqchip_add_msi_route does.  It
>> says, here's an MSIMessage, give me an IRQ that sends that. 
> 
> Yes, and in our case, what happens is that the guest said to use "I want
> an MSI", we picked up an IRQ, and made up a message for it :-) The
> actual message address/data we use is a complete invention that only
> exists within qemu. So here we need to basically turn it back into an
> IRQ, which we might be able to do by ... just making the message (or
> part of the address) be the IRQ number or something like that.
> 
>>  In the x86
>> case, that means pick a free IRQ and program it to send that MSIMessage
>> when we hit the irqfd.  In the case of POWER it means lookup which IRQ
>> gets fired by that MSIMessage and return it.  In a non-accelerated QEMU
>> case I'd think msi_notify() would write the MSIMessage to this IRQ
>> remapper device and let it toggle the next qemu_irq down the line.  If
>> we ever add an IOMMU based IRQ remapper to the x86 model, we'd need
>> something similar.  Thanks,


Yes, I am changing IRQ to MSI message conversion (and some other things as
replacing per PHB MSI windows to one for a whole system) and I am going to
post something tonight.



-- 
Alexey

  reply	other threads:[~2013-06-21  6:40 UTC|newest]

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

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=51C3F552.6050609@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=agraf@suse.de \
    --cc=alex.williamson@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=benh@kernel.crashing.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.