Re: [PATCH v14 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-06-23 Thread Claire Chang
On Thu, Jun 24, 2021 at 1:43 PM Christoph Hellwig wrote: > > On Wed, Jun 23, 2021 at 02:44:34PM -0400, Qian Cai wrote: > > is_swiotlb_force_bounce at /usr/src/linux-next/./include/linux/swiotlb.h:119 > > > > is_swiotlb_force_bounce() was the new function introduced in this patch > > here. > > > >

RE: Plan for /dev/ioasid RFC v2

2021-06-23 Thread Tian, Kevin
> From: David Gibson > Sent: Thursday, June 24, 2021 12:26 PM > > On Fri, Jun 18, 2021 at 04:57:40PM +, Tian, Kevin wrote: > > > From: Jason Gunthorpe > > > Sent: Friday, June 18, 2021 8:20 AM > > > > > > On Thu, Jun 17, 2021 at 03:14:52PM -0600, Alex Williamson wrote: > > > > > > > I've refe

Re: [PATCH v14 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-06-23 Thread Christoph Hellwig
On Wed, Jun 23, 2021 at 02:44:34PM -0400, Qian Cai wrote: > is_swiotlb_force_bounce at /usr/src/linux-next/./include/linux/swiotlb.h:119 > > is_swiotlb_force_bounce() was the new function introduced in this patch here. > > +static inline bool is_swiotlb_force_bounce(struct device *dev) > +{ > +

Re: Plan for /dev/ioasid RFC v2

2021-06-23 Thread David Gibson
On Tue, Jun 15, 2021 at 01:21:35AM +, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Monday, June 14, 2021 9:38 PM > > > > On Mon, Jun 14, 2021 at 03:09:31AM +, Tian, Kevin wrote: > > > > > If a device can be always blocked from accessing memory in the IOMMU > > > before it's bou

Re: Plan for /dev/ioasid RFC v2

2021-06-23 Thread David Gibson
On Thu, Jun 17, 2021 at 08:04:38PM -0300, Jason Gunthorpe wrote: > On Thu, Jun 17, 2021 at 03:02:33PM +1000, David Gibson wrote: > > > In other words, do we really have use cases where we need to identify > > different devices IDs, even though we know they're not isolated. > > I think when PASID

Re: Plan for /dev/ioasid RFC v2

2021-06-23 Thread David Gibson
On Fri, Jun 18, 2021 at 04:57:40PM +, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Friday, June 18, 2021 8:20 AM > > > > On Thu, Jun 17, 2021 at 03:14:52PM -0600, Alex Williamson wrote: > > > > > I've referred to this as a limitation of type1, that we can't put > > > devices within

Re: Plan for /dev/ioasid RFC v2

2021-06-23 Thread David Gibson
On Fri, Jun 18, 2021 at 12:15:06PM -0300, Jason Gunthorpe wrote: > On Fri, Jun 18, 2021 at 03:47:51PM +0200, Joerg Roedel wrote: > > Hi Kevin, > > > > On Thu, Jun 17, 2021 at 07:31:03AM +, Tian, Kevin wrote: > > > Now let's talk about the new IOMMU behavior: > > > > > > - A device is blocke

Re: Plan for /dev/ioasid RFC v2

2021-06-23 Thread David Gibson
On Thu, Jun 17, 2021 at 03:14:52PM -0600, Alex Williamson wrote: > On Thu, 17 Jun 2021 07:31:03 + > "Tian, Kevin" wrote: > > > From: Alex Williamson > > > Sent: Thursday, June 17, 2021 3:40 AM > > > On Wed, 16 Jun 2021 06:43:23 + > > > "Tian, Kevin" wrote: > > > > > From: Alex Williamson

Re: Plan for /dev/ioasid RFC v2

2021-06-23 Thread David Gibson
On Fri, Jun 18, 2021 at 01:21:47PM +0800, Lu Baolu wrote: > Hi David, > > On 6/17/21 1:22 PM, David Gibson wrote: > > > The iommu_group can guarantee the isolation among different physical > > > devices (represented by RIDs). But when it comes to sub-devices (ex. mdev > > > or > > > vDPA devices

Re: [RFC] /dev/ioasid uAPI proposal

2021-06-23 Thread David Gibson
On Wed, Jun 23, 2021 at 07:59:21AM +, Tian, Kevin wrote: > > From: David Gibson > > Sent: Thursday, June 17, 2021 11:48 AM > > > > On Tue, Jun 08, 2021 at 10:17:56AM -0300, Jason Gunthorpe wrote: > > > On Tue, Jun 08, 2021 at 12:37:04PM +1000, David Gibson wrote: > > > > > > > > The PPC/SPAPR

Re: [RFC] /dev/ioasid uAPI proposal

2021-06-23 Thread David Gibson
On Fri, Jun 18, 2021 at 07:03:31PM +0200, Jean-Philippe Brucker wrote: > On Thu, Jun 17, 2021 at 01:00:14PM +1000, David Gibson wrote: > > On Thu, Jun 10, 2021 at 06:37:31PM +0200, Jean-Philippe Brucker wrote: > > > On Tue, Jun 08, 2021 at 04:31:50PM +1000, David Gibson wrote: > > > > For the qemu

Re: Plan for /dev/ioasid RFC v2

2021-06-23 Thread David Gibson
On Thu, Jun 17, 2021 at 08:10:04PM -0300, Jason Gunthorpe wrote: > On Thu, Jun 17, 2021 at 02:45:46PM +1000, David Gibson wrote: > > On Wed, Jun 09, 2021 at 09:39:19AM -0300, Jason Gunthorpe wrote: > > > On Wed, Jun 09, 2021 at 02:24:03PM +0200, Joerg Roedel wrote: > > > > On Mon, Jun 07, 2021 at 0

Re: [RFC] /dev/ioasid uAPI proposal

2021-06-23 Thread David Gibson
On Wed, Jun 23, 2021 at 08:00:49AM +, Tian, Kevin wrote: > > From: David Gibson > > Sent: Thursday, June 17, 2021 12:08 PM > > > > On Thu, Jun 03, 2021 at 08:12:27AM +, Tian, Kevin wrote: > > > > From: David Gibson > > > > Sent: Wednesday, June 2, 2021 2:15 PM > > > > > > > [...] > > > >

Re: Re: [PATCH v8 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-06-23 Thread Yongji Xie
On Thu, Jun 24, 2021 at 11:35 AM Jason Wang wrote: > > > 在 2021/6/23 下午1:50, Yongji Xie 写道: > > On Wed, Jun 23, 2021 at 11:31 AM Jason Wang wrote: > >> > >> 在 2021/6/22 下午4:14, Yongji Xie 写道: > >>> On Tue, Jun 22, 2021 at 3:50 PM Jason Wang wrote: > 在 2021/6/22 下午3:22, Yongji Xie 写道: >

Re: [PATCH v8 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-06-23 Thread Jason Wang
在 2021/6/23 下午1:50, Yongji Xie 写道: On Wed, Jun 23, 2021 at 11:31 AM Jason Wang wrote: 在 2021/6/22 下午4:14, Yongji Xie 写道: On Tue, Jun 22, 2021 at 3:50 PM Jason Wang wrote: 在 2021/6/22 下午3:22, Yongji Xie 写道: We need fix a way to propagate the error to the userspace. E.g if we want to stop

Re: Bug#989778: Regression in at least 5.10.y and mainline: Firewire audio interface fails to work properly (when booted under Xen)

2021-06-23 Thread Salvatore Bonaccorso
Hi Robin, On Mon, Jun 14, 2021 at 02:29:08PM +0100, Robin Murphy wrote: > On 2021-06-13 07:29, Salvatore Bonaccorso wrote: > > A user in Debian reported the above issue, which was reproducible with > > 5.13-rc5 and 5.10.y as packaged in Debian and found that 85a5a6875ca9 > > ("swiotlb: don't modif

Re: [PATCH v14 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-06-23 Thread Qian Cai
On 6/23/2021 2:37 PM, Will Deacon wrote: > On Wed, Jun 23, 2021 at 12:39:29PM -0400, Qian Cai wrote: >> >> >> On 6/18/2021 11:40 PM, Claire Chang wrote: >>> Propagate the swiotlb_force into io_tlb_default_mem->force_bounce and >>> use it to determine whether to bounce the data or not. This will

Re: [PATCH v14 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-06-23 Thread Will Deacon
On Wed, Jun 23, 2021 at 12:39:29PM -0400, Qian Cai wrote: > > > On 6/18/2021 11:40 PM, Claire Chang wrote: > > Propagate the swiotlb_force into io_tlb_default_mem->force_bounce and > > use it to determine whether to bounce the data or not. This will be > > useful later to allow for different pool

Re: [PATCH 0/6] iommu: Enable devices to request non-strict DMA, starting with QCom SD/MMC

2021-06-23 Thread Doug Anderson
Hi, On Tue, Jun 22, 2021 at 3:10 PM Robin Murphy wrote: > > On 2021-06-22 17:06, Doug Anderson wrote: > > Hi, > > > > On Tue, Jun 22, 2021 at 4:35 AM Robin Murphy wrote: > >> > >> Hi Doug, > >> > >> On 2021-06-22 00:52, Douglas Anderson wrote: > >>> > >>> This patch attempts to put forward a pro

Re: [PATCH v14 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-06-23 Thread Qian Cai
re_class [ 22.362512][ T256] igb 0006:01:00.0: eth0: PBA No: G69016-004 [ 22.372287][T7] CPU: 13 PID: 7 Comm: kworker/u64:0 Not tainted 5.13.0-rc7-next-20210623+ #47 [ 22.372293][T7] Hardware name: MiTAC RAPTOR EV-883832-X3-0001/RAPTOR, BIOS 1.6 06/28/2020 [ 22.372298][T7] Workq

Re: [PATCH 0/6] iommu: Enable devices to request non-strict DMA, starting with QCom SD/MMC

2021-06-23 Thread Rob Herring
On Tue, Jun 22, 2021 at 2:10 PM Doug Anderson wrote: > > Hi, > > On Tue, Jun 22, 2021 at 1:06 PM Saravana Kannan wrote: > > > > On Tue, Jun 22, 2021 at 1:02 PM Rob Herring wrote: > > > > > > On Tue, Jun 22, 2021 at 09:06:02AM -0700, Doug Anderson wrote: > > > > Hi, > > > > > > > > On Tue, Jun 22

Re: [PATCHv2 1/3] iommu/io-pgtable: Add a quirk to use tlb_flush_all() for partial walk flush

2021-06-23 Thread Sai Prakash Ranjan
Hi Robin, On 2021-06-23 00:07, Robin Murphy wrote: On 2021-06-22 15:27, Sai Prakash Ranjan wrote: Hi Robin, On 2021-06-22 17:41, Robin Murphy wrote: On 2021-06-22 08:11, Sai Prakash Ranjan wrote: Hi Robin, On 2021-06-21 21:15, Robin Murphy wrote: On 2021-06-18 03:51, Sai Prakash Ranjan wro

[PATCHv3] iommu/arm-smmu: Optimize ->tlb_flush_walk() for qcom implementation

2021-06-23 Thread Sai Prakash Ranjan
Currently for iommu_unmap() of large scatter-gather list with page size elements, the majority of time is spent in flushing of partial walks in __arm_lpae_unmap() which is a VA based TLB invalidation invalidating page-by-page on iommus like arm-smmu-v2 (TLBIVA). For example: to unmap a 32MB scatte

Re: [PATCH v14 00/12] Restricted DMA

2021-06-23 Thread Claire Chang
On Wed, Jun 23, 2021 at 4:38 PM Konrad Rzeszutek Wilk wrote: > > On Sat, Jun 19, 2021 at 11:40:31AM +0800, Claire Chang wrote: > > This series implements mitigations for lack of DMA access control on > > systems without an IOMMU, which could result in the DMA accessing the > > system memory at une

Re: [PATCH v14 00/12] Restricted DMA

2021-06-23 Thread Konrad Rzeszutek Wilk
On Sat, Jun 19, 2021 at 11:40:31AM +0800, Claire Chang wrote: > This series implements mitigations for lack of DMA access control on > systems without an IOMMU, which could result in the DMA accessing the > system memory at unexpected times and/or unexpected addresses, possibly > leading to data le

RE: [RFC] /dev/ioasid uAPI proposal

2021-06-23 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Saturday, June 19, 2021 2:31 AM > > On Fri, Jun 18, 2021 at 07:03:31PM +0200, Jean-Philippe Brucker wrote: > > > configuration. The Arm SMMUs have a lot of small features that > > implementations can mix and match and that a user shouldn't have to care > > about,

RE: [RFC] /dev/ioasid uAPI proposal

2021-06-23 Thread Tian, Kevin
> From: David Gibson > Sent: Thursday, June 17, 2021 12:08 PM > > On Thu, Jun 03, 2021 at 08:12:27AM +, Tian, Kevin wrote: > > > From: David Gibson > > > Sent: Wednesday, June 2, 2021 2:15 PM > > > > > [...] > > > > > > > > > > /* > > > > * Get information about an I/O address space > > > >

RE: [RFC] /dev/ioasid uAPI proposal

2021-06-23 Thread Tian, Kevin
> From: David Gibson > Sent: Thursday, June 17, 2021 11:48 AM > > On Tue, Jun 08, 2021 at 10:17:56AM -0300, Jason Gunthorpe wrote: > > On Tue, Jun 08, 2021 at 12:37:04PM +1000, David Gibson wrote: > > > > > > The PPC/SPAPR support allows KVM to associate a vfio group to an > IOMMU > > > > page ta

RE: [RFC] /dev/ioasid uAPI proposal

2021-06-23 Thread Tian, Kevin
> From: Jean-Philippe Brucker > Sent: Saturday, June 19, 2021 1:04 AM > > On Thu, Jun 17, 2021 at 01:00:14PM +1000, David Gibson wrote: > > On Thu, Jun 10, 2021 at 06:37:31PM +0200, Jean-Philippe Brucker wrote: > > > On Tue, Jun 08, 2021 at 04:31:50PM +1000, David Gibson wrote: > > > > For the qem

Re: [PATCH v14 6/6] iommu: Remove mode argument from iommu_set_dma_strict()

2021-06-23 Thread Lu Baolu
On 6/23/21 6:25 AM, Robin Murphy wrote: On 2021-06-21 15:32, Lu Baolu wrote: Hi Robin, On 2021/6/21 19:59, Robin Murphy wrote: On 2021-06-21 11:34, John Garry wrote: On 21/06/2021 11:00, Lu Baolu wrote: void iommu_set_dma_strict(bool force) {   if (force == true) iommu_dma_s