Commit 1e33b513 authored by David Hildenbrand's avatar David Hildenbrand Committed by Michael S. Tsirkin
Browse files

virtio-pci: Allow to specify additional interfaces for the base type



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.

Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
Message-Id: <20190619094907.10131-3-pagupta@redhat.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 5f503cd9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1947,6 +1947,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,
+1 −0
Original line number Diff line number Diff line
@@ -252,6 +252,7 @@ typedef struct VirtioPCIDeviceTypeInfo {
    size_t class_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. */