xref: /openbmc/qemu/include/hw/virtio/virtio-md-pci.h (revision dbdf841b)
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 #ifndef HW_VIRTIO_MD_PCI_H
14 #define HW_VIRTIO_MD_PCI_H
15 
16 #include "hw/virtio/virtio-pci.h"
17 #include "qom/object.h"
18 
19 /*
20  * virtio-md-pci: This extends VirtioPCIProxy.
21  */
22 #define TYPE_VIRTIO_MD_PCI "virtio-md-pci"
23 
24 OBJECT_DECLARE_TYPE(VirtIOMDPCI, VirtIOMDPCIClass, VIRTIO_MD_PCI)
25 
26 struct VirtIOMDPCIClass {
27     /* private */
28     VirtioPCIClass parent;
29 };
30 
31 struct VirtIOMDPCI {
32     VirtIOPCIProxy parent_obj;
33 };
34 
35 void virtio_md_pci_pre_plug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp);
36 void virtio_md_pci_plug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp);
37 void virtio_md_pci_unplug_request(VirtIOMDPCI *vmd, MachineState *ms,
38                                   Error **errp);
39 void virtio_md_pci_unplug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp);
40 
41 #endif
42