qemu/tests/qtest/libqos/virtio-gpio.h
Alex Bennée 8fcfc8235e tests/qtest: enable tests for virtio-gpio
We don't have a virtio-gpio implementation in QEMU and only
support a vhost-user backend. The QEMU side of the code is minimal so
it should be enough to instantiate the device and pass some vhost-user
messages over the control socket. To do this we hook into the existing
vhost-user-test code and just add the bits required for gpio.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Eric Auger <eric.auger@redhat.com>
Message-Id: <20220408155704.2777166-1-alex.bennee@linaro.org>

Message-Id: <20220802095010.3330793-23-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-10-07 09:41:51 -04:00

36 lines
666 B
C

/*
* virtio-gpio structures
*
* Copyright (c) 2022 Linaro Ltd
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef TESTS_LIBQOS_VIRTIO_GPIO_H
#define TESTS_LIBQOS_VIRTIO_GPIO_H
#include "qgraph.h"
#include "virtio.h"
#include "virtio-pci.h"
typedef struct QVhostUserGPIO QVhostUserGPIO;
typedef struct QVhostUserGPIOPCI QVhostUserGPIOPCI;
typedef struct QVhostUserGPIODevice QVhostUserGPIODevice;
struct QVhostUserGPIO {
QVirtioDevice *vdev;
QVirtQueue **queues;
};
struct QVhostUserGPIOPCI {
QVirtioPCIDevice pci_vdev;
QVhostUserGPIO gpio;
};
struct QVhostUserGPIODevice {
QOSGraphObject obj;
QVhostUserGPIO gpio;
};
#endif