From patchwork Fri Nov 29 07:44:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: CLEMENT MATHIEU--DRIF X-Patchwork-Id: 13888447 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 21963D6EBE5 for ; Fri, 29 Nov 2024 07:45:12 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGvfh-00080y-Tk; Fri, 29 Nov 2024 02:44:13 -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 1tGvfe-0007zW-Mh for qemu-devel@nongnu.org; Fri, 29 Nov 2024 02:44:11 -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 1tGvfd-0002nD-0n for qemu-devel@nongnu.org; Fri, 29 Nov 2024 02:44:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1732866249; x=1764402249; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=E6spcd+vgURo5mrvsgn1W+za75oPRJn3obf1Yvr5WBA=; b=thavWXlzJuTQ/WMynyMUpuC3sh/sqStWRjDcfdUotjPdkCZ3xzk8Hpko PkWOsHdiW7roW54c43jeNjzn26ySUDwH9PhSo5eUEg/EXW/ca0NY6thz7 yk3f5DjLex47SgGc8ciSlwn2hWOD4jqb4wWL3etdKqV5R5nSJ0GLpE29A i5J5XhNrl8zc+hXVtnhMIKuZiLVV3PFD7mdZ36L7keiq3xkIsBoJ/C6cb SsmYUd6eIZNOEsmcGARcwUuamQ+OVtoW3asax6Lmni+S12WaiJ6Vne6O+ 1R/X6J9E+AUgIy8kr656SRb/ZgpLRzIo4aMr6R6iLWl6Iq2+fSPJ4Jor5 g==; X-IronPort-AV: E=Sophos;i="6.12,194,1728943200"; d="scan'208";a="25670815" X-MGA-submission: MDGfQXAr6yW+NrNSpnBFW0COyFjWbOwHAxxUiII5auO3aaaXIIx9v8gZpde3M3rHc8g5EtbHswtM3kDZJ8/v8qxjW4CDW+hV3lCa7hnmy3AV/a11jirMDLQjaHRYDUnAc7eKxxxdCi2n5gkhmpyMz9pGYZbdYYbK68EpUV30yu163Q== Received: from mail-norwayeastazlp17013077.outbound.protection.outlook.com (HELO OSPPR02CU001.outbound.protection.outlook.com) ([40.93.81.77]) by smarthost2.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2024 08:44:03 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Meji/nqoMiq6j8/s1TA2dtibPXoi8gY2Su6WbFX/uzoWd8TSEwAVKGMk2WhArMJkk1UckO1MUqTgSikR/TlLPbahOdvNCGCeLNdFbI9F7FuN94rCJx6LN8HAlenrzE7XOK0hjHPFZwdVoGGbsAP9FzKOzIFGFzRcJCpx6VcUAzj8FsMsFHYQQ2PsInZOraV43bu4hgCol7Kn8PHa2DLir1VDl0aoIml2geHP4DFA0SSH+7hfo10Tjf8KpO6eTGD4hX2GOWvHYAKLa2uZBFoLkfdjvNnoA1UX8RzE4GSCQeSQHA5Gu6dhCJ+7dDu86sCSJLyy3GytknMWbnlKhTbbXA== 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=E6spcd+vgURo5mrvsgn1W+za75oPRJn3obf1Yvr5WBA=; b=sdWHKJutLyUlJse/Iao6fBGRZpzV0bMuTTWHVa1nNYy3hM08GaN16kdqaQhRcaD1TV9FkaNEWs+ayIdudBsgthH7v8NdD5Z/39HZicato64n8UvA+g0rjNmYEYl4fQq7oN2VZ6TukGWmFAUvhp4Z0AQlH9GcrhoeJyMkYasR7cJGB5miPxFY8afHcqGff7mXcgxCkRhK5B5yv0ZJTPEx3ZusDFDiGLA3hVJ/pCTvnswrQsVNuoqu+P0JPs8wMNIUdwTl6uGHp6kNj5n/xcYurY+08qEdPtJCN19W6hG3JPgdnePfjRxqaGDc50keZ0QiN6nTxXm9JW8MSVhHfoxp8g== 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=E6spcd+vgURo5mrvsgn1W+za75oPRJn3obf1Yvr5WBA=; b=XPYqO/n1M0PD7T12y6NomIw4gtNCZXpFqkD8x1UTZ3MGJmOG356hdBQU8PZDORELB8cZr0K4XEJt+dDk0il7UgOjDFbpHSvH3X+Ht6TotRzXA0J2Dox+GQuT+iizKFUGeAP8/pL8d/Q87xPnwKcuNFvdl8SecOaiZr3uLohm9dA+OwpojW7yseVM/P1/ZpmPqY5thBUiRk9svHCU09q1DtsjLKHxUchzXss1oPfmQXC1rxOI3D/63mnE5KsWigI9NsgWI2SzTmLV0NW5K6t0jkEIDDclVEsbKvbEDeWnIpjRHperfs/DborvRsnrYo0B9f5JNRNjBO7DfQ4aHWn6dA== Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by VI1PR07MB6414.eurprd07.prod.outlook.com (2603:10a6:800:139::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.15; Fri, 29 Nov 2024 07:44:00 +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.8207.014; Fri, 29 Nov 2024 07:44:00 +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 v1 15/19] memory: Add an API for ATS support Thread-Topic: [PATCH v1 15/19] memory: Add an API for ATS support Thread-Index: AQHbQjJ0k0DlGQgy0Eihqb6cUgrbzw== Date: Fri, 29 Nov 2024 07:44:00 +0000 Message-ID: <20241129074332.87535-16-clement.mathieu--drif@eviden.com> References: <20241129074332.87535-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20241129074332.87535-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_|VI1PR07MB6414:EE_ x-ms-office365-filtering-correlation-id: f20bae39-f0af-4179-1a2a-08dd104996d5 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|376014|7416014|1800799024|38070700018; x-microsoft-antispam-message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OBPlmm9aiCYY4GJs3PB42LPp19dJtCn5IF9P7?= =?utf-8?q?BxqGOgQDEHuZjd6koakalZBhwZoANRnqGpAJpnwrPhugO3bH9QBXV9oQvyg+QvDr5?= =?utf-8?q?k+f1lKj6IruxrQbyhkCFnE2ZiGZ9VuM8WUBjH1wxIVXhOp4AcONITNMzUT1KyFyy8?= =?utf-8?q?mtM1shrREuqNg2KuA+kihP60nY1qHuv+nQV/Y8TXKq1o1Gx+4COBwpBX8AUV8eoz9?= =?utf-8?q?ifneFGvAgPXwqXHBRHQUHK2le8GPCzuKc9VYLz2iDz8B9onWKQslTpuVkplaK69I5?= =?utf-8?q?8PrjGB/ymofuPhZ/GBzduOR7knKL4+zx9q/dw7KpNSRONsSLzBIhcFZFCQvMAFjzg?= =?utf-8?q?aFNmpUSYqiUniywPTkR0X33vZLLuL0VA3fvEECKMw3oFMj/j6QXEzRUpMkGF6FO3Y?= =?utf-8?q?iapm1/EPxKqlmU1L+/N1Kg8Gry7BGggio3aDPhRlZFU1urB1OUVBTSNixTz4hfT0m?= =?utf-8?q?shfa4MxlESqyqfoBCe6B3vNXPAndwBAbjw=3D=3D?= 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)(366016)(376014)(7416014)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?MSj//mtfuyGBcT8pnVUguLGJzGzR?= =?utf-8?q?GYHP460Iq1t+p4ARJps0aQ5lombRfbNk5L96mIK9qVkFwQcBvLSYtTyZunBSygceZ?= =?utf-8?q?6tqDj4M4Gn9PZX6UlMYLSup5ggbvzdkxg0EdUcUcIb3GONzCIlKzVCiE4Xda+W+sz?= =?utf-8?q?gEtP7Vk3Prudeobw8kyTP6OblnyvM/eeciGCzNGsJjn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bwwcZDmDlaSgnh5Y5HOHO0Eb8u?= =?utf-8?q?lhC83X9KE55KF92AAZ7lbFKFmz5+QJRtYQymjgjNS4wdnr4OQuNDe2Og3fVBT5amp?= =?utf-8?q?tr+t7c49AIICOic11K6xoLeacgtk1PHlC3ChH/iSGWhEQXF0iptNFA5XT32zk/kMw?= =?utf-8?q?fqVJntPhPRTrppz53DeJE98mR7NDdJ4YPbOhSi2fS1njeL8kP7B724/KIJbzZdeWs?= =?utf-8?q?dJguoJHm3ziW3wGrtG5KGlABvVNjtCIUYkVtEfzho1yMLzKjm11FOOdAF/wPC0VaO?= =?utf-8?q?LkuTleau1Dcm3APa3X8h7Pj02pflwar7yvI+UzbW7CCtDhcZS5KQcPISv5zsus8C9?= =?utf-8?q?pIEqaSeeF8rxeAn5CYmIV8DasEGtJlvTwj1In5lqLlRR2EUNNn4V4s3urQMHBej2R?= =?utf-8?q?0pN3K+21mOLpKw/9EMkz6Tlo5iBIUBIRCnO/8m/VHLj6r4YAvr21mDpi1II5xMhms?= =?utf-8?q?vlfyMcne1MfN++TvmPmxH3JjxecKH4zrr3y1riLUEWqweeIQ8a+yyIA=3D?= Content-ID: <778FE744520ED44CA741A72C8B1A86E6@eurprd07.prod.outlook.com> 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: f20bae39-f0af-4179-1a2a-08dd104996d5 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2024 07:44:00.5066 (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: qkVIpoKT0EY4qhPbT2F/6hlTN4jEToZYdbL8BiJL8/MlzXa/2rf0JksC9Z63bSOPi6psiHOIJ6NxJJaVQW9iVjmhGBDQ8w9lLSaI7rOEDly75GreMRo8wDisqxhW7PlO X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB6414 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: Clément Mathieu--Drif IOMMU have to implement iommu_ats_request_translation to support ATS. Devices can use IOMMU_TLB_ENTRY_TRANSLATION_ERROR to check the tlb entries returned by a translation request. We decided not to use the existing translation operation for 2 reasons. First, ATS is designed to translate ranges and not isolated addresses. Second, we need ATS-specific parameters. Signed-off-by: Clément Mathieu--Drif --- include/exec/memory.h | 26 ++++++++++++++++++++++++++ system/memory.c | 20 ++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index c0d064dbd8..14166e2874 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -148,6 +148,10 @@ struct IOMMUTLBEntry { uint32_t pasid; }; +/* Check if an IOMMU TLB entry indicates a translation error */ +#define IOMMU_TLB_ENTRY_TRANSLATION_ERROR(entry) ((((entry)->perm) & IOMMU_RW) \ + == IOMMU_NONE) + /* * Bitmap for different IOMMUNotifier capabilities. Each notifier can * register with one or multiple IOMMU Notifier capability bit(s). @@ -525,6 +529,20 @@ struct IOMMUMemoryRegionClass { * @iommu: the IOMMUMemoryRegion */ int (*num_indexes)(IOMMUMemoryRegion *iommu); + + /** + * @iommu_ats_request_translation: + * This method must be implemented if the IOMMU has ATS enabled + * + * @see pci_ats_request_translation_pasid + */ + ssize_t (*iommu_ats_request_translation)(IOMMUMemoryRegion *iommu, + bool priv_req, bool exec_req, + hwaddr addr, size_t length, + bool no_write, + IOMMUTLBEntry *result, + size_t result_length, + uint32_t *err_count); }; typedef struct RamDiscardListener RamDiscardListener; @@ -1883,6 +1901,14 @@ void memory_region_iommu_replay(IOMMUMemoryRegion *iommu_mr, IOMMUNotifier *n); void memory_region_unregister_iommu_notifier(MemoryRegion *mr, IOMMUNotifier *n); +ssize_t memory_region_iommu_ats_request_translation(IOMMUMemoryRegion *iommu_mr, + bool priv_req, bool exec_req, + hwaddr addr, size_t length, + bool no_write, + IOMMUTLBEntry *result, + size_t result_length, + uint32_t *err_count); + /** * memory_region_iommu_get_attr: return an IOMMU attr if get_attr() is * defined on the IOMMU. diff --git a/system/memory.c b/system/memory.c index 85f6834cb3..7f6f3798e6 100644 --- a/system/memory.c +++ b/system/memory.c @@ -2011,6 +2011,26 @@ void memory_region_unregister_iommu_notifier(MemoryRegion *mr, memory_region_update_iommu_notify_flags(iommu_mr, NULL); } +ssize_t memory_region_iommu_ats_request_translation(IOMMUMemoryRegion *iommu_mr, + bool priv_req, + bool exec_req, + hwaddr addr, size_t length, + bool no_write, + IOMMUTLBEntry *result, + size_t result_length, + uint32_t *err_count) +{ + IOMMUMemoryRegionClass *imrc = memory_region_get_iommu_class_nocheck(iommu_mr); + + if (!imrc->iommu_ats_request_translation) { + return -ENODEV; + } + + return imrc->iommu_ats_request_translation(iommu_mr, priv_req, exec_req, + addr, length, no_write, result, + result_length, err_count); +} + void memory_region_notify_iommu_one(IOMMUNotifier *notifier, const IOMMUTLBEvent *event) {