summaryrefslogtreecommitdiff
path: root/drivers/vhost
diff options
context:
space:
mode:
authorXie Yongji <xieyongji@bytedance.com>2021-03-15 17:34:46 +0100
committerMichael S. Tsirkin <mst@redhat.com>2021-05-03 04:55:53 -0400
commit9d6d97bff7909910af537fd3903d05338adaaefa (patch)
tree339bf4ab43a379a78a5708a70f801113afa46dc7 /drivers/vhost
parentd6d8bb92fdde6390037bf9da174ed3ab551c04d7 (diff)
downloadlwn-9d6d97bff7909910af537fd3903d05338adaaefa.tar.gz
lwn-9d6d97bff7909910af537fd3903d05338adaaefa.zip
vhost/vdpa: Remove the restriction that only supports virtio-net devices
Since the config checks are done by the vDPA drivers, we can remove the virtio-net restriction and we should be able to support all kinds of virtio devices. <linux/virtio_net.h> is not needed anymore, but we need to include <linux/slab.h> to avoid compilation failures. Signed-off-by: Xie Yongji <xieyongji@bytedance.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Link: https://lore.kernel.org/r/20210315163450.254396-11-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/vdpa.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index a27756e2f99b..a1496c596120 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -16,12 +16,12 @@
#include <linux/cdev.h>
#include <linux/device.h>
#include <linux/mm.h>
+#include <linux/slab.h>
#include <linux/iommu.h>
#include <linux/uuid.h>
#include <linux/vdpa.h>
#include <linux/nospec.h>
#include <linux/vhost.h>
-#include <linux/virtio_net.h>
#include "vhost.h"
@@ -1023,10 +1023,6 @@ static int vhost_vdpa_probe(struct vdpa_device *vdpa)
int minor;
int r;
- /* Currently, we only accept the network devices. */
- if (ops->get_device_id(vdpa) != VIRTIO_ID_NET)
- return -ENOTSUPP;
-
v = kzalloc(sizeof(*v), GFP_KERNEL | __GFP_RETRY_MAYFAIL);
if (!v)
return -ENOMEM;