[Top][All Lists]
[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
- [Qemu-devel] [RFC PATCH v5 0/6] Virtio refactoring., fred . konrad, 2012/12/04
- [Qemu-devel] [RFC PATCH v5 1/6] qdev : add a maximum device allowed field for the bus., fred . konrad, 2012/12/04
- [Qemu-devel] [RFC PATCH v5 2/6] virtio-bus : Introduce virtio-bus, fred . konrad, 2012/12/04
- [Qemu-devel] [RFC PATCH v5 4/6] virtio-pci : Refactor virtio-pci device., fred . konrad, 2012/12/04
- Re: [Qemu-devel] [RFC PATCH v5 4/6] virtio-pci : Refactor virtio-pci device.,
Peter Maydell <=
- [Qemu-devel] [RFC PATCH v5 5/6] virtio-device : Refactor virtio-device., fred . konrad, 2012/12/04
- [Qemu-devel] [RFC PATCH v5 3/6] virtio-pci-bus : Introduce virtio-pci-bus., fred . konrad, 2012/12/04
- [Qemu-devel] [RFC PATCH v5 6/6] virtio-blk : Refactor virtio-blk., fred . konrad, 2012/12/04