From: Thomas Gleixner <tglx@kernel.org>
To: "Vivian Wang" <wangruikang@iscas.ac.cn>,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Creeley, Brett" <bcreeley@amd.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>
Cc: Han Gao <gaohan@iscas.ac.cn>,
Vivian Wang <wangruikang@iscas.ac.cn>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
netdev@vger.kernel.org, linux-pci@vger.kernel.org,
linux-sound@vger.kernel.org, linux-riscv@lists.infradead.org,
sophgo@lists.linux.dev
Subject: Re: [PATCH v3 2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()
Date: Tue, 27 Jan 2026 10:27:58 +0100 [thread overview]
Message-ID: <87jyx3be1t.ffs@tglx> (raw)
In-Reply-To: <20260123-pci-msi-addr-mask-v3-2-9f9baa048524@iscas.ac.cn>
On Fri, Jan 23 2026 at 14:07, Vivian Wang wrote:
> Instead of a 32-bit/64-bit dichotomy, check the MSI address against
> msi_addr_mask.
>
> This allows platforms with MSI doorbell above 32-bit address space to
with a 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 addressable range of MSI of the device.
within the addressable
> 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;
No line break required. Let it stick out.
> + 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;
> }
> }
Other than those nits:
Reviewed-by: Thomas Gleixner <tglx@kernel.org>
next prev parent reply other threads:[~2026-01-27 9:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 6:07 [PATCH v3 0/4] PCI/MSI: Generalize no_64bit_msi into msi_addr_mask Vivian Wang
2026-01-23 6:07 ` [PATCH v3 1/4] PCI/MSI: Conservatively generalize " Vivian Wang
2026-01-23 18:00 ` Creeley, Brett
2026-01-27 9:25 ` Thomas Gleixner
2026-01-23 6:07 ` [PATCH v3 2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries() Vivian Wang
2026-01-27 9:27 ` Thomas Gleixner [this message]
2026-01-28 3:39 ` Vivian Wang
2026-01-23 6:07 ` [PATCH v3 3/4] drm/radeon: Raise msi_addr_mask to dma_bits Vivian Wang
2026-01-23 13:41 ` Christian König
2026-01-23 6:07 ` [PATCH v3 4/4] ALSA: hda/intel: " Vivian Wang
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=87jyx3be1t.ffs@tglx \
--to=tglx@kernel.org \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=andrew+netdev@lunn.ch \
--cc=bcreeley@amd.com \
--cc=bhelgaas@google.com \
--cc=chleroy@kernel.org \
--cc=christian.koenig@amd.com \
--cc=davem@davemloft.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=edumazet@google.com \
--cc=gaohan@iscas.ac.cn \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=netdev@vger.kernel.org \
--cc=npiggin@gmail.com \
--cc=pabeni@redhat.com \
--cc=perex@perex.cz \
--cc=simona@ffwll.ch \
--cc=sophgo@lists.linux.dev \
--cc=tiwai@suse.com \
--cc=wangruikang@iscas.ac.cn \
/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