Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10989179pxu; Wed, 30 Dec 2020 18:41:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5PH4+Noa3aEG9kAfXoCYlhUXK/VrqT4wIQOTu00Sqz/ZfkVMXqmrVVENCEkdPOOSCwkvP X-Received: by 2002:a50:eb44:: with SMTP id z4mr51967808edp.167.1609382472657; Wed, 30 Dec 2020 18:41:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609382472; cv=none; d=google.com; s=arc-20160816; b=Y3aM8arrfpGMl16kl44Dw97HGSUdXR1zDZoHP1byiAurncHJHZRcKBLsXaeTYrJ+3k WdEnmmoaojnYMYRzvqkfXV9WklMdL9jMsWpiuTvsXyUVUNE6Mwr31bp1b9nHpPBP1xaz ws86IEUQEtqHA5yjGt4xgTLYsSAnfILX6t5IqzSBuSIzRmIXS9t+V3qeunerQgJQg0/F dYMdE+d2u6UMjkNZnJJz6OxemTR0GOnEiLq8dYFc+NCcpZPQMT2vIVCgeVsfbXTyLe0P bCa+Gh6eywo0eRMAqeGQA7J/dD30w9hqEeYRp9t7JmTS4RubZlS7LpjgqTAy9HoNm8lF VLAw== 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=bT6v+Ec3+GbfoduwGKdxSsf6srhaUGcfdLab8NVdm2s=; b=yG3x1S+NE9XeYGUu1ynecPLWbbdeVXGT2QbqrW1w7QZ0TxeqRdsg6u6ZSA1AMlk0ct ifoQxUEObFEfWGqFrkTXFncMTqFKVywQii6bNFBvORU7UQa1CYvZQMFnQUSyJwRe+LjC 0MMLm2cMK/yAwB2dQs6SutOswunZL6UvnXov1TJeVg1OmBkeKDFrbpWnQMINP7obmpVE 906t4MIyWWsSIhDIZE8jeJYGTGYj5FRxwChM1L2xPSlARJZ86WA0fDP7o7Ht+Y3TGl/u PxdT1+VQQtBykfcGdxNb9lgpaFoCcy7y5VPswQ4iQzW4BHeEUxGrdnCQnjdKWp4FicU/ GgNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WFMvgeBh; 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 dc28si23141456edb.219.2020.12.30.18.40.38; Wed, 30 Dec 2020 18:41:12 -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=WFMvgeBh; 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 S1726469AbgLaCin (ORCPT + 99 others); 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 >