2382db
From 1311f877741665964f5c6a56854a033ad704ef46 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
2382db
Subject: [PATCH 04/10] 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
2382db
Bugzilla: 1110693 1110695
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
Upstream: 9035f8c09bebb63c0cc6014acf5c7066ef778aff
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
---
2382db
 hw/misc/vfio.c |    4 ++--
2382db
 1 files 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
-- 
2382db
1.7.1
2382db