From nobody Mon Nov 25 08:02:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@eviden.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=eviden.com); dmarc=pass(p=reject dis=none) header.from=eviden.com ARC-Seal: i=2; a=rsa-sha256; t=1717394492; cv=pass; d=zohomail.com; s=zohoarc; b=d3H+3z3bn+m7NDraI1PgLc5Z7O0Qp5YrViPLd/pSnamnK7riPveouowgrGv1wvah+2dnu7aQ+oew3A4mUKMUVQ3X9HxlDh+OQEFt2cWUDt1EAAiKO7d/51Tp7mUxZ5CIK3gG8VNRI0omLbNKcfJjj5FXVyvCANH9t/8HOlMBKTI= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717394492; h=Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uUNdQjejwD19GDvGqzTWmxMIvWgcJeiOCFc/IfPyiss=; b=LgN3yHCgHQmII0z+7jxA7OyeRjq6lB/dMcCnYAlpFvdsE2WJxfjxVq0gnT2ONXIpuIZrjEpGFolWHj0Odb0uBPij+7iFsxeK9DpyvOJEZ4QnWi98XurwIi92vLv7g2aenS0IHufzhek7TIwHadNT4WqCM/aoHMj55riBhf4wtX4= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass header.i=@eviden.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=eviden.com); dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1717394492172588.9172291500181; Sun, 2 Jun 2024 23:01:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sE0jt-0006s6-FU; Mon, 03 Jun 2024 02:00:13 -0400 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 1sE0jl-0006nT-PV for qemu-devel@nongnu.org; Mon, 03 Jun 2024 02:00:05 -0400 Received: from smarthost4.eviden.com ([80.78.11.85]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sE0jh-00071T-NQ for qemu-devel@nongnu.org; Mon, 03 Jun 2024 02:00:05 -0400 Received: from mail-vi1eur02lp2041.outbound.protection.outlook.com (HELO EUR02-VI1-obe.outbound.protection.outlook.com) ([104.47.11.41]) by smarthost4.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2024 07:59:55 +0200 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by AM8PR07MB8192.eurprd07.prod.outlook.com (2603:10a6:20b:323::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.25; Mon, 3 Jun 2024 05:59:53 +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.7633.021; Mon, 3 Jun 2024 05:59:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1717394402; x=1748930402; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=uUNdQjejwD19GDvGqzTWmxMIvWgcJeiOCFc/IfPyiss=; b=OmdIp0zVqbNxZ6IcYNenGGrhRbe/FdgV3oTNLHCqpk+xjy+XwmBSD6Lx Q6pRrQVScBtB2FRbLE1EmY0UWopn0zOKMLsJOVd/1f8FwLXAuHNII9vTM CL9rPSP2j49ksVDym+iVsjLQsIEglptqx1hZJ6Uvap4ER/hzUWfVoA7FZ vGadUlDJ7qbGtCWPEUWbZbYuU5Za2ungGBdaEvLLgKXZUyufwVWodhPvB MMZYL5Z6FL9lXSKevXqCCBCRQcqFhbvVmuZl0hFdEkyfEW6wNZm+9Ay0e ZVsZEfzLPlduD13X7XHiKXJ/1XxWLyr1brNS6H5qOtEJ5t5jVHz4t6wz0 A==; X-IronPort-AV: E=Sophos;i="6.08,210,1712613600"; d="scan'208";a="13815889" X-MGA-submission: =?us-ascii?q?MDGKsKxKnEJsFH9MhGljupOGHWmH15QFEyM+F0?= =?us-ascii?q?Yv51LXdZ/9zUIZNZUxNEAvKk0cIOnynLg0aZd7fIS/8J16a2Zjiz9kHV?= =?us-ascii?q?djZzP4AibrNjUv5BtAVBMxstwqzJPY0mTFuTrpmWnNRho1ncc9GnhM4I?= =?us-ascii?q?N+OdzAndV6OXxoSX1u7QVcNw=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WenOiXZXwxTSFuI+R8QUz2YuFH+2CwuwgnuY4Mrmy1lAR7q+MA3pl2I6H/j6bnNtlcgYji28o1pAUUapBg5LrIMCOF8FG5NFwf38BMSWU6OCm7OzpHu/AL5ZROUPw37I89HR6Cmi+nmy3XYdoHRSr6qhid7GOrk8QZmK5fpoxJzU06p4B+VnZ6y9Id53uA7qz1zpLHWkhLcoB/XkJ2wnsac8rs2RFIqPfNEmGk7haG+RhYH2i1MBawaU9PUuD6J1feikXhrCOCRRPmVr4p7vxUw0y1i4skp64xF8soRD0Uq6s4GPDPt8A1aOO0IgpKfqA+Jo4V32L7XI4ZNzwXYxUA== 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=uUNdQjejwD19GDvGqzTWmxMIvWgcJeiOCFc/IfPyiss=; b=dphmP0iGw+zpgoVjxHQnUZOvcivUi2F1GoPP9iWRSNrDZMkUYbwbKUroogJBdrXHRL7eUdmZjm+jEk9GeZbssnuMAnR9fNv9QuO+hupJqXF7850Q52f6AKhbK1F9b5HLp+Xp8wYLWABcvck0Y0gdUJR7PIc26RUiE+7Tw/eOVzzBRp4w0kUnblOactxcVt2QS0xdzPmIbkBApiK/BMTX7MnQ5LcBgkbxoKLnDwDJVDsX6iTJaKb+iYw/cOnJIe2fwEJnXUnVeumN+LDceFSSNrkKg7iGTctt5DqYs6Tj0DYYXnh56Y/8RjbWrh5OPvQ01GE/in789jRJHX1H0Ly9xQ== 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=uUNdQjejwD19GDvGqzTWmxMIvWgcJeiOCFc/IfPyiss=; b=cgVQ8/VNtfIjJ1ol0kZuq2QZ9Zot24BqEr1eLCuY2ekee60rTBtUlPyHTJhbPFDpqLNJdUdR4mL5MWxyW+pt2IAOeTFWVNFh2NFEROm4HSQQ4qlMHp+UVmOqdi5bFxCO1GIa7RR+nH8g8iev+2vUx2aKvUW9thBQwuyCEL3zSQ51aEud4SYkFkWDMPjXGyiWKrDQ7j24S9T5RQmOTqv6nXZyOPMZbYgWtq4ltu+4+wdJHNoptmvfC98r4T9q/4317pnwYT1P7Unh7Oa0/mjSYgP4qrgChvgXgbiYm7WGlYvE1n+8f8oHYQBizYFU7hsXayVUdWFwtSqIFV1PaDpXKA== 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" , CLEMENT MATHIEU--DRIF Subject: [PATCH ats_vtd v5 19/22] memory: add an API for ATS support Thread-Topic: [PATCH ats_vtd v5 19/22] memory: add an API for ATS support Thread-Index: AQHatXtACltASpuAL0qCo+7Ga8q92Q== Date: Mon, 3 Jun 2024 05:59:53 +0000 Message-ID: <20240603055917.18735-20-clement.mathieu--drif@eviden.com> References: <20240603055917.18735-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240603055917.18735-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_|AM8PR07MB8192:EE_ x-ms-office365-filtering-correlation-id: 29129a78-1818-429f-bd51-08dc83926324 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|376005|1800799015|366007|38070700009; x-microsoft-antispam-message-info: =?utf-8?B?QXo2dU5MbHVVcDUxWWpOMnBxQ0QxdEtBdE11RVhIS2VDd2tqRkxSMUVQWUpw?= =?utf-8?B?L3M2MDdRVWV0dEp2c2RNajdTdE5JNzRDc2JFUTdQN0pmSDRtd3JPOXZ0a2tx?= =?utf-8?B?RFhOR2J6RHU1eFpNd084WjNhM3ZESXhIcUh2Szd2UjBqeUpUOUVUNnZ1YnF4?= =?utf-8?B?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3?= =?utf-8?B?bmszZ0dWaHBMMjlRelZNZE9xSGJ1UzZ4M0ZCalZBR2ZCeTlGbEpEUWdMNHAz?= =?utf-8?B?M0MxVTdwYlQrd0dFNVJ6QklMN0JkZmhLYW1raTlkY3BETzFVcDg0SW5tOUgx?= =?utf-8?B?Q1Njdk5IeTZTa2toMUJ2UXlJL1Rzakt4U0hpSnVjYkZGdnZ3Ryt5NWtlK2ZX?= =?utf-8?B?NnZvSnNhc3hETzcvTzFlZkUxSWlYSVkvOTB0bkVVRmp6UXJZK1M5NmYvbGJB?= =?utf-8?B?V2doUkswSE5laTRCbUdyaC9WY0VLdC9IcTU2a0JlM2FhRzVaSGxBYkpjUFJL?= =?utf-8?B?L3p2Z2tWNEkwakFycU9RcW8yS2VBNGwxSDcvMjVGL3FRcUhFaEY2YkJteGJN?= =?utf-8?B?RkF2M2tOd2ZkMFhJdVBjUmRIWmNEV3RseUgwc3ErOStUVitzNmVQaGNJeUVw?= =?utf-8?B?dDNUcjlJWnpETFhad2V3RzRVS3JmUDJ5aStONkhVaU5WTVRuTWFhZ0RMbzVz?= =?utf-8?B?cGl2eEo1QU9uS25oVE1xdDVqb2lMT1ZjSmxzbGFGbWV1Z1d4ekZ2enFjMnM4?= =?utf-8?B?ek92cVFLT0E4RDNnZmwzTXEvak93UDZSQ04yWm93ak5ySW0wQWM4aUNHdnIz?= =?utf-8?B?S3Rub3lYNHh1aU9GZGlhbmIrQW1aV0hsdGk3c2VDaE1OUm0zZjJvbmJIbDFB?= =?utf-8?B?OFU4T1FYN1o5QTFLS0pyVWwzZkJrcWVpS3BSVHVmbmVxOTRCbk1MYnVHM0pr?= =?utf-8?B?cHYyZ2FFakt0NUlibEtGUT09?= 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:(13230031)(376005)(1800799015)(366007)(38070700009); DIR:OUT; SF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ZpQW9HTFB2UWd6RFR6TVFCS2pZN1J5?= =?utf-8?B?TG12bkNFMkdRQmNsU05EYXcyQ3VjMXVmcEpaUUNDM1FLT1MvYXlpbWdaY1hS?= =?utf-8?B?RzBRTmxER1pGMk5zTlZyUUIyMGVlYmE3MTZSL0cyaG8xa21UYis5enBwVVFJ?= =?utf-8?B?bWY5Mll3Y2k2SE91em9zWFYydmtiNGNzZE4rTjB3SlpJWk1CcHRKblNLMS8y?= =?utf-8?B?dXVaZTVRREI2cE5TbWlaa21FaXhOKy9jQlgzRVgvdGkxclZIUHlTNHJXV040?= =?utf-8?B?WVFRWldFVFRldnQ4aDFKWlFxdzI4dFJ1aFJYUHJLUFR2YkZaOU9oYS92dXRE?= =?utf-8?B?TlNRSFlGVEZvTG15a0c3RTNQQ0wyN1ErdjVNbzFUSGdMTDkzWE9XSk9laXhF?= =?utf-8?B?NmV2ekxSSUkvRGU3WEJUTHFQYlRicURiSU8wMVZqOFA2ZFRaSFpjMEFadDRG?= =?utf-8?Q?PYE5VmDG7pUojKiw9Q5xyQY=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: <63288BA5FA2A9F4DA5AD9E1A135B4E08@eurprd07.prod.outlook.com> Content-Transfer-Encoding: quoted-printable 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: 29129a78-1818-429f-bd51-08dc83926324 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2024 05:59:53.1208 (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: O4fKFbPblmN1FNJ6P1n16ZzKebr1t6vP8P4ScWmWModbTa0VpTHyAqZn5sdMJLw4Yj9UMcS+sU8I5gycDl1bMcYi4PohCXwfxrueedvwIIpybmi+4r5hm1jQ9h7C69zk X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR07MB8192 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=80.78.11.85; envelope-from=clement.mathieu--drif@eviden.com; helo=smarthost4.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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @eviden.com) X-ZM-MESSAGEID: 1717394492916100002 From: Cl=C3=A9ment 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. Signed-off-by: Cl=C3=A9ment 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 56ef48780f..0ced7c33b1 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -148,6 +148,10 @@ struct IOMMUTLBEntry { uint32_t pasid; }; =20 +/* Check if an IOMMU TLB entry indicates a translation error */ +#define IOMMU_TLB_ENTRY_TRANSLATION_ERROR(entry) ((((entry)->perm) & IOMMU= _RW) \ + =3D=3D IOMMU_NONE) + /* * Bitmap for different IOMMUNotifier capabilities. Each notifier can * register with one or multiple IOMMU Notifier capability bit(s). @@ -571,6 +575,20 @@ struct IOMMUMemoryRegionClass { int (*iommu_set_iova_ranges)(IOMMUMemoryRegion *iommu, GList *iova_ranges, Error **errp); + + /** + * @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); }; =20 typedef struct RamDiscardListener RamDiscardListener; @@ -1888,6 +1906,14 @@ void memory_region_iommu_replay(IOMMUMemoryRegion *i= ommu_mr, IOMMUNotifier *n); void memory_region_unregister_iommu_notifier(MemoryRegion *mr, IOMMUNotifier *n); =20 +ssize_t memory_region_iommu_ats_request_translation(IOMMUMemoryRegion *iom= mu_mr, + bool priv_req, bool exec_r= eq, + 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 49f1cb2c38..d9d66ae2e1 100644 --- a/system/memory.c +++ b/system/memory.c @@ -2005,6 +2005,26 @@ void memory_region_unregister_iommu_notifier(MemoryR= egion *mr, memory_region_update_iommu_notify_flags(iommu_mr, NULL); } =20 +ssize_t memory_region_iommu_ats_request_translation(IOMMUMemoryRegion *iom= mu_mr, + bool priv_req, + bool exec_req, + hwaddr addr, size_t le= ngth, + bool no_write, + IOMMUTLBEntry *result, + size_t result_length, + uint32_t *err_count) +{ + IOMMUMemoryRegionClass *imrc =3D 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_re= q, + addr, length, no_write, res= ult, + result_length, err_count); +} + void memory_region_notify_iommu_one(IOMMUNotifier *notifier, IOMMUTLBEvent *event) { --=20 2.45.1