Only accesses to the MSI-X table must trigger a call to
msix_handle_mask_update or a notifier invocation.

Signed-off-by: Jan Kiszka <[email protected]>
---
 hw/msix.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/msix.c b/hw/msix.c
index f5c8d08..0073ee5 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -278,7 +278,7 @@ static void msix_mmio_write(void *opaque, 
target_phys_addr_t addr,
 
     pci_set_long(dev->msix_table_page + offset, val);
 
-    if (msix_enabled(dev)) {
+    if (msix_enabled(dev) && vector < dev->msix_entries_nr) {
         if (kvm_enabled() && kvm_irqchip_in_kernel()) {
             kvm_msix_update(dev, vector, was_masked,
                             msix_is_masked(dev, vector));
-- 
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to