From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 706C2CA6CBF for ; Tue, 27 Jan 2026 09:28:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=D4LdHgf7GkEqusbmYdvsWw8+2zQFES7lf/Fw0YBJ9kk=; b=gFx9m6RfrhRBTo d4oSoWXM3TnfE74Kt6Se79BRieG2syhgAQmatJ9QvFXwcVEzWMXgRUh6iOnBNdOcAPnEQDB821XFe fOYozF0o9BbAwvopclqSQVrapIsBoQ+1272Fps30F6ZTNo79rvLOOVnOT0nAex9bJ1PZ8cGnOBlN4 jFp9MaXEUNJKU8fi8NyGltmxemTE2kvErFESGnHmbkSMT0Mz59I6Yz5A759G9W/fXBkaCX9JhfMIB MdXzog9DoZw1AeudMO2fo1lTcS2y15nQEqwCi+Z2jqDCBvuBruiKW9SZXi/F25l/0A+AYPeaCIQFm njNXRCkonKt8zzfrwkCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vkfMi-0000000Dw5l-31bz; Tue, 27 Jan 2026 09:28:04 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vkfMg-0000000Dw5c-2YS7 for linux-riscv@lists.infradead.org; Tue, 27 Jan 2026 09:28:03 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id A3E6260143; Tue, 27 Jan 2026 09:28:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA751C116C6; Tue, 27 Jan 2026 09:28:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769506081; bh=NUtdM1nWlicDFUqsuPzcoMB/gzA3aziNceLt7F8iSE8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=oEO2FeMpvi1NaSCO2Gn8Cj6UbLkdPGgHSCr2a7tIho96JHKe2OPIWUlyKRZRs+g/p bOydMQemiNt+degt62tyGOKCzCMxGQP/+fWYHd5fQoEeMMtMBrEhvbKzxQI+uASfo+ WnvxAODGQoHBidevnuikSB14Qm/l1uuA8SKt8swMro14a0ryd5Zo1SXOw/QtvrZtYe o9wowBLm4NktfnH4gj6vq4gkvSOgZCJwp+WvtCKPASNeo0iUYm1k9Mj89Qs/nBEKdC UoXofhNhiJNlSAVG+UzzUh/MKGzx0b0QaoSEXAsSwPPoP60aL3O7aNFQz0OEp+KLaq Ksz08X55xve/w== From: Thomas Gleixner To: Vivian Wang , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Alex Deucher , Christian =?utf-8?Q?K=C3=B6nig?= , David Airlie , Simona Vetter , "Creeley, Brett" , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Bjorn Helgaas , Jaroslav Kysela , Takashi Iwai Cc: Han Gao , Vivian Wang , 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() In-Reply-To: <20260123-pci-msi-addr-mask-v3-2-9f9baa048524@iscas.ac.cn> References: <20260123-pci-msi-addr-mask-v3-0-9f9baa048524@iscas.ac.cn> <20260123-pci-msi-addr-mask-v3-2-9f9baa048524@iscas.ac.cn> Date: Tue, 27 Jan 2026 10:27:58 +0100 Message-ID: <87jyx3be1t.ffs@tglx> MIME-Version: 1.0 X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv