As long as MSI-X is disabled, it's incorrect to invoke msix_handle_mask_update on per-vector mask changes. That may misguide the config notifier callback or spuriously trigger an MSI event. Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx> --- hw/msix.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index e351c68..f5c8d08 100644 --- a/hw/msix.c +++ b/hw/msix.c @@ -277,12 +277,16 @@ static void msix_mmio_write(void *opaque, target_phys_addr_t addr, bool was_masked = msix_is_masked(dev, vector); pci_set_long(dev->msix_table_page + offset, val); - if (kvm_enabled() && kvm_irqchip_in_kernel()) { - kvm_msix_update(dev, vector, was_masked, msix_is_masked(dev, vector)); - } - if (was_masked != msix_is_masked(dev, vector)) { - msix_handle_mask_update(dev, vector); + if (msix_enabled(dev)) { + if (kvm_enabled() && kvm_irqchip_in_kernel()) { + kvm_msix_update(dev, vector, was_masked, + msix_is_masked(dev, vector)); + } + + if (was_masked != msix_is_masked(dev, vector)) { + msix_handle_mask_update(dev, vector); + } } } -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html