Re: [PATCH v2 13/40] vfio: Add support for Shared Virtual Addressing

2018-09-03 Thread Xu Zaibo
On 2018/9/3 18:34, Jean-Philippe Brucker wrote: On 01/09/18 03:23, Xu Zaibo wrote: As one application takes a whole function while using VFIO-PCI, why do the application and the function need to enable PASID capability? (Since just one I/O page table is enough for them.) At the moment the se

Re: [PATCH 2/5 V6] x86/ioremap: strengthen the logic in early_memremap_pgprot_adjust() to adjust encryption mask

2018-09-03 Thread Dave Young
On 09/04/18 at 09:29am, Dave Young wrote: > On 09/04/18 at 08:44am, Dave Young wrote: > > On 09/03/18 at 10:06pm, lijiang wrote: > > > 在 2018年09月03日 10:45, Dave Young 写道: > > > > On 08/31/18 at 04:19pm, Lianbo Jiang wrote: > > > >> For kdump kernel, when SME is enabled, the acpi table and dmi table

Re: [PATCH 2/5 V6] x86/ioremap: strengthen the logic in early_memremap_pgprot_adjust() to adjust encryption mask

2018-09-03 Thread lijiang
在 2018年09月04日 08:44, Dave Young 写道: > On 09/03/18 at 10:06pm, lijiang wrote: >> 在 2018年09月03日 10:45, Dave Young 写道: >>> On 08/31/18 at 04:19pm, Lianbo Jiang wrote: For kdump kernel, when SME is enabled, the acpi table and dmi table will need to be remapped without the memory encrypt

Re: [PATCH 2/5 V6] x86/ioremap: strengthen the logic in early_memremap_pgprot_adjust() to adjust encryption mask

2018-09-03 Thread Dave Young
On 09/04/18 at 08:44am, Dave Young wrote: > On 09/03/18 at 10:06pm, lijiang wrote: > > 在 2018年09月03日 10:45, Dave Young 写道: > > > On 08/31/18 at 04:19pm, Lianbo Jiang wrote: > > >> For kdump kernel, when SME is enabled, the acpi table and dmi table will > > >> need > > >> to be remapped without the

Re: [PATCH 2/5 V6] x86/ioremap: strengthen the logic in early_memremap_pgprot_adjust() to adjust encryption mask

2018-09-03 Thread Dave Young
On 09/03/18 at 10:06pm, lijiang wrote: > 在 2018年09月03日 10:45, Dave Young 写道: > > On 08/31/18 at 04:19pm, Lianbo Jiang wrote: > >> For kdump kernel, when SME is enabled, the acpi table and dmi table will > >> need > >> to be remapped without the memory encryption mask. So we have to strengthen > >>

Re: [PATCH 2/5 V6] x86/ioremap: strengthen the logic in early_memremap_pgprot_adjust() to adjust encryption mask

2018-09-03 Thread lijiang
在 2018年09月03日 10:45, Dave Young 写道: > On 08/31/18 at 04:19pm, Lianbo Jiang wrote: >> For kdump kernel, when SME is enabled, the acpi table and dmi table will need >> to be remapped without the memory encryption mask. So we have to strengthen >> the logic in early_memremap_pgprot_adjust(), which mak

Re: [RFC 02/13] iommu: Introduce tlb_invalidate API

2018-09-03 Thread Jean-Philippe Brucker
On 03/09/2018 13:41, Auger Eric wrote: > Also what about CMD_CFI_CD(_ALL) propagation. Is it an > IOMMU_INV_TYPE_PASID invalidation? Yes, INV_TYPE_PASID corresponds to the config invalidation. CMD_CFGI_CD is granule INV_GRANU_PASID_SEL and CMD_CFGI_CD_ALL is granule INV_GRANU_ALL_PASID Thanks, Je

Re: [PATCH 1/1] iommu/vt-d: Handle memory shortage on pasid table allocation

2018-09-03 Thread Mika Westerberg
On Sat, Sep 01, 2018 at 02:24:16PM +0800, Lu Baolu wrote: > Pasid table memory allocation could return failure due to memory > shortage. Limit the pasid table size to 1MiB because current 8MiB > contiguous physical memory allocation can be hard to come by. W/o > a PASID table, the device could cont

Re: [RFC 09/13] iommu/smmuv3: Get prepared for nested stage support

2018-09-03 Thread Auger Eric
Hi Jean-Philippe, On 09/03/2018 02:29 PM, Jean-Philippe Brucker wrote: > On 31/08/2018 15:11, Auger Eric wrote: >> Yep this works with my setup but I was waiting for such kind of comments >> to turn this prototype into something more "production level" ;-) Did >> you send anything upstream, relate

Re: [RFC 02/13] iommu: Introduce tlb_invalidate API

2018-09-03 Thread Auger Eric
Hi Jean-Philippe, On 09/03/2018 02:28 PM, Jean-Philippe Brucker wrote: > On 31/08/2018 15:07, Auger Eric wrote: >>> Since the ioctl will be used to combine invalidations (invalidate both >>> ATC and TLB with a single call), we need an additional ASID field for >>> the SMMU - ATC is invalidated by P

Re: [RFC 09/13] iommu/smmuv3: Get prepared for nested stage support

2018-09-03 Thread Jean-Philippe Brucker
On 31/08/2018 15:11, Auger Eric wrote: > Yep this works with my setup but I was waiting for such kind of comments > to turn this prototype into something more "production level" ;-) Did > you send anything upstream, related to this branch? No I didn't have time to clean it up yet, and don't know w

Re: [RFC 02/13] iommu: Introduce tlb_invalidate API

2018-09-03 Thread Jean-Philippe Brucker
On 31/08/2018 15:07, Auger Eric wrote: >> Since the ioctl will be used to combine invalidations (invalidate both >> ATC and TLB with a single call), we need an additional ASID field for >> the SMMU - ATC is invalidated by PASID, TLB by ASID. I used to call it >> "tag", but I'm leaning towards "arch

Re: [RFC 01/13] iommu: Introduce bind_guest_stage API

2018-09-03 Thread Jean-Philippe Brucker
On 31/08/2018 14:52, Auger Eric wrote: > Do we agree here we can get rid of the struct device * parameter? That's fine by me, in my opinion the bind operation should only be on the domain, like map/unmap. For the invalidation however, I think we need to keep the device as an optional parameter, be

[BUG] [regression] intel_iommu broken for graphics device in Linux 4.19rc1/rc2

2018-09-03 Thread Jordan Glover via iommu
When passing "intel_iommu=on" in boot cmdline there is no display output: DMAR: No ATSR found DMAR: dmar0: Using Queued invalidation DMAR: dmar1: Using Queued invalidation DMAR: Setting RMRR: WARNING: CPU: 3 PID: 1 at mm/page_alloc.c:4066 __alloc_pages_nodemask+0xe30/0xf80 Modules linked in: CPU:

Re: [PATCH v2 13/40] vfio: Add support for Shared Virtual Addressing

2018-09-03 Thread Jean-Philippe Brucker
On 01/09/18 03:23, Xu Zaibo wrote: > As one application takes a whole function while using VFIO-PCI, why do > the application and the > function need to enable PASID capability? (Since just one I/O page table > is enough for them.) At the moment the series doesn't provide support for SVA without