[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6bd103f2-1034-60f0-53a3-17162400a452@arm.com>
Date: Thu, 9 Apr 2020 10:54:11 +0100
From: Robin Murphy <robin.murphy@....com>
To: John Garry <john.garry@...wei.com>,
"will@...nel.org" <will@...nel.org>,
"mark.rutland@....com" <mark.rutland@....com>
Cc: "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Shameerali Kolothum Thodi
<shameerali.kolothum.thodi@...wei.com>,
"harb@...erecomputing.com" <harb@...erecomputing.com>,
"tuanphan@...amperecomputing.com" <tuanphan@...amperecomputing.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] perf/smmuv3: Fix shared interrupt handling
On 2020-04-09 8:02 am, John Garry wrote:
> On 08/04/2020 17:49, Robin Murphy wrote:
>> IRQF_SHARED is dangerous, since it allows other agents to retarget the
>> IRQ's affinity without migrating PMU contexts to match, breaking the way
>> in which perf manages mutual exclusion for accessing events. Although
>> this means it's not realistically possible to support PMU IRQs being
>> shared with other drivers, we *can* handle sharing between multiple PMU
>> instances with some explicit affinity bookkeeping and manual interrupt
>> multiplexing.
>
> Hi Robin,
>
> Out of curiosity, do we even need to support shared interrupts for any
> implementations today?
Not that I know of, but we need the mitigation in general for future
drivers[1], and since this one already had a suspicious IRQF_SHARED it
was the ideal victim for prototyping. I haven't dared ask about Ampere's
SMMU story... :)
> D06 board:
>
> john@...ntu:~$ more /proc/interrupts | grep smmuv3-pmu
>
> 989: 0 0 0 0 ITS-pMSI 133120 Edge smmuv3-pmu
> 990: 0 0 0 0 ITS-pMSI 135168 Edge smmuv3-pmu
> 991: 0 0 0 0 ITS-pMSI 137216 Edge smmuv3-pmu
> 992: 0 0 0 0 ITS-pMSI 139264 Edge smmuv3-pmu
> 993: 0 0 0 0 ITS-pMSI 141312 Edge smmuv3-pmu
> 994: 0 0 0 0 ITS-pMSI 143360 Edge smmuv3-pmu
> 995: 0 0 0 0 ITS-pMSI 145408 Edge smmuv3-pmu
> 996: 0 0 0 0 ITS-pMSI 147456 Edge smmuv3-pmu
Yeah, MSIs are the best way to defeat any interrupt wiring!
Robin.
[1]
https://lore.kernel.org/linux-arm-kernel/3efa118a-5c85-6af9-e676-44087f1d398e@arm.com/
Powered by blists - more mailing lists