提交 7b665b66 编写于 作者: A Amit Shah 提交者: Anthony Liguori

virtio-serial: pci: Allow MSI to be disabled

Michael noted we don't allow disabling of MSI for the virtio-serial-pci
device. Fix that.
Signed-off-by: NAmit Shah <amit.shah@redhat.com>
CC: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 ee4d45be
...@@ -500,8 +500,8 @@ static int virtio_serial_init_pci(PCIDevice *pci_dev) ...@@ -500,8 +500,8 @@ static int virtio_serial_init_pci(PCIDevice *pci_dev)
if (!vdev) { if (!vdev) {
return -1; return -1;
} }
vdev->nvectors = proxy->nvectors ? proxy->nvectors vdev->nvectors = proxy->nvectors == -1 ? proxy->max_virtserial_ports + 1
: proxy->max_virtserial_ports + 1; : proxy->nvectors;
virtio_init_pci(proxy, vdev, virtio_init_pci(proxy, vdev,
PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_VENDOR_ID_REDHAT_QUMRANET,
PCI_DEVICE_ID_VIRTIO_CONSOLE, PCI_DEVICE_ID_VIRTIO_CONSOLE,
...@@ -585,7 +585,7 @@ static PCIDeviceInfo virtio_info[] = { ...@@ -585,7 +585,7 @@ static PCIDeviceInfo virtio_info[] = {
.init = virtio_serial_init_pci, .init = virtio_serial_init_pci,
.exit = virtio_exit_pci, .exit = virtio_exit_pci,
.qdev.props = (Property[]) { .qdev.props = (Property[]) {
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 0), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, -1),
DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0), DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0),
DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features), DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features),
DEFINE_PROP_UINT32("max_ports", VirtIOPCIProxy, max_virtserial_ports, DEFINE_PROP_UINT32("max_ports", VirtIOPCIProxy, max_virtserial_ports,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册