From nobody Fri Dec 27 08:29:04 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=1732866345; cv=pass; d=zohomail.com; s=zohoarc; b=BO41wQZpXJ+4Q2QG7JYlcyt0RZo7m9r+clnI66BU8TWwAmmEoKhRHwrxAhQTSO9WmKRPgkr6yUbTdjNsDbeCPtiUu5BhzuceSKGhi4pGqYxG4cwwCTinula2sAArqEniQfH/Qz7hCucjEddB0cNR4nSJxX8Drlj7iqFY25utdNI= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732866345; 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=NaZCpvqgA/bH2itIriVIa+Uv+Dy5+DrbRgkIjSU9Tfk=; b=Ymu1d7d3pHN9UKSXdv3UE/t8k04Zyd/Fy5HihaPHVQg1Fd2qm4uLVaO/+3PDkTOKKO1PJbSL+4YSbQWaxR6w9VvtICstcfPiW+i0imLX3Ff8ePkNZzbKx4oZ3gtjoxFyRJj28eH/8hCWgWIOljcS4PfRcYkQ0eaYZhdhIkj9cIc= 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 1732866345157143.7684307423283; Thu, 28 Nov 2024 23:45:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGvfo-00085S-Vz; Fri, 29 Nov 2024 02:44:21 -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 1tGvfc-0007zG-NZ 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 1tGvfY-0002nD-Br for qemu-devel@nongnu.org; Fri, 29 Nov 2024 02:44:08 -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:00 +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:43:58 +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:43:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1732866244; x=1764402244; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=NaZCpvqgA/bH2itIriVIa+Uv+Dy5+DrbRgkIjSU9Tfk=; b=iRX/iBPoIH3zLYdr6D5dNJtcXash2W/2KhNyPsv0kF4pi+JjH0xn/8mr muUTapVN1rAMcEY7qUJaFz7Ps55KJeMokO2UHf2S7KDjyXHtYht8PoKuv NGUviQOb/ROn7iKbm638KxfTsGVZkL4x5ohQTONhS7SedcsJDtZolNuDC YK5eLtsOxLeVDn91s5M9j42V0lnEFpH44gJ3+qcuri37MT9N26ebcl/Qe Lpi2VdumMpe2J7PlJAEkfbGz8V0ZljfW+v8pzL8T8MTn5qSjQv9TJSvyr c32rq/BIsrOXzIO8gHIivSAJlLFgY58maGu5nJrDY8fzi5QGxOMo0l7Ys A==; X-IronPort-AV: E=Sophos;i="6.12,194,1728943200"; d="scan'208";a="25670810" X-MGA-submission: =?us-ascii?q?MDHhzpIxOaufYw7nCy3yoe3Y/z2Qcku/f4IKrv?= =?us-ascii?q?rXByE50bD13DljUALXbNy01fK77V9YNjRSFz0gUUKG0UiRXWFpw49v7d?= =?us-ascii?q?EA+ULluG5lwwKGN/psNEJp1NBoRS7yDczdm49HkjTmW8VPGLOF+qqMEu?= =?us-ascii?q?RN9fKQGLhCAwOtDYtbjRcDOQ=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HFuHAD7DFS5Con8bsYsUKwNhbHjUSPZqmbW/zg3WbnZOffn0EiY7h0e3IjJA/dLD1x+bSFXhOumRC1V7X93eVU+x3XD1AYT5InBACkCdkU8Pfu8TBjyApwzOq8H+djvgTNz40mCXglpGWAg89b6Jmfh5//B+ULN+NlaxPQwGv91bJJSOYbCYe6znW6ym5NekcynG08CcD9IggNySsxZwfBXcLhasa4gIyzFdVJv41O5KdNi+nAyqYoIN4jFXqU/g1OWmA9kFldB765Lndu5rz7D+fe7iZ5KIhkPtBoFemkLYdfvgz7eqqOTjShfNf7eWXy6sz9Qup+2lx4ZMvT2q3w== 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=NaZCpvqgA/bH2itIriVIa+Uv+Dy5+DrbRgkIjSU9Tfk=; b=n/Nbnj2rW1ewPGN+jxJXR/cEjPn6KnCdhxLcN9Gl1we5JqtlIpUCoTxnUuSoU8sTe+h6EaLmlgmLYnV/nnCNquInqWrg8HmQy7m5pRBF9NIysASxXRoQZKRTLK7RNwRWa2bDeMEMQ0dNY97oeFRg0OYMruLUxbJ5u7ojkNhV7uXAIf/6ir8J3bx4Z1tWdBfqXTc6F1dyI4hE7QTc9GilkLqDI9MdJOZPPNVUMYArhL6MFQRlobOUjC7rPb/7cyYk5UK8qCGfwyf12NEVGfXTubWGb/gwfWiTKsJqXTkjepjz25M86Gkgzj/HUadTPTXSAA2bfG7WR8H/xgoNWbuBeg== 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=NaZCpvqgA/bH2itIriVIa+Uv+Dy5+DrbRgkIjSU9Tfk=; b=atDvQhT3HJsJxocG9SOWw1otbflWngM639j6JNpJMCaTQNVmlDXAMD1KNFrxGJTKsHy0xyu+/x6+/0QhgFvKQqnmAKvqyHdtfc427aHljbhOW4AjiY22LejuL07jgkGaIykVA459KS42GW8qJ7f2sWiUfxy3Jq2O09J1mFPjMrptCELW5ImtdFsj0IFa11rTlvhX8CC5xVuBejwl2ijF1jHuo40fDXtOqgzdagggYrc1F5oBJJ8fS39AYZX0lY0wv94zqoaSU7qz8zKnlx+bO6xc3CPb1r/MZIJ5FR2JfI+CIwUjDWs0EGtojn9q6Rxi3lL4ZhMURwZmuOAvTJNO3Q== 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 12/19] pci: Add a pci-level initialization function for iommu notifiers Thread-Topic: [PATCH v1 12/19] pci: Add a pci-level initialization function for iommu notifiers Thread-Index: AQHbQjJycOMVY49bv0uPDEfnaCo52w== Date: Fri, 29 Nov 2024 07:43:58 +0000 Message-ID: <20241129074332.87535-13-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: 13ae6722-06db-41dd-5d11-08dd1049955c 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-info: =?utf-8?B?R2dmek9yVUt1T3ZtZ0V1WkxxcHM5MEx2OVFLTFlGc3pMVEs0T2p4cDl5VDVI?= =?utf-8?B?bWlrbWtDcTNVczV3MGhpSjJ6WWM5RTFXcTBON08rSzRkbWJGUGtQY3N0ZXJr?= =?utf-8?B?S2VKR3VCQ2phYmtaMktrR3pPZHdscWRhREhtOWh3dk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P: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?B?Y1VRWE13dEZCZzNiNTB3WEFLTUYzYlBBVDBCdDlxZjZCK0RING1FeGpPRmNv?= =?utf-8?B?ZmdJUG1EZGlRTWlvUXlMeGVjeU9ieFFkeUlla3I4N3VJNDdpT0JiS0VBbXRQ?= =?utf-8?B?bWFzazVtakhEZmNDOUVPWnNBQlJtV0dENTBEcVdwUnhoL3FCVzNXeGFWS3pO?= =?utf-8?B?U2svRCs5bVpEcHNZTy92VjV2NlpxQm96NW5UVSs1c1VJSUpEd2N4dHpKTVZZ?= =?utf-8?B?d3RGLzNpTE5TM2hlK09SYVdZcUxHczZSMDRGd3BkUEtrcTg3ckxYNHpTclMr?= =?utf-8?B?SG5MalpBTmVISWcyK04xOFZ1SDlYV253U0ptcE04Nk5XcGRyU01Gc1VCT0tn?= =?utf-8?B?S3JNREFZRmVtZFFGeWdRNUlyWTBFUEFEanpPeGNUUW5YSHB0eTB6T2tINlJW?= =?utf-8?B?emx4WnJHRFk5UXNib01MWTMvVEprZnAyUkVibU1EM2JySy9td3BOUjcwalpp?= =?utf-8?B?dXJobFU3SHlISVEzZXJQTHltbGtoL3A5eThTaW9TRk15VXRVa0FFTVVuK0xU?= =?utf-8?B?UCtZV0cxcCtSQldZeWFDQzhEZUNSb05WbS9FU01rK1l3NTNpclJob2toMXNs?= =?utf-8?B?SVRENUNCVHNyVTBuWXp5cG4rY0NtSXpZZXgzUjUyKzFmdGpFM24wY1pxZldv?= =?utf-8?B?cVVvMGZGRXVhOXRkZUhkTjUzRlFSQ2c5Q2tQUmlWRGtMZU9MSVY3OXk1OEJH?= =?utf-8?B?VVlvT0xQOFEy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-8?B?Wks1dXU5QU9BaXdvODhndTJVaVpyR2gxRHk2R1dwakVNSnp2Wm83cHUrSUZq?= =?utf-8?B?dCtud0RtbjJPUTZPSUVxWEdJeDZIUTZPUTNQVG5xTnhzb1JXeFArc0xkdUpn?= =?utf-8?B?Q2hQMmNuVzdLaTlmSHYxelF2aHVtWGlvNXFWaVhsTmw0b1YyV0lVeW5oeVpO?= =?utf-8?B?dThlWmhlYjdqSEZXcXdEbFVtUlUrcVQyZm5NU3dpdk9BNndEU0lZR29UR1dk?= =?utf-8?B?Q3JjNHRrQk1OUm9SZzVxSXp2WU1kSDhpOTVyM2RnOXQ2c2gwaTdydWtRZUk5?= =?utf-8?B?alRlVmpiLy9wY0dSNWQ3R0xUM1J5MXp4aVJBZFdmT015Zm15Y2xBcFdmNWNZ?= =?utf-8?B?bzRPcUJ6UGtOZXJ4cnBTcXVIRnNyRE5PbGpBUldSUzZGV2xScmZmdTBBMk1l?= =?utf-8?B?bS9Lcm01U0ZBdUxWMzZ2WExCa3ZNNnphUWhwUTBpZU1uU0lReVZ2R04vbjc1?= =?utf-8?B?MDNxNWdXb3FEZzArWEJkeSt5VWlSb1Q5K0xtR0FwVFJnWUJwU2h1clNuRzRm?= =?utf-8?Q?6Szsz5f8LV4WAn7eEsZ/lmc=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: <750E06CB7C5B7F43A4EDD02A20EA90F3@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: 13ae6722-06db-41dd-5d11-08dd1049955c X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2024 07:43:58.0740 (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: c5h0Om059H5steIy5pfb7YaE7h7CetVgN2gfALDheRYylhQFdk2P4iisAQ/bC2u9p0XJzyJh5YdLmDznXkMk5WN8E2EUZcr5Stv82wY+RwtHakH5CYzMJQRDVlyumRPG 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: 1732866345911019100 From: Cl=C3=A9ment Mathieu--Drif We add a convenient way to initialize an device-iotlb notifier. This is meant to be used by ATS-capable devices. pci_device_iommu_memory_region_pasid is introduces in this commit and will be used in several other SVM-related functions exposed in the PCI API. Signed-off-by: Cl=C3=A9ment Mathieu--Drif --- hw/pci/pci.c | 40 ++++++++++++++++++++++++++++++++++++++++ include/hw/pci/pci.h | 15 +++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index bd36c5227b..435fcb6c78 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2773,6 +2773,46 @@ AddressSpace *pci_device_iommu_address_space(PCIDevi= ce *dev) return &address_space_memory; } =20 +static IOMMUMemoryRegion *pci_device_iommu_memory_region_pasid(PCIDevice *= dev, + uint32_t pa= sid) +{ + PCIBus *bus; + PCIBus *iommu_bus; + int devfn; + + /* + * This function is for internal use in the module, + * we can call it with PCI_NO_PASID + */ + if (!dev->is_master || + ((pasid !=3D PCI_NO_PASID) && !pcie_pasid_enabled(dev))) { + return NULL; + } + + pci_device_get_iommu_bus_devfn(dev, &bus, &iommu_bus, &devfn); + if (iommu_bus && iommu_bus->iommu_ops->get_memory_region_pasid) { + return iommu_bus->iommu_ops->get_memory_region_pasid(bus, + iommu_bus->iommu_opaque, devfn, pasid); + } + return NULL; +} + +bool pci_iommu_init_iotlb_notifier(PCIDevice *dev, uint32_t pasid, + IOMMUNotifier *n, IOMMUNotify fn, + void *opaque) +{ + IOMMUMemoryRegion *iommu_mr =3D pci_device_iommu_memory_region_pasid(d= ev, + pa= sid); + if (!iommu_mr) { + return false; + } + iommu_notifier_init(n, fn, IOMMU_NOTIFIER_DEVIOTLB_EVENTS, 0, HWADDR_M= AX, + memory_region_iommu_attrs_to_index(iommu_mr, + MEMTXATTRS_UNSPECIF= IED)); + n->opaque =3D opaque; + return true; +} + bool pci_device_set_iommu_device(PCIDevice *dev, HostIOMMUDevice *hiod, Error **errp) { diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index c34ec5ea81..b21448bc2a 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -443,6 +443,21 @@ bool pci_device_set_iommu_device(PCIDevice *dev, HostI= OMMUDevice *hiod, Error **errp); void pci_device_unset_iommu_device(PCIDevice *dev); =20 +/** + * pci_iommu_init_iotlb_notifier: initialize an IOMMU notifier + * + * This function is used by devices before registering an IOTLB notifier + * + * @dev: the device + * @pasid: the pasid of the address space to watch + * @n: the notifier to initialize + * @fn: the callback to be installed + * @opaque: user pointer that can be used to store a state + */ +bool pci_iommu_init_iotlb_notifier(PCIDevice *dev, uint32_t pasid, + IOMMUNotifier *n, IOMMUNotify fn, + void *opaque); + /** * pci_setup_iommu: Initialize specific IOMMU handlers for a PCIBus * --=20 2.47.0