mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-05 23:09:35 +00:00
Set virtio-serial device to have a default of 2 MSI vectors.
The virtio-serial device is expected to use 2 MSI vectors, one for control queue and a second shared for all queues. Signed-off-by: Gal Hammer <ghammer@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
0e98b436ec
commit
554f1997f0
5
hw/pc.h
5
hw/pc.h
@ -216,6 +216,11 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
|
|||||||
.driver = "virtio-blk-pci",\
|
.driver = "virtio-blk-pci",\
|
||||||
.property = "discard_granularity",\
|
.property = "discard_granularity",\
|
||||||
.value = stringify(0),\
|
.value = stringify(0),\
|
||||||
|
},{\
|
||||||
|
.driver = "virtio-serial-pci",\
|
||||||
|
.property = "vectors",\
|
||||||
|
/* DEV_NVECTORS_UNSPECIFIED as a uint32_t string */\
|
||||||
|
.value = stringify(0xFFFFFFFF),\
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -975,6 +975,9 @@ static int virtio_serial_init_pci(PCIDevice *pci_dev)
|
|||||||
if (!vdev) {
|
if (!vdev) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* backwards-compatibility with machines that were created with
|
||||||
|
DEV_NVECTORS_UNSPECIFIED */
|
||||||
vdev->nvectors = proxy->nvectors == DEV_NVECTORS_UNSPECIFIED
|
vdev->nvectors = proxy->nvectors == DEV_NVECTORS_UNSPECIFIED
|
||||||
? proxy->serial.max_virtserial_ports + 1
|
? proxy->serial.max_virtserial_ports + 1
|
||||||
: proxy->nvectors;
|
: proxy->nvectors;
|
||||||
@ -1155,7 +1158,7 @@ static const TypeInfo virtio_net_info = {
|
|||||||
|
|
||||||
static Property virtio_serial_properties[] = {
|
static Property virtio_serial_properties[] = {
|
||||||
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
|
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
|
||||||
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, DEV_NVECTORS_UNSPECIFIED),
|
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
|
||||||
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, serial.max_virtserial_ports, 31),
|
DEFINE_PROP_UINT32("max_ports", VirtIOPCIProxy, serial.max_virtserial_ports, 31),
|
||||||
|
Loading…
Reference in New Issue
Block a user