diff options
| author | Tiwei Bie <tiwei.bie@intel.com> | 2018-05-24 18:33:33 +0800 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2018-05-24 21:14:11 +0300 |
| commit | 4d0cf552d3a9585f380e8abdc313e4d416a56aa0 (patch) | |
| tree | 024c2f4a00c2aa98ca90aa2bbb8936da2377076d /include/hw/virtio/vhost-user.h | |
| parent | 5f57fbeaaf7c4cd33152d7f2e449caab4d4209d9 (diff) | |
| download | focaccia-qemu-4d0cf552d3a9585f380e8abdc313e4d416a56aa0.tar.gz focaccia-qemu-4d0cf552d3a9585f380e8abdc313e4d416a56aa0.zip | |
vhost-user: introduce shared vhost-user state
When multi queue is enabled e.g. for a virtio-net device, each queue pair will have a vhost_dev, and the only thing shared between vhost devs currently is the chardev. This patch introduces a vhost-user state structure which will be shared by all vhost devs of the same virtio device. Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/virtio/vhost-user.h')
| -rw-r--r-- | include/hw/virtio/vhost-user.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost-user.h b/include/hw/virtio/vhost-user.h new file mode 100644 index 0000000000..eb8bc0d90d --- /dev/null +++ b/include/hw/virtio/vhost-user.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2017-2018 Intel Corporation + * + * This work is licensed under the terms of the GNU GPL, version 2. + * See the COPYING file in the top-level directory. + */ + +#ifndef HW_VIRTIO_VHOST_USER_H +#define HW_VIRTIO_VHOST_USER_H + +#include "chardev/char-fe.h" + +typedef struct VhostUserState { + CharBackend *chr; +} VhostUserState; + +VhostUserState *vhost_user_init(void); +void vhost_user_cleanup(VhostUserState *user); + +#endif |