[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6Rz1o3CnnuUiaoI@macbook.local>
Date: Thu, 6 Feb 2025 09:33:26 +0100
From: Roger Pau Monné <roger.pau@...rix.com>
To: Bjorn Helgaas <helgaas@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org, xen-devel@...ts.xenproject.org,
linux-pci@...r.kernel.org, Juergen Gross <jgross@...e.com>,
Bjorn Helgaas <bhelgaas@...gle.com>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v2 3/3] pci/msi: remove pci_msi_ignore_mask
On Wed, Feb 05, 2025 at 09:17:31AM -0600, Bjorn Helgaas wrote:
> Please run git log --oneline and match the subject line capitalization
> style, i.e.,
>
> PCI/MSI: Remove ...
>
> But it doesn't look like this actually *removes* the functionality, it
> just implements it differently so it can be applied more selectively.
>
> So maybe the subject should say something like "control use of MSI
> masking per IRQ domain, not globally"
What about:
PCI/MSI: convert pci_msi_ignore_mask to per MSI domain flag
Which is slightly shorter?
>
> On Tue, Jan 14, 2025 at 11:33:13AM +0100, Roger Pau Monne wrote:
> > Setting pci_msi_ignore_mask inhibits the toggling of the mask bit for both
> > MSI and MSI-X entries globally, regardless of the IRQ chip they are using.
> > Only Xen sets the pci_msi_ignore_mask when routing physical interrupts over
> > event channels, to prevent PCI code from attempting to toggle the maskbit,
> > as it's Xen that controls the bit.
> >
> > However, the pci_msi_ignore_mask being global will affect devices that use
> > MSI interrupts but are not routing those interrupts over event channels
> > (not using the Xen pIRQ chip). One example is devices behind a VMD PCI
> > bridge. In that scenario the VMD bridge configures MSI(-X) using the
> > normal IRQ chip (the pIRQ one in the Xen case), and devices behind the
> > bridge configure the MSI entries using indexes into the VMD bridge MSI
> > table. The VMD bridge then demultiplexes such interrupts and delivers to
> > the destination device(s). Having pci_msi_ignore_mask set in that scenario
> > prevents (un)masking of MSI entries for devices behind the VMD bridge.
> >
> > Move the signaling of no entry masking into the MSI domain flags, as that
> > allows setting it on a per-domain basis. Set it for the Xen MSI domain
> > that uses the pIRQ chip, while leaving it unset for the rest of the
> > cases.
> >
> > Remove pci_msi_ignore_mask at once, since it was only used by Xen code, and
> > with Xen dropping usage the variable is unneeded.
> >
> > This fixes using devices behind a VMD bridge on Xen PV hardware domains.
> >
> > Albeit Devices behind a VMD bridge are not known to Xen, that doesn't mean
> > Linux cannot use them. By inhibiting the usage of
> > VMD_FEAT_CAN_BYPASS_MSI_REMAP and the removal of the pci_msi_ignore_mask
> > bodge devices behind a VMD bridge do work fine when use from a Linux Xen
> > hardware domain. That's the whole point of the series.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@...rix.com>
>
> Needs an ack from Thomas.
Thanks, moved him to the 'To:' field.
Regards, Roger.
Powered by blists - more mailing lists