QEMU fails with duplicate SaveStateEntry when using two legacy virtio input devices
Host environment
- Architecture: x86
- QEMU flavor: qemu-system-s390x
- QEMU version: >= 8.2.0
- QEMU command line:
qemu-system-s390x -M s390-ccw-virtio-2.6 -cpu max -nographic -device virtio-tablet-pci -device virtio-tablet-ccw
Emulated/Virtualized environment
- Operating system: n/a
- OS/kernel version: n/a
- Architecture: s390x
Description of problem
QEMU bails out when it is started with two virtio-input devices running in legacy virtio mode, using two different transports (like PCI and CCW on s390x).
Steps to reproduce
qemu-system-s390x -M s390-ccw-virtio-2.6 -cpu max -nographic -device virtio-multitouch-pci -device virtio-tablet-ccw
fails with:
qemu-system-s390x: -device virtio-tablet-ccw: savevm_state_handler_insert: Detected duplicate SaveStateEntry: id=virtio-input, instance_id=0x0
Additional information
The problem does not occur if using modern virtio devices (which automatically happens for -M s390-ccw-virtio-2.7 and newer) or if using virtio-input devices with the same transport (e.g. two PCI devices instead of one PCI and one CCW).
Also note that the problem only occurs since QEMU 8.1 since older versions did not check for duplicate SaveStateEntries (see commit caa91b3c ).
Edited by Thomas Huth