search for: vhost_mdev_set_st

Displaying 20 results from an estimated 28 matches for "vhost_mdev_set_st".

2019 Sep 27
2
[PATCH] vhost: introduce mdev based hardware backend
...@@ -116,4 +116,12 @@ > > > > #define VHOST_VSOCK_SET_GUEST_CID _IOW(VHOST_VIRTIO, 0x60, __u64) > > > > #define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int) > > > > +/* VHOST_MDEV specific defines */ > > > > + > > > > +#define VHOST_MDEV_SET_STATE _IOW(VHOST_VIRTIO, 0x70, __u64) > > > > + > > > > +#define VHOST_MDEV_S_STOPPED 0 > > > > +#define VHOST_MDEV_S_RUNNING 1 > > > > +#define VHOST_MDEV_S_MAX 2 > > > > + > > > > #endif > > > So assuming we have an u...
2019 Sep 27
2
[PATCH] vhost: introduce mdev based hardware backend
...@@ -116,4 +116,12 @@ > > > > #define VHOST_VSOCK_SET_GUEST_CID _IOW(VHOST_VIRTIO, 0x60, __u64) > > > > #define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int) > > > > +/* VHOST_MDEV specific defines */ > > > > + > > > > +#define VHOST_MDEV_SET_STATE _IOW(VHOST_VIRTIO, 0x70, __u64) > > > > + > > > > +#define VHOST_MDEV_S_STOPPED 0 > > > > +#define VHOST_MDEV_S_RUNNING 1 > > > > +#define VHOST_MDEV_S_MAX 2 > > > > + > > > > #endif > > > So assuming we have an u...
2019 Sep 26
4
[PATCH] vhost: introduce mdev based hardware backend
...b/include/uapi/linux/vhost.h > > @@ -116,4 +116,12 @@ > > #define VHOST_VSOCK_SET_GUEST_CID _IOW(VHOST_VIRTIO, 0x60, __u64) > > #define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int) > > > > +/* VHOST_MDEV specific defines */ > > + > > +#define VHOST_MDEV_SET_STATE _IOW(VHOST_VIRTIO, 0x70, __u64) > > + > > +#define VHOST_MDEV_S_STOPPED 0 > > +#define VHOST_MDEV_S_RUNNING 1 > > +#define VHOST_MDEV_S_MAX 2 > > + > > #endif > > So assuming we have an underlying device that behaves like virtio: I think they are real...
2019 Sep 26
4
[PATCH] vhost: introduce mdev based hardware backend
...b/include/uapi/linux/vhost.h > > @@ -116,4 +116,12 @@ > > #define VHOST_VSOCK_SET_GUEST_CID _IOW(VHOST_VIRTIO, 0x60, __u64) > > #define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int) > > > > +/* VHOST_MDEV specific defines */ > > + > > +#define VHOST_MDEV_SET_STATE _IOW(VHOST_VIRTIO, 0x70, __u64) > > + > > +#define VHOST_MDEV_S_STOPPED 0 > > +#define VHOST_MDEV_S_RUNNING 1 > > +#define VHOST_MDEV_S_MAX 2 > > + > > #endif > > So assuming we have an underlying device that behaves like virtio: I think they are real...
2019 Sep 27
5
[PATCH] vhost: introduce mdev based hardware backend
...lso have the > implication that the HPA should be continuous (e.g using hugetlbfs). The comment is talking about the virtual IOMMU (i.e. iotlb in vhost). It should be rephrased to cover the noiommu case as well. Thanks for spotting this. > > + > > + switch (cmd) { > > + case VHOST_MDEV_SET_STATE: > > + r = vhost_set_state(m, argp); > > + break; > > + case VHOST_GET_FEATURES: > > + r = vhost_get_features(m, argp); > > + break; > > + case VHOST_SET_FEATURES: > > + r = vhost_set_features(m, argp); > > + break; > > + case VHOST_GET...
2019 Sep 27
5
[PATCH] vhost: introduce mdev based hardware backend
...lso have the > implication that the HPA should be continuous (e.g using hugetlbfs). The comment is talking about the virtual IOMMU (i.e. iotlb in vhost). It should be rephrased to cover the noiommu case as well. Thanks for spotting this. > > + > > + switch (cmd) { > > + case VHOST_MDEV_SET_STATE: > > + r = vhost_set_state(m, argp); > > + break; > > + case VHOST_GET_FEATURES: > > + r = vhost_get_features(m, argp); > > + break; > > + case VHOST_SET_FEATURES: > > + r = vhost_set_features(m, argp); > > + break; > > + case VHOST_GET...
2019 Sep 27
2
[PATCH] vhost: introduce mdev based hardware backend
...#define VHOST_VSOCK_SET_GUEST_CID _IOW(VHOST_VIRTIO, 0x60, __u64) > > > > > > #define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int) > > > > > > +/* VHOST_MDEV specific defines */ > > > > > > + > > > > > > +#define VHOST_MDEV_SET_STATE _IOW(VHOST_VIRTIO, 0x70, __u64) > > > > > > + > > > > > > +#define VHOST_MDEV_S_STOPPED 0 > > > > > > +#define VHOST_MDEV_S_RUNNING 1 > > > > > > +#define VHOST_MDEV_S_MAX 2 > > > > > > + > > > &gt...
2019 Sep 27
2
[PATCH] vhost: introduce mdev based hardware backend
...#define VHOST_VSOCK_SET_GUEST_CID _IOW(VHOST_VIRTIO, 0x60, __u64) > > > > > > #define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int) > > > > > > +/* VHOST_MDEV specific defines */ > > > > > > + > > > > > > +#define VHOST_MDEV_SET_STATE _IOW(VHOST_VIRTIO, 0x70, __u64) > > > > > > + > > > > > > +#define VHOST_MDEV_S_STOPPED 0 > > > > > > +#define VHOST_MDEV_S_RUNNING 1 > > > > > > +#define VHOST_MDEV_S_MAX 2 > > > > > > + > > > &gt...
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
...;mutex); + module_put(THIS_MODULE); +} + +static long vhost_mdev_unlocked_ioctl(void *device_data, + unsigned int cmd, unsigned long arg) +{ + struct vhost_mdev *m = device_data; + void __user *argp = (void __user *)arg; + long r; + + mutex_lock(&m->mutex); + + switch (cmd) { + case VHOST_MDEV_SET_STATE: + r = vhost_set_state(m, argp); + break; + case VHOST_GET_FEATURES: + r = vhost_get_features(m, argp); + break; + case VHOST_SET_FEATURES: + r = vhost_set_features(m, argp); + break; + case VHOST_GET_VRING_BASE: + r = vhost_get_vring_base(m, argp); + break; + default: + r = vhost_dev_i...
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
...;mutex); + module_put(THIS_MODULE); +} + +static long vhost_mdev_unlocked_ioctl(void *device_data, + unsigned int cmd, unsigned long arg) +{ + struct vhost_mdev *m = device_data; + void __user *argp = (void __user *)arg; + long r; + + mutex_lock(&m->mutex); + + switch (cmd) { + case VHOST_MDEV_SET_STATE: + r = vhost_set_state(m, argp); + break; + case VHOST_GET_FEATURES: + r = vhost_get_features(m, argp); + break; + case VHOST_SET_FEATURES: + r = vhost_set_features(m, argp); + break; + case VHOST_GET_VRING_BASE: + r = vhost_get_vring_base(m, argp); + break; + default: + r = vhost_dev_i...
2019 Sep 03
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...p;info, minsz)) { > + ret = -EFAULT; > + break; > + } > + > + break; > + } > + case VFIO_DEVICE_GET_REGION_INFO: > + case VFIO_DEVICE_GET_IRQ_INFO: > + case VFIO_DEVICE_SET_IRQS: > + case VFIO_DEVICE_RESET: > + ret = -EINVAL; > + break; > + > + case VHOST_MDEV_SET_STATE: > + ret = vhost_set_state(vdpa, argp); > + break; > + case VHOST_GET_FEATURES: > + ret = vhost_get_features(vdpa, argp); > + break; > + case VHOST_SET_FEATURES: > + ret = vhost_set_features(vdpa, argp); > + break; > + case VHOST_GET_VRING_BASE: > + ret = vho...
2019 Sep 03
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...p;info, minsz)) { > + ret = -EFAULT; > + break; > + } > + > + break; > + } > + case VFIO_DEVICE_GET_REGION_INFO: > + case VFIO_DEVICE_GET_IRQ_INFO: > + case VFIO_DEVICE_SET_IRQS: > + case VFIO_DEVICE_RESET: > + ret = -EINVAL; > + break; > + > + case VHOST_MDEV_SET_STATE: > + ret = vhost_set_state(vdpa, argp); > + break; > + case VHOST_GET_FEATURES: > + ret = vhost_get_features(vdpa, argp); > + break; > + case VHOST_SET_FEATURES: > + ret = vhost_set_features(vdpa, argp); > + break; > + case VHOST_GET_VRING_BASE: > + ret = vho...
2019 Sep 27
1
[PATCH] vhost: introduce mdev based hardware backend
...VHOST_VIRTIO, 0x60, __u64) > > > > > > > > #define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int) > > > > > > > > +/* VHOST_MDEV specific defines */ > > > > > > > > + > > > > > > > > +#define VHOST_MDEV_SET_STATE _IOW(VHOST_VIRTIO, 0x70, __u64) > > > > > > > > + > > > > > > > > +#define VHOST_MDEV_S_STOPPED 0 > > > > > > > > +#define VHOST_MDEV_S_RUNNING 1 > > > > > > > > +#define VHOST_MDEV_S_MAX 2 > >...
2019 Sep 27
1
[PATCH] vhost: introduce mdev based hardware backend
...tlbfs). > > The comment is talking about the virtual IOMMU (i.e. iotlb in vhost). > > It should be rephrased to cover the noiommu case as well. Thanks for > > spotting this. > > > > > > > > + > > > > + switch (cmd) { > > > > + case VHOST_MDEV_SET_STATE: > > > > + r = vhost_set_state(m, argp); > > > > + break; > > > > + case VHOST_GET_FEATURES: > > > > + r = vhost_get_features(m, argp); > > > > + break; > > > > + case VHOST_SET_FEATURES: > > > > + r = vhost...
2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...p;info, minsz)) { > + ret = -EFAULT; > + break; > + } > + > + break; > + } > + case VFIO_DEVICE_GET_REGION_INFO: > + case VFIO_DEVICE_GET_IRQ_INFO: > + case VFIO_DEVICE_SET_IRQS: > + case VFIO_DEVICE_RESET: > + ret = -EINVAL; > + break; > + > + case VHOST_MDEV_SET_STATE: > + ret = vhost_set_state(vdpa, argp); > + break; So this is used to start or stop the device. This means if userspace want to drive a network device, the API is not 100% compatible. Any blocker for this? E.g for SET_BACKEND, we can pass a fd and then identify the type of backend....
2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...p;info, minsz)) { > + ret = -EFAULT; > + break; > + } > + > + break; > + } > + case VFIO_DEVICE_GET_REGION_INFO: > + case VFIO_DEVICE_GET_IRQ_INFO: > + case VFIO_DEVICE_SET_IRQS: > + case VFIO_DEVICE_RESET: > + ret = -EINVAL; > + break; > + > + case VHOST_MDEV_SET_STATE: > + ret = vhost_set_state(vdpa, argp); > + break; So this is used to start or stop the device. This means if userspace want to drive a network device, the API is not 100% compatible. Any blocker for this? E.g for SET_BACKEND, we can pass a fd and then identify the type of backend....
2019 Sep 03
0
[RFC v3] vhost: introduce mdev based hardware vhost backend
...mdev.h [...] > > + > > + break; > > + } > > + case VFIO_DEVICE_GET_REGION_INFO: > > + case VFIO_DEVICE_GET_IRQ_INFO: > > + case VFIO_DEVICE_SET_IRQS: > > + case VFIO_DEVICE_RESET: > > + ret = -EINVAL; > > + break; > > + > > + case VHOST_MDEV_SET_STATE: > > + ret = vhost_set_state(vdpa, argp); > > + break; > > > So this is used to start or stop the device. This means if userspace want to > drive a network device, the API is not 100% compatible. Any blocker for > this? E.g for SET_BACKEND, we can pass a fd and the...
2019 Sep 26
0
[PATCH] vhost: introduce mdev based hardware backend
...ong vhost_mdev_unlocked_ioctl(void *device_data, > + unsigned int cmd, unsigned long arg) > +{ > + struct vhost_mdev *m = device_data; > + void __user *argp = (void __user *)arg; > + long r; > + > + mutex_lock(&m->mutex); > + > + switch (cmd) { > + case VHOST_MDEV_SET_STATE: > + r = vhost_set_state(m, argp); > + break; > + case VHOST_GET_FEATURES: > + r = vhost_get_features(m, argp); > + break; > + case VHOST_SET_FEATURES: > + r = vhost_set_features(m, argp); > + break; > + case VHOST_GET_VRING_BASE: > + r = vhost_get_vring_base...
2019 Sep 27
0
[PATCH] vhost: introduce mdev based hardware backend
...ong vhost_mdev_unlocked_ioctl(void *device_data, > + unsigned int cmd, unsigned long arg) > +{ > + struct vhost_mdev *m = device_data; > + void __user *argp = (void __user *)arg; > + long r; > + > + mutex_lock(&m->mutex); > + > + switch (cmd) { > + case VHOST_MDEV_SET_STATE: > + r = vhost_set_state(m, argp); > + break; > + case VHOST_GET_FEATURES: > + r = vhost_get_features(m, argp); > + break; > + case VHOST_SET_FEATURES: > + r = vhost_set_features(m, argp); > + break; > + case VHOST_GET_VRING_BASE: > + r = vhost_get_vring_base...
2019 Sep 27
0
[PATCH] vhost: introduce mdev based hardware backend
...ost.h >>> @@ -116,4 +116,12 @@ >>> #define VHOST_VSOCK_SET_GUEST_CID _IOW(VHOST_VIRTIO, 0x60, __u64) >>> #define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int) >>> >>> +/* VHOST_MDEV specific defines */ >>> + >>> +#define VHOST_MDEV_SET_STATE _IOW(VHOST_VIRTIO, 0x70, __u64) >>> + >>> +#define VHOST_MDEV_S_STOPPED 0 >>> +#define VHOST_MDEV_S_RUNNING 1 >>> +#define VHOST_MDEV_S_MAX 2 >>> + >>> #endif >> So assuming we have an underlying device that behaves like virtio: >...