Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1162451pxu; Thu, 17 Dec 2020 03:51:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxiIzOzmNoqOfKh/m/gkBAorovhLc1XbMEIfysJk0ArWt6rDziAKItkNvJtvIra42vXATjs X-Received: by 2002:aa7:c698:: with SMTP id n24mr37836861edq.277.1608205916679; Thu, 17 Dec 2020 03:51:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608205916; cv=none; d=google.com; s=arc-20160816; b=W2Dbk1XZxe0Si3mgUThIapHqIrUlVzx4+XQsLsrfdDqhYvEN+7GNdoSZ7x3sjo1afS M3i1btgaUZypgsevMCj2t0e1rV0Eq3jRgnOC5IAmGyHmk1cgyNy3KwXZ3z+S5cPZkgaa z7Fp2GxnmL4vrFIghXt0CUOwsbiTa78zJ8asyrVm0lPecyFiyC1I+tWAOlIccq8Dl37M DAtFwjeZUYbGnIjGcwvTceJoqHbGcSshL1R+HxTOnqz+2XUKQkdwE05MKE9KH0HWUj1K VE5b7PoSZASWshHmpTVpchx/QpQPb47YGPvzu+yvPCI10nQRF5/LFCrk9oH9qlAN+SZz G9xg== 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; bh=ggBGBQCOifIOojWMKs0gU2Vu+EqXKGs2w8VtWOjEGNg=; b=uvIAbgoScrW94RJziVIwe+pcQ7Aw9/d7GwDFNON231qiBgGJ5rLwDXC5RN2JaKnVrE d7qGFJ+OuvNBXBwBu3P4E76pOxuiqKhV+MagsAeymr0S/HrYC0bB6f/1SIKX0wLmCWOA 8IbI4TYwdAohdjz2JqsqyEUHD4vFIRVHviCkBnzxLdItnGeVIaSBvnQGEjQg+fHwPkW1 0JuzMgc3yB2PwC2siLgY8vma8wxfayWzamIUs5W8RpTyUNCdllZIl56luW5jY7bTXcsG oZzJN8u5Z1nF6Zp5RpGHFjc8+a4/W81hkgl4kMnHT/hogatPQHZcKCvp7Z/ECDntji5i 3bTQ== 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 d13si4487783edv.602.2020.12.17.03.51.34; Thu, 17 Dec 2020 03:51: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; 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 S1728000AbgLQLuk (ORCPT + 99 others); Thu, 17 Dec 2020 06:50:40 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:2917 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727656AbgLQLuk (ORCPT ); Thu, 17 Dec 2020 06:50:40 -0500 Received: from DGGEMM404-HUB.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4CxVdp4VVtz56Gr; Thu, 17 Dec 2020 19:49:18 +0800 (CST) Received: from dggema765-chm.china.huawei.com (10.1.198.207) by DGGEMM404-HUB.china.huawei.com (10.3.20.212) with Microsoft SMTP Server (TLS) id 14.3.498.0; Thu, 17 Dec 2020 19:49:56 +0800 Received: from [10.174.185.137] (10.174.185.137) by dggema765-chm.china.huawei.com (10.1.198.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Thu, 17 Dec 2020 19:49:55 +0800 Subject: Re: [PATCH v11 04/13] vfio/pci: Add VFIO_REGION_TYPE_NESTED region type To: Eric Auger , , , , , , , , , , CC: , , , , , , , Keqian Zhu , References: <20201116110030.32335-1-eric.auger@redhat.com> <20201116110030.32335-5-eric.auger@redhat.com> From: Kunkun Jiang Message-ID: <2b5031d4-fa1a-c893-e7e4-56c68da600e4@huawei.com> Date: Thu, 17 Dec 2020 19:49:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201116110030.32335-5-eric.auger@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.174.185.137] X-ClientProxiedBy: dggeme706-chm.china.huawei.com (10.1.199.102) To dggema765-chm.china.huawei.com (10.1.198.207) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Eric, On 2020/11/16 19:00, Eric Auger wrote: > Add a new specific DMA_FAULT region aiming to exposed nested mode > translation faults. This region only is exposed if the device > is attached to a nested domain. > > The region has a ring buffer that contains the actual fault > records plus a header allowing to handle it (tail/head indices, > max capacity, entry size). At the moment the region is dimensionned > for 512 fault records. > > Signed-off-by: Eric Auger > > --- [...] > diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h > index b352e76cfb71..629dfb38d9e7 100644 > --- a/include/uapi/linux/vfio.h > +++ b/include/uapi/linux/vfio.h > @@ -343,6 +343,9 @@ struct vfio_region_info_cap_type { > /* sub-types for VFIO_REGION_TYPE_GFX */ > #define VFIO_REGION_SUBTYPE_GFX_EDID (1) > > +#define VFIO_REGION_TYPE_NESTED (2) > +#define VFIO_REGION_SUBTYPE_NESTED_DMA_FAULT (1) > + The macro *define VFIO_REGION_TYPE_NESTED    (2)* is in conflict with *#define VFIO_REGION_TYPE_CCW    (2)*. Thanks, Kunkun Jiang.