Re: [PATCH v9 0/7] KVM PCIe/MSI passthrough on ARM/ARM64: kernel part 3/3: vfio changes

2016-06-09 Thread Auger Eric
Alex, > On Wed, 8 Jun 2016 10:29:35 +0200 > Auger Eric <eric.au...@linaro.org> wrote: > >> Dear all, >> Le 20/05/2016 à 18:01, Eric Auger a écrit : >>> Alex, Robin, >>> >>> While my 3 part series primarily addresses the problemati

Re: [RESEND PATCH v2 0/6] vfio-pci: Add support for mmapping MSI-X table

2016-06-08 Thread Auger Eric
Hi Yongji, Le 02/06/2016 à 08:09, Yongji Xie a écrit : > Current vfio-pci implementation disallows to mmap the page > containing MSI-X table in case that users can write directly > to MSI-X table and generate an incorrect MSIs. > > However, this will cause some performance issue when there > are

Re: [PATCH v10 4/8] vfio/type1: handle unmap/unpin and replay for VFIO_IOVA_RESERVED slots

2016-06-07 Thread Auger Eric
Hello, Le 07/06/2016 à 18:44, kbuild test robot a écrit : > Hi, > > [auto build test ERROR on vfio/next] > [also build test ERROR on v4.7-rc2 next-20160607] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: >

Re: [PATCH] iommu/arm-smmu: request pcie devices to enable ACS

2016-06-13 Thread Auger Eric
Wei, Le 13/06/2016 à 13:18, Robin Murphy a écrit : > On 13/06/16 10:20, Wei Chen wrote: >> The PCIe ACS capability will affect the layout of iommu groups. >> Generally speaking, if the path from root port to the PCIe device >> is ACS enabled, the iommu will create a single iommu group for this >>

Re: [PATCH v11 06/10] genirq/msi-doorbell: msi_doorbell_safe

2016-07-22 Thread Auger Eric
Hi Thomas, On 22/07/2016 14:44, Thomas Gleixner wrote: > On Thu, 21 Jul 2016, Auger Eric wrote: >> On 20/07/2016 10:12, Thomas Gleixner wrote: >>> On Tue, 19 Jul 2016, Eric Auger wrote: >>>> +bool msi_doorbell_safe(void) >>>> +{ >>>> + s

Re: [PATCH] iommu/iova: validate iova_domain input to put_iova_domain

2016-07-14 Thread Auger Eric
Hi Robin, Nate, On 14/07/2016 12:36, Robin Murphy wrote: > On 14/07/16 09:34, Joerg Roedel wrote: >> On Wed, Jul 13, 2016 at 02:49:32PM -0400, Nate Watterson wrote: >>> Passing a NULL or uninitialized iova_domain into put_iova_domain >>> will currently crash the kernel when the unconfigured

Re: [PATCH v11 10/10] genirq/msi: use the MSI doorbell's IOVA when requested

2016-07-26 Thread Auger Eric
Hi Thomas, On 26/07/2016 11:04, Thomas Gleixner wrote: > Eric, > > On Mon, 25 Jul 2016, Auger Eric wrote: >> On 20/07/2016 11:09, Thomas Gleixner wrote: >>> On Tue, 19 Jul 2016, Eric Auger wrote: >>>> @@ -63,10 +63,18 @@ static int msi_compose(struct irq_dat

Re: [PATCH v11 09/10] genirq/msi: map/unmap the MSI doorbells on msi_domain_alloc/free_irqs

2016-07-26 Thread Auger Eric
Hi Thomas, On 26/07/2016 11:00, Thomas Gleixner wrote: > B1;2802;0cEric, > > On Mon, 25 Jul 2016, Auger Eric wrote: >> On 20/07/2016 11:04, Thomas Gleixner wrote: >>> On Tue, 19 Jul 2016, Eric Auger wrote: >>>> + if (ret) { >

Re: [PATCH v11 09/10] genirq/msi: map/unmap the MSI doorbells on msi_domain_alloc/free_irqs

2016-07-25 Thread Auger Eric
Hi Thomas, On 20/07/2016 11:04, Thomas Gleixner wrote: > On Tue, 19 Jul 2016, Eric Auger wrote: >> /** >> + * msi_handle_doorbell_mappings: in case the irq data corresponds to an >> + * MSI that requires iommu mapping, traverse the irq domain hierarchy >> + * to retrieve the doorbells to handle

Re: [PATCH v11 10/10] genirq/msi: use the MSI doorbell's IOVA when requested

2016-07-25 Thread Auger Eric
Hi Thomas, On 20/07/2016 11:09, Thomas Gleixner wrote: > On Tue, 19 Jul 2016, Eric Auger wrote: > > First of all - valid for all patches: > > Subject: sys/subsys: Sentence starts with an uppercase letter OK understood. > > Now for this particular one: > > genirq/msi: use the MSI doorbell's

Re: [PATCH v11 4/8] vfio/type1: handle unmap/unpin and replay for VFIO_IOVA_RESERVED slots

2016-07-25 Thread Auger Eric
Hi, On 24/07/2016 03:41, kbuild test robot wrote: > Hi, > > [auto build test ERROR on vfio/next] > [also build test ERROR on v4.7-rc7 next-20160722] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: >

Re: [PATCH] iommu/dma: Don't put uninitialised IOVA domains

2016-07-27 Thread Auger Eric
Hi, On 27/07/2016 17:46, Robin Murphy wrote: > Due to the limitations of having to wait until we see a device's DMA > restrictions before we know how we want an IOVA domain initialised, > there is a window for error if a DMA ops domain is allocated but later > freed without ever being used. In

Re: [PATCH v12 02/11] genirq/msi: msi_compose wrapper

2016-08-10 Thread Auger Eric
Hi Thomas, On 09/08/2016 11:19, Thomas Gleixner wrote: > On Tue, 2 Aug 2016, Eric Auger wrote: > >> Currently the MSI message is composed by directly calling >> irq_chip_compose_msi_msg and erased by setting the memory to zero. >> >> On some platforms, we will need to complexify this composition

Re: [PATCH v11 05/10] genirq/msi-doorbell: msi_doorbell_pages

2016-07-21 Thread Auger Eric
Hi Thomas, On 19/07/2016 16:38, Thomas Gleixner wrote: > On Tue, 19 Jul 2016, Eric Auger wrote: >> msi_doorbell_pages sum up the number of iommu pages of a given order > > adding () to the function name would make it immediately clear that > msi_doorbell_pages is a function. > >> +/** >> + *

Re: [PATCH v11 06/10] genirq/msi-doorbell: msi_doorbell_safe

2016-07-21 Thread Auger Eric
Hi, On 20/07/2016 10:12, Thomas Gleixner wrote: > On Tue, 19 Jul 2016, Eric Auger wrote: >> +bool msi_doorbell_safe(void) >> +{ >> +struct irqchip_doorbell *db; >> +bool irq_remapping = true; >> + >> +mutex_lock(_doorbell_mutex); >> +list_for_each_entry(db, _doorbell_list, next) {

Re: [PATCH v11 0/8] KVM PCIe/MSI passthrough on ARM/ARM64: kernel part 1/3: iommu changes

2016-07-20 Thread Auger Eric
Hi Dennis On 20/07/2016 11:56, Dennis Chen wrote: > Hi Eric, > > On Tue, Jul 19, 2016 at 12:55:03PM +, Eric Auger wrote: >> This series introduces the msi-iommu api used to: >> >> - allocate/free resources for MSI IOMMU mapping >> - set the MSI iova window aperture >> - map/unmap physical

Re: [PATCH v11 04/10] genirq/msi-doorbell: allow MSI doorbell (un)registration

2016-07-20 Thread Auger Eric
Hi Thomas, On 19/07/2016 16:22, Thomas Gleixner wrote: > On Tue, 19 Jul 2016, Eric Auger wrote: >> + >> +#include >> +#include >> +#include >> + >> +struct irqchip_doorbell { >> +struct irq_chip_msi_doorbell_info info; >> +struct list_head next; > > Again, please align the struct

Re: [PATCH v11 05/10] genirq/msi-doorbell: msi_doorbell_pages

2016-07-20 Thread Auger Eric
Hi Thomas, On 19/07/2016 16:38, Thomas Gleixner wrote: > On Tue, 19 Jul 2016, Eric Auger wrote: >> msi_doorbell_pages sum up the number of iommu pages of a given order > > adding () to the function name would make it immediately clear that > msi_doorbell_pages is a function. > >> +/** >> + *

Re: [PATCH v12 0/8] KVM PCIe/MSI passthrough on ARM/ARM64: kernel part 3/3: vfio changes

2016-08-07 Thread Auger Eric
Hi Diana, On 05/08/2016 16:46, Diana Madalina Craciun wrote: > Hi Eric, > > I have tested these patches in a VFIO PCI scenario (using the ITS > emulation) on a NXP LS2080 board. It worked fine with one e1000 card > assigned to the guest. However, when I tried to assign two cards to the > guest I

Re: [PATCH v12 09/11] genirq/msi: Introduce msi_desc flags

2016-08-09 Thread Auger Eric
Hi, On 02/08/2016 19:23, Eric Auger wrote: > This new flags member is meant to store additional information about > the msi descriptor, starting with allocation status information. > > MSI_DESC_FLAG_ALLOCATED bit tells the associated base IRQ is allocated. > This information is currently used at

Re: [bug report] iommu: iommu_get_group_resv_regions

2017-02-03 Thread Auger Eric
Hi Dan, On 03/02/2017 10:14, Dan Carpenter wrote: > Hello Eric Auger, > > The patch 6c65fb318e8b: "iommu: iommu_get_group_resv_regions" from > Jan 19, 2017, leads to the following static checker warning: > > drivers/iommu/iommu.c:215 iommu_insert_device_resv_regions() > error:

Re: [PATCH v9 08/18] iommu/vt-d: Implement reserved region get/put callbacks

2017-01-23 Thread Auger Eric
Hi Will, On 23/01/2017 12:46, Will Deacon wrote: > [adding David Woodhouse, since he maintains this driver] Thank you for adding David to the list. Whoever is likely to pull this, please let me know if I need to respin to add missed Will's Acked-by. Thanks Eric > > Will > > On Thu, Jan 19,

Re: [PATCH v8 00/18] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2017-01-18 Thread Auger Eric
Hi Tomasz, On 13/01/2017 14:59, Tomasz Nowicki wrote: > Hello Eric, > > On 11.01.2017 10:41, Eric Auger wrote: >> Following LPC discussions, we now report reserved regions through >> the iommu-group sysfs reserved_regions attribute file. >> >> Reserved regions are populated through the IOMMU

Re: [PATCH v8 00/18] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2017-01-16 Thread Auger Eric
Hi Tomasz, On 13/01/2017 14:59, Tomasz Nowicki wrote: > Hello Eric, > > On 11.01.2017 10:41, Eric Auger wrote: >> Following LPC discussions, we now report reserved regions through >> the iommu-group sysfs reserved_regions attribute file. >> >> Reserved regions are populated through the IOMMU

Re: [PATCH v8 14/18] irqdomain: irq_domain_check_msi_remap

2017-01-17 Thread Auger Eric
Hi Tomasz, On 17/01/2017 14:40, Tomasz Nowicki wrote: > On 11.01.2017 10:41, Eric Auger wrote: >> This new function checks whether all MSI irq domains >> implement IRQ remapping. This is useful to understand >> whether VFIO passthrough is safe with respect to interrupts. >> >> On ARM typically an

Re: [PATCH v5 19/19] iommu/dma: Add support for mapping MSIs

2016-08-31 Thread Auger Eric
Hi Robin, On 26/08/2016 03:17, Robin Murphy wrote: > Hi Eric, > > On Fri, 26 Aug 2016 00:25:34 +0200 > Auger Eric <eric.au...@redhat.com> wrote: > >> Hi Robin, >> >> On 23/08/2016 21:05, Robin Murphy wrote: >>> When an MSI doorbell is locat

Re: [PATCH v5 18/19] iommu/arm-smmu: Set domain geometry

2016-08-31 Thread Auger Eric
Hi, On 23/08/2016 21:05, Robin Murphy wrote: > For non-aperture-based IOMMUs, the domain geometry seems to have become > the de-facto way of indicating the input address space size. That is > quite a useful thing from the users' perspective, so let's do the same. > > Signed-off-by: Robin Murphy

Re: [PATCH v7 00/22] Generic DT bindings for PCI IOMMUs and ARM SMMU

2016-09-14 Thread Auger Eric
Hi, On 14/09/2016 12:35, Robin Murphy wrote: > On 14/09/16 09:41, Auger Eric wrote: >> Hi, >> >> On 12/09/2016 18:13, Robin Murphy wrote: >>> Hi all, >>> >>> To any more confusing fixups and crazily numbered extra patches, here's >>>

Re: [PATCH v7 00/22] Generic DT bindings for PCI IOMMUs and ARM SMMU

2016-09-14 Thread Auger Eric
Hi Will On 14/09/2016 11:20, Will Deacon wrote: > On Wed, Sep 14, 2016 at 10:41:57AM +0200, Auger Eric wrote: >> Hi, > > Hi Eric, > >> On 12/09/2016 18:13, Robin Murphy wrote: >>> To any more confusing fixups and crazily numbered extra patches, here's >&

Re: [PATCH v7 00/22] Generic DT bindings for PCI IOMMUs and ARM SMMU

2016-09-14 Thread Auger Eric
Hi, On 12/09/2016 18:13, Robin Murphy wrote: > Hi all, > > To any more confusing fixups and crazily numbered extra patches, here's > a quick v7 with everything rebased into the right order. The significant > change this time is to implement iommu_fwspec properly from the start, > which ends up

Re: [PATCH v7 00/22] Generic DT bindings for PCI IOMMUs and ARM SMMU

2016-09-13 Thread Auger Eric
Hi Robin On 12/09/2016 18:13, Robin Murphy wrote: > Hi all, > > To any more confusing fixups and crazily numbered extra patches, here's > a quick v7 with everything rebased into the right order. The significant > change this time is to implement iommu_fwspec properly from the start, > which ends

Re: [PATCH] iommu/io-pgtable-arm: Check for v7s-incapable systems

2016-09-13 Thread Auger Eric
Hi, On 13/09/2016 15:26, Robin Murphy wrote: > On machines with no 32-bit addressable RAM whatsoever, we shouldn't > even touch the v7s format as it's never going to work. > > Fixes: e5fc9753b1a8 ("iommu/io-pgtable: Add ARMv7 short descriptor support") > Reported-by: Eric Auger

Re: [PATCH v7 00/22] Generic DT bindings for PCI IOMMUs and ARM SMMU

2016-09-13 Thread Auger Eric
Hi Robin, On 13/09/2016 14:40, Robin Murphy wrote: > Hi Eric, > > On 13/09/16 13:14, Auger Eric wrote: >> Hi Robin >> >> On 12/09/2016 18:13, Robin Murphy wrote: >>> Hi all, >>> >>> To any more confusing fixups and crazily numbered extra

Re: [PATCH v7 00/22] Generic DT bindings for PCI IOMMUs and ARM SMMU

2016-09-15 Thread Auger Eric
Hi Robin, On 15/09/2016 12:15, Robin Murphy wrote: > On 15/09/16 10:29, Auger Eric wrote: >> Hi Robin, >> >> On 14/09/2016 14:53, Robin Murphy wrote: >>> On 14/09/16 13:32, Auger Eric wrote: >>>> Hi, >>>> On 14/09/2016 12:35, Robin Murphy wrote

Re: [RFC 05/11] iommu/dma: iommu_dma_(un)map_mixed

2016-10-04 Thread Auger Eric
Hi Robin, On 04/10/2016 19:18, Robin Murphy wrote: > On 02/10/16 10:56, Christoffer Dall wrote: >> On Fri, Sep 30, 2016 at 02:24:40PM +0100, Robin Murphy wrote: >>> Hi Eric, >>> >>> On 27/09/16 21:48, Eric Auger wrote: iommu_dma_map_mixed and iommu_dma_unmap_mixed operate on

Re: [PATCH v13 03/15] iommu/dma: Allow MSI-only cookies

2016-10-07 Thread Auger Eric
Hi Alex, On 06/10/2016 22:17, Alex Williamson wrote: > On Thu, 6 Oct 2016 08:45:19 + > Eric Auger wrote: > >> From: Robin Murphy >> >> IOMMU domain users such as VFIO face a similar problem to DMA API ops >> with regard to mapping MSI messages

Re: [PATCH v13 11/15] vfio/type1: Handle unmap/unpin and replay for VFIO_IOVA_RESERVED slots

2016-10-07 Thread Auger Eric
Hi Alex, On 06/10/2016 22:19, Alex Williamson wrote: > On Thu, 6 Oct 2016 08:45:27 + > Eric Auger wrote: > >> Before allowing the end-user to create VFIO_IOVA_RESERVED dma slots, >> let's implement the expected behavior for removal and replay. >> >> As opposed to

Re: [PATCH v13 15/15] vfio/type1: Return the MSI geometry through VFIO_IOMMU_GET_INFO capability chains

2016-10-07 Thread Auger Eric
Hi Alex, On 06/10/2016 22:42, Alex Williamson wrote: > On Thu, 6 Oct 2016 14:20:40 -0600 > Alex Williamson wrote: > >> On Thu, 6 Oct 2016 08:45:31 + >> Eric Auger wrote: >> >>> This patch allows the user-space to retrieve the MSI

Re: [PATCH v13 12/15] vfio: Allow reserved msi iova registration

2016-10-07 Thread Auger Eric
Hi Alex, On 06/10/2016 22:19, Alex Williamson wrote: > On Thu, 6 Oct 2016 08:45:28 + > Eric Auger wrote: > >> The user is allowed to register a reserved MSI IOVA range by using the >> DMA MAP API and setting the new flag: VFIO_DMA_MAP_FLAG_MSI_RESERVED_IOVA. >> This

Re: [PATCH v13 04/15] genirq/msi: Introduce the MSI doorbell API

2016-10-07 Thread Auger Eric
Hi Alex, On 06/10/2016 22:17, Alex Williamson wrote: > On Thu, 6 Oct 2016 08:45:20 + > Eric Auger wrote: > >> We introduce a new msi-doorbell API that allows msi controllers >> to allocate and register their doorbells. This is useful when >> those doorbells are

Re: [PATCH v7 00/22] Generic DT bindings for PCI IOMMUs and ARM SMMU

2016-09-15 Thread Auger Eric
Hi Robin, On 14/09/2016 14:53, Robin Murphy wrote: > On 14/09/16 13:32, Auger Eric wrote: >> Hi, >> On 14/09/2016 12:35, Robin Murphy wrote: >>> On 14/09/16 09:41, Auger Eric wrote: >>>> Hi, >>>> >>>> On 12/09/2016 18:13, Robin Murphy w

Re: [PATCH v5 19/19] iommu/dma: Add support for mapping MSIs

2016-08-25 Thread Auger Eric
Hi Robin, On 23/08/2016 21:05, Robin Murphy wrote: > When an MSI doorbell is located downstream of an IOMMU, attaching > devices to a DMA ops domain and switching on translation leads to a rude > shock when their attempt to write to the physical address returned by > the irqchip driver faults (or

Re: [RFC 05/11] iommu/dma: iommu_dma_(un)map_mixed

2016-10-03 Thread Auger Eric
Hi Robin, On 30/09/2016 15:24, Robin Murphy wrote: > Hi Eric, > > On 27/09/16 21:48, Eric Auger wrote: >> iommu_dma_map_mixed and iommu_dma_unmap_mixed operate on >> IOMMU_DOMAIN_MIXED typed domains. On top of standard iommu_map/unmap >> they reserve the IOVA window to prevent the iova allocator

Re: Summary of LPC guest MSI discussion in Santa Fe

2016-11-08 Thread Auger Eric
Hi Will, On 08/11/2016 03:45, Will Deacon wrote: > Hi all, > > I figured this was a reasonable post to piggy-back on for the LPC minutes > relating to guest MSIs on arm64. > > On Thu, Nov 03, 2016 at 10:02:05PM -0600, Alex Williamson wrote: >> We can always have QEMU reject hot-adding the

Re: Summary of LPC guest MSI discussion in Santa Fe

2016-11-08 Thread Auger Eric
Hi Will, On 08/11/2016 20:02, Don Dutile wrote: > On 11/08/2016 12:54 PM, Will Deacon wrote: >> On Tue, Nov 08, 2016 at 03:27:23PM +0100, Auger Eric wrote: >>> On 08/11/2016 03:45, Will Deacon wrote: >>>> Rather than treat these as separate problems, a better inter

Re: Summary of LPC guest MSI discussion in Santa Fe

2016-11-09 Thread Auger Eric
Hi, On 10/11/2016 00:59, Alex Williamson wrote: > On Wed, 9 Nov 2016 23:38:50 + > Will Deacon wrote: > >> On Wed, Nov 09, 2016 at 04:24:58PM -0700, Alex Williamson wrote: >>> On Wed, 9 Nov 2016 22:25:22 + >>> Will Deacon wrote: >>> On

Re: [RFC v2 4/8] iommu: Add a list of iommu_reserved_region in iommu_domain

2016-11-10 Thread Auger Eric
Hi Robin, On 10/11/2016 12:54, Robin Murphy wrote: > Hi Eric, > > On 10/11/16 11:22, Auger Eric wrote: >> Hi Robin, >> >> On 04/11/2016 15:00, Robin Murphy wrote: >>> Hi Eric, >>> >>> Thanks for posting this new series - the bottom-up approac

Re: [RFC v2 4/8] iommu: Add a list of iommu_reserved_region in iommu_domain

2016-11-10 Thread Auger Eric
Hi Robin, On 04/11/2016 15:00, Robin Murphy wrote: > Hi Eric, > > Thanks for posting this new series - the bottom-up approach is a lot > easier to reason about :) > > On 04/11/16 11:24, Eric Auger wrote: >> Introduce a new iommu_reserved_region struct. This embodies >> an IOVA reserved region

Re: Summary of LPC guest MSI discussion in Santa Fe

2016-11-10 Thread Auger Eric
Hi Will, Alex, On 10/11/2016 03:01, Will Deacon wrote: > On Wed, Nov 09, 2016 at 05:55:17PM -0700, Alex Williamson wrote: >> On Thu, 10 Nov 2016 01:14:42 +0100 >> Auger Eric <eric.au...@redhat.com> wrote: >>> On 10/11/2016 00:59, Alex Williamson wrote: >>

Re: [RFC v2 2/8] iommu/iova: fix __alloc_and_insert_iova_range

2016-11-10 Thread Auger Eric
Hi Joerg, On 10/11/2016 16:22, Joerg Roedel wrote: > On Fri, Nov 04, 2016 at 11:24:00AM +, Eric Auger wrote: >> Fix the size check within start_pfn and limit_pfn. >> >> Signed-off-by: Eric Auger >> >> --- >> >> the issue was observed when playing with 1 page iova

Re: [RFC v2 4/8] iommu: Add a list of iommu_reserved_region in iommu_domain

2016-11-10 Thread Auger Eric
Hi Joerg, Robin, On 10/11/2016 16:37, Joerg Roedel wrote: > On Fri, Nov 04, 2016 at 11:24:02AM +, Eric Auger wrote: >> Introduce a new iommu_reserved_region struct. This embodies >> an IOVA reserved region that cannot be used along with the IOMMU >> API. The list is protected by a dedicated

Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions callback

2016-11-10 Thread Auger Eric
Hi Joerg, On 10/11/2016 16:46, Joerg Roedel wrote: > On Fri, Nov 04, 2016 at 11:24:06AM +, Eric Auger wrote: >> The function populates the list of reserved regions with the >> PCI host bridge windows and the MSI IOVA range. >> >> At the moment an arbitray MSI IOVA window is set at 0x800

Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions callback

2016-11-11 Thread Auger Eric
Hi Joerg, On 11/11/2016 12:42, Joerg Roedel wrote: > On Thu, Nov 10, 2016 at 07:00:52PM +0100, Auger Eric wrote: >> GICv2m and GICV3 ITS use dma-mapping iommu_dma_map_msi_msg to allocate >> an MSI IOVA on-demand. > > Yes, and it the right thing to do there because as a DMA

Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions callback

2016-11-14 Thread Auger Eric
Hi Joerg, On 14/11/2016 16:31, Joerg Roedel wrote: > Hi Eric, > > On Fri, Nov 11, 2016 at 05:45:19PM +0100, Auger Eric wrote: >> On 11/11/2016 17:22, Joerg Roedel wrote: >>> So I think we need a way to tell userspace about the reserved regions >>> (per iommu-gro

Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions callback

2016-11-14 Thread Auger Eric
Hi Joerg, On 14/11/2016 17:20, Joerg Roedel wrote: > On Mon, Nov 14, 2016 at 05:08:16PM +0100, Auger Eric wrote: >> There are potentially several MSI doorbell physical pages in the SOC >> that are accessed through the IOMMU (translated). Each of those must >> have a correspon

Re: [RFC v3 00/10] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2016-11-18 Thread Auger Eric
Hi Bharat, On 18/11/2016 06:34, Bharat Bhushan wrote: > Hi Eric, > > Have you sent out QEMU side patches based on this new approach? In case I > missed please point me the patches? Upstream QEMU works fine for PCIe/MSI passthrough on ARM since mach virt address space does not collide with

Re: [RFC v2 3/8] iommu/dma: Allow MSI-only cookies

2016-11-14 Thread Auger Eric
Hi Robin, On 14/11/2016 13:36, Robin Murphy wrote: > On 04/11/16 11:24, Eric Auger wrote: >> From: Robin Murphy >> >> IOMMU domain users such as VFIO face a similar problem to DMA API ops >> with regard to mapping MSI messages in systems where the MSI write is >> subject to

Re: [PATCH v14 00/16] KVM PCIe/MSI passthrough on ARM/ARM64

2016-10-21 Thread Auger Eric
Hi Will, On 20/10/2016 19:32, Will Deacon wrote: > Hi Eric, > > Thanks for posting this. > > On Wed, Oct 12, 2016 at 01:22:08PM +, Eric Auger wrote: >> This is the second respin on top of Robin's series [1], addressing Alex' >> comments. >> >> Major changes are: >> - MSI-doorbell API now

Re: [PATCH v14 14/16] vfio/type1: Check doorbell safety

2016-11-03 Thread Auger Eric
Hi Diana, On 03/11/2016 14:45, Diana Madalina Craciun wrote: > Hi Eric, > > On 10/12/2016 04:23 PM, Eric Auger wrote: >> On x86 IRQ remapping is abstracted by the IOMMU. On ARM this is abstracted >> by the msi controller. >> >> Since we currently have no way to detect whether the MSI controller

Re: [PATCH v13 03/15] iommu/dma: Allow MSI-only cookies

2016-10-10 Thread Auger Eric
Hi Robin, On 10/10/2016 16:26, Robin Murphy wrote: > Hi Alex, Eric, > > On 06/10/16 21:17, Alex Williamson wrote: >> On Thu, 6 Oct 2016 08:45:19 + >> Eric Auger wrote: >> >>> From: Robin Murphy >>> >>> IOMMU domain users such as VFIO face a

Re: [PATCH v13 15/15] vfio/type1: Return the MSI geometry through VFIO_IOMMU_GET_INFO capability chains

2016-10-10 Thread Auger Eric
Hi Alex, On 07/10/2016 22:38, Alex Williamson wrote: > On Fri, 7 Oct 2016 19:10:27 +0200 > Auger Eric <eric.au...@redhat.com> wrote: > >> Hi Alex, >> >> On 06/10/2016 22:42, Alex Williamson wrote: >>> On Thu, 6 Oct 2016 14:20:40 -0600 >>>

Re: [PATCH v14 04/16] iommu/dma: MSI doorbell alloc/free

2016-10-17 Thread Auger Eric
Hi Punit, On 14/10/2016 13:25, Punit Agrawal wrote: > Hi Eric, > > One query and a comment below. > > Eric Auger writes: > >> We introduce the capability to (un)register MSI doorbells. >> >> A doorbell region is characterized by its physical address base, size, >> and

Re: [PATCH v14 00/16] KVM PCIe/MSI passthrough on ARM/ARM64

2016-10-17 Thread Auger Eric
Hi Punit, On 14/10/2016 13:24, Punit Agrawal wrote: > Hi Eric, > > I am a bit late in joining, but I've tried to familiarise > myself with earlier discussions on the series. > > Eric Auger writes: > >> This is the second respin on top of Robin's series [1], addressing

Re: [RFC v3 09/10] iommu/arm-smmu: Implement reserved region get/put callbacks

2016-12-07 Thread Auger Eric
Hi Robin, On 07/12/2016 19:24, Robin Murphy wrote: > On 07/12/16 15:02, Auger Eric wrote: >> Hi Robin, >> On 06/12/2016 19:55, Robin Murphy wrote: >>> On 15/11/16 13:09, Eric Auger wrote: >>>> The get() populates the list with the PCI host bridge

Re: [RFC v3 00/10] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2016-12-08 Thread Auger Eric
Hi Robin, On 08/12/2016 14:14, Robin Murphy wrote: > On 08/12/16 09:36, Auger Eric wrote: >> Hi, >> >> On 15/11/2016 14:09, Eric Auger wrote: >>> Following LPC discussions, we now report reserved regions through >>> iommu-group sysfs reserved_regions attribu

Re: [RFC v3 00/10] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2016-12-08 Thread Auger Eric
Hi, On 15/11/2016 14:09, Eric Auger wrote: > Following LPC discussions, we now report reserved regions through > iommu-group sysfs reserved_regions attribute file. While I am respinning this series into v4, here is a tentative summary of technical topics for which no consensus was reached at

Re: [RFC v3 00/10] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2016-12-07 Thread Auger Eric
Hi Shanker, On 07/12/2016 19:52, Shanker Donthineni wrote: > Hi Eric, > > Is there any reason why you are not supporting SMMUv3 driver? Qualcomm > hardware doesn't not support SMMUv2 hardware, please add support for > SMMUv3 in next patch set. I've ported ' RFC,v3,09/10] iommu/arm-smmu: >

Re: [RFC v3 00/10] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2016-12-12 Thread Auger Eric
Hi Don, On 11/12/2016 03:05, Don Dutile wrote: > On 12/08/2016 04:36 AM, Auger Eric wrote: >> Hi, >> >> On 15/11/2016 14:09, Eric Auger wrote: >>> Following LPC discussions, we now report reserved regions through >>> iommu-group sysfs reserved_regi

Re: [RFC v3 06/10] iommu: iommu_get_group_resv_regions

2016-12-07 Thread Auger Eric
Hi Robin, On 06/12/2016 19:13, Robin Murphy wrote: > On 15/11/16 13:09, Eric Auger wrote: >> Introduce iommu_get_group_resv_regions whose role consists in >> enumerating all devices from the group and collecting their >> reserved regions. It checks duplicates. >> >> Signed-off-by: Eric Auger

Re: [PATCH v7 08/19] iommu: Implement reserved_regions iommu-group sysfs file

2017-01-10 Thread Auger Eric
Hi Joerg, On 09/01/2017 14:45, Eric Auger wrote: > A new iommu-group sysfs attribute file is introduced. It contains > the list of reserved regions for the iommu-group. Each reserved > region is described on a separate line: > - first field is the start IOVA address, > - second is the end IOVA

Re: [PATCH v7 00/19] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2017-01-10 Thread Auger Eric
Hi all, On 10/01/2017 15:09, Joerg Roedel wrote: > On Mon, Jan 09, 2017 at 01:45:51PM +, Eric Auger wrote: >> Eric Auger (17): >> iommu: Rename iommu_dm_regions into iommu_resv_regions >> iommu: Add a new type field in iommu_resv_region >> iommu: iommu_alloc_resv_region >> iommu: Only

Re: [PATCH v8 00/18] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2017-01-11 Thread Auger Eric
Hi Bharat, On 12/01/2017 04:59, Bharat Bhushan wrote: > > >> -Original Message- >> From: Eric Auger [mailto:eric.au...@redhat.com] >> Sent: Wednesday, January 11, 2017 3:12 PM >> To: eric.au...@redhat.com; eric.auger@gmail.com; >> christoffer.d...@linaro.org; marc.zyng...@arm.com; >>

Re: [PATCH v7 08/19] iommu: Implement reserved_regions iommu-group sysfs file

2017-01-10 Thread Auger Eric
Hi Joerg, On 10/01/2017 18:14, Joerg Roedel wrote: > On Tue, Jan 10, 2017 at 05:20:34PM +0100, Auger Eric wrote: >> The /sys/kernel/iommu_groups/n directory seems to be removed before this >> gets called and this may produce a WARNING when devices get removed from >> the grou

Re: [RFC v3 00/10] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2016-11-30 Thread Auger Eric
Hi, On 15/11/2016 14:09, Eric Auger wrote: > Following LPC discussions, we now report reserved regions through > iommu-group sysfs reserved_regions attribute file. > > Reserved regions are populated through the IOMMU get_resv_region callback > (former get_dm_regions), now implemented by

Re: [RFC v3 04/10] iommu: iommu_alloc_resv_region

2016-11-30 Thread Auger Eric
Hi Joerg, On 29/11/2016 17:11, Joerg Roedel wrote: > On Tue, Nov 15, 2016 at 01:09:17PM +, Eric Auger wrote: >> +static inline struct iommu_resv_region * >> +iommu_alloc_resv_region(phys_addr_t start, size_t length, unsigned int prot) >> +{ >> +return NULL; >> +} >> + > > Will this

Re: [RFC v3 00/10] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2016-11-30 Thread Auger Eric
ries? Actually this is a very old patch from Alex aimed at working around lack of PCIe ACS support: https://lkml.org/lkml/2013/5/30/513 Thanks Eric > > thanks > Ganapat > > On Wed, Nov 30, 2016 at 3:19 PM, Auger Eric <eric.au...@redhat.com> wrote: >> Hi, >&

Re: [RFC v3 00/10] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2016-11-30 Thread Auger Eric
Hi Will, On 30/11/2016 11:37, Will Deacon wrote: > On Wed, Nov 30, 2016 at 10:49:33AM +0100, Auger Eric wrote: >> On 15/11/2016 14:09, Eric Auger wrote: >>> Following LPC discussions, we now report reserved regions through >>> iommu-group sysfs reserved_regions attri

Re: [PATCH v6 17/18] vfio/type1: Check MSI remapping at irq domain level

2017-01-06 Thread Auger Eric
Hi Bharat On 06/01/2017 09:50, Bharat Bhushan wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger [mailto:eric.au...@redhat.com] >> Sent: Friday, January 06, 2017 12:35 AM >> To: eric.au...@redhat.com; eric.auger@gmail.com; >> christoffer.d...@linaro.org;

Re: [PATCH v6 07/18] iommu: Implement reserved_regions iommu-group sysfs file

2017-01-06 Thread Auger Eric
Hi Joerg, On 06/01/2017 12:00, Joerg Roedel wrote: > On Thu, Jan 05, 2017 at 07:04:35PM +, Eric Auger wrote: >> +list_for_each_entry_safe(region, next, _resv_regions, list) { >> +str += sprintf(str, "0x%016llx 0x%016llx\n", >> + (long long

Re: [PATCH v6 08/18] iommu/vt-d: Implement reserved region get/put callbacks

2017-01-06 Thread Auger Eric
Hi Joerg, On 06/01/2017 12:01, Joerg Roedel wrote: > On Thu, Jan 05, 2017 at 07:04:36PM +, Eric Auger wrote: >> +static void intel_iommu_get_resv_regions(struct device *device, >> + struct list_head *head) >> +{ >> +struct iommu_resv_region *reg; >> +

Re: [PATCH v6 01/18] iommu/dma: Allow MSI-only cookies

2017-01-06 Thread Auger Eric
On 06/01/2017 11:59, Joerg Roedel wrote: > On Thu, Jan 05, 2017 at 07:04:29PM +, Eric Auger wrote: >> struct iommu_dma_cookie { >> -struct iova_domain iovad; >> -struct list_headmsi_page_list; >> -spinlock_t msi_lock; >> +union { >> +

Re: [PATCH v6 08/18] iommu/vt-d: Implement reserved region get/put callbacks

2017-01-06 Thread Auger Eric
Hi Joerg, On 06/01/2017 13:46, Joerg Roedel wrote: > On Fri, Jan 06, 2017 at 12:45:54PM +0100, Auger Eric wrote: >> On 06/01/2017 12:01, Joerg Roedel wrote: >>> On Thu, Jan 05, 2017 at 07:04:36PM +, Eric Auger wrote: > >>> That is different from what AMD does

Re: [PATCH v6 07/18] iommu: Implement reserved_regions iommu-group sysfs file

2017-01-06 Thread Auger Eric
Hi, On 06/01/2017 13:48, Joerg Roedel wrote: > On Fri, Jan 06, 2017 at 12:46:05PM +0100, Auger Eric wrote: >> On 06/01/2017 12:00, Joerg Roedel wrote: > >>> I think it also makes sense to report the type of the reserved region. >> >> What is the best practice in

Re: [PATCH v6 01/18] iommu/dma: Allow MSI-only cookies

2017-01-06 Thread Auger Eric
Hi Robin, On 06/01/2017 13:12, Robin Murphy wrote: > On 06/01/17 11:46, Auger Eric wrote: >> >> >> On 06/01/2017 11:59, Joerg Roedel wrote: >>> On Thu, Jan 05, 2017 at 07:04:29PM +, Eric Auger wrote: >>>> struct iommu_dma_cookie { >>>

Re: [PATCH v6 07/18] iommu: Implement reserved_regions iommu-group sysfs file

2017-01-06 Thread Auger Eric
Hi Joerg, Robin, On 06/01/2017 13:48, Joerg Roedel wrote: > On Fri, Jan 06, 2017 at 12:46:05PM +0100, Auger Eric wrote: >> On 06/01/2017 12:00, Joerg Roedel wrote: > >>> I think it also makes sense to report the type of the reserved region. >> >> What is the bes

Re: [PATCH v5 13/17] irqdomain: irq_domain_check_msi_remap

2017-01-04 Thread Auger Eric
Hi Marc, On 04/01/2017 14:46, Marc Zyngier wrote: > Hi Eric, > > On 04/01/17 13:32, Eric Auger wrote: >> This new function checks whether all platform and PCI >> MSI domains implement IRQ remapping. This is useful to >> understand whether VFIO passthrough is safe with respect >> to interrupts.

Re: [PATCH v5 13/17] irqdomain: irq_domain_check_msi_remap

2017-01-04 Thread Auger Eric
Hi Marc, On 04/01/2017 16:27, Marc Zyngier wrote: > On 04/01/17 14:11, Auger Eric wrote: >> Hi Marc, >> >> On 04/01/2017 14:46, Marc Zyngier wrote: >>> Hi Eric, >>> >>> On 04/01/17 13:32, Eric Auger wrote: >>>> This new function checks

Re: [PATCH v5 13/17] irqdomain: irq_domain_check_msi_remap

2017-01-05 Thread Auger Eric
Hi Marc, On 05/01/2017 12:57, Marc Zyngier wrote: > On 05/01/17 11:29, Auger Eric wrote: >> Hi Marc, >> >> On 05/01/2017 12:25, Marc Zyngier wrote: >>> On 05/01/17 10:45, Auger Eric wrote: >>>> Hi Marc, >>>> >>>> On 04/01/2017 16

Re: [PATCH v5 13/17] irqdomain: irq_domain_check_msi_remap

2017-01-05 Thread Auger Eric
Hi Marc, On 05/01/2017 12:25, Marc Zyngier wrote: > On 05/01/17 10:45, Auger Eric wrote: >> Hi Marc, >> >> On 04/01/2017 16:27, Marc Zyngier wrote: >>> On 04/01/17 14:11, Auger Eric wrote: >>>> Hi Marc, >>>> >>>> On 04/01/2017 14

Re: [PATCH v5 13/17] irqdomain: irq_domain_check_msi_remap

2017-01-05 Thread Auger Eric
Hi Marc, On 04/01/2017 16:27, Marc Zyngier wrote: > On 04/01/17 14:11, Auger Eric wrote: >> Hi Marc, >> >> On 04/01/2017 14:46, Marc Zyngier wrote: >>> Hi Eric, >>> >>> On 04/01/17 13:32, Eric Auger wrote: >>>> This new function checks

Re: [PATCH v6 07/18] iommu: Implement reserved_regions iommu-group sysfs file

2017-01-08 Thread Auger Eric
Hi, On 06/01/2017 18:18, Auger Eric wrote: > Hi Joerg, Robin, > > On 06/01/2017 13:48, Joerg Roedel wrote: >> On Fri, Jan 06, 2017 at 12:46:05PM +0100, Auger Eric wrote: >>> On 06/01/2017 12:00, Joerg Roedel wrote: >> >>>> I think it also makes sense

Re: [PATCH v5 13/17] irqdomain: irq_domain_check_msi_remap

2017-01-06 Thread Auger Eric
Hi Bharat, On 06/01/2017 05:27, Bharat Bhushan wrote: > Hi Mark, > >> -Original Message----- >> From: Auger Eric [mailto:eric.au...@redhat.com] >> Sent: Thursday, January 05, 2017 5:39 PM >> To: Marc Zyngier <marc.zyng...@arm.com>; eric.auger@gmail

Re: [RFC v4 15/16] vfio/type1: Check MSI remapping at irq domain level

2016-12-23 Thread Auger Eric
better studying flag propagation in domain hierarchy. Best Regards Eric > > > Thank you, > Geetha. > > On Thu, Dec 22, 2016 at 6:32 PM, Auger Eric <eric.au...@redhat.com > <mailto:eric.au...@redhat.com>> wrote: > > Hi Diana, > > On 22/

Re: [RFC v3 09/10] iommu/arm-smmu: Implement reserved region get/put callbacks

2016-12-07 Thread Auger Eric
Hi Robin, On 06/12/2016 19:55, Robin Murphy wrote: > On 15/11/16 13:09, Eric Auger wrote: >> The get() populates the list with the PCI host bridge windows >> and the MSI IOVA range. >> >> At the moment an arbitray MSI IOVA window is set at 0x800 >> of size 1MB. This will allow to report those

Re: [RFC v3 05/10] iommu: Do not map reserved regions

2016-12-07 Thread Auger Eric
Hi Robin On 06/12/2016 18:36, Robin Murphy wrote: > On 15/11/16 13:09, Eric Auger wrote: >> As we introduced IOMMU_RESV_NOMAP and IOMMU_RESV_MSI regions, >> let's prevent those new regions from being mapped. >> >> Signed-off-by: Eric Auger >> --- >> drivers/iommu/iommu.c

Re: [RFC v4 15/16] vfio/type1: Check MSI remapping at irq domain level

2016-12-22 Thread Auger Eric
Hi Diana, On 22/12/2016 13:41, Diana Madalina Craciun wrote: > Hi Eric, > > On 12/13/2016 10:32 PM, Eric Auger wrote: >> In case the IOMMU does not bypass MSI transactions (typical >> case on ARM), we check all MSI controllers are IRQ remapping >> capable. If not the IRQ assignment may be

Re: [PATCH 2/3] iommu/dma: Don't reserve PCI I/O windows

2017-03-13 Thread Auger Eric
Hi, On 09/03/2017 20:50, Robin Murphy wrote: > Even if a host controller's CPU-side MMIO windows into PCI I/O space do > happen to leak into PCI memory space such that it might treat them as > peer addresses, trying to reserve the corresponding I/O space addresses > doesn't do anything to help

Re: [PATCH 3/3] iommu/dma: Handle IOMMU API reserved regions

2017-03-13 Thread Auger Eric
Hi Robin, On 09/03/2017 20:50, Robin Murphy wrote: > Now that it's simple to discover the necessary reservations for a given > device/IOMMU combination, let's wire up the appropriate handling. Basic > reserved regions and direct-mapped regions are obvious enough to handle; > hardware MSI regions

Re: [PATCH 1/3] iommu: Disambiguate MSI region types

2017-03-13 Thread Auger Eric
Hi Robin, On 09/03/2017 20:50, Robin Murphy wrote: > Whilst it doesn't matter much to VFIO at the moment, when parsing > reserved regions on the host side we really needs to be able to tell s/needs/need > the difference between the software-reserved region used to map MSIs > translated by an

Re: [PATCH 1/3] iommu: Disambiguate MSI region types

2017-03-13 Thread Auger Eric
Hi Robin, On 13/03/2017 15:24, Robin Murphy wrote: > On 13/03/17 13:08, Auger Eric wrote: >> Hi Robin, >> >> On 09/03/2017 20:50, Robin Murphy wrote: >>> Whilst it doesn't matter much to VFIO at the moment, when parsing >>> reserved regions on the host side

  1   2   3   4   5   6   7   >