From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Bjorn Helgaas <helgaas@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
linux-pci@vger.kernel.org, Juergen Gross <jgross@suse.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH v2 3/3] pci/msi: remove pci_msi_ignore_mask
Date: Thu, 6 Feb 2025 09:33:26 +0100 [thread overview]
Message-ID: <Z6Rz1o3CnnuUiaoI@macbook.local> (raw)
In-Reply-To: <20250205151731.GA915292@bhelgaas>
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@citrix.com>
>
> Needs an ack from Thomas.
Thanks, moved him to the 'To:' field.
Regards, Roger.
next prev parent reply other threads:[~2025-02-06 8:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 10:33 [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge Roger Pau Monne
2025-01-14 10:33 ` [PATCH v2 1/3] xen/pci: do not register devices with segments >= 0x10000 Roger Pau Monne
2025-02-14 17:20 ` Bjorn Helgaas
2025-01-14 10:33 ` [PATCH v2 2/3] vmd: disable MSI remapping bypass under Xen Roger Pau Monne
2025-02-14 17:23 ` Bjorn Helgaas
2025-01-14 10:33 ` [PATCH v2 3/3] pci/msi: remove pci_msi_ignore_mask Roger Pau Monne
2025-02-05 15:17 ` Bjorn Helgaas
2025-02-06 8:33 ` Roger Pau Monné [this message]
2025-02-06 16:02 ` Bjorn Helgaas
2025-02-14 11:53 ` Thomas Gleixner
2025-02-05 14:37 ` [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge Roger Pau Monné
2025-02-14 17:17 ` Bjorn Helgaas
2025-02-14 18:46 ` Jürgen Groß
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=Z6Rz1o3CnnuUiaoI@macbook.local \
--to=roger.pau@citrix.com \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=helgaas@kernel.org \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox