From patchwork Wed Oct 9 16:23:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 13828807 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A40DDCEE332 for ; Wed, 9 Oct 2024 16:44:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1PkoTZUjhuR/nKmtRTOKzRg40EpQKs10xY4n4MrkeFM=; b=iOmly5x+Wql0EM9b9AhDeMja3O Hb1c1WrA50mtv6IctOkO63BdxRat+jQe022Bffd0COCCYJREKQB0rijPtZUPO0X7Xs9XFJrpb20K+ d3M7i+Wu30M7jtF+IplrEhAH1DXrkus5hVJ3YmNfHfInj6eRdeMb3mqL3G6AgduZd6OAJbkHfSMua cTvF0rfcLDNOcOHGIVEdmVjFyv2TJMnI6O+sadDn+2I179EarjH6OA9xXqSDdFNdCE5WF/6jtjyBc frhlevOOj8bjFALbTzb0fO6K5UyQJMtxPTJ3f54/ayvnS+ma+qROWHw0A+bMiXLe3YAAY8TMr01n2 4BtL8Gdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syZnK-0000000A2Zo-296w; Wed, 09 Oct 2024 16:44:14 +0000 Received: from mail-co1nam11on20607.outbound.protection.outlook.com ([2a01:111:f403:2416::607] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syZTW-00000009wV5-1tbj for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2024 16:23:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uHBa4XqNARGQPwIQNy7n3vM1yamQohnFUL9e9n1tzzspm9CBKOtn5d6IBvo1IUeUNCAU2lGalSVGtyaxkxTJyBwuSFlz9KyvU+45ve/WUe95eBYryDfnFCJruFvZlSHrjyC/fgtKq2+HZcoYSDszwXVOlBMzPk8HzuPkGRdh/LPsPk/5d6v+se1a8fhiS5NKGlwXHXGcdFdOlEXjBbc1MYjkmeC729Wv4zbyjjBBAzi2Qqr3f6bbDmBZSoxQnWp0cqfbYQqNgQpb2tKp+ntmCH7DG821WMPIQvGpOFIf+tu1NtpUBFlTTchquLNgtn0DE+sOisYT4M5sJ4rYO1kZng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=1PkoTZUjhuR/nKmtRTOKzRg40EpQKs10xY4n4MrkeFM=; b=Dcu+7QsIFuoIWrjPFjBWUvxebk+4KfVuK9d9NkYeT9gjIVNnHZAkqi1GoLNthrcegtLA3AQXWbZwuXaWWbUMnJLv7nsONJ5HQzKGmSVnMQ/uG1mgv9PwgRT0LKOEpxiPpxkO1G1+9HNWChqbtw8eCKlz7w82DNIiiYHtxz7jWxTiryMykmGK2Xcertl+K2JKoCokf9i849JhC4kNN3bZNbhlpPvwHNjg3FIAhB4UfiV87x/Q/WoogshLgZ0PH5pk1JdirbEWm41odmpYlzZmpxdggrpwPp7SXI9MEbtvZ87aSfV7Pz8V6SPkwDq0XboSL2oUvx7+0Ckwv+P4L2fhrg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1PkoTZUjhuR/nKmtRTOKzRg40EpQKs10xY4n4MrkeFM=; b=h5ht0td6G/QaJzn6gidg/C5OKT0qB/6qb6SbyoM12mLjCsuYD2r0ow/obZ0Pd4XzQdF/Ta6XSZ20HHU6TZ5B2umpXWWSC/36MGZvh/1cxX9nmZXrqZEFgvBXTo7fq+VmakWLUU4ko33lQQmhxXnwFVyoc1vZoqUtesbVY1RaGZIYW/tQlFKrIUlGrdQLz6KLxIgeeoddmGiAn3NdaPt+C76deR05A16MQVjDB+YklD11eT216Q5p6QW6SFEFMsEY96+QN06Jd8LYH/e1dJxt7ThQFYRiUmP5L41GHS6f0fX0sej2DW1xlegGheQ2+b8Sg7mA7OFwUUg/iGp9/z4l4g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from CH3PR12MB8659.namprd12.prod.outlook.com (2603:10b6:610:17c::13) by DS0PR12MB8768.namprd12.prod.outlook.com (2603:10b6:8:14f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Wed, 9 Oct 2024 16:23:30 +0000 Received: from CH3PR12MB8659.namprd12.prod.outlook.com ([fe80::6eb6:7d37:7b4b:1732]) by CH3PR12MB8659.namprd12.prod.outlook.com ([fe80::6eb6:7d37:7b4b:1732%4]) with mapi id 15.20.8048.013; Wed, 9 Oct 2024 16:23:30 +0000 From: Jason Gunthorpe To: acpica-devel@lists.linux.dev, Hanjun Guo , iommu@lists.linux.dev, Joerg Roedel , Kevin Tian , kvm@vger.kernel.org, Len Brown , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Lorenzo Pieralisi , "Rafael J. Wysocki" , Robert Moore , Robin Murphy , Sudeep Holla , Will Deacon Cc: Alex Williamson , Eric Auger , Jean-Philippe Brucker , Moritz Fischer , Michael Shavit , Nicolin Chen , patches@lists.linux.dev, "Rafael J. Wysocki" , Shameerali Kolothum Thodi , Mostafa Saleh Subject: [PATCH v3 2/9] ACPICA: IORT: Update for revision E.f Date: Wed, 9 Oct 2024 13:23:08 -0300 Message-ID: <2-v3-e2e16cd7467f+2a6a1-smmuv3_nesting_jgg@nvidia.com> In-Reply-To: <0-v3-e2e16cd7467f+2a6a1-smmuv3_nesting_jgg@nvidia.com> References: X-ClientProxiedBy: BLAPR05CA0023.namprd05.prod.outlook.com (2603:10b6:208:36e::25) To CH3PR12MB8659.namprd12.prod.outlook.com (2603:10b6:610:17c::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR12MB8659:EE_|DS0PR12MB8768:EE_ X-MS-Office365-Filtering-Correlation-Id: faa7778b-7f1c-4989-2ae7-08dce87eafb4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|1800799024|366016|921020; X-Microsoft-Antispam-Message-Info: 1j6DkjtN/eEXnT1SSOT7wF052uTJpKqrPmccvR6xcdaWnBMT8p8gZXtj+eotyERcTcNGn04LLE8fG4+yWW6wBnN/1wdN1s9pVOca5aqYPtw4BZXlBUcSc79L/xOUr68cByfAF6eDAYRqGQQyAgdUWLy9P3HLguf4RgWECP7LpC4jurYF7MnE5sQkCs59Gx5mCRwPWf9Q2bFS1ZprlvVRf7eZW3kCZbiMmTRVX24epucOr0C1KSFmcHWINiQXkPl34OCGynggU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am-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH3PR12MB8659.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(1800799024)(366016)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: i33xyxz4oD0Gd991rnuY/VPUWYPYKrOhHeYJDbEAPtNBLMlYoQanxuSJ6e86YimtTIfbD4zYnSxiLfJfMt19MnzcSqtBQyM2brE3vOtleFGg+f2+wMzqZWx/psU3rm4PE7jP61aQPgLGRvbX1stJkoLKOCcqa5gjuQcF8nPR/XYtFBWjLxuNc/IUoWNWBD2ZS7DNqcXUX1p4BKi2JByWYvNhfja71gu252hwQ6tWM5bjBnfegGGzL48/GUZ6BCMiZdi25FjJoca4VZnamBV6mgOM75orQ6y6QkEM19jPK6X0DL/okvHqS8thfTrTmPaXGjJR74oLzYo8wUN8RpNugkiMuyMKTww7LQ0E7A85wqyTTRKFKDjOTTl+f1Ex+0I8MheGOSYkyuW1oAu1Io8Xx8qAPCEwMMiQEEHMR8liiM8i57Vf+jSc5h4OZdkL77lMFdQFkC8kF54Yn7AZa3/2cHzq+S7BvNxPfcFKbcyeXP0Y0ZfNN8UZdhx8+cZuTVubmhXzGM3WSUq4k5tVb3812ZtYXz44kKQyvNY7gyXx6gSM1VZa4fXFI1sqzT+fpvl+7rzzq9uxKlBnNI4rzVSvX83olqUhiTKutzxbbRYSFbbJbgRivSqsPmFT3CzshKM6PW4K697Z6xug3QFvEU/Rs2ChCaDvQb8Qx4LB0WyQQT0QOhvqqy0n6r/3iCPs1z7lxvHneKArblifWvfVROeMaFuex87eTYegYTyGGyhc27G2+FelATMJbHRCOEnprMk008G+TGB51pvzLumZtDrN4h0UHmQc+usVUxHvwFbF2FMwcZO0DT7BY+j+/PK818JyKCg5LdgByeYfI+n0Gzi1ZU/9yPY8eAPZ4FiKfxZjVFpb/jxmcOw74b2JjA26XKj4ckzAFJUVoUZouCF+FoVnojmPZGscT3gH0q4JI7VfEg7lIY8OKcCG+bsjmBeqebfIwNULq1L7LkdzEkMFK2bE2G4o0Wy+yBCXOflwk1+03cjH1hZZ8dH9xj5ezMtLCzOBypLAigx0Pmdb44bEGC6qU4XVB4T/xuTRiMpkVdCOuPmhoG/xfyK9ZClypK3YJembFGUwUZ0tw5TdtYALBrr2efwMdVFeunQn02gZ0p2wxYLI3kjgnYT3NeAPYPJ0GIopD6sPGBMkRWrNutPA6iww9dEOnfg7OCEpiSC4vS/mFRuZr3Mmj94xehK6KbyrXN8eE+Uj7S80b1b+xIKggWd22oSW3a+tcaUxnT4U/lNTZkfSNWtvU951AQb/MUx0UlyA5ZYBo5r5S1c4KoF4hLsD6cEQ2iq7W+RfTyUjF6WIq8B6NlnHZXJ1kGg2AN9NIgrMOU3LGf522UllllKSoxPjnItC7Oc0hxFyvGyYXS6SBFmpC5GesF+yDp82P1DXzdXZVc33pUYE8C+JKrygWaWzDMD1J49M91NlG3Y8+eGmtm6HleK3sS1A+5XW/thhIy+oKRgZjljo1wyForQLsr3zuyRQSiUND36bPCSkMhR8WgB5a5O78VtAyCoqQ5l77ykDVR2sGeOWkbv3ne0ZPHBgaHvA3f2Zomolhdbx3Ps4W68= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: faa7778b-7f1c-4989-2ae7-08dce87eafb4 X-MS-Exchange-CrossTenant-AuthSource: CH3PR12MB8659.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2024 16:23:19.2402 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KRvUPVcdCVKtF0yGTznb4GrUn9PnlNZxJdh6IivDQsuWJy3FLS4gJcCeQTpf/IXo X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8768 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_092347_630173_9DD4FDFC X-CRM114-Status: GOOD ( 12.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Nicolin Chen ACPICA commit c4f5c083d24df9ddd71d5782c0988408cf0fc1ab The IORT spec, Issue E.f (April 2024), adds a new CANWBS bit to the Memory Access Flag field in the Memory Access Properties table, mainly for a PCI Root Complex. This CANWBS defines the coherency of memory accesses to be not marked IOWB cacheable/shareable. Its value further implies the coherency impact from a pair of mismatched memory attributes (e.g. in a nested translation case): 0x0: Use of mismatched memory attributes for accesses made by this device may lead to a loss of coherency. 0x1: Coherency of accesses made by this device to locations in Conventional memory are ensured as follows, even if the memory attributes for the accesses presented by the device or provided by the SMMU are different from Inner and Outer Write-back cacheable, Shareable. Link: https://github.com/acpica/acpica/commit/c4f5c083 Acked-by: Rafael J. Wysocki Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe Acked-by: Hanjun Guo --- include/acpi/actbl2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index d3858eebc2553b..2e917a8f8bca82 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -453,7 +453,7 @@ struct acpi_table_ccel { * IORT - IO Remapping Table * * Conforms to "IO Remapping Table System Software on ARM Platforms", - * Document number: ARM DEN 0049E.e, Sep 2022 + * Document number: ARM DEN 0049E.f, Apr 2024 * ******************************************************************************/ @@ -524,6 +524,7 @@ struct acpi_iort_memory_access { #define ACPI_IORT_MF_COHERENCY (1) #define ACPI_IORT_MF_ATTRIBUTES (1<<1) +#define ACPI_IORT_MF_CANWBS (1<<2) /* * IORT node specific subtables