[vbox-dev] DMA transaction

Klaus Espenlaub klaus.espenlaub at oracle.com
Wed Sep 3 08:43:42 GMT 2014


On 03.09.2014 08:40, Ray Yang wrote:
> Hi,
> I am trying to implement a pci device to support data transfer between
> host/guest via DMA but now am a bit lost on how to start a DMA
> transaction.
> Basically, I follow the sample of FDC in VBox source code tree to call
> PDMDevHlpDMARegister(..., callback_host, ...) to register a callback on
> the host.

A PCI device using the extremely legacy, super low speed ISA DMA 
controller? Sounds extremely unlikely. PCI devices don't need the help 
of any ISA rubbish, they simply trigger the "memory accesses" 
themselves. Good examples are the AHCI controller implementation or the 
various network cards. They get only some basic information about the 
memory area to use, and from this memory area they get the transfer 
descriptors etc etc.

> Then on the guest Windows side, I call
> WdfDmaTransactionInitialize to initialize the DMA transaction and call
> WdfDmaTransactionExecute to start the execution. However, the
> callback_host routine is never called by VBox. I set the breakpoints on
> FDC's dma routine but it is never triggered either.

What you confirmed this way is that there are no floppy controller DMA 
transfers happening, not that the callbacks are unused.

> So, is there anything else I need to do?

You need to do something completely different :)

> Thanks.
> -Ray

More information about the vbox-dev mailing list