From: Michael S. Tsirkin Date: Sun, 5 Jul 2009 12:58:44 +0000 (+0300) Subject: qemu/msi: clean used vectors state on load X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4bfd1712d787db62586e620cb84d35f6afa5b772;p=qemu.git 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 Signed-off-by: Anthony Liguori --- diff --git a/hw/msix.c b/hw/msix.c index e1308572ef..47e014017c 100644 --- a/hw/msix.c +++ b/hw/msix.c @@ -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); }