From 614e41bc26dda751321da47acb1f9cb287b52085 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 26 Jul 2012 15:35:15 +0100 Subject: kvm: Decouple 'MSI routing via irqfds' from 'kernel irqchip' Decouple another x86-specific assumption about what irqchips imply. Signed-off-by: Peter Maydell Signed-off-by: Avi Kivity --- hw/virtio-pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/virtio-pci.c') diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 125eded9ca..5e6e09efb7 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -627,7 +627,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign) int r, n; /* Must unset vector notifier while guest notifier is still assigned */ - if (kvm_irqchip_in_kernel() && !assign) { + if (kvm_msi_via_irqfd_enabled() && !assign) { msix_unset_vector_notifiers(&proxy->pci_dev); g_free(proxy->vector_irqfd); proxy->vector_irqfd = NULL; @@ -645,7 +645,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign) } /* Must set vector notifier after guest notifier has been assigned */ - if (kvm_irqchip_in_kernel() && assign) { + if (kvm_msi_via_irqfd_enabled() && assign) { proxy->vector_irqfd = g_malloc0(sizeof(*proxy->vector_irqfd) * msix_nr_vectors_allocated(&proxy->pci_dev)); -- cgit 1.4.1