[PATCH] msix: fix crash on msix_irq_entries access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since commit 889e30cc18e21f2091b77267dca8096d7dd34f8b,
msix.c doesn't include kvm/h anymore, so KVM_IRQCHIP
is never defined, and msix_irq_entries ends up as NULL.

Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
---
 hw/msix.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/hw/msix.c b/hw/msix.c
index 43efbd2..f12e4aa 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -389,12 +389,10 @@ int msix_init(struct PCIDevice *dev, unsigned short nentries,
     if (ret)
         goto err_config;
 
-#ifdef KVM_CAP_IRQCHIP
     if (kvm_enabled() && kvm_irqchip_in_kernel()) {
         dev->msix_irq_entries = qemu_malloc(nentries *
                                             sizeof *dev->msix_irq_entries);
     }
-#endif
 
     dev->cap_present |= QEMU_PCI_CAP_MSIX;
     return 0;
-- 
1.7.3-rc1
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux