virtio-net: Add only one queue pair when realizing
commit8c49756825dab430b17648637735c2736d23f778
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Sun, 28 Apr 2024 07:00:51 +0000 (28 16:00 +0900)
committerJason Wang <jasowang@redhat.com>
Tue, 4 Jun 2024 07:14:26 +0000 (4 15:14 +0800)
tree9be74c4576f71bb85d703a1c3b7c6024fcff0e55
parent283be5966eb7ec18fda3e95c979be620dfb8c72a
virtio-net: Add only one queue pair when realizing

Multiqueue usage is not negotiated yet when realizing. If more than
one queue is added and the guest never requests to enable multiqueue,
the extra queues will not be deleted when unrealizing and leak.

Fixes: f9d6dbf0bf6e ("virtio-net: remove virtio queues if the guest doesn't support multiqueue")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/virtio-net.c