Thread (44 messages) 44 messages, 5 authors, 2022-07-21

Re: [PATCH v3 01/15] iommu/vt-d: Handle race between registration and device probe

From: Lu Baolu <baolu.lu@linux.intel.com>
Date: 2022-07-19 00:06:27
Also in: linux-iommu, linux-s390, lkml

Hi Robin,

On 2022/7/15 20:37, Robin Murphy wrote:
quoted
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/ (local)

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

Best regards,
baolu

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help