[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH RFC 05/10] virtio-pci: Allow to specify additional int
From: |
David Hildenbrand |
Subject: |
[Qemu-ppc] [PATCH RFC 05/10] virtio-pci: Allow to specify additional interfaces for the base type |
Date: |
Wed, 16 Jan 2019 12:35:18 +0100 |
Let's allow to specify additional interfaces for the base type (e.g.
later TYPE_MEMORY_DEVICE), something that was possible before the
rework of virtio PCI device instantiation.
Signed-off-by: David Hildenbrand <address@hidden>
---
hw/virtio/virtio-pci.c | 1 +
hw/virtio/virtio-pci.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index d05066deb8..62fe1278e0 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1995,6 +1995,7 @@ void virtio_pci_types_register(const
VirtioPCIDeviceTypeInfo *t)
.class_init = virtio_pci_base_class_init,
.class_data = (void *)t,
.abstract = true,
+ .interfaces = t->interfaces,
};
TypeInfo generic_type_info = {
.name = t->generic_name,
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index 29b4216107..9d8f41ea15 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -466,6 +466,7 @@ typedef struct VirtioPCIDeviceTypeInfo {
size_t instance_size;
void (*instance_init)(Object *obj);
void (*class_init)(ObjectClass *klass, void *data);
+ InterfaceInfo *interfaces;
} VirtioPCIDeviceTypeInfo;
/* Register virtio-pci type(s). @t must be static. */
--
2.17.2
- [Qemu-ppc] [PATCH RFC 00/10] qdev: Hotplug handler chaining + virtio-pmem, David Hildenbrand, 2019/01/16
- [Qemu-ppc] [PATCH RFC 05/10] virtio-pci: Allow to specify additional interfaces for the base type,
David Hildenbrand <=
- [Qemu-ppc] [PATCH RFC 02/10] qdev: Let machine hotplug handler to override bus hotplug handler, David Hildenbrand, 2019/01/16
- [Qemu-ppc] [PATCH RFC 07/10] hmp: Handle virtio-pmem when printing memory device infos, David Hildenbrand, 2019/01/16
- [Qemu-ppc] [PATCH RFC 10/10] pc: Enable support for virtio-pmem, David Hildenbrand, 2019/01/16
- [Qemu-ppc] [PATCH RFC 06/10] virtio-pci: Proxy for virtio-pmem, David Hildenbrand, 2019/01/16
- [Qemu-ppc] [PATCH RFC 09/10] pc: Support for PCI based memory devices, David Hildenbrand, 2019/01/16
[Qemu-ppc] [PATCH RFC 08/10] numa: Handle virtio-pmem in NUMA stats, David Hildenbrand, 2019/01/16