From: Michael S. Tsirkin <[email protected]>

Clean up msix vector usage state on load. Since guest might have control
over it through the device, the device will have to load this state from
file.

Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>

diff --git a/hw/msix.c b/hw/msix.c
index 0d40079..227f482 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -428,6 +428,7 @@ void msix_load(PCIDevice *dev, QEMUFile *f)
         return;
     }
 
+    msix_free_irq_entries(dev);
     qemu_get_buffer(f, dev->msix_table_page, n * MSIX_ENTRY_SIZE);
     qemu_get_buffer(f, dev->msix_table_page + MSIX_PAGE_PENDING, (n + 7) / 8);
 }
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to