From nobody Tue Jan 14 13:39:13 2025 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=1732866375; cv=pass; d=zohomail.com; s=zohoarc; b=PR0uvEhWpChrO7uBJKAMhXrq26ISa8H70gE3Z/u0CbQIX+eWDNWWIBCL0aXHUbktha/eWa0wEyiGRfD9SCAR1Ldr3e6K4EkDx6ItffW56KBo5er3taHHc+Nkgxfma7U1uajefMX+5ZS7A9oC9DUIec+U4l1rJMiJg5+MybDPDfo= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732866375; 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=vYT7O3CmbHBot/TrWbgm+CGz6yYH2nqqj0xRWpdTDT0=; b=NBJD4MCpqtiEt30MTFnBPdL8W2D/uK2URH1MFQnold8kkA+rn7pmNebAl+yM7QsND3L8jLLwilGZoDGGKyrLp3GqDno1LuCAKkiR1lcoaeObB/Pt/eqc3QAA9h8ZhJL+PXBag8gAJM4odhPi/dL3US3FBfRUxMRe/Y6bHdagnX8= 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 1732866375109609.1837164290505; Thu, 28 Nov 2024 23:46:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGvfj-00081m-Gb; Fri, 29 Nov 2024 02:44:15 -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 1tGvfg-00080X-Ac for qemu-devel@nongnu.org; Fri, 29 Nov 2024 02:44:13 -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 1tGvfe-0002nM-Jw for qemu-devel@nongnu.org; Fri, 29 Nov 2024 02:44:12 -0500 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:04 +0100 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:01 +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:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1732866250; x=1764402250; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=vYT7O3CmbHBot/TrWbgm+CGz6yYH2nqqj0xRWpdTDT0=; b=xJbU31GgV03COYoYanORSYPh8xOVZXFvCKse670MbwA1T3auf6ea3uR/ b/DcsDYFQ997B/qMzU0Kee3OpN/s6xzhXTXVxZSlC+w3QlIT+PYIo28zG 22itXrJdMjDOqp9BN7gP0oSOj6z3bBlwu0kCxn2HqoMtBhQwGOKxyO+pq 19Lbzfwt/CjcaomAEV1cvmNXp6Y6olNIFnOxg6QHGATXm++/75Ukdn31Z npaT1LbAkVQwFNHkGaJFGI4gSCyZ3i4CbRm2fLJQM0JgaoS++hFHFL59P fm/9oD5dNVctGB9lQrsKDbKGrDhx92vncOIzgz87t+xDBF5qGHC9CCzn5 g==; X-IronPort-AV: E=Sophos;i="6.12,194,1728943200"; d="scan'208";a="25670816" X-MGA-submission: =?us-ascii?q?MDGDX/2qiBNAz8q3yiCuhFN6bRlJlS7XeZ2irm?= =?us-ascii?q?1R0QKfiyvycmwWdxaQuwSQFjuYxPzVabHSgQ5fOpSnvBVytxTB7RXEfx?= =?us-ascii?q?WFqkmZ8LmIMP1TX5GO1G1O6fYyoSDvl5M1RZoQ+YhKIl9Gag1eH8rQTn?= =?us-ascii?q?eja1oPiUwKsnD1RjerehBTew=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MWOhvSugvkNgGBn9utqFZ4H+bsHoyiBW85jFA/sShUMFIFBFpDn1+R+bmITsFWPKZDpkoXufclPmDjRrcF9chW91g70mRi4oQvHAywTx37JWoKvxwzzGx+wcCN4M6CEN7hZl63KkgQkaH4wTbdOeGZvbdCSKTCgHw/w2X8jfW3YVemDn8PmLtvBZ6twoRakg29fTI6ucLV3purD7WTVvem3txHkudyfdHTr4E9KJUIvXpL8tWrr9WoX3XdYbncfb/ym5l5YBgmdcLU9nyvNK1M/6+z/wTYWZDyMvDlBhJlaoj8Wqfi9M1udIxKlAGQJJ3QP/dxTFT4qf0aPJXHWyOQ== 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=vYT7O3CmbHBot/TrWbgm+CGz6yYH2nqqj0xRWpdTDT0=; b=LKwSBt/9/ZqB1oIpxHc+7OG21eUC+FOBmyJ3+kqL85k7CEZNfSMUiXgank3940vwfWeL4aPGR1IOE1As1hbLgHupLSg2l48WukNcwN51PFgOmIX4hGRfgEWvw+ULm65ZnJWe9ol7qwt9H48izg41Qi0Ph4O1pFDatU2/ICyvVWWmQQ3i6W5YXGNui9Ecz3uRZb9hDtVnV1+3RsQtgxxCv4h0qDx+hF422DsYXwwNze9GQ80e/NTOhe9u3kGt/kSoRxw99KaroSY57Eptc5liNbY3OXj0IWB5/fP2hzeU+oNnXPgvN+9ZLB/stt5uvZ0X/v/IEYfRWkJ2ebCrkXYPLg== 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=vYT7O3CmbHBot/TrWbgm+CGz6yYH2nqqj0xRWpdTDT0=; b=ZN95RiaF9h8jwHjlHQdQvBDWV6lByFg0fS9LCg4XU/NT+zyvPxNeEQs49h0u+LxL5U2Wg3dzBvQ8VoKcSyXDpl8Hxw6dtx3hLG5s6uk0Wmua/kRRwwq+MJm406XSLSshbKxB3zlDfeSTvoMlb1+drpv15qvyaUltW+CISFt/iRNJp3sb6jekglsQNXC00jD3crzBSnmM2UiplU9LF7lfVbfJPHQluy+tE5MalPZeal9J65z4/4dHpwrFiIflNH0xnMoAxlV2E6o+1Q3YtNzAoeghBeVmJsduGHxUUA/e+JOeA3dsDrlIN5VnkXc+S33y5rSh1mBn3JRvYPcc2zz59Q== 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 16/19] pci: Add a pci-level API for ATS Thread-Topic: [PATCH v1 16/19] pci: Add a pci-level API for ATS Thread-Index: AQHbQjJ0APXgNcpLuE6g4EiGuYqvbg== Date: Fri, 29 Nov 2024 07:44:01 +0000 Message-ID: <20241129074332.87535-17-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: 341eb73c-8094-41a2-0617-08dd10499751 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|4022899009|366016|376014|7416014|1800799024|38070700018; x-microsoft-antispam-message-info: =?utf-8?B?akthZW9TcElQNXlqTDljc1gyYTdIRDQySjhWalRXcTB6eE1nVUg3UUpTZzdS?= =?utf-8?B?MjVhZ3RwTG40R09DLzNiakMrZHl4dmltZkZ0TkFxNDllY2JFUHByaFhUZnRo?= =?utf-8?B?MGlFdXFOckN5eVhPRmRIekxyTG5tblBpU1ozdDhqZkhSNWorSmErcUU4Mmx2?= =?utf-8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V:; IPV:NLI; SFV:NSPM; H:AM8PR07MB7602.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(4022899009)(366016)(376014)(7416014)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?SEYwR2xsYjJXUFZmd0MxOERGSVcrcWZOM3dzK3Z2bUVjRXVXM3R0by93aFFY?= =?utf-8?B?UGUyenNqeUd6YkU5OHZIRSsyVktlbC92ZXAwT2cvQlJJckFUT09xQitXUUJ0?= =?utf-8?B?c0I3cjQrd2ZoQnk2clhvcXVsbi9PMEJQc2xycjJYVzg0Nmt1bFpzU0RQOHhN?= =?utf-8?B?VzFhVmVHa2pxL3VLaVp0b3ZHZHdaaFFzOWpxb3hhdEVDY2Z5WndwYkt4eCs2?= =?utf-8?B?YjNPWU5tWGIwWXEvaVEwZWNzR2dUWUxmdzJkUHpwUm9OK2gzc0hwbXBNMGdV?= =?utf-8?B?YXFuMkZYQmdxMGdLeFN4TlF1MnVSNlhHL1p2REhOK1F1bmwwYjBBYzAzekpB?= =?utf-8?B?eTU4Qnh4aW1DUEltNDkxc2NmemhaN2R6M083L2V0Z05BNHZjS0xFeHdJeDVj?= =?utf-8?B?MjFCbGJNbWV2eWJSWXdyVnRUaDVWZFE2NGxud3NYbVQvMzRrU014NDNOTW1h?= =?utf-8?B?MEhnUUxMbFFNdlk1czdaV1o1M0Vjc0VHb1YrekF3b2pEWGNpeHpseUdlRElk?= =?utf-8?B?U1hyTElmL0Vtc0dKSk9pSE15V0NUZUtreGV0eDdaMjM4UEFJUUNiTUNJekxT?= =?utf-8?B?Q0hsRzlsdWkvSXZUV1pNdTAxSEQ2bmlNai9xRFhiU1RIbmFyRDU1cHJqYllW?= =?utf-8?B?NzdwUklVb0gxVWdMb2pKVVlhTzgxdlFhVVo0NUdKbHpEbzdpbDcyTnBDQTg1?= =?utf-8?B?ZHNxSDBKanF0aWlhaGNp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?R2hPaW9DZFp1UEhXdmdXZmtBOXpNSDFCbmtyK05wRVg0TUdzd28vV25kUStl?= =?utf-8?B?UVYzc1BrT3AwZXlvUEdEODM5ZkJQRy92TnRKR2J6YjdnMUk3NzNENy9rV1Bz?= =?utf-8?B?NTNldHhrR1NOUEpDWk9Nemt2QkJIV0FPRnp4OG5nV0JiaWh2OVFxU2FYUHZI?= =?utf-8?B?RCt4QTd3eHdKV28rbW14R3NGZFBCZks3Uy9WTFg1K0RvTWJUeTVrVk5MUW5h?= =?utf-8?B?eCtCNlBxSkZNcnMveCtVU3FFUnVleVZ6c1Jub2VwRC9SbnJIaCtPTzJmNkZZ?= =?utf-8?B?SEh3ZjBPTFVRUTZKUGpsVmVRakkzV1ROVmlMU2htMG5qUTIwVk1UMEFvcGRk?= =?utf-8?B?Ri8raUI2UE90SXlRSi9BeUViUjc1MnloVkVDdk9qMU1vRm5jRlZUdldLQ1pK?= =?utf-8?B?K3kyQlM0QU1uL0o4QjhGK1VtbVdRY05sS2c0bmxsNERhUkxNZzFENk5jQTVT?= =?utf-8?B?QVZtR1JHSXgzcUw1REhVdTgreFo3R2lyc3drYmtZdlk2dmd0alFtcmpQRjM3?= =?utf-8?Q?VCXtjzHjbWEUxrbPPZyrKFw=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: <632A854F651E234F8932097EAEA280BD@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: 341eb73c-8094-41a2-0617-08dd10499751 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2024 07:44:01.3279 (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: /kz1UkzW2ysIpqRbr1DGctv/C39obcgdUasmVqkuewAa2uwtfXuP4iwHBKS4Ztlohv9RdrqIKwWB5VX+ynqjt4oiYmdeYf9JIelhxLxQBv/ir+OWMzC+zjhlmw8eZVsC X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB6414 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.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @eviden.com) X-ZM-MESSAGEID: 1732866376111019100 From: Cl=C3=A9ment Mathieu--Drif Devices implementing ATS can send translation requests using pci_ats_request_translation_pasid. The invalidation events are sent back to the device using the iommu notifier managed with pci_register_iommu_tlb_event_notifier and pci_unregister_iommu_tlb_event_notifier Signed-off-by: Cl=C3=A9ment Mathieu--Drif --- hw/pci/pci.c | 46 +++++++++++++++++++++++++++++++++++++++ include/hw/pci/pci.h | 52 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 435fcb6c78..7245089011 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2844,6 +2844,52 @@ void pci_device_unset_iommu_device(PCIDevice *dev) } } =20 +ssize_t pci_ats_request_translation_pasid(PCIDevice *dev, uint32_t pasid, + bool priv_req, bool exec_req, + hwaddr addr, size_t length, + bool no_write, IOMMUTLBEntry *re= sult, + size_t result_length, + uint32_t *err_count) +{ + IOMMUMemoryRegion *iommu_mr =3D pci_device_iommu_memory_region_pasid(d= ev, + pa= sid); + + assert(result_length); + + if (!iommu_mr || !pcie_ats_enabled(dev)) { + return -EPERM; + } + return memory_region_iommu_ats_request_translation(iommu_mr, priv_req, + exec_req, addr, len= gth, + no_write, result, + result_length, + err_count); +} + +int pci_register_iommu_tlb_event_notifier(PCIDevice *dev, uint32_t pasid, + IOMMUNotifier *n) +{ + IOMMUMemoryRegion *iommu_mr =3D pci_device_iommu_memory_region_pasid(d= ev, + pa= sid); + if (!iommu_mr) { + return -EPERM; + } + return memory_region_register_iommu_notifier(MEMORY_REGION(iommu_mr), = n, + &error_fatal); +} + +int pci_unregister_iommu_tlb_event_notifier(PCIDevice *dev, uint32_t pasid, + IOMMUNotifier *n) +{ + IOMMUMemoryRegion *iommu_mr =3D pci_device_iommu_memory_region_pasid(d= ev, + pa= sid); + if (!iommu_mr) { + return -EPERM; + } + memory_region_unregister_iommu_notifier(MEMORY_REGION(iommu_mr), n); + return 0; +} + void pci_setup_iommu(PCIBus *bus, const PCIIOMMUOps *ops, void *opaque) { /* diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index b21448bc2a..f142e17a2e 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -458,6 +458,58 @@ bool pci_iommu_init_iotlb_notifier(PCIDevice *dev, uin= t32_t pasid, IOMMUNotifier *n, IOMMUNotify fn, void *opaque); =20 +/** + * pci_ats_request_translation_pasid: perform an ATS request + * + * Return the number of translations stored in @result in case of success, + * a negative error code otherwise. + * -ENOMEM is returned when the result buffer is not large enough to store + * all the translations + * + * @dev: the ATS-capable PCI device + * @pasid: the pasid of the address space in which the translation will be= made + * @priv_req: privileged mode bit (PASID TLP) + * @exec_req: execute request bit (PASID TLP) + * @addr: start address of the memory range to be translated + * @length: length of the memory range in bytes + * @no_write: request a read-only access translation (if supported by the = IOMMU) + * @result: buffer in which the TLB entries will be stored + * @result_length: result buffer length + * @err_count: number of untranslated subregions + */ +ssize_t pci_ats_request_translation_pasid(PCIDevice *dev, uint32_t pasid, + bool priv_req, bool exec_req, + hwaddr addr, size_t length, + bool no_write, IOMMUTLBEntry *re= sult, + size_t result_length, + uint32_t *err_count); + +/** + * pci_register_iommu_tlb_event_notifier: register a notifier for changes = to + * IOMMU translation entries in a specific address space. + * + * Returns 0 on success, or a negative errno otherwise. + * + * @dev: the device that wants to get notified + * @pasid: the pasid of the address space to track + * @n: the notifier to register + */ +int pci_register_iommu_tlb_event_notifier(PCIDevice *dev, uint32_t pasid, + IOMMUNotifier *n); + +/** + * pci_unregister_iommu_tlb_event_notifier: unregister a notifier that has= been + * registerd with pci_register_iommu_tlb_event_notifier + * + * Returns 0 on success, or a negative errno otherwise. + * + * @dev: the device that wants to unsubscribe + * @pasid: the pasid of the address space to be untracked + * @n: the notifier to unregister + */ +int pci_unregister_iommu_tlb_event_notifier(PCIDevice *dev, uint32_t pasid, + IOMMUNotifier *n); + /** * pci_setup_iommu: Initialize specific IOMMU handlers for a PCIBus * --=20 2.47.0