Hi James,

Regards to the relationship of iommu group and domain, the blog written by Alex
may help you. The blog explained very well on how iommu group is determined and
why.

http://vfio.blogspot.com/2014/08/iommu-groups-inside-and-out.html

> From: iommu-boun...@lists.linux-foundation.org [mailto:iommu-
> boun...@lists.linux-foundation.org] On Behalf Of James Sewart via iommu
> Sent: Thursday, November 8, 2018 7:30 PM
> Subject: Re: [RFC] iommu/vt-d: Group and domain relationship
> 
> Hey,
> 
> > On 8 Nov 2018, at 01:42, Lu Baolu <baolu...@linux.intel.com> wrote:
> >
> > Hi,
> >
> > On 11/8/18 1:55 AM, James Sewart wrote:
> >> Hey,
> >>> On 7 Nov 2018, at 02:10, Lu Baolu <baolu...@linux.intel.com> wrote:
> >>>
> >>> Hi,
> >>>
> >>> On 11/6/18 6:40 PM, James Sewart wrote:
> >>>> Hey Lu,
> >>>> Would you be able to go into more detail about the issues with

[...]

> >>>
> >>> Why do we want to open this door? Probably we want the generic iommu
> >>> layer to handle these things (it's called default domain).
> >> I’d like to allocate a domain and attach it to multiple devices in a
> >> group/multiple groups so that they share address translation, but still
> >> allow drivers for devices in those groups to use the dma_map_ops api.
> >
> > Just out of curiosity, why do you want to share a single domain across
> > multiple groups? By default, the groups and DMA domains are normally
> > 1-1 mapped, right?
> 
> Currently we see each device in a group with their own domain.
> find_or_alloc_domain looks at dma aliases to determine who shares domains
> whereas pci_device_group in the generic iommu code determines groups using
> a few other checks. We have observed internally that devices under a pcie
> switch will be put in the same group but they do not share a domain within
> that group.

Really? iommu group is DMA isolation unit. You said they are not sharing a 
domain.
Do you mean they have different IOVA address space by mentioning they are not
sharing a domain? Is there any special things(e.g. special IOVA allocation to 
avoid
unexpected P2P) done on your system? Normally, devices within an iommu group
should share an IOVA address space.

Thanks,
Yi Liu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to