[RFC Design Doc v3] Enable Shared Virtual Memory feature in pass-through scenarios

2016-11-30 Thread Liu, Yi L
What's changed from v2: a) Detailed feature description b) refine description in "Address translation in virtual SVM" b) "Terms" is added Content === 1. Feature description 2. Why use it? 3. How to enable it 4. How to test 5. Terms Details

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-24 Thread Liu, Yi L
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf > Of Jean-Philippe Brucker > Sent: Thursday, March 23, 2017 9:38 PM > To: Liu, Yi L <yi.l@intel.com>; Alex Williamson > <alex.william...@redhat.com> &

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

2017-03-29 Thread Liu, Yi L
> -Original Message- > From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Monday, March 27, 2017 6:14 PM > To: Liu, Yi L <yi.l@intel.com>; Alex Williamson > <alex.william...@redhat.com> > Cc: Shanker Donthineni <shank...@qti.qu

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

2017-03-21 Thread Liu, Yi L
Hi Jean, I'm working on virtual SVM, and have some comments on the VFIO channel definition. > -Original Message- > From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- > boun...@lists.linux-foundation.org] On Behalf Of Jean-Philippe Brucker > Sent: Tuesday, February 28, 2017

RE: [RFC PATCH 00/30] Add PCIe SVM support to ARM SMMUv3

2017-03-06 Thread Liu, Yi L
> -Original Message- > From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- > boun...@lists.linux-foundation.org] On Behalf Of Jean-Philippe Brucker > Sent: Tuesday, February 28, 2017 3:54 AM > Cc: Shanker Donthineni ; k...@vger.kernel.org; > Catalin

RE: [Qemu-devel] [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-07-14 Thread Liu, Yi L
[mailto:alex.william...@redhat.com] > Sent: Thursday, July 6, 2017 1:28 AM > To: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com> > Cc: Tian, Kevin <kevin.t...@intel.com>; Liu, Yi L <yi.l@linux.intel.com>; > Lan, > Tianyu <tianyu@intel.com&g

RE: [Qemu-devel] [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-07-17 Thread Liu, Yi L
Hi Alex, Pls refer to the response inline. > -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf > Of Alex Williamson > Sent: Saturday, July 15, 2017 2:16 AM > To: Liu, Yi L <yi.l@intel.com> > Cc: Jean-Philippe Bru

RE: Support SVM without PASID

2017-07-09 Thread Liu, Yi L
> -Original Message- > From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- > boun...@lists.linux-foundation.org] On Behalf Of valmiki > Sent: Sunday, July 9, 2017 11:16 AM > To: Alex Williamson > Cc: Lan, Tianyu ; Tian, Kevin

Re: [Qemu-devel] [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-07-19 Thread Liu, Yi L
On Mon, Jul 17, 2017 at 04:45:15PM -0600, Alex Williamson wrote: > On Mon, 17 Jul 2017 10:58:41 + > "Liu, Yi L" <yi.l@intel.com> wrote: > > > Hi Alex, > > > > Pls refer to the response inline. > > > > > -Original Message

Re: [Qemu-devel] [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-07-04 Thread Liu, Yi L
Hi Jean, On Mon, Jul 03, 2017 at 12:52:52PM +0100, Jean-Philippe Brucker wrote: > Hi Yi, > > On 02/07/17 11:06, Liu, Yi L wrote: > > On Fri, May 12, 2017 at 01:11:02PM +0100, Jean-Philippe Brucker wrote: > > > > Hi Jean, > > > > As we've got a

Re: [Qemu-devel] [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-07-03 Thread Liu, Yi L
ch on the data parsing. If we move the scope,flags,pasid,vaddr,size fields to vfio_iommu_tlb_invalidate, then both kernel space vfio and user space vfio needs to do much parsing. So I may prefer the way above. If you've got any other idea, pls feel free to post it. It's welcomed. Thanks, Yi L > Hi

[RFC PATCH 07/20] VFIO: check notifier flag in region_del()

2017-04-26 Thread Liu, Yi L
d notifier is needed. The newly added pasid table bind notifier would be unregistered in the vfio_disconnect_container(). The link below would direct you to Peter's dynamic switch patch. https://www.mail-archive.com/qemu-devel@nongnu.org/msg62.html Signed-off-by: Liu, Yi L <yi.l@li

[RFC PATCH 02/20] intel_iommu: exposed extended-context mode to guest

2017-04-26 Thread Liu, Yi L
y SVM capable device. Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- hw/i386/intel_iommu.c | 131 +++-- hw/i386/intel_iommu_internal.h | 9 +++ include/hw/i386/intel_iommu.h | 2 +- 3 files changed, 97 insertions(+), 45 deletion

[RFC PATCH 16/20] VFIO: Add notifier for propagating IOMMU TLB invalidate

2017-04-26 Thread Liu, Yi L
ary to introduce this new notifier to meet the SVM virtualization requirement. Further detail would be included in the patch below: "intel_iommu: propagate Extended-IOTLB invalidate to host" Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- hw/vfio/pci.c

[RFC PATCH 14/20] intel_iommu: add FOR_EACH_ASSIGN_DEVICE macro

2017-04-26 Thread Liu, Yi L
Add FOR_EACH_ASSIGN_DEVICE. It would be used to loop all assigned devices when processing guest pasid table linking and iommu cache invalidate propagation. Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- hw/i386/intel_iommu.c | 32 h

[RFC PATCH 09/20] Memory: introduce iommu_ops->record_device

2017-04-26 Thread Liu, Yi L
ify vIOMMU emulator to record necessary information about the assigned device. Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- include/exec/memory.h | 11 +++ memory.c | 12 2 files changed, 23 insertions(+) diff --git a/include/exec/memory.h b/inc

[RFC PATCH 11/20] intel_iommu: provide iommu_ops->record_device

2017-04-26 Thread Liu, Yi L
This patch provides iommu_ops->record_device implementation for intel_iommu. It records the host sid in the IntelIOMMUNotifierNode for further virtualization usage. e.g. guest sid -> host sid translation during propagating 1st level cache invalidation from guest to host. Signed-off-by: Liu

[RFC PATCH 05/20] VFIO: add new IOCTL for svm bind tasks

2017-04-26 Thread Liu, Yi L
ace driver, VFIO_SVM_BIND_PGTABLE is added to support page table bind from guest. https://patchwork.kernel.org/patch/9594231/ Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- linux-headers/linux/vfio.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/linux-head

[RFC PATCH 13/20] IOMMU: add pasid_table_info for guest pasid table

2017-04-26 Thread Liu, Yi L
This patch adds iommu.h to define some generic definition for IOMMU. Here defines "struct pasid_table_info" for guest pasid table bind. Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- linux-headers/linux/iommu.h | 30 ++ 1 file change

[RFC PATCH 8/8] VFIO: do IOMMU TLB invalidation from guest

2017-04-26 Thread Liu, Yi L
From: "Liu, Yi L" <yi.l@linux.intel.com> This patch adds support for VFIO_IOMMU_TLB_INVALIDATE cmd in vfio_iommu_type1. For SVM virtualization on VT-d, for VFIO_IOMMU_TLB_INVALIDATE, it calls iommu_ops->do_invalidate() to submit the guest iommu cache invalidation to

[RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-04-26 Thread Liu, Yi L
From: "Liu, Yi L" <yi.l@linux.intel.com> This patch adds VFIO_IOMMU_TLB_INVALIDATE to propagate IOMMU TLB invalidate request from guest to host. In the case of SVM virtualization on VT-d, host IOMMU driver has no knowledge of caching structure updates unless the guest invalid

[RFC PATCH 18/20] intel_iommu: propagate Extended-IOTLB invalidate to host

2017-04-26 Thread Liu, Yi L
. In future PASID may also need to be replaced. Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- hw/i386/intel_iommu.c | 126 + hw/i386/intel_iommu_internal.h | 33 +++ 2 files changed, 159 insertions(+) diff --git a/hw/i386/intel_iom

[RFC PATCH 20/20] intel_iommu: propagate Ext-Device-TLB invalidate to host

2017-04-26 Thread Liu, Yi L
in pIOMMU. In future maybe PASID needs to be replaced. Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- hw/i386/intel_iommu.c | 43 ++ hw/i386/intel_iommu_internal.h | 7 +++ 2 files changed, 50 insertions(+) diff --git a/h

[RFC PATCH 01/20] intel_iommu: add "ecs" option

2017-04-26 Thread Liu, Yi L
Report ecap.ECS=1 to guest by "-deivce intel-iommu, ecs=on" in QEMU Cmd Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- hw/i386/intel_iommu.c | 5 + hw/i386/intel_iommu_internal.h | 1 + include/hw/i386/intel_iommu.h | 1 + 3 files changed, 7 insertions(+)

[RFC PATCH 03/20] intel_iommu: add "svm" option

2017-04-26 Thread Liu, Yi L
Expose "Shared Virtual Memory" to guest by using "svm" option. Also use "svm" to expose SVM related capabilities to guest. e.g. "-device intel-iommu, svm=on" Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- hw/i386/intel_iommu.c |

[RFC PATCH 0/8] Shared Virtual Memory virtualization for VT-d

2017-04-26 Thread Liu, Yi L
do invalidate function Liu, Yi L (5): iommu: Introduce iommu do invalidate API function VFIO: Add new IOTCL for PASID Table bind propagation VFIO: do pasid table binding VFIO: Add new IOCTL for IOMMU TLB invalidate propagation VFIO: do IOMMU TLB invalidation from guest drivers/iommu/

[RFC PATCH 3/8] iommu: Introduce iommu do invalidate API function

2017-04-26 Thread Liu, Yi L
From: "Liu, Yi L" <yi.l@linux.intel.com> When a SVM capable device is assigned to a guest, the first level page tables are owned by the guest and the guest PASID table pointer is linked to the device context entry of the physical IOMMU. Host IOMMU driver has no knowledge of c

[RFC PATCH 5/8] VFIO: Add new IOTCL for PASID Table bind propagation

2017-04-26 Thread Liu, Yi L
From: "Liu, Yi L" <yi.l@linux.intel.com> This patch adds VFIO_IOMMU_SVM_BIND_TASK for potential PASID table binding requests. On VT-d, this IOCTL cmd would be used to link the guest PASID page table to host. While for other vendors, it may also be used to support other

[RFC PATCH 2/8] iommu/vt-d: add bind_pasid_table function

2017-04-26 Thread Liu, Yi L
ed-off-by: Jacob Pan <jacob.jun@linux.intel.com> Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- drivers/iommu/intel-iommu.c | 103 ++ include/linux/dma_remapping.h | 1 + 2 files changed, 104 insertions(+) diff --git a/drivers/iom

[RFC PATCH 4/8] iommu/vt-d: Add iommu do invalidate function

2017-04-26 Thread Liu, Yi L
s down all descriptors from the guest to the physical IOMMU. The assumption is that guest to host device ID mapping should be resolved prior to calling IOMMU driver. Based on the device handle, host IOMMU driver can replace certain fields before submit to the invalidation queue. Signed-off-by: Liu

[RFC PATCH 19/20] intel_iommu: propagate PASID-Cache invalidate to host

2017-04-26 Thread Liu, Yi L
submitting to pIOMMU. e.g. guest domain ID must be replaced with the real domain ID in host. In future PASID may need to be replaced. Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- hw/i386/intel_iommu.c | 56 ++ hw/i386/intel_iommu_internal.

[RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function

2017-04-26 Thread Liu, Yi L
Signed-off-by: Jacob Pan <jacob.jun@linux.intel.com> Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- drivers/iommu/iommu.c | 19 +++ include/linux/iommu.h | 31 +++ 2 files changed, 50 insertions(+) diff --git a/drivers/iommu/iommu.c

[RFC PATCH 00/20] Qemu: Extend intel_iommu emulator to support Shared Virtual Memory

2017-04-26 Thread Liu, Yi L
proposed invalidate request VIRTIO_IOMMU_T_INVALIDATE. So it may be preferred to have opaque part when doing the iommu tlb invalidate propagation in SVM virtualization. http://www.spinics.net/lists/kvm/msg147993.html Best Wishes, Yi L Liu, Yi L (20): intel_iommu: add "ecs" option

[RFC PATCH 04/20] Memory: modify parameter in IOMMUNotifier func

2017-04-26 Thread Liu, Yi L
This patch modifies parameter of IOMMUNotifier, use "void *data" instead of "IOMMUTLBEntry*". This is to extend it to support notifiers other than MAP/UNMAP. Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- hw/vfio/common.c | 3 ++- hw/virtio/vhost.c

[RFC PATCH 12/20] Memory: Add func to fire pasidt_bind notifier

2017-04-26 Thread Liu, Yi L
-off-by: Liu, Yi L <yi.l@linux.intel.com> --- include/exec/memory.h | 11 +++ memory.c | 21 + 2 files changed, 32 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index 49087ef..3b8f487 100644 --- a/include/exec/memory.h

[RFC PATCH 10/20] VFIO: notify vIOMMU emulator when device is assigned

2017-04-26 Thread Liu, Yi L
With vIOMMU exposed to guest, notify vIOMMU emulator to record information of this assigned device. This patch adds iommu_ops->record_device to record the host bus/slot/function for this device. In future, it can be extended to other info which is needed. Signed-off-by: Liu, Yi L &l

[RFC PATCH 15/20] intel_iommu: link whole guest pasid table to host

2017-04-26 Thread Liu, Yi L
tor should capture it, then link the whole guest PASID table to host and enable nested mode for the assigned device. Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- hw/i386/intel_iommu.c | 121 +++-- hw/i386/intel_iommu_internal.h | 11

[RFC PATCH 08/20] Memory: add notifier flag check in memory_replay()

2017-04-26 Thread Liu, Yi L
-by: Liu, Yi L <yi.l@linux.intel.com> --- memory.c | 8 1 file changed, 8 insertions(+) diff --git a/memory.c b/memory.c index 9c253cc..0728e62 100644 --- a/memory.c +++ b/memory.c @@ -1630,6 +1630,14 @@ void memory_region_iommu_replay(MemoryRegion *mr, IOMMUNotifier *n, hwadd

[RFC PATCH 17/20] Memory: Add func to fire TLB invalidate notifier

2017-04-26 Thread Liu, Yi L
This patch adds a separate function to fire IOMMU TLB invalidate notifier. Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- include/exec/memory.h | 9 + memory.c | 18 ++ 2 files changed, 27 insertions(+) diff --git a/include/exec/memory.h b/i

[RFC PATCH 06/20] VFIO: add new notifier for binding PASID table

2017-04-26 Thread Liu, Yi L
ion_add would not be triggered. While for the newly added notifier, it requires to be registered once virtual intel_iommu is exposed to guest. Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> --- hw/vfio/common.c | 37 +++--- hw/vfio/pci.c

Re: [Qemu-devel] [RFC PATCH 12/20] Memory: Add func to fire pasidt_bind notifier

2017-04-26 Thread Liu, Yi L
On Wed, Apr 26, 2017 at 03:50:16PM +0200, Paolo Bonzini wrote: > > > On 26/04/2017 12:06, Liu, Yi L wrote: > > +void memory_region_notify_iommu_svm_bind(MemoryRegion *mr, > > + void *data) > > +{ > > +

Re: [Qemu-devel] [RFC PATCH 12/20] Memory: Add func to fire pasidt_bind notifier

2017-04-27 Thread Liu, Yi L
On Thu, Apr 27, 2017 at 02:14:27PM +0800, Peter Xu wrote: > On Thu, Apr 27, 2017 at 10:37:19AM +0800, Liu, Yi L wrote: > > On Wed, Apr 26, 2017 at 03:50:16PM +0200, Paolo Bonzini wrote: > > > > > > > > > On 26/04/2017 12:06, Liu, Yi L wrote: > > >

Re: [Qemu-devel] [RFC PATCH 5/8] VFIO: Add new IOTCL for PASID Table bind propagation

2017-04-26 Thread Liu, Yi L
On Wed, Apr 26, 2017 at 05:56:50PM +0100, Jean-Philippe Brucker wrote: > On 26/04/17 11:12, Liu, Yi L wrote: > > From: "Liu, Yi L" <yi.l@linux.intel.com> > > > > This patch adds VFIO_IOMMU_SVM_BIND_TASK for potential PASID table > > binding reque

Re: [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function

2017-04-27 Thread Liu, Yi L
On Wed, Apr 26, 2017 at 05:56:45PM +0100, Jean-Philippe Brucker wrote: > Hi Yi, Jacob, > > On 26/04/17 11:11, Liu, Yi L wrote: > > From: Jacob Pan <jacob.jun@linux.intel.com> > > > > Virtual IOMMU was proposed to support Shared Virtual Memory (SVM) use

Re: [Qemu-devel] [RFC PATCH 02/20] intel_iommu: exposed extended-context mode to guest

2017-04-28 Thread Liu, Yi L
On Thu, Apr 27, 2017 at 06:32:21PM +0800, Peter Xu wrote: > On Wed, Apr 26, 2017 at 06:06:32PM +0800, Liu, Yi L wrote: > > VT-d implementations reporting PASID or PRS fields as "Set", must also > > report ecap.ECS as "Set". Extended-Context is required for SVM. &

Re: [RFC PATCH 02/20] intel_iommu: exposed extended-context mode to guest

2017-04-28 Thread Liu, Yi L
On Fri, Apr 28, 2017 at 02:00:15PM +0800, Lan Tianyu wrote: > On 2017年04月27日 18:32, Peter Xu wrote: > > On Wed, Apr 26, 2017 at 06:06:32PM +0800, Liu, Yi L wrote: > >> VT-d implementations reporting PASID or PRS fields as "Set", must also > >> report ecap.ECS a

Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function

2017-04-28 Thread Liu, Yi L
On Thu, Apr 27, 2017 at 11:12:45AM +0100, Jean-Philippe Brucker wrote: > On 27/04/17 07:36, Liu, Yi L wrote: > > On Wed, Apr 26, 2017 at 05:56:45PM +0100, Jean-Philippe Brucker wrote: > >> Hi Yi, Jacob, > >> > >> On 26/04/17 11:11, Liu, Yi L wro

Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function

2017-04-28 Thread Liu, Yi L
On Wed, Apr 26, 2017 at 05:56:45PM +0100, Jean-Philippe Brucker wrote: > Hi Yi, Jacob, > > On 26/04/17 11:11, Liu, Yi L wrote: > > From: Jacob Pan <jacob.jun@linux.intel.com> > > > > Virtual IOMMU was proposed to support Shared Virtual Memory (SVM) use

Re: [Qemu-devel] [RFC PATCH 5/8] VFIO: Add new IOTCL for PASID Table bind propagation

2017-05-12 Thread Liu, Yi L
On Wed, Apr 26, 2017 at 06:12:02PM +0800, Liu, Yi L wrote: > From: "Liu, Yi L" <yi.l@linux.intel.com> Hi Alex, In this patchset, I'm trying to add two new IOCTL cmd for Shared Virtual Memory virtualization. One for binding guest PASID Table and one for iommu tlb invalidat

Re: [Qemu-devel] [RFC PATCH 6/8] VFIO: do pasid table binding

2017-05-12 Thread Liu, Yi L
On Tue, May 09, 2017 at 03:55:20PM +0800, Xiao Guangrong wrote: > > > On 04/26/2017 06:12 PM, Liu, Yi L wrote: > >From: "Liu, Yi L" <yi.l@linux.intel.com> > > > >This patch adds IOCTL processing in vfio_iommu_type1 for > >VFIO_IOMMU_SVM_BI

Re: [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-05-15 Thread Liu, Yi L
On Fri, May 12, 2017 at 01:11:02PM +0100, Jean-Philippe Brucker wrote: > Hi Yi, > > On 26/04/17 11:12, Liu, Yi L wrote: > > From: "Liu, Yi L" <yi.l@linux.intel.com> > > > > This patch adds VFIO_IOMMU_TLB_INVALIDATE to propagate IOMMU TL

Re: [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function

2017-05-15 Thread Liu, Yi L
On Fri, May 12, 2017 at 03:59:14PM -0600, Alex Williamson wrote: > On Wed, 26 Apr 2017 18:11:58 +0800 > "Liu, Yi L" <yi.l@intel.com> wrote: > > > From: Jacob Pan <jacob.jun@linux.intel.com> > > > > Virtual IOMMU was proposed to

Re: [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-05-15 Thread Liu, Yi L
On Fri, May 12, 2017 at 03:58:43PM -0600, Alex Williamson wrote: > On Wed, 26 Apr 2017 18:12:04 +0800 > "Liu, Yi L" <yi.l@intel.com> wrote: > > > From: "Liu, Yi L" <yi.l@linux.intel.com> > > > > This patch adds VFIO_IOMMU_TLB_IN

Re: [Qemu-devel] [RFC PATCH 03/20] intel_iommu: add "svm" option

2017-05-09 Thread Liu, Yi L
On Mon, May 08, 2017 at 07:20:34PM +0800, Peter Xu wrote: > On Mon, May 08, 2017 at 10:38:09AM +0000, Liu, Yi L wrote: > > On Thu, 27 Apr 2017 18:53:17 +0800 > > Peter Xu <pet...@redhat.com> wrote: > > > > > On Wed, Apr 26, 2017 at 06:06:33PM +0800, Liu, Yi L w

Re: [RFC PATCH 3/8] iommu: Introduce iommu do invalidate API function

2017-05-18 Thread Liu, Yi L
On Fri, May 12, 2017 at 03:59:24PM -0600, Alex Williamson wrote: > On Wed, 26 Apr 2017 18:12:00 +0800 > "Liu, Yi L" <yi.l@intel.com> wrote: > Hi Alex, Pls refer to the open I mentioned in this email, I need your comments on it to prepare the formal patchset fo

Re: [Qemu-devel] [RFC PATCH 5/8] VFIO: Add new IOTCL for PASID Table bind propagation

2017-05-18 Thread Liu, Yi L
On Fri, May 12, 2017 at 03:58:51PM -0600, Alex Williamson wrote: > On Wed, 26 Apr 2017 18:12:02 +0800 > "Liu, Yi L" <yi.l@intel.com> wrote: > > > From: "Liu, Yi L" <yi.l@linux.intel.com> > > > > This patch adds VFIO_IOMMU_S

Re: [RFC PATCH 4/8] iommu/vt-d: Add iommu do invalidate function

2017-05-18 Thread Liu, Yi L
On Fri, May 12, 2017 at 03:59:18PM -0600, Alex Williamson wrote: > On Wed, 26 Apr 2017 18:12:01 +0800 > "Liu, Yi L" <yi.l@intel.com> wrote: > > > From: Jacob Pan <jacob.jun@linux.intel.com> > > > > This patch adds Intel VT-d specific

Re: [Qemu-devel] [RFC PATCH 09/20] Memory: introduce iommu_ops->record_device

2017-05-19 Thread Liu, Yi L
On Fri, May 19, 2017 at 09:07:49AM +, Tian, Kevin wrote: > > From: Liu, Yi L [mailto:yi.l@linux.intel.com] > > Sent: Friday, May 19, 2017 1:24 PM > > > > Hi Alex, > > > > What's your opinion with Tianyu's question? Is it accepatable > > to use

Re: [Qemu-devel] [RFC PATCH 09/20] Memory: introduce iommu_ops->record_device

2017-05-18 Thread Liu, Yi L
Hi Alex, What's your opinion with Tianyu's question? Is it accepatable to use VFIO API in intel_iommu emulator? Thanks, Yi L On Fri, Apr 28, 2017 at 02:46:16PM +0800, Lan Tianyu wrote: > On 2017年04月26日 18:06, Liu, Yi L wrote: > > With vIOMMU exposed to guest, vIOMMU emulator ne

Re: [Qemu-devel] [RFC PATCH 0/8] Shared Virtual Memory virtualization for VT-d

2017-05-08 Thread Liu, Yi L
Be free to let me know if you want more detail. Thanks, Yi L > > Thanks! > > On 04/26/2017 06:11 PM, Liu, Yi L wrote: > >Hi, > > > >This patchset introduces SVM virtualization for intel_iommu in > >IOMMU/VFIO. The total SVM virtualization for intel_iomm

RE: [RFC PATCH 03/20] intel_iommu: add "svm" option

2017-05-08 Thread Liu, Yi L
On Thu, 27 Apr 2017 18:53:17 +0800 Peter Xu <pet...@redhat.com> wrote: > On Wed, Apr 26, 2017 at 06:06:33PM +0800, Liu, Yi L wrote: > > Expose "Shared Virtual Memory" to guest by using "svm" option. > > Also use "svm" to expose SVM related capabi

RE: bind pasid table API

2017-09-20 Thread Liu, Yi L
Hi Jean, > -Original Message- > From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Wednesday, September 20, 2017 8:10 PM > To: Pan, Jacob jun <jacob.jun@intel.com>; iommu@lists.linux- > foundation.org > Cc: Liu, Yi L <yi.l@in

RE: [PATCH v2 03/16] iommu: introduce iommu invalidate API function

2017-10-11 Thread Liu, Yi L
API. > > > Good point. I was calling it iommu_passdown_invalidate() originally. > The invalidation request comes from guest or user space instead of in-kernel > unmap > kind of calls. [Liu, Yi L] I agree that iommu_invalidate() is too generic. Additionally, also better to avoid making it svm

RE: [PATCH v2 03/16] iommu: introduce iommu invalidate API function

2017-10-11 Thread Liu, Yi L
> On Wed, Oct 11, 2017 at 07:54:32AM +0000, Liu, Yi L wrote: > > I agree that iommu_invalidate() is too generic. Additionally, also > > better to avoid making it svm specific. > > I also don't like to name the functions after the Intel feature, but I failed > to

RE: [PATCH v2 03/16] iommu: introduce iommu invalidate API function

2017-10-12 Thread Liu, Yi L
> -Original Message- > From: Bob Liu [mailto:liub...@huawei.com] > Sent: Thursday, October 12, 2017 5:39 PM > To: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>; Joerg Roedel > <j...@8bytes.org>; Liu, Yi L <yi.l@intel.com> > Cc: Lan, Tian

RE: [PATCH v2 03/16] iommu: introduce iommu invalidate API function

2017-10-12 Thread Liu, Yi L
> -Original Message- > From: Bob Liu [mailto:liub...@huawei.com] > Sent: Thursday, October 12, 2017 6:08 PM > To: Liu, Yi L <yi.l@intel.com>; Jean-Philippe Brucker philippe.bruc...@arm.com>; Joerg Roedel <j...@8bytes.org> > Cc: Lan, Tianyu <tiany

RE: [PATCH v2 02/16] iommu/vt-d: add bind_pasid_table function

2017-10-12 Thread Liu, Yi L
-Hartman <gre...@linuxfoundation.org>; Wysocki, Rafael J > <rafael.j.wyso...@intel.com>; Jean-Philippe Brucker philippe.bruc...@arm.com> > Cc: Liu, Yi L <yi.l@intel.com>; Lan, Tianyu <tianyu@intel.com>; Tian, > Kevin > <kevin.t...@intel.com>

RE: [PATCH 1/3] iommu/vt-d: Missing checks for pasid tables if allocation fails

2017-10-19 Thread Liu, Yi L
pasid_max; > int ret; > > - if (WARN_ON(!iommu)) > + if (WARN_ON(!iommu || !iommu->pasid_table)) [Liu, Yi L] Hi Baolu, I guess there also need a check to iommu->ecap , see if the pasid bit is reported. thoughts? Regards, Yi L > return -EINVAL; >

RE: [RFCv2 PATCH 01/36] iommu: Keep track of processes and PASIDs

2017-10-23 Thread Liu, Yi L
...@google.com; > alex.william...@redhat.com; t...@semihalf.com; liub...@huawei.com; > thunder.leiz...@huawei.com; xieyishe...@huawei.com; > gabriele.paol...@huawei.com; nwatt...@codeaurora.org; ok...@codeaurora.org; > rfr...@cavium.com; dw...@infradead.org; jacob.jun@linux.intel.

RE: [PATCH v2 08/16] iommu: introduce device fault data

2017-11-07 Thread Liu, Yi L
Hi Jean, Nice to have you "online". This open is really blocking the progress. Pls check inline. > -Original Message- > From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Tuesday, November 7, 2017 3:02 AM > To: Liu, Yi L <yi.l@intel.c

RE: [PATCH v4 17/22] iommu/intel-svm: report device page request

2018-05-14 Thread Liu, Yi L
Hi Jacob, Same comment with the one to patch 16, pci_get_bus_and_slot() is deprecated, may update accordingly. Thanks, Yi Liu > From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > Sent: Friday, March 23, 2018 11:12 AM > > If the source device of a page request has its PASID table pointer

RE: [PATCH v4 16/22] iommu/vt-d: report non-recoverable faults to device

2018-05-14 Thread Liu, Yi L
<jacob.jun@linux.intel.com> > Signed-off-by: Liu, Yi L <yi.l@linux.intel.com> > Signed-off-by: Ashok Raj <ashok@intel.com> > --- > drivers/iommu/dmar.c| 157 > ++-- > drivers/iommu/intel-iommu.c | 6 +- &g

RE: [PATCH v4 10/22] iommu: introduce device fault data

2018-05-20 Thread Liu, Yi L
Hi Jacob, > From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > Sent: Tuesday, April 17, 2018 5:49 AM > include/linux/iommu.h | 102 > +- > 1 file changed, 100 insertions(+), 2 deletions(-) > > diff --git a/include/linux/iommu.h

RE: [PATCH v5 13/23] iommu: introduce device fault report API

2018-05-17 Thread Liu, Yi L
> From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > Sent: Saturday, May 12, 2018 4:54 AM > > Traditionally, device specific faults are detected and handled within their > own device > drivers. When IOMMU is enabled, faults such as DMA related transactions are > detected by IOMMU. There is

RE: [PATCH v5 13/23] iommu: introduce device fault report API

2018-05-17 Thread Liu, Yi L
> From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > Sent: Thursday, May 17, 2018 11:59 PM > On Thu, 17 May 2018 11:41:56 +0000 > "Liu, Yi L" <yi.l@intel.com> wrote: > > > > +int iommu_report_device_fault(struct device *dev, struct > > &g

RE: [PATCH 1/9] iommu/vt-d: Global PASID name space

2018-05-01 Thread Liu, Yi L
mple, one application (associated with a PASID) might > talk to two physical devices simultaneously while the two > devices could reside behind two different IOMMU units. Looks good to me. Reviewed-by: Liu, Yi L <yi.l@intel.com> > Cc: Ashok Raj <ashok@intel.com> >

RE: [PATCH 2/9] iommu/vt-d: Decouple idr bond pointer from svm

2018-05-01 Thread Liu, Yi L
> Cc: Ashok Raj <ashok@intel.com> > Cc: Jacob Pan <jacob.jun@linux.intel.com> > Cc: Kevin Tian <kevin.t...@intel.com> > Cc: Liu Yi L <yi.l@intel.com> > Signed-off-by: Lu Baolu <baolu...@linux.intel.com> > Reviewed-by: Kevin Tian <kevin.t...

RE: [PATCH 4/9] iommu/vt-d: Move device_domain_info to header

2018-05-01 Thread Liu, Yi L
t; Cc: Kevin Tian <kevin.t...@intel.com> > Cc: Liu Yi L <yi.l@intel.com> > Signed-off-by: Lu Baolu <baolu...@linux.intel.com> Looks good to me. Reviewed-by: Liu, Yi L <yi.l@intel.com> Regards, Yi Liu > --- > drivers/iommu/intel-iommu.c | 62 ++

RE: [PATCH 5/9] iommu/vt-d: Per domain pasid table interfaces

2018-05-01 Thread Liu, Yi L
cases where multiple devices under one single IOMMU unit > support PASID feature. With per domain pasid table, we can > achieve finer protection and isolation granularity. > > Cc: Ashok Raj <ashok@intel.com> > Cc: Jacob Pan <jacob.jun@linux.intel.com> > Cc: Kev

RE: [PATCH 3/9] iommu/vt-d: Use global PASID for SVM usage

2018-05-01 Thread Liu, Yi L
com> > Cc: Kevin Tian <kevin.t...@intel.com> > Cc: Liu Yi L <yi.l@intel.com> > Signed-off-by: Lu Baolu <baolu...@linux.intel.com> > Reviewed-by: Kevin Tian <kevin.t...@intel.com> Looks good to me. Reviewed-by: Liu, Yi L <yi.l..

RE: [PATCH 6/9] iommu/vt-d: Allocate and free pasid table

2018-05-01 Thread Liu, Yi L
ed. > > Cc: Ashok Raj <ashok@intel.com> > Cc: Jacob Pan <jacob.jun@linux.intel.com> > Cc: Kevin Tian <kevin.t...@intel.com> > Cc: Liu Yi L <yi.l@intel.com> > Signed-off-by: Lu Baolu <baolu...@linux.intel.com> > --- > drivers/io

RE: [PATCH 8/9] iommu/vt-d: Use per-domain pasid table

2018-05-01 Thread Liu, Yi L
pasid table is per-iommu domain. May more accurate "Each svm-capable PCI device will be configed with a pasid table which shares with other svm-capable device within its iommu domain" Can include my reviewed by after refining the description. Reviewed-by: Liu, Yi L <yi.l@intel.com&

RE: [PATCH 7/9] iommu/vt-d: Calculate PTS value

2018-05-01 Thread Liu, Yi L
gt; > Cc: Jacob Pan <jacob.jun@linux.intel.com> > Cc: Kevin Tian <kevin.t...@intel.com> > Cc: Liu Yi L <yi.l@intel.com> > Signed-off-by: Lu Baolu <baolu...@linux.intel.com> Looks good to me. Reviewed-by: Liu, Yi L <yi.l@intel.com> Regards, Yi Liu &g

RE: [PATCH 9/9] iommu/vt-d: Clean up PASID talbe management for SVM

2018-05-01 Thread Liu, Yi L
t; Cc: Jacob Pan <jacob.jun@linux.intel.com> > Cc: Kevin Tian <kevin.t...@intel.com> > Cc: Liu Yi L <yi.l@intel.com> > Signed-off-by: Lu Baolu <baolu...@linux.intel.com> > --- > drivers/iommu/intel-iommu.c | 6 +++--- > drivers/iommu/intel-svm.c | 17 +

RE: [PATCH v2 08/16] iommu: introduce device fault data

2017-10-20 Thread Liu, Yi L
Joerg Roedel <j...@8bytes.org>; David > Woodhouse <dw...@infradead.org>; Greg Kroah-Hartman > <gre...@linuxfoundation.org>; Wysocki, Rafael J <rafael.j.wyso...@intel.com> > Cc: Liu, Yi L <yi.l@intel.com>; Lan, Tianyu <tianyu@intel.com>; Tian

RE: [PATCH 1/3] iommu/vt-d: Missing checks for pasid tables if allocation fails

2017-10-20 Thread Liu, Yi L
> -Original Message- > From: Lu Baolu [mailto:baolu...@linux.intel.com] > Sent: Friday, October 20, 2017 8:49 AM > To: Liu, Yi L <yi.l@intel.com>; j...@8bytes.org; dw...@infradead.org > Cc: iommu@lists.linux-foundation.org; linux-ker...@vger.kernel.org >

RE: [PATCH v5 01/23] iommu: introduce bind_pasid_table API function

2018-08-24 Thread Liu, Yi L
t; tables. Based on common data, model specific IOMMU drivers can be extended > > to perform the specific steps for binding pasid table of assigned devices. > > > > Signed-off-by: Jean-Philippe Brucker > > Signed-off-by: Liu, Yi L > > Signed-off-by: Ashok Raj > &

RE: [PATCH 00/10] iommu/vt-d: Add scalable mode support

2018-07-16 Thread Liu, Yi L
Hi Jean, > From: Jean-Philippe Brucker > Sent: Monday, July 16, 2018 6:52 PM > On 16/07/18 07:49, Lu Baolu wrote: > > Intel vt-d rev3.0 [1] introduces a new translation mode called > > 'scalable mode', which enables PASID-granular translations for first > > level, second level, nested and

RE: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-24 Thread Liu, Yi L
Hi Jean, > From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Tuesday, July 24, 2018 7:31 PM > > Hi Baolu, > > On 24/07/18 03:22, Lu Baolu wrote: > > Hi, > > > > On 07/23/2018 12:44 PM, Liu, Yi L wrote: > >>> From: Lu Ba

RE: [RFC PATCH 05/10] iommu/vt-d: Setup DMA remapping for mediated devices

2018-07-22 Thread Liu, Yi L
vice to the domain. > > Cc: Ashok Raj > Cc: Jacob Pan > Cc: Kevin Tian > Cc: Liu Yi L > Signed-off-by: Sanjay Kumar > Signed-off-by: Lu Baolu > --- > drivers/iommu/intel-iommu.c | 73 > - > 1 file changed, 66 insertions

RE: [RFC PATCH 02/10] iommu/vt-d: Alloc domain for a mediated device

2018-07-22 Thread Liu, Yi L
e domain, and the mdev will be configed to use this pasid when it is added to this domain" Regards, Yi Liu > by the mediated device attached to this domain for non-SVM DMA transactions. > > Cc: Ashok Raj > Cc: Jacob Pan > Cc: Kevin Tian > Cc: Liu Yi L > Signed-off-by

RE: [RFC PATCH 01/10] iommu/vt-d: Get iommu device for a mediated device

2018-07-22 Thread Liu, Yi L
t; the translation. > > Cc: Ashok Raj > Cc: Jacob Pan > Cc: Kevin Tian > Cc: Liu Yi L > Signed-off-by: Sanjay Kumar > Signed-off-by: Lu Baolu > --- > drivers/iommu/intel-iommu.c | 6 ++ drivers/iommu/intel-pasid.h | 16 > > 2 files changed, 22

RE: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-22 Thread Liu, Yi L
ocation rules when the allocation is for mediated device. Instead, just allocate a new one for it. :) Thanks, Yi Liu > > Cc: Ashok Raj > Cc: Jacob Pan > Cc: Kevin Tian > Cc: Liu Yi L > Signed-off-by: Sanjay Kumar > Signed-off-by: Lu Baolu > --- > drivers/iommu/intel

RE: [PATCH 02/37] iommu/sva: Bind process address spaces to devices

2018-02-28 Thread Liu, Yi L
Hi Jean, > From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Thursday, February 15, 2018 8:41 PM > Subject: Re: [PATCH 02/37] iommu/sva: Bind process address spaces to devices > > On 13/02/18 23:34, Tian, Kevin wrote: > >> From: Jean-Philippe Brucker > >> Sent: Tuesday,

RE: [PATCH v3 03/10] iommu/sva: Manage process address spaces

2018-10-08 Thread Liu, Yi L
Hi Jean, > From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Thursday, September 27, 2018 9:38 PM > To: Liu, Yi L ; Joerg Roedel > Subject: Re: [PATCH v3 03/10] iommu/sva: Manage process address spaces > > On 27/09/2018 04:22, Liu, Yi L wrote: >

RE: [PATCH 1/1] iommu/vtd: Fix NULL pointer dereference in prq_event_thread()

2018-11-04 Thread Liu, Yi L
> From: Lu Baolu [mailto:baolu...@linux.intel.com] > Sent: Monday, November 5, 2018 1:45 PM > To: Liu, Yi L ; Joerg Roedel ; David > Woodhouse > Cc: baolu...@linux.intel.com; Raj, Ashok ; linux- > ker...@vger.kernel.org; iommu@lists.linux-foundation.org > Subject: Re: [PATC

RE: [PATCH v4 04/12] iommu/vt-d: Add 256-bit invalidation descriptor support

2018-11-07 Thread Liu, Yi L
> From: Lu Baolu [mailto:baolu...@linux.intel.com] > Sent: Thursday, November 8, 2018 1:25 PM > Subject: Re: [PATCH v4 04/12] iommu/vt-d: Add 256-bit invalidation descriptor > support > > Hi, > > On 11/8/18 11:49 AM, Liu, Yi L wrote: > > Hi, > &g

RE: [PATCH v4 04/12] iommu/vt-d: Add 256-bit invalidation descriptor support

2018-11-07 Thread Liu, Yi L
Hi, > From: Lu Baolu [mailto:baolu...@linux.intel.com] > Sent: Thursday, November 8, 2018 10:17 AM > Subject: Re: [PATCH v4 04/12] iommu/vt-d: Add 256-bit invalidation descriptor > support > > Hi Yi, > > On 11/7/18 2:07 PM, Liu, Yi L wrote: > > Hi Baolu, > &g

RE: [PATCH v4 06/12] iommu/vt-d: Add second level page table interface

2018-11-07 Thread Liu, Yi L
Hi, > From: Lu Baolu [mailto:baolu...@linux.intel.com] > Sent: Thursday, November 8, 2018 10:28 AM > Subject: Re: [PATCH v4 06/12] iommu/vt-d: Add second level page table > interface > > Hi, > > On 11/7/18 3:13 PM, Liu, Yi L wrote: > > Hi Baolu, > &g

  1   2   3   4   5   6   >