[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-9.2.1 34/41] pci/msix: Fix msix pba read vector poll end calcula
From: |
Michael Tokarev |
Subject: |
[Stable-9.2.1 34/41] pci/msix: Fix msix pba read vector poll end calculation |
Date: |
Mon, 27 Jan 2025 17:17:48 +0300 |
From: Nicholas Piggin <npiggin@gmail.com>
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.2.1 00/41] Patch Round-up for stable 9.2.1, freeze on 2025-02-06, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 01/41] 9pfs: fix regression regarding CVE-2023-2861, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 08/41] meson.build: Disallow libnfs v6 to fix the broken macOS build, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 11/41] s390x/s390-virtio-ccw: don't crash on weird RAM sizes, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 06/41] pc-bios: add missing riscv64 descriptor, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 05/41] roms: re-add edk2-basetools target, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 29/41] hw/ufs: Adjust value to match CPU's endian format, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 31/41] backends/cryptodev-vhost-user: Fix local_error leaks, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 35/41] tests: acpi: whitelist expected blobs, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 34/41] pci/msix: Fix msix pba read vector poll end calculation,
Michael Tokarev <=
- [Stable-9.2.1 09/41] target/i386: Reset TSCs of parked vCPUs too on VM reset, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 03/41] tcg/riscv: Fix StoreStore barrier generation, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 04/41] x86/loader: only patch linux kernels, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 30/41] tests/qtest/boot-serial-test: Correct HPPA machine name, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 32/41] hw/usb/hcd-xhci-pci: Use modulo to select MSI vector as per spec, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 33/41] pci: ensure valid link status bits for downstream ports, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 14/41] docs: Correct release of TCG trace-events removal, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 10/41] hw/intc/riscv_aplic: Fix APLIC in_clrip and clripnum write emulation, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 07/41] hw/intc/arm_gicv3_its: Zero initialize local DTEntry etc structs, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 13/41] docs: Correct '-runas' and '-fsdev/-virtfs proxy' indentation, Michael Tokarev, 2025/01/27