xref: /qemu/hw/virtio/virtio-md-pci.c (revision 18129c15bcefc0064febe2dc7759b93f7c5aaab3)
1 /*
2  * Abstract virtio based memory device
3  *
4  * Copyright (C) 2023 Red Hat, Inc.
5  *
6  * Authors:
7  *  David Hildenbrand <david@redhat.com>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2.
10  * See the COPYING file in the top-level directory.
11  */
12 
13 #include "qemu/osdep.h"
14 #include "hw/virtio/virtio-md-pci.h"
15 #include "hw/mem/memory-device.h"
16 
17 static const TypeInfo virtio_md_pci_info = {
18     .name = TYPE_VIRTIO_MD_PCI,
19     .parent = TYPE_VIRTIO_PCI,
20     .instance_size = sizeof(VirtIOMDPCI),
21     .class_size = sizeof(VirtIOMDPCIClass),
22     .abstract = true,
23     .interfaces = (InterfaceInfo[]) {
24         { TYPE_MEMORY_DEVICE },
25         { }
26     },
27 };
28 
29 static void virtio_md_pci_register(void)
30 {
31     type_register_static(&virtio_md_pci_info);
32 }
33 type_init(virtio_md_pci_register)
34