Re: [PATCH RFC v3 02/12] iommu: Add a flag to indicate immutable singleton group

2022-04-13 Thread Lu Baolu
On 2022/4/13 7:32, Tian, Kevin wrote: From: Lu Baolu Sent: Tuesday, April 12, 2022 9:03 PM On 2022/4/12 15:37, Tian, Kevin wrote: From: Lu Baolu Sent: Tuesday, April 12, 2022 1:09 PM On 2022/4/12 11:15, Tian, Kevin wrote: From: Lu Baolu Sent: Sunday, April 10, 2022 6:25 PM This adds a

RE: [PATCH RFC v3 02/12] iommu: Add a flag to indicate immutable singleton group

2022-04-12 Thread Tian, Kevin
> From: Lu Baolu > Sent: Tuesday, April 12, 2022 9:03 PM > > On 2022/4/12 15:37, Tian, Kevin wrote: > >> From: Lu Baolu > >> Sent: Tuesday, April 12, 2022 1:09 PM > >> On 2022/4/12 11:15, Tian, Kevin wrote: > From: Lu Baolu > Sent: Sunday, April 10, 2022 6:25 PM > >>> > >

Re: [PATCH RFC v3 02/12] iommu: Add a flag to indicate immutable singleton group

2022-04-12 Thread Lu Baolu
On 2022/4/12 15:39, Tian, Kevin wrote: From: Lu Baolu Sent: Sunday, April 10, 2022 6:25 PM @@ -898,6 +941,20 @@ int iommu_group_add_device(struct iommu_group *group, struct device *dev) list_add_tail(>list, >devices); if (group->domain && !iommu_is_attach_deferred(dev))

Re: [PATCH RFC v3 02/12] iommu: Add a flag to indicate immutable singleton group

2022-04-12 Thread Lu Baolu
On 2022/4/12 15:37, Tian, Kevin wrote: From: Lu Baolu Sent: Tuesday, April 12, 2022 1:09 PM On 2022/4/12 11:15, Tian, Kevin wrote: From: Lu Baolu Sent: Sunday, April 10, 2022 6:25 PM This adds a flag in the iommu_group struct to indicate an immutable singleton group, and uses standard PCI

Re: [PATCH RFC v3 02/12] iommu: Add a flag to indicate immutable singleton group

2022-04-12 Thread Lu Baolu
Hi Yi, On 2022/4/12 14:34, Yi Liu wrote: This adds a flag in the iommu_group struct to indicate an immutable singleton group, and uses standard PCI bus topology, isolation features, and DMA alias quirks to set the flag. If the device came from DT, assume it is static and then the

RE: [PATCH RFC v3 02/12] iommu: Add a flag to indicate immutable singleton group

2022-04-12 Thread Tian, Kevin
> From: Lu Baolu > Sent: Sunday, April 10, 2022 6:25 PM > @@ -898,6 +941,20 @@ int iommu_group_add_device(struct iommu_group > *group, struct device *dev) > list_add_tail(>list, >devices); > if (group->domain && !iommu_is_attach_deferred(dev)) > ret =

RE: [PATCH RFC v3 02/12] iommu: Add a flag to indicate immutable singleton group

2022-04-12 Thread Tian, Kevin
> From: Lu Baolu > Sent: Tuesday, April 12, 2022 1:09 PM > On 2022/4/12 11:15, Tian, Kevin wrote: > >> From: Lu Baolu > >> Sent: Sunday, April 10, 2022 6:25 PM > > > >> > >> This adds a flag in the iommu_group struct to indicate an immutable > >> singleton group, and uses standard PCI bus

Re: [PATCH RFC v3 02/12] iommu: Add a flag to indicate immutable singleton group

2022-04-12 Thread Yi Liu
Hi Baolu, On 2022/4/12 13:08, Lu Baolu wrote: Hi Kevin, Thanks for your time. On 2022/4/12 11:15, Tian, Kevin wrote: From: Lu Baolu Sent: Sunday, April 10, 2022 6:25 PM Some features require that a single device must be immutably isolated, even when hot plug is supported. This reads

Re: [PATCH RFC v3 02/12] iommu: Add a flag to indicate immutable singleton group

2022-04-11 Thread Lu Baolu
Hi Kevin, Thanks for your time. On 2022/4/12 11:15, Tian, Kevin wrote: From: Lu Baolu Sent: Sunday, April 10, 2022 6:25 PM Some features require that a single device must be immutably isolated, even when hot plug is supported. This reads confusing, as hotplug cannot be allowed in a

RE: [PATCH RFC v3 02/12] iommu: Add a flag to indicate immutable singleton group

2022-04-11 Thread Tian, Kevin
> From: Lu Baolu > Sent: Sunday, April 10, 2022 6:25 PM > > Some features require that a single device must be immutably isolated, > even when hot plug is supported. This reads confusing, as hotplug cannot be allowed in a singleton group. What you actually meant suppose to be: "Enabling

[PATCH RFC v3 02/12] iommu: Add a flag to indicate immutable singleton group

2022-04-10 Thread Lu Baolu
Some features require that a single device must be immutably isolated, even when hot plug is supported. For example, the SVA bind()/unbind() interfaces require that the device exists in a singleton group. If we have a singleton group that doesn't have ACS (or similar technologies) and someone