118129c15SDavid Hildenbrand /* 218129c15SDavid Hildenbrand * Abstract virtio based memory device 318129c15SDavid Hildenbrand * 418129c15SDavid Hildenbrand * Copyright (C) 2023 Red Hat, Inc. 518129c15SDavid Hildenbrand * 618129c15SDavid Hildenbrand * Authors: 718129c15SDavid Hildenbrand * David Hildenbrand <david@redhat.com> 818129c15SDavid Hildenbrand * 918129c15SDavid Hildenbrand * This work is licensed under the terms of the GNU GPL, version 2. 1018129c15SDavid Hildenbrand * See the COPYING file in the top-level directory. 1118129c15SDavid Hildenbrand */ 1218129c15SDavid Hildenbrand 1318129c15SDavid Hildenbrand #ifndef HW_VIRTIO_MD_PCI_H 1418129c15SDavid Hildenbrand #define HW_VIRTIO_MD_PCI_H 1518129c15SDavid Hildenbrand 1618129c15SDavid Hildenbrand #include "hw/virtio/virtio-pci.h" 1718129c15SDavid Hildenbrand #include "qom/object.h" 1818129c15SDavid Hildenbrand 1918129c15SDavid Hildenbrand /* 2018129c15SDavid Hildenbrand * virtio-md-pci: This extends VirtioPCIProxy. 2118129c15SDavid Hildenbrand */ 2218129c15SDavid Hildenbrand #define TYPE_VIRTIO_MD_PCI "virtio-md-pci" 2318129c15SDavid Hildenbrand 2418129c15SDavid Hildenbrand OBJECT_DECLARE_TYPE(VirtIOMDPCI, VirtIOMDPCIClass, VIRTIO_MD_PCI) 2518129c15SDavid Hildenbrand 2618129c15SDavid Hildenbrand struct VirtIOMDPCIClass { 2718129c15SDavid Hildenbrand /* private */ 2818129c15SDavid Hildenbrand VirtioPCIClass parent; 29*aac44204SDavid Hildenbrand 30*aac44204SDavid Hildenbrand /* public */ 31*aac44204SDavid Hildenbrand void (*unplug_request_check)(VirtIOMDPCI *vmd, Error **errp); 3218129c15SDavid Hildenbrand }; 3318129c15SDavid Hildenbrand 3418129c15SDavid Hildenbrand struct VirtIOMDPCI { 3518129c15SDavid Hildenbrand VirtIOPCIProxy parent_obj; 3618129c15SDavid Hildenbrand }; 3718129c15SDavid Hildenbrand 38dbdf841bSDavid Hildenbrand void virtio_md_pci_pre_plug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp); 39dbdf841bSDavid Hildenbrand void virtio_md_pci_plug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp); 40dbdf841bSDavid Hildenbrand void virtio_md_pci_unplug_request(VirtIOMDPCI *vmd, MachineState *ms, 41dbdf841bSDavid Hildenbrand Error **errp); 42dbdf841bSDavid Hildenbrand void virtio_md_pci_unplug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp); 43dbdf841bSDavid Hildenbrand 4418129c15SDavid Hildenbrand #endif 45