diff options
author | Milan Zamazal <mzamazal@redhat.com> | 2023-06-28 12:05:22 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-07-10 16:17:07 -0400 |
commit | a5dab090e1425929a1a5a3034768cb33dab69bf4 (patch) | |
tree | d53f4a4a851f886cb8c713f5d9a7495a7431633e /include | |
parent | 31f137e3d6c596883ecd572ff3c53eb03b0e87c7 (diff) |
hw/virtio: Add boilerplate for vhost-user-scmi device
This creates the QEMU side of the vhost-user-scmi device which connects to
the remote daemon. It is based on code of similar vhost-user devices.
Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
Message-Id: <20230628100524.342666-2-mzamazal@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/virtio/vhost-user-scmi.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost-user-scmi.h b/include/hw/virtio/vhost-user-scmi.h new file mode 100644 index 0000000000..6175a74ebd --- /dev/null +++ b/include/hw/virtio/vhost-user-scmi.h @@ -0,0 +1,30 @@ +/* + * Vhost-user SCMI virtio device + * + * Copyright (c) 2023 Red Hat, Inc. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef _QEMU_VHOST_USER_SCMI_H +#define _QEMU_VHOST_USER_SCMI_H + +#include "hw/virtio/virtio.h" +#include "hw/virtio/vhost.h" +#include "hw/virtio/vhost-user.h" + +#define TYPE_VHOST_USER_SCMI "vhost-user-scmi" +OBJECT_DECLARE_SIMPLE_TYPE(VHostUserSCMI, VHOST_USER_SCMI); + +struct VHostUserSCMI { + VirtIODevice parent; + CharBackend chardev; + struct vhost_virtqueue *vhost_vqs; + struct vhost_dev vhost_dev; + VhostUserState vhost_user; + VirtQueue *cmd_vq; + VirtQueue *event_vq; + bool connected; +}; + +#endif /* _QEMU_VHOST_USER_SCMI_H */ |