On Tue, Apr 24, 2012 at 2:16 AM, Sungchan Kim <[email protected]>wrote:
> Dear all, > > > > I'm trying to integrate our custom SSD simulator to marss. > > To do this, beside a boot disk, I'm using an additional disk image in raw > format that is mounted to /dev/sdb. > > I'm working with the ubuntu image that is available at the marss web site. > > > I need to monitor (and get) the actual IDE DMA data that is read > from/written when using the raw disk image, /dev/sdb. > > Even though I looked at some source files in qemu/hw/ide, it is still not > sure which function or data structure I should use to do this. > > Could anyone help me figure out this difficulty? > > Thank you. > > > I have pasted a text from an email response I gave to Jim about DMA tracking in QEMU: On Tue, Apr 17, 2012 at 3:59 AM, Jim Stevens <[email protected]> wrote: > Avadh, > > When QEMU performs a disk access and emulates the DMA, do the > addresses accessed by the DMA get passed along to the > memoryController? I'm just wondering if we are missing out on an > important source of memory traffic for DRAMSim or if this is properly > modeled in > marss. > > This is a really tricky part in QEMU. To optimize IO emulation QEMU doesn't perform any DMA operation initiated by Disk or Network card. When a request to disk drive or network card is done, they know the destination memory address in RAM so when data is available its directly copied to those memory location without going through DMA. To trap all such memory activities, there are few function provided by QEMU to access VM's memory: cpu_physical_memory_write cpu_physical_memory_read cpu_physical_memory_rw Now disk interface doesn't use these functions :). For modularity and performance, they use some specific BMDMAState structures that are used by BlockDrivers to copy data into VM's RAM. The trap that I have placed is called when DMA is completed. So you can look into some more variables there to find out where data is copied and how much. Hope this helps. - Avadh > Regards, > > Sungchan Kim > > _______________________________________________ > http://www.marss86.org > Marss86-Devel mailing list > [email protected] > https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel > >
_______________________________________________ http://www.marss86.org Marss86-Devel mailing list [email protected] https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
