Linux PCI subsystem development
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Bjorn Helgaas <helgaas@kernel.org>,
	Roger Pau Monne <roger.pau@citrix.com>
Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
	linux-pci@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	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 v3 3/3] PCI/MSI: Convert pci_msi_ignore_mask to per MSI domain flag
Date: Fri, 21 Mar 2025 09:00:09 +0100	[thread overview]
Message-ID: <846c80f8-b80f-49fd-8a50-3fe8a473b8ec@suse.com> (raw)
In-Reply-To: <20250320210741.GA1099701@bhelgaas>


[-- Attachment #1.1.1: Type: text/plain, Size: 2355 bytes --]

On 20.03.25 22:07, Bjorn Helgaas wrote:
> On Wed, Feb 19, 2025 at 10:20:57AM +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>
>> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
>> Acked-by: Juergen Gross <jgross@suse.com>
> 
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> 
> I assume you'll merge this series via the Xen tree.  Let me know if
> otherwise.

I've pushed the series to the linux-next branch of the Xen tree.


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2025-03-21  8:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250219092059.90850-1-roger.pau@citrix.com>
2025-02-19  9:20 ` [PATCH v3 2/3] PCI: vmd: Disable MSI remapping bypass under Xen Roger Pau Monne
2025-03-03 14:16   ` Roger Pau Monné
2025-03-20 21:06   ` Bjorn Helgaas
2025-02-19  9:20 ` [PATCH v3 3/3] PCI/MSI: Convert pci_msi_ignore_mask to per MSI domain flag Roger Pau Monne
2025-03-20 21:07   ` Bjorn Helgaas
2025-03-21  8:00     ` Jürgen Groß [this message]
2025-03-24 14:29       ` Daniel Gomez
2025-03-24 17:51         ` Roger Pau Monné
2025-03-24 18:58           ` Daniel Gomez
2025-03-24 19:18             ` Roger Pau Monné
2025-03-24 20:45               ` Daniel Gomez
2025-03-25  8:11               ` Thomas Gleixner
2025-03-25  9:20                 ` Thomas Gleixner
2025-03-25  9:47                   ` Daniel Gomez
2025-03-25 10:22                   ` Roger Pau Monné
2025-03-25 10:27                     ` Thomas Gleixner
2025-03-25 10:55                       ` Roger Pau Monné
2025-03-26  8:14                         ` Thomas Gleixner
2025-03-26  8:10                   ` Roger Pau Monné
2025-03-26 11:26                   ` Marek Szyprowski
2025-03-26 12:05                   ` [PATCH] PCI/MSI: Handle the NOMASK flag correctly for all PCI/MSI backends Thomas Gleixner
2025-03-26 12:09                     ` Jürgen Groß
2025-03-26 12:46                       ` Thomas Gleixner
2025-03-26 12:16                     ` Juergen Gross
2025-03-30 14:57                   ` Bert Karwatzki
2025-03-26 11:04   ` [PATCH v3 3/3] PCI/MSI: Convert pci_msi_ignore_mask to per MSI domain flag Borislav Petkov
2025-03-26 11:14     ` Roger Pau Monné
2025-03-26 11:21       ` Borislav Petkov

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=846c80f8-b80f-49fd-8a50-3fe8a473b8ec@suse.com \
    --to=jgross@suse.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=helgaas@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=roger.pau@citrix.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