Skip to contentSkip to conversation

virtio-pci: Report an error when msix vectors init fails

PATCH New Fam Zheng 1 participant 1 message Jun 23, 2014

lore
Share & tools
lore

Fam Zheng

author
#0 lore raw

PATCH 1/1 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.

---
 hw/virtio/virtio-pci.c | 2 ++
 1 file changed, 2 insertions(+)
hw/virtio/virtio-pci.c +2 -0
index ce97514..57e1e61 100644
@@ -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;
     }
 
Signature · 1 line
2.0.0