]> Git Repo - qemu.git/blame - include/hw/virtio/vhost-backend.h
scsi: Rename scsi_*_length() to scsi_*_xfer(), add scsi_cdb_length()
[qemu.git] / include / hw / virtio / vhost-backend.h
CommitLineData
24d1eb33
NN
1/*
2 * vhost-backend
3 *
4 * Copyright (c) 2013 Virtual Open Systems Sarl.
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 *
9 */
10
11#ifndef VHOST_BACKEND_H_
12#define VHOST_BACKEND_H_
13
1a1bfac9
NN
14typedef enum VhostBackendType {
15 VHOST_BACKEND_TYPE_NONE = 0,
16 VHOST_BACKEND_TYPE_KERNEL = 1,
17 VHOST_BACKEND_TYPE_USER = 2,
18 VHOST_BACKEND_TYPE_MAX = 3,
19} VhostBackendType;
20
24d1eb33
NN
21struct vhost_dev;
22
23typedef int (*vhost_call)(struct vhost_dev *dev, unsigned long int request,
24 void *arg);
25typedef int (*vhost_backend_init)(struct vhost_dev *dev, void *opaque);
26typedef int (*vhost_backend_cleanup)(struct vhost_dev *dev);
27
28typedef struct VhostOps {
1a1bfac9 29 VhostBackendType backend_type;
24d1eb33
NN
30 vhost_call vhost_call;
31 vhost_backend_init vhost_backend_init;
32 vhost_backend_cleanup vhost_backend_cleanup;
33} VhostOps;
34
0f03fb60
SW
35extern const VhostOps user_ops;
36
1a1bfac9
NN
37int vhost_set_backend_type(struct vhost_dev *dev,
38 VhostBackendType backend_type);
39
24d1eb33 40#endif /* VHOST_BACKEND_H_ */
This page took 0.047773 seconds and 4 git commands to generate.