Date: Tue, 17 Jun 2025 19:21:58 GMT From: Krzysztof Galazka <kgalazka@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 7ffe1a1f6318 - main - pci: Save MSIX ctrl value before pci_mask_msix call Message-ID: <202506171921.55HJLwsa057455@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=7ffe1a1f6318bb0116900114950114e5f81418fd commit 7ffe1a1f6318bb0116900114950114e5f81418fd Author: Krzysztof Galazka <kgalazka@FreeBSD.org> AuthorDate: 2025-06-17 19:17:02 +0000 Commit: Krzysztof Galazka <kgalazka@FreeBSD.org> CommitDate: 2025-06-17 19:17:21 +0000 pci: Save MSIX ctrl value before pci_mask_msix call Function pci_mask_msix uses cached value of MSI-X CTRL register to verify if vector index is valid. Update that value in pci_alloc_msix_method before it is used to avoid kernel panic. Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com> Reviewed by: jhb Approved by: kbowling (mentor) Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D49484 --- sys/dev/pci/pci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 27355c335915..f94438cda041 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1927,7 +1927,11 @@ pci_alloc_msix_method(device_t dev, device_t child, int *count) } } - /* Mask all vectors. */ + /* + * Mask all vectors. Note that the message index assertion in + * pci_mask_msix requires msix_ctrl to be set. + */ + cfg->msix.msix_ctrl = ctrl; for (i = 0; i < msgnum; i++) pci_mask_msix(child, i);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506171921.55HJLwsa057455>