[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PATCH RFCv2 5/9] virtio-pci: Allow to specify additional i
From: |
David Hildenbrand |
Subject: |
[qemu-s390x] [PATCH RFCv2 5/9] virtio-pci: Allow to specify additional interfaces for the base type |
Date: |
Wed, 23 Jan 2019 20:55:23 +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 b282109343..8f53192f4f 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1938,6 +1938,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 bd223a6e3b..5d303b1641 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -232,6 +232,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-s390x] [PATCH RFCv2 0/9] qdev: Hotplug handler chaining + virtio-pmem, David Hildenbrand, 2019/01/23
- [qemu-s390x] [PATCH RFCv2 9/9] pc: Support for virtio-pmem-pci, David Hildenbrand, 2019/01/23
- [qemu-s390x] [PATCH RFCv2 8/9] numa: Handle virtio-pmem in NUMA stats, David Hildenbrand, 2019/01/23
- [qemu-s390x] [PATCH RFCv2 7/9] hmp: Handle virtio-pmem when printing memory device infos, David Hildenbrand, 2019/01/23
- [qemu-s390x] [PATCH RFCv2 5/9] virtio-pci: Allow to specify additional interfaces for the base type,
David Hildenbrand <=
- [qemu-s390x] [PATCH RFCv2 6/9] virtio-pci: Proxy for virtio-pmem, David Hildenbrand, 2019/01/23
- [qemu-s390x] [PATCH RFCv2 2/9] qdev: Let machine hotplug handler to override bus hotplug handler, David Hildenbrand, 2019/01/23
- [qemu-s390x] [PATCH RFCv2 4/9] virtio-pmem: Prototype, David Hildenbrand, 2019/01/23
- [qemu-s390x] [PATCH RFCv2 3/9] qdev: Provide qdev_get_bus_hotplug_handler(), David Hildenbrand, 2019/01/23
- [qemu-s390x] [PATCH RFCv2 1/9] qdev: Let the hotplug_handler_unplug() caller delete the device, David Hildenbrand, 2019/01/23