diff options
author | Emanuele Giuseppe Esposito | 2018-07-20 15:41:46 +0200 |
---|---|---|
committer | Paolo Bonzini | 2019-03-07 17:28:27 +0100 |
commit | 9d44725793700112b5a0ff71f64f7059f0a4b6c9 (patch) | |
tree | 03e34803dc1cdbc96a6b7fdf09bc8a04c1d3618f /tests/libqos/virtio-9p.h | |
parent | qos-test: virtio-console and virtio-serial test node (diff) | |
download | qemu-9d44725793700112b5a0ff71f64f7059f0a4b6c9.tar.gz qemu-9d44725793700112b5a0ff71f64f7059f0a4b6c9.tar.xz qemu-9d44725793700112b5a0ff71f64f7059f0a4b6c9.zip |
tests/libqos: virtio-9p driver and interface nodes
Add qgraph nodes for virtio-9p-pci and virtio-9p-device.
Both nodes produce virtio-9p, but virtio-9p-pci receives
a pci-bus and overrides virtio-pci QOSGraphObject and its functions,
while virtio-9p-device receives a virtio and implements
its own functions
Signed-off-by: Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/libqos/virtio-9p.h')
-rw-r--r-- | tests/libqos/virtio-9p.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/libqos/virtio-9p.h b/tests/libqos/virtio-9p.h new file mode 100644 index 0000000000..dba22772b5 --- /dev/null +++ b/tests/libqos/virtio-9p.h @@ -0,0 +1,42 @@ +/* + * libqos driver framework + * + * Copyright (c) 2018 Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/> + */ + +#include "libqos/qgraph.h" +#include "libqos/virtio.h" +#include "libqos/virtio-pci.h" + +typedef struct QVirtio9P QVirtio9P; +typedef struct QVirtio9PPCI QVirtio9PPCI; +typedef struct QVirtio9PDevice QVirtio9PDevice; + +#define MOUNT_TAG "qtest" + +struct QVirtio9P { + QVirtioDevice *vdev; + QVirtQueue *vq; +}; + +struct QVirtio9PPCI { + QVirtioPCIDevice pci_vdev; + QVirtio9P v9p; +}; + +struct QVirtio9PDevice { + QOSGraphObject obj; + QVirtio9P v9p; +}; |