958e1b
From 6b9b6494bc17888edf8a9673e645fb0416aa6e3e Mon Sep 17 00:00:00 2001
2382db
From: Alex Williamson <alex.williamson@redhat.com>
2382db
Date: Thu, 7 Aug 2014 21:03:03 +0200
958e1b
Subject: [PATCH 4/7] vfio-pci: Fix MSI/X debug code
2382db
2382db
Message-id: <20140807210302.11689.73901.stgit@gimli.home>
2382db
Patchwork-id: 60480
2382db
O-Subject: [RHEL7.0/z qemu-kvm PATCH v2 3/6] vfio-pci: Fix MSI/X debug code
958e1b
Bugzilla: 1098976
2382db
RH-Acked-by: Bandan Das <bsd@redhat.com>
2382db
RH-Acked-by: Amos Kong <akong@redhat.com>
2382db
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
2382db
2382db
Use the correct MSI message function for debug info.
2382db
2382db
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2382db
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
2382db
---
958e1b
 hw/misc/vfio.c | 4 ++--
958e1b
 1 file changed, 2 insertions(+), 2 deletions(-)
2382db
2382db
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
2382db
index 7f6ebf9..5f0460a 100644
2382db
--- a/hw/misc/vfio.c
2382db
+++ b/hw/misc/vfio.c
2382db
@@ -623,9 +623,9 @@ static void vfio_msi_interrupt(void *opaque)
2382db
     MSIMessage msg;
2382db
 
2382db
     if (vdev->interrupt == VFIO_INT_MSIX) {
2382db
-        msg = msi_get_message(&vdev->pdev, nr);
2382db
-    } else if (vdev->interrupt == VFIO_INT_MSI) {
2382db
         msg = msix_get_message(&vdev->pdev, nr);
2382db
+    } else if (vdev->interrupt == VFIO_INT_MSI) {
2382db
+        msg = msi_get_message(&vdev->pdev, nr);
2382db
     } else {
2382db
         abort();
2382db
     }
2382db
-- 
958e1b
1.8.3.1
2382db