[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9f3acdbc-26a5-46a1-bdbf-0a66bb7b43dd@linux.intel.com>
Date: Thu, 13 Oct 2022 09:08:05 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: Alex Williamson <alex.williamson@...hat.com>,
Robin Murphy <robin.murphy@....com>
Cc: baolu.lu@...ux.intel.com, joro@...tes.org, will@...nel.org,
iommu@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
kevin.tian@...el.com, suravee.suthikulpanit@....com,
vasant.hegde@....com, mjrosato@...ux.ibm.com,
schnelle@...ux.ibm.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 05/16] iommu: Move bus setup to IOMMU device
registration
Hi Alex,
On 2022/10/13 0:28, Alex Williamson wrote:
> On Mon, 15 Aug 2022 17:20:06 +0100
> Robin Murphy<robin.murphy@....com> wrote:
>
>> Move the bus setup to iommu_device_register(). This should allow
>> bus_iommu_probe() to be correctly replayed for multiple IOMMU instances,
>> and leaves bus_set_iommu() as a glorified no-op to be cleaned up next.
>>
>> At this point we can also handle cleanup better than just rolling back
>> the most-recently-touched bus upon failure - which may release devices
>> owned by other already-registered instances, and still leave devices on
>> other buses with dangling pointers to the failed instance. Now it's easy
>> to clean up the exact footprint of a given instance, no more, no less.
>>
>> Tested-by: Marek Szyprowski<m.szyprowski@...sung.com>
>> Reviewed-By: Krishna Reddy<vdumpa@...dia.com>
>> Reviewed-by: Kevin Tian<kevin.tian@...el.com>
>> Tested-by: Matthew Rosato<mjrosato@...ux.ibm.com> # s390
>> Tested-by: Niklas Schnelle<schnelle@...ux.ibm.com> # s390
>> Signed-off-by: Robin Murphy<robin.murphy@....com>
>> ---
>>
>> v4: Factor out the ops check in iommu_device_register() to keep the loop
>> even simpler, and comment the nominal change in behaviour
>>
>> drivers/iommu/iommu.c | 55 +++++++++++++++++++++++--------------------
>> 1 file changed, 30 insertions(+), 25 deletions(-)
> This introduces the below lockdep spat regression, bisected to commit:
>
> 57365a04c921 ("iommu: Move bus setup to IOMMU device registration")
>
> This can be reproduced with simple vfio-pci device assignment to a VM
> on x86_64 with VT-d. Thanks,
Thank you for reporting this. I have proposed below fix:
https://lore.kernel.org/all/20220927053109.4053662-1-baolu.lu@linux.intel.com/
Does it work for you?
Best regards,
baolu
Powered by blists - more mailing lists