Re: [PATCH v4 04/11] perf/cxl: Accept an overflow interrupt on MSI message number 0
[email protected] Wed, 05 Aug 2026 16:06:36 +0000
| Newsgroups | org.kernel.vger.linux-perf-users |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: Pre-existing issues: - [High] Modifying CPU affinity on a shared interrupt line alters the affinity for all devices sharing the line. -- --- Patch [4]: [PATCH v4 04/11] perf/cxl: Accept an overflow interrupt on MSI message number 0 --- commit 54fa1d2700a4dd3fe1865a2f2f6744ccbafc3070 Author: Dave Jiang <[email protected]> Subject: perf/cxl: Accept an overflow interrupt on MSI message number 0 cxl_pmu_probe() rejects the PMU when info->irq <= 0, but at that point the field still holds the MSI/MSI-X message number the device signals overflow on, not a Linux virq. That number is 0-based, and -1 means no interrupt support. Message number 0 is valid and pci_irq_vector() takes a 0-based index, so a compliant device signalling on the first vector fails to probe. Link: https://sashiko.dev/#/patchset/[email protected]?part=1 > diff --git a/drivers/perf/cxl_pmu.c b/drivers/perf/cxl_pmu.c > index 40741e529d9b2..2bebbbe67a0a2 100644 > --- a/drivers/perf/cxl_pmu.c > +++ b/drivers/perf/cxl_pmu.c > @@ -873,7 +873,7 @@ static int cxl_pmu_probe(struct device *dev) > .capabilities = PERF_PMU_CAP_NO_EXCLUDE, > }; > > - if (info->irq <= 0) > + if (info->irq < 0) > return -EINVAL; > > rc = pci_irq_vector(pdev, info->irq); [Severity: High] This is a pre-existing issue, but I noticed the interrupt is requested as shared in cxl_pmu_probe() and then its affinity is forcibly modified during hotplug operations. The interrupt is requested as a shared interrupt: rc = devm_request_irq(dev, irq, cxl_pmu_irq, IRQF_SHARED | IRQF_NO_THREAD, irq_name, info); But the CPU affinity is later altered directly in cxl_pmu_online_cpu(): WARN_ON(irq_set_affinity(info->irq, cpumask_of(cpu))); And similarly in cxl_pmu_offline_cpu(): WARN_ON(irq_set_affinity(info->irq, cpumask_of(target))); Does this cause issues for other devices sharing the interrupt line? Modifying CPU affinity on a shared interrupt alters the affinity for all devices sharing the line, which could break CPU affinity expectations for other endpoints and potentially cause performance degradation or incorrect behavior. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=4