mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
qdev: Add a DEV_NVECTORS_UNSPECIFIED enum for unspecified nr of MSI vectors
net.c used a constant to signify no MSI vectors were specified. Extend that to all qdev devices. Signed-off-by: Amit Shah <amit.shah@redhat.com> Reported-by: "Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
1a8e2aaa3f
commit
75422b0d38
4 changed files with 9 additions and 6 deletions
|
@ -387,7 +387,7 @@ void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd)
|
|||
qdev_prop_set_vlan(dev, "vlan", nd->vlan);
|
||||
if (nd->netdev)
|
||||
qdev_prop_set_netdev(dev, "netdev", nd->netdev);
|
||||
if (nd->nvectors != NIC_NVECTORS_UNSPECIFIED &&
|
||||
if (nd->nvectors != DEV_NVECTORS_UNSPECIFIED &&
|
||||
qdev_prop_exists(dev, "vectors")) {
|
||||
qdev_prop_set_uint32(dev, "vectors", nd->nvectors);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue