On Tue, Apr 24, 2012 at 10:25 AM, Sungchan Kim <sungchan....@chonbuk.ac.kr> wrote: > I'm trying to integrate our custom SSD simulator by modifying the ide part > of qemu. [...] > I need to monitor (and get) the actual IDE DMA data that is read > from/written when using the raw disk image, /dev/sdb.
Can you explain a little bit more about what you're trying to do? In QEMU a drive is represented by the BlockDriverState struct and the block.h functions. IDE uses bdrv_aio_readv()/bdrv_aio_writev()/bdrv_aio_flush() to read data, write data, and synchronize the write cache. This interface gives you access to LBA and length of requests, as well as the data buffers. If this is what you need, I suggest adding a block/ssdsim.c which works similar to block/blkverify.c or block/blkdebug.c in intercepting block I/O requests. If you need IDE-level data then you should hook into hw/ide/core.c:ide_exec_cmd() where ATA commands are executed. Stefan