Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp328846pxk; Thu, 24 Sep 2020 06:43:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3JntFWJYW+RMYpH/uE1/palDXBEoOpxGQYR8ZCU0Oe2wM8v+lkM3d+MxhD2WBkxJErkKQ X-Received: by 2002:a17:906:3494:: with SMTP id g20mr1098577ejb.486.1600955029998; Thu, 24 Sep 2020 06:43:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600955029; cv=none; d=google.com; s=arc-20160816; b=XQihlm40BkZ8v3iA2KA36PbEp+YhjzAPHxwmimnM1rWiOtzNYm64x+A5AYqupJajCf jdz+rzjZgPvrQNIyORDcX8uioHaffnOr45yZQMH5Dj58Dz8ieHBFfZHNPA8FEJmsJxI3 oQ/gj+KpHafCflWdoDP/PBXRTBQg9zrPpT61K6qeFtOnSIXv0Okw48W9KLWKx0xkwhev HDDLKDbphOvaqDluj+qvWXSiGY4Ui65XPdmEC3lSqhKlEl81EtNFdvDoAscjKs9e8O76 IoEoHBflcPWh+b1lt8Fwb1pxRUAEWBFD3UVsPSveWfSKbtmcpyK3wJWVnbqdQETGvn2K PQZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=QHjiQzBwzBmbkZi1rgS6SnTKc3/Wk57o7w5znXtKlLA=; b=QzRaTCNmq76D99bcA+vjcFGL40aoEh1WwMd3lw/yLLTjxIXnsCm13y/GT1i19Etrdi YTjGLuJAmi37x2mqtpAY9B8oZIoJ5F2xmVm/FNpcQOSORF+wz24DdvAtFSOlj09sBCKh BigS6KyOpOWDYP07p8H9TrjbGx05kBXXeD9mBhbqLutLScpzIyF/jwYLsINy8W9VKVDi 8DhcCDy7oiV3uJPSzVnmXyVxVrL/EC/NKJxCU7B/gZoG5MSFZLNb6lukGqIJi0znCzhE f4ThrRNzA7UMgiI9RQwkxXxS3JkLC9p3fZ5SlOmcrUL0dl9NkJMW53HSaJSb+EU0VDGX 2IrQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o60si1983638edd.426.2020.09.24.06.43.24; Thu, 24 Sep 2020 06:43:49 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728122AbgIXNmW (ORCPT + 99 others); Thu, 24 Sep 2020 09:42:22 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:14274 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727749AbgIXNmV (ORCPT ); Thu, 24 Sep 2020 09:42:21 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id ABEC7382033A6CEF029B; Thu, 24 Sep 2020 21:42:18 +0800 (CST) Received: from [10.174.185.226] (10.174.185.226) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Thu, 24 Sep 2020 21:42:10 +0800 Subject: Re: [PATCH v10 11/11] vfio: Document nested stage control To: Eric Auger , , , , , , , , , , References: <20200320161911.27494-1-eric.auger@redhat.com> <20200320161911.27494-12-eric.auger@redhat.com> From: Zenghui Yu Message-ID: <26a85a63-6cc1-0348-e703-cb31ddd75339@huawei.com> Date: Thu, 24 Sep 2020 21:42:10 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200320161911.27494-12-eric.auger@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.185.226] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Eric, On 2020/3/21 0:19, Eric Auger wrote: > The VFIO API was enhanced to support nested stage control: a bunch of > new iotcls, one DMA FAULT region and an associated specific IRQ. > > Let's document the process to follow to set up nested mode. > > Signed-off-by: Eric Auger [...] > +The userspace must be prepared to receive faults. The VFIO-PCI device > +exposes one dedicated DMA FAULT region: it contains a ring buffer and > +its header that allows to manage the head/tail indices. The region is > +identified by the following index/subindex: > +- VFIO_REGION_TYPE_NESTED/VFIO_REGION_SUBTYPE_NESTED_DMA_FAULT > + > +The DMA FAULT region exposes a VFIO_REGION_INFO_CAP_PRODUCER_FAULT > +region capability that allows the userspace to retrieve the ABI version > +of the fault records filled by the host. Nit: I don't see this capability in the code. Thanks, Zenghui