[R +0.020410] outw 0x171 0xffff
28186@1594494474.407743:ide_ioport_write IDE PIO wr @ 0x171 (Features); val 0xff; bus 0x55e383419100 IDEState 0x55e383419188
28186@1594494474.407747:ide_ioport_write IDE PIO wr @ 0x172 (Sector Count); val 0xff; bus 0x55e383419100 IDEState 0x55e383419188
OK
[S +0.020428] OK
[R +0.020433] outw 0x176 0x35fb
28186@1594494474.407756:ide_ioport_write IDE PIO wr @ 0x176 (Device/Head); val 0xfb; bus 0x55e383419100 IDEState 0x55e383419188
28186@1594494474.407757:ide_ioport_write IDE PIO wr @ 0x177 (Command); val 0x35; bus 0x55e383419100 IDEState 0x55e383419558
28186@1594494474.407759:ide_exec_cmd IDE exec cmd: bus 0x55e383419100; state 0x55e383419558; cmd 0x35
....
28186@1594494474.411019:ide_dma_cb IDEState 0x55e383419558; sector_num=1 n=511 cmd=DMA WRITE
OK
[S +0.023732] OK
[R +0.023736] outb 0x376 0x8f
28186@1594494474.411060:ide_cmd_write IDE PIO wr @ 0x376 (Device Control); val 0x8f; bus 0x55e383419100
OK
[S +0.023741] OK
[R +0.023742] outw 0x376 0x2779
28186@1594494474.411064:ide_cmd_write IDE PIO wr @ 0x376 (Device Control); val 0x79; bus 0x55e383419100
OK
[S +0.023745] OK
qemu-system-i386: /home/alxndr/Development/qemu/hw/ide/core.c:880: void ide_dma_cb(void *, int): Assertion `n * 512 == s->sg.size' failed.
Here's a qtest reproducer:
./i386- softmmu/ qemu-system- i386 -M pc,accel=qtest \ id=drive0, file=null- co://,file. read-zeroes= on,format= raw \ id=drive1, file=null- co://,file. read-zeroes= on,format= raw \
-qtest null -nographic -vga qxl -qtest stdio \
-drive if=none,
-drive if=none,
-device ide-cd,drive=drive0 -device ide-hd,drive=drive1 -nodefaults \
< attachment
With -trace ide*:
[R +0.020410] outw 0x171 0xffff 4.407743: ide_ioport_ write IDE PIO wr @ 0x171 (Features); val 0xff; bus 0x55e383419100 IDEState 0x55e383419188 4.407747: ide_ioport_ write IDE PIO wr @ 0x172 (Sector Count); val 0xff; bus 0x55e383419100 IDEState 0x55e383419188 4.407756: ide_ioport_ write IDE PIO wr @ 0x176 (Device/Head); val 0xfb; bus 0x55e383419100 IDEState 0x55e383419188 4.407757: ide_ioport_ write IDE PIO wr @ 0x177 (Command); val 0x35; bus 0x55e383419100 IDEState 0x55e383419558 4.407759: ide_exec_ cmd IDE exec cmd: bus 0x55e383419100; state 0x55e383419558; cmd 0x35 4.411019: ide_dma_ cb IDEState 0x55e383419558; sector_num=1 n=511 cmd=DMA WRITE 4.411060: ide_cmd_ write IDE PIO wr @ 0x376 (Device Control); val 0x8f; bus 0x55e383419100 4.411064: ide_cmd_ write IDE PIO wr @ 0x376 (Device Control); val 0x79; bus 0x55e383419100 Development/ qemu/hw/ ide/core. c:880: void ide_dma_cb(void *, int): Assertion `n * 512 == s->sg.size' failed.
28186@159449447
28186@159449447
OK
[S +0.020428] OK
[R +0.020433] outw 0x176 0x35fb
28186@159449447
28186@159449447
28186@159449447
....
28186@159449447
OK
[S +0.023732] OK
[R +0.023736] outb 0x376 0x8f
28186@159449447
OK
[S +0.023741] OK
[R +0.023742] outw 0x376 0x2779
28186@159449447
OK
[S +0.023745] OK
qemu-system-i386: /home/alxndr/