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 writes: > > > On 24.06.2013, at 16:31, Anthony Liguori wrote: > > > >> "Michael S. Tsirkin" writes: > >> > >>> On Mon, Jun 24, 2013 at 08:34:52AM -0500, Anthony Liguori wrote: > Gleb Natapov writes: >

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 writes: > > > On Mon, Jun 24, 2013 at 07:32:32AM -0500, Anthony Liguori wrote: > >> Gleb Natapov writes: > >> > >> This should be a per-device mapping, yes. But I'm not sure that VCPUs > >> should even see anything

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

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

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

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

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" writes: > >> On Mon, Jun 24, 2013 at 08:34:52AM -0500, Anthony Liguori wrote: >>> Gleb Natapov writes: >>> >>> Isn't this more or less what Avi's previous proposal was around changing >>> the APIC interfaces to userspace?

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 writes: > > > On Mon, Jun 24, 2013 at 07:32:32AM -0500, Anthony Liguori wrote: > >> Gleb Natapov writes: > >> > >> This should be a per-device mapping, yes. But I'm not sure that VCPUs > >> should even see anything

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

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

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 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 > >> wrote: > >> > On Fri, 2013-06-21 at 12:49 +1000, Alexey Kardashevskiy wrote:

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 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 >>> wrote: On Fri, 2013-06-21 at 12:49 +1000, Alexey Kardashevskiy wrote: > On 06/21/2013

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

2013-06-24 Thread Anthony Liguori
Gleb Natapov 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 >> 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

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

2013-06-24 Thread Anthony Liguori
Alex Williamson writes: > On Sun, 2013-06-23 at 10:06 -0500, Anthony Liguori wrote: >> On Thu, Jun 20, 2013 at 11:46 PM, Alex Williamson >> 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 fol

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 s

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 > 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

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 > 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

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 kv

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 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 KVM_SET_GSI_ROUTING in KVM? W

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 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 >> is the o

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 an

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 kvm_irqc

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

2013-06-20 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

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 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

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 believ

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:

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. N

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-pser

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 control

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 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, p

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 supp

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

2013-06-20 Thread Anthony Liguori
Alexey Kardashevskiy 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 > mapping

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 alrea

[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 MSI/MSI