qemu/hw
Akihiko Odaki 0caed25cd1 virtio: Call set_features during reset
virtio-net expects set_features() will be called when the feature set
used by the guest changes to update the number of virtqueues but it is
not called during reset, which will clear all features, leaving the
queues added for VIRTIO_NET_F_MQ or VIRTIO_NET_F_RSS. Not only these
extra queues are visible to the guest, they will cause segmentation
fault during migration.

Call set_features() during reset to remove those queues for virtio-net
as we call set_status(). It will also prevent similar bugs for
virtio-net and other devices in the future.

Fixes: f9d6dbf0bf ("virtio-net: remove virtio queues if the guest doesn't support multiqueue")
Buglink: https://issues.redhat.com/browse/RHEL-73842
Cc: qemu-stable@nongnu.org
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20250421-reset-v2-1-e4c1ead88ea1@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-05-14 05:39:15 -04:00
..
9pfs 9pfs: fix 'total_open_fd' decrementation 2025-05-05 11:28:29 +02:00
acpi hw/acpi/ged: Fix wrong identation 2025-05-08 14:22:12 +02:00
adc qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
alpha qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
arm hw/arm/virt: Remove deprecated virt-4.0 machine 2025-05-06 15:02:35 +01:00
audio qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
avr qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
block vhost-user: return failure if backend crash when live migration 2025-05-14 05:39:15 -04:00
char vhost-user: return failure if backend crash when live migration 2025-05-14 05:39:15 -04:00
core system/runstate: add VM state change cb with return value 2025-05-14 05:39:14 -04:00
cpu qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
cxl hw/cxl/cxl-mailbox-utils: CXL CCI Get/Set alert config commands 2025-05-14 05:39:14 -04:00
display vhost-user: return failure if backend crash when live migration 2025-05-14 05:39:15 -04:00
dma qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
fsi qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
gpio hw/gpio/imx_gpio: Fix interpretation of GDIR polarity 2025-05-06 15:02:35 +01:00
hppa qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
hyperv hw/hyperv/hyperv: common compilation unit 2025-05-08 14:22:12 +02:00
i2c hw/i2c/imx: Always set interrupt status bit if interrupt condition occurs 2025-05-08 14:26:37 +02:00
i386 hw/i386/acpi-build: Fix typo and grammar in comment 2025-05-08 14:22:12 +02:00
ide qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
input vhost-user: return failure if backend crash when live migration 2025-05-14 05:39:15 -04:00
intc loongarch queue 2025-05-06 11:03:45 -04:00
ipack qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
ipmi qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
isa qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
loongarch hw/loongarch/virt: Allow user to customize OEM ID and OEM table ID 2025-05-06 09:17:32 +08:00
m68k qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
mem hw/cxl/cxl-mailbox-utils: CXL CCI Get/Set alert config commands 2025-05-14 05:39:14 -04:00
microblaze hw/microblaze: Evaluate TARGET_BIG_ENDIAN at compile time 2025-04-25 17:09:58 +02:00
mips hw/mips: Evaluate TARGET_BIG_ENDIAN at compile time 2025-04-25 17:09:58 +02:00
misc pci-testdev.c: Add membar-backed option for backing membar 2025-05-14 05:39:14 -04:00
net vhost-user: return failure if backend crash when live migration 2025-05-14 05:39:15 -04:00
nubus qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
nvme qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
nvram qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
openrisc qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pci pcie_sriov: Make a PCI device with user-created VF ARI-capable 2025-05-14 05:39:14 -04:00
pci-bridge qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pci-host hw/pci-host/designware: Fix viewport configuration 2025-05-06 15:02:35 +01:00
ppc include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
remote qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
riscv include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
rtc hw/rtc/mc146818rtc: Drop pre-v3 migration stream support 2025-04-30 20:44:20 +02:00
rx qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
s390x target/s390x: Return UVC cmd code, RC and RRC value when DIAG 308 Subcode 10 fails to enter secure mode 2025-04-30 09:48:57 +02:00
scsi vhost-scsi: support VIRTIO_SCSI_F_HOTPLUG 2025-05-14 05:39:15 -04:00
sd qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
sensor qom: Constify TypeInfo::class_data 2025-04-25 17:00:41 +02:00
sh4 include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
smbios ipmi: add fwinfo to pci ipmi devices 2025-04-11 10:50:42 -05:00
sparc qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
sparc64 qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
ssi hw/ssi/aspeed_smc: Allow 64-bit wide flash accesses 2025-05-05 09:38:55 +02:00
timer qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
tpm qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
tricore qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
uefi qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
ufs qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
usb hw/usb/hcd-xhci: Unmap canceled packet 2025-04-25 17:00:42 +02:00
vfio system/runstate: add VM state change cb with return value 2025-05-14 05:39:14 -04:00
virtio virtio: Call set_features during reset 2025-05-14 05:39:15 -04:00
vmapple qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
watchdog qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
xen xen: mapcache: Split mapcache_grants by ro and rw 2025-05-06 18:39:44 +02:00
xenpv hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
xtensa qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
Kconfig Misc HW patches 2025-03-05 21:54:58 +08:00
meson.build Misc HW patches 2025-03-05 21:54:58 +08:00