From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D254C433E6 for ; Thu, 18 Mar 2021 03:25:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E0E2264EEE for ; Thu, 18 Mar 2021 03:25:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230527AbhCRDYs (ORCPT ); Wed, 17 Mar 2021 23:24:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:34947 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230484AbhCRDY1 (ORCPT ); Wed, 17 Mar 2021 23:24:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616037866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sk99JE96HUPSTLu/4JDMtH8mhmtCcHHNeKecLnAG+NE=; b=hbkEy4e4gzO0lf3fZMdx+5koTXY+AYY0cZMug/uzBGRp7FlHV84W0ZAIUbbeFAUKJ+8Mh/ /KQc3B28+nIoBYysnNEnS8QHO1cHBpakrtKhvAtIIbWKXpkruI8wbokdb+UarGwl4CacBN NjVsV9LZL7M2AcS/5IZkev/BdHRMi4Y= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-444-9PzC1WQ9N_6YW8Wemxs-EQ-1; Wed, 17 Mar 2021 23:24:25 -0400 X-MC-Unique: 9PzC1WQ9N_6YW8Wemxs-EQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7641B81744F; Thu, 18 Mar 2021 03:24:23 +0000 (UTC) Received: from wangxiaodeMacBook-Air.local (ovpn-13-131.pek2.redhat.com [10.72.13.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id 192966C330; Thu, 18 Mar 2021 03:24:06 +0000 (UTC) Subject: Re: [PATCH v4 10/14] vhost/vdpa: Remove the restriction that only supports virtio-net devices To: Stefano Garzarella , virtualization@lists.linux-foundation.org Cc: netdev@vger.kernel.org, Xie Yongji , Laurent Vivier , Stefan Hajnoczi , linux-kernel@vger.kernel.org, Max Gurtovoy , Parav Pandit , "Michael S. Tsirkin" , kvm@vger.kernel.org References: <20210315163450.254396-1-sgarzare@redhat.com> <20210315163450.254396-11-sgarzare@redhat.com> From: Jason Wang Message-ID: <011fb2bf-bee5-7fb6-0abc-17ddf7026476@redhat.com> Date: Thu, 18 Mar 2021 11:24:05 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210315163450.254396-11-sgarzare@redhat.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ÔÚ 2021/3/16 ÉÏÎç12:34, Stefano Garzarella дµÀ: > From: Xie Yongji > > 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. > > is not needed anymore, but we need to include > to avoid compilation failures. > > Signed-off-by: Xie Yongji > Signed-off-by: Stefano Garzarella Acked-by: Jason Wang > --- > 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 > #include > #include > +#include > #include > #include > #include > #include > #include > -#include > > #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;