On Tue, Dec 05, 2017 at 08:12:58PM -0700, Alex Williamson wrote:
> On Wed, 6 Dec 2017 10:44:43 +0800
> "Liu, Yi L" wrote:
>
> > On Tue, Dec 05, 2017 at 02:09:07PM -0700, Alex Williamson wrote:
> > > Commit 8c37faa475f3 ("vfio-pci, ppc64/spapr: Reorder gro
On Tue, Dec 05, 2017 at 02:09:07PM -0700, Alex Williamson wrote:
> Commit 8c37faa475f3 ("vfio-pci, ppc64/spapr: Reorder group-to-container
> attaching") moved registration of groups with the vfio-kvm device from
> vfio_get_group() to vfio_connect_container(), but it missed the case
> where a group
On Tue, Nov 14, 2017 at 06:13:50PM -0500, prasad.singamse...@oracle.com wrote:
> From: Prasad Singamsetty
>
> The current implementation of Intel IOMMU code only supports 39 bits
> iova address width. This patch provides a new parameter (x-aw-bits)
> for intel-iommu to extend its address width to
On Tue, Nov 14, 2017 at 06:13:49PM -0500, prasad.singamse...@oracle.com wrote:
> From: Prasad Singamsetty
>
> The current implementation of Intel IOMMU code only supports 39 bits
> host/iova address width so number of macros use hard coded values based
> on that. This patch is to redefine them so
On Thu, Nov 30, 2017 at 05:11:55PM +0800, Peter Xu wrote:
> On Thu, Nov 30, 2017 at 01:22:38PM +0800, Liu, Yi L wrote:
> > On Tue, Nov 14, 2017 at 06:13:50PM -0500, prasad.singamse...@oracle.com
> > wrote:
> > > From: Prasad Singamsetty
> > >
> > > The
On Tue, Nov 14, 2017 at 06:13:50PM -0500, prasad.singamse...@oracle.com wrote:
> From: Prasad Singamsetty
>
> The current implementation of Intel IOMMU code only supports 39 bits
> iova address width. This patch provides a new parameter (x-aw-bits)
> for intel-iommu to extend its address width to
On Wed, Nov 29, 2017 at 08:41:04AM -0700, Alex Williamson wrote:
> On Wed, 22 Nov 2017 15:58:02 +0800
> "Liu, Yi L" wrote:
>
> > The init of giommu_list and hostwin_list is missed during container
> > initialization.
> >
> > Signed-off-by: Liu, Yi L
Rename GuestIOMMU to GuestIOMMUMR as the existing GuestIOMMU is
for MemoryRegion related notifiers.
Signed-off-by: Liu, Yi L
---
hw/vfio/common.c | 15 ---
include/hw/vfio/vfio-common.h | 8
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/hw
IOMMUObject behind the device AddressSpace(a.ka vIOMMU exposed).
The VFIOGuestIOMMUObject instance would be allocated and inserted to the
VFIOContainer.giommu_object_list.
Signed-off-by: Liu, Yi L
---
hw/vfio/common.c | 1 +
hw/vfio/pci.c | 39
From: Peter Xu
Provide AddressSpaceOps.iommu_get() in Intel IOMMU emulator.
Signed-off-by: Peter Xu
Signed-off-by: Liu, Yi L
---
hw/i386/intel_iommu.c | 8
include/hw/i386/intel_iommu.h | 2 ++
2 files changed, 10 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386
in this patchset.
The first AddressSpaceOps added here is iommu_get(). Return an IOMMUObject
behind the AddressSpace.
Signed-off-by: Peter Xu
Signed-off-by: Liu, Yi L
---
include/exec/memory.h | 22 ++
memory.c | 10 --
2 files changed, 30 insertions
UNMAP, and it can also be used to detect if
vIOMMU is exposed to guest.
Signed-off-by: Peter Xu
Signed-off-by: Liu, Yi L
---
hw/core/Makefile.objs | 1 +
hw/core/iommu.c | 64 +
include/hw/core/io
include:
* notifier for guest pasid table binding
* notifier for guest iommu tlb invalidation
Both of the two notifiers would be include in future virt-SVM patchset.
In virt-SVM patchset, this notifier would be fulfilled.
Signed-off-by: Liu, Yi L
---
hw/vfio/pci.c | 14 ++
1 file changed
patch to introduce IOMMUObject and AddressSpaceOps
* Address two missed list init spotted by Auger Eric
Liu, Yi L (3):
vfio: rename GuestIOMMU to be GuestIOMMUMR
vfio/pci: add notify framework based on IOMMUObject
vfio/pci: register vfio_iommu_bind_pasidtbl_notify notifier
Peter Xu (4):
memo
the notifier types from IOMMU_NOTIFIER_* prefix into IOMMU_MR_EVENT_*
to better show its usage (for memory regions).
* rename IOMMUNotifier to IOMMUMRNotifier
* rename iommu_notifier to iommu_mr_notifier
Signed-off-by: Peter Xu
Signed-off-by: Liu, Yi L
---
hw/i386/amd_iommu.c | 6
The init of giommu_list and hostwin_list is missed during container
initialization.
Signed-off-by: Liu, Yi L
---
hw/vfio/common.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 7b2924c..14c5940 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
Hi David,
On Tue, Nov 14, 2017 at 11:59:34AM +1100, David Gibson wrote:
> On Mon, Nov 13, 2017 at 04:28:45PM +0800, Peter Xu wrote:
> > On Mon, Nov 13, 2017 at 04:56:01PM +1100, David Gibson wrote:
> > > On Fri, Nov 03, 2017 at 08:01:52PM +0800, Liu, Yi L wrote:
>
Hi Eric,
On Tue, Nov 14, 2017 at 10:52:54PM +0100, Auger Eric wrote:
> Hi Yi L,
>
> On 14/11/2017 14:59, Liu, Yi L wrote:
> > On Tue, Nov 14, 2017 at 09:53:07AM +0100, Auger Eric wrote:
> > Hi Eric,
> >
> >> Hi Yi L,
> >>
> >> On 13/11/2017
Hi Eric,
On Tue, Nov 14, 2017 at 11:23:03AM +0100, Auger Eric wrote:
> Hi Yi L,
>
> On 03/11/2017 13:01, Liu, Yi L wrote:
> > This patch introduce a notify framework for IOMMUObject.iommu_notifiers.
> > Introduce VFIOGuestIOMMUObject is to link VFIO Container and th
Hi Eric,
On Tue, Nov 14, 2017 at 11:21:59AM +0100, Auger Eric wrote:
> Hi Yi L,
>
> On 03/11/2017 13:01, Liu, Yi L wrote:
> > From: Peter Xu
> >
> > AddressSpaceOps is similar to MemoryRegionOps, it's just for address
> > spaces to store arch-specific
On Tue, Nov 14, 2017 at 09:53:07AM +0100, Auger Eric wrote:
Hi Eric,
> Hi Yi L,
>
> On 13/11/2017 10:58, Liu, Yi L wrote:
> > On Mon, Nov 13, 2017 at 04:56:01PM +1100, David Gibson wrote:
> >> On Fri, Nov 03, 2017 at 08:01:52PM +0800, Liu, Yi L wro
On Mon, Nov 13, 2017 at 04:56:01PM +1100, David Gibson wrote:
> On Fri, Nov 03, 2017 at 08:01:52PM +0800, Liu, Yi L wrote:
> > From: Peter Xu
> >
> > AddressSpaceOps is similar to MemoryRegionOps, it's just for address
> > spaces to store arch-specific hooks.
>
include:
* notifier for guest pasid table binding
* notifier for guest iommu tlb invalidation
Both of the two notifiers would be include in future virt-SVM patchset.
In virt-SVM patchset, this notifier would be fulfilled.
Signed-off-by: Liu, Yi L
---
hw/vfio/pci.c | 14 ++
1 file changed
IOMMUObject behind the device AddressSpace(a.ka vIOMMU exposed).
The VFIOGuestIOMMUObject instance would be allocated and inserted to the
VFIOContainer.giommu_object_list.
Signed-off-by: Liu, Yi L
---
hw/vfio/pci.c | 39 ++-
include/hw/vfio/vfio
Rename GuestIOMMU to GuestIOMMUMR as the existing GuestIOMMU is
for MemoryRegion related notifiers.
Signed-off-by: Liu, Yi L
---
hw/vfio/common.c | 15 ---
include/hw/vfio/vfio-common.h | 8
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/hw
ar
to MemoryRegionOps. The difference is IOMMUObjectOps is not relied
on MemoryRegion.
Signed-off-by: Peter Xu
Signed-off-by: Liu, Yi L
---
hw/core/Makefile.objs | 1 +
hw/core/iommu.c | 58 +++
include/exec/memory.h | 22 +++
include/hw/core/io
the notifier
framework based on IOMMUObject and also provide an example of the newly
introduced notifier framework. The notifier framework introduced here
is going to be used in my virt-SVM patchset.
For virt-SVM design details, you may refer to svm RFC patch.
https://lists.gnu.org/archive/htm
the notifier types from IOMMU_NOTIFIER_* prefix into IOMMU_MR_EVENT_*
to better show its usage (for memory regions).
* rename IOMMUNotifier to IOMMUMRNotifier
* rename iommu_notifier to iommu_mr_notifier
Signed-off-by: Peter Xu
Signed-off-by: Liu, Yi L
---
hw/i386/amd_iommu.c | 6
From: Peter Xu
Provide AddressSpaceOps.iommu_get() in Intel IOMMU emulator.
Signed-off-by: Peter Xu
Signed-off-by: Liu, Yi L
---
hw/i386/intel_iommu.c | 7 +++
include/hw/i386/intel_iommu.h | 2 ++
2 files changed, 9 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386
From: Peter Xu
Provide AddressSpaceOps.iommu_get() in Intel IOMMU emulator.
Signed-off-by: Peter Xu
Signed-off-by: Liu, Yi L
---
hw/i386/intel_iommu.c | 7 +++
include/hw/i386/intel_iommu.h | 2 ++
2 files changed, 9 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386
IOMMUObject behind the device AddressSpace(a.ka vIOMMU exposed).
The VFIOGuestIOMMUObject instance would be allocated and inserted to the
VFIOContainer.giommu_object_list.
Signed-off-by: Liu, Yi L
---
hw/vfio/pci.c | 39 ++-
include/hw/vfio/vfio
ar
to MemoryRegionOps. The difference is IOMMUObjectOps is not relied
on MemoryRegion.
Signed-off-by: Peter Xu
Signed-off-by: Liu, Yi L
---
hw/core/Makefile.objs | 1 +
hw/core/iommu.c | 58 +++
include/exec/memory.h | 22 +++
include/hw/core/io
include:
* notifier for guest pasid table binding
* notifier for guest iommu tlb invalidation
Both of the two notifiers would be include in future virt-SVM patchset.
In virt-SVM patchset, this notifier would be fulfilled.
Signed-off-by: Liu, Yi L
---
hw/vfio/pci.c | 14 ++
1 file changed
otifier framework introduced here
is going to be used in my virt-SVM patchset.
For virt-SVM design details, you may refer to svm RFC patch.
https://lists.gnu.org/archive/html/qemu-devel/2017-04/msg04925.html
Liu, Yi L (3):
vfio: rename GuestIOMMU to be GuestIOMMUMR
vfio/pci: add notify fra
the notifier types from IOMMU_NOTIFIER_* prefix into IOMMU_MR_EVENT_*
to better show its usage (for memory regions).
* rename IOMMUNotifier to IOMMUMRNotifier
* rename iommu_notifier to iommu_mr_notifier
Signed-off-by: Peter Xu
Signed-off-by: Liu, Yi L
---
hw/i386/amd_iommu.c | 6
Rename GuestIOMMU to GuestIOMMUMR as the existing GuestIOMMU is
for MemoryRegion related notifiers.
Signed-off-by: Liu, Yi L
---
hw/vfio/common.c | 15 ---
include/hw/vfio/vfio-common.h | 8
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/hw
On Mon, Jul 17, 2017 at 04:45:15PM -0600, Alex Williamson wrote:
> On Mon, 17 Jul 2017 10:58:41 +
> "Liu, Yi L" wrote:
>
> > Hi Alex,
> >
> > Pls refer to the response inline.
> >
> > > -Original Message-
> > > From: kv
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
> Cc: Jean-Philippe Brucker ; Tian, Kevin
&
t; From: Alex Williamson [mailto:alex.william...@redhat.com]
> Sent: Thursday, July 6, 2017 1:28 AM
> To: Jean-Philippe Brucker
> Cc: Tian, Kevin ; Liu, Yi L ;
> Lan,
> Tianyu ; Liu, Yi L ; Raj, Ashok
> ; k...@vger.kernel.org; jasow...@redhat.com; Will Deacon
> ; pet...@redhat.co
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
ant VFIO engae too much 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'
Hi David,
I added some update on your question. See if it make any sense.
> -Original Message-
> From: David Gibson [mailto:da...@gibson.dropbear.id.au]
> Sent: Friday, May 26, 2017 1:30 PM
> To: Peter Xu
> On Thu, May 25, 2017 at 03:24:30PM +0800, Peter Xu wrote:
[...]
> > > > > > >
>
Hi Peter,
Some updates on it.
> -Original Message-
> From: Peter Xu [mailto:pet...@redhat.com]
> Sent: Thursday, April 27, 2017 5:34 PM
> To: qemu-devel@nongnu.org
> Cc: Lan, Tianyu ; Paolo Bonzini ;
> Tian, Kevin ; Liu, Yi L ;
> pet...@redhat.com; Jason Wang ;
On Fri, May 19, 2017 at 11:19:47AM +0800, Peter Xu wrote:
Reviewed-by: Liu, Yi L
Regards,
Yi L
> Hardware support for VT-d device passthrough. Although current Linux can
> live with iommu=pt even without this, but this is faster than when using
> software passthrough.
>
> Signe
On Fri, Apr 28, 2017 at 01:51:42PM +0100, Jean-Philippe Brucker wrote:
> On 28/04/17 10:04, Liu, Yi L wrote:
Hi Jean,
Sorry for the delay response. Still have some follow-up comments on
per-device or per-group. Pls refer to comments inline.
> > On Wed, Apr 26, 2017 at 05:56:45PM +0
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
> &g
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 e
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" wrote:
>
> > From: "Liu, Yi L"
> >
> > This patch adds VFIO_IOMMU_SVM_BIND_TASK for potential PASID table
> > binding reques
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" wrote:
>
> > From: Jacob Pan
> >
> > This patch adds Intel VT-d specific function to implement
> > iommu_do_invalidate API.
>
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" wrote:
>
Hi Alex,
Pls refer to the open I mentioned in this email, I need your comments
on it to prepare the formal patchset for SVM virtualization. Thx.
&
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" wrote:
>
> > From: Jacob Pan
> >
> > Virtual IOMMU was proposed to support Shared Virtual Memory (SVM) use
> > case in the guest:
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" wrote:
>
> > From: "Liu, Yi L"
> >
> > This patch adds VFIO_IOMMU_TLB_INVALIDATE to propagate IOMMU TLB
> > invalidate re
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"
> >
> > This patch adds VFIO_IOMMU_TLB_INVALIDATE to propagate IOMMU TLB
> > invalidate request from
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"
> >
> >This patch adds IOCTL processing in vfio_iommu_type1 for
> >VFIO_IOMMU_SVM_BIND_TASK. Binds the PASID table bin
On Wed, Apr 26, 2017 at 06:12:02PM +0800, Liu, Yi L wrote:
> From: "Liu, Yi L"
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 invalidation from guest. ARM has simi
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 wrote:
> >
> > > On Wed, Apr 26, 2017 at 06:06:33PM +0800, Liu, Yi L wrote:
> > > &g
On Thu, 27 Apr 2017 18:53:17 +0800
Peter Xu 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 capabilities to guest.
> >
On Mon, May 08, 2017 at 03:32:17PM +0800, Peter Xu wrote:
> On Mon, May 08, 2017 at 04:07:44PM +1000, David Gibson wrote:
> > On Mon, May 08, 2017 at 01:48:14PM +0800, Peter Xu wrote:
> > > On Mon, May 01, 2017 at 02:58:22PM +1000, David Gibson wrote:
> > > > On Thu, Apr 27, 2017 at 05:34:18PM +080
ntain the TLB.
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
On Thu, Apr 27, 2017 at 05:34:20PM +0800, Peter Xu wrote:
> Time to consider a common stuff for IOMMU. Let's start from an common
> IOMMU object (which should be inlayed in custom IOMMU implementations)
> and a notifier mechanism.
>
> Let VT-d IOMMU be the first user.
>
> An example to use this p
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
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.
&
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
> >
> > Virtual IOMMU was proposed to support Shared Virtual Memory (SVM) use
> > case in the guest:
> >
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 wrote:
> >>
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:
> > >
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
> >
> > Virtual IOMMU was proposed to support Shared Virtual Memory (SVM) use
> > case in the guest:
> >
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"
> >
> > This patch adds VFIO_IOMMU_SVM_BIND_TASK for potential PASID table
> > binding requests.
> >
> > On VT-
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)
> > +{
> > +
From: "Liu, Yi L"
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 pIOMMU.
Signed-off-by: Liu, Yi L
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, Yi L
Signed-off-by: Jacob Pan
, Yi L
---
drivers/iommu/intel-iommu.c | 103 ++
include/linux/dma_remapping.h | 1 +
2 files changed, 104 insertions(+)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 646756c..6d5b939 100644
--- a/drivers/iommu/intel
From: "Liu, Yi L"
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
kind of SVM bind request. Previously,
in
pIOMMU. In future maybe PASID needs to be replaced.
Signed-off-by: Liu, Yi L
---
hw/i386/intel_iommu.c | 43 ++
hw/i386/intel_iommu_internal.h | 7 +++
2 files changed, 50 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386
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/
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
---
linux-headers/linux/iommu.h | 30 ++
1 file changed, 30 insertions(+)
create mode 10
From: "Liu, Yi L"
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
invalidation activities are passed d
future PASID may also need to be replaced.
Signed-off-by: Liu, Yi L
---
hw/i386/intel_iommu.c | 126 +
hw/i386/intel_iommu_internal.h | 33 +++
2 files changed, 159 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index
From: "Liu, Yi L"
This patch adds IOCTL processing in vfio_iommu_type1 for
VFIO_IOMMU_SVM_BIND_TASK. Binds the PASID table bind by
calling iommu_ops->bind_pasid_table to link the whole
PASID table to pIOMMU.
For VT-d, it is linking the guest PASID table to host pIOMMU.
This is
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
---
hw/v
From: "Liu, Yi L"
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 caching structure updates unless
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
---
hw/vfio/pci.c | 37 +
ify vIOMMU emulator to record necessary
information about the assigned device.
Signed-off-by: Liu, Yi L
---
include/exec/memory.h | 11 +++
memory.c | 12
2 files changed, 23 insertions(+)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 7bd1
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
---
hw/i386/intel_iommu.c | 56 ++
hw/i386/intel_iommu_internal.h | 10
2 files changed
inding pasid table of assigned devices.
This patch also adds model definition in iommu.h. It would be used to
check if the bind request is from a compatible entity. e.g. a bind
request from an intel_iommu emulator may not be supported by an ARM SMMU
driver.
Signed-off-by: Jacob Pan
Signed-off-by: Liu
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
---
hw/i386/intel_iommu.c | 121 +++--
hw/i386/intel_iommu_internal.h | 11
2 files changed, 127 inserti
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
---
hw/i386/intel_iommu.c | 10 ++
hw/i386/intel_iomm
This patch adds a separate function to fire IOMMU TLB invalidate notifier.
Signed-off-by: Liu, Yi L
---
include/exec/memory.h | 9 +
memory.c | 18 ++
2 files changed, 27 insertions(+)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index
-off-by: Liu, Yi L
---
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
+++ b/include/exec/memory.h
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
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
---
hw/vfio/common.c | 3 ++-
hw/virtio/vhost.c | 3 ++-
include/exec/memory.h | 2
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
---
hw/i386/intel_iommu.c | 32
hw/i386/intel_iommu_internal.h | 11
: Liu, Yi L
---
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,
hwaddr addr, granularity
e bind 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
---
hw/vf
y SVM capable
device.
Signed-off-by: Liu, Yi L
---
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 deletions(-)
diff --git a/hw/i386/int
n_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
---
hw/vfio/common.c | 37 +++---
hw/vfio/pci.c | 53 ++
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
---
linux-headers/linux/vfio.h | 18 ++
1 file changed, 18 insertions(+)
diff --git a/linux-headers/linux/vfio.h b/linux-headers/li
Report ecap.ECS=1 to guest by "-deivce intel-iommu, ecs=on" in QEMU Cmd
Signed-off-by: Liu, Yi L
---
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(+)
diff --git a/hw/i386/intel_io
n the 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" o
> -Original Message-
> From: Peter Xu [mailto:pet...@redhat.com]
> Sent: Thursday, April 20, 2017 1:40 PM
> To: Liu, Yi L
> Cc: Lan, Tianyu ; qemu-devel@nongnu.org; Michael S .
> Tsirkin ; Jason Wang ; Marcel
> Apfelbaum ; David Gibson ;
> Tian, Kevin
> Subje
> -Original Message-
> From: Peter Xu [mailto:pet...@redhat.com]
> Sent: Thursday, April 20, 2017 11:04 AM
> To: Lan, Tianyu
> Cc: Liu, Yi L ; qemu-devel@nongnu.org; Michael S . Tsirkin
> ; Jason Wang ; Marcel Apfelbaum
> ; David Gibson ; Tian, Kevin
>
> Subje
501 - 600 of 636 matches
Mail list logo