mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
virtio-md-pci: New parent type for virtio-mem-pci and virtio-pmem-pci
Let's add a new abstract "virtio memory device" type, and use it as parent class of virtio-mem-pci and virtio-pmem-pci. Message-ID: <20230711153445.514112-2-david@redhat.com> Tested-by: Mario Casquero <mcasquer@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com>
This commit is contained in:
parent
b01fd4b67a
commit
18129c15bc
9 changed files with 89 additions and 16 deletions
35
include/hw/virtio/virtio-md-pci.h
Normal file
35
include/hw/virtio/virtio-md-pci.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Abstract virtio based memory device
|
||||
*
|
||||
* Copyright (C) 2023 Red Hat, Inc.
|
||||
*
|
||||
* Authors:
|
||||
* David Hildenbrand <david@redhat.com>
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2.
|
||||
* See the COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
#ifndef HW_VIRTIO_MD_PCI_H
|
||||
#define HW_VIRTIO_MD_PCI_H
|
||||
|
||||
#include "hw/virtio/virtio-pci.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
/*
|
||||
* virtio-md-pci: This extends VirtioPCIProxy.
|
||||
*/
|
||||
#define TYPE_VIRTIO_MD_PCI "virtio-md-pci"
|
||||
|
||||
OBJECT_DECLARE_TYPE(VirtIOMDPCI, VirtIOMDPCIClass, VIRTIO_MD_PCI)
|
||||
|
||||
struct VirtIOMDPCIClass {
|
||||
/* private */
|
||||
VirtioPCIClass parent;
|
||||
};
|
||||
|
||||
struct VirtIOMDPCI {
|
||||
VirtIOPCIProxy parent_obj;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue