Public bug reported: >From commit ("2d24a646 device-core: use RCU for list of children of a bus") an assertion is hit when removing a iommu aware virtio device, since as->listeners are not properly removed. To reproduce:
/home/qemu/build/x86_64-softmmu/qemu-system-x86_64 -qmp tcp:0:4444,server,nowait ... \ -netdev tap,id=hostnet0,vhostforce=on,vhost=on \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:14:18:cc,bus=pci.1,addr=0x0,iommu_platform=on,ats=on In QMP: {'execute': 'qmp_capabilities'} {"execute": "device_del", "arguments": {"id": "net0"} } And crash: ../softmmu/memory.c:2818: do_address_space_destroy: Assertion `QTAILQ_EMPTY(&as->listeners)' failed. ** Affects: qemu Importance: Undecided Status: New ** Tags: iommu ** Description changed: From commit ("2d24a646 device-core: use RCU for list of children of a bus") an assertion is hit when - removing a device, since mr->listeners are not properly + removing a device, since as->listeners are not properly removed. To reproduce: /home/qemu/build/x86_64-softmmu/qemu-system-x86_64 -qmp tcp:0:4444,server,nowait ... \ - -netdev tap,id=hostnet0,vhostforce=on,vhost=on \ - -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:14:18:cc,bus=pci.1,addr=0x0,iommu_platform=on,ats=on + -netdev tap,id=hostnet0,vhostforce=on,vhost=on \ + -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:14:18:cc,bus=pci.1,addr=0x0,iommu_platform=on,ats=on In QMP: {'execute': 'qmp_capabilities'} {"execute": "device_del", "arguments": {"id": "net0"} } And crash: ../softmmu/memory.c:2818: do_address_space_destroy: Assertion `QTAILQ_EMPTY(&as->listeners)' failed. ** Description changed: From commit ("2d24a646 device-core: use RCU for list of children of a bus") an assertion is hit when - removing a device, since as->listeners are not properly - removed. To reproduce: + removing a iommu aware virtio device, since as->listeners + are not properly removed. To reproduce: /home/qemu/build/x86_64-softmmu/qemu-system-x86_64 -qmp tcp:0:4444,server,nowait ... \ -netdev tap,id=hostnet0,vhostforce=on,vhost=on \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:14:18:cc,bus=pci.1,addr=0x0,iommu_platform=on,ats=on In QMP: {'execute': 'qmp_capabilities'} {"execute": "device_del", "arguments": {"id": "net0"} } And crash: ../softmmu/memory.c:2818: do_address_space_destroy: Assertion `QTAILQ_EMPTY(&as->listeners)' failed. ** Summary changed: - Assertion hit on hot-unplugging iommu enabled device + Assertion hit on hot-unplugging virtio iommu enabled device -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1912846 Title: Assertion hit on hot-unplugging virtio iommu enabled device Status in QEMU: New Bug description: From commit ("2d24a646 device-core: use RCU for list of children of a bus") an assertion is hit when removing a iommu aware virtio device, since as->listeners are not properly removed. To reproduce: /home/qemu/build/x86_64-softmmu/qemu-system-x86_64 -qmp tcp:0:4444,server,nowait ... \ -netdev tap,id=hostnet0,vhostforce=on,vhost=on \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:14:18:cc,bus=pci.1,addr=0x0,iommu_platform=on,ats=on In QMP: {'execute': 'qmp_capabilities'} {"execute": "device_del", "arguments": {"id": "net0"} } And crash: ../softmmu/memory.c:2818: do_address_space_destroy: Assertion `QTAILQ_EMPTY(&as->listeners)' failed. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1912846/+subscriptions