vfio-pci: Fix MSI/X debug code
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 30 Jun 2014 15:50:33 +0000 (09:50 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 30 Jun 2014 15:50:33 +0000 (09:50 -0600)
Use the correct MSI message function for debug info.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/misc/vfio.c

index 7b279c4..4975ccf 100644 (file)
@@ -642,9 +642,9 @@ static void vfio_msi_interrupt(void *opaque)
     MSIMessage msg;
 
     if (vdev->interrupt == VFIO_INT_MSIX) {
-        msg = msi_get_message(&vdev->pdev, nr);
-    } else if (vdev->interrupt == VFIO_INT_MSI) {
         msg = msix_get_message(&vdev->pdev, nr);
+    } else if (vdev->interrupt == VFIO_INT_MSI) {
+        msg = msi_get_message(&vdev->pdev, nr);
     } else {
         abort();
     }