yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
9ae3a8
From 31c38d22c1d0e852c05eb8d74295f940fc93aaa8 Mon Sep 17 00:00:00 2001
9ae3a8
From: Fam Zheng <famz@redhat.com>
9ae3a8
Date: Mon, 14 Jul 2014 02:38:04 -0500
9ae3a8
Subject: [CHANGE 23/29] virtio-pci: Report an error when msix vectors init
9ae3a8
 fails
9ae3a8
To: rhvirt-patches@redhat.com,
9ae3a8
    jen@redhat.com
9ae3a8
9ae3a8
RH-Author: Fam Zheng <famz@redhat.com>
9ae3a8
Message-id: <1405305484-12175-1-git-send-email-famz@redhat.com>
9ae3a8
Patchwork-id: 59873
9ae3a8
O-Subject: [RHEL-7 qemu-kvm PATCH] virtio-pci: Report an error when msix vectors init fails
9ae3a8
Bugzilla: 1095645
9ae3a8
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
9ae3a8
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
9ae3a8
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
9ae3a8
9ae3a8
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1095645
9ae3a8
Brew:     http://brewweb.devel.redhat.com/brew/taskinfo?taskID=7695836
9ae3a8
9ae3a8
Currently vectors silently cleared to 0 if the initialization is failed,
9ae3a8
but user should at least have one way to notice this.
9ae3a8
9ae3a8
Signed-off-by: Fam Zheng <famz@redhat.com>
9ae3a8
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
9ae3a8
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
9ae3a8
9ae3a8
(cherry picked from commit c7ff54825b74f27c3aac85aad540542801630d0a)
9ae3a8
Signed-off-by: Fam Zheng <famz@redhat.com>
9ae3a8
---
9ae3a8
 hw/virtio/virtio-pci.c | 2 ++
9ae3a8
 1 file changed, 2 insertions(+)
9ae3a8
9ae3a8
Signed-off-by: jen <jen@redhat.com>
9ae3a8
---
9ae3a8
 hw/virtio/virtio-pci.c | 2 ++
9ae3a8
 1 file changed, 2 insertions(+)
9ae3a8
9ae3a8
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
9ae3a8
index 00df4aa..7c09ac4 100644
9ae3a8
--- a/hw/virtio/virtio-pci.c
9ae3a8
+++ b/hw/virtio/virtio-pci.c
9ae3a8
@@ -981,6 +981,8 @@ static void virtio_pci_device_plugged(DeviceState *d)
9ae3a8
 
9ae3a8
     if (proxy->nvectors &&
9ae3a8
         msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors, 1)) {
9ae3a8
+        error_report("unable to init msix vectors to %" PRIu32,
9ae3a8
+                     proxy->nvectors);
9ae3a8
         proxy->nvectors = 0;
9ae3a8
     }
9ae3a8
 
9ae3a8
-- 
9ae3a8
1.9.3
9ae3a8