From nobody Mon Nov 25 07:44:22 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=1717394630; cv=pass; d=zohomail.com; s=zohoarc; b=i+9t617kbcE81lf0xSGCBDKyUi6tboOaXldrH4n5IFOYnCHDqukQxXCFCmxnDvYBFKlVTt4sl5cUUniarbV4Ej4wy9609dSbT37NtvVJARLc/p7p6/YRr+T6MYS4tnsulnlUm6OPYTcJ5TLHpI97qFrXuA1gIuP1qln+8pVXSxU= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717394630; 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=acc0XnlBTdWdElPteZmm/CA3s/ptFk3pV/0xf9UxvH8=; b=dlqa2XFIz7Ometw/dv3YCe4M5Mr6kSHn+8zm2BniM1kRcQUMglZDd/4BOt/YLDnshWoCog2zqK5v8QG75qRGkJftQetp2mKeEAxtQuwCTPxc2aJQKVuyWd+T6DDf6iLjauUEOtkHDI1NGTPFX4TqoNBQL1YN9fMAQlgJ4F14l9U= 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 1717394630309265.9052318341062; Sun, 2 Jun 2024 23:03:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sE0jd-0006gA-SK; Mon, 03 Jun 2024 01:59:57 -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 1sE0jb-0006f7-Qu for qemu-devel@nongnu.org; Mon, 03 Jun 2024 01:59:55 -0400 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 1sE0jZ-00072M-RV for qemu-devel@nongnu.org; Mon, 03 Jun 2024 01:59:55 -0400 Received: from mail-he1eur01lp2051.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) ([104.47.0.51]) by smarthost2.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2024 07:59:51 +0200 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by VI1PR07MB6238.eurprd07.prod.outlook.com (2603:10a6:800:136::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.21; Mon, 3 Jun 2024 05:59:47 +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:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1717394394; x=1748930394; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=acc0XnlBTdWdElPteZmm/CA3s/ptFk3pV/0xf9UxvH8=; b=uKMPl2HqthknXeq+41F/P47bM9xcsfjrUTJOe8H5GdZZyzSaV1gR6obH H6AgP1k145Ac9v18HSFTh0UtrRHPFFKWvWlwb8QId6e72KJu4Lo2qTIER Wo7bUCWOjlEvVrpfCAztm4erId+9Ixy0GmxcRiDU3QIC1WU/drTwtD5Mz g3wgkjF6dOOMjsFafgwJvCLjVSMKLPXqu3yrJx3rceTovOkgj3UERtUTT lpBGfAogx6rh/wN0u3ZfenAK1eYz9uVhtaoPdMdRJu2xsr/OThjzdfOyd j/QZc715R/TrZKc8AJ5F2iQNtgz1SDC/kVwuHeNvPK9LN1P3mQVZFQ9Lp g==; X-IronPort-AV: E=Sophos;i="6.08,210,1712613600"; d="scan'208";a="13763240" X-MGA-submission: =?us-ascii?q?MDEyFvRha8IsJXlP/gqwAblC3FzKbidQSdwk4F?= =?us-ascii?q?uY/W+YTr+9/S5wsLs3Pod4G78HrdyvwOaDLAHPrHq6bqM6W8yM0WmzQx?= =?us-ascii?q?ZflNEaL8my9Z21PcOtEO2nI++nCHQ8HK8Kx39qyevVBVMUptqBjJuTJ7?= =?us-ascii?q?gDT6xeQAfkR1g7G1WUkFO+JA=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OkQcw5RavQjBkbVsa9pUSQoKwU4NJkUFs9jlh9857EgE0Z/3l4zC0EMYFkmFvCKwvWilSP3eoYpIGxSn+lJxg1cfhNAe+SW8YMiSE6NZ2lMF3kC4FlxUig4yKtzlKO8UkfNS0Wjl29WMQpK99JnLCBsUfN9g2yYo+eb5rF+VTMnSHq+scQGvoejtMQvmhqxEfENzn6+8++v4eCOTosI726L+M0mhdyh0LiGmarf8TDP6yokH0c7b02ofBNBkcbsldCZn6egdy9nqOwDmj2IJNfXeREvINUDE9Pqov8Vf9mNCJ1/LyC+lb3qqrAjcKWrof+Dxl98wn0vxWb5es6ow9w== 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=acc0XnlBTdWdElPteZmm/CA3s/ptFk3pV/0xf9UxvH8=; b=hraPycEsjMYjNMcn5APBafZv8x7gjyEsXUJ76NBqVK9e/Bju3HnBwfkUQkax5bnLPMIN9GZsc00m37yGomJaSZYo5mcVylZ49u18yCKyiGeZgdOrm/xQyV3c8yptYqgkr27hgrnaAWdH8Ae2CPLhnU5BmCjJqN+q9GVK5s/+w+CH6ZnGrnuac4Mx2SlbCJL2w2R3PQH0JXc36oLKtbKOPeear40x/sWfbKqEpqidPUG7fwjNYbFsSaFInU2KiEUnFkABP8aXICLiNXzmaUW6+a6z1nVB5XsWZattQ+MR9WQ0fqtGKGvMat8qIXBmNSqfEjPESwHi7RrjIZD6wXQI7g== 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=acc0XnlBTdWdElPteZmm/CA3s/ptFk3pV/0xf9UxvH8=; b=pH0ijjeEtBmx0o8UJavljH+9OaRocCk1rX21rAN+ERWliuNkXLsILrKt4uYfio2vC6+eYWyd1zmFZfwqyumrjYG9RRfcoHUTs5Md1o7iEjLR1GhThU41xtss8uHVkTloj1ysMFgQmxNa9CPgp9EBuT3hgYtG690P/Iq7o0LLSYxbzvw2dhMF777brLcaddiMilkwDYae/EHvLli+U2w8f+yEIK4H0haWYeiW6OQLhHbsrftLIUEIrsthxhokQkIrhiWJUBbNC+gufDrB2SvfTcBXPJYPeAl3z/MiLzuTc9N8Jai8m/phhmbXnizsIAUU/3ePOtDy5k2po35f7J5+BQ== 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 10/22] pci: add IOMMU operations to get address spaces and memory regions with PASID Thread-Topic: [PATCH ats_vtd v5 10/22] pci: add IOMMU operations to get address spaces and memory regions with PASID Thread-Index: AQHatXs9KwLmXjyVvEupV37REpL8HA== Date: Mon, 3 Jun 2024 05:59:47 +0000 Message-ID: <20240603055917.18735-11-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_|VI1PR07MB6238:EE_ x-ms-office365-filtering-correlation-id: d5d58363-0ddd-4808-2a04-08dc83925f9d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|376005|366007|1800799015|38070700009; x-microsoft-antispam-message-info: =?utf-8?B?QlAvb2plUjRnZjNUNnVMMEtITU1tOEYxdHhPUEpZbkVjdExVMXJXODhLUGU1?= =?utf-8?B?QUM0RkI1ZFBIMEU4cmVZTWhPbktrOXRiRSt1Q0xjL3JSVWRCZTBWZEV1ak0x?= =?utf-8?B?T1BEREd5cFVDd0VEc05ZYXlCKzdHeFdOSXdwaGhqT0lOVEVkOTMzV1oyTnpD?= =?utf-8?B?N1ZLazZoZlFDMWpQ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nZBc0ZRbkFmKzJ5dmY0dEd5WEMzVXdzakVEN1VpVWEwWkpLSis5V3ZRb3F4?= =?utf-8?B?K3pmR2NVZ3R1emF6UWRtZmZIaU1mNVNYTld3a2x3emUzTkc5UkRUWThMdXEx?= =?utf-8?B?elo1blRhcUFYVGRzY0JTT00vMzgzS2p3NitSLzFHTFpvdzBUMmFyUUd2VnZs?= =?utf-8?B?S3M1dVVFQ3JTakpkdUIxUEFLZHRqUlJlTDQwUXJncXdjNHVNa0VoekFCOEJV?= =?utf-8?B?bzh2b0pnT3Ric2lLY2JKM1pNcnlML3dLSEg0cUwrakd5NHh4MXpLaTZsRUlG?= =?utf-8?B?dXhzcDZuTzhCeC9TU0Z0akRENks0WjFWcnVuMUgxLzVCYzN1cnNGRW1OUFoy?= =?utf-8?B?TkpHc2FJNDVVaHdXWXl4S2pzdDJqZW9xakJuL25xUit4VHkzM25YazVGc09Z?= =?utf-8?B?TVQwRjdQdFROd0ZyWmxGdm01cForNEJqdXhjdGFzV3dKVFdJZ1E2M0drVGFH?= =?utf-8?B?WGxOYzNka3VSSUhLS2RvR21lYS92dXlPakE0YTZGM1BOU0lVbXNEY3UwK1pR?= =?utf-8?B?Y3NkMitacEdqRTRoelhwNE5UR2RJTEFyTm5FVk1nOHo0RS9TYXUrNDVUdmEv?= =?utf-8?B?UE5Qb3BvWnZubFZ5dXdkQ1EwYmdlVnlaVWJrRlRtd0tGcnZYODNLa3oyaUNt?= =?utf-8?B?eEJ0TzAzOUZuVENJQzZCOThUcDkvNWJqNXo4QitHQXNwQVE5VXlCbmtkVHZL?= =?utf-8?B?YVlieC80SUE2eFdKNjdEQT09?= 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)(366007)(1800799015)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x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ncvWUxacy94cTA1M2pVYTdxd29iM1Zmdjk5TWlMRnc5dXg2UWFVbjBTU3Bx?= =?utf-8?B?OGhma1k0b0w3a25ZbmJzT0Q5SktiME5wTnVwd3JsUnJ1bGt2OHZQV056bzNz?= =?utf-8?B?NjdEeHcxNDJnaXR4L0hSZGNKVHZaY3RTeVRjSWhtWmlST2dQRmc3Ti9ZaG12?= =?utf-8?B?SFUyN1Bwd2JqcUhjNitRSGtuQ1NnNEIzSm1kcHdhUUtVU0d5dUlyaGpmQmhh?= =?utf-8?B?TGV6T2tJWGlpK29tT1ZCR1hEaWNlWXFrZVl1b0g4dWZ5QW1PVGw2RkZkdFVh?= =?utf-8?B?c09DVlVrZXRQT1ZpMjNjM0N1bHRyVUNnazlka0FaMExwQUZjZEF3SktLZmRa?= =?utf-8?B?QjZJeUNxYjViNnpUeWJZdDVHcy9ReUY3Z1RuZFE5VmptWXl0TUcwN2RDZ0xn?= =?utf-8?Q?Gjyu9lt6Zq6/4nn9ddDFH88=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: 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: d5d58363-0ddd-4808-2a04-08dc83925f9d X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2024 05:59:47.2109 (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: WEQYzi64BlfSRPu6wgbsZVHKXZ/3l6qV8P5qxjCIiTfILRGCeU2Dqr8U574cFQu/+EfVk2j9MEn3a5AmeTDOJMh/r86tar59iOHeBaRtsyf4FTfEgIWhYC0DbjeC1bCm X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB6238 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, 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: 1717394631507100001 From: Cl=C3=A9ment Mathieu--Drif 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.45.1