diff mbox

[12/11] msix: Trigger vector mask update check after vmload

Message ID 4FB25AC9.4020404@siemens.com
State New
Headers show

Commit Message

Jan Kiszka May 15, 2012, 1:31 p.m. UTC
In case we load a PCI device with active vectors, we have to process
them and invoke potential notifiers.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

This amends the QEMU series but should be equally relevant as bug fix
for qemu-kvm.

 hw/msix.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/hw/msix.c b/hw/msix.c
index 2114b99..59c7a83 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -351,6 +351,7 @@  void msix_save(PCIDevice *dev, QEMUFile *f)
 void msix_load(PCIDevice *dev, QEMUFile *f)
 {
     unsigned n = dev->msix_entries_nr;
+    unsigned int vector;
 
     if (!(dev->cap_present & QEMU_PCI_CAP_MSIX)) {
         return;
@@ -360,6 +361,10 @@  void msix_load(PCIDevice *dev, QEMUFile *f)
     qemu_get_buffer(f, dev->msix_table_page, n * PCI_MSIX_ENTRY_SIZE);
     qemu_get_buffer(f, dev->msix_table_page + MSIX_PAGE_PENDING, (n + 7) / 8);
     msix_update_function_masked(dev);
+
+    for (vector = 0; vector < n; vector++) {
+        msix_handle_mask_update(dev, vector, true);
+    }
 }
 
 /* Does device support MSI-X? */