From nobody Mon Nov 25 09:26:50 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=1716297172; cv=pass; d=zohomail.com; s=zohoarc; b=lqs1Mu/xuZHYlEAwzNaI3cor7PM1h5IladGw0CUn3SL27oc+Yhugf5dqWU8qRYOC9crK0D/hjmZqQ8qL3gahtT25rOepDxQkqR2Gl/AJVqhYddmR+va5tkhfuHD0vEH+GHdhGrLuiCu/JXurK8rNhGgbRucfJvJ9BiRXxGn5l6A= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716297172; 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=3fCaFwfQGrgfgVmWEfraFRxRnf0Uq2+4zgU97Hu//68=; b=ipky2Ruc8QPAY3WPepOktu4Z6jNhiUZPR7ldpkOfnaSV/NrHiXLFm7YA+tiT81mRhzxw7fIXA2/80faLtvvsmwH5v9Hxzj3VPLBHFECA/vvxKU0cFq8j5jN0WpsWK3ORQj3JYfS5n0bAeBK5pKzEsQM/UzDxbLFGXx7dE1wGdDQ= 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 1716297172148549.0434847988249; Tue, 21 May 2024 06:12:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9PI6-0008Gr-Sc; Tue, 21 May 2024 09:12:30 -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 1s9PHW-0007ie-5u for qemu-devel@nongnu.org; Tue, 21 May 2024 09:11:55 -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 1s9PHS-0001an-Cy for qemu-devel@nongnu.org; Tue, 21 May 2024 09:11:53 -0400 Received: from mail-dbaeur03lp2169.outbound.protection.outlook.com (HELO EUR03-DBA-obe.outbound.protection.outlook.com) ([104.47.51.169]) by smarthost4.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 15:11:46 +0200 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by DB8PR07MB6249.eurprd07.prod.outlook.com (2603:10a6:10:140::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.27; Tue, 21 May 2024 13:11:44 +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.7587.035; Tue, 21 May 2024 13:11:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1716297110; x=1747833110; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=3fCaFwfQGrgfgVmWEfraFRxRnf0Uq2+4zgU97Hu//68=; b=FxXprDypM58Fv+2fVgDwnfi4Detzeblh/2sa32IlvBVFIkuzSwCZU9Uv r1BSkcNxYHVtBIzJNGXhM5n0626m/oARDx6F/D7TlMYhDEnDsZZ5ugjIE uSVLF6kVYWb+jalO/CnKDmmzrxSf/tBkqnRTkO9VlWV0RBZ64bw/NktvL zVmIEsP3Fx/T4WVm+Df6yBrsPVN9KaqZg2ideNkCwiHMfcQYQPHXGeJn2 C+LHKRlGQFF3W0ZQNz/Y05Tx+U0IE2gsGod71lqCXv4oc86vhnp2s2AZ+ iRn7fNg3ZOlMr2rSsGk5UFFu7ihvMlBkey80SXFsYyrKJK2TSQ17S4MFK g==; X-IronPort-AV: E=Sophos;i="6.08,177,1712613600"; d="scan'208";a="13061506" X-MGA-submission: =?us-ascii?q?MDGtbafTfxr6W+lytm0q9PlnLtGNa92s91gC8m?= =?us-ascii?q?D7cSpxrwq2t8cf/60yNH9sIbbcn0WC4rkjL3B+G8c0r+pJKpzi3u9YJ8?= =?us-ascii?q?f/uDd2YUDgf2ofg285NQ0C8vrJEyv3FD+vCWzfDSCHAGxjhob0xRdhkw?= =?us-ascii?q?EpqsXWY4tYXVW8hr3UllutZA=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UNaGI7trFtK/3iS+7Xo+1SIwAM7h11sz7cXb6D/JeJYqr8RtBh/5KBudMW3XCjPzxOFAK5iEennjAOzf7ODd2Sbmpjuy4aiwPi0AqPUaZCzQfEXkYZIPqDrjiSAm0laNG/2vXeFy2M2dO4m+34cIEccKcbx0juOqNPImc42/XAuOTyjRWk1Xc5/2iPylJAxLPQe+ymdxkKbyP3loXtlPH3zZd0OW/0ltnzCg9sQGMqCEwd5KhA08pMHwCy1+8EjkEye4wZrJKjO2FZsa0r9WCuvVfLo1JSkJrjyYgacdMj/aC7/bhqT4cBUj8f76AOwWCjBJvDJwn44RkbTFLnvpXg== 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=3fCaFwfQGrgfgVmWEfraFRxRnf0Uq2+4zgU97Hu//68=; b=inaqWLOiOYdQW3nGfvKNtJLVqxTXldDXk2D4kLHIPzzzxwDI1hekFgDLUJf1koDAER//Rs35YiW8b1ykEEfzrai8RiJutZEOE90vl3UWWFbabf7u39iDsy/VXHiUVC4mgBjjQQ+8mD2qL5yxtJ8d3UugP0O9j6z8jHfMlWQCKXNABrvnUNPy5AEzLiLB3EGy3ACOazyMHNuj17yofwzB5uATQ4Hhj0j9UArtGllaNL4o9t3ditV8Y7IBoDPFAa5kL9hZd2wHb3VkEkZiPmm3+8cqfcwbvMhBFJ+6LtJynPR1QZxCxNvU2faco47VoC+e+x+1bE7X5hsAAEJZ2hImUQ== 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 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" , CLEMENT MATHIEU--DRIF Subject: [PATCH ats_vtd 10/22] pci: add IOMMU operations to get address spaces and memory regions with PASID Thread-Topic: [PATCH ats_vtd 10/22] pci: add IOMMU operations to get address spaces and memory regions with PASID Thread-Index: AQHaq4BtilJD6RPkfkmwyxJZ52pxwA== Date: Tue, 21 May 2024 13:11:44 +0000 Message-ID: <20240521130946.117849-11-clement.mathieu--drif@eviden.com> References: <20240521130946.117849-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240521130946.117849-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_|DB8PR07MB6249:EE_ x-ms-office365-filtering-correlation-id: a52fbe34-9bcd-479a-ad27-08dc79979033 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|366007|1800799015|376005|38070700009; x-microsoft-antispam-message-info: =?utf-8?B?a3RySXFiRWlNc2Y3Z3pkT29YNHgxN2MzRWxSM0hkVEx1T2hwYlVHNjZsVU5K?= =?utf-8?B?WGZaMlUxdnA1OUdBdVJZcEZUWXI4Y0VSVGFuaE1MSVRPZW05a0RmVWtBbXM5?= =?utf-8?B?bGxLZE9zbFVSN2VyWWNKWG1HcmZ5VGJCY05NRkx3NitLT0NkWVFwTDFSYWdX?= =?utf-8?B?SDBITzJIaG1wZGJ1VndlYXBzZjBkdnJOaHd3TWdIMmd1UU5IU2FsOEdRbFZ4?= =?utf-8?B?a3NLcXd6cVh2WUh3eEQyVGxRanVzRGpwU2p1TXlWS2tYUFFvOWJrZ2tyUG1K?= =?utf-8?B?d2N3N1NBUWEybUFWNVN2SE1pVjRiUkM3anY3SHZDSHRDbWhwQ0pBNTd2Mitk?= =?utf-8?B?Y0JzVndWSkkxQWNFMUJ2MVkvVGI2Y2s5NTZDOVZGY0x0ZllhOStuKzFIWXN0?= =?utf-8?B?NDU5bUVIb2Q5bjFWV0hWdlhrclVzNjJxQjB5LzNLVXJTS0xTVmE1NlJvSWZL?= =?utf-8?B?RkhRM2hVVzR6V1RxeHI5MnpFM1V3QXdvd3VKaDJ4OTZNU3pZZUQrbWF1Szcx?= =?utf-8?B?SUxpcE1KRlNZSXZzUzZlTHhFRmc5bG9HMlp2L1gwTjQwWFY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kc2tra1dhNzg3UmhLdDdTOXRXYXVMcmI4?= =?utf-8?B?S2txd3dvU0FJN3VRMlpFdUpobzJHSEI0SzQycjdIZ3BPNUs4K2VxYlpSSG1O?= =?utf-8?B?WitwSFVITFBkLzVFY0twVzJ3WWtUbGhINHIyVjY1Uk0xUCtLejNDajNMemtQ?= =?utf-8?B?ZzFKTW96Q2Q4NFBHQ2wwMGpvN29md1Q0MWJvbTRwY3lrcXNnai9obTJzcFlk?= =?utf-8?B?VXpUakprRVJEY1VjMmtJN2QvOXgyZ1ZWK3lRanNsYlBQQXJNT2NrK1IrbmRq?= =?utf-8?B?TDdrNGMyOFFuM3dQTjZTSmlsT20ydjlSdFYzdlE5eDM0QVpPdC9OUjNabWhw?= =?utf-8?B?ZkVCUVBaV1ZGWWdoSXgzQT09?= 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)(366007)(1800799015)(376005)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?ZFVzV3UzeVJPZG9MVW1FMjByZmVMNmF2UE9KejhQUjFsMExncjJycDNlMFR0?= =?utf-8?B?cEplN2c2Vm5laU9GbGFKRWtiU3ZBMk9wai9teWVaVmROdzVSMndXY0NJWjBy?= =?utf-8?B?SVg2bklXajBtemFudHczVDVpOVFVTU5acjVZQThVWGNWTHNmUGZVb254cXZW?= =?utf-8?B?azlIZUVoVGFJb0hpZmRGUGk1YVBZWHgxeW9ZWTFMM1ltR3dmblJaUEhMZWtl?= =?utf-8?B?RE1vNjhReHpXaUdQaURPMEZSWkJRak1aWmtuRjlMK3lnOE56aWdiekp1N3VH?= =?utf-8?B?eHR2QlU5VFAvUDBiNGNDdE13Y1RSeFdwbDdmbUJzVHRITGJ0N1RPMkNQRlQr?= =?utf-8?B?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uSE9NcG5aREt3bTAzK1liYU44VWJmbmRx?= =?utf-8?Q?hYdHdsh2DC4sSCkkLhaF8cg=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: <1D8919986CC53C4D9298509CB75EEAF4@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: a52fbe34-9bcd-479a-ad27-08dc79979033 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2024 13:11:44.5708 (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: N+cdNNKT3sf224fwfkKY6m/E6dbSCotR/F/KwvQ1EWeRAm+NrOEF7VjQ2E+MxPaoWqlUumzdKEvJddg2QVcHS/YKMmkZchX+i+ktfvAKdi364Yps4SSOoZu5pYMnsrfk X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR07MB6249 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 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: 1716297172752100003 Signed-off-by: Cl=C3=A9ment Mathieu--Drif --- hw/pci/pci.c | 19 +++++++++++++++++++ include/hw/pci/pci.h | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 51feede3cf..3fe47d4002 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2747,6 +2747,25 @@ AddressSpace *pci_device_iommu_address_space(PCIDevi= ce *dev) return &address_space_memory; } =20 +AddressSpace *pci_device_iommu_address_space_pasid(PCIDevice *dev, + uint32_t pasid) +{ + PCIBus *bus; + PCIBus *iommu_bus; + int devfn; + + if (!dev->is_master || !pcie_pasid_enabled(dev) || pasid =3D=3D PCI_NO= _PASID) { + return NULL; + } + + pci_device_get_iommu_bus_devfn(dev, &bus, &iommu_bus, &devfn); + if (iommu_bus && iommu_bus->iommu_ops->get_address_space_pasid) { + return iommu_bus->iommu_ops->get_address_space_pasid(bus, + iommu_bus->iommu_opaque, devfn, pasid); + } + return NULL; +} + 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 c84cc9b99a..6c60f7a7c5 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -385,6 +385,38 @@ typedef struct PCIIOMMUOps { * @devfn: device and function number */ AddressSpace * (*get_address_space)(PCIBus *bus, void *opaque, int dev= fn); + /** + * @get_address_space_pasid: same as get_address_space but returns an + * address space with the requested PASID + * + * This callback is required for PASID-based operations + * + * @bus: the #PCIBus being accessed. + * + * @opaque: the data passed to pci_setup_iommu(). + * + * @devfn: device and function number + * + * @pasid: the pasid associated with the requested memory region + */ + AddressSpace * (*get_address_space_pasid)(PCIBus *bus, void *opaque, + int devfn, uint32_t pasid); + /** + * @get_memory_region_pasid: get the iommu memory region for a given + * device and pasid + * + * @bus: the #PCIBus being accessed. + * + * @opaque: the data passed to pci_setup_iommu(). + * + * @devfn: device and function number + * + * @pasid: the pasid associated with the requested memory region + */ + IOMMUMemoryRegion * (*get_memory_region_pasid)(PCIBus *bus, + void *opaque, + int devfn, + uint32_t pasid); /** * @set_iommu_device: attach a HostIOMMUDevice to a vIOMMU * @@ -420,6 +452,8 @@ typedef struct PCIIOMMUOps { } PCIIOMMUOps; =20 AddressSpace *pci_device_iommu_address_space(PCIDevice *dev); +AddressSpace *pci_device_iommu_address_space_pasid(PCIDevice *dev, + uint32_t pasid); bool pci_device_set_iommu_device(PCIDevice *dev, HostIOMMUDevice *hiod, Error **errp); void pci_device_unset_iommu_device(PCIDevice *dev); --=20 2.44.0