audio: deprecate -soundhw gus
[qemu/ar7.git] / include / hw / virtio / virtio-pmem.h
blob33f1999320a5d88c12d7baa1cb423bce4d25a1d0
1 /*
2 * Virtio PMEM device
4 * Copyright (C) 2018-2019 Red Hat, Inc.
6 * Authors:
7 * Pankaj Gupta <pagupta@redhat.com>
8 * David Hildenbrand <david@redhat.com>
10 * This work is licensed under the terms of the GNU GPL, version 2.
11 * See the COPYING file in the top-level directory.
14 #ifndef HW_VIRTIO_PMEM_H
15 #define HW_VIRTIO_PMEM_H
17 #include "hw/virtio/virtio.h"
18 #include "qapi/qapi-types-misc.h"
20 #define TYPE_VIRTIO_PMEM "virtio-pmem"
22 #define VIRTIO_PMEM(obj) \
23 OBJECT_CHECK(VirtIOPMEM, (obj), TYPE_VIRTIO_PMEM)
24 #define VIRTIO_PMEM_CLASS(oc) \
25 OBJECT_CLASS_CHECK(VirtIOPMEMClass, (oc), TYPE_VIRTIO_PMEM)
26 #define VIRTIO_PMEM_GET_CLASS(obj) \
27 OBJECT_GET_CLASS(VirtIOPMEMClass, (obj), TYPE_VIRTIO_PMEM)
29 #define VIRTIO_PMEM_ADDR_PROP "memaddr"
30 #define VIRTIO_PMEM_MEMDEV_PROP "memdev"
32 typedef struct VirtIOPMEM {
33 VirtIODevice parent_obj;
35 VirtQueue *rq_vq;
36 uint64_t start;
37 HostMemoryBackend *memdev;
38 } VirtIOPMEM;
40 typedef struct VirtIOPMEMClass {
41 /* private */
42 VirtIODevice parent;
44 /* public */
45 void (*fill_device_info)(const VirtIOPMEM *pmem, VirtioPMEMDeviceInfo *vi);
46 MemoryRegion *(*get_memory_region)(VirtIOPMEM *pmem, Error **errp);
47 } VirtIOPMEMClass;
49 #endif