Re: [PATCH 1/1] iommu/vt-d: Leave scalable mode default off

2019-01-24 Thread Lu Baolu
Hi Joerg, On 1/24/19 9:22 PM, Joerg Roedel wrote: On Thu, Jan 24, 2019 at 10:31:32AM +0800, Lu Baolu wrote: Commit 765b6a98c1de3 ("iommu/vt-d: Enumerate the scalable mode capability") enables VT-d scalable mode if hardware advertises the capability. As we will bring up different features and

Re: [PATCH] dcdbas: Fix Intel-IOMMU domain allocation failure

2019-01-24 Thread Szabolcs Fruhwald via iommu
Hi Andy, I took a quick look at arch_setup_pdev_archdata(), overridden it in dcdbas.c and it works well (despite it's being called twice, since it's called from platform_device_alloc and platform_device_register). However, as I am not super familiar with ELF weak method references, especially

Re: [PATCH 1/5] iommu/tegra-smmu: Fix domain_alloc

2019-01-24 Thread navneet kumar
Thanks for the feedback, Robin, and, Dmitry. I mostly agree with all your comments, pls see my responses inline. I'll make these fixes in V2. On 1/17/19 8:50 AM, Robin Murphy wrote: > On 17/01/2019 15:13, Dmitry Osipenko wrote: >> 16.01.2019 23:50, Navneet Kumar пишет: >>> * Allocate dma iova

Re: [PATCH] dcdbas: Fix Intel-IOMMU domain allocation failure

2019-01-24 Thread Andy Shevchenko
On Thu, Jan 24, 2019 at 10:31 PM Szabolcs Fruhwald wrote: > > (+iommu list for visibility and confirmation of the intended constant > externalization, see 2nd point below) > Absolutely, I thought so too. But, since the actual need to force > id-mapping comes from the lack of support for non-pci

Re: [PATCH 2/5] iommu/tegra-smmu: Use non-secure register for flushing

2019-01-24 Thread Dmitry Osipenko
24.01.2019 21:29, navneet kumar пишет: > On 1/17/19 7:25 AM, Dmitry Osipenko wrote: >> 16.01.2019 23:50, Navneet Kumar пишет: >>> Use PTB_ASID instead of SMMU_CONFIG to flush smmu. >>> PTB_ASID can be accessed from non-secure mode, SMMU_CONFIG cannot be. >>> Using SMMU_CONFIG could pose a problem

Re: [PATCH] dcdbas: Fix Intel-IOMMU domain allocation failure

2019-01-24 Thread Szabolcs Fruhwald via iommu
(+iommu list for visibility and confirmation of the intended constant externalization, see 2nd point below) Hi Mario, Thanks for your comments, see my answers inline below. On Thu, Jan 24, 2019 at 7:16 AM wrote: > > > -Original Message- > > From:

Re: [PATCH 1/3] PCI: iproc: Add feature to set order mode

2019-01-24 Thread Bjorn Helgaas
On Thu, Jan 24, 2019 at 02:10:18PM +0530, Srinath Mannam wrote: > On Fri, Jan 18, 2019 at 8:37 PM Bjorn Helgaas wrote: > > On Fri, Jan 18, 2019 at 09:53:21AM +0530, Srinath Mannam wrote: > > > Order mode in RX header of incoming pcie packets can be override to > > > strict or loose order based on

Re: [PATCH 2/5] iommu/tegra-smmu: Use non-secure register for flushing

2019-01-24 Thread navneet kumar
On 1/17/19 7:25 AM, Dmitry Osipenko wrote: > 16.01.2019 23:50, Navneet Kumar пишет: >> Use PTB_ASID instead of SMMU_CONFIG to flush smmu. >> PTB_ASID can be accessed from non-secure mode, SMMU_CONFIG cannot be. >> Using SMMU_CONFIG could pose a problem when kernel doesn't have secure >> mode

Re: [PATCH v7 0/7] Add virtio-iommu driver

2019-01-24 Thread Jean-Philippe Brucker
Hi Joerg, On 23/01/2019 08:34, Joerg Roedel wrote: > Hi Jean-Philippe, > > thanks for all your hard work on this! > > On Tue, Jan 15, 2019 at 12:19:52PM +, Jean-Philippe Brucker wrote: >> Implement the virtio-iommu driver, following specification v0.9 [1]. > > To make progress on this I

Re: [PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-24 Thread Joerg Roedel
On Thu, Jan 24, 2019 at 09:41:07AM +0100, Christoph Hellwig wrote: > On Thu, Jan 24, 2019 at 09:29:23AM +0100, Joerg Roedel wrote: > > > As I've just introduced and fixed a bug in this area in the current > > > cycle - I don't think no_iotlb_memory is what your want (and maybe > > > not useful at

Re: [PATCH v3] iommu: amd: Fix IOMMU page flush when detach device from a domain

2019-01-24 Thread j...@8bytes.org
On Thu, Jan 24, 2019 at 02:17:34PM +, Suthikulpanit, Suravee wrote: > On 1/24/19 9:11 PM, j...@8bytes.org wrote: > > On Thu, Jan 24, 2019 at 04:16:45AM +, Suthikulpanit, Suravee wrote: > >> drivers/iommu/amd_iommu.c | 15 +++ > >> 1 file changed, 11 insertions(+), 4

Re: [PATCH v3] iommu: amd: Fix IOMMU page flush when detach device from a domain

2019-01-24 Thread Suthikulpanit, Suravee
Joerg, On 1/24/19 9:11 PM, j...@8bytes.org wrote: > On Thu, Jan 24, 2019 at 04:16:45AM +, Suthikulpanit, Suravee wrote: >> drivers/iommu/amd_iommu.c | 15 +++ >> 1 file changed, 11 insertions(+), 4 deletions(-) > > Applied, thanks Suravee. > Thanks. Also, should this also

Re: [PATCH] iommu/dma: Remove unused variable

2019-01-24 Thread Joerg Roedel
On Thu, Jan 24, 2019 at 03:10:02PM +0800, Shaokun Zhang wrote: > drivers/iommu/dma-iommu.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Applied, thanks. ___ iommu mailing list iommu@lists.linux-foundation.org

Re: [PATCH v3] iommu: amd: Fix IOMMU page flush when detach device from a domain

2019-01-24 Thread j...@8bytes.org
On Thu, Jan 24, 2019 at 04:16:45AM +, Suthikulpanit, Suravee wrote: > drivers/iommu/amd_iommu.c | 15 +++ > 1 file changed, 11 insertions(+), 4 deletions(-) Applied, thanks Suravee. ___ iommu mailing list

Re: [PATCH 1/1] iommu/vt-d: Leave scalable mode default off

2019-01-24 Thread Joerg Roedel
On Thu, Jan 24, 2019 at 10:31:32AM +0800, Lu Baolu wrote: > Commit 765b6a98c1de3 ("iommu/vt-d: Enumerate the scalable > mode capability") enables VT-d scalable mode if hardware > advertises the capability. As we will bring up different > features and use cases to upstream in different patch >

Re: [PATCH v5 2/8] iommu/vt-d: Add per-device IOMMU feature ops entries

2019-01-24 Thread Joerg Roedel
Hi Lu Baolu, On Thu, Jan 24, 2019 at 02:47:39PM +0800, Lu Baolu wrote: > bool iommu_dev_feature_enabled(dev, IOMMU_DEV_FEAT_AUX)? Looks good. Having a function to check for enabled features is certainly a good thing. Regards, Joerg ___ iommu

Re: [PATCH 5/5] virtio-blk: Consider virtio_max_dma_size() for maximum segment size

2019-01-24 Thread Joerg Roedel
On Thu, Jan 24, 2019 at 09:42:21AM +0100, Christoph Hellwig wrote: > Yes. But more importantly it would fix the limit for all other block > drivers that set large segment sizes when running over swiotlb. True, so it would be something like the diff below? I havn't worked on the block layer, so I

Re: [PATCH 1/5] swiotlb: Introduce swiotlb_max_mapping_size()

2019-01-24 Thread Christoph Hellwig
On Thu, Jan 24, 2019 at 09:24:31AM +0100, Joerg Roedel wrote: > On Wed, Jan 23, 2019 at 10:28:13PM +0100, Christoph Hellwig wrote: > > On Wed, Jan 23, 2019 at 05:30:45PM +0100, Joerg Roedel wrote: > > > +extern size_t swiotlb_max_mapping_size(struct device *dev); > > > > No need for the extern

Re: [PATCH 2/3] PCI: iproc: CRS state check in config request

2019-01-24 Thread Srinath Mannam via iommu
Hi Bjorn, Thanks for review, please see my comments below inline. On Fri, Jan 18, 2019 at 8:38 PM Bjorn Helgaas wrote: > > On Fri, Jan 18, 2019 at 09:53:22AM +0530, Srinath Mannam wrote: > > In the current implementation, config read of 0x0001 data > > is assumed as CRS completion. but

Re: [PATCH 5/5] virtio-blk: Consider virtio_max_dma_size() for maximum segment size

2019-01-24 Thread Christoph Hellwig
On Thu, Jan 24, 2019 at 09:40:11AM +0100, Joerg Roedel wrote: > > I wonder if we should just move the dma max segment size check > > into blk_queue_max_segment_size so that all block drivers benefit > > from it. Even if not I think at least the SCSI midlayer should > > be updated to support it. >

Re: [PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-24 Thread Christoph Hellwig
On Thu, Jan 24, 2019 at 09:29:23AM +0100, Joerg Roedel wrote: > > As I've just introduced and fixed a bug in this area in the current > > cycle - I don't think no_iotlb_memory is what your want (and maybe > > not useful at all): if the arch valls swiotlb_exit after previously > > initializing a

Re: [PATCH 1/3] PCI: iproc: Add feature to set order mode

2019-01-24 Thread Srinath Mannam via iommu
Hi Bjorn, Thanks for review, please see my comments below inline. On Fri, Jan 18, 2019 at 8:37 PM Bjorn Helgaas wrote: > > On Fri, Jan 18, 2019 at 09:53:21AM +0530, Srinath Mannam wrote: > > Order mode in RX header of incoming pcie packets can be override to > > strict or loose order based on

Re: [PATCH 5/5] virtio-blk: Consider virtio_max_dma_size() for maximum segment size

2019-01-24 Thread Joerg Roedel
On Wed, Jan 23, 2019 at 10:31:39PM +0100, Christoph Hellwig wrote: > On Wed, Jan 23, 2019 at 05:30:49PM +0100, Joerg Roedel wrote: > > + max_size = virtio_max_dma_size(vdev); > > + > > /* Host can optionally specify maximum segment size and number of > > * segments. */ > > err =

Re: [PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-24 Thread Joerg Roedel
On Wed, Jan 23, 2019 at 10:27:55PM +0100, Christoph Hellwig wrote: > On Wed, Jan 23, 2019 at 05:30:46PM +0100, Joerg Roedel wrote: > > +bool is_swiotlb_active(void) > > +{ > > + return !no_iotlb_memory; > > +} > > As I've just introduced and fixed a bug in this area in the current > cycle - I

Re: [PATCH 1/5] swiotlb: Introduce swiotlb_max_mapping_size()

2019-01-24 Thread Joerg Roedel
On Wed, Jan 23, 2019 at 10:28:13PM +0100, Christoph Hellwig wrote: > On Wed, Jan 23, 2019 at 05:30:45PM +0100, Joerg Roedel wrote: > > +extern size_t swiotlb_max_mapping_size(struct device *dev); > > No need for the extern keyword on function declarations in headers. Right, but all other

Re: [PATCH] iommu/amd: Fix IOMMU page flush when detach all devices from a domain

2019-01-24 Thread j...@8bytes.org
Hi Suravee, On Thu, Jan 24, 2019 at 03:25:19AM +, Suthikulpanit, Suravee wrote: > Actually, I just noticed that device_flush_dte() has already handled flushing > the DTE > for alias device as well. Please see the link below. > >