[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <176981869678.2495410.6070010419940519202.tip-bot2@tip-bot2>
Date: Sat, 31 Jan 2026 00:18:16 -0000
From: "tip-bot2 for Vivian Wang" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Vivian Wang <wangruikang@...as.ac.cn>, Thomas Gleixner <tglx@...nel.org>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: irq/msi] PCI/MSI: Check the device specific address mask in
msi_verify_entries()
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@...as.ac.cn>
AuthorDate: Thu, 29 Jan 2026 09:56:07 +08:00
Committer: Thomas Gleixner <tglx@...nel.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@...as.ac.cn>
Signed-off-by: Thomas Gleixner <tglx@...nel.org>
Reviewed-by: Thomas Gleixner <tglx@...nel.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;
}
}
Powered by blists - more mailing lists