From dbdf841b2ed8b88d30a8a1f0c26029b2ebb93e76 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Tue, 11 Jul 2023 17:34:40 +0200 Subject: pc: Factor out (un)plug handling of virtio-md-pci devices Let's factor out (un)plug handling, to be reused from arm/virt code. Provide stubs for the case that CONFIG_VIRTIO_MD is not selected because neither virtio-mem nor virtio-pmem is enabled. While this cannot currently happen for x86, it will be possible for arm/virt. Message-ID: <20230711153445.514112-3-david@redhat.com> Tested-by: Mario Casquero Reviewed-by: Michael S. Tsirkin Signed-off-by: David Hildenbrand --- include/hw/virtio/virtio-md-pci.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/hw') diff --git a/include/hw/virtio/virtio-md-pci.h b/include/hw/virtio/virtio-md-pci.h index a241b54fcd..f9fa857aec 100644 --- a/include/hw/virtio/virtio-md-pci.h +++ b/include/hw/virtio/virtio-md-pci.h @@ -32,4 +32,10 @@ struct VirtIOMDPCI { VirtIOPCIProxy parent_obj; }; +void virtio_md_pci_pre_plug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp); +void virtio_md_pci_plug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp); +void virtio_md_pci_unplug_request(VirtIOMDPCI *vmd, MachineState *ms, + Error **errp); +void virtio_md_pci_unplug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp); + #endif -- cgit v1.2.3