]> git.proxmox.com Git - mirror_qemu.git/blame - include/hw/virtio/vhost-vsock-common.h
Clean up ill-advised or unusual header guards
[mirror_qemu.git] / include / hw / virtio / vhost-vsock-common.h
CommitLineData
c6136ec0
SG
1/*
2 * Parent class for vhost-vsock devices
3 *
4 * Copyright 2015-2020 Red Hat, Inc.
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or
7 * (at your option) any later version. See the COPYING file in the
8 * top-level directory.
9 */
10
9c092804
MA
11#ifndef QEMU_VHOST_VSOCK_COMMON_H
12#define QEMU_VHOST_VSOCK_COMMON_H
c6136ec0
SG
13
14#include "hw/virtio/virtio.h"
15#include "hw/virtio/vhost.h"
db1015e9 16#include "qom/object.h"
c6136ec0
SG
17
18#define TYPE_VHOST_VSOCK_COMMON "vhost-vsock-common"
8063396b 19OBJECT_DECLARE_SIMPLE_TYPE(VHostVSockCommon, VHOST_VSOCK_COMMON)
c6136ec0
SG
20
21enum {
22 VHOST_VSOCK_SAVEVM_VERSION = 0,
23
24 VHOST_VSOCK_QUEUE_SIZE = 128,
25};
26
db1015e9 27struct VHostVSockCommon {
c6136ec0
SG
28 VirtIODevice parent;
29
30 struct vhost_virtqueue vhost_vqs[2];
31 struct vhost_dev vhost_dev;
32
33 VirtQueue *event_vq;
34 VirtQueue *recv_vq;
35 VirtQueue *trans_vq;
36
37 QEMUTimer *post_load_timer;
46ce0171
SG
38
39 /* features */
40 OnOffAuto seqpacket;
db1015e9 41};
c6136ec0
SG
42
43int vhost_vsock_common_start(VirtIODevice *vdev);
44void vhost_vsock_common_stop(VirtIODevice *vdev);
45int vhost_vsock_common_pre_save(void *opaque);
46int vhost_vsock_common_post_load(void *opaque, int version_id);
47void vhost_vsock_common_realize(VirtIODevice *vdev, const char *name);
48void vhost_vsock_common_unrealize(VirtIODevice *vdev);
46ce0171
SG
49uint64_t vhost_vsock_common_get_features(VirtIODevice *vdev, uint64_t features,
50 Error **errp);
c6136ec0 51
9c092804 52#endif /* QEMU_VHOST_VSOCK_COMMON_H */