On Fri, Nov 23, 2012 at 03:21:30PM +0100, Konrad Frederic wrote: > On 23/11/2012 13:23, Stefan Hajnoczi wrote: > >On Thu, Nov 22, 2012 at 03:50:50PM +0100, fred.kon...@greensocs.com wrote: > >>+struct VirtioBusInfo { > >This is defining an ad-hoc interface. QOM has support for interfaces so > >that a virtio-pci adapter brovides a VirtioBindingInterface which > >VirtioBus can talk to intead of using VirtioBusInfo. > Can you point me to example in the tree to see how this QOM > interfaces work ?
hw/stream.h and hw/stream.c A StreamSlave has one method: void (*push)(StreamSlave *obj, unsigned char *buf, size_t len, uint32_t *app); The xlnx.axi-ethernet device in hw/xilinx_axienet.c is an example of a class that implements the StreamSlave interface. Stefan