From: Robin Murphy <robin.murphy@arm.com> To: John Garry <john.garry@huawei.com>, "will@kernel.org" <will@kernel.org>, "mark.rutland@arm.com" <mark.rutland@arm.com> Cc: "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>, "harb@amperecomputing.com" <harb@amperecomputing.com>, "tuanphan@os.amperecomputing.com" <tuanphan@os.amperecomputing.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [RFC PATCH] perf/smmuv3: Fix shared interrupt handling Date: Thu, 9 Apr 2020 10:54:11 +0100 [thread overview] Message-ID: <6bd103f2-1034-60f0-53a3-17162400a452@arm.com> (raw) In-Reply-To: <34dd7c2e-b6db-684f-f0a2-73f2e6951308@huawei.com> 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@ubuntu:~$ 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/
WARNING: multiple messages have this Message-ID (diff)
From: Robin Murphy <robin.murphy@arm.com> To: John Garry <john.garry@huawei.com>, "will@kernel.org" <will@kernel.org>, "mark.rutland@arm.com" <mark.rutland@arm.com> Cc: "harb@amperecomputing.com" <harb@amperecomputing.com>, "tuanphan@os.amperecomputing.com" <tuanphan@os.amperecomputing.com>, Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [RFC PATCH] perf/smmuv3: Fix shared interrupt handling Date: Thu, 9 Apr 2020 10:54:11 +0100 [thread overview] Message-ID: <6bd103f2-1034-60f0-53a3-17162400a452@arm.com> (raw) In-Reply-To: <34dd7c2e-b6db-684f-f0a2-73f2e6951308@huawei.com> 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@ubuntu:~$ 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/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-04-09 9:54 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-08 16:49 [RFC PATCH] perf/smmuv3: Fix shared interrupt handling Robin Murphy 2020-04-08 16:49 ` Robin Murphy 2020-04-09 7:02 ` John Garry 2020-04-09 7:02 ` John Garry 2020-04-09 9:54 ` Robin Murphy [this message] 2020-04-09 9:54 ` Robin Murphy 2020-04-30 22:11 ` Tuan Phan 2020-04-30 22:11 ` Tuan Phan 2020-06-24 11:48 ` Robin Murphy 2020-06-24 11:48 ` Robin Murphy 2020-06-24 12:50 ` Will Deacon 2020-06-24 12:50 ` Will Deacon 2020-06-24 13:08 ` Robin Murphy 2020-06-24 13:08 ` Robin Murphy 2020-07-03 13:42 ` Will Deacon 2020-07-03 13:42 ` Will Deacon 2020-07-03 14:42 ` Robin Murphy 2020-07-03 14:42 ` Robin Murphy
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=6bd103f2-1034-60f0-53a3-17162400a452@arm.com \ --to=robin.murphy@arm.com \ --cc=harb@amperecomputing.com \ --cc=john.garry@huawei.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mark.rutland@arm.com \ --cc=shameerali.kolothum.thodi@huawei.com \ --cc=tuanphan@os.amperecomputing.com \ --cc=will@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.