lkml.org 
[lkml]   [2018]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [RFC PATCH v2 00/10] vfio/mdev: IOMMU aware mediated device
Date
> From: Lu Baolu [mailto:baolu.lu@linux.intel.com]
> Sent: Thursday, August 30, 2018 12:09 PM
>
[...]
>
> In order to distinguish the IOMMU-capable mediated devices from those
> which still need to rely on parent devices, this patch set adds a
> domain type attribute to each mdev.
>
> enum mdev_domain_type {
> DOMAIN_TYPE_NO_IOMMU, /* Don't need any IOMMU support.
> * All isolation and protection
> * are handled by the parent
> * device driver with a device
> * specific mechanism.
> */
> DOMAIN_TYPE_ATTACH_PARENT, /* IOMMU can isolate and
> protect
> * the mdev, and the isolation
> * domain should be attaced with
> * the parent device.
> */
> };
>

ATTACH_PARENT is not like a good counterpart to NO_IOMMU.

what about DOMAIN_TYPE_NO_IOMMU/DOMAIN_TYPE_IOMMU? whether
to attach parent device is just internal logic.

Alternatively DOMAIN_TYPE_SOFTWARE/DOMAIN_TYPE_HARDWARE,
where software means iommu_domain is managed by software while
the other means managed by hardware.

One side note to Alex - with multiple domain extension in IOMMU layer,
this version combines IOMMU-capable usages in VFIO: PASID-based (as
in scalable iov) and RID-based (as the usage of mdev wrapper on any
device). Both cases share the common path - just binding the domain to the
parent device of mdev. IOMMU layer will handle two cases differently later.

Thanks
Kevin

\
 
 \ /
  Last update: 2018-09-05 05:02    [W:0.249 / U:17.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site