From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B8DDEC8726 for ; Thu, 7 Sep 2023 18:12:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232563AbjIGSMO (ORCPT ); Thu, 7 Sep 2023 14:12:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343620AbjIGSMN (ORCPT ); Thu, 7 Sep 2023 14:12:13 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E3E9E47 for ; Thu, 7 Sep 2023 11:11: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=1694110310; x=1725646310; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=PJGpjL+fdPlp1jqJeBzlrsQ4LBLcZOsSVX7J1+87pSw=; b=LAc2oP7S2NPJ6py2zfS+QKCKe42JXHtWpbCNPTyvGn+iOEb63g2rzXJW rU+EjXnIZDVhdEYa8NFWtUp98TpZjvKrOx8lbScSEfrg7ygqYtX2TW6FR PUP0r/TabWD6KD2d3TXrlu+ZRz6RsU8tBitCXcJZ+rLhfzwg5GL7QRmpY GvyPlUsy+EmUxMtpIHZW/wPoQZeh2QdvFrhh1emg5BHvCsUsUJVyzEp5M /0YbGmq3mverMTIwkJK66eIWhNYtvgp2rYRNRyTxihxSBmFLnitkRRimO 2dyfQ9bc/+ahLs7/8ulqLJRubNZ2gizZmAQBprAc+Sh0VmL73dyrbHHFg w==; X-IronPort-AV: E=McAfee;i="6600,9927,10826"; a="374754971" X-IronPort-AV: E=Sophos;i="6.02,235,1688454000"; d="scan'208";a="374754971" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2023 07:29:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10826"; a="1072909480" X-IronPort-AV: E=Sophos;i="6.02,235,1688454000"; d="scan'208";a="1072909480" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 07 Sep 2023 07:29:18 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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.2507.32; Thu, 7 Sep 2023 07:29:17 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Thu, 7 Sep 2023 07:29:17 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Thu, 7 Sep 2023 07:29:17 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Thu, 7 Sep 2023 07:29:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gAlN2eFSQr58GLOBH3mHQ1Hh+izTWsr8pJ+lDBySNoQ5HI5NVexri32cbutmRXRF7FG03gJgSoP2P8K7QTJ4yZ92wTcyeCVk0lZVf+dubJWIdhgrYLAt/oHdACbZVrmLCKbsgmW2oMVnntbxU2pBtdfQRpJRm/wNA3zCFQOPBqeMmVO2N4PcHyr0WGePl2fpHU1ZAFJLQww/VhcgxG2s9gCeRYBRAGT6AxM+FFhcHmjLp8mjI3FF+YNDAATBzaHrMTQoIyNHgVVy5UNVTUbkYr/NIGfVQ3x6xcLChXKQlEshqKBIQ14mrETrJJrYYEFKIJRQzIF9QcNgmHyrucwOnQ== 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=Mb6+Ixa2L4Ry0RbRYkIGOZ3JYBV2I9uirrp0oAsYpfU=; b=WKS/YyV1m9lzjhPVKIBHGo46ZeMZyWF//pjDSKMCFJS6T9UGEG9bly4ibHE+S5DbTWmKO2FKbkeu4k9E79Mv+j8aSyWJUo9yUgE3fch409MZGXuWxIw7LghBV8MfIr2Fv9nvXaLCCWWPJxAbuGf66b94wFSutwThD4bwo4KtLq7MYbqizDaEkHcIKbIP4BN3W6lhmh336O6n2Iq+i6mh9AIIGGgHRWzeHa1Id0HMjcHXtAgoHC0ql3CoQ9C3CWymbjhTP6gLD/qmf2Gi6LFbJGr7shnIPd5jAZJe7bNYUJ69PMN9uwNZe1uUIAQMgOy3UxCallgqjXz/3LqSdOvKNg== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SA1PR11MB5948.namprd11.prod.outlook.com (2603:10b6:806:23c::18) by SJ0PR11MB5071.namprd11.prod.outlook.com (2603:10b6:a03:2d7::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 14:29:12 +0000 Received: from SA1PR11MB5948.namprd11.prod.outlook.com ([fe80::357f:cb81:fe70:d9d6]) by SA1PR11MB5948.namprd11.prod.outlook.com ([fe80::357f:cb81:fe70:d9d6%4]) with mapi id 15.20.6745.035; Thu, 7 Sep 2023 14:29:12 +0000 Message-ID: <4ea426be-1b36-b163-51d3-420fe6b6573a@intel.com> Date: Thu, 7 Sep 2023 16:29:04 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.15.0 Subject: Re: [PATCH 2/2] PCI: Disable ATS for specific Intel IPU E2000 devices To: Bjorn Helgaas CC: , , Sheena Mohan , Aahil Awatramani , Justin Tai , , , , , , , , Alexander Lobakin , Andy Shevchenko References: <20230906201329.GA237399@bhelgaas> Content-Language: en-US From: Bartosz Pawlowski In-Reply-To: <20230906201329.GA237399@bhelgaas> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0151.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a2::12) To SA1PR11MB5948.namprd11.prod.outlook.com (2603:10b6:806:23c::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR11MB5948:EE_|SJ0PR11MB5071:EE_ X-MS-Office365-Filtering-Correlation-Id: ae83f2b1-144d-43f6-2245-08dbafaece30 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DhtxG7G/Anu/h+E3yHXo6tOQOw5Bm3XDtxdevOXGpvXyJaw7reCSjOj5mx+hIpac8ba7i7P0M6Wrp4rKQdcLe4fKTp2e0FoRGwFLn2F2jBOhUfOyusyrI5EhsCoqKsQYDbs3U1VnsIGgMKaXWx3unxDiAT180/k700vo+wqAc10T5MbWA+ZHbnscmaQa/C6ZlyjcHw0wnRLPtsnweMXxpE3RvKFw3uZboDd7XZ43szqN0H2Y7uYN9U7XGBrZkm4ME3R/023PoaaZqlArPAAS7EHrsxVJ2lfPd6j/lMlMtggLS1Z/hSv5OTefquV2swjmhk3yyNMxCthY3y4xIRb00orENvNQwuk96CogcJD+DacA3ChCXPECRZm2o6CNSU5OHmMtSsjMEMftrs26D3FXFBEukm7paurtVy0gBPYyPk+BAc0lcr9WfqRN/RHE9EtwheeReixCQgRbTDv1+MvoGleCU83oJvH5xGo7IDC+wuCAOgaGo9VZknnVA5Z3vCeWcbs8Uf0lhDjCq0khS7mcsK+mHxnyLGv7UC5tWVk2b/13lbem4x8gyl7UWcKX/OV5+5426fBt+tFRZJGNg+73o+7u/82NFEbuAShoIB+xc5iZpKtTosh85+5WtFotpLE6oszIM2x0A5YnQl1/Ri3nHA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR11MB5948.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(136003)(346002)(376002)(39860400002)(1800799009)(451199024)(186009)(31686004)(6666004)(53546011)(6506007)(6486002)(38100700002)(82960400001)(86362001)(36756003)(31696002)(2616005)(26005)(107886003)(6512007)(83380400001)(478600001)(5660300002)(41300700001)(8676002)(4326008)(8936002)(66476007)(316002)(66556008)(2906002)(54906003)(66946007)(6916009)(44832011)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RFFUNTRSTWdCTVZyYjN2TEFJZ2tZYnNibkY2UUh5dkdsWHVDQUZyc3IvT0pM?= =?utf-8?B?ZDIyZVZPR045T1ZPNX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?= =?utf-8?B?U0xsZUQ2d29VRnZJZXR0V1ZhL0hPcDdGL1ZSWWdUbjQyN2l4a1pHWXhqQmEr?= =?utf-8?B?Y3B3SjhvdEs0cUdDc05ZbHZrMFFCWEZRdnhBS1IrdVBIMmVSSWtRVmw3R3Q1?= =?utf-8?B?TXpwaWFkZlBTOGhZcFpFaXdHWVJZU1UxMG9GV2dURU5pRElCeEx4Slg2SkM3?= =?utf-8?B?U1JNaTNBQjNqdk1PZDFGejJCdDdmdVc2dlJvdDEvM2VyRWRhSjBIam4wVUt6?= =?utf-8?B?SXlPaGd3eHkvYlplclQ5K2k1VDdlNXczRlR2SmFWWXpFaTluRmovdUV1MXND?= =?utf-8?B?OVE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: ae83f2b1-144d-43f6-2245-08dbafaece30 X-MS-Exchange-CrossTenant-AuthSource: SA1PR11MB5948.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 14:29:12.4661 (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: DF++l4vsn9I5ThN3ouefu63iq9tF4sLzNxqSdfbQvd+W2WkaroPMHRbBwhcpDkQxGz+YrrfCUQlqBbR5VlAeRo0YOKV1P5sv4/xvvKMojdM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5071 X-OriginatorOrg: intel.com Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On 06.09.2023 22:13, Bjorn Helgaas wrote: > On Wed, Sep 06, 2023 at 11:00:19PM +0300, Andy Shevchenko wrote: >> On Wed, Sep 06, 2023 at 10:59:20PM +0300, Andy Shevchenko wrote: >>> On Wed, Sep 06, 2023 at 02:06:23PM -0500, Bjorn Helgaas wrote: >>>> On Wed, Aug 16, 2023 at 05:21:15PM +0000, Bartosz Pawlowski wrote: >> ... >> >>>>> +/* >>>>> + * Intel IPU E2000 revisions before C0 implement incorrect endianness >>>>> + * in ATS Invalidate Request message body. Although there is existing software >>>>> + * workaround for this issue, it is not functionally complete (no 5-lvl paging >>>>> + * support) and it requires changes in all IOMMU implementations supporting >>>>> + * ATS. Therefore, disabling ATS seems to be more reasonable. >>>> Can we reference the commit that added the existing software >>>> workaround? >>> See below. >> Oh, I meant the second question here, i.e. >> >>>> It sounds like systems that (a) don't require 5-level paging and (b) >>>> use an IOMMU implementation that include the appropriate changes might >>>> still be able to use ATS? Is there a way for them to do that? >> ^^^ this one. > Sorry, I'm missing your point here. > > The comment mentions an existing partial software workaround. > Presumably that was added by some commit, and it would be helpful to > know which one. > > The comment also suggests that if the software workaround were > completed (or if a system didn't require 5-level paging) and it had > related changes to its IOMMU driver, we could still use ATS even on > hardware with this defect. > > So I'm wondering if there's a way for an IOMMU driver that has the > required changes and can tell that we're not using 5-level paging can > override this quirk that disables ATS. > > Maybe we want to unconditionally disable ATS on these broken devices. > In that case, I think we should just completely drop the comments > about the software workaround and IOMMU driver changes because they > wouldn't be relevant. This software workaround was shared only with E2000 customers and not publicly due to it's complexity and tricky design, so I think we cannot refer to it and I'll drop this comment. Regards, Bartosz