[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <011fb2bf-bee5-7fb6-0abc-17ddf7026476@redhat.com>
Date: Thu, 18 Mar 2021 11:24:05 +0800
From: Jason Wang <jasowang@...hat.com>
To: Stefano Garzarella <sgarzare@...hat.com>,
virtualization@...ts.linux-foundation.org
Cc: netdev@...r.kernel.org, Xie Yongji <xieyongji@...edance.com>,
Laurent Vivier <lvivier@...hat.com>,
Stefan Hajnoczi <stefanha@...hat.com>,
linux-kernel@...r.kernel.org, Max Gurtovoy <mgurtovoy@...dia.com>,
Parav Pandit <parav@...dia.com>,
"Michael S. Tsirkin" <mst@...hat.com>, kvm@...r.kernel.org
Subject: Re: [PATCH v4 10/14] vhost/vdpa: Remove the restriction that only
supports virtio-net devices
在 2021/3/16 上午12:34, Stefano Garzarella 写道:
> From: Xie Yongji <xieyongji@...edance.com>
>
> 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@...edance.com>
> Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>
Acked-by: Jason Wang <jasowang@...hat.com>
> ---
> drivers/vhost/vdpa.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> index 7ae4080e57d8..850ed4b62942 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"
>
> @@ -1018,10 +1018,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;
Powered by blists - more mailing lists