2 * Vhost-user generic virtio device
4 * Copyright (c) 2023 Linaro Ltd
6 * SPDX-License-Identifier: GPL-2.0-or-later
9 #ifndef QEMU_VHOST_USER_DEVICE_H
10 #define QEMU_VHOST_USER_DEVICE_H
12 #include "hw/virtio/vhost.h"
13 #include "hw/virtio/vhost-user.h"
15 #define TYPE_VHOST_USER_BASE "vhost-user-base"
17 OBJECT_DECLARE_TYPE(VHostUserBase, VHostUserBaseClass, VHOST_USER_BASE)
19 struct VHostUserBase {
27 VhostUserState vhost_user;
28 struct vhost_virtqueue *vhost_vq;
29 struct vhost_dev vhost_dev;
34 /* needed so we can use the base realize after specialisation
36 struct VHostUserBaseClass {
38 VirtioDeviceClass parent_class;
40 DeviceRealize parent_realize;
43 /* shared for the benefit of the derived pci class */
44 #define TYPE_VHOST_USER_DEVICE "vhost-user-device"
46 #endif /* QEMU_VHOST_USER_DEVICE_H */