qemu-kvm: msix: Fire mask notifier on global mask changes
PATCH 1/1 qemu-kvm: msix: Fire mask notifier on global mask changes
Quoted 1 line
From: Jan Kiszka <[email protected]>
Also invoke the mask notifier if the global MSI-X mask is modified. For this purpose, we push the notifier call from the per-vector mask update to the central msix_handle_mask_update.
Signed-off-by Jan Kiszka <[email protected]>
Signed-off-by Michael S. Tsirkin <[email protected]>
---
This needs to be applied on top of:
msix: avoid mask updates if mask is unchanged
I'll send a reminder once it's merged.
hw/msix.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
hw/msix.c +6 -5
@@ -231,6 +231,12 @@ static void msix_handle_mask_update(PCIDevice *dev, int vector, bool was_masked)return ; } +if (dev->msix_mask_notifier) { +int ret; + ret = dev->msix_mask_notifier (dev, vector, is_masked); +assert (ret >=0 ); + } +if (!is_masked &&msix_is_pending (dev, vector)) {msix_clr_pending (dev, vector);msix_notify (dev, vector);
@@ -292,11 +298,6 @@ static void msix_mmio_write(void *opaque, target_phys_addr_t addr,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) && dev->msix_mask_notifier) { -int r = dev->msix_mask_notifier (dev, vector, -msix_is_masked (dev, vector)); -assert (r >=0 ); - }msix_handle_mask_update (dev, vector, was_masked); }
Signature · 1 line
1.7.5.53.gc233e
Avi Kivity
AppliedQuoted 7 lines · Michael S. Tsirkin
Quoted 1 line
From: Jan Kiszka <[email protected]>
Also invoke the mask notifier if the global MSI-X mask is modified. For this purpose, we push the notifier call from the per-vector mask update to the central
msix_handle_mask_update.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function