diff options
author | Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com> | 2018-07-19 15:14:44 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-03-07 17:28:26 +0100 |
commit | 57ed038ad977883af6e68fa33a3981a8de243e5f (patch) | |
tree | 9e5b6d15e638fd05bd4e4dfcf6500cbe4c0e4d1a /tests/libqos/virtio-mmio.h | |
parent | d5006a45f572ee4c0768d810d91920b2b2a7421b (diff) | |
download | qemu-57ed038ad977883af6e68fa33a3981a8de243e5f.zip qemu-57ed038ad977883af6e68fa33a3981a8de243e5f.tar.gz qemu-57ed038ad977883af6e68fa33a3981a8de243e5f.tar.bz2 |
tests/libqos: virtio-mmio driver and interface nodes
Add virtio-mmio node in qgraph framework.
virtio-mmio produces virtio-bus, the interface consumed by all virtio-*-device
nodes.
Being a memory-mapped device, it doesn't have to provide a constructor
to qgraph, since it's always "contained" inside some other nodes.
Signed-off-by: Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/libqos/virtio-mmio.h')
-rw-r--r-- | tests/libqos/virtio-mmio.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/libqos/virtio-mmio.h b/tests/libqos/virtio-mmio.h index e3e52b9..17a1714 100644 --- a/tests/libqos/virtio-mmio.h +++ b/tests/libqos/virtio-mmio.h @@ -11,6 +11,7 @@ #define LIBQOS_VIRTIO_MMIO_H #include "libqos/virtio.h" +#include "libqos/qgraph.h" #define QVIRTIO_MMIO_MAGIC_VALUE 0x000 #define QVIRTIO_MMIO_VERSION 0x004 @@ -33,7 +34,9 @@ #define QVIRTIO_MMIO_DEVICE_SPECIFIC 0x100 typedef struct QVirtioMMIODevice { + QOSGraphObject obj; QVirtioDevice vdev; + QTestState *qts; uint64_t addr; uint32_t page_size; uint32_t features; /* As it cannot be read later, save it */ @@ -41,6 +44,7 @@ typedef struct QVirtioMMIODevice { extern const QVirtioBus qvirtio_mmio; -QVirtioMMIODevice *qvirtio_mmio_init_device(uint64_t addr, uint32_t page_size); +void qvirtio_mmio_init_device(QVirtioMMIODevice *dev, QTestState *qts, + uint64_t addr, uint32_t page_size); #endif |