Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3165452imw; Wed, 6 Jul 2022 19:12:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t1c0uBnKkYZuA7GnkEFvv0O93e2KbgnIzzw3tU//f672aw3dWzA9wWNv2xkn1bWadGlnRE X-Received: by 2002:a05:6402:4387:b0:435:94c6:716d with SMTP id o7-20020a056402438700b0043594c6716dmr59229429edc.298.1657159967890; Wed, 06 Jul 2022 19:12:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657159967; cv=pass; d=google.com; s=arc-20160816; b=Nl5D/YSXNaD0wZJ3yoYNiOQln+P9aNPjpua4wlo6D+/MwSmZqdCX1BC6Skc4KeL+L4 +bwTUgXVqv8+uecMyvLoQ4Q7QB/lq4huwqqbkfSqTc09rxwqx1WNP0JAuNKhwIJmevsE UBZdCGQQcgzuToUKkQtEZ5knGg9+TRe361JmuEmGy7cg8K5vSesQ882iwbjEq092BqfJ pd+BTc8vnYxvQXSXJ+uJ5j0XSadgAu7I10VLRt05xs7JeAVLz+tKJRRxyQIwr2Ed2VCO MNby5FsquI/hZ+a0SYhgj5kajB7q2PMZKCt11UVPLxUspchCr18FRA1scrFeva5wLROK Hwpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=ugTPB8Iea7gUrXWMaXW5LF8X2PTfLkvfauNeZHQrdoQ=; b=XzXiQkdlENSUFOdM6eOJPrfvH6BdkK7rrWOYZQPFsSfzBa+RadZRTjATbeQiepkBCN Y5+WfGAVfWeNALml9gY8C4TorfeS79NPKtryO9O9L+2SP1MAd3azy+l45vGTqK6z61MW S8gjB46FkalYfkfqsnUEG/cWKo5952bhLMNCCz/jaqx/jdxVp1oPdywOR4y8CZn6KhRW oarXEJzkqRcEAtoGODfoSvAfdG4AJZcFABHVDvvSy2J9C8WSPVBZeo/M6UQRasKkr8xM K2IV58RPoDKgnRxak51iJkm/sWCwgmbg2+UZVzbNmiIPycbqBYm9k8sDK6yqzXVgDge1 ggkw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DBY0yG6V; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o13-20020a17090637cd00b006feed26a290si17297747ejc.42.2022.07.06.19.12.23; Wed, 06 Jul 2022 19:12:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DBY0yG6V; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234711AbiGGB6o (ORCPT + 99 others); Wed, 6 Jul 2022 21:58:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234161AbiGGB6n (ORCPT ); Wed, 6 Jul 2022 21:58:43 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D6E82CDDC for ; Wed, 6 Jul 2022 18:58:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657159122; x=1688695122; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ugTPB8Iea7gUrXWMaXW5LF8X2PTfLkvfauNeZHQrdoQ=; b=DBY0yG6Vyi/57BURwzS1skenFJY4HAb21NEELkH/gq1Pqw4lZ0VNRt6A GYEAePEc6b86IZm9idt/3APBGkd2X5Se8d3RGCijKtN+JFeAVezK08TQQ l2fK+5Cl9lrfAPdjzObzaELL3d8jIzyc+h580uy4hHip9pVxyu3L6b8go Jd2N6Vh/vzA/oOOwZJGeMDRmvZvMk0DK/X8NCxEjQbtNCWTTxveqPpWLS cUnEkuN+MtqIPBJslQuOQB2KzNPcNenkCMaRI3J55fcBWrQ3oiLDRP9q0 xqQmrHEcJMX525ZSzotGzwUXcKLEfoWwovwkW4S1Xj2BTO7YOoMneyc/Q g==; X-IronPort-AV: E=McAfee;i="6400,9594,10400"; a="370226871" X-IronPort-AV: E=Sophos;i="5.92,251,1650956400"; d="scan'208";a="370226871" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2022 18:58:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,251,1650956400"; d="scan'208";a="650919926" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga008.fm.intel.com with ESMTP; 06 Jul 2022 18:58:41 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 6 Jul 2022 18:58:40 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 6 Jul 2022 18:58:40 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 6 Jul 2022 18:58:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DEXM3KOTrKW4dvcZdAXiHbtyEe4BtTk1haz4K2k3dSKhcz70QKzWBdrsoZOS6CfYyvHo6K/+8cnNDagkYP5ot21PTRcwpNcfdLnhj2tKwgO/7/utr+qmaHvWQDJwmgCrAMy89ivERnmDhleyNLVFGn+ED8BZuV8j8np6VgCU6aZWMJO2W6y4dkXA6Ixzf1K49sbLHJevuMMAaEuRodia44sad1aT34sISHEIxAnzVY2kjX1DHQ+lycw/Gs7Hp37Q6I6qMJNoqUsQTZZiDicNc539TNcusYyoInZJTd7Wbi2gNEAVP07ZxyV/gqLoBwgZvHXqJ2RszkA+GvaVjenWVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ugTPB8Iea7gUrXWMaXW5LF8X2PTfLkvfauNeZHQrdoQ=; b=khzdCkPBkMEZ3MU0rn9BjgQp+VcN3tG2Pc5jy/SHbyQdW6BWzpUxnx+x4K2SDr0i1BShtRX5pr/9uvAQ6ak5Mzu2Ye6GxcwnLX3WjGCGUm5bxtSlGXRad2S0Ay3P8sFiwUqXgiicP31u6X764z7BqEt6bEV9nQoWeFeMNSqVEik5mz0zivTfPcsrXSsnb/jedyYt60Kgxha32S5uO/VCbQsPfjNFg35+S65F05mFT06nSj9jCmCb1LPqnXrWczZctdZ96NjqwRKJNoutbHrv7vwB03lO8QGFJ/Q216vR1DJchC8QBuloYncO0onPtYkEyw4O6RlfR+t/YFfA+EbLzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BN9PR11MB5276.namprd11.prod.outlook.com (2603:10b6:408:135::18) by PH0PR11MB5112.namprd11.prod.outlook.com (2603:10b6:510:3b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15; Thu, 7 Jul 2022 01:58:39 +0000 Received: from BN9PR11MB5276.namprd11.prod.outlook.com ([fe80::8435:5a99:1e28:b38c]) by BN9PR11MB5276.namprd11.prod.outlook.com ([fe80::8435:5a99:1e28:b38c%2]) with mapi id 15.20.5395.021; Thu, 7 Jul 2022 01:58:39 +0000 From: "Tian, Kevin" To: Lu Baolu , Joerg Roedel , Jason Gunthorpe , Christoph Hellwig , "Raj, Ashok" , Will Deacon , "Robin Murphy" , Jean-Philippe Brucker , "Jiang, Dave" , Vinod Koul CC: Eric Auger , "Liu, Yi L" , "Pan, Jacob jun" , Zhangfei Gao , "Zhu, Tony" , "iommu@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "Jean-Philippe Brucker" Subject: RE: [PATCH v10 10/12] iommu: Prepare IOMMU domain for IOPF Thread-Topic: [PATCH v10 10/12] iommu: Prepare IOMMU domain for IOPF Thread-Index: AQHYkC3X3zhuGv/Z20C4J9a0jjJ5Mq1yKbbA Date: Thu, 7 Jul 2022 01:58:39 +0000 Message-ID: References: <20220705050710.2887204-1-baolu.lu@linux.intel.com> <20220705050710.2887204-11-baolu.lu@linux.intel.com> In-Reply-To: <20220705050710.2887204-11-baolu.lu@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6053bdc4-533e-49dd-932c-08da5fbc35fd x-ms-traffictypediagnostic: PH0PR11MB5112:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LssPWWPwv+ng6z2qry3wbgAMMdDLPMIFRVpa0FCg9y8q5JTOGL2nlF1nVrOrrzsA1AdYim4IwrfP2hkGjLk3/Nu7HnU63+1rZRFYy4PhUHv8lAEHBMYo3lYNbvW9MamJBXzL97QeCQbZ6svid0FYX7mZZUmn2djS0JgXee7Qwv/qz1RGJ1Dlsc+6y+irafzL1ngzE/iCVWQanMb6g8hO+9I84iqMhG2mY8r1QOUchY1iZGvc1VmJibG4b0NXV32X4erV0+cFxpZAAO0ccZ7+dPw300uzc8mFO3xU7qQqxhcF8a5YF93D8XbWNLmQf+kcrcQ5FXHbvE/tPKCRnkkNX/JwvE56vaHr+zad9aoVw3h47cGEw4vBeWZAE/j4pBW68FpOjAdixN8YXRnqqidSPEtvSNMwmuIIdMflbgjPRKJMixN/wiuoFo7vdVzQXjcYgBruDW0w+1+7ip+lggaOhG5y+pC0rrXdBjfxsgxyjavOQ4UHC9/Z+egGtmsCc/KT8lpYbIw7/zMxVtboT3lzkFgmqF41eLzLbJyWyJ3BzGr7EFf8luEAJ6Z4RMt/rMrgLQI+cR2hJJlIDcGe9Ai7jJjZFkMOr0yzQMmCdXSLEd+0agECx+l0jvcxfQrcrW/6PUe2YXmPIa3lncc6rBjtQ7XQg68aLWxAgpANQhZgiWWXmsDPOP0bbmqueqEpnZTXtdZWw+ynklwQqCrBMIUs0pTaZWhD+XG+fyCzNvbn0k0pMmzIWahSFH0466Hco70cLqO6Ef/fG6tRp4RsRMRtFknK4mPhfXtLM2bqK2Gh2qBnHXSWiLf5MGC0UihavewA21YbbCoTtspUtyY8nbrk7g== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR11MB5276.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(346002)(396003)(366004)(39860400002)(376002)(136003)(478600001)(38100700002)(2906002)(71200400001)(66446008)(186003)(33656002)(6506007)(110136005)(7696005)(41300700001)(66476007)(4326008)(54906003)(921005)(7416002)(316002)(86362001)(5660300002)(82960400001)(8936002)(38070700005)(26005)(52536014)(83380400001)(64756008)(122000001)(66556008)(66946007)(55016003)(76116006)(8676002)(9686003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?BfgFr9sBaBUHkl7Pq52e5MrD1lAK1eq9RHFeBJlPaDDDaEyJz6f/XQDtYqfq?= =?us-ascii?Q?YwzuYhaTshKQdDONSSsPhqME4OCO8OpqMswDJicSHwRQXTp42ou5LRptrsPQ?= =?us-ascii?Q?CHrLrUq1fVps9wR24kT0CjdMuBP1RdIeq+sLNzjnsF5Iu0KV6LYkB0LOD7qT?= =?us-ascii?Q?AUkfO8/O5hKO1oRe+JoRM6XMRAPaE739UougOFK1w4X+TYufnXphmqBEGsN/?= =?us-ascii?Q?gm1dF75WFdSBd2638Q4l7GG/9BcG5V2SMXXB+aHk27IZMOHLuexygVpGBEjx?= =?us-ascii?Q?LFj9H2A3CV2SGbtJRLiZoPAUR7wjuTC49AjN2oVkmZ0ynK0m+4ktz/RKDlUm?= =?us-ascii?Q?7ItvsbpvNm7BHOGcpD2a9jf7k0+FGGpBLiiCZO7vGKmsZtdEorG6fpxOi4pp?= =?us-ascii?Q?09OLICYsOsmDD5RZwTHYGvhUTXdgC2lehlz3YXsseZXMZiEwC/Z6hKNs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RYEbuYFpROmfYEB8EioABC6rgGJC?= =?us-ascii?Q?hyJ2QurUbwSKjqF7zKrcUBffIe+6X7qTSJyKdlAtbNE0TDRE7jzFbxQ5h75A?= =?us-ascii?Q?XqGLkiicuyqRR3ETepKHZ6sIV+8hWOKnAn8C/8Jr5lCc0HaewpOt9gS9LObU?= =?us-ascii?Q?fqMCmSYznXI2au2tdmCgBFASiC1tBnttR7fTp6v3cq5OgBDKYlrGwStLtF7X?= =?us-ascii?Q?ysedPRCwL+umjL8Wp2JdYSLRfoCVUpb7gKLRxnzk?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5276.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6053bdc4-533e-49dd-932c-08da5fbc35fd X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jul 2022 01:58:39.0491 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: AMuVyruaKePfHpO1aRCC9gle8mBXXTaLlNxaJw5OxdS8zwCVBhiCTxuYlPZmlZ/CBFKRPras7U88FKsfcfDcKA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5112 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Lu Baolu > Sent: Tuesday, July 5, 2022 1:07 PM >=20 > This adds some mechanisms around the iommu_domain so that the I/O page > fault handling framework could route a page fault to the domain and > call the fault handler from it. >=20 > Add pointers to the page fault handler and its private data in struct > iommu_domain. The fault handler will be called with the private data > as a parameter once a page fault is routed to the domain. Any kernel > component which owns an iommu domain could install handler and its > private parameter so that the page fault could be further routed and > handled. >=20 > This also prepares the SVA implementation to be the first consumer of > the per-domain page fault handling model. The I/O page fault handler > for SVA is copied to the SVA file with mmget_not_zero() added before > mmap_read_lock(). >=20 > Suggested-by: Jean-Philippe Brucker > Signed-off-by: Lu Baolu > Reviewed-by: Jean-Philippe Brucker > Tested-by: Zhangfei Gao > Tested-by: Tony Zhu Reviewed-by: Kevin Tian