Description of problem: I hot-plug 2 virtio block devices on a RHEL5.7 guest, then I hot-unplug one of them, and reboot guest. qemu will exit with signal 11 during rebooting. Version-Release number of selected component (if applicable): host: RHEL-5.7, guest: RHEL-5.7 #rpm -q kernel kernel-2.6.18-238.el5 #rpm -q kvm kvm-83-231.el5 How reproducible: 100% Steps to Reproduce: 1. start a guest. # qemu ... --drive file=/RHEL-Server-5.7-32-virtio.qcow2,index=0,if=virtio,media=disk,cache=none,boot=on,format=qcow2 ... 2. hot-plug 2 block device via monitor: (qemu) pci_add pci_addr=auto storage file=storage_64k.qcow2,if=virtio,format=qcow2,cache=none,werror=stop pci_add pci_addr=auto storage file=storage_64k.qcow2,if=virtio OK domain 0, bus 0, slot 7, function 0 (qemu) pci_add pci_addr=auto storage file=storage_4k.qcow2,if=virtio,format=qcow2,cache=none,werror=stop pci_add pci_addr=auto storage file=storage_4k.qcow2,if=virtio OK domain 0, bus 0, slot 8, function 0 3. hot-unplug the first device: (qemu) pci_del pci_addr=7 pci_del pci_addr=7 4. run 'reboot' in guest. 5. qemu exit. Actual results: qemu segfault. Expected results: qemu run's well, guest reboot ok. Additional info: full qemu command line: /home/autotest/client/tests/kvm/qemu \ -name vm1 \ -monitor unix:/tmp/monitor-humanmonitor1-20110531-183508-GvKW,server,nowait \ -serial unix:/tmp/serial-20110531-183508-GvKW,server,nowait \ -drive file=/home/autotest/client/tests/kvm/images/RHEL-Server-5.7-32-virtio.qcow2,index=0,if=virtio,media=disk,cache=none,boot=on,format=qcow2 \ -net nic,vlan=0,model=virtio,macaddr=9a:58:2a:24:72:fa \ -net tap,vlan=0,ifname=t0-183508-GvKW,script=/home/autotest/client/tests/kvm/scripts/qemu-ifup-switch,downscript=no \ -m 4096 \ -smp 2,cores=1,threads=1,sockets=2 \ -cpu qemu64,+sse2 \ -soundhw ac97 \ -vnc :0 \ -rtc-td-hack \ -M rhel5.6.0 \ -boot c \ -usbdevice tablet \ -no-kvm-pit-reinjection qemu backtrace: Program terminated with signal 11, Segmentation fault. #0 0x000000000b84e3d0 in ?? () (gdb) bt #0 0x000000000b84e3d0 in ?? () #1 0x0000000000415fdb in virtio_reset (opaque=<value optimized out>) at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/hw/virtio.c:500 #2 0x0000000000407766 in qemu_system_reset () at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/vl.c:3942 #3 0x0000000000500e46 in qemu_kvm_system_reset () at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/qemu-kvm.c:369 #4 kvm_main_loop () at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/qemu-kvm.c:604 #5 0x000000000040e757 in main_loop (argc=31, argv=0x7fffc365e468, envp=<value optimized out>) at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/vl.c:4157 #6 main (argc=31, argv=0x7fffc365e468, envp=<value optimized out>) at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/vl.c:6559
*** This bug has been marked as a duplicate of bug 645339 ***