Re: [Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-26 Thread Anthony Liguori
fred.kon...@greensocs.com writes: > From: KONRAD Frederic > > This patch add a VirtioBus in the VirtIOPCIProxy structure. It creates a new > device : "virtio-pci" which init the VirtioBus. Two callback are written : > > * void virtio_pci_init_cb(DeviceState *dev) to initialize the PCI > inte

Re: [Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-23 Thread Konrad Frederic
On 23/11/2012 15:26, Peter Maydell wrote: On 23 November 2012 14:23, Konrad Frederic wrote: On 23/11/2012 13:34, Peter Maydell wrote: On 23 November 2012 12:29, Stefan Hajnoczi wrote: Eventually VirtIOBindings can probably be inlined into VirtioBusInfo. I don't see a need for separate stru

Re: [Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-23 Thread Peter Maydell
On 23 November 2012 14:23, Konrad Frederic wrote: > On 23/11/2012 13:34, Peter Maydell wrote: >> On 23 November 2012 12:29, Stefan Hajnoczi wrote: >>> Eventually VirtIOBindings can probably be inlined into VirtioBusInfo. I >>> don't see a need for separate structs. >> >> I agree. It might (or mi

Re: [Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-23 Thread Konrad Frederic
On 23/11/2012 13:34, Peter Maydell wrote: On 23 November 2012 12:29, Stefan Hajnoczi wrote: On Thu, Nov 22, 2012 at 03:50:51PM +0100, fred.kon...@greensocs.com wrote: +static const struct VirtioBusInfo virtio_bus_info = { +.init_cb = virtio_pci_init_cb, +.exit_cb = virtio_pci_exit_cb,

Re: [Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-23 Thread Peter Maydell
On 23 November 2012 12:29, Stefan Hajnoczi wrote: > On Thu, Nov 22, 2012 at 03:50:51PM +0100, fred.kon...@greensocs.com wrote: >> +static const struct VirtioBusInfo virtio_bus_info = { >> +.init_cb = virtio_pci_init_cb, >> +.exit_cb = virtio_pci_exit_cb, >> + >> +.virtio_bindings = { >

Re: [Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-23 Thread Stefan Hajnoczi
On Thu, Nov 22, 2012 at 03:50:51PM +0100, fred.kon...@greensocs.com wrote: > +static const struct VirtioBusInfo virtio_bus_info = { > +.init_cb = virtio_pci_init_cb, > +.exit_cb = virtio_pci_exit_cb, > + > +.virtio_bindings = { Eventually VirtIOBindings can probably be inlined into Vir

Re: [Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-23 Thread Cornelia Huck
On Thu, 22 Nov 2012 15:50:51 +0100 fred.kon...@greensocs.com wrote: > +static void virtiopci_class_init(ObjectClass *oc, void *data) > +{ > +DeviceClass *dc = DEVICE_CLASS(oc); > +PCIDeviceClass *pc = PCI_DEVICE_CLASS(oc); > + > +pc->init = virtiopci_qdev_init; > +pc->exit = virti

[Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-22 Thread fred . konrad
From: KONRAD Frederic This patch add a VirtioBus in the VirtIOPCIProxy structure. It creates a new device : "virtio-pci" which init the VirtioBus. Two callback are written : * void virtio_pci_init_cb(DeviceState *dev) to initialize the PCI interface after the VirtIODevice init, it is a