[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/15] virtio: Notice when the system doesn't support
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 08/15] virtio: Notice when the system doesn't support MSIx at all |
Date: |
Fri, 2 Oct 2015 16:45:33 +0300 |
From: Richard Henderson <address@hidden>
And do not issue an error_report in that case.
Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/virtio/virtio-pci.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index eda8205..6703806 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1491,12 +1491,17 @@ static void virtio_pci_device_plugged(DeviceState *d,
Error **errp)
pci_set_long(cfg_mask->pci_cfg_data, ~0x0);
}
- if (proxy->nvectors &&
- msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors,
- proxy->msix_bar)) {
- error_report("unable to init msix vectors to %" PRIu32,
- proxy->nvectors);
- proxy->nvectors = 0;
+ if (proxy->nvectors) {
+ int err = msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors,
+ proxy->msix_bar);
+ if (err) {
+ /* Notice when a system that supports MSIx can't initialize it. */
+ if (err != -ENOTSUP) {
+ error_report("unable to init msix vectors to %" PRIu32,
+ proxy->nvectors);
+ }
+ proxy->nvectors = 0;
+ }
}
proxy->pci_dev.config_write = virtio_write_config;
--
MST
- [Qemu-devel] [PULL 00/15] virtio,pc features, fixes, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 01/15] virtio: introduce virtqueue_unmap_sg(), Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 06/15] exec: allocate PROT_NONE pages on top of RAM, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 08/15] virtio: Notice when the system doesn't support MSIx at all,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 11/15] vhost-user: unit test for new messages, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 12/15] memhp: extend address auto assignment to support gaps, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 07/15] pc: Add a comment explaining why pc_compat_2_4() doesn't exist, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 03/15] virtio-net: correctly drop truncated packets, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 05/15] oslib: allocate PROT_NONE pages on top of RAM, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 10/15] vhost-user-test: do not reinvent glib-compat.h, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 13/15] pc: memhp: force gaps between DIMM's GPA, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 02/15] virtio: introduce virtqueue_discard(), Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 09/15] virtio-9p: migrate virtio subsections, Michael S. Tsirkin, 2015/10/08