diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2024-12-12 22:04:02 +1000 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2025-01-15 13:06:41 -0500 |
commit | 42e2a7a0ab23784e44fcb18369e06067abc89305 (patch) | |
tree | ca03f4f34bc6101d425d783cb52509a159b7000b /hw/pci | |
parent | 2c746dfe1c69896b0e434d37efe014654f0a3a65 (diff) | |
download | qemu-42e2a7a0ab23784e44fcb18369e06067abc89305.zip qemu-42e2a7a0ab23784e44fcb18369e06067abc89305.tar.gz qemu-42e2a7a0ab23784e44fcb18369e06067abc89305.tar.bz2 |
pci/msix: Fix msix pba read vector poll end calculation
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>
Diffstat (limited to 'hw/pci')
-rw-r--r-- | hw/pci/msix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci/msix.c b/hw/pci/msix.c index d8a55a6..57ec708 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); } |