Re: [PATCH v2 4/9] perf/cxl: Accept an overflow interrupt on MSI message number 0
Jonathan Cameron <[email protected]> Wed, 29 Jul 2026 20:28:27 +0100
| Newsgroups | org.kernel.vger.linux-cxl,org.kernel.vger.linux-perf-users |
|---|---|
| Message-ID | <20260729202827.5f2e9d4c@jic23-huawei> |
On Wed, 29 Jul 2026 07:55:50 -0700 Dave Jiang <[email protected]> wrote: > cxl_pmu_probe() rejects the PMU with -EINVAL when info->irq <= 0, but > info->irq holds the MSI/MSI-X message number the device signals overflow > on (CXL_PMU_CAP_MSI_N_MSK, a 0-based 4-bit field), with -1 meaning "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 is > wrongly refused and fails to probe. > > Reject only the no-interrupt case (info->irq < 0), matching the sibling > CXL mailbox and event IRQ handling. > > Fixes: 5d7107c72796 ("perf: CXL Performance Monitoring Unit driver") > Reported-by: [email protected] > Closes: https://sashiko.dev/#/patchset/[email protected]?part=1 > Assisted-by: Claude:claude-opus-4-8 > Signed-off-by: Dave Jiang <[email protected]> Anyone who puts the PMU on vector 0 is presumably sharing one vector for everything - which to me sounds unwise. Still indeed a bug. Reviewed-by: Jonathan Cameron <[email protected]> > --- > drivers/perf/cxl_pmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/perf/cxl_pmu.c b/drivers/perf/cxl_pmu.c > index 956da8202551..d1e810601e36 100644 > --- a/drivers/perf/cxl_pmu.c > +++ b/drivers/perf/cxl_pmu.c > @@ -876,7 +876,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);