RE: [RFC] /dev/ioasid uAPI proposal

2021-06-08 Thread Parav Pandit
Hi Jaocb, Sorry for the late response. Was on PTO on Friday last week. Please see comments below. > From: Jacob Pan > Sent: Friday, June 4, 2021 2:28 AM > > Hi Parav, > > On Tue, 1 Jun 2021 17:30:51 +, Parav Pandit wrote: > > > > From: Tian, Kevin > &

RE: [RFC] /dev/ioasid uAPI proposal

2021-06-02 Thread Parav Pandit
> From: Enrico Weigelt, metux IT consult > Sent: Wednesday, June 2, 2021 2:09 PM > > On 31.05.21 19:37, Parav Pandit wrote: > > > It appears that this is only to make map ioctl faster apart from accounting. > > It doesn't have any ioasid handle input either

RE: [RFC] /dev/ioasid uAPI proposal

2021-06-01 Thread Parav Pandit
> From: Tian, Kevin > Sent: Thursday, May 27, 2021 1:28 PM > 5.6. I/O page fault > +++ > > (uAPI is TBD. Here is just about the high-level flow from host IOMMU driver > to guest IOMMU driver and backwards). > > - Host IOMMU driver receives a page request with raw fault_data {rid,

RE: [RFC] /dev/ioasid uAPI proposal

2021-06-01 Thread Parav Pandit
> From: Jason Gunthorpe > Sent: Monday, May 31, 2021 11:43 PM > > On Mon, May 31, 2021 at 05:37:35PM +, Parav Pandit wrote: > > > In that case, can it be a new system call? Why does it have to be under > /dev/ioasid? > > For example few years back s

RE: [RFC] /dev/ioasid uAPI proposal

2021-05-31 Thread Parav Pandit
> From: Tian, Kevin > Sent: Thursday, May 27, 2021 1:28 PM > /dev/ioasid provides an unified interface for managing I/O page tables for > devices assigned to userspace. Device passthrough frameworks (VFIO, vDPA, > etc.) are expected to use this interface instead of creating their own logic >

[PATCH 3/5] iommu/intel: Remove unnecessary braces

2021-05-30 Thread Parav Pandit
No need for braces for single line statement under if() block. Signed-off-by: Parav Pandit --- drivers/iommu/intel/iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 51be77c48108..6788d10d0ff6 100644

[PATCH 1/5] iommu/intel: Use bitfields for DMAR capabilities

2021-05-30 Thread Parav Pandit
, cachelines: 51, members: 18 */ /* sum members: 3236, holes: 3, sum holes: 11 */ /* sum bitfield members: 3 bits, bit holes: 1, sum bit holes: 5 bits */ /* forced alignments: 1 */ /* last cacheline: 48 bytes */ } __attribute__((__aligned__(8))); Signed-off-by: Parav

[PATCH 4/5] iommu/intel: Define counter explicitly as unsigned int

2021-05-30 Thread Parav Pandit
Avoid below checkpatch warning. WARNING: Prefer 'unsigned int' to bare use of 'unsigned' + unsignediommu_refcnt[DMAR_UNITS_SUPPORTED]; Fixes: 29a27719abaa ("iommu/vt-d: Replace iommu_bmp with a refcount") Signed-off-by: Parav Pandit --- include/linux/intel-iommu.h | 2

[PATCH 5/5] iommu/intel: No need to typecast

2021-05-30 Thread Parav Pandit
Page directory assignment by alloc_pgtable_page() or phys_to_virt() doesn't need typecasting as both routines return void*. Hence, remove typecasting from both the calls. Signed-off-by: Parav Pandit --- drivers/iommu/intel/iommu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

[PATCH 0/5] Short cleanups around DMAR

2021-05-30 Thread Parav Pandit
removes unnecessary typecasting Parav Pandit (5): iommu/intel: Use bitfields for DMAR capabilities iommu/intel: Removed unused iommu_count in dmar domain iommu/intel: Remove unnecessary braces iommu/intel: Define counter explicitly as unsigned int iommu/intel: No need to typecast drivers

[PATCH 2/5] iommu/intel: Removed unused iommu_count in dmar domain

2021-05-30 Thread Parav Pandit
-by: Parav Pandit --- drivers/iommu/intel/iommu.c | 11 +++ include/linux/intel-iommu.h | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index cdbf4513df9d..51be77c48108 100644 --- a/drivers/iommu/intel/iommu.c

RE: WARNING in dma_map_page_attrs

2020-10-30 Thread Parav Pandit
> From: h...@lst.de > Sent: Wednesday, October 28, 2020 11:01 PM > > On Tue, Oct 27, 2020 at 12:52:30PM +, Parav Pandit wrote: > > > > > From: h...@lst.de > > > Sent: Tuesday, October 27, 2020 1:41 PM > > > > > > On Mon, Oct 26, 20

RE: WARNING in dma_map_page_attrs

2020-10-27 Thread Parav Pandit
> From: h...@lst.de > Sent: Tuesday, October 27, 2020 1:41 PM > > On Mon, Oct 26, 2020 at 05:23:48AM +, Parav Pandit wrote: > > Hi Christoph, > > > > > From: Jakub Kicinski > > > Sent: Saturday, October 24, 2020 11:45 PM > > > &

RE: WARNING in dma_map_page_attrs

2020-10-26 Thread Parav Pandit
Hi Christoph, > From: Jakub Kicinski > Sent: Saturday, October 24, 2020 11:45 PM > > CC: rdma, looks like rdma from the stack trace > > On Fri, 23 Oct 2020 20:07:17 -0700 syzbot wrote: > > syzbot has found a reproducer for the following issue on: > > > > HEAD commit:3cb12d27 Merge tag

RE: [PATCH v8 7/9] vfio/mdev: Add iommu related member in mdev_device

2019-03-27 Thread Parav Pandit
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org ow...@vger.kernel.org> On Behalf Of Kirti Wankhede > Sent: Tuesday, March 26, 2019 4:33 AM > To: Lu Baolu ; Joerg Roedel ; > David Woodhouse ; Alex Williamson > > Cc: ashok@intel.com; sanjay.k.ku...@intel.com; >