From nobody Mon Nov 25 07:29:08 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=1717394492; cv=pass; d=zohomail.com; s=zohoarc; b=ZxhVIdv9C4wPJELAR33rCj+MwKOjr58HgQyyk1Gg27RkRf7lOxuR4IhtaLb5iC41VyD5LGWvOibvfhgGOKMHStgfFq+V2AYB429CR6ny2n483glJReYb9cEiXxMLYyRAbjqEYd/pzd2U/GZhs2FR66s6iytxoAmWZKUKTOw6viw= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717394492; 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=z8u53u+CM2INsVXAc6uqK70A1lJTTUSaPFDUaxCmfhk=; b=iQWebUvl5WbrlgFUcCJe27Krh3sGgw7Y9xrDMT83whmG2bxu7uNgquF9Spg5o0bsbbLq1wF4ufEtYeOR6F7bF/L5F/x3c/EIz1yaDteSxc/Ri/BNz45l+mXrpN6fK2G7iYqvhTzMx5RydwUJWhjLBnEO0kHXTqMqFDwVzuH8oRU= 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 1717394492418747.5759218090343; Sun, 2 Jun 2024 23:01:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sE0jq-0006qg-Cn; Mon, 03 Jun 2024 02:00:10 -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 1sE0jh-0006kN-UY for qemu-devel@nongnu.org; Mon, 03 Jun 2024 02:00:03 -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 1sE0je-00070x-OD for qemu-devel@nongnu.org; Mon, 03 Jun 2024 02:00:00 -0400 Received: from mail-he1eur01lp2050.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) ([104.47.0.50]) by smarthost4.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2024 07:59:49 +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:45 +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:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1717394399; x=1748930399; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=z8u53u+CM2INsVXAc6uqK70A1lJTTUSaPFDUaxCmfhk=; b=g9fpAuXoAxWCy1NVp5fCKf2z+y3GsWmx9mg7eSW0QQD1nd6mXm21L72C QxxGYMLO62akBsTb8Mr3WH1ObxJtVVpX8gJQ1x7hNpm2fuT9xU5iPlt/N 2kb/P90aakL+SgUySWPwyZSrlXmFFFsDAPyQQ+aWe2jcIVH2/go6ZdUTM sdLmZsZvqB7D1jQTp3hAhQvV39R/HawZ8In5O/dW/GVAjGYSzW6RxiCka vewnM8p0LGPAdOGyl+0IAqY+hEcMmu2/tbd/qiUGzUL+rzg/83QF0iFIl yollvV4LDvpEjRVAfT4Av2Ph3GtSE/KeW05unRj7QwJhoMkL4kFdNYsy1 g==; X-IronPort-AV: E=Sophos;i="6.08,210,1712613600"; d="scan'208";a="13815878" X-MGA-submission: =?us-ascii?q?MDHwQ4j8y9Ip9XSWWpuGa0SkPI1EdSKoxqsbLI?= =?us-ascii?q?2eUzJ38Uw+V6k2EfE5DYgS5oQOA2boD4dHhUHMSc2Z5lJuzP7ibA+PU7?= =?us-ascii?q?HF5Pe5MgojuH0EKzb0NOYTjQuktgKru8+ZqTbf2eAhsvdhctqBdOO/89?= =?us-ascii?q?kRlQ77HA6oHrKQl9R2PkK8jA=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TVz1ZUJsVDTgJb+QflYCPvtVEIslS52AJ/YwESMKac8lK2W2PSe0ygkU1yKDCF0J6N/Nggv60v3Bi6nVFudSGbWGguboHQsCibdHGfqwLzoaNYwNNpMzsjDiYgqCrLTwatjM/AkQTraM6jEyJLIRfjL4jgBl1vEYinNs5w8U9B7X85CAq2ExZkt+z7FXF5kRkcZ4Enf/1gzd99zFcvM7zPhAvr1lGahhpltVgVcYQ4TMbTxWOKHMwGghd1prOknrvUlbzwZmPsV7BAnXKLNfyzY8gJ1DhOOnjEqngVBHoYNJbN9hp0N0KEtNmrIAhcEZ8/t1elpIyVm6XgdVB3PNJQ== 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=z8u53u+CM2INsVXAc6uqK70A1lJTTUSaPFDUaxCmfhk=; b=UkoRDhx3bYCk6Bsds7HUsaIkbTFv3FLDrGuO5Yt1kdI8Ee+V0sOm74ptTMld1w++QBoMzkkRdI/FOnA0jYTQ5WadkHoye3l08gEm+BX3zvp67SiKW5XYn6vZkpKoZvxFbdImUZrKcCFsOQkal1VhJXPzUE23Ih4dquWRJS5Z63cfVkDMIP6foy4dWnr9SbhZVvQIpAt3KF/nwPkHwgmH8n+3NWyFpYAIV6Wp/NvR1yizJMagquRWhe5g6SyAxjh1G6i1szgBoGx5w52JwYOzxL5lIq4KoszZvKijiGYh9EUM6sPEbPJoxsS9tV4iBeIxFAzTcFKReLfI+yrmv95WqQ== 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=z8u53u+CM2INsVXAc6uqK70A1lJTTUSaPFDUaxCmfhk=; b=Khu4QM2bAp/tJNcIXJJYQrGrJ8677kXM4nsgvJSUGruJFnEeK/vRjiciiBQZxU8VOksCwY0XJOJ/rF11yxYDKDOQah6SsUKeGuon56IVYRBFevGU7DlKC2YWSEJ8/5MoCcC59IkJZ0IfYWoD7f6/ylOu3mljvdqAUWt5I5aQAU16L2yJ8U5uETiZH2noxj1HcL+6Vo1n8/r7DFTflTmi/1oOwN9VPx9duxbMxDnxgWTO5cNFRb9A2w/ZopCA0ARWDZjldTrog+HEOzv8nrNv3Wg2PRtNaVC1CBKg2SIL8XFMvx7JopT+jQZ3/UHDiMZrZPJRtNsjOcCwWatxa87OQA== 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 07/22] pcie: helper functions to check if PASID and ATS are enabled Thread-Topic: [PATCH ats_vtd v5 07/22] pcie: helper functions to check if PASID and ATS are enabled Thread-Index: AQHatXs7XMyQi9yUpEaND2cFURryiw== Date: Mon, 3 Jun 2024 05:59:45 +0000 Message-ID: <20240603055917.18735-8-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: 1dbe1e5c-04bd-4ad1-7b8b-08dc83925e75 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?NDRhY3o1NVFEdFZha0JGeUVEZG01NkxkSmRQME8zMjRuTmF1dE9Cb2NHcjBi?= =?utf-8?B?a1VYR2NEQ3RWbHNEZncyWDRzZlVhT3BGbW45YmpqODdrT1VYRE1KZFQwRUNn?= =?utf-8?B?T1ArdlBCTGhPRFY3VzJRZDBURDNsdmNsV0hEamRMVGRZL0dva29XclBOTnpj?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1hsQXJxQzVrSXByQ2Nr?= =?utf-8?B?bnFUMnVKVTJlWlRKdi96WnBEZUdqTlZhdzZsdWRKbnQ2UVJWQW9MTVA3MDJL?= =?utf-8?B?SU5waTJTTjJWSy9OZzRYSWhybU8vd3RkTWRib1Fxek5Ub0hQeHlwK1hpM3FU?= =?utf-8?B?OGwxYk03UjVVSDhVcjdZc3JjZVV1WUN0cnhXWlJ5TFE5aXdSdVRrTTFRWGlY?= =?utf-8?B?MUgyYWNvUWVjYm1MZ2lWVlEzU1djclROMnpudEhXbm1xYmtxa2FkdS9FNHps?= =?utf-8?B?MjlhME5pelM1OEMweHM1NGpBQ2ZLUVozM2cwRmxwaG1nb2hMM0Y3RnIvNzMx?= =?utf-8?B?N3psYlMrMU13NHJicWl6dkJPMjlqa0sxdVY4dG1GaER4WmdzUlBGSitMQ2Vo?= =?utf-8?B?YUVORWZSaUk2aDNIS0JZTCtqRDZaamo3WHk4TGliR3hFME0xdEJwKys2VVY3?= =?utf-8?B?NzllV3dBUEs0RWg4YU9hK1JRMlVjTXBzUlJxWmdlWEhEY1gwbXBXd0Q4eTly?= =?utf-8?B?enFzRTE2bktUK0VMOVNXb0NOVEVBaHJ1SzNySnduWk1VaFg5c1BvZ1dmdEI2?= =?utf-8?B?cCtGUzQ0VFdJMW1OYUg4Q0o1SjlGQWtWR1pJRHVjZ0kwN2k0STd2UktyazYx?= =?utf-8?B?OW1qcEhsN0hudGRMWGFKNENvZmc5aW9UaVI3eVFUb01ycmY1TEUzdnhGUGRl?= =?utf-8?B?RDgxL3F5Uy9JV3pFSEJUSXhIRDFHd0Z6WlZ1QmVpRlVVdEFWaWpyYjVHMTli?= =?utf-8?B?dzhibkdzMVVGS3RuaFRuZz09?= 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-ms-exchange-antispam-messagedata-0: =?utf-8?B?K0FtbGluVnRTdjBpODFOVXRMWTlLN3pkMTlPRVVpbytSaEtEeW5CSVl4UXNX?= =?utf-8?B?NUR6TEJFRDVOVVFicTB5aFhsbmxCaXJuc0I5REduRGhJa3dHNDgzcnFESW56?= =?utf-8?B?aWVjTjVpbU1Fa2xOV29HTjJyNGtOQVFLb29kNjhLQmlPdy91K1JTODMvK1Bt?= =?utf-8?B?VW5QcWwySmxpcnVNU3IzSFRBYzBGaXlyZVB5Um53bG9TRnJ2V2VBTTBmUk91?= =?utf-8?B?d002a0ZIZ0NjRUViem1ES0s4N3phcFB5NFFXNkpQYk5DNXBTM3ByazcvN04x?= =?utf-8?B?ZmFOOFhSWTJhMDF5YnIrd0x1SFMxTnluUjduckxoeGEra3RYOWdhUzZDMGJn?= =?utf-8?B?MmdnTTBoZ05WNmlkZWFuSmpSamlHdWNNQWROYksyUDQrT282Uzk5UEpVSmFx?= =?utf-8?B?RllFNWJYODZta0NGbXJOTkxnNnlldFd3bHFiTWhVWXhSSzJJTjBNSndTRVA3?= =?utf-8?B?ZC9RclVuZ2dqZzJrRUJKd2lmQ2VTTFozMy80dE4wZFVyQ0dnKzBWQWlZUlNh?= =?utf-8?B?NzZJREsxZ2RoUEhKL1RUUFhuWWZ0LzQ0djBpMXVsbDFYNnBwQ2JIeTkxTVQ4?= =?utf-8?B?eVBWaVlyQVFOcUE4amt2NVhQd3NSb2VHVjRPYk9EQ2FKQ1lPUURDTC95Uk1G?= =?utf-8?B?SnY2ZEN2WWMvY21sNkhBTDJ6NUhMNXAwK1JHWUkvaVBZZktia0s4aEg0VmU4?= =?utf-8?B?WXQvMzZ5dS85em1WeHZRSjVqSDRPeHlkQ1JTcjVnenRFZWZLQlg1VDN3V2J5?= =?utf-8?B?ajhxS2dhSE5URzltMVlvbnBabEkvaldQaENxdittMUtzLy9tbHF6SVMwdnJ3?= =?ut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StLZzZQ?= =?utf-8?B?Wno2aXVpSGpxMWJ6dFpnZmgrdldVRWY2NWt3b1p0V0VDdTBFTFpWOW90YUY4?= =?utf-8?B?ZnA3QmtRNGk2djc2b2I5YWY4U1RCRlNuYVgrdittRGNISXNHaGhCam5PMGhm?= =?utf-8?B?VDFIaTR0QTJYbEJick0rSkIwTVhpTCtTWmJWZmY4dXhaRlNjR0JHUW1CREpn?= =?utf-8?B?THViL2crSDdFWGpGQzlJMEpra0swSURYRFZTcjJHVnp1VldYVXZaeEFSd0ds?= =?utf-8?B?K0hpUFJDMXdKVWk2OFFUamZtWGpBNUxybnlxRk1VS2xOR2l2aW1jQnlFWTVR?= =?utf-8?B?VFJ3NDl2WFFJZzhDQzNoejZScWhiUllLelhFZ1hoc1JEVkExeG5zZk1lZ3Q3?= =?utf-8?B?OVRaQjNWSzExZ1htek9qZmVCN2NVMGUrSzZFYmhNdVNWZ1VkdE4wT1hxOS9L?= =?utf-8?Q?7hUxJ7oR91HGmqdK9XTZyJ0=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: <0206B37C22524C4BBD30D199EB16BFB3@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: 1dbe1e5c-04bd-4ad1-7b8b-08dc83925e75 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2024 05:59:45.2601 (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: 8VlLlXh6xznQ//jOvLLW1NwqJzkzYoiCgvYrmQzVJ9WHBtFT/W20zjJmxAdPjvhnEqrFVdnyObhDi/dPi58ccPUO4Xywe9ID+5mF+Jm5w3rb5HSBcqChoggRcYC11lVY 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.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, 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: 1717394492903100001 From: Cl=C3=A9ment Mathieu--Drif ats_enabled and pasid_enabled check whether the capabilities are 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 | 18 ++++++++++++++++++ include/hw/pci/pcie.h | 3 +++ 2 files changed, 21 insertions(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index d6a052b616..4efd84fed5 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -1201,3 +1201,21 @@ 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; +} + +bool pcie_ats_enabled(const PCIDevice *dev) +{ + if (!pci_is_express(dev) || !dev->exp.ats_cap) { + return false; + } + return (pci_get_word(dev->config + dev->exp.ats_cap + PCI_ATS_CTRL) & + PCI_ATS_CTRL_ENABLE) !=3D 0; +} diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h index b870958c99..0c127b29dc 100644 --- a/include/hw/pci/pcie.h +++ b/include/hw/pci/pcie.h @@ -154,4 +154,7 @@ 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); +bool pcie_ats_enabled(const PCIDevice *dev); #endif /* QEMU_PCIE_H */ --=20 2.45.1