Description of problem: Using qemu-xhci controller to boot up a usb-storage device, there will be an input/output error while reading from it. Version-Release number of selected component (if applicable): host kernel:4.18.0-224.el8.ppc64le qemu:qemu-kvm-5.0.0-0.scrmod+el8.3.0+7308+053b39e7.wrb200708.ppc64le guest kernel:4.18.0-224.el8.ppc64le How reproducible: 100% Steps to Reproduce: 1.Boot up with commands including qemu-xhci and a usb-storage: /usr/libexec/qemu-kvm \ -name 'vm1' \ -sandbox on \ -machine pseries \ -nodefaults \ -device VGA,bus=pci.0,addr=0x10 \ -m 4G,slots=4,maxmem=8G \ -smp 4,maxcpus=8,cores=2,threads=4,sockets=1 \ -cpu 'host' \ -chardev socket,id=chardev_serial0,server,path=/tmp/slofpath,nowait \ -device spapr-vty,id=serial0,reg=0x30000000,chardev=chardev_serial0 \ -device pci-bridge,bus=pci.0,id=bridge3,chassis_nr=3 \ -device qemu-xhci,id=usb1,bus=bridge3,addr=0x11 \ -device pci-bridge,bus=pci.0,id=bridge1,chassis_nr=1 \ -blockdev driver=file,cache.direct=on,cache.no-flush=off,filename=rhel830.qcow2,node-name=drive_blk1 \ -blockdev driver=qcow2,node-name=drive_blk11,file=drive_blk1 \ -device virtio-blk-pci,scsi=off,drive=drive_blk11,id=blk-disk1,bus=bridge1,addr=0x9 \ -blockdev node-name=file_image2,driver=file,aio=threads,filename=storage.qcow2,cache.direct=off,cache.no-flush=on \ -blockdev node-name=drive_image2,driver=qcow2,cache.direct=off,cache.no-flush=on,file=file_image2 \ -device usb-storage,id=image2,drive=drive_image2,write-cache=on \ -device virtio-net-pci,mac=9a:4c:4d:4e:4f:60,id=idtniYmJ,vectors=4,netdev=idG7NvsN,bus=pci.0,addr=0x5 \ -netdev tap,id=idG7NvsN,vhost=on,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \ -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=3 \ -device usb-kbd,id=usb-kbdppc1,bus=usb1.0,port=2 \ -vnc :31 \ -qmp tcp:0:4441,server,nowait \ -rtc base=utc,clock=host \ -boot menu=off,order=cdn,once=c,strict=off \ -enable-kvm \ -monitor stdio \ 2.boot up guest and use dd to test if the USB device works well [root@localhost ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 5G 0 disk vda 252:0 0 20G 0 disk ├─vda1 252:1 0 4M 0 part ├─vda2 252:2 0 1G 0 part /boot └─vda3 252:3 0 19G 0 part ├─rhel-root 253:0 0 17G 0 lvm / └─rhel-swap 253:1 0 2G 0 lvm [SWAP] [root@localhost ~]# dd if=/dev/sda of=/dev/null bs=1M count=10 dd: error reading '/dev/sda': Input/output error 0+0 records in 0+0 records out 0 bytes copied, 3.83441 s, 0.0 kB/s [root@localhost ~]# dd of=/dev/sda if=/dev/zero bs=1M count=10 10+0 records in 10+0 records out 10485760 bytes (10 MB, 10 MiB) copied, 0.0421101 s, 249 MB/s 3. Actual results: USB storage work with no error while reading/writing Expected results: USB storage work with an error while reading Additional info: Have been tried in P8 host with host kernel version by 4.18.0-221.el8.ppc64le, and same qemu version. There's no error occurred.
*** This bug has been marked as a duplicate of bug 1854271 ***