Re: [PATCH v11 00/20] VFIO support for platform and ARM AMBA devices

2015-01-21 Thread Antonios Motakis
Hello Alex, On Mon, Jan 19, 2015 at 7:39 PM, Alex Williamson wrote: > > On Tue, 2015-01-06 at 11:48 +0100, Antonios Motakis wrote: > > This patch series aims to implement VFIO support for platform devices that > > reside behind an IOMMU. Examples of such devices are devices behind an ARM > > SMMU

Re: [PATCH v11 00/20] VFIO support for platform and ARM AMBA devices

2015-01-20 Thread Eric Auger
On 01/20/2015 04:10 PM, Baptiste Reynal wrote: > This fix should work, in a more elegant way. Could you confirm ? > > I'm sorry I don't have any means to reproduce the bug on my side ... Hi Baptiste, No Problem. It looks OK to me and runs fine in my xgmac use case. Best Regards Eric > > Than

Re: [PATCH v11 00/20] VFIO support for platform and ARM AMBA devices

2015-01-20 Thread Baptiste Reynal
This fix should work, in a more elegant way. Could you confirm ? I'm sorry I don't have any means to reproduce the bug on my side ... Thanks, Baptiste diff --git a/drivers/vfio/platform/vfio_platform_irq.c b/drivers/vfio/platform/vfio_platform_irq.c index 6ade36b..f5f3de0 100644 --- a/drivers/vf

Re: [PATCH v11 00/20] VFIO support for platform and ARM AMBA devices

2015-01-19 Thread Alex Williamson
On Tue, 2015-01-06 at 11:48 +0100, Antonios Motakis wrote: > This patch series aims to implement VFIO support for platform devices that > reside behind an IOMMU. Examples of such devices are devices behind an ARM > SMMU, or behind a Samsung Exynos System MMU. > > The API used is based on the exist

Re: [PATCH v11 00/20] VFIO support for platform and ARM AMBA devices

2015-01-19 Thread Eric Auger
Hi Baptiste, yes it fixes the issue in my use case. Best Regards Eric On 01/19/2015 06:00 PM, Baptiste Reynal wrote: > Hi Eric, > > Thanks for taking time about this issue. I agree with you, there is a > problem here. While I think on a better fix and to be sure the problem > is here, may you

Re: [PATCH v11 00/20] VFIO support for platform and ARM AMBA devices

2015-01-19 Thread Baptiste Reynal
Hi Eric, Thanks for taking time about this issue. I agree with you, there is a problem here. While I think on a better fix and to be sure the problem is here, may you try this patch and tell me if the problem is solved ? (This should work as the automasked_irq_handler doesn't do anything if the IR

Re: [PATCH v11 00/20] VFIO support for platform and ARM AMBA devices

2015-01-19 Thread Eric Auger
Hi Baptiste, I think what happens on the second qemu run is: an IRQ hits immediatly after request_irq automasked handler sets masked = true in vfio_set_trigger following condition becomes true if (irq->masked) disable_irq_nosync(irq->hwirq); IRQ is disabled twice, in handl

Re: [PATCH v11 00/20] VFIO support for platform and ARM AMBA devices

2015-01-19 Thread Eric Auger
Hi Baptiste, sorry I was off on Friday. you're right I missed the masked field was reset on init. Nethertheless with current QEMU VFIO code, IRQ runs on the first run and not on the second one. I investigate on my side ... Best Regards Eric On 01/16/2015 02:25 PM, Baptiste Reynal wrote: > He

Re: [PATCH v11 00/20] VFIO support for platform and ARM AMBA devices

2015-01-16 Thread Baptiste Reynal
Hello Eric, I'm not sure I understand the issue here. I tried to reproduce the bug by triggering an interrupt without unmasking it, but the interrupt is unmasked when the program access to the device (vfio_platform_open reinit IRQs). May I have more details on the bug ? Thanks On Fri, Jan 9, 20

Re: [PATCH v11 00/20] VFIO support for platform and ARM AMBA devices

2015-01-09 Thread Antonios Motakis
On Fri, Jan 9, 2015 at 9:39 AM, Eric Auger wrote: > Hi Antonios, > > when moving to 3.19rc3 I observe a regression with my xgmac use case > (real-time change?). > > I guess what happens is when I kill a first qemu session, guest does not > have time to complete the virtual IRQ and the unmask is no

Re: [PATCH v11 00/20] VFIO support for platform and ARM AMBA devices

2015-01-09 Thread Eric Auger
Hi Antonios, when moving to 3.19rc3 I observe a regression with my xgmac use case (real-time change?). I guess what happens is when I kill a first qemu session, guest does not have time to complete the virtual IRQ and the unmask is not performed by the virqfd handler. When starting a new QEMU ses

Re: [PATCH v11 00/20] VFIO support for platform and ARM AMBA devices

2015-01-08 Thread Eric Auger
Hi Antonios, Tested-by: Eric Auger Best Regards Eric On 01/06/2015 11:48 AM, Antonios Motakis wrote: > This patch series aims to implement VFIO support for platform devices that > reside behind an IOMMU. Examples of such devices are devices behind an ARM > SMMU, or behind a Samsung Exynos Syst

[PATCH v11 00/20] VFIO support for platform and ARM AMBA devices

2015-01-06 Thread Antonios Motakis
This patch series aims to implement VFIO support for platform devices that reside behind an IOMMU. Examples of such devices are devices behind an ARM SMMU, or behind a Samsung Exynos System MMU. The API used is based on the existing VFIO API that is also used with PCI devices. Only devices that in