From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TftoJ-0004Fs-HP for qemu-devel@nongnu.org; Tue, 04 Dec 2012 09:49:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TftoH-0004R4-Kn for qemu-devel@nongnu.org; Tue, 04 Dec 2012 09:49:23 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]:58513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TftoH-0004Qp-Gc for qemu-devel@nongnu.org; Tue, 04 Dec 2012 09:49:21 -0500 Received: by mail-ie0-f173.google.com with SMTP id e13so6021882iej.4 for ; Tue, 04 Dec 2012 06:49:20 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1354631742-4693-5-git-send-email-fred.konrad@greensocs.com> References: <1354631742-4693-1-git-send-email-fred.konrad@greensocs.com> <1354631742-4693-5-git-send-email-fred.konrad@greensocs.com> Date: Tue, 4 Dec 2012 14:49:18 +0000 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [RFC PATCH v5 4/6] virtio-pci : Refactor virtio-pci device. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fred.konrad@greensocs.com Cc: aliguori@us.ibm.com, e.voevodin@samsung.com, mark.burton@greensocs.com, qemu-devel@nongnu.org, stefanha@redhat.com, cornelia.huck@de.ibm.com, afaerber@suse.de On 4 December 2012 14:35, wrote: > From: KONRAD Frederic > > Create the virtio-pci device. This transport device will create a > virtio-pci-bus, so one VirtIODevice can be connected. > > Signed-off-by: KONRAD Frederic > --- > hw/virtio-pci.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > hw/virtio-pci.h | 14 +++++++ > 2 files changed, 126 insertions(+) > > diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c > index 5ac8d0d..8426122 100644 > --- a/hw/virtio-pci.c > +++ b/hw/virtio-pci.c > @@ -1119,6 +1119,115 @@ static TypeInfo virtio_scsi_info = { > .class_init = virtio_scsi_class_init, > }; > > +/* > + * virtio-pci : This is the PCIDevice which have a virtio-pci-bus. > + */ > + > +/* init callback */ > +static void virtio_pci_init_cb(void *opaque) > +/* exit callback */ > +static void virtio_pci_exit_cb(void *opaque) > +static int virtio_pci_init(PCIDevice *pci_dev) > +static void virtio_pci_exit(PCIDevice *pci_dev) It's rather confusing to have an init and an init_cb and also an exit and an exit_cb, and not to have anything explaining what the difference is or when each one is called or what needs to be done in one that can't be done in the other. -- PMM