diff options
author | Avi Kivity <avi@redhat.com> | 2009-07-01 12:15:06 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-07-01 12:15:06 +0300 |
commit | e347f89a3d4773dfc22d8874c9906453d54768c7 (patch) | |
tree | 14db25c2f2089038c1c37b2911cd4df62af97229 /hw/msix.c | |
parent | Temporarily disable msix support on kvm with irqchip (diff) | |
download | qemu-kvm-e347f89a3d4773dfc22d8874c9906453d54768c7.tar.gz qemu-kvm-e347f89a3d4773dfc22d8874c9906453d54768c7.tar.bz2 qemu-kvm-e347f89a3d4773dfc22d8874c9906453d54768c7.zip |
Disable msix save/load if msix is not supported
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/msix.c')
-rw-r--r-- | hw/msix.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -286,6 +286,10 @@ void msix_save(PCIDevice *dev, QEMUFile *f) { unsigned nentries = (pci_get_word(dev->config + PCI_MSIX_FLAGS) & PCI_MSIX_FLAGS_QSIZE) + 1; + + if (!msix_supported) + return; + qemu_put_buffer(f, dev->msix_table_page, nentries * MSIX_ENTRY_SIZE); qemu_put_buffer(f, dev->msix_table_page + MSIX_PAGE_PENDING, (nentries + 7) / 8); @@ -296,6 +300,9 @@ void msix_load(PCIDevice *dev, QEMUFile *f) { unsigned n = dev->msix_entries_nr; + if (!msix_supported) + return; + if (!dev->cap_present & QEMU_PCI_CAP_MSIX) return; |