提交 0d583647 编写于 作者: R Richard Henderson 提交者: Michael S. Tsirkin

virtio: Notice when the system doesn't support MSIx at all

And do not issue an error_report in that case.
Signed-off-by: NRichard Henderson <rth@twiddle.net>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 79859507
...@@ -1491,12 +1491,17 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp) ...@@ -1491,12 +1491,17 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp)
pci_set_long(cfg_mask->pci_cfg_data, ~0x0); pci_set_long(cfg_mask->pci_cfg_data, ~0x0);
} }
if (proxy->nvectors && if (proxy->nvectors) {
msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors, int err = msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors,
proxy->msix_bar)) { proxy->msix_bar);
error_report("unable to init msix vectors to %" PRIu32, if (err) {
proxy->nvectors); /* Notice when a system that supports MSIx can't initialize it. */
proxy->nvectors = 0; 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; proxy->pci_dev.config_write = virtio_write_config;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册