Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-24 Thread Gleb Natapov
On Sun, Jun 23, 2013 at 10:06:05AM -0500, Anthony Liguori wrote: On Thu, Jun 20, 2013 at 11:46 PM, Alex Williamson alex.william...@redhat.com wrote: On Fri, 2013-06-21 at 12:49 +1000, Alexey Kardashevskiy wrote: On 06/21/2013 12:34 PM, Alex Williamson wrote: Do not follow you, sorry.

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-24 Thread Michael S. Tsirkin
On Mon, Jun 24, 2013 at 07:36:25AM +1000, Benjamin Herrenschmidt wrote: On Sun, 2013-06-23 at 17:07 +0300, Michael S. Tsirkin wrote: Yes I think that's fine really. Basically devices all speak MSIMessage as they should - this is what the PCI spec says. On all normal systems

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-24 Thread Anthony Liguori
Alex Williamson alex.william...@redhat.com writes: On Sun, 2013-06-23 at 10:06 -0500, Anthony Liguori wrote: On Thu, Jun 20, 2013 at 11:46 PM, Alex Williamson alex.william...@redhat.com wrote: On Fri, 2013-06-21 at 12:49 +1000, Alexey Kardashevskiy wrote: On 06/21/2013 12:34 PM, Alex

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-24 Thread Anthony Liguori
Gleb Natapov g...@redhat.com writes: On Sun, Jun 23, 2013 at 10:06:05AM -0500, Anthony Liguori wrote: On Thu, Jun 20, 2013 at 11:46 PM, Alex Williamson alex.william...@redhat.com wrote: On Fri, 2013-06-21 at 12:49 +1000, Alexey Kardashevskiy wrote: On 06/21/2013 12:34 PM, Alex Williamson

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-24 Thread Alexander Graf
On 24.06.2013, at 14:32, Anthony Liguori wrote: Gleb Natapov g...@redhat.com writes: On Sun, Jun 23, 2013 at 10:06:05AM -0500, Anthony Liguori wrote: On Thu, Jun 20, 2013 at 11:46 PM, Alex Williamson alex.william...@redhat.com wrote: On Fri, 2013-06-21 at 12:49 +1000, Alexey Kardashevskiy

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-24 Thread Gleb Natapov
On Mon, Jun 24, 2013 at 07:32:32AM -0500, Anthony Liguori wrote: Gleb Natapov g...@redhat.com writes: On Sun, Jun 23, 2013 at 10:06:05AM -0500, Anthony Liguori wrote: On Thu, Jun 20, 2013 at 11:46 PM, Alex Williamson alex.william...@redhat.com wrote: On Fri, 2013-06-21 at 12:49 +1000,

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-24 Thread Anthony Liguori
Gleb Natapov g...@redhat.com writes: On Mon, Jun 24, 2013 at 07:32:32AM -0500, Anthony Liguori wrote: Gleb Natapov g...@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

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-24 Thread Michael S. Tsirkin
On Mon, Jun 24, 2013 at 08:34:52AM -0500, Anthony Liguori wrote: Gleb Natapov g...@redhat.com writes: On Mon, Jun 24, 2013 at 07:32:32AM -0500, Anthony Liguori wrote: Gleb Natapov g...@redhat.com writes: This should be a per-device mapping, yes. But I'm not sure that VCPUs should

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-24 Thread Alexander Graf
On 24.06.2013, at 16:31, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, Jun 24, 2013 at 08:34:52AM -0500, Anthony Liguori wrote: Gleb Natapov g...@redhat.com writes: Isn't this more or less what Avi's previous proposal was around changing the APIC interfaces

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-24 Thread Anthony Liguori
Michael S. Tsirkin m...@redhat.com writes: On Mon, Jun 24, 2013 at 08:34:52AM -0500, Anthony Liguori wrote: Gleb Natapov g...@redhat.com writes: Isn't this more or less what Avi's previous proposal was around changing the APIC interfaces to userspace? Regards, Anthony Liguori While

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-24 Thread Anthony Liguori
Alexander Graf ag...@suse.de writes: On 24.06.2013, at 16:31, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, Jun 24, 2013 at 08:34:52AM -0500, Anthony Liguori wrote: Gleb Natapov g...@redhat.com writes: Isn't this more or less what Avi's previous proposal was

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-24 Thread Gleb Natapov
On Mon, Jun 24, 2013 at 08:34:52AM -0500, Anthony Liguori wrote: Gleb Natapov g...@redhat.com writes: On Mon, Jun 24, 2013 at 07:32:32AM -0500, Anthony Liguori wrote: Gleb Natapov g...@redhat.com writes: This should be a per-device mapping, yes. But I'm not sure that VCPUs should

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-24 Thread Gleb Natapov
On Mon, Jun 24, 2013 at 10:17:41AM -0500, Anthony Liguori wrote: Alexander Graf ag...@suse.de writes: On 24.06.2013, at 16:31, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, Jun 24, 2013 at 08:34:52AM -0500, Anthony Liguori wrote: Gleb Natapov

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-23 Thread Michael S. Tsirkin
On Fri, Jun 21, 2013 at 09:51:20AM +1000, Alexey Kardashevskiy wrote: And kvm_irqchip_add_msi_route does not have any link to a device or a bus so I'll have to walk through all PHBs in system and see if PHB's MSI window is the one from MSIMessage and convert MSIMessage to virq. Pretty easy and

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-23 Thread Anthony Liguori
On Sun, Jun 23, 2013 at 9:07 AM, Michael S. Tsirkin m...@redhat.com wrote: On Fri, Jun 21, 2013 at 09:51:20AM +1000, Alexey Kardashevskiy wrote: And kvm_irqchip_add_msi_route does not have any link to a device or a bus so I'll have to walk through all PHBs in system and see if PHB's MSI window

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-23 Thread Anthony Liguori
On Thu, Jun 20, 2013 at 11:46 PM, Alex Williamson alex.william...@redhat.com wrote: On Fri, 2013-06-21 at 12:49 +1000, Alexey Kardashevskiy wrote: On 06/21/2013 12:34 PM, Alex Williamson wrote: Do not follow you, sorry. For x86, is it that MSI routing table which is updated via

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-23 Thread Benjamin Herrenschmidt
On Sun, 2013-06-23 at 17:07 +0300, Michael S. Tsirkin wrote: Yes I think that's fine really. Basically devices all speak MSIMessage as they should - this is what the PCI spec says. On all normal systems guests also speak MSIMessage so the API which uses these makes sense for kvm.

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-23 Thread Alex Williamson
On Sun, 2013-06-23 at 10:06 -0500, Anthony Liguori wrote: On Thu, Jun 20, 2013 at 11:46 PM, Alex Williamson alex.william...@redhat.com wrote: On Fri, 2013-06-21 at 12:49 +1000, Alexey Kardashevskiy wrote: On 06/21/2013 12:34 PM, Alex Williamson wrote: Do not follow you, sorry. For x86,

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-21 Thread Alex Williamson
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

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-21 Thread Benjamin Herrenschmidt
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

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-21 Thread Alexey Kardashevskiy
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

[Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alexey Kardashevskiy
At the moment QEMU creates a route for every MSI IRQ. Now we are about to add IRQFD support on PPC64-pseries platform. pSeries already has in-kernel emulated interrupt controller with 8192 IRQs. Also, pSeries PHB already supports MSIMessage to IRQ mapping as a part of PAPR requirements for

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Michael S. Tsirkin
On Fri, Jun 21, 2013 at 12:08:58AM +1000, Alexey Kardashevskiy wrote: At the moment QEMU creates a route for every MSI IRQ. Now we are about to add IRQFD support on PPC64-pseries platform. pSeries already has in-kernel emulated interrupt controller with 8192 IRQs. Also, pSeries PHB already

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Anthony Liguori
Alexey Kardashevskiy a...@ozlabs.ru writes: At the moment QEMU creates a route for every MSI IRQ. Now we are about to add IRQFD support on PPC64-pseries platform. pSeries already has in-kernel emulated interrupt controller with 8192 IRQs. Also, pSeries PHB already supports MSIMessage to IRQ

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alex Williamson
On Fri, 2013-06-21 at 00:08 +1000, Alexey Kardashevskiy wrote: At the moment QEMU creates a route for every MSI IRQ. Now we are about to add IRQFD support on PPC64-pseries platform. pSeries already has in-kernel emulated interrupt controller with 8192 IRQs. Also, pSeries PHB already supports

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alexey Kardashevskiy
On 06/21/2013 02:37 AM, Anthony Liguori wrote: Alexey Kardashevskiy a...@ozlabs.ru writes: At the moment QEMU creates a route for every MSI IRQ. Now we are about to add IRQFD support on PPC64-pseries platform. pSeries already has in-kernel emulated interrupt controller with 8192 IRQs.

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alexey Kardashevskiy
On 06/21/2013 02:51 AM, Alex Williamson wrote: On Fri, 2013-06-21 at 00:08 +1000, Alexey Kardashevskiy wrote: At the moment QEMU creates a route for every MSI IRQ. Now we are about to add IRQFD support on PPC64-pseries platform. pSeries already has in-kernel emulated interrupt controller with

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alex Williamson
On Fri, 2013-06-21 at 11:56 +1000, Alexey Kardashevskiy wrote: On 06/21/2013 02:51 AM, Alex Williamson wrote: On Fri, 2013-06-21 at 00:08 +1000, Alexey Kardashevskiy wrote: At the moment QEMU creates a route for every MSI IRQ. Now we are about to add IRQFD support on PPC64-pseries

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alexey Kardashevskiy
On 06/21/2013 12:34 PM, Alex Williamson wrote: On Fri, 2013-06-21 at 11:56 +1000, Alexey Kardashevskiy wrote: On 06/21/2013 02:51 AM, Alex Williamson wrote: On Fri, 2013-06-21 at 00:08 +1000, Alexey Kardashevskiy wrote: At the moment QEMU creates a route for every MSI IRQ. Now we are about

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alex Williamson
On Fri, 2013-06-21 at 12:49 +1000, Alexey Kardashevskiy wrote: On 06/21/2013 12:34 PM, Alex Williamson wrote: On Fri, 2013-06-21 at 11:56 +1000, Alexey Kardashevskiy wrote: On 06/21/2013 02:51 AM, Alex Williamson wrote: On Fri, 2013-06-21 at 00:08 +1000, Alexey Kardashevskiy wrote: At the

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Benjamin Herrenschmidt
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