Re: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-04-26 Thread Tomasz Nowicki
On 26.04.2017 12:08, Jean-Philippe Brucker wrote: On 26/04/17 07:53, Tomasz Nowicki wrote: +mutex_lock(>tasks_lock); +list_for_each_entry(vfio_task, >tasks, list) { +if (vfio_task->pasid != svm.pasid) +continue; + +ret =

Re: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-04-26 Thread Jean-Philippe Brucker
On 26/04/17 07:53, Tomasz Nowicki wrote: >> +mutex_lock(>tasks_lock); >> +list_for_each_entry(vfio_task, >tasks, list) { >> +if (vfio_task->pasid != svm.pasid) >> +continue; >> + >> +ret = iommu_unbind_task(device->dev, svm.pasid, flags); >>

Re: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-04-26 Thread Tomasz Nowicki
Hi Jean, On 27.02.2017 20:54, Jean-Philippe Brucker wrote: Add two new ioctl for VFIO devices. VFIO_DEVICE_BIND_TASK creates a bond between a device and a process address space, identified by a device-specific ID named PASID. This allows the device to target DMA transactions at the process

RE: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-03-29 Thread Liu, Yi L
;ashok@intel.com>; Pan, > Jacob > jun <jacob.jun....@intel.com>; Joerg Roedel <j...@8bytes.org>; Robin Murphy > <robin.mur...@arm.com> > Subject: Re: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory > > On 24/03/17 07:46, Liu, Yi L wrote: > [.

Re: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-03-27 Thread Jean-Philippe Brucker
On 24/03/17 07:46, Liu, Yi L wrote: [...] So we need some kind of high-level classification that the vIOMMU must communicate to the physical one. Each IOMMU flavor would get a unique, global identifier, simply to make sure that vIOMMU and pIOMMU speak >> the same language.

RE: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-03-24 Thread Liu, Yi L
..@intel.com>; Raj, Ashok <ashok@intel.com>; Pan, > Jacob > jun <jacob.jun....@intel.com>; Joerg Roedel <j...@8bytes.org>; Robin Murphy > <robin.mur...@arm.com> > Subject: Re: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory > > On 23/03

RE: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-03-23 Thread Liu, Yi L
Hi Jean, Thx for the excellent ideas. Pls refer to comments inline. [...] > > Hi Jean, > > > > I'm working on virtual SVM, and have some comments on the VFIO channel > > definition. > > Thanks a lot for the comments, this is quite interesting to me. I just have > some > concerns about

Re: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-03-21 Thread jacob pan
On Tue, 21 Mar 2017 19:37:56 + Jean-Philippe Brucker wrote: > > For invalidation, I've following info in in pseudo code. > > struct iommu_svm_tlb_invalidate_info > > { > >__u32 inv_type; > > #define IOTLB_INV (1 << 0) > > #define

Re: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-03-21 Thread Jean-Philippe Brucker
>> linux-...@vger.kernel.org; Bjorn Helgaas <bhelg...@google.com>; David >> Woodhouse <dw...@infradead.org>; linux-arm-ker...@lists.infradead.org; Nate >> Watterson <nwatt...@qti.qualcomm.com> >> Subject: [RFC PATCH 29/30] vfio: Add support for Shared Virtual M

RE: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-03-21 Thread Liu, Yi L
arv Abdulhamid <ha...@qti.qualcomm.com>; > linux-...@vger.kernel.org; Bjorn Helgaas <bhelg...@google.com>; David > Woodhouse <dw...@infradead.org>; linux-arm-ker...@lists.infradead.org; Nate > Watterson <nwatt...@qti.qualcomm.com> > Subject: [RFC PATCH 29/30]

Re: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-02-28 Thread Jean-Philippe Brucker
Hi Alex, Thanks for the feedback! On Mon, Feb 27, 2017 at 08:54:09PM -0700, Alex Williamson wrote: > On Mon, 27 Feb 2017 19:54:40 + > Jean-Philippe Brucker wrote: [...] > > > > +static long vfio_svm_ioctl(struct vfio_device *device, unsigned int cmd, > > +

Re: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-02-27 Thread Alex Williamson
On Mon, 27 Feb 2017 19:54:40 + Jean-Philippe Brucker wrote: > Add two new ioctl for VFIO devices. VFIO_DEVICE_BIND_TASK creates a bond > between a device and a process address space, identified by a > device-specific ID named PASID. This allows the device to

[RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-02-27 Thread Jean-Philippe Brucker
Add two new ioctl for VFIO devices. VFIO_DEVICE_BIND_TASK creates a bond between a device and a process address space, identified by a device-specific ID named PASID. This allows the device to target DMA transactions at the process virtual addresses without a need for mapping and unmapping buffers