[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 4/7] virtio-pci: Proxy for virtio-pmem
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v2 4/7] virtio-pci: Proxy for virtio-pmem |
Date: |
Tue, 2 Jul 2019 13:55:19 +0200 |
On Wed, 19 Jun 2019 15:19:04 +0530
Pankaj Gupta <address@hidden> wrote:
> We need a proxy device for virtio-pmem, and this device has to be the
> actual memory device so we can cleanly hotplug it.
>
> Forward memory device class functions either to the actual device or use
> properties of the virtio-pmem device to implement these in the proxy.
>
> virtio-pmem will only be compiled for selected, supported architectures
> (that can deal with virtio/pci devices being memory devices). An
> architecture that is prepared for that can simply enable
> CONFIG_VIRTIO_PMEM to make it work.
>
> As not all architectures support memory devices (and CONFIG_VIRTIO_PMEM
> will be enabled per supported architecture), we have to move the PCI proxy
> to a separate file.
>
> Signed-off-by: Pankaj Gupta <address@hidden>
> [ split up patches, memory-device changes, move pci proxy]
> Signed-off-by: David Hildenbrand <address@hidden>
> ---
> hw/virtio/Makefile.objs | 1 +
> hw/virtio/virtio-pmem-pci.c | 131
> ++++++++++++++++++++++++++++++++++++++++++++
> hw/virtio/virtio-pmem-pci.h | 34 ++++++++++++
> include/hw/pci/pci.h | 1 +
> 4 files changed, 167 insertions(+)
> create mode 100644 hw/virtio/virtio-pmem-pci.c
> create mode 100644 hw/virtio/virtio-pmem-pci.h
(...)
> +static const VirtioPCIDeviceTypeInfo virtio_pmem_pci_info = {
> + .base_name = TYPE_VIRTIO_PMEM_PCI,
> + .generic_name = "virtio-pmem-pci",
> + .transitional_name = "virtio-pmem-pci-transitional",
Do we even have a transitional device for this? I.e., do we have a
legacy version? I don't think that makes sense for new devices.
> + .non_transitional_name = "virtio-pmem-pci-non-transitional",
> + .instance_size = sizeof(VirtIOPMEMPCI),
> + .instance_init = virtio_pmem_pci_instance_init,
> + .class_init = virtio_pmem_pci_class_init,
> + .interfaces = (InterfaceInfo[]) {
> + { TYPE_MEMORY_DEVICE },
> + { }
> + },
> +};
(...)
[Qemu-devel] [PULL 05/22] virtio-pmem: add virtio device, Michael S. Tsirkin, 2019/07/02
[Qemu-devel] [PULL 08/22] virtio-pci: Proxy for virtio-pmem, Michael S. Tsirkin, 2019/07/02
- Re: [Qemu-devel] [PATCH v2 4/7] virtio-pci: Proxy for virtio-pmem,
Cornelia Huck <=
Re: [Qemu-devel] [PULL 08/22] virtio-pci: Proxy for virtio-pmem, Peter Maydell, 2019/07/11
[Qemu-devel] [PULL 10/22] numa: Handle virtio-pmem in NUMA stats, Michael S. Tsirkin, 2019/07/02
[Qemu-devel] [PULL 09/22] hmp: Handle virtio-pmem when printing memory device infos, Michael S. Tsirkin, 2019/07/02
[Qemu-devel] [PULL 11/22] pc: Support for virtio-pmem-pci, Michael S. Tsirkin, 2019/07/02