Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp150669rwb; Thu, 22 Sep 2022 15:58:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4HR0NRv1PWbzkPFEYsykUa+UrPbXrZy5uLZLsuUYeyoqKGs8nv/zh6N/Jl8VwZjLB4hbCs X-Received: by 2002:a17:907:724a:b0:782:405f:8115 with SMTP id ds10-20020a170907724a00b00782405f8115mr4682052ejc.147.1663887485788; Thu, 22 Sep 2022 15:58:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663887485; cv=pass; d=google.com; s=arc-20160816; b=tBEGhnc0v/C0IgrZg2XWLmUrquTWqAJzrtqyTCuA/aE86WjxCx05D7PpoSrUCB/uMZ byFFmd21AOM8LvS/qrBWcWOMXXTSjwwJFOmZAsoV76oGgzFK9Ontv1EcMwTZ4rj0LgbT U/btC1hXPOSKE1r88Ut6jCVUoDqHHRmjhE22qnk2WHO3IcyOdYGYbE2+0QT10tfmLgpg zea/Y2MM7RNP7BSUzdL5CVLtQx7F5CmvXw+czb+sUK+947rp4Bim5kdGfDgvXwGpTEor z0rZ01yP5aZgGjrDtipyaIjsrF9Ei74+ze5jciyhKqs486y4qQRokpCrIgtqIGxt0ROb WSsg== 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=ujOyjAbwgusik+05RbPipqW/Tv9rDb9xGVmgu0SLgDQ=; b=WSlT2h1zcUeBF0nHyDGGdrvPw8HCqoMNqjszeMPRr1bKlvdtPwr06/BIHY+zHPkTS5 w+Mx32ikEXGt73CWObOrMTyu1qdHSfqmfQvW7Apg6QZrtD9ZgDOBRnlj/Avnw01QdNZs 668O7XOBaD5rRsIBodi/v5lnKAasMntUZeLbLf1M3XXVF8cMOmdmCkrpkRRz3edFHxCk OQ3xzKPZ3epeeX8tCeVWI9XtoRGHTTI6kx6NC4DILasVK2YlXCXyDX6qi0HyLRPKAebd rxvDp/Ta55cy/yFtE7M7KfTlj8AVZ33KyYfa8HqCqPKB3aEcuVLmykZU6UFs5MsrvYxi mZ2Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dppwaagn; 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 du19-20020a17090772d300b0078281504806si980025ejc.162.2022.09.22.15.57.40; Thu, 22 Sep 2022 15:58:05 -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=dppwaagn; 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 S230265AbiIVWnD (ORCPT + 99 others); Thu, 22 Sep 2022 18:43:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230179AbiIVWnA (ORCPT ); Thu, 22 Sep 2022 18:43:00 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB21E2B630; Thu, 22 Sep 2022 15:42:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663886579; x=1695422579; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ujOyjAbwgusik+05RbPipqW/Tv9rDb9xGVmgu0SLgDQ=; b=dppwaagnTU+sFDeJRCi54ToLftRvzZ0irOu+k7eHkVgmkxoHgRn4w768 Ob6R/LgPJViRVZrxa3xoHgNsdiHUG/k28a4efWvAylNCbydt7mj7DtFy7 WIyse+tGkges1Ge1RK8ff6Fq3U5rkJldQB1B/PVsIixm6sNdpwjr7D5UQ 7SLWvHjvF4lN+KSIwaNCKuV6b2VvFX2U8RdseOA9xQOOincqqqphQK+Mb 3Vc5xDO6l9CiYhUwozKS1U7SyleOb42mc4deu99Gjn0DUQUg/ms5+dAA5 6aH6WlQ/14vVs8VgZKgcNcXy9SuOrKM/YMva6al+FAjAjr3LZ5EoO0Y86 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="298051344" X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="298051344" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 15:42:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="948798613" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga005.fm.intel.com with ESMTP; 22 Sep 2022 15:42:58 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 15:42:50 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 15:42:50 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Thu, 22 Sep 2022 15:42:50 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.106) 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.2375.31; Thu, 22 Sep 2022 15:42:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kBtZ+rQajHwSMYdUkZsi0dbp+SP0swpXUIW5PGLC3yU95gxK5yQIagwDIo4FoMQT4TC8meEhv6oBstdnsmmBrSsVpjvtzUIwurefQ2cYAlTbCvzcsuDigPabkULumTeWYj4ZSe4u/eV7+DLUgvDq51kD27ReYi3mpAKzWi3zHzt+mD2NksbdwYcTv0Duepe6rFKdhT5DipvVottf2YY+uRm/SYr//dlTTeZheKKBbPmkKGYdH5Px6JvNXw3JkItOY1y6S5q6ptiqF3JerNmF6XEj9mGRcaOR7kzkEqYja1ZI1YTYFwpQhD3mt6Nr8bS7wlwCpQNV0fPbp5gs9hblpw== 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=ujOyjAbwgusik+05RbPipqW/Tv9rDb9xGVmgu0SLgDQ=; b=BZYS6OapWDYrdh40SuhaYXlg8XpJn0JDGo3C+BX1mxs3C5fXJCFrmTA8J+qKJb65qddCReUKcDwvFWBkT90aBMV5NpYoHQQgNz3MfRO3DTb4f+MIgQYgFmNqSp/DwP6oYd6GBsvEwjYzpTaqnHKs2tWVIzTo0Of+XdXjLE3SXmfBt4z6d3kjncnVSRkHQz0B3z2RH21x7bC5jPukVl1pmCbJi4CgC1FLz0Y6YGDLDzmmRUUzQVx7EUUjeX6tIckdvEYy9fkTyBKOX6LuNSX3PTdJ35MqxadeRvgiHHo3BQ5JrR1QXvedOQplfSQ5xVC7eWTF1Y7f3GEF7r5TtERrpA== 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 SJ0PR11MB4941.namprd11.prod.outlook.com (2603:10b6:a03:2d2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.18; Thu, 22 Sep 2022 22:42:46 +0000 Received: from BN9PR11MB5276.namprd11.prod.outlook.com ([fe80::a435:3eff:aa83:73d7]) by BN9PR11MB5276.namprd11.prod.outlook.com ([fe80::a435:3eff:aa83:73d7%6]) with mapi id 15.20.5654.019; Thu, 22 Sep 2022 22:42:46 +0000 From: "Tian, Kevin" To: Jason Gunthorpe CC: Thomas Gleixner , "Chatre, Reinette" , "Jiang, Dave" , "Logan Gunthorpe" , LKML , "Bjorn Helgaas" , Marc Zygnier , Alex Williamson , "Dey, Megha" , "Raj, Ashok" , "linux-pci@vger.kernel.org" , Greg Kroah-Hartman , Jon Mason , Allen Hubbe , "linux-ntb@googlegroups.com" , "linux-s390@vger.kernel.org" , Heiko Carstens , Christian Borntraeger , "x86@kernel.org" , "Rodel, Jorg" , "iommu@lists.linux-foundation.org" Subject: RE: [patch 21/32] NTB/msi: Convert to msi_on_each_desc() Thread-Topic: [patch 21/32] NTB/msi: Convert to msi_on_each_desc() Thread-Index: AQHX4y1VNaiO68omHEet2J9DWrVARKwa1YEAgAAp0QCAABreAIAAIi2AgAE8MoCAAAd1gIAACyoAgAAPcQCAADDDAIAAp1uAgABn9QCAACTxgIAAAdGAgAAbd4CAAA94gIAABpSAgAt9SoCAADlJAIAAgb+AgABGMACAAAc8gIAAE+oAgAAmHACAAFJ4oIAAem8AgABqWwCAANPscIAAWxoAgADV7aCAAT/pAIGycJswgAhPdQCAASQawIAAV3mAgAERgACAAHc2gIAAq/pA Date: Thu, 22 Sep 2022 22:42:46 +0000 Message-ID: References: <87fsr0xp31.ffs@tglx> <875yrvwavf.ffs@tglx> <87fsqxv8zf.ffs@tglx> In-Reply-To: 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_|SJ0PR11MB4941:EE_ x-ms-office365-filtering-correlation-id: 8e1a1122-f4b8-44c9-1eb7-08da9cebc4e1 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: 3FNZGZhXe8+tKH/+TS9nfnrRP3KJ95goGi+UKo9K3TYu1lHmMU9stnGZnbQVLpdW91Im56uMkeHSjNzovTgLYmH73KNhFqGWV/nCrxadMHkb00xpEDFn2PnFmpfjRJWgkgtzn6f2M6poChsXuD2smm3nPTc1Xdd2Ll2KUO2A2meBw+tv0xNHMZdCKWN7k5ZfJSbg29rHEWRN8KEKD0J1UAPBBzCennptvWuM4WN/RmGxFop1R76OVStNJ6EgZJ7gu7sPxH5R1ZW2VcuOvKnJNtShgbtbGtOyRF6MQtX/OqZp6qNTfMxdQtoBwJsk0zDcZVTWXG4RY0SRuUq927wVIsx4+ppad1WHPnO/DWQ253l9f+ZcNrayOXrxkNlYl7oeaVBwZqtO/w6PjEF4N3ia46S55eptQ3T6GsJXM9HXW/C6Jj8YmdaOP7SaO1aTCrML1HF5Qz/nJqQ1bzo2Gwa2pfhNE3a8zO2GJ+Oroq8vEZiz3yzF98IFGwY/cs6MZZn/Zx7lZcR74ez3MDpnmhTlkV6L5TBpm8dRnjdcgcCRXmc0sHxu+S5qw+vSyCC9VkcIT0xGFBlouhsreXKixS0aWEcuZ/jBGcUxOYzlwXOV1r1G11B4ZftGvEnch9P+r7GZ1HHiyHx6Owb/3AnR+fzVf1QXODyFCR/u3nM7lQ3+0FmvpbOcfJl5X0G1i6oaVU0f9dHDonUH19OB+34l1cE0ot+nPHWeWimROGThvp8sVt7CCANPS/CXm5/jFQKssw3O 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:(13230022)(366004)(346002)(376002)(396003)(136003)(39860400002)(451199015)(33656002)(82960400001)(71200400001)(83380400001)(66899012)(478600001)(7696005)(6506007)(38070700005)(41300700001)(186003)(86362001)(4326008)(66946007)(26005)(55016003)(54906003)(6916009)(5660300002)(76116006)(8936002)(4744005)(38100700002)(7416002)(66556008)(2906002)(316002)(8676002)(66446008)(9686003)(64756008)(66476007)(122000001)(52536014);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?rCOztX62mBk9EbTUucYFwYkIeoFATrOJ0dNh9lDB2e4R/CIYAmDBN+bjJijh?= =?us-ascii?Q?TAd3tN6kIv7PuIvqhtgZ58+GZ4dHe/ifMOY3S+qD38aWREbJgUUYoICJpjt4?= =?us-ascii?Q?XtwpMelQWQxv7JiygzjzqHIPfHJOof/Qya8b527Fdb0s5X/1GwEWu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uees+lqJ2ccMpVUSjK9xMAJ8HkS4E4BgKKdplNgBiOtQmbVY?= =?us-ascii?Q?3qR2IHLRLmuNAY1de/cL7ei4mXD1+U6TXAJDZ64rS97HKbdcAiI75+TGU+Ng?= =?us-ascii?Q?wvfLL/Sf/qXkjWjvv2v5udaOoxGSp1AUAYJZDWWx7NXrRQUVbklw6mRMaTRL?= =?us-ascii?Q?buqA8tIS5Tj1VoeoR0X1IADyqjBMi/SAfksIQUuHt+M6ysm6L3zRSMwfBSv0?= =?us-ascii?Q?lt8l7L+J1Zmb0EaxxwUhiFsnbJest59BIZGG7SxtHCxf9M7s0f/izzr4n+UG?= =?us-ascii?Q?LIvJn+b3Xv1f8dsAFQGCJnZveAV8EBbPKvoZXqmbyMgIV/aHm4kAH5ujfojK?= =?us-ascii?Q?SpmwT0jSWbx0EpZtxlrcoAZvmLguIjg1nzG48LBMTGeimilpHOY+Uz8srWEa?= =?us-ascii?Q?YWyB03AqwPFkLddvPW2r8u1I5MJnTCDgdlIVUEKS0Clc/7Eozf+OfH5/PSti?= =?us-ascii?Q?Jd2nMAml7y20DUNJfWKC+4dPqaMbjFAuUeS48OLUK48DshiUGF/WLLDh+IQI?= =?us-ascii?Q?OVS3NVxbSGe4wo/F/50lHQwdu7uwq6JE7eUOccNz?= 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: 8e1a1122-f4b8-44c9-1eb7-08da9cebc4e1 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2022 22:42:46.0369 (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: 6lH6d9dJwSORAIhUv54Q2slC2PG2e9JFGTG0G81Pi5FWzAwsfuaUV/fFnV/mgT3zvq3JYatHEwVo6UdcptlSpQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4941 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE 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: Jason Gunthorpe > Sent: Thursday, September 22, 2022 8:14 PM >=20 > On Thu, Sep 22, 2022 at 05:11:00AM +0000, Tian, Kevin wrote: >=20 > > > Thinking of the interrupt routing as a host resource is the problem - > > > it is a device resource and just like PASID the ideal design would > > > have each RID have its own stable numberspace scoped within it. The > > > entire RID and all its stable numberspace would be copied over. > > > > > > > Unfortunately it is not the case at least on Intel VT-d. The interrupt > > remapping table is per VT-d instead of per RID. >=20 > Doesn't that just turn it into a SW problem how it manages it? >=20 When IRTEs are shared cross RID's I'm not sure how to make the allocation stable between the src and the dest. They are allocated dynamically and hierarchically in request_irq(). I'm not sure what SW mechanism can cleanly ensure a stable allocation scheme between two machines. Can you elaborate?