Skip to content

Commit

Permalink
virtio-pci: Allow to specify additional interfaces for the base type
Browse files Browse the repository at this point in the history
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: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20190619094907.10131-3-pagupta@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
davidhildenbrand authored and mstsirkin committed Jul 2, 2019
1 parent 5f503cd commit 1e33b51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions hw/virtio/virtio-pci.c
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions hw/virtio/virtio-pci.h
Expand Up @@ -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. */
Expand Down

0 comments on commit 1e33b51

Please sign in to comment.