aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2009-07-05 15:58:44 +0300
committerAvi Kivity <avi@redhat.com>2009-07-09 13:02:04 +0300
commit2460709165b51020c71b094125bc2a4cd605a754 (patch)
tree4938bfdb4de7a54994ff7044fe1a798a611c0d5a
parent7eeb73843fcc86ea25f2e2fd616b1401c9b08d81 (diff)
msi: clean used vectors state on load
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 <mst@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--hw/msix.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/msix.c b/hw/msix.c
index 0d400793e..227f482e4 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);
}