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=-20.7 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,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 30965C433DB for ; Thu, 31 Dec 2020 02:38:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F2412221FA for ; Thu, 31 Dec 2020 02:38:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726487AbgLaCin (ORCPT ); Wed, 30 Dec 2020 21:38:43 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:41793 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726289AbgLaCim (ORCPT ); Wed, 30 Dec 2020 21:38:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609382236; 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=bT6v+Ec3+GbfoduwGKdxSsf6srhaUGcfdLab8NVdm2s=; b=WFMvgeBh5F6lZ4I/NhLmOP/xYJwZA3+2jxd/wx4jiY1IA6zS3KhHj2chnSb4i2sXyCJtQH 0WTl+OLTxRUCYUYiuoWBZOldZCGzEEk9svln/w1CguUf27nf7GXnuEeE+YSCX2mQfaOndM HasROjv9LQpUtTY6WiC8xocYfdGW4zM= 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-GeJektIsNXyPt9-_fNw6JQ-1; Wed, 30 Dec 2020 21:37:12 -0500 X-MC-Unique: GeJektIsNXyPt9-_fNw6JQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D02418030A1; Thu, 31 Dec 2020 02:37:10 +0000 (UTC) Received: from [10.72.12.236] (ovpn-12-236.pek2.redhat.com [10.72.12.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4058D60BE2; Thu, 31 Dec 2020 02:36:59 +0000 (UTC) Subject: Re: [PATCH 12/21] vhost-vdpa: introduce uAPI to get the number of virtqueue groups 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-13-jasowang@redhat.com> <20201230100506.GB5241@mtl-vdi-166.wap.labs.mlnx> From: Jason Wang Message-ID: Date: Thu, 31 Dec 2020 10:36:58 +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: <20201230100506.GB5241@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.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/12/30 下午6:05, Eli Cohen wrote: > On Wed, Dec 16, 2020 at 02:48:09PM +0800, Jason Wang wrote: >> Follows the vDPA support for multiple address spaces, this patch >> introduce uAPI for the userspace to know the number of virtqueue >> groups supported by the vDPA device. >> >> Signed-off-by: Jason Wang >> --- >> drivers/vhost/vdpa.c | 4 ++++ >> include/uapi/linux/vhost.h | 3 +++ >> 2 files changed, 7 insertions(+) >> >> diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c >> index 060d5b5b7e64..1ba5901b28e7 100644 >> --- a/drivers/vhost/vdpa.c >> +++ b/drivers/vhost/vdpa.c >> @@ -536,6 +536,10 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep, >> case VHOST_VDPA_GET_VRING_NUM: >> r = vhost_vdpa_get_vring_num(v, argp); >> break; >> + case VHOST_VDPA_GET_GROUP_NUM: >> + r = copy_to_user(argp, &v->vdpa->ngroups, >> + sizeof(v->vdpa->ngroups)); >> + break; > Is this and other ioctls already supported in qemu? Not yet, the prototype is under development. I test the series with a small and dedicated userspace program. Thanks > 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=-18.4 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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=ham 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 45A41C433E0 for ; Thu, 31 Dec 2020 02:37:21 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C117F20B1F for ; Thu, 31 Dec 2020 02:37:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C117F20B1F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6CA4C86A02; Thu, 31 Dec 2020 02:37:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AaJq1YlbbkfV; Thu, 31 Dec 2020 02:37:19 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id E0F228697D; Thu, 31 Dec 2020 02:37:19 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C3870C088B; Thu, 31 Dec 2020 02:37:19 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2177FC013A for ; Thu, 31 Dec 2020 02:37:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 07BD886A00 for ; Thu, 31 Dec 2020 02:37:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4eiv37BbiK8N for ; Thu, 31 Dec 2020 02:37:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by fraxinus.osuosl.org (Postfix) with ESMTPS id A84038697D for ; Thu, 31 Dec 2020 02:37:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609382234; 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=bT6v+Ec3+GbfoduwGKdxSsf6srhaUGcfdLab8NVdm2s=; b=O4BPz8IiqhYfWBhividbbnNVC0Nt2u7axhnTtpAaJ8f/NGa/7Jm8ycgDxY0z54A8yUZISq wCZY+vq+9UTwcVJgMXOtaycYej6qPt8Ndm7zyUCU71V4mZwGBATtOXSQfTMyD2//3f4awL gt83u3bQcSQiXxBJV8BJtDtrQ+pPv+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-444-GeJektIsNXyPt9-_fNw6JQ-1; Wed, 30 Dec 2020 21:37:12 -0500 X-MC-Unique: GeJektIsNXyPt9-_fNw6JQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D02418030A1; Thu, 31 Dec 2020 02:37:10 +0000 (UTC) Received: from [10.72.12.236] (ovpn-12-236.pek2.redhat.com [10.72.12.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4058D60BE2; Thu, 31 Dec 2020 02:36:59 +0000 (UTC) Subject: Re: [PATCH 12/21] vhost-vdpa: introduce uAPI to get the number of virtqueue groups To: Eli Cohen References: <20201216064818.48239-1-jasowang@redhat.com> <20201216064818.48239-13-jasowang@redhat.com> <20201230100506.GB5241@mtl-vdi-166.wap.labs.mlnx> From: Jason Wang Message-ID: Date: Thu, 31 Dec 2020 10:36:58 +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: <20201230100506.GB5241@mtl-vdi-166.wap.labs.mlnx> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Cc: lulu@redhat.com, kvm@vger.kernel.org, mst@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, eperezma@redhat.com, stefanha@redhat.com, eli@mellanox.com, lingshan.zhu@intel.com, rob.miller@broadcom.com X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" Ck9uIDIwMjAvMTIvMzAg5LiL5Y2INjowNSwgRWxpIENvaGVuIHdyb3RlOgo+IE9uIFdlZCwgRGVj IDE2LCAyMDIwIGF0IDAyOjQ4OjA5UE0gKzA4MDAsIEphc29uIFdhbmcgd3JvdGU6Cj4+IEZvbGxv d3MgdGhlIHZEUEEgc3VwcG9ydCBmb3IgbXVsdGlwbGUgYWRkcmVzcyBzcGFjZXMsIHRoaXMgcGF0 Y2gKPj4gaW50cm9kdWNlIHVBUEkgZm9yIHRoZSB1c2Vyc3BhY2UgdG8ga25vdyB0aGUgbnVtYmVy IG9mIHZpcnRxdWV1ZQo+PiBncm91cHMgc3VwcG9ydGVkIGJ5IHRoZSB2RFBBIGRldmljZS4KPj4K Pj4gU2lnbmVkLW9mZi1ieTogSmFzb24gV2FuZzxqYXNvd2FuZ0ByZWRoYXQuY29tPgo+PiAtLS0K Pj4gICBkcml2ZXJzL3Zob3N0L3ZkcGEuYyAgICAgICB8IDQgKysrKwo+PiAgIGluY2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