Can reproduce this bug with virtio-net-pci and virtio-blk-pci device on the latest rhel9.1.0 host with the test steps of Comment 2.
host version: qemu-kvm-7.0.0-4.el9.x86_64 kernel-5.14.0-96.el9.x86_64 seabios-1.16.0-2.el9.x86_64 guest: rhel9.1.0
Test result: hot-plug/unplug virtio-net-pci device in qmp: { "execute": "netdev_add","arguments": { "type": "tap", "id": "hostnet0" } } { "execute": "device_add","arguments": { "driver": "virtio-net-pci", "id": "net1", "bus": "pcie-root-port-5", "mac": "52:54:00:12:34:56", "netdev": "hostnet0" } } { "execute": "device_del", "arguments": { "id": "net1" } }{"return": {}} {"return": {}} {"return": {}}
{ "execute": "device_del", "arguments": { "id": "net1" } } {"error": {"class": "GenericError", "desc": "Device net1 is already in the process of unplug"}}
hot-plug/unplug virtio-blk-pci device in qmp: {"execute": "device_add", "arguments": {"driver": "virtio-blk-pci", "id": "stg1", "drive": "drive_stg1", "write-cache": "on", "bus": "pcie-root-port-4"}} {"execute":"device_del","arguments":{"id":"stg1"}} {"return": {}} {"return": {}}
{"execute":"device_del","arguments":{"id":"stg1"}} {"error": {"class": "GenericError", "desc": "Device stg1 is already in the process of unplug"}}
Boot a guest with cmd: /usr/libexec/qemu-kvm \ -name 'avocado-vt-vm1' \ -sandbox on \ -machine q35,memory-backend=mem-machine_mem \ -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \ -device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0 \ -nodefaults \ -device VGA,bus=pcie.0,addr=0x2 \ -m 16G \ -object memory-backend-ram,size=16G,id=mem-machine_mem \ -smp 6,maxcpus=6,cores=2,threads=1,dies=1,sockets=3 \ -cpu Icelake-Server-noTSX,enforce \ -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \ -device qemu-xhci,id=usb1,bus=pcie-root-port-1,addr=0x0 \ -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \ -device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \ -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie-root-port-2,addr=0x0 \ -blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/rhel9.1-seabios.qcow2,cache.direct=on,cache.no-flush=off \ -blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \ -device scsi-hd,id=image1,drive=drive_image1,write-cache=on \ -device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \ -device virtio-net-pci,mac=9a:5d:b0:f5:04:0f,id=idlokhzs,netdev=id4YbMcO,bus=pcie-root-port-3,addr=0x0 \ -netdev tap,id=id4YbMcO,vhost=on \ -vnc :0 \ -rtc base=utc,clock=host,driftfix=slew \ -boot menu=off,order=cdn,once=c,strict=off \ -enable-kvm \ -monitor stdio \ -S \ -qmp tcp:0:4444,server=on,wait=off \ -device pcie-root-port,id=pcie-root-port-4,port=0x4,addr=0x1.0x4,bus=pcie.0,chassis=5 \ -blockdev node-name=file_stg1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/test.qcow2,cache.direct=on,cache.no-flush=off \ -blockdev node-name=drive_stg1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_stg1 \ -device pcie-root-port,id=pcie-root-port-5,port=0x5,addr=0x1.0x5,bus=pcie.0,chassis=6 \
Can reproduce this bug with virtio-net-pci and virtio-blk-pci device on the latest rhel9.1.0 host with the test steps of Comment 2.
host version: 7.0.0-4. el9.x86_ 64 5.14.0- 96.el9. x86_64 1.16.0- 2.el9.x86_ 64
qemu-kvm-
kernel-
seabios-
guest: rhel9.1.0
Test result: add","arguments ": { "type": "tap", "id": "hostnet0" } } add","arguments ": { "driver": "virtio-net-pci", "id": "net1", "bus": "pcie-root-port-5", "mac": "52:54: 00:12:34: 56", "netdev": "hostnet0" } }
hot-plug/unplug virtio-net-pci device in qmp:
{ "execute": "netdev_
{ "execute": "device_
{ "execute": "device_del", "arguments": { "id": "net1" } }{"return": {}}
{"return": {}}
{"return": {}}
{ "execute": "device_del", "arguments": { "id": "net1" } }
{"error": {"class": "GenericError", "desc": "Device net1 is already in the process of unplug"}}
hot-plug/unplug virtio-blk-pci device in qmp: port-4" }} :"device_ del","arguments ":{"id" :"stg1" }}
{"execute": "device_add", "arguments": {"driver": "virtio-blk-pci", "id": "stg1", "drive": "drive_stg1", "write-cache": "on", "bus": "pcie-root-
{"execute"
{"return": {}}
{"return": {}}
{"execute" :"device_ del","arguments ":{"id" :"stg1" }}
{"error": {"class": "GenericError", "desc": "Device stg1 is already in the process of unplug"}}
Boot a guest with cmd: qemu-kvm \ backend= mem-machine_ mem \ port,id= pcie-root- port-0, multifunction= on,bus= pcie.0, addr=0x1, chassis= 1 \ bridge, id=pcie- pci-bridge- 0,addr= 0x0,bus= pcie-root- port-0 \ pcie.0, addr=0x2 \ backend- ram,size= 16G,id= mem-machine_ mem \ 6,cores= 2,threads= 1,dies= 1,sockets= 3 \ Server- noTSX,enforce \ port,id= pcie-root- port-1, port=0x1, addr=0x1. 0x1,bus= pcie.0, chassis= 2 \ id=usb1, bus=pcie- root-port- 1,addr= 0x0 \ id=usb- tablet1, bus=usb1. 0,port= 1 \ port,id= pcie-root- port-2, port=0x2, addr=0x1. 0x2,bus= pcie.0, chassis= 3 \ scsi-pci, id=virtio_ scsi_pci0, bus=pcie- root-port- 2,addr= 0x0 \ file_image1, driver= file,auto- read-only= on,discard= unmap,aio= threads, filename= /home/rhel9. 1-seabios. qcow2,cache. direct= on,cache. no-flush= off \ drive_image1, driver= qcow2,read- only=off, cache.direct= on,cache. no-flush= off,file= file_image1 \ id=image1, drive=drive_ image1, write-cache= on \ port,id= pcie-root- port-3, port=0x3, addr=0x1. 0x3,bus= pcie.0, chassis= 4 \ net-pci, mac=9a: 5d:b0:f5: 04:0f,id= idlokhzs, netdev= id4YbMcO, bus=pcie- root-port- 3,addr= 0x0 \ id4YbMcO, vhost=on \ clock=host, driftfix= slew \ order=cdn, once=c, strict= off \ server= on,wait= off \ port,id= pcie-root- port-4, port=0x4, addr=0x1. 0x4,bus= pcie.0, chassis= 5 \ file_stg1, driver= file,auto- read-only= on,discard= unmap,aio= threads, filename= /home/test. qcow2,cache. direct= on,cache. no-flush= off \ drive_stg1, driver= qcow2,read- only=off, cache.direct= on,cache. no-flush= off,file= file_stg1 \ port,id= pcie-root- port-5, port=0x5, addr=0x1. 0x5,bus= pcie.0, chassis= 6 \
/usr/libexec/
-name 'avocado-vt-vm1' \
-sandbox on \
-machine q35,memory-
-device pcie-root-
-device pcie-pci-
-nodefaults \
-device VGA,bus=
-m 16G \
-object memory-
-smp 6,maxcpus=
-cpu Icelake-
-device pcie-root-
-device qemu-xhci,
-device usb-tablet,
-device pcie-root-
-device virtio-
-blockdev node-name=
-blockdev node-name=
-device scsi-hd,
-device pcie-root-
-device virtio-
-netdev tap,id=
-vnc :0 \
-rtc base=utc,
-boot menu=off,
-enable-kvm \
-monitor stdio \
-S \
-qmp tcp:0:4444,
-device pcie-root-
-blockdev node-name=
-blockdev node-name=
-device pcie-root-