qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] How can I see the data for IDE DMA?


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] How can I see the data for IDE DMA?
Date: Wed, 25 Apr 2012 09:48:39 +0100

On Tue, Apr 24, 2012 at 10:25 AM, Sungchan Kim
<address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]