Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-16 Thread Auger Eric
Hi Jason, On 4/16/21 4:34 PM, Jason Gunthorpe wrote: > On Fri, Apr 16, 2021 at 04:26:19PM +0200, Auger Eric wrote: > >> This was largely done during several confs including plumber, KVM forum, >> for several years. Also API docs were shared on the ML. I don't remember >&

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-16 Thread Auger Eric
Hi, On 4/16/21 4:05 PM, Jason Gunthorpe wrote: > On Fri, Apr 16, 2021 at 03:38:02PM +0200, Auger Eric wrote: > >> The redesign requirement came pretty late in the development process. >> The iommu user API is upstream for a while, the VFIO interfaces have >> been s

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-16 Thread Auger Eric
Hi Jason, On 4/16/21 1:07 AM, Jason Gunthorpe wrote: > On Thu, Apr 15, 2021 at 03:11:19PM +0200, Auger Eric wrote: >> Hi Jason, >> >> On 4/1/21 6:03 PM, Jason Gunthorpe wrote: >>> On Thu, Apr 01, 2021 at 02:08:17PM +, Liu, Yi L wrote: >>> >>>>

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-15 Thread Auger Eric
Hi Jason, On 4/1/21 6:03 PM, Jason Gunthorpe wrote: > On Thu, Apr 01, 2021 at 02:08:17PM +, Liu, Yi L wrote: > >> DMA page faults are delivered to root-complex via page request message and >> it is per-device according to PCIe spec. Page request handling flow is: >> >> 1) iommu driver

Re: [PATCH v12 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE

2021-04-11 Thread Auger Eric
Hi Zenghui, On 4/7/21 11:33 AM, Zenghui Yu wrote: > Hi Eric, > > On 2021/2/24 5:06, Eric Auger wrote: >> +/* >> + * VFIO_IOMMU_SET_PASID_TABLE - _IOWR(VFIO_TYPE, VFIO_BASE + 18, >> + *    struct vfio_iommu_type1_set_pasid_table) >> + * >> + * The SET operation passes a PASID table to the

Re: [PATCH v14 08/13] dma-iommu: Implement NESTED_MSI cookie

2021-04-10 Thread Auger Eric
Hi Zenghui, On 4/7/21 9:39 AM, Zenghui Yu wrote: > Hi Eric, > > On 2021/2/24 4:56, Eric Auger wrote: >> Up to now, when the type was UNMANAGED, we used to >> allocate IOVA pages within a reserved IOVA MSI range. >> >> If both the host and the guest are exposed with SMMUs, each >> would allocate

Re: [PATCH v14 06/13] iommu/smmuv3: Allow stage 1 invalidation with unmanaged ASIDs

2021-04-09 Thread Auger Eric
Hi Kunkun, On 4/9/21 6:48 AM, Kunkun Jiang wrote: > Hi Eric, > > On 2021/4/8 20:30, Auger Eric wrote: >> Hi Kunkun, >> >> On 4/1/21 2:37 PM, Kunkun Jiang wrote: >>> Hi Eric, >>> >>> On 2021/2/24 4:56, Eric Auger wrote: >>>>

Re: [PATCH v14 06/13] iommu/smmuv3: Allow stage 1 invalidation with unmanaged ASIDs

2021-04-08 Thread Auger Eric
Hi Kunkun, On 4/1/21 2:37 PM, Kunkun Jiang wrote: > Hi Eric, > > On 2021/2/24 4:56, Eric Auger wrote: >> With nested stage support, soon we will need to invalidate >> S1 contexts and ranges tagged with an unmanaged asid, this >> latter being managed by the guest. So let's introduce 2 helpers >>

Re: [PATCH v6 9/9] KVM: selftests: aarch64/vgic-v3 init sequence tests

2021-04-07 Thread Auger Eric
Hi Drew, On 4/6/21 5:09 PM, Andrew Jones wrote: > > Hi Eric, > > It looks like Marc already picked this patch up, but, FWIW, here's > a few more comments you may consider. I will send a fixup patch on top of the one taken my Marc. Few comments below. > > On Mon, Apr 05, 2021 at 06:39:41PM

Re: [PATCH v5 0/8] KVM/ARM: Some vgic fixes and init sequence KVM selftests

2021-04-05 Thread Auger Eric
Hi Marc, On 4/5/21 12:12 PM, Marc Zyngier wrote: > Hi Eric, > > On Sun, 04 Apr 2021 18:22:35 +0100, > Eric Auger wrote: >> >> While writting vgic v3 init sequence KVM selftests I noticed some >> relatively minor issues. This was also the opportunity to try to >> fix the issue laterly reported

Re: [PATCH v5 7/8] KVM: arm64: vgic-v3: Expose GICR_TYPER.Last for userspace

2021-04-05 Thread Auger Eric
Hi Marc, On 4/5/21 12:10 PM, Marc Zyngier wrote: > On Sun, 04 Apr 2021 18:22:42 +0100, > Eric Auger wrote: >> >> Commit 23bde34771f1 ("KVM: arm64: vgic-v3: Drop the >> reporting of GICR_TYPER.Last for userspace") temporarily fixed >> a bug identified when attempting to access the GICR_TYPER >>

Re: [PATCH v4 7/8] KVM: arm64: vgic-v3: Expose GICR_TYPER.Last for userspace

2021-04-01 Thread Auger Eric
Hi Marc, On 4/1/21 7:30 PM, Marc Zyngier wrote: > On Thu, 01 Apr 2021 18:03:25 +0100, > Auger Eric wrote: >> >> Hi Marc, >> >> On 4/1/21 3:42 PM, Marc Zyngier wrote: >>> Hi Eric, >>> >>> On Thu, 01 Apr 2021 09:52:37 +0100, >>> E

Re: [PATCH v14 07/13] iommu/smmuv3: Implement cache_invalidate

2021-04-01 Thread Auger Eric
Hi Zenghui, On 4/1/21 8:11 AM, Zenghui Yu wrote: > Hi Eric, > > On 2021/2/24 4:56, Eric Auger wrote: >> +static int >> +arm_smmu_cache_invalidate(struct iommu_domain *domain, struct device >> *dev, >> +  struct iommu_cache_invalidate_info *inv_info) >> +{ >> +    struct

Re: [PATCH v14 13/13] iommu/smmuv3: Accept configs with more than one context descriptor

2021-04-01 Thread Auger Eric
Hi Shameer, On 4/1/21 2:38 PM, Shameerali Kolothum Thodi wrote: > > >> -Original Message----- >> From: Auger Eric [mailto:eric.au...@redhat.com] >> Sent: 01 April 2021 12:49 >> To: yuzenghui >> Cc: eric.auger@gmail.com; io...@lists.linux-foundation.

Re: [PATCH v14 13/13] iommu/smmuv3: Accept configs with more than one context descriptor

2021-04-01 Thread Auger Eric
Hi Zenghui, On 3/30/21 11:23 AM, Zenghui Yu wrote: > Hi Eric, > > On 2021/2/24 4:56, Eric Auger wrote: >> In preparation for vSVA, let's accept userspace provided configs >> with more than one CD. We check the max CD against the host iommu >> capability and also the format (linear versus 2

Re: [PATCH v4 1/8] KVM: arm64: vgic-v3: Fix some error codes when setting RDIST base

2021-04-01 Thread Auger Eric
Hi Marc, On 4/1/21 12:52 PM, Marc Zyngier wrote: > Hi Eric, > > On Thu, 01 Apr 2021 09:52:31 +0100, > Eric Auger wrote: >> >> KVM_DEV_ARM_VGIC_GRP_ADDR group doc says we should return >> -EEXIST in case the base address of the redist is already set. >> We currently return -EINVAL. >> >> However

Re: [PATCH v4 7/8] KVM: arm64: vgic-v3: Expose GICR_TYPER.Last for userspace

2021-04-01 Thread Auger Eric
Hi Marc, On 4/1/21 3:42 PM, Marc Zyngier wrote: > Hi Eric, > > On Thu, 01 Apr 2021 09:52:37 +0100, > Eric Auger wrote: >> >> Commit 23bde34771f1 ("KVM: arm64: vgic-v3: Drop the >> reporting of GICR_TYPER.Last for userspace") temporarily fixed >> a bug identified when attempting to access the

Re: [PATCH v14 06/13] iommu/smmuv3: Allow stage 1 invalidation with unmanaged ASIDs

2021-04-01 Thread Auger Eric
Hi Zenghui, On 3/30/21 11:17 AM, Zenghui Yu wrote: > On 2021/2/24 4:56, Eric Auger wrote: >> @@ -1936,7 +1950,12 @@ static void >> arm_smmu_tlb_inv_range_domain(unsigned long iova, size_t size, >>   }, >>   }; >>   -    if (smmu_domain->stage == ARM_SMMU_DOMAIN_S1) { >> +    if

Re: [PATCH v3 8/8] KVM: selftests: aarch64/vgic-v3 init sequence tests

2021-03-31 Thread Auger Eric
Hi Drew, On 3/22/21 7:32 PM, Andrew Jones wrote: > On Fri, Mar 12, 2021 at 06:32:02PM +0100, Eric Auger wrote: >> The tests exercise the VGIC_V3 device creation including the >> associated KVM_DEV_ARM_VGIC_GRP_ADDR group attributes: >> >> - KVM_VGIC_V3_ADDR_TYPE_DIST/REDIST >> -

Re: [PATCH 1/4] vfio/type1: fix a couple of spelling mistakes

2021-03-26 Thread Auger Eric
Hi, On 3/26/21 9:35 AM, Zhen Lei wrote: > There are several spelling mistakes, as follows: > userpsace ==> userspace > Accouting ==> Accounting > exlude ==> exclude Reviewed-by: Eric Auger Thanks Eric > > Signed-off-by: Zhen Lei > --- > drivers/vfio/vfio_iommu_type1.c | 6 +++--- > 1 file

Re: [PATCH 2/4] vfio/mdev: Fix spelling mistake "interal" -> "internal"

2021-03-26 Thread Auger Eric
On 3/26/21 9:35 AM, Zhen Lei wrote: > There is a spelling mistake in a comment, fix it. > > Signed-off-by: Zhen Lei Reviewed-by: Eric Auger > --- > drivers/vfio/mdev/mdev_private.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vfio/mdev/mdev_private.h >

Re: [PATCH 3/4] vfio/pci: fix a couple of spelling mistakes

2021-03-26 Thread Auger Eric
On 3/26/21 9:35 AM, Zhen Lei wrote: > There are several spelling mistakes, as follows: > permision ==> permission > thru ==> through > presense ==> presence > > Signed-off-by: Zhen Lei Reviewed-by: Eric Auger Eric > --- > drivers/vfio/pci/vfio_pci.c

Re: [PATCH 4/4] vfio/platform: Fix spelling mistake "registe" -> "register"

2021-03-26 Thread Auger Eric
Hi, On 3/26/21 9:35 AM, Zhen Lei wrote: > There is a spelling mistake in a comment, fix it. > > Signed-off-by: Zhen Lei Acked-by: Eric Auger Thanks Eric > --- > drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [Linuxarm] Re: [PATCH v14 07/13] iommu/smmuv3: Implement cache_invalidate

2021-03-22 Thread Auger Eric
Hi Chenxiang, On 3/22/21 7:40 AM, chenxiang (M) wrote: > Hi Eric, > > > 在 2021/3/20 1:36, Auger Eric 写道: >> Hi Chenxiang, >> >> On 3/4/21 8:55 AM, chenxiang (M) wrote: >>> Hi Eric, >>> >>> >>> 在 2021/2/24 4:56, Eric Auger 写道: &

Re: [PATCH v14 07/13] iommu/smmuv3: Implement cache_invalidate

2021-03-19 Thread Auger Eric
Hi Chenxiang, On 3/4/21 8:55 AM, chenxiang (M) wrote: > Hi Eric, > > > 在 2021/2/24 4:56, Eric Auger 写道: >> Implement domain-selective, pasid selective and page-selective >> IOTLB invalidations. >> >> Signed-off-by: Eric Auger >> >> --- >> >> v13 -> v14: >> - Add domain invalidation >> - do

Re: [PATCH v14 00/13] SMMUv3 Nested Stage Setup (IOMMU part)

2021-03-19 Thread Auger Eric
Hi Krishna, On 3/18/21 1:16 AM, Krishna Reddy wrote: > Tested-by: Krishna Reddy > > Validated nested translations with NVMe PCI device assigned to Guest VM. > Tested with both v12 and v13 of Jean-Philippe's patches as base. Many thanks for that. > >> This is based on Jean-Philippe's >>

Re: [PATCH v14 05/13] iommu/smmuv3: Implement attach/detach_pasid_table

2021-03-19 Thread Auger Eric
Hi Keqian, On 3/2/21 9:35 AM, Keqian Zhu wrote: > Hi Eric, > > On 2021/2/24 4:56, Eric Auger wrote: >> On attach_pasid_table() we program STE S1 related info set >> by the guest into the actual physical STEs. At minimum >> we need to program the context descriptor GPA and compute >> whether the

Re: [PATCH v13 00/15] SMMUv3 Nested Stage Setup (IOMMU part)

2021-03-16 Thread Auger Eric
Hi Krishna, On 3/15/21 7:04 PM, Krishna Reddy wrote: > Tested-by: Krishna Reddy > >> 1) pass the guest stage 1 configuration > > Validated Nested SMMUv3 translations for NVMe PCIe device from Guest VM along > with patch series "v11 SMMUv3 Nested Stage Setup (VFIO part)" and QEMU patch >

Re: [PATCH 5/9] KVM: arm: move has_run_once after the map_resources

2021-03-12 Thread Auger Eric
Hi Alexandru, On 1/20/21 4:56 PM, Alexandru Elisei wrote: > Hi Eric, > > On 1/14/21 10:02 AM, Auger Eric wrote: >> Hi Alexandru, >> >> On 1/12/21 3:55 PM, Alexandru Elisei wrote: >>> Hi Eric, >>> >>> On 12/12/20 6:50 PM, Eric Auger wr

Re: [PATCH 8/9] KVM: arm64: vgic-v3: Expose GICR_TYPER.Last for userspace

2021-03-12 Thread Auger Eric
Hi Alexandru, On 1/20/21 5:13 PM, Alexandru Elisei wrote: > Hi Eric, > > On 1/14/21 10:16 AM, Auger Eric wrote: >> Hi Alexandru, >> >> On 1/12/21 6:02 PM, Alexandru Elisei wrote: >>> Hi Eric, >>> >>> On 12/12/20 6:50 PM, Eric Auger wrote

Re: [PATCH v12 03/13] vfio: VFIO_IOMMU_SET_MSI_BINDING

2021-03-08 Thread Auger Eric
Hi Jean, On 3/5/21 11:45 AM, Jean-Philippe Brucker wrote: > Hi, > > On Tue, Feb 23, 2021 at 10:06:15PM +0100, Eric Auger wrote: >> This patch adds the VFIO_IOMMU_SET_MSI_BINDING ioctl which aim >> to (un)register the guest MSI binding to the host. This latter >> then can use those stage 1

Re: [PATCH v14 00/13] SMMUv3 Nested Stage Setup (IOMMU part)

2021-02-25 Thread Auger Eric
Hi Shameer, all On 2/23/21 9:56 PM, Eric Auger wrote: > This series brings the IOMMU part of HW nested paging support > in the SMMUv3. The VFIO part is submitted separately. > > This is based on Jean-Philippe's > [PATCH v12 00/10] iommu: I/O page faults for SMMUv3 >

Re: [PATCH v11 04/13] vfio/pci: Add VFIO_REGION_TYPE_NESTED region type

2021-02-23 Thread Auger Eric
Hi Shenming, On 2/23/21 1:45 PM, Shenming Lu wrote: >> +static int vfio_pci_dma_fault_init(struct vfio_pci_device *vdev) >> +{ >> +struct vfio_region_dma_fault *header; >> +struct iommu_domain *domain; >> +size_t size; >> +bool nested; >> +int ret; >> + >> +domain =

Re: [PATCH v11 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE

2021-02-22 Thread Auger Eric
Hi Keqian, On 2/22/21 1:20 PM, Keqian Zhu wrote: > Hi Eric, > > On 2021/2/22 18:53, Auger Eric wrote: >> Hi Keqian, >> >> On 2/2/21 1:34 PM, Keqian Zhu wrote: >>> Hi Eric, >>> >>> On 2020/11/16 19:00, Eric Auger wr

Re: [PATCH v11 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE

2021-02-22 Thread Auger Eric
Hi Keqian, On 2/2/21 1:34 PM, Keqian Zhu wrote: > Hi Eric, > > On 2020/11/16 19:00, Eric Auger wrote: >> From: "Liu, Yi L" >> >> This patch adds an VFIO_IOMMU_SET_PASID_TABLE ioctl >> which aims to pass the virtual iommu guest configuration >> to the host. This latter takes the form of the

Re: [PATCH v13 00/15] SMMUv3 Nested Stage Setup (IOMMU part)

2021-02-21 Thread Auger Eric
Hi Shameer, On 1/8/21 6:05 PM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger [mailto:eric.au...@redhat.com] >> Sent: 18 November 2020 11:22 >> To: eric.auger@gmail.com; eric.au...@redhat.com; >> io...@lists.linux-foundation.org;

Re: [PATCH v11 12/13] vfio/pci: Register a DMA fault response region

2021-02-18 Thread Auger Eric
Hi Shameer, On 2/18/21 11:36 AM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >>> -Original Message- >>> From: Eric Auger [mailto:eric.au...@redhat.com] >>> Sent: 16 November 2020 11:00 >>> To: eric.auger@gmail.com; eric.au...@redhat.com; >>> io...@lists.linux-foundation.org;

Re: [PATCH v13 02/15] iommu: Introduce bind/unbind_guest_msi

2021-02-18 Thread Auger Eric
Hi Keqian, On 2/18/21 9:43 AM, Keqian Zhu wrote: > Hi Eric, > > On 2021/2/12 16:55, Auger Eric wrote: >> Hi Keqian, >> >> On 2/1/21 12:52 PM, Keqian Zhu wrote: >>> Hi Eric, >>> >>> On 2020/11/18 19:21, Eric Auger wrote: >>>

Re: [PATCH v13 07/15] iommu/smmuv3: Allow stage 1 invalidation with unmanaged ASIDs

2021-02-15 Thread Auger Eric
Hi Shameer, On 12/3/20 7:42 PM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >> -Original Message- >> From: kvmarm-boun...@lists.cs.columbia.edu >> [mailto:kvmarm-boun...@lists.cs.columbia.edu] On Behalf Of Auger Eric >> Sent: 01 December 2020 13:59 >>

Re: [PATCH 2/2] iommu: arm-smmu-v3: Report domain nesting info reuqired for stage1

2021-02-12 Thread Auger Eric
Hi Vivek, On 2/12/21 11:58 AM, Vivek Gautam wrote: > Update nested domain information required for stage1 page table. > > Signed-off-by: Vivek Gautam > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 16 ++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH 2/2] iommu: arm-smmu-v3: Report domain nesting info reuqired for stage1

2021-02-12 Thread Auger Eric
Hi Vivek, On 2/12/21 11:58 AM, Vivek Gautam wrote: > Update nested domain information required for stage1 page table. s/reuqired/required in the commit title > > Signed-off-by: Vivek Gautam > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 16 ++-- > 1 file changed, 14

Re: [PATCH 1/2] iommu: Report domain nesting info for arm-smmu-v3

2021-02-12 Thread Auger Eric
Hi Vivek, On 2/12/21 11:58 AM, Vivek Gautam wrote: > Add a vendor specific structure for domain nesting info for > arm smmu-v3, and necessary info fields required to populate > stage1 page tables. > > Signed-off-by: Vivek Gautam > --- > include/uapi/linux/iommu.h | 31

Re: [PATCH v13 02/15] iommu: Introduce bind/unbind_guest_msi

2021-02-12 Thread Auger Eric
Hi Keqian, On 2/1/21 12:52 PM, Keqian Zhu wrote: > Hi Eric, > > On 2020/11/18 19:21, Eric Auger wrote: >> On ARM, MSI are translated by the SMMU. An IOVA is allocated >> for each MSI doorbell. If both the host and the guest are exposed >> with SMMUs, we end up with 2 different IOVAs allocated by

Re: [PATCH v13 05/15] iommu/smmuv3: Get prepared for nested stage support

2021-02-11 Thread Auger Eric
Hi Keqian, On 2/2/21 8:14 AM, Keqian Zhu wrote: > Hi Eric, > > On 2020/11/18 19:21, Eric Auger wrote: >> When nested stage translation is setup, both s1_cfg and >> s2_cfg are set. >> >> We introduce a new smmu domain abort field that will be set >> upon guest stage1 configuration passing. >> >>

Re: [PATCH v13 06/15] iommu/smmuv3: Implement attach/detach_pasid_table

2021-02-11 Thread Auger Eric
Hi Keqian, On 2/2/21 9:03 AM, Keqian Zhu wrote: > Hi Eric, > > On 2020/11/18 19:21, Eric Auger wrote: >> On attach_pasid_table() we program STE S1 related info set >> by the guest into the actual physical STEs. At minimum >> we need to program the context descriptor GPA and compute >> whether

Re: [RFC v4 3/3] vfio: platform: reset: add msi support

2021-02-08 Thread Auger Eric
Hi Vikas, On 1/29/21 6:24 PM, Vikas Gupta wrote: > Add msi support for Broadcom FlexRm device. > > Signed-off-by: Vikas Gupta > --- > .../platform/reset/vfio_platform_bcmflexrm.c | 72 ++- > 1 file changed, 70 insertions(+), 2 deletions(-) > > diff --git

Re: [RFC v4 2/3] vfio/platform: change cleanup order

2021-02-08 Thread Auger Eric
Hi Vikas, On 1/29/21 6:24 PM, Vikas Gupta wrote: > In the case of msi, vendor specific msi module may require > region access to handle msi cleanup so we need to cleanup region > after irq cleanup only. > > Signed-off-by: Vikas Gupta Acked-by: Eric Auger Thanks Eric > --- >

Re: [RFC v4 1/3] vfio/platform: add support for msi

2021-02-08 Thread Auger Eric
Hi Vikas, On 1/29/21 6:24 PM, Vikas Gupta wrote: > MSI support for platform devices. MSI is added s/MSI support/ Add MSI support > as a single 'index' with 'count' as the number of > MSI(s) supported by the devices. as a single 'index' following the last wired irq index index, with count. It

Re: [PATCH v3 4/5] amba: Make the remove callback return void

2021-02-03 Thread Auger Eric
Hi Uwe, On 1/26/21 5:58 PM, Uwe Kleine-König wrote: > All amba drivers return 0 in their remove callback. Together with the > driver core ignoring the return value anyhow, it doesn't make sense to > return a value here. > > Change the remove prototype to return void, which makes it explicit that

Re: [PATCH v13 03/15] iommu/arm-smmu-v3: Maintain a SID->device structure

2021-02-01 Thread Auger Eric
Hi Keqian, On 2/1/21 1:26 PM, Keqian Zhu wrote: > Hi Eric, > > On 2020/11/18 19:21, Eric Auger wrote: >> From: Jean-Philippe Brucker >> >> When handling faults from the event or PRI queue, we need to find the >> struct device associated to a SID. Add a rb_tree to keep track of SIDs. >> >>

Re: [PATCH v13 01/15] iommu: Introduce attach/detach_pasid_table API

2021-02-01 Thread Auger Eric
Hi Keqian, On 2/1/21 12:27 PM, Keqian Zhu wrote: > Hi Eric, > > On 2020/11/18 19:21, Eric Auger wrote: >> In virtualization use case, when a guest is assigned >> a PCI host device, protected by a virtual IOMMU on the guest, >> the physical IOMMU must be programmed to be consistent with >> the

Re: [PATCH RFC v1 00/15] iommu/virtio: Nested stage support with Arm

2021-01-26 Thread Auger Eric
Hi Vivek, On 1/21/21 6:34 PM, Vivek Kumar Gautam wrote: > Hi Eric, > > > On 1/19/21 2:33 PM, Auger Eric wrote: >> Hi Vivek, >> >> On 1/15/21 1:13 PM, Vivek Gautam wrote: >>> This patch-series aims at enabling Nested stage translation in guests >>>

Re: [RFC v3 2/2] vfio/platform: msi: add Broadcom platform devices

2021-01-20 Thread Auger Eric
Hi Alex, On 1/19/21 11:45 PM, Alex Williamson wrote: > On Fri, 15 Jan 2021 10:24:33 +0100 > Auger Eric wrote: > >> Hi Vikas, >> On 1/15/21 7:35 AM, Vikas Gupta wrote: >>> Hi Eric, >>> >>> On Tue, Jan 12, 2021 at 2:52 PM Auger Eric wrote: &

Re: [PATCH RFC v1 00/15] iommu/virtio: Nested stage support with Arm

2021-01-19 Thread Auger Eric
Hi Vivek, On 1/15/21 1:13 PM, Vivek Gautam wrote: > This patch-series aims at enabling Nested stage translation in guests > using virtio-iommu as the paravirtualized iommu. The backend is supported > with Arm SMMU-v3 that provides nested stage-1 and stage-2 translation. > > This series derives

Re: [RFC v3 1/2] vfio/platform: add support for msi

2021-01-15 Thread Auger Eric
Hi Vikas, On 1/15/21 7:26 AM, Vikas Gupta wrote: > Hi Eric, > > On Tue, Jan 12, 2021 at 2:30 PM Auger Eric wrote: >> >> Hi Vikas, >> >> On 1/5/21 6:53 AM, Vikas Gupta wrote: >>> On Tue, Dec 22, 2020 at 10:57 PM Auger Eric wrote: >>>> >

Re: [RFC v3 2/2] vfio/platform: msi: add Broadcom platform devices

2021-01-15 Thread Auger Eric
Hi Vikas, On 1/15/21 7:35 AM, Vikas Gupta wrote: > Hi Eric, > > On Tue, Jan 12, 2021 at 2:52 PM Auger Eric wrote: >> >> Hi Vikas, >> >> On 12/14/20 6:45 PM, Vikas Gupta wrote: >>> Add msi support for Broadcom platform devices >>> >>> Si

Re: [PATCH v13 07/15] iommu/smmuv3: Allow stage 1 invalidation with unmanaged ASIDs

2021-01-14 Thread Auger Eric
Hi Jean, On 1/14/21 6:33 PM, Jean-Philippe Brucker wrote: > Hi Eric, > > On Thu, Jan 14, 2021 at 05:58:27PM +0100, Auger Eric wrote: >>>> The uacce-devel branches from >>>>> https://github.com/Linaro/linux-kernel-uadk do provide this at the moment >&g

Re: [PATCH v13 07/15] iommu/smmuv3: Allow stage 1 invalidation with unmanaged ASIDs

2021-01-14 Thread Auger Eric
Hi Shameer, Jean-Philippe, On 12/4/20 11:23 AM, Auger Eric wrote: > Hi Shameer, Jean-Philippe, > > On 12/4/20 11:20 AM, Shameerali Kolothum Thodi wrote: >> Hi Jean, >> >>> -Original Message- >>> From: Jean-Philippe Brucker [mailto:jean-phili...@li

Re: [PATCH 8/9] KVM: arm64: vgic-v3: Expose GICR_TYPER.Last for userspace

2021-01-14 Thread Auger Eric
Hi Alexandru, On 1/12/21 6:02 PM, Alexandru Elisei wrote: > Hi Eric, > > On 12/12/20 6:50 PM, Eric Auger wrote: >> Commit 23bde34771f1 ("KVM: arm64: vgic-v3: Drop the >> reporting of GICR_TYPER.Last for userspace") temporarily fixed >> a bug identified when attempting to access the GICR_TYPER >>

Re: [PATCH 5/9] KVM: arm: move has_run_once after the map_resources

2021-01-14 Thread Auger Eric
Hi Alexandru, On 1/12/21 3:55 PM, Alexandru Elisei wrote: > Hi Eric, > > On 12/12/20 6:50 PM, Eric Auger wrote: >> has_run_once is set to true at the beginning of >> kvm_vcpu_first_run_init(). This generally is not an issue >> except when exercising the code with KVM selftests. Indeed, >> if

Re: [PATCH 1/9] KVM: arm64: vgic-v3: Fix some error codes when setting RDIST base

2021-01-14 Thread Auger Eric
Hi Alexandru, On 1/6/21 5:32 PM, Alexandru Elisei wrote: > Hi Eric, > > On 12/12/20 6:50 PM, Eric Auger wrote: >> KVM_DEV_ARM_VGIC_GRP_ADDR group doc says we should return >> -EEXIST in case the base address of the redist is already set. >> We currently return -EINVAL. >> >> However we need to

Re: [PATCH 3/9] KVM: arm64: vgic-v3: Fix error handling in vgic_v3_set_redist_base()

2021-01-13 Thread Auger Eric
Hi Marc, On 12/28/20 4:35 PM, Marc Zyngier wrote: > Hi Eric, > > On Sat, 12 Dec 2020 18:50:04 +, > Eric Auger wrote: >> >> vgic_register_all_redist_iodevs may succeed while >> vgic_register_all_redist_iodevs fails. For example this can happen > > The same function cannot both fail and

Re: [PATCH 6/9] docs: kvm: devices/arm-vgic-v3: enhance KVM_DEV_ARM_VGIC_CTRL_INIT doc

2021-01-13 Thread Auger Eric
Hi Alexandru, On 1/12/21 4:39 PM, Alexandru Elisei wrote: > Hi Eric, > > On 12/12/20 6:50 PM, Eric Auger wrote: >> kvm_arch_vcpu_precreate() returns -EBUSY if the vgic is >> already initialized. So let's document that KVM_DEV_ARM_VGIC_CTRL_INIT >> must be called after all vcpu creations. > >

Re: [PATCH 4/9] KVM: arm/arm64: vgic: Reset base address on kvm_vgic_dist_destroy()

2021-01-13 Thread Auger Eric
Hi Marc, On 12/28/20 4:41 PM, Marc Zyngier wrote: > On Sat, 12 Dec 2020 18:50:05 +, > Eric Auger wrote: >> >> On vgic_dist_destroy(), the addresses are not reset. However for >> kvm selftest purpose this would allow to continue the test execution >> even after a failure when running KVM_RUN.

Re: [PATCH 2/9] KVM: arm64: Fix KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION read

2021-01-13 Thread Auger Eric
Hi Alexandru, On 1/6/21 6:12 PM, Alexandru Elisei wrote: > Hi Eric, > > The patch looks correct to me. kvm_vgic_addr() masks out all the bits except > index > from addr, so we don't need to do it in vgic_get_common_attr(): > > Reviewed-by: Alexandru Elisei > > One nitpick below. > > On

Re: [PATCH 7/9] KVM: arm64: Simplify argument passing to vgic_uaccess_[read|write]

2021-01-13 Thread Auger Eric
Hi Alexandru, On 1/12/21 5:16 PM, Alexandru Elisei wrote: > Hi Eric, > > On 1/12/21 4:04 PM, Alexandru Elisei wrote: >> Hi Eric, >> >> On 12/12/20 6:50 PM, Eric Auger wrote: >>> Instead of converting the vgic_io_device handle to a kvm_io_device >>> handled and then do the oppositive, pass a

Re: [PATCH v13 00/15] SMMUv3 Nested Stage Setup (IOMMU part)

2021-01-13 Thread Auger Eric
Hi Shameer, On 1/8/21 6:05 PM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger [mailto:eric.au...@redhat.com] >> Sent: 18 November 2020 11:22 >> To: eric.auger@gmail.com; eric.au...@redhat.com; >> io...@lists.linux-foundation.org;

Re: [RFC v3 2/2] vfio/platform: msi: add Broadcom platform devices

2021-01-12 Thread Auger Eric
Hi Vikas, On 12/14/20 6:45 PM, Vikas Gupta wrote: > Add msi support for Broadcom platform devices > > Signed-off-by: Vikas Gupta > --- > drivers/vfio/platform/Kconfig | 1 + > drivers/vfio/platform/Makefile| 1 + > drivers/vfio/platform/msi/Kconfig

Re: [RFC v3 1/2] vfio/platform: add support for msi

2021-01-12 Thread Auger Eric
Hi Vikas, On 1/5/21 6:53 AM, Vikas Gupta wrote: > On Tue, Dec 22, 2020 at 10:57 PM Auger Eric wrote: >> >> Hi Vikas, >> >> On 12/14/20 6:45 PM, Vikas Gupta wrote: >>> MSI support for platform devices.The MSI block >>> is added as an extended IRQ

Re: [RFC v3 1/2] vfio/platform: add support for msi

2020-12-22 Thread Auger Eric
Hi Vikas, On 12/14/20 6:45 PM, Vikas Gupta wrote: > MSI support for platform devices.The MSI block > is added as an extended IRQ which exports caps > VFIO_IRQ_INFO_CAP_TYPE and VFIO_IRQ_INFO_CAP_MSI_DESCS. > > Signed-off-by: Vikas Gupta > --- > drivers/vfio/platform/vfio_platform_common.c |

Re: [RFC PATCH v1 3/4] KVM: arm64: GICv4.1: Restore VLPI's pending state to physical side

2020-12-16 Thread Auger Eric
Hi Shenming, On 12/1/20 1:15 PM, Shenming Lu wrote: > On 2020/12/1 19:50, Marc Zyngier wrote: >> On 2020-12-01 11:40, Shenming Lu wrote: >>> On 2020/12/1 18:55, Marc Zyngier wrote: On 2020-11-30 07:23, Shenming Lu wrote: Hi Shenming, > We are pondering over this problem

Re: [RFC v2 1/1] vfio/platform: add support for msi

2020-12-11 Thread Auger Eric
Hi Vikas, On 12/10/20 8:34 AM, Vikas Gupta wrote: > HI Eric, > > On Tue, Dec 8, 2020 at 2:13 AM Auger Eric wrote: >> >> Hi Vikas, >> >> On 12/3/20 3:50 PM, Vikas Gupta wrote: >>> Hi Eric, >>> >>> On Wed, Dec 2, 2020 at 8:14 PM Auger Er

Re: [RFC v2 1/1] vfio/platform: add support for msi

2020-12-07 Thread Auger Eric
Hi Vikas, On 12/3/20 3:50 PM, Vikas Gupta wrote: > Hi Eric, > > On Wed, Dec 2, 2020 at 8:14 PM Auger Eric wrote: >> >> Hi Vikas, >> >> On 11/24/20 5:16 PM, Vikas Gupta wrote: >>> MSI support for platform devices. >>> >>> Si

Re: [PATCH v13 07/15] iommu/smmuv3: Allow stage 1 invalidation with unmanaged ASIDs

2020-12-04 Thread Auger Eric
Hi Shameer, Jean-Philippe, On 12/4/20 11:20 AM, Shameerali Kolothum Thodi wrote: > Hi Jean, > >> -Original Message- >> From: Jean-Philippe Brucker [mailto:jean-phili...@linaro.org] >> Sent: 04 December 2020 09:54 >> To: Shameerali Kolothum Thodi &

Re: [PATCH v13 05/15] iommu/smmuv3: Get prepared for nested stage support

2020-12-03 Thread Auger Eric
Hi Kunkun, On 12/3/20 1:32 PM, Kunkun Jiang wrote: > Hi Eric, > > On 2020/11/18 19:21, Eric Auger wrote: >> When nested stage translation is setup, both s1_cfg and >> s2_cfg are set. >> >> We introduce a new smmu domain abort field that will be set >> upon guest stage1 configuration passing. >>

Re: [PATCH v1 2/5] vfio: platform: Switch to use platform_get_mem_or_io_resource()

2020-12-03 Thread Auger Eric
Hi Andy, On 10/27/20 6:58 PM, Andy Shevchenko wrote: > Switch to use new platform_get_mem_or_io_resource() instead of > home grown analogue. > > Cc: Eric Auger > Cc: Alex Williamson > Cc: Cornelia Huck > Cc: k...@vger.kernel.org > Signed-off-by: Andy Shevchenko Acked-by: Eric Auger Thanks

Re: [PATCH v2 3/5] vfio: platform: simplify device removal

2020-12-02 Thread Auger Eric
Hi Uwe, On 11/24/20 2:31 PM, Uwe Kleine-König wrote: > From: Uwe Kleine-König > > vfio_platform_remove_common() cannot return non-NULL in > vfio_amba_remove() as the latter is only called if vfio_amba_probe() > returned success. > > Diagnosed-by: Arnd Bergmann > Signed-off-by: Uwe

Re: [RFC v2 1/1] vfio/platform: add support for msi

2020-12-02 Thread Auger Eric
Hi Vikas, On 11/24/20 5:16 PM, Vikas Gupta wrote: > MSI support for platform devices. > > Signed-off-by: Vikas Gupta > --- > drivers/vfio/platform/vfio_platform_common.c | 99 ++- > drivers/vfio/platform/vfio_platform_irq.c | 260 +- >

Re: [RFC, v2 0/1] msi support for platform devices

2020-12-02 Thread Auger Eric
Hi Vikas, On 11/24/20 5:16 PM, Vikas Gupta wrote: > This RFC adds support for MSI for platform devices. > MSI block is added as an ext irq along with the existing > wired interrupt implementation. > > Changes from: > - > v1 to v2: > 1) IRQ allocation has been implemented as

Re: [PATCH v13 07/15] iommu/smmuv3: Allow stage 1 invalidation with unmanaged ASIDs

2020-12-01 Thread Auger Eric
Hi Xingang, On 12/1/20 2:33 PM, Xingang Wang wrote: > Hi Eric > > On Wed, 18 Nov 2020 12:21:43, Eric Auger wrote: >> @@ -1710,7 +1710,11 @@ static void arm_smmu_tlb_inv_context(void *cookie) >> * insertion to guarantee those are observed before the TLBI. Do be >> * careful, 007. >>

Re: [PATCH v11 08/13] vfio/pci: Add framework for custom interrupt indices

2020-11-24 Thread Auger Eric
Hi Shameer, Qubingbing On 11/23/20 1:51 PM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger [mailto:eric.au...@redhat.com] >> Sent: 16 November 2020 11:00 >> To: eric.auger@gmail.com; eric.au...@redhat.com; >> io...@lists.linux-foundation.org;

Re: [PATCH v13 01/15] iommu: Introduce attach/detach_pasid_table API

2020-11-19 Thread Auger Eric
Hi Jacob, On 11/18/20 5:19 PM, Jacob Pan wrote: > Hi Eric, > > On Wed, 18 Nov 2020 12:21:37 +0100, Eric Auger > wrote: > >> In virtualization use case, when a guest is assigned >> a PCI host device, protected by a virtual IOMMU on the guest, >> the physical IOMMU must be programmed to be

Re: [RFC, v1 0/3] msi support for platform devices

2020-11-18 Thread Auger Eric
Hi Vikas, On 11/17/20 5:36 PM, Vikas Gupta wrote: > Hi Eric, > > On Tue, Nov 17, 2020 at 1:55 PM Auger Eric wrote: >> >> Hi Vikas, >> >> On 11/17/20 9:05 AM, Auger Eric wrote: >>> Hi Vikas, >>> >>> On 11/17/20 7:25 AM, Vikas Gupta wr

Re: [PATCH] KVM: arm64: vgic-v3: Drop the reporting of GICR_TYPER.Last for userspace

2020-11-17 Thread Auger Eric
Hi Zenghui, On 11/17/20 4:16 PM, Zenghui Yu wrote: > It was recently reported that if GICR_TYPER is accessed before the RD base > address is set, we'll suffer from the unset @rdreg dereferencing. Oops... > > gpa_t last_rdist_typer = rdreg->base + GICR_TYPER + >

Re: [PATCH v12 04/15] iommu/smmuv3: Dynamically allocate s1_cfg and s2_cfg

2020-11-17 Thread Auger Eric
Hi Shameer, On 11/17/20 12:39 PM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger [mailto:eric.au...@redhat.com] >> Sent: 16 November 2020 10:43 >> To: eric.auger@gmail.com; eric.au...@redhat.com; >> io...@lists.linux-foundation.org;

Re: [PATCH 1/2] KVM: arm64: vgic: Forbid invalid userspace Redistributor accesses

2020-11-17 Thread Auger Eric
Hi Marc, On 11/17/20 9:49 AM, Marc Zyngier wrote: > Hi Zenghui, > > On 2020-11-16 14:57, Zenghui Yu wrote: >> Hi Marc, >> >> On 2020/11/16 22:10, Marc Zyngier wrote: My take is that only if the "[Re]Distributor base address" is specified in the system memory map, will the user-provided

Re: [PATCH 1/2] KVM: arm64: vgic: Forbid invalid userspace Redistributor accesses

2020-11-17 Thread Auger Eric
Hi Zenghui, On 11/17/20 9:49 AM, Marc Zyngier wrote: > Hi Zenghui, > > On 2020-11-16 14:57, Zenghui Yu wrote: >> Hi Marc, >> >> On 2020/11/16 22:10, Marc Zyngier wrote: My take is that only if the "[Re]Distributor base address" is specified in the system memory map, will the

Re: [PATCH v11 00/13] SMMUv3 Nested Stage Setup (IOMMU part)

2020-11-17 Thread Auger Eric
Hi Shameer, On 5/13/20 5:57 PM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >> -Original Message----- >> From: Auger Eric [mailto:eric.au...@redhat.com] >> Sent: 13 May 2020 14:29 >> To: Shameerali Kolothum Thodi ; >> Zhangfei Gao ; eric.auger

Re: [RFC, v1 0/3] msi support for platform devices

2020-11-17 Thread Auger Eric
Hi Vikas, On 11/17/20 9:05 AM, Auger Eric wrote: > Hi Vikas, > > On 11/17/20 7:25 AM, Vikas Gupta wrote: >> Hi Eric, >> >> On Mon, Nov 16, 2020 at 6:44 PM Auger Eric wrote: >>> >>> Hi Vikas, >>> >>> On 11/13/20 6:24 PM, Vikas Gupta

Re: [RFC, v1 0/3] msi support for platform devices

2020-11-17 Thread Auger Eric
Hi Vikas, On 11/17/20 7:25 AM, Vikas Gupta wrote: > Hi Eric, > > On Mon, Nov 16, 2020 at 6:44 PM Auger Eric wrote: >> >> Hi Vikas, >> >> On 11/13/20 6:24 PM, Vikas Gupta wrote: >>> Hi Eric, >>> >>> On Fri, Nov 13, 2020 at 12:10 AM Au

Re: [RFC, v1 0/3] msi support for platform devices

2020-11-16 Thread Auger Eric
Hi Vikas, On 11/13/20 6:24 PM, Vikas Gupta wrote: > Hi Eric, > > On Fri, Nov 13, 2020 at 12:10 AM Auger Eric wrote: >> >> Hi Vikas, >> >> On 11/12/20 6:58 PM, Vikas Gupta wrote: >>> This RFC adds support for MSI for platform devices. >>&g

Re: [PATCH v10 04/11] vfio/pci: Add VFIO_REGION_TYPE_NESTED region type

2020-11-13 Thread Auger Eric
Hi Zenghui, On 9/24/20 10:23 AM, Zenghui Yu wrote: > Hi Eric, > > On 2020/3/21 0:19, Eric Auger wrote: >> Add a new specific DMA_FAULT region aiming to exposed nested mode >> translation faults. >> >> The region has a ring buffer that contains the actual fault >> records plus a header allowing to

Re: [PATCH v10 05/11] vfio/pci: Register an iommu fault handler

2020-11-13 Thread Auger Eric
Hi Zenghui, On 9/24/20 10:49 AM, Zenghui Yu wrote: > Hi Eric, > > On 2020/3/21 0:19, Eric Auger wrote: >> Register an IOMMU fault handler which records faults in >> the DMA FAULT region ring buffer. In a subsequent patch, we >> will add the signaling of a specific eventfd to allow the >>

Re: [RFC, v1 0/3] msi support for platform devices

2020-11-12 Thread Auger Eric
Hi Vikas, On 11/12/20 6:58 PM, Vikas Gupta wrote: > This RFC adds support for MSI for platform devices. > a) MSI(s) is/are added in addition to the normal interrupts. > b) The vendor specific MSI configuration can be done using >callbacks which is implemented as msi module. > c) Adds a msi

Re: [RFC, v0 1/3] vfio/platform: add support for msi

2020-11-09 Thread Auger Eric
Hi Vikas, On 11/9/20 7:41 AM, Vikas Gupta wrote: > Hi Alex, > > On Fri, Nov 6, 2020 at 8:42 AM Alex Williamson > wrote: >> >> On Fri, 6 Nov 2020 08:24:26 +0530 >> Vikas Gupta wrote: >> >>> Hi Alex, >>> >>> On Thu, Nov 5, 2020 at 12:38 PM Alex Williamson >>> wrote: On Thu, 5 Nov

Re: [RFC, v0 1/3] vfio/platform: add support for msi

2020-11-09 Thread Auger Eric
Hi Vikas, On 11/6/20 3:54 AM, Vikas Gupta wrote: > Hi Alex, > > On Thu, Nov 5, 2020 at 12:38 PM Alex Williamson > wrote: >> >> On Thu, 5 Nov 2020 11:32:55 +0530 >> Vikas Gupta wrote: >> >>> diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h >>> index 2f313a238a8f..aab051e8338d

Re: [PATCH v10 01/11] vfio: VFIO_IOMMU_SET_PASID_TABLE

2020-10-27 Thread Auger Eric
Hi Shameer, On 10/27/20 1:20 PM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >> -Original Message- >> From: iommu [mailto:iommu-boun...@lists.linux-foundation.org] On Behalf Of >> Auger Eric >> Sent: 23 September 2020 12:47 >> To: yuzengh

Re: [PATCH v6 10/10] vfio/fsl-mc: Add support for device reset

2020-10-10 Thread Auger Eric
-by: Diana Craciun Reviewed-by: Eric Auger Eric > --- > drivers/vfio/fsl-mc/vfio_fsl_mc.c | 18 +- > 1 file changed, 17 insertions(+), 1 deletion(-) > > diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c > b/drivers/vfio/fsl-mc/vfio_fsl_mc.c > index d95568cd80

Re: [PATCH v6 01/10] vfio/fsl-mc: Add VFIO framework skeleton for fsl-mc devices

2020-10-10 Thread Auger Eric
Hi Diana, On 10/5/20 7:36 PM, Diana Craciun wrote: > From: Bharat Bhushan > > DPAA2 (Data Path Acceleration Architecture) consists in > mechanisms for processing Ethernet packets, queue management, > accelerators, etc. > > The Management Complex (mc) is a hardware entity that manages the DPAA2

Re: [PATCH v6 02/10] vfio/fsl-mc: Scan DPRC objects on vfio-fsl-mc driver bind

2020-10-10 Thread Auger Eric
Hi Diana, On 10/5/20 7:36 PM, Diana Craciun wrote: > The DPRC (Data Path Resource Container) device is a bus device and has > child devices attached to it. When the vfio-fsl-mc driver is probed > the DPRC is scanned and the child devices discovered and initialized. > > Signed-off-by: Bharat

  1   2   3   4   5   6   7   8   9   10   >