Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1910621rwo; Thu, 3 Aug 2023 01:29:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlHHBCY6lM4laKqru8npXwC8uRNrtDIs3AOQ5umVStTOPl4LwUDznXmPbCqRCujwY1qBFsWE X-Received: by 2002:a17:902:eb49:b0:1b3:a928:18e7 with SMTP id i9-20020a170902eb4900b001b3a92818e7mr15002634pli.59.1691051366300; Thu, 03 Aug 2023 01:29:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1691051366; cv=pass; d=google.com; s=arc-20160816; b=g09zjgElxqU1BK6x9t3PvpXf8prFloMHEEz0tkcBTCWMg2uoRU6vFs9xX/Y76aZlh+ TJGM+0JRTXuSmdQ4n1C2qzAhooiWnn6fZRB/z3CVALC/820nNrz55ATks2uIi0h1eWNg 73q4xsJstXiylCaHPc72dqLu6EuX5SsMXP9lNSotOvbQTpX6F1mLGxXp/Vivvk3WgBXg PHS+Gc0eKbkFmUYZ3sBrfQ/wjf1suH0ovmm9NaWvIGZVghNevM1/I4Lhyw5JiR2k/ipz 0KHoI/KhW6+qkDmw2SErWm53TY6A9uWnGUO9Oo/5CHpmGDyOl0iJoLytNf85oUquxhOM 7tYA== 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=yb4Jpf96KPTV0WLZJycBmyLkTe03i4L3k1NMQRIMDBA=; fh=7VbWX9ml271g0zEbFQlLcMOW8H52gHN96JzKQbq7x4c=; b=01KXUFLQTy5soIFpg1iI7N2ib2YCtzjVGNaR5e+/XMu+JqPSJVoFZWD1OoneeK1GKv YeCNSZaq+jvqZsRZOCelFaDfAQN+3E94zXqnIez/rtrTigXqp+t9XZUCAabaM+hdiQNa LOTPoR6qCgRLz81Gy5KiUud/6TKvDzVYCMOEX9I5QETvbdVEV45umvd/EbaKXKbBCFjP BJBZt6R3aJrga+DoVUE7Qb9n1tqpfQ5gv2mxaIBWg0SZIbUM7wzmRjIfde1dLCuCTrkg QF7efL2WtmZtLSJJE73dfbxg7bNeChIvd11vtSO79ksAbNUWe0OOCZdYgS1MF86bAsRj Mr3g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aYAc4+Ou; 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 q4-20020a17090311c400b001b7e19195b7si12660573plh.29.2023.08.03.01.29.14; Thu, 03 Aug 2023 01:29:26 -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=aYAc4+Ou; 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 S233937AbjHCIG1 (ORCPT + 99 others); Thu, 3 Aug 2023 04:06:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbjHCIGC (ORCPT ); Thu, 3 Aug 2023 04:06:02 -0400 Received: from mgamail.intel.com (unknown [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A939C7EE9; Thu, 3 Aug 2023 00:56:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691049410; x=1722585410; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=yb4Jpf96KPTV0WLZJycBmyLkTe03i4L3k1NMQRIMDBA=; b=aYAc4+OuuFnG5iuzOfSwpguAZe3/vQ5Ih009wcfPrdtysYIylVnHBrm1 i438EM4x8kavkbUZGsnnh5UMio7PVD7Ma80aMsqHPNCMvPiepYpZ5dObT 9phlQST8HX0G07A0HUGdO/aVamgmS2g3tG0ywoX5EcOYz3FbOzVbIUYl7 rq52umtgxaukVb4xdUZxIxTQS9HAYynTR8Ci6fIJ2Xghue+m4QWBG94y1 OSyq9g9fVdf8l2/coD/7kAadX2ThMJZYVw2XCASXke+EERowdTEYd+ME/ ZGUdA1JO3kpGF4PvYivjAca5ebhdVNdsnymmd1aaLZt8tpqphUJ8wPdRH Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10790"; a="367257215" X-IronPort-AV: E=Sophos;i="6.01,251,1684825200"; d="scan'208";a="367257215" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2023 00:55:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10790"; a="843493256" X-IronPort-AV: E=Sophos;i="6.01,251,1684825200"; d="scan'208";a="843493256" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga002.fm.intel.com with ESMTP; 03 Aug 2023 00:55:18 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 3 Aug 2023 00:55:18 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 3 Aug 2023 00:55:18 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Thu, 3 Aug 2023 00:55:18 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Thu, 3 Aug 2023 00:55:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nwfULG3qYKa7aBl2lxXxwTV9XqAQnLxySDTbj4IxYqEWuNBnFsBJ5wt5cLPyVElQfDmppqMPpWnMJUfhDl0nfVDUGQBcql5XqCzVOV3wWmc4mVaWEa9TNae3DzvwqJz/F+SxV9TVSAEhOExYUlTMMEWGW4EOHinjCQPr8YNKjhlM5WuMrRRUL4+NLFdajhFPsReuyO7/4xPiWHp558QW2Vx3I2Xjau7Rar92MpdcyQRhInQVzSHwSEYqJ+o6ERNXc7bMl71omFBYPWh6dHuzCACXjA0m9zQqsVcPksNFxfEaFF88wwxoILN0lnuIbFtG/H34GwHCwE6HE3L6PD5/sw== 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=yb4Jpf96KPTV0WLZJycBmyLkTe03i4L3k1NMQRIMDBA=; b=KLApCgL6GJfbKYuI+N43bMg1G30Hl+yKg3TQOBgDtPxQ3YwqkTu5Hxpk9RP0qKA0Npkga9JyPaifkbGDuVFJwH3qNP36BDCkavngsVdJyIwVQ37FTeds/Kq7AzCfOaQqD/f/dcePE27RPaBkfzRhyZvNpq+bpNrPRjJkhGjElvbZZ0v+nNFrR/SQ/9TB4ZXmwtZqx9J5BO/V3/6maPtLP9/3Nqp5zvSB8cgOnxYcyPjwCTvfMq6tlRnhzt6bllNekAHuuGUf2lNiTR03jD0r+YhPojuMP9xPAgO3oHcryEUv0HrH9wQg8ufsJriqAn8KtiU/GnQ9U6sGx/QeyS9Izw== 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 PH7PR11MB6881.namprd11.prod.outlook.com (2603:10b6:510:200::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.47; Thu, 3 Aug 2023 07:55:16 +0000 Received: from BN9PR11MB5276.namprd11.prod.outlook.com ([fe80::dcf3:7bac:d274:7bed]) by BN9PR11MB5276.namprd11.prod.outlook.com ([fe80::dcf3:7bac:d274:7bed%4]) with mapi id 15.20.6652.020; Thu, 3 Aug 2023 07:55:16 +0000 From: "Tian, Kevin" To: Lu Baolu , Joerg Roedel , "Will Deacon" , Robin Murphy , "Jason Gunthorpe" , Jean-Philippe Brucker , Nicolin Chen CC: "Liu, Yi L" , Jacob Pan , "iommu@lists.linux.dev" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2 04/12] iommu: Replace device fault handler with iommu_queue_iopf() Thread-Topic: [PATCH v2 04/12] iommu: Replace device fault handler with iommu_queue_iopf() Thread-Index: AQHZwE5XIH5F3/Kb/0+mFLbrTyCEJK/YPvtA Date: Thu, 3 Aug 2023 07:55:16 +0000 Message-ID: References: <20230727054837.147050-1-baolu.lu@linux.intel.com> <20230727054837.147050-5-baolu.lu@linux.intel.com> In-Reply-To: <20230727054837.147050-5-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-traffictypediagnostic: BN9PR11MB5276:EE_|PH7PR11MB6881:EE_ x-ms-office365-filtering-correlation-id: e8864183-df69-4eda-1645-08db93f6f98a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cTgYbDBkjK4LIY6JUuC3fdhUxLtxVAXlyuDIhRuLPtsL5oHs04h02XhKIwvJmRtTnR7oSGsutzivMnUrAEeLvC+RBb3e2Hi65djWw1nAkjamhkcOLuttapN7Z0g4Ehb1zgaBhD9sqbVj9ap6kZ2iCPUfNaG64XTgBulILMfOh1PfJrUqGK32mbmIa0wnwQXX/cW8ZBS7wl+erKBC6bJl7kAU7or8Ryz7gjOrBrhxipAmccfL3XuUnd5sA9FBUf6hH4QaFf+2w/rctNppwlsL/pl2hcbkCrOvKhPNvttKmpwvjJ6uZ8sySM6bDox//G7K+GuLuQnQW9SaENH6u2mSfD1+ycopJZ6THWvo67OVXGPsO1iv+blnMIWAirdzLYWwYOuRFb7Nk0fzh3bdHk1XbQf4SFB3YWdhQkNHmmQbZhGLy4NRyJUF4EC/OW4O8hg0UxvbmdyQsWwGYyzVJrYfjhUx9f7L96RNI0+WC5hzOdTtg77lFbg1ZZg+kx0jQmf+z12pgQH97rdmdv6x/wNIArwuYSZlv9w7aTV2QzW9YPcKkz4f4//3vrstCYvBwJXf+J6cd4P7XFUks/WztZoic7JZAuT7gNjQzctxfk+UqqM1DEO4wLntUgcg1IYckJas 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:(13230028)(396003)(136003)(346002)(39860400002)(376002)(366004)(451199021)(38070700005)(86362001)(33656002)(54906003)(478600001)(110136005)(55016003)(38100700002)(82960400001)(122000001)(6506007)(186003)(26005)(8676002)(8936002)(41300700001)(52536014)(9686003)(71200400001)(7696005)(316002)(4744005)(66446008)(66476007)(66556008)(5660300002)(4326008)(7416002)(64756008)(66946007)(2906002)(76116006);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Iki+YgetONZ3kA1+Wji4IiQWpfGf0DuYDZor5HVz/AUE1vnZIGAorHSuoMD4?= =?us-ascii?Q?CnKY91HT8kq/7yFXcyuXjNS/3We/uISJ98BnbBEjNGTDFM6m3b/XCV6WJxtA?= =?us-ascii?Q?CMsMyt+wylNGaUtAULuOTnFa+Zeq93XYPRyCoCE7toOXI0ROho3YCbcT5wAn?= =?us-ascii?Q?wk3plnE2N2ekeG2DBFqggakgDvR1e344FPLQuDLhIa6U5QleqMDJ49t7Emz1?= =?us-ascii?Q?WeN/1vmBd6bs2TjAbDV6Q57h0vZgXNM7Q2XH4aoLBIsdfoYjO1GFyY0Fpsyq?= =?us-ascii?Q?xlhjJJGxCTwIhLTI9qM8s7FG5mA0KYEEVZbZ2xx2mJCZuBnJ7pnqedLG5uuV?= =?us-ascii?Q?IXJe/xG2xrVFxophbisHQ0qKDcE0z300wdhuRiUWRrKjlmZp+Idph6LaMOVD?= =?us-ascii?Q?ubWhfxGEtcmsDdBeHca3UuYEILknNqFqeZKuZyE20BLoxP9zBL9/7ylEMvZC?= =?us-ascii?Q?hRicePHh2kiGBMW4bppSAcnJE35jxtz/Vfy47cv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OyYdt2UztfoBiZ1xc7PQHy67jpbAV3KBWJu/tod8UeuVXEb+1Yy7IjyVL?= =?us-ascii?Q?Ogl+RigZAgE8xbkcucyxun/07bfbBmo0ehNhj1gU7auC60Yt/khpAfmcQB0r?= =?us-ascii?Q?ScE8afJ0DmDsHTlCRDWH22QDrubkkzGz1w1QOl7BhdjFcLkXiLtHLqk/h6yi?= =?us-ascii?Q?/qm1RGRr7lx/GAotqxElKeeZ1GieMbrrjgWddJQB?= 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: e8864183-df69-4eda-1645-08db93f6f98a X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Aug 2023 07:55:16.0829 (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: zyXHj9FnCevhLizMp5ZdpPLOF1SGAgMLwloBBAmLc1svLEOhTmwGsxOuu+qp1eeiEdov/hg3D+hT/pTN1AxgHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6881 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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: Thursday, July 27, 2023 1:48 PM >=20 > The individual iommu drivers report iommu faults by calling > iommu_report_device_fault(), where a pre-registered device fault handler > is called to route the fault to another fault handler installed on the > corresponding iommu domain. >=20 > The pre-registered device fault handler is static and won't be dynamic > as the fault handler is eventually per iommu domain. Replace calling > device fault handler with iommu_queue_iopf(). >=20 > Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian