From patchwork Mon Jan 20 17:41:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CLEMENT MATHIEU--DRIF X-Patchwork-Id: 13945432 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 0D953C02181 for ; Mon, 20 Jan 2025 17:44:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tZvme-0004fZ-Nb; Mon, 20 Jan 2025 12:41:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tZvmX-0004Wt-KA for qemu-devel@nongnu.org; Mon, 20 Jan 2025 12:41:51 -0500 Received: from smarthost2.eviden.com ([80.78.11.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tZvmT-0000Yo-8l for qemu-devel@nongnu.org; Mon, 20 Jan 2025 12:41:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1737394905; x=1768930905; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=1IHq78BYelvBVFqSgj8wg7Wu+RzQhCjG5QqwwNWlpJE=; b=JMilGOXjA9O0FZcGk9I+yFP2c9ssNezxOqRjOkD3hPwc8IS/f6BpnDNK g2DcgGpplpGiPEHEDQbAO9N4+sjwlOFGMbaSCyXtrI/4OLHyBjKX1Oh79 3LwzqymR5oTwAFsKdha8Rqql+0hCQc8r3ToTFF5MZ/EmDIR8GSb1nb7jC K/+mIVAvc5RBQKEC8KDwWe5rb26GRavZVhqxFt7r3kWCKONyVIipR/2Aq gZrZ+f9hkYNVNL0cVck651QygkqHvKpckI2/5fpPe8fvpOSYys9ND0e6d m4mtvDMwbMnCHvr8OVy64pj55ZNRgrxznouxFYPKKuySQnqbb8zoPbxIm w==; X-CSE-ConnectionGUID: pok4FplYQVKzdHomUs3pCg== X-CSE-MsgGUID: U58BKR2YRl+Wxv9EklmCXg== X-IronPort-AV: E=Sophos;i="6.13,219,1732575600"; d="scan'208";a="29125306" X-MGA-submission: MDG2GIIuwTDLWn64efUFBUnYq5O6WeeW7k8zbZnoo5h1BUGzkRxksP5+TU9g5EIpFIQlJMNf+1o/DC0G94xStiMMJMUt4wcK4lhZxD8+BVNtFxB7XXlpv+LESJETnrtcEgsxRxTOKZ5BY8aJVWdAbxcjzoqKqgK4iFxC5Rhehb0s4A== Received: from mail-db8eur05lp2106.outbound.protection.outlook.com (HELO EUR05-DB8-obe.outbound.protection.outlook.com) ([104.47.17.106]) by smarthost2.eviden.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 20 Jan 2025 18:41:42 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nkjhhY+2+07zRne3zWdwa+Gg+5F9GZK49k0jrFk9yakEca/VSP02+rJKaK9Ofgfz0imF/hBta54XziHAayD58FeeQpcXmLLeEkrSt0V27WAjg505czyH6Hz1rIYzdRxv3hCK33QY5xVBPe0E8MrnKTqcfJLp7cPRwdGWzaXy4isHa3goYpYxLMGEoufcL5Fi+3zYuANGrhZTuVAAiPlxUOr0h/JOF6JkynW4N9c0A9sDjI/U9R1WQ+uRrO9veyMARFq6rvlje2/3lSU0GFEfRw9X7ae9lzXLkViAjJW94tnyiQHv2pOqyvIaEq/VOxTm+Zd4k8DVth+DCscQ3cDzWg== 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=wBCPTnyGGbWndBc2Xd/ytVLloQX3gIb+PHViU7P1S0w=; b=gJP6Z/v/SQ4J2dl2fanbRvI3OZBOBpop+K1dutRXzvBsdAVB3MNXTTWUXLtyAx3WdNtekmu89tADkBIzfbarbluL5+IMbx9rRGlgtzx7S0lxpGA74sQyGjEcfZdFKIxHzR3g2liOeDPb1LFEJPsIxNAjbgFDW9uyjqj4E0ztxwNTjFpEpq13trKyDZC6vVb+/Zmuj5lnCZYD53Ez2eGXUXOb2qiUP/ifbSXmhQzp6SjMYoEAMJA3zUZB0lnk6DKWuwbv4hT+O4dHL6lHO61/Moia9Pq8xi/PFCYr8IAENwx3a09Iz1Sd7CIWiUgQvTclgyD/fQRRraK4t6dw2jxM3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=eviden.com; dmarc=pass action=none header.from=eviden.com; dkim=pass header.d=eviden.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Eviden.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wBCPTnyGGbWndBc2Xd/ytVLloQX3gIb+PHViU7P1S0w=; b=TcnDB3KtF/Ciy8Ff5LHQn3tmv930Dr/9bv2ZM6JdCVUYvAdicn4ovDpIM+cAX9IHsfISKa74M3MwGkyOfrbUG58X1kfzsuMhZPH1KY7zOQt/BnF8jiwmIRj36Cc/m40fGJiOM2hyFVIGIW2Urgie1CUyt2cEcPkrCbDs1nDf1imuolsfLsyklctZuYidZ4Xx3eBQFLNZDzeF+XaxaEmIlRsUq0ASSHPvc/DXB0ZtX3wu5eEJLoQtW6lkCx9jsNFDwg+JPE3OxEgsNu7XYQuIJonDQ29uDPhVIJRxT8FSTZYYbDUNGZJi8tjy9zWKNiRu/25swKRwdt2pTdqG6HpiQw== Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by DBBPR07MB7548.eurprd07.prod.outlook.com (2603:10a6:10:1eb::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.21; Mon, 20 Jan 2025 17:41:41 +0000 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com ([fe80::fbd7:ca71:b636:6f9d]) by AM8PR07MB7602.eurprd07.prod.outlook.com ([fe80::fbd7:ca71:b636:6f9d%5]) with mapi id 15.20.8356.020; Mon, 20 Jan 2025 17:41:41 +0000 From: CLEMENT MATHIEU--DRIF To: "qemu-devel@nongnu.org" CC: "jasowang@redhat.com" , "zhenzhong.duan@intel.com" , "kevin.tian@intel.com" , "yi.l.liu@intel.com" , "joao.m.martins@oracle.com" , "peterx@redhat.com" , "mst@redhat.com" , "tjeznach@rivosinc.com" , "minwoo.im@samsung.com" , CLEMENT MATHIEU--DRIF Subject: [PATCH v2 03/19] memory: Allow to store the PASID in IOMMUTLBEntry Thread-Topic: [PATCH v2 03/19] memory: Allow to store the PASID in IOMMUTLBEntry Thread-Index: AQHba2KQqGWs+S0pR0S0AsCg/ViXhQ== Date: Mon, 20 Jan 2025 17:41:41 +0000 Message-ID: <20250120174033.308518-4-clement.mathieu--drif@eviden.com> References: <20250120174033.308518-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20250120174033.308518-1-clement.mathieu--drif@eviden.com> Accept-Language: en-GB, fr-FR, 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=eviden.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM8PR07MB7602:EE_|DBBPR07MB7548:EE_ x-ms-office365-filtering-correlation-id: 859260f2-8915-4b60-5e94-08dd3979b315 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|366016|7416014|376014|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?xtx/5E6NbW+2CnukQbag9JFe89?= =?iso-8859-1?q?17vNBjyV6BZsvVuObZhmVfthIqX0g7mx3Cl1cfYRn6Q25pUcLpLq1F+KHsaa?= =?iso-8859-1?q?lkoTIFG0ImR5p8auYQSJwDHLIlSrX/gWXOnCakYWR3r9mYMXMKREpA7tjKXD?= =?iso-8859-1?q?dq9E9EqnsfeBYbCs3qOFaa6aN0doF+pF4gvahXpRu5ilfjj25Zz13FtZPDBk?= =?iso-8859-1?q?jT81n71Ocqdk/UTJfUtqrIrarjSmd/d0WNgK28gc4PTLEzqWTgur7eBs/av2?= =?iso-8859-1?q?mNLY9juO06wE9jtdidCFFXUpWAsloGJlPmFfjdLmQCyXKNzdy8aM4iDwl/vb?= =?iso-8859-1?q?gzqUagcSW7QVCyCvbgr7Fz4jn670cobjCSUR4yd6TElaUMIFSpgenvR6nW4m?= =?iso-8859-1?q?nkBK+nuQRhtoURyFVoo2wDw7/q1jrZB+hxhfF0PMVU/fbzG59xXJiGPf9HLQ?= =?iso-8859-1?q?9cCuV/HqI5wErKRd3dVCP/Z3eNkfT2T8v1Jpqv7OOZBwcKsJ6E1WjH3EMh6y?= =?iso-8859-1?q?TShL+g6b5IJeoDmCUDHKE086lsQKsdoKPwbildIi+u/S9Az6ZLCvPBCLJrxb?= =?iso-8859-1?q?Bxe1VjTaYxJ3Yd403UWBf7k0qyDUHde9T5gcGGONFIRBe2lPBCFXrgwheCzi?= =?iso-8859-1?q?cdeFMSmKGVOv4/iMR9IJvZx6xQMJH+bCyAzscN2E8/pCDBFmYnMOmiD6Cik5?= =?iso-8859-1?q?IAWKskUG9B4YBfZnCwDgBOFYyYD+5GhGUn8+76/MtjnrROVIpj+Gkbr+OlQp?= =?iso-8859-1?q?PpCiF6YCfn/op54E156udbTqEAtTgdtIigvIVNaDVDDz3FIgEAocaZ7M/HGW?= =?iso-8859-1?q?FfjUErwucfPP/T/zAwYgs7X1zHgau4Iuq3Rlp53tadQN7U4Vik9eXlrcYEY0?= =?iso-8859-1?q?tJH4OODRxFUkEMxe3mVPKlcFNTAQmnG70ai5pgrKQEJRdGgzYBfvUt1zPWM2?= =?iso-8859-1?q?X7IQmUzsTcSYBVHAj7c0xsbAm3KkbFULmw7iovQgehMpaNGEZGbrjwldCAM7?= =?iso-8859-1?q?0cuuLRq8TTUqjHqlbjLOWW8/7idMSzJnRRwCGX37duA9dIV/C3t7S7W48tli?= =?iso-8859-1?q?XnjXwzSkQ0nQR1dzvkLTjLcnlYVsFfQd+4WnfUZKlzgN/etQLxCAxWUwjHAr?= =?iso-8859-1?q?YLAIbnJOr6OyPSXi8ref6sYR3+a+1V1Ja+9Pp9SkpTyCBszQVxAg6niQePzA?= =?iso-8859-1?q?lAsAAQTudFBN0y0knrAKQoFM9flSbe7KvTBwziA+GX2wJYtZSa0nkDqjVDny?= =?iso-8859-1?q?O458ujMCuzuuCJYJ/+NciJ+nJrE0AFQPHu1VoazGPPOkxfbekHbAXOdfLyye?= =?iso-8859-1?q?qvvXzl79W07sfmGDVrh6PxM8zb0PXtOP5Z9NkmpXuwWOpFNbijdKcJrte5bZ?= =?iso-8859-1?q?coHK9pzyQsOhC2GA43b6ggZuvn0BXGMnAox7BX3BF7qtIZBcN7nfX5BeRILQ?= =?iso-8859-1?q?aNNUq2Hb/yIPquMGTMZr5scuamb+fpDQ6opLlFQj2JO32Lxbua/YM/Wnyagw?= =?iso-8859-1?q?ZdPCKy?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM8PR07MB7602.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(7416014)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?81Jbk9arfr6BxLPTrKuyDEv?= =?iso-8859-1?q?4UVcpkABC8XIMUxe5ZgEBZ1zuRpTUM65NMHBrbC1N1K3DYy8bCNtxi4D65dp?= =?iso-8859-1?q?615yf9Z2RxvkoTtfvJFjP5PlQsuOsucKN6f/y8TeKeWD0YSW3D/GlwEZ/yD2?= =?iso-8859-1?q?QFphiYnR1jBRcxVFXtAcrPIa6T0dPcGYHvPeY6rgXUeJdB3gHl3WPRs5+KBU?= =?iso-8859-1?q?rL08o7kpK2VncF/B0jg73VmLmigIytiFNeq8v/hk6J9NHs64R99TDFSndw/g?= =?iso-8859-1?q?fkgqURtymxhMaWOlsl8rOq6O9NzPsPZ+eHLJFe3BLqK6CM46NglxiJ7UbOrX?= =?iso-8859-1?q?8b0KNJrtb81gBBoLB6y9EdXeJOdZSHKqJqZOvC8gcYgLKlnFfhjYn5fNuyNm?= =?iso-8859-1?q?bY77J3H9NGIHqANc9jSdAYg1Ug8CHvwjL3EIgU3ZhQ7szpaS8neTDFvPy3/O?= =?iso-8859-1?q?E6zpaOJjXsN4l797O6TTljDq8ow48fHYz1rELU1RP3O8ueHEqn4hVzpfF7ey?= =?iso-8859-1?q?x3G+VPh+Wqk5D9obHuYxZZ4rYN4AD/2mKbeHABIa7f0D7nwYH+6QaLLmrede?= =?iso-8859-1?q?Qdlt3SJOubb5mb1P2OZkrAnsT2U72r6UPLqq+RjE04AFNPn1hquYh2fEZQQz?= =?iso-8859-1?q?5a/PYw826Ep4Eb3FKHvH90rC4pSpMtOMcHSU1FANop7sZpGkP1AIPOhxd6Qg?= =?iso-8859-1?q?1p5lNcf+cM0fwvfkidDh1OJnVr2i/jPJQxGYyRGsh5xpaax2zS7jGRVLSCPF?= =?iso-8859-1?q?8QwZqTtWcA8NxFSrZjozM+295KyI7lrVUu4Sl7RNH5+y/HvuSv9gF9Q+D2mF?= =?iso-8859-1?q?IO/jNVEu6vqy/eJWGj2CPcO04gXHTBu6PmYf7qk993IFhKW2QxGxSSZJjCVY?= =?iso-8859-1?q?8SrHYxt9d89Q0XVfn1hHfMAWL7BKdAyESyVruZmLMnaLbX4H6HRcvVGeyK8o?= =?iso-8859-1?q?2KYb+by6NaOAJMKQwbTFEmfvFYqh2m3cih/X9ozJ2KBwv0R5dF6cj1mEkyjb?= =?iso-8859-1?q?ZphHRhMNwfKEA0Lo+EiNGLu+c56cT028Bt2JtaIBRhYvLXItZ4T+kMFUwbHr?= =?iso-8859-1?q?g4S/Os/D3x6im4r8q2HGbp/Z34aGZqUn9URBKqZsjARq9QhxIu68GkVqjS8o?= =?iso-8859-1?q?sXrZ2xB4+5d5p0fASy70PLJdX8AmvePIMZhM0Ppw6+CJ6e8NbR308kJ/u5Jv?= =?iso-8859-1?q?75hssXHHh8dJkeX6yz9STzPO2sDJrnA3IjMIkUcn86vr/ECAcxWlPME4SJtA?= =?iso-8859-1?q?vgopQtoOK/HOALvzJG7vWfcV/8MV6RwzE4DPsBdyplaReNah4VC6aSeUYbL4?= =?iso-8859-1?q?a7eYG+dhfCd0OWHEjqHH6+OF+9x0iH5I3cxCPVmOjR7zBZh4DRx3aD6JP/wc?= =?iso-8859-1?q?0l4I0ny5bXYM5SuTWhOIIgzoDN24nUPxrDuQcZ66q56hkWFuqrS9UQ2crkUa?= =?iso-8859-1?q?hx/a1OBI34t/J/dVEqCjud6epWBlE5H/YcaYI5D1LCKjzaebMKcyZmfuEQk+?= =?iso-8859-1?q?WLooeJrBybwK+B4Jwn6d6GPsKsHJGue9WbWxWTGpan+7+FEkoNCfe8hGcUS8?= =?iso-8859-1?q?Sjtz4cu7iDJdE4tcr5xnxkc0Muih3Obu9l9kbyuTInpFO4njY+gghKYNELCW?= =?iso-8859-1?q?MkjeIbAw1XjHkH+Nc05HfbQS0I8oFa2FOT3640YwgiV/o4dERv+R15krtdB0?= =?iso-8859-1?q?=3D?= MIME-Version: 1.0 X-OriginatorOrg: eviden.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM8PR07MB7602.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 859260f2-8915-4b60-5e94-08dd3979b315 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jan 2025 17:41:41.4423 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7d1c7785-2d8a-437d-b842-1ed5d8fbe00a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DjjAvXkCjdljKC6bRZO5Ngl3pIPb/5+YKzWXS341Z3ZwPGh3xyl4460Z4xoD/hA2WrkgqYzjVctIGEu+ED2XG3ynaCzxPWgmbw9OcIVnyCWVWqfKMLibSPuIfOxkSO9/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR07MB7548 Received-SPF: pass client-ip=80.78.11.83; envelope-from=clement.mathieu--drif@eviden.com; helo=smarthost2.eviden.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Clement Mathieu--Drif This will be useful for devices that support ATS and need to store entries in an ATC (device IOTLB). Signed-off-by: Clement Mathieu--Drif --- include/exec/memory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index 56c3a3515e..9889b97abb 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -145,6 +145,7 @@ struct IOMMUTLBEntry { hwaddr translated_addr; hwaddr addr_mask; /* 0xfff = 4k translation */ IOMMUAccessFlags perm; + uint32_t pasid; }; /*