qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v5 4/6] virtio-pci : Refactor virtio-pci dev


From: Peter Maydell
Subject: Re: [Qemu-devel] [RFC PATCH v5 4/6] virtio-pci : Refactor virtio-pci device.
Date: Tue, 4 Dec 2012 14:49:18 +0000

On 4 December 2012 14:35,  <address@hidden> wrote:
> From: KONRAD Frederic <address@hidden>
>
> 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 <address@hidden>
> ---
>  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]