[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-9.1.3 54/58] pci/msix: Fix msix pba read vector poll end calcula
From: |
Michael Tokarev |
Subject: |
[Stable-9.1.3 54/58] pci/msix: Fix msix pba read vector poll end calculation |
Date: |
Mon, 27 Jan 2025 23:25:40 +0300 |
The end vector calculation has a bug that results in polling fewer
than required vectors when reading at a non-zero offset in PBA memory.
Fixes: bbef882cc193 ("msi: add API to get notified about pending bit poll")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-Id: <20241212120402.1475053-1-npiggin@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 42e2a7a0ab23784e44fcb18369e06067abc89305)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 487e49834e..cc6e79ec67 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -250,7 +250,7 @@ static uint64_t msix_pba_mmio_read(void *opaque, hwaddr
addr,
PCIDevice *dev = opaque;
if (dev->msix_vector_poll_notifier) {
unsigned vector_start = addr * 8;
- unsigned vector_end = MIN(addr + size * 8, dev->msix_entries_nr);
+ unsigned vector_end = MIN((addr + size) * 8, dev->msix_entries_nr);
dev->msix_vector_poll_notifier(dev, vector_start, vector_end);
}
--
2.39.5
- [Stable-9.1.3 45/58] migration: Rename vmstate_info_nullptr, (continued)
- [Stable-9.1.3 45/58] migration: Rename vmstate_info_nullptr, Michael Tokarev, 2025/01/28
- [Stable-9.1.3 46/58] migration: Dump correct JSON format for nullptr replacement, Michael Tokarev, 2025/01/28
- [Stable-9.1.3 47/58] migration: Fix arrays of pointers in JSON writer, Michael Tokarev, 2025/01/28
- [Stable-9.1.3 49/58] multifd: bugfix for incorrect migration data with QPL compression, Michael Tokarev, 2025/01/28
- [Stable-9.1.3 50/58] tests/qtest/boot-serial-test: Correct HPPA machine name, Michael Tokarev, 2025/01/28
- [Stable-9.1.3 38/58] target/loongarch: Use actual operand size with vbsrl check, Michael Tokarev, 2025/01/28
- [Stable-9.1.3 48/58] multifd: bugfix for migration using compression methods, Michael Tokarev, 2025/01/28
- [Stable-9.1.3 53/58] pci: ensure valid link status bits for downstream ports, Michael Tokarev, 2025/01/28
- [Stable-9.1.3 51/58] backends/cryptodev-vhost-user: Fix local_error leaks, Michael Tokarev, 2025/01/28
- [Stable-9.1.3 52/58] hw/usb/hcd-xhci-pci: Use modulo to select MSI vector as per spec, Michael Tokarev, 2025/01/28
- [Stable-9.1.3 54/58] pci/msix: Fix msix pba read vector poll end calculation,
Michael Tokarev <=
- [Stable-9.1.3 55/58] tests: acpi: whitelist expected blobs, Michael Tokarev, 2025/01/28
- [Stable-9.1.3 57/58] tests: acpi: update expected blobs, Michael Tokarev, 2025/01/28
- [Stable-9.1.3 56/58] pci: acpi: Windows 'PCI Label Id' bug workaround, Michael Tokarev, 2025/01/28
- [Stable-9.1.3 58/58] hw/cxl: Fix msix_notify: Assertion `vector < dev->msix_entries_nr`, Michael Tokarev, 2025/01/28