Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10260377pxu; Tue, 29 Dec 2020 20:03:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5T7B7UH3XkzBRL79XK0PZUT9Ucx1n6EseD9ijjLb22RZSi4qecoN0lnKX5sXAk6XCva43 X-Received: by 2002:a05:6402:1383:: with SMTP id b3mr47985634edv.100.1609301036785; Tue, 29 Dec 2020 20:03:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609301036; cv=none; d=google.com; s=arc-20160816; b=A8lBpAJc4KAubhHY3DMI+L1pbKdGdqnfppGpE5HpKE83sUQD/1ondYNOr9+qwVNzaS Sp/q5kqlq/Qm3WzhWw33qzWt1nmLGimTJWT0Pe8bcaKzCXarT2BSL8rpmjPpEjvCLoiR XQZT7V0n3Sr8NSmoyoawaKYbW06iFOaVA932tGlUgczyJY8kIZxDJDz4cn2rcd8LmQaz j+hpfYWeHQ5g2LMk3RrzjPkOPwxK6ghcPKw2pbcMZ/Mt0552Ewxj1CwZncCTBpEUD8eG DmC8J1+W9LmWs3eC0hSEpZOLoQ9OwdpaVVHiS8uq1eQ3U9yiN3jiPc99DAJbNt1rSskD ioQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=KZ+tvVxfnnvv+eTht2YPU3/8LnIaN/7WC1RcaN3MqX4=; b=Qdb2uglQQFAjRUJ5V+HSUaJOjEeO3Q1Tj7VyYypRXTPBsmoUG//8Z1mUCTjnWuvXKP eJqocewkTBlMhdldvm8L5a05F2J0eLSRpATFYb5mlIf7u3624WPDa89ktq9VMTp55H83 fAnJnLC/pU7OUF8MutF/jqHeeukKTNOrtn8r1B5E0uuFhd2gM+XjRSSg3FqTbsl6vxSC ARlQBWQ0WDzxni95U+pdVBpIm+xjLnhb+4TJMJQoZzOvKnVMTWgrdbgzQPntOMc17ABx ZwqTAqSx3llm6OMl89wczrkA/1qgzrENJWE+KMRfaEkuYIC1SWIMbfqjdgJYw4fUhNBz UV/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ql+TaECz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h22si14032319ejl.73.2020.12.29.20.03.34; Tue, 29 Dec 2020 20:03:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ql+TaECz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726138AbgL3ECH (ORCPT + 99 others); Tue, 29 Dec 2020 23:02:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:30090 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbgL3ECG (ORCPT ); Tue, 29 Dec 2020 23:02:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609300840; 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=KZ+tvVxfnnvv+eTht2YPU3/8LnIaN/7WC1RcaN3MqX4=; b=Ql+TaECzfZVWHvMTksPeEgURq4A4vPAeRZxzPjwHAOjlrokEF/lvw9jUKC/wPl+jH+eiLY 3bNXADwpY6NF+rqBwju4NQtMpdbNPEHjo0vH3Yxh4ED26L1FzHPFsZXLltgGW/oEhptb4W lMhRrE14SfohgluXFYBDp6X3zMSp/+k= 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-352-usxb8T_YOo21w800PIYJBg-1; Tue, 29 Dec 2020 23:00:38 -0500 X-MC-Unique: usxb8T_YOo21w800PIYJBg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E8CD5180A096; Wed, 30 Dec 2020 04:00:36 +0000 (UTC) Received: from [10.72.13.30] (ovpn-13-30.pek2.redhat.com [10.72.13.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 46A41709B3; Wed, 30 Dec 2020 04:00:01 +0000 (UTC) Subject: Re: [PATCH 07/21] vdpa: multiple address spaces support To: Eli Cohen Cc: mst@redhat.com, eperezma@redhat.com, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lulu@redhat.com, eli@mellanox.com, lingshan.zhu@intel.com, rob.miller@broadcom.com, stefanha@redhat.com, sgarzare@redhat.com References: <20201216064818.48239-1-jasowang@redhat.com> <20201216064818.48239-8-jasowang@redhat.com> <20201229072832.GA195479@mtl-vdi-166.wap.labs.mlnx> From: Jason Wang Message-ID: Date: Wed, 30 Dec 2020 12:00:00 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201229072832.GA195479@mtl-vdi-166.wap.labs.mlnx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/12/29 下午3:28, Eli Cohen wrote: >> @@ -43,6 +43,8 @@ struct vdpa_vq_state { >> * @index: device index >> * @features_valid: were features initialized? for legacy guests >> * @nvqs: the number of virtqueues >> + * @ngroups: the number of virtqueue groups >> + * @nas: the number of address spaces > I am not sure these can be categorised as part of the state of the VQ. > It's more of a property so maybe we can have a callback to get the > properties of the VQ? > > Moreover, I think they should be handled in the hardware drivers to > return 1 for both ngroups and nas. We can, but those are static attributes that is not expected to be changed by the driver. Introduce callbacks for those static stuffs does not give us any advantage. For group id and notification area, since we don't have a abstract of vdpa_virtqueue. The only choice is to introduce callbacks for them. Maybe it's time to introduce vdpa_virtqueue. Thanks