Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp377494pxu; Tue, 6 Oct 2020 08:31:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwU8rRTLnElyu4iiMkWk2HyXY/CXQ/il5gRqFrnw0OLCFsHHYwW/EliQJL0mKeGPl7gw9p7 X-Received: by 2002:aa7:cfcb:: with SMTP id r11mr5989316edy.211.1601998269630; Tue, 06 Oct 2020 08:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601998269; cv=none; d=google.com; s=arc-20160816; b=oTS0GoUN0j7CuFaEYJ1yQQQCHRHD+fsXkvRHIbyFdNz+9gUrwoM9ICTHu2CJKcyqkI KZoF7/3uyf+MypP1uxk0w1igr/nPZXGJEh9EUDiv8MOKeY2C3kzk0WiqY60UYMSeoUnJ 3nzedQsBms9jE05h2NDasRdfBhG9rIATtuQCcS3yL1BUmxrZUcm1MI8xlXJjFGiMdGLa jwGl9KYxVBPrWMvYb6leC2/idr3figLPV+LIBGarDTruG2fw+1fBCOOXcIxdUAgBHhNJ C305UZaswyYPa+RmlM1SbirW2drbekbclQtWa866gV385R8jx/71ZtO+jDZo/lqGibIi PhHw== 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:dkim-signature; bh=b3TQyn0r0hHJtyWnHzP2XsiJelQMbh2EnW4oVHas18k=; b=P+/XPyiN35B0cA+aSB0+NH1kX7h7JRig6ruSKQNgtBVgNDp11UeZcC3s5l+8ZFKIdx LsuKGeNYaUEx9sYHAwqPgmWYMSJDl32+xapRucEuiPJuxIWbzIIwP6QjTSG4yc4uSqty bVLGmRsvv5Jl22U4tr/UciG+L5F7ruY2ydkXLRPjOoGXYf70GuU+w1rcjBGAsQJLy661 ePcyKuemSKe0rQCOnKOISxC3vbdBxJurnRUr11cXdVjgnmWlUVZ/7jGr3vduPq6C0ndc T6arys5xyvn84uYozefUKVlVZtfk2/JPwfsV+1h2f4M59Njz4coTW0RRwEnySQrR4Qai XxSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dabfP6T7; 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 rn19si2347724ejb.340.2020.10.06.08.30.45; Tue, 06 Oct 2020 08:31:09 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dabfP6T7; 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 S1725995AbgJFP3f (ORCPT + 99 others); Tue, 6 Oct 2020 11:29:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39947 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725769AbgJFP3f (ORCPT ); Tue, 6 Oct 2020 11:29:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601998173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b3TQyn0r0hHJtyWnHzP2XsiJelQMbh2EnW4oVHas18k=; b=dabfP6T7YDx4V+3ggzB0eDrqEWFA1lVr1RN0YkUhSAFXKNixLUZDxa6M7S0tEIiXU9acvf mg2ONKwdmR681lRyUa7wbVxptt0za+DOmpDiRHx5eQfUfqyBOiuPnoiqJwtZmmrNNumcNF VQVX0G+UMekabAqcxxAiLeQOsoYvUQc= 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-557-XNZ3tFqAPmCyxpBT5oD_sA-1; Tue, 06 Oct 2020 11:29:31 -0400 X-MC-Unique: XNZ3tFqAPmCyxpBT5oD_sA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7226018A072C; Tue, 6 Oct 2020 15:29:29 +0000 (UTC) Received: from [10.36.113.210] (ovpn-113-210.ams2.redhat.com [10.36.113.210]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9C32255764; Tue, 6 Oct 2020 15:29:23 +0000 (UTC) Subject: Re: [PATCH v10 11/11] vfio: Document nested stage control To: Zenghui Yu , eric.auger.pro@gmail.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, joro@8bytes.org, alex.williamson@redhat.com, jacob.jun.pan@linux.intel.com, yi.l.liu@intel.com, robin.murphy@arm.com References: <20200320161911.27494-1-eric.auger@redhat.com> <20200320161911.27494-12-eric.auger@redhat.com> <26a85a63-6cc1-0348-e703-cb31ddd75339@huawei.com> From: Auger Eric Message-ID: <4df9f189-7a1b-be1f-0b1a-1669534a98d7@redhat.com> Date: Tue, 6 Oct 2020 17:29:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <26a85a63-6cc1-0348-e703-cb31ddd75339@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Zenghui, On 9/24/20 3:42 PM, Zenghui Yu wrote: > 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. Thank you very much for the review. I am late doing the respin but I will take into account all your comments. Thanks! Eric > > > Thanks, > Zenghui >