From: "tip-bot2 for Vivian Wang" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Vivian Wang <wangruikang@iscas.ac.cn>,
Thomas Gleixner <tglx@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/msi] PCI/MSI: Check the device specific address mask in msi_verify_entries()
Date: Sat, 31 Jan 2026 00:18:16 -0000 [thread overview]
Message-ID: <176981869678.2495410.6070010419940519202.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260129-pci-msi-addr-mask-v4-2-70da998f2750@iscas.ac.cn>
The following commit has been merged into the irq/msi branch of tip:
Commit-ID: 52f0d862f595a2fa18ef44532619a080c24fe4cb
Gitweb: https://git.kernel.org/tip/52f0d862f595a2fa18ef44532619a080c24fe4cb
Author: Vivian Wang <wangruikang@iscas.ac.cn>
AuthorDate: Thu, 29 Jan 2026 09:56:07 +08:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Sat, 31 Jan 2026 01:11:48 +01:00
PCI/MSI: Check the device specific address mask in msi_verify_entries()
Instead of a 32-bit/64-bit dichotomy, check the MSI address against
the device specific address mask.
This allows platforms with an MSI doorbell address above the 32-bit limit
to work with devices without full 64-bit MSI address support, as long as
the doorbell is within the addressable range of the device.
[ tglx: Massaged changelog ]
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260129-pci-msi-addr-mask-v4-2-70da998f2750@iscas.ac.cn
---
drivers/pci/msi/msi.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
index fb9a42b..e241217 100644
--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -321,14 +321,16 @@ static int msi_setup_msi_desc(struct pci_dev *dev, int nvec,
static int msi_verify_entries(struct pci_dev *dev)
{
struct msi_desc *entry;
+ u64 address;
if (dev->msi_addr_mask == DMA_BIT_MASK(64))
return 0;
msi_for_each_desc(entry, &dev->dev, MSI_DESC_ALL) {
- if (entry->msg.address_hi) {
- pci_err(dev, "arch assigned 64-bit MSI address %#x%08x but device only supports 32 bits\n",
- entry->msg.address_hi, entry->msg.address_lo);
+ address = (u64)entry->msg.address_hi << 32 | entry->msg.address_lo;
+ if (address & ~dev->msi_addr_mask) {
+ pci_err(dev, "arch assigned 64-bit MSI address %#llx above device MSI address mask %#llx\n",
+ address, dev->msi_addr_mask);
break;
}
}
next prev parent reply other threads:[~2026-01-31 0:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 1:56 [PATCH v4 0/4] PCI/MSI: Generalize no_64bit_msi into msi_addr_mask Vivian Wang
2026-01-29 1:56 ` [PATCH v4 1/4] PCI/MSI: Conservatively generalize " Vivian Wang
2026-01-31 0:18 ` [tip: irq/msi] PCI/MSI: Convert the boolean no_64bit_msi flag to a DMA address mask tip-bot2 for Vivian Wang
2026-02-26 18:25 ` [PATCH v4 1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask Mark Bloch
2026-02-27 5:25 ` Vivian Wang
2026-02-27 8:16 ` Mark Bloch
2026-02-27 16:49 ` Bjorn Helgaas
2026-01-29 1:56 ` [PATCH v4 2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries() Vivian Wang
2026-01-31 0:18 ` tip-bot2 for Vivian Wang [this message]
2026-01-29 1:56 ` [PATCH v4 3/4] drm/radeon: Raise msi_addr_mask to dma_bits Vivian Wang
2026-01-29 8:08 ` Christian König
2026-01-31 0:18 ` [tip: irq/msi] drm/radeon: Make MSI address limit based on the device DMA limit tip-bot2 for Vivian Wang
2026-01-29 1:56 ` [PATCH v4 4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits Vivian Wang
2026-01-31 0:18 ` [tip: irq/msi] ALSA: hda/intel: Make MSI address limit based on the device DMA limit tip-bot2 for Vivian Wang
2026-01-29 21:51 ` [PATCH v4 0/4] PCI/MSI: Generalize no_64bit_msi into msi_addr_mask Thomas Gleixner
2026-02-20 4:10 ` patchwork-bot+linux-riscv
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=176981869678.2495410.6070010419940519202.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=wangruikang@iscas.ac.cn \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®