* Re: [PATCH v13 4/6] iommu/s390: Disable deferred flush for ISM devices [not found] ` <20230928-dma_iommu-v13-4-9e5fc4dacc36@linux.ibm.com> @ 2023-09-29 12:56 ` Matthew Rosato 0 siblings, 0 replies; 3+ messages in thread From: Matthew Rosato @ 2023-09-29 12:56 UTC (permalink / raw) To: Niklas Schnelle, Joerg Roedel, Will Deacon, Wenjia Zhang, Robin Murphy, Jason Gunthorpe Cc: Gerd Bayer, Julian Ruess, Pierre Morel, Alexandra Winter, Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Christian Borntraeger, Sven Schnelle, Suravee Suthikulpanit, Hector Martin, Sven Peter, Alyssa Rosenzweig, David Woodhouse, Lu Baolu, Andy Gross, Bjorn Andersson, Konrad Dybcio, Yong Wu, Matthias Brugger, AngeloGioacchino Del Regno, Gerald Schaefer, Orson Zhai, Baolin Wang, Chunyan Zhang, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Thierry Reding, Krishna Reddy, Jonathan Hunter, Jonathan Corbet, linux-s390, netdev, linux-kernel, iommu, asahi, linux-arm-kernel, linux-arm-msm, linux-mediatek, linux-sunxi, linux-tegra, linux-doc On 9/28/23 10:31 AM, Niklas Schnelle wrote: > ISM devices are virtual PCI devices used for cross-LPAR communication. > Unlike real PCI devices ISM devices do not use the hardware IOMMU but > inspects IOMMU translation tables directly on IOTLB flush (s390 RPCIT > instruction). > > ISM devices keep their DMA allocations static and only very rarely DMA > unmap at all. For each IOTLB flush that occurs after unmap the ISM > devices will however inspect the area of the IOVA space indicated by the > flush. This means that for the global IOTLB flushes used by the flush > queue mechanism the entire IOVA space would be inspected. In principle > this would be fine, albeit potentially unnecessarily slow, it turns out > however that ISM devices are sensitive to seeing IOVA addresses that are > currently in use in the IOVA range being flushed. Seeing such in-use > IOVA addresses will cause the ISM device to enter an error state and > become unusable. > > Fix this by claiming IOMMU_CAP_DEFERRED_FLUSH only for non-ISM devices. > This makes sure IOTLB flushes only cover IOVAs that have been unmapped > and also restricts the range of the IOTLB flush potentially reducing > latency spikes. > > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Looks like my review tag from v12 got dropped on accident -- no changes since prior version and still looks good to me so Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v13 0/6] iommu/dma: s390 DMA API conversion and optimized IOTLB flushing [not found] <20230928-dma_iommu-v13-0-9e5fc4dacc36@linux.ibm.com> [not found] ` <20230928-dma_iommu-v13-4-9e5fc4dacc36@linux.ibm.com> @ 2023-10-02 6:59 ` Joerg Roedel 2023-10-04 8:54 ` Niklas Schnelle 1 sibling, 1 reply; 3+ messages in thread From: Joerg Roedel @ 2023-10-02 6:59 UTC (permalink / raw) To: Niklas Schnelle Cc: Matthew Rosato, Will Deacon, Wenjia Zhang, Robin Murphy, Jason Gunthorpe, Gerd Bayer, Julian Ruess, Pierre Morel, Alexandra Winter, Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Christian Borntraeger, Sven Schnelle, Suravee Suthikulpanit, Hector Martin, Sven Peter, Alyssa Rosenzweig, David Woodhouse, Lu Baolu, Andy Gross, Bjorn Andersson, Konrad Dybcio, Yong Wu, Matthias Brugger, AngeloGioacchino Del Regno, Gerald Schaefer, Orson Zhai, Baolin Wang, Chunyan Zhang, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Thierry Reding, Krishna Reddy, Jonathan Hunter, Jonathan Corbet, linux-s390, netdev, linux-kernel, iommu, asahi, linux-arm-kernel, linux-arm-msm, linux-mediatek, linux-sunxi, linux-tegra, linux-doc On Thu, Sep 28, 2023 at 04:31:34PM +0200, Niklas Schnelle wrote: > Niklas Schnelle (6): > iommu: Allow .iotlb_sync_map to fail and handle s390's -ENOMEM return > s390/pci: prepare is_passed_through() for dma-iommu > s390/pci: Use dma-iommu layer > iommu/s390: Disable deferred flush for ISM devices > iommu/dma: Allow a single FQ in addition to per-CPU FQs > iommu/dma: Use a large flush queue and timeout for shadow_on_flush Applied, thanks Niklas. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v13 0/6] iommu/dma: s390 DMA API conversion and optimized IOTLB flushing 2023-10-02 6:59 ` [PATCH v13 0/6] iommu/dma: s390 DMA API conversion and optimized IOTLB flushing Joerg Roedel @ 2023-10-04 8:54 ` Niklas Schnelle 0 siblings, 0 replies; 3+ messages in thread From: Niklas Schnelle @ 2023-10-04 8:54 UTC (permalink / raw) To: Joerg Roedel Cc: Matthew Rosato, Will Deacon, Wenjia Zhang, Robin Murphy, Jason Gunthorpe, Gerd Bayer, Julian Ruess, Pierre Morel, Alexandra Winter, Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Christian Borntraeger, Sven Schnelle, Suravee Suthikulpanit, Hector Martin, Sven Peter, Alyssa Rosenzweig, David Woodhouse, Lu Baolu, Andy Gross, Bjorn Andersson, Konrad Dybcio, Yong Wu, Matthias Brugger, AngeloGioacchino Del Regno, Gerald Schaefer, Orson Zhai, Baolin Wang, Chunyan Zhang, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Thierry Reding, Krishna Reddy, Jonathan Hunter, Jonathan Corbet, linux-s390, netdev, linux-kernel, iommu, asahi, linux-arm-kernel, linux-arm-msm, linux-mediatek, linux-sunxi, linux-tegra, linux-doc On Mon, 2023-10-02 at 08:59 +0200, Joerg Roedel wrote: > On Thu, Sep 28, 2023 at 04:31:34PM +0200, Niklas Schnelle wrote: > > Niklas Schnelle (6): > > iommu: Allow .iotlb_sync_map to fail and handle s390's -ENOMEM return > > s390/pci: prepare is_passed_through() for dma-iommu > > s390/pci: Use dma-iommu layer > > iommu/s390: Disable deferred flush for ISM devices > > iommu/dma: Allow a single FQ in addition to per-CPU FQs > > iommu/dma: Use a large flush queue and timeout for shadow_on_flush > > Applied, thanks Niklas. > Thank you Joerg. During some more testing I've found a minor issue where resetting the debug statistics still used the now obsolete counters that should have been removed. So I'll send a follow up patch, sorry for not noticing this sooner. Thanks, Niklas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-04 8:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230928-dma_iommu-v13-0-9e5fc4dacc36@linux.ibm.com>
[not found] ` <20230928-dma_iommu-v13-4-9e5fc4dacc36@linux.ibm.com>
2023-09-29 12:56 ` [PATCH v13 4/6] iommu/s390: Disable deferred flush for ISM devices Matthew Rosato
2023-10-02 6:59 ` [PATCH v13 0/6] iommu/dma: s390 DMA API conversion and optimized IOTLB flushing Joerg Roedel
2023-10-04 8:54 ` Niklas Schnelle
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).