diff options
Diffstat (limited to 'drivers/vhost')
| -rw-r--r-- | drivers/vhost/net.c | 4 | ||||
| -rw-r--r-- | drivers/vhost/test.c | 4 | ||||
| -rw-r--r-- | drivers/vhost/vhost.h | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index f82a7394756e..072cbbadbc36 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
| @@ -823,14 +823,14 @@ static long vhost_net_ioctl(struct file *f, unsigned int ioctl, | |||
| 823 | return -EFAULT; | 823 | return -EFAULT; |
| 824 | return vhost_net_set_backend(n, backend.index, backend.fd); | 824 | return vhost_net_set_backend(n, backend.index, backend.fd); |
| 825 | case VHOST_GET_FEATURES: | 825 | case VHOST_GET_FEATURES: |
| 826 | features = VHOST_FEATURES; | 826 | features = VHOST_NET_FEATURES; |
| 827 | if (copy_to_user(featurep, &features, sizeof features)) | 827 | if (copy_to_user(featurep, &features, sizeof features)) |
| 828 | return -EFAULT; | 828 | return -EFAULT; |
| 829 | return 0; | 829 | return 0; |
| 830 | case VHOST_SET_FEATURES: | 830 | case VHOST_SET_FEATURES: |
| 831 | if (copy_from_user(&features, featurep, sizeof features)) | 831 | if (copy_from_user(&features, featurep, sizeof features)) |
| 832 | return -EFAULT; | 832 | return -EFAULT; |
| 833 | if (features & ~VHOST_FEATURES) | 833 | if (features & ~VHOST_NET_FEATURES) |
| 834 | return -EOPNOTSUPP; | 834 | return -EOPNOTSUPP; |
| 835 | return vhost_net_set_features(n, features); | 835 | return vhost_net_set_features(n, features); |
| 836 | case VHOST_RESET_OWNER: | 836 | case VHOST_RESET_OWNER: |
diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c index 3de00d9fae2e..91d6f060aade 100644 --- a/drivers/vhost/test.c +++ b/drivers/vhost/test.c | |||
| @@ -261,14 +261,14 @@ static long vhost_test_ioctl(struct file *f, unsigned int ioctl, | |||
| 261 | return -EFAULT; | 261 | return -EFAULT; |
| 262 | return vhost_test_run(n, test); | 262 | return vhost_test_run(n, test); |
| 263 | case VHOST_GET_FEATURES: | 263 | case VHOST_GET_FEATURES: |
| 264 | features = VHOST_FEATURES; | 264 | features = VHOST_NET_FEATURES; |
| 265 | if (copy_to_user(featurep, &features, sizeof features)) | 265 | if (copy_to_user(featurep, &features, sizeof features)) |
| 266 | return -EFAULT; | 266 | return -EFAULT; |
| 267 | return 0; | 267 | return 0; |
| 268 | case VHOST_SET_FEATURES: | 268 | case VHOST_SET_FEATURES: |
| 269 | if (copy_from_user(&features, featurep, sizeof features)) | 269 | if (copy_from_user(&features, featurep, sizeof features)) |
| 270 | return -EFAULT; | 270 | return -EFAULT; |
| 271 | if (features & ~VHOST_FEATURES) | 271 | if (features & ~VHOST_NET_FEATURES) |
| 272 | return -EOPNOTSUPP; | 272 | return -EOPNOTSUPP; |
| 273 | return vhost_test_set_features(n, features); | 273 | return vhost_test_set_features(n, features); |
| 274 | case VHOST_RESET_OWNER: | 274 | case VHOST_RESET_OWNER: |
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 8de1fd5b8efb..07b97631fd34 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h | |||
| @@ -201,7 +201,8 @@ enum { | |||
| 201 | VHOST_FEATURES = (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | | 201 | VHOST_FEATURES = (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | |
| 202 | (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | | 202 | (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | |
| 203 | (1ULL << VIRTIO_RING_F_EVENT_IDX) | | 203 | (1ULL << VIRTIO_RING_F_EVENT_IDX) | |
| 204 | (1ULL << VHOST_F_LOG_ALL) | | 204 | (1ULL << VHOST_F_LOG_ALL), |
| 205 | VHOST_NET_FEATURES = VHOST_FEATURES | | ||
| 205 | (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) | | 206 | (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) | |
| 206 | (1ULL << VIRTIO_NET_F_MRG_RXBUF), | 207 | (1ULL << VIRTIO_NET_F_MRG_RXBUF), |
| 207 | }; | 208 | }; |
