qemu/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: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Michael S. Tsirkin 2009-07-05 15:58:44 +03:00 committed by Anthony Liguori
parent 3f6a3ee51e
commit 4bfd1712d7

View File

@ -302,6 +302,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);
}