From nobody Fri Dec 27 07:52:38 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=1732866414; cv=pass; d=zohomail.com; s=zohoarc; b=aw5YscouNaysalo4w4IgAAT9jAla0Q67fcPB9xbcBBtXlFS7IRjbG3xNzzJIZ0BzTztnTm/W8pOS0Ay82oaGGo1U2CBD/He++A4imTRDQqyQ09YM4ferJ+EIDWz0tqPSc7JZYDi7KdcESWlLjwnGiq06iGs+oeD5qu+8fjtHdC8= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732866414; 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=dSbec9u073dxNs0vgQ5NpjaCt5YwLh5q+Zos3VDB6P0=; b=kUc0v8S6EYu1+atu4K90UUo41Di4uY3CqlqdC3J55EzuMp5qV73al1wPz6sROGDVMkxNrHTz4Rzq1IzLGJqz96pcteJrCS9r3OcwR/6ttw7MC4yQ3cgO1rBBPzJUq+s0h78s7RSyVoYUr+0NmNY4VanIXsEVadmlcChXWOwsEjw= 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 1732866414019848.4438699941688; Thu, 28 Nov 2024 23:46:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGvfk-000827-0K; Fri, 29 Nov 2024 02:44:16 -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 1tGvfb-0007z9-FS for qemu-devel@nongnu.org; Fri, 29 Nov 2024 02:44:09 -0500 Received: from smarthost3.eviden.com ([80.78.11.84]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGvfT-0002iu-JD for qemu-devel@nongnu.org; Fri, 29 Nov 2024 02:44:00 -0500 Received: from mail-am6eur05lp2107.outbound.protection.outlook.com (HELO EUR05-AM6-obe.outbound.protection.outlook.com) ([104.47.18.107]) by smarthost3.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2024 08:43:54 +0100 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by AS8PR07MB7847.eurprd07.prod.outlook.com (2603:10a6:20b:39e::21) 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: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.8207.014; Fri, 29 Nov 2024 07:43:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1732866239; x=1764402239; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=dSbec9u073dxNs0vgQ5NpjaCt5YwLh5q+Zos3VDB6P0=; b=MqBf2sbe5a50fkmMwswahGEaO8nGKhYqnuEwGnESK2b9e008b8mLCXos PSuuPTlJ3hkJf4kOuR/+PVi+2OPhbOcRnBdjcW14fc9+a2D1RSXuG04Uv vSPThX2Til5Ppf3KzMJIRABkXP3vFc4FOuIVBNCSLKDVDSWPvUI7IXlpV k+BwXDqC4KG3F3scLMfnN/WnZiY94bAykXpHo23BgHWO70REKcTewVXCa NgvQGax7XfdfPUTLhRsqcasS5Wk+EkPCsYD5GVegsnyJhWBX5qxrcenRC nMNGKJrgZ/wuh1Vckv53HVcqad3fmN7P2oZocHJC2UTljSavQrBsiZVHG g==; X-IronPort-AV: E=Sophos;i="6.12,194,1728943200"; d="scan'208";a="25663422" X-MGA-submission: =?us-ascii?q?MDHdK7Kwv4sPI/A4mSEm5AOL3xkbWZby6lGG21?= =?us-ascii?q?BA0zYRys2IS5w7jmaFe1UP8LzbhDdTHPTaBr/Jh4ErKOnnczdO3B0tnB?= =?us-ascii?q?nYbZJ0mAH8/91067LeCsLr+FnABOVzCqEoN4EvYnpo6ckp9wU18z4UyN?= =?us-ascii?q?uk5WskkHlfx7nYhqCDFlH8Xg=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Wi/K6EKjfOPp+1LZwpKzLbo23IS74cb1Q3QYpjNsmrPMlJQU7HYp72TIMMYG87TmpKvOU16+sqEOUj5VnVe8DOyzoXLoPsCzmFGGwvAlc+nYtdflE/PpJAxj3OoQqwn+e1nPOXRgkHwcM0s4hXmfmk06VU1OheJmCW2gJeJBlWYJ30oSO4a03wXM4nbCgO6IezXzNvNeQQSLmG5Nwb2W3pFpOamtcfRKHXE82ZG+C6uKnnF3k9EmpAX7cJD+WU3NMhdiy0xcSrEXfgC3X5w+83VeWq7stn1bsNZ4YXRtcknecd/dmBWTUbXVpK+yMkR1XXJZUwyx7PAYtqCHCRqzCg== 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=dSbec9u073dxNs0vgQ5NpjaCt5YwLh5q+Zos3VDB6P0=; b=y1o5PlrvByXi9PxtMGVGF9xfXkzIz7kzo1xmIl5cLbP1qo0yV9B1zw7KAxMGqGnpB0qc7A80zpghMcNSdXtar2Z3B4qzN2aeVyrrkMeBnlRns+mYkk6rj9rsN9LmF9tPC6j4ZPGK69IAtSSa9nt8dApjH5WuJiev6VaAHPbcFgasYv1B9YeWpHb1qvto2LD1JLBjmfyJAMpHEM6futpA0eaee6doyAwhWCStFApsAkCsuUXkbVgZf0vc+PBy58zPCH63GzQPcaelo6QlKXJVisd38wcaz5VNPRYr8qzfmGsC7sWQYLB+8+xnI8spGKkgdgfGvVQx/QAkoLxnl54kVg== 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=dSbec9u073dxNs0vgQ5NpjaCt5YwLh5q+Zos3VDB6P0=; b=PDagTgmSS7us4b1h1/PBZ55h4i9/O+xNyCOs/Dk7fNSMaXRveXXdcmwsCiX+poE9uge+SHAVqdfPOSZxsk+GD9BOCjOg1SxWipiNnfVGQmlCrQ0z4jnCK5lGFU7q93C4Qtv2Bg1Z43mmTUZPuhQgVtWj3cbi52E5XR0UtZ/OWm/Ji7XHjZi8wVF7RpHVqKboz/V94YkSobchttpSPQGWHcEZ5349bdAeiEGosnQB+ow5Uu2PjvxVj8yR01PIIODkMHq23vVDLoW4LGBBgU4mW6jZbHRi6RL/yBSB7bcncWmmz09PadN4t9EEh0Fx9Vg15jDf1Wk4G6B88I5BUeUAUQ== 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 06/19] pcie: Helper functions to check if PASID is enabled Thread-Topic: [PATCH v1 06/19] pcie: Helper functions to check if PASID is enabled Thread-Index: AQHbQjJwXoyduQYO3UOuG9p1h7xK9g== Date: Fri, 29 Nov 2024 07:43:53 +0000 Message-ID: <20241129074332.87535-7-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_|AS8PR07MB7847:EE_ x-ms-office365-filtering-correlation-id: 34b96ed7-9690-4bfc-84aa-08dd10499293 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|7416014|1800799024|376014|38070700018; x-microsoft-antispam-message-info: =?utf-8?B?S3Q2TUkxQ292TUxVLy9GTzA3aHBSR3FKeXlZRFpxa0tjb3ErTldQYlJGKytR?= =?utf-8?B?OVk3TEtQdi9IS1ZDckhBYWx5VEdicnE3b1F2aXJkb0RxbTJTYU8zNkp5RW1R?= =?utf-8?B?RU5Sb2R4WjdKYyswc0hXNFluRVJiUEZUdTBUSlRUOU9zMlNqSDJZMHpmMT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G:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM8PR07MB7602.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(7416014)(1800799024)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?ZlVRemQ2cWJSU3c1bCtxRGlRSDdKbnNsTmZ0WlFYZ29oNG9xTWRpSGZRN3oz?= =?utf-8?B?Nkh6WkFLUS9MVmZFSG42bG1mSDR2bWphY3JPUVFWK1BhQWtOL0RGckRCd0ND?= =?utf-8?B?SCtPNVlqV3JlbmFRMWFlVW4yTE54dHowdnBScWtTZUNHQ21EMzh5ZkZxTllT?= =?utf-8?B?L3N2K2txZEJpbTNHbUR6OHBIbTBuKzFGUSs1MUd4aURkREo0U21XaXpVMXdM?= =?utf-8?B?NU5tdGNyMXc2bFdnczhOQ2VlVGo3VGM1QmNWYmhVQkJlU3NHSDlWRzJ3Qko1?= =?utf-8?B?N2lRQTNFdGRXY3V1cldiSjRYeHdlSTg3dHFxSHNrVnZOQVJvWTZvL01zbDBR?= =?utf-8?B?Q1BwbjlTS0J1bHBHNll2RjVmZG9zWU1QemF1dkMrY3pndXpMNkpqVjFLV1Bu?= =?utf-8?B?OGNwUEdmd3NnWnBUK2w1UGI5VXBVcTNLakU3MUEvVnRPRDNaS01RNWZ1N1hX?= =?utf-8?B?OVlVSjZTc0xPSU1RWTdoeGtackozcEU4S0t5N0tjd1p6UlR3cnV4bGxrZkEr?= =?utf-8?B?cnhOWjUzQlVaZHYvT2RCQUkwVStDZHUyaXZYN3p3N3pJSDJVOXEzM01qNW1i?= =?utf-8?B?NjJlY0YwbXk0OXAzMy82M1ZyQjVmQXdJVHd1eVpYbStjTmJQVndKUE9HTmph?= =?utf-8?B?MUdzRXNaaEU2QjhNUzQ4YUFwTWJPRzBNTnB3c2k3Z3I4UGdCellOcUJuSzZQ?= =?utf-8?B?dGJ0ZGpuaj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-8?B?Ry94UGFzdWIxS3pKTVVhVU9LMWNoUVB6YXJyUVlHbjFucTZyT2JLYUROV3FN?= =?utf-8?B?OXRsZUk3ZlF6T2trbEVERVVQdHJZL1E0OFRXN25JK0s0N0poY1RNd1R0Z3Jt?= =?utf-8?B?THFzT05vdTd2bks1SHlpblNISXgrY2xxTnVOWTN1RFRVeFI1SFpiNzhtOVY1?= =?utf-8?B?Q0lzV0FrMllodmdraElaajg4dlB4Zk9RN3RoMElNTXVnWlp5RmNjN3pZaTZ6?= =?utf-8?B?Y0JCcmVqQjIrU1NITHkxWVU0SGhaQXBMN2xVUE51SVhpRUpCTjNJcnEyaTJl?= =?utf-8?B?RlJNVUs1K1NkcGNVRzNqbU13T2EwNk9mQWJKSmU2eC9BWjdVd1JyWXdCaWNJ?= =?utf-8?B?ZEhqMlRsZC90dm1HSGpIRTNNQ2FTNmRPSnZLZmMrU0FjMjF0UHpiV1A4WW5v?= =?utf-8?B?cDd3aUJNTzJBcGNZRlRJTXZYZkxvcS9KRE5kazF0MXNFdXpCWWhWRnpiWkJk?= =?utf-8?B?Ykh1QzNPaUVWRnRmNndOeVBQR2F2bUhHcGk1dHBtQnk4TkgrYWtJTmJwSVFC?= =?utf-8?Q?8JQ8vit89tE9ZXG05i+ArAc=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: 34b96ed7-9690-4bfc-84aa-08dd10499293 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2024 07:43:53.3763 (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: 821KS86VsF6wrb+D+z6VIN79YkA33cBwZ9aDZnkD3ytqjiOq/G0sl4KQcJXMyV5h531n8JaodAxWqwsQUI6Pe6NeJtIAA6ZIgx8tMBPG3RBL9UEqV+1saYg2PeW5NWQ0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB7847 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.84; envelope-from=clement.mathieu--drif@eviden.com; helo=smarthost3.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: 1732866416191019100 From: Cl=C3=A9ment Mathieu--Drif pasid_enabled checks whether the capability is present or not. If so, we read the configuration space to get the status of the feature (enabled or not). Signed-off-by: Cl=C3=A9ment Mathieu--Drif --- hw/pci/pcie.c | 9 +++++++++ include/hw/pci/pcie.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 5b896496ae..b6e84acc93 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -1234,3 +1234,12 @@ void pcie_pasid_init(PCIDevice *dev, uint16_t offset= , uint8_t pasid_width, =20 dev->exp.pasid_cap =3D offset; } + +bool pcie_pasid_enabled(const PCIDevice *dev) +{ + if (!pci_is_express(dev) || !dev->exp.pasid_cap) { + return false; + } + return (pci_get_word(dev->config + dev->exp.pasid_cap + PCI_PASID_CTRL= ) & + PCI_PASID_CTRL_ENABLE) !=3D 0; +} diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h index aa040c3e97..63604ccc6e 100644 --- a/include/hw/pci/pcie.h +++ b/include/hw/pci/pcie.h @@ -156,4 +156,6 @@ void pcie_cap_slot_unplug_request_cb(HotplugHandler *ho= tplug_dev, =20 void pcie_pasid_init(PCIDevice *dev, uint16_t offset, uint8_t pasid_width, bool exec_perm, bool priv_mod); + +bool pcie_pasid_enabled(const PCIDevice *dev); #endif /* QEMU_PCIE_H */ --=20 2.47.0