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
On 27.02.2017 20:54, Jean-Philippe Brucker wrote:
Let the process that owns the device create an address space bond on
behalf of another process. We add a pid argument to the BIND_TASK ioctl,
allowing the caller to bind a foreign task. The expected program flow in
this case is:
* Process A
On Tue, Apr 25, 2017 at 3:27 PM, wrote:
> From: Sunil Goutham
>
> For software initiated address translation, when domain type is
> IOMMU_DOMAIN_IDENTITY i.e SMMU is bypassed, mimic HW behavior
> i.e return the same IOVA as translated address.
>
>
Hi Sunil,
On Tue, Apr 25, 2017 at 03:27:52PM +0530, sunil.kovv...@gmail.com wrote:
> From: Sunil Goutham
>
> For software initiated address translation, when domain type is
> IOMMU_DOMAIN_IDENTITY i.e SMMU is bypassed, mimic HW behavior
> i.e return the same IOVA as
On Wed, Apr 26, 2017 at 02:50:04PM +0530, Sunil Kovvuri wrote:
> On Mon, Apr 24, 2017 at 10:35 PM, Will Deacon wrote:
> > On Mon, Apr 24, 2017 at 10:26:53PM +0530, Sunil Kovvuri wrote:
> >> On Mon, Apr 24, 2017 at 9:38 PM, Will Deacon wrote:
> >> > On
Hi Tomasz,
Thanks for looking at this.
On 26/04/17 08:25, Tomasz Nowicki wrote:
> On 27.02.2017 20:54, Jean-Philippe Brucker wrote:
>> Let the process that owns the device create an address space bond on
>> behalf of another process. We add a pid argument to the BIND_TASK ioctl,
>> allowing the
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);
>>
This patch adds flag check when unregistering MAP/UNMAP notifier in
region_del. MAP/UNMAP notifier would be unregistered when iommu
memory region is deleted. This is to avoid unregistering other
notifiers.
Peter Xu's intel_iommu enhancement series has introduced dynamic
switch of IOMMU region. If
VT-d implementations reporting PASID or PRS fields as "Set", must also
report ecap.ECS as "Set". Extended-Context is required for SVM.
When ECS is reported, intel iommu driver would initiate extended root entry
and extended context entry, and also PASID table if there is any SVM capable
device.
This patch adds the following items:
* add new notifier flag IOMMU_NOTIFIER_IOMMU_TLB_INV = 0x8
* add new IOCTL cmd VFIO_IOMMU_TLB_INVALIDATE attached on container->fd
* add vfio_iommu_tlb_invalidate_notify() to propagate IOMMU TLB invalidate
to host
This new notifier is originated from the
With vIOMMU exposed to guest, vIOMMU emulator needs to do translation
between host and guest. e.g. a device-selective TLB flush, vIOMMU
emulator needs to replace guest SID with host SID so that to limit
the invalidation. This patch introduces a new callback
iommu_ops->record_device() to notify
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, Yi L
On Wed, Apr 26, 2017 at 04:13:29PM +0530, Sunil Kovvuri wrote:
> On Wed, Apr 26, 2017 at 3:31 PM, Will Deacon wrote:
> > Hi Sunil,
> >
> > On Tue, Apr 25, 2017 at 03:27:52PM +0530, sunil.kovv...@gmail.com wrote:
> >> From: Sunil Goutham
> >>
> >> For
Add a new IOCTL cmd VFIO_IOMMU_SVM_BIND_TASK attached on container->fd.
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, there is a discussion on it with
ARM
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(+)
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:
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
The invalidation of Extended-IOTLB invalidates first-level and nested
mappings from the IOTLB and the paging-structure-caches.
For SVM virtualization, iommu tlb invalidate notifier is added. The reason
is as below:
* On VT-d, MAP/UNMAP notifier would be used to shadow the changes of the
guest
For Extended-Device-TLB invalidation, intel_iommu emulator needs to check
all the assigned device and find the affected device. Replace the guest
SID with the host SID in the invalidate descriptor and pass the request to
host.
Host may just submit the request to corresponding invalidation queue
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
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_iommu_internal.h |
Hi,
This patchset introduces SVM virtualization for intel_iommu in
IOMMU/VFIO. The total SVM virtualization for intel_iommu touched
Qemu/IOMMU/VFIO.
Another patchset would change the Qemu. It is "[RFC PATCH 0/20] Qemu:
Extend intel_iommu emulator to support Shared Virtual Memory"
In this
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
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
From: Jacob Pan
Add Intel VT-d ops to the generic iommu_bind_pasid_table API
functions.
The primary use case is for direct assignment of SVM capable
device. Originated from emulated IOMMU in the guest, the request goes
through many layers (e.g. VFIO). Upon calling
From: Jacob Pan
This patch adds Intel VT-d specific function to implement
iommu_do_invalidate API.
The use case is for supporting caching structure invalidation
of assigned SVM capable devices. Emulated IOMMU exposes queue
invalidation capability and passes down
This patch adds support for propagating PASID-Cache invalidation to host.
Similar with Extended-IOTLB invalidation, intel_iommu emulator would also
check all the assigned devices and do sanity check, then pass it to host.
Host pIOMMU driver would replace some fields in the raw data before
From: Jacob Pan
Virtual IOMMU was proposed to support Shared Virtual Memory (SVM) use
case in the guest:
https://lists.gnu.org/archive/html/qemu-devel/2016-11/msg05311.html
As part of the proposed architecture, when a SVM capable PCI
device is assigned to a guest,
On Wed, Apr 26, 2017 at 3:31 PM, Will Deacon wrote:
> Hi Sunil,
>
> On Tue, Apr 25, 2017 at 03:27:52PM +0530, sunil.kovv...@gmail.com wrote:
>> From: Sunil Goutham
>>
>> For software initiated address translation, when domain type is
>>
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 =
Hi,
This patchset is proposing a solution to extend the current
Intel IOMMU emulator in QEMU to support Shared Virtual Memory
usage in guest. The whole SVM virtualization for intel_iommu
has two series which introduces changes in Qemu and VFIO/IOMMU.
This patchset mainly changes Qemu. For
On Wed, Apr 26, 2017 at 11:01:50AM +0100, Will Deacon wrote:
> Joerg: sorry, this is another one for you to pick up if possible.
Applied.
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
On Wed, Apr 26, 2017 at 5:06 PM, Will Deacon wrote:
> On Wed, Apr 26, 2017 at 04:13:29PM +0530, Sunil Kovvuri wrote:
>> On Wed, Apr 26, 2017 at 3:31 PM, Will Deacon wrote:
>> > Hi Sunil,
>> >
>> > On Tue, Apr 25, 2017 at 03:27:52PM +0530,
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 ++-
Add a separate function to fire pasid table bind notifier. In future
there may be more pasid bind type with different granularity. e.g.
binding pasid entry instead of binding pasid table. It can be supported
by adding bind_type, check bind_type in fire func and trigger correct
notifier.
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
VT-d has a nested mode which allows SVM virtualization. Link the whole
guest PASID table to host context entry and enable nested mode, pIOMMU
would do nested translation for DMA request. Thus achieve GVA->HPA
translation.
When extended-context-entry is modified in guest, intel_iommu emulator
memory_region_iommu_replay is used to do replay with MAP/UNMAP notifier.
However, other notifiers may be passed in, so add a check against notifier
flag to avoid potential error. e.g. memory_region_iommu_replay_all loops
all registered notifiers, may just pass in wrong notifier.
Signed-off-by:
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
This patch includes the following items:
* add vfio_register_notifier() for vfio notifier initialization
* add new notifier flag IOMMU_NOTIFIER_SVM_PASIDT_BIND = 0x4
* add vfio_iommu_bind_pasid_tbl_notify() to link guest pasid table
to host
This patch doesn't register new notifier in vfio
On 26/04/2017 12:06, Liu, Yi L wrote:
> +void memory_region_notify_iommu_svm_bind(MemoryRegion *mr,
> + void *data)
> +{
> +IOMMUNotifier *iommu_notifier;
> +IOMMUNotifierFlag request_flags;
> +
> +assert(memory_region_is_iommu(mr));
> +
> +
From: Joerg Roedel
It is not needed there anymore. All places needing it are
fixed.
Signed-off-by: Joerg Roedel
---
drivers/media/platform/mtk-vpu/mtk_vpu.c | 1 +
include/linux/iommu.h| 2 --
2 files changed, 1 insertion(+), 2
From: Joerg Roedel
The include file does not need any PCI specifics, so remove
that include. Also fix the places that relied on it.
Signed-off-by: Joerg Roedel
---
arch/arm64/mm/dma-mapping.c| 1 +
drivers/iommu/fsl_pamu.h | 1 +
Hi,
here is a small patch-set to remove some header dependencies
from the IOMMU header files. The linux/iommu.h file does not
include linux/pci.h and the iommu trace-event headers
anymore.
For this the report_iommu_fault function was moved to
iommu.c and the place relying on above includes were
There are several ways the bypass mode can be enabled. With commit
fccb4e3b8ab0 iommu: Allow default domain type to be set on the kernel command
line
there is the option to switch into bypass mode. And, depending on
devicetree options, bypass mode can be also enabled. This makes it
hard to
On Wed, 26 Apr 2017 17:56:45 +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
Hi Robert,
On Wed, Apr 26, 2017 at 04:38:13PM +0200, Robert Richter wrote:
> - pr_info("Adding device %s to group %d\n", dev_name(dev), group->id);
> + pr_info("Adding device %s to group %d, default domain type %d\n",
> + dev_name(dev), group->id,
> +
On Fri, Apr 07, 2017 at 08:17:47PM +0100, Jean-Philippe Brucker wrote:
> Here I propose a few ideas for extensions and optimizations. This is all
> very exploratory, feel free to correct mistakes and suggest more things.
>
> I. Linux host
>1. vhost-iommu
A qemu based
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-d, this IOCTL cmd would be used to link the guest PASID page table
> to host. While for other vendors, it may
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:
> https://lists.gnu.org/archive/html/qemu-devel/2016-11/msg05311.html
>
> As part of the proposed
On Mon, Apr 24, 2017 at 10:35 PM, Will Deacon wrote:
> On Mon, Apr 24, 2017 at 10:26:53PM +0530, Sunil Kovvuri wrote:
>> On Mon, Apr 24, 2017 at 9:38 PM, Will Deacon wrote:
>> > On Mon, Apr 24, 2017 at 05:29:36PM +0530, Geetha sowjanya wrote:
>> >> From:
On 26/04/17 19:29, jacob pan wrote:
> On Wed, 26 Apr 2017 17:56:45 +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
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)
> > +{
> > +IOMMUNotifier *iommu_notifier;
> > +
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-d, this IOCTL cmd would be
54 matches
Mail list logo