summaryrefslogtreecommitdiffstats
path: root/hw/virtio
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2014-06-23 17:06:25 +0800
committerMichael S. Tsirkin <mst@redhat.com>2014-06-23 17:38:00 +0300
commitc7ff54825b74f27c3aac85aad540542801630d0a (patch)
treeb3580b9b7be8116ca821e43fa7a1e6dd356643d2 /hw/virtio
parentd2fc39b4208709db95b6825c0e1b00ce6fbf0ecc (diff)
downloadhqemu-c7ff54825b74f27c3aac85aad540542801630d0a.zip
hqemu-c7ff54825b74f27c3aac85aad540542801630d0a.tar.gz
virtio-pci: Report an error when msix vectors init fails
Currently vectors silently cleared to 0 if the initialization is failed, but user should at least have one way to notice this. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio')
-rw-r--r--hw/virtio/virtio-pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index ce97514..57e1e61 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -976,6 +976,8 @@ static void virtio_pci_device_plugged(DeviceState *d)
if (proxy->nvectors &&
msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors, 1)) {
+ error_report("unable to init msix vectors to %" PRIu32,
+ proxy->nvectors);
proxy->nvectors = 0;
}
OpenPOWER on IntegriCloud