lkml.org 
[lkml]   [2022]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 03/11] iommu: Add attach/detach_dev_pasid domain ops
On Mon, Mar 21, 2022 at 07:13:49AM +0000, Tian, Kevin wrote:

> /*
> * To keep things simple, SVA currently doesn't support IOMMU groups
> * with more than one device. Existing SVA-capable systems are not
> * affected by the problems that required IOMMU groups (lack of ACS
> * isolation, device ID aliasing and other hardware issues).
> */
> if (iommu_group_device_count(group) != 1)
> goto out_unlock;
>
> btw I didn't see any safeguard on above assumption in device hotplug path
> to a group which already has SVA enabled...

This is because using device_count is always wrong for these kinds of
tests.

The exclusion needs to be built up from the new owner mechanism. Once
the device is in SVA mode it is the same as having exclusive ownership
against any other probes()

Jason

\
 
 \ /
  Last update: 2022-03-21 12:54    [W:0.299 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site