lkml.org 
[lkml]   [2022]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 01/15] iommu/vt-d: Handle race between registration and device probe
Hi Robin,

On 2022/7/15 20:37, Robin Murphy wrote:
>> In fact the rmrr list in the Intel IOMMU driver is always static after
>> parsing the ACPI/DMAR tables. There's no need to protect it with a lock.
>> Hence we can safely remove below down/up_read().
>
> IIRC that leads to RCU warnings via for_each_dev_scope(), though. I did
> try replacing this down_read() with rcu_read_lock(), but then it doesn't
> like the GFP_KERNEL allocation in iommu_alloc_resv_region(), and that's
> where I gave up :)
>
> I'm mostly left wondering whether the dmar_drhd_units list really needs
> to be RCU protected at all, as that seems to be the root of most of the
> problems here.

I just posted a fix patch here:

https://lore.kernel.org/linux-iommu/20220718235325.3952426-1-baolu.lu@linux.intel.com/

It can remove the recursive locking and RCU warnings. Can you please
take a look at it?

Best regards,
baolu

\
 
 \ /
  Last update: 2022-07-19 02:07    [W:0.059 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site