qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] pci/msix: Fix msix pba read vector poll end calculation


From: Michael Tokarev
Subject: Re: [PATCH] pci/msix: Fix msix pba read vector poll end calculation
Date: Fri, 17 Jan 2025 09:26:10 +0300
User-agent: Mozilla Thunderbird

12.12.2024 15:04, Nicholas Piggin wrote:
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>

This smells like a qemu-stable material?
Though given the bug age, maybe not?

Thanks,

/mjt

diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 487e49834ee..cc6e79ec678 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);
      }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]