From nobody Fri Dec 27 08:26:09 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=1732866419; cv=pass; d=zohomail.com; s=zohoarc; b=X/2tdjJAdAULADsncvchybMoMiotDO2g0dV3T4TjWaN/aYa9A9jyi1ZV8/tRiKNfWVv/YiknU27+41qNxSr1k7GnU+8UwC8VKdEPBKBHeKnBdzHX9E806w6CzTYdkLUPR/cQ3uqrTqOC2xtMF7oukOenZH7lYUeZz42Gs6qvjDo= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732866419; 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=ytktZtEYU0dSCIMqO67HHQkh/DLqPU7KZ/tIFWoIeww=; b=eOM5P4iDYjrAy21O3dglYswtiPF8Mkp4bIUL3TTaQWLvAFTKmag5nt4Vjbz5/zbWLM+U/a1/Q9S5QemTqKShXb4Qho7+Gsu0HxldZi8HaA8Pgmlemnqod9LLXp9kYNb8Xy6v+7ngQqDB5+TV3C0bcFdxayj7rYqde4TZPi6gHNc= 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 1732866419012313.13347841940765; Thu, 28 Nov 2024 23:46:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGvfh-00080s-Me; Fri, 29 Nov 2024 02:44:13 -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 1tGvfU-0007y8-6W for qemu-devel@nongnu.org; Fri, 29 Nov 2024 02:44:00 -0500 Received: from smarthost1.eviden.com ([80.78.11.82]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGvfS-0002l6-FD for qemu-devel@nongnu.org; Fri, 29 Nov 2024 02:43:59 -0500 Received: from mail-am6eur05lp2109.outbound.protection.outlook.com (HELO EUR05-AM6-obe.outbound.protection.outlook.com) ([104.47.18.109]) by smarthost1.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2024 08:43:57 +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:54 +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:54 +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=ytktZtEYU0dSCIMqO67HHQkh/DLqPU7KZ/tIFWoIeww=; b=nLO7oFl1vVw/df1gXC30zEz+WpNpsTM0Fxzn4pMLcgjUGbjUBVhcbCwY r7wfARh/vpQo105yjpKXgDuEg3vwFr/eKGgUA9A93EIbDYp8rxHGOT7/t 8LPTlHG+QaQCYarhi51vK4qB9P1OY5Y6fOmavvhiJdKMFGzgCj7R6qUV0 2BueMoIk13IdJRzMjtOr1AQIuGDlvwJY/rff4HqlcoHnjkDfwA7KOJb9B 88g1fmkPilv7Cv9afC9Uic5Kam/eDRg/G5nRgyWrp6BYvWdKxKj7+Dtl3 7ZAbTVHaO52FFBxBnv7CeTRF+W0r6dhHF5FT3lSrSjY/zj1dVPacbtVoQ Q==; X-IronPort-AV: E=Sophos;i="6.12,194,1728943200"; d="scan'208";a="25664403" X-MGA-submission: =?us-ascii?q?MDEZNtdPT7zhjxTYdsJrzrE+B6bVspPyFTlwnX?= =?us-ascii?q?iC3c0sDTOXXYyoguh6IRmIQlbOY9N2ou1BBqPSfMgmMD8SJV7ecvGH11?= =?us-ascii?q?DB3plEM01gkIeaQD+ZKoKEFLl1X445PcoEdK9GhsPdMQCxe9X/CrBGQr?= =?us-ascii?q?E8BTRBY5y1A4qhVmg8023mOQ=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=M9CEcEtqqX9zHpWO6AKvaEpGFpbnghc7YUuMt+sZOkBDyUlb3cf+YVqkvxY4+iRiU1HjW9AbvwBR+tuP8XXSmTQ5PvUgTNYjMKYBMs/6Ty9fDTEJlZpAYyblHRyeDLnMuV4KQ6gSK5sRsMQ0/SFgfX4lpYU5MpbY7TR8LeBrMWtEFQK4IEMYqHqrB7AmbrP8L4/WNuROteNK7SycLmRf69ZAPtJHl4RDWM5jLC/rwhqoqfYqyrDKjRZ6KiDXNZFXJ1lSEV4YDTR9zD3PtnCMrEtV1Y7KrpV6ujMXAmN9k3QlNgyxlQ1jZPPgfJOLKdc+bj7PQJeVlEcBvMW45GbUWw== 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=ytktZtEYU0dSCIMqO67HHQkh/DLqPU7KZ/tIFWoIeww=; b=dxyUqNORLKCKo2zLcesLl33bujECXchdUOryzmB4Zm1xhlK/KgKp727tfi3kHUM9AzAGoAK4Lajk3DLruS1ygLDujjGM1kSST7daVyMDCCLvGpOMwUjfq87XClEAuoFGIDy0uQcZUQSjvkyic3k0kpCb9BypnytrSgbvg2nHLGFP5gV9oyH5+eRjeQnMvqgkMr+3pYFaOOMvIHjhj1RMrkCIYT6ghOY7/amUz2PXt0L8psXXDsRLvsEzzVS2SFC71OZ3TnVXcGy497kRlpdpH9ayRaOeDOvlyOnfPCVMN5MsU2U1+h9SH0yI/nIVYpGp+DHTYsAR9df3VBSUR5pMKw== 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=ytktZtEYU0dSCIMqO67HHQkh/DLqPU7KZ/tIFWoIeww=; b=iCo7xBMu0XGJ7O0uqilEkecBAg72+PyLYxFkQtxnCgYLckLaqTp361wDSYzH4fLvznT5x8UJFSEUTavmMQROoSNjQfgoJc2LmtE8tcRpYFjZ+d5iHURuV8m5BRXzmVw/fREhc/WzAIjYeKHbjs8AwYPPM1BDEOgc29VoBY5dbk2G1zKS8R4G9r0FpqrfmNm0tqS6DxF8hJkR5136auXSPDWHZkZ0+BKnmNqIwVO0Jl2B2JDoeiQDWsUOIqbjdn34GtArxByKQv2465g1HNkkUBXYvvr1Bv7AcUQn+DKQ1wei1T2HvFVONUWtAVaJoPYEqDAdrnNQEa5kk7vXNroohQ== 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 07/19] pcie: Helper function to check if ATS is enabled Thread-Topic: [PATCH v1 07/19] pcie: Helper function to check if ATS is enabled Thread-Index: AQHbQjJw7Xoxk7N7VUCV2WyGQB2/QQ== Date: Fri, 29 Nov 2024 07:43:54 +0000 Message-ID: <20241129074332.87535-8-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: ea94c5a2-8bb6-4cb9-c5f9-08dd104992fe 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?cldoRG42SFR0R2lzVU96NVFTSmMyL1NaclpYSkVONXMyMGczWXVadkRVMGth?= =?utf-8?B?SU1uSU1Ed2RWdWxtTGhudzh1VXcyMDBPRlNIQTZJNnB2U1V1c1B6dXo1SEI4?= =?utf-8?B?eU9rbFdwSHg2QjAydHFVY1NEWnVCaH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.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)(7416014)(1800799024)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?THpodnh0bVVwakZzU1RTcU1YR3YxSVVnNHJpS1MycDZkbktmTDZvUHBJMXJq?= =?utf-8?B?elFHcmhCcnplamJ3QjNLcFlxWjlZeGxqZnBoTzRqcVlKTCsxaWd5MTllMlZJ?= =?utf-8?B?QlZkTVVEcXBpcTVLYnc0ZGJ5VkdRV2Jza0pYVnlXOTlNY0lYcEZFRWJMTXpY?= =?utf-8?B?c2NHVGVSU3FXUWJiVVRjaU1zeUp5VFoxNmRhbXhVT2trRXJMM3NiWmdJbUJP?= =?utf-8?B?bFpzMjVJdnFmM0lCU21YeVlhUHpobTh5ckdRRURCQTF5U0ozemw3QWxIUmJD?= =?utf-8?B?M2E4RkpuOFlmay9teWdBcEJXNmNsOTVMRE9Ham1ONmJ3SDRGWWZmelFQQjV2?= =?utf-8?B?S01WSnVKcVJiWW55elRtZERnN2hoM3NpcFVtTytreUt0SmpCeEJNU0w4cHNx?= =?utf-8?B?T2lhclN4TVJ5Rmg2bkpLbnJJZFdENHNsUjRhVmlsNFo0Qktjenh3YmRlREVa?= =?utf-8?B?bzljNXROK2UxeTgvMDIrZEt3eEc1ZEtZd2hKTVVudDlwVy9WT2ZRM0ZyZkdV?= =?utf-8?B?V2xOakxtbXJyeU9Bei92UDlCb1ZmNE4ydUswUE8wUXY2SlZXWnNvM3NkZWJU?= =?utf-8?B?enBsYlAxZk43cVAwWlB6SjRKM2ZkUFYzVFdadEpNN0FEdStXUTRLSnBMWit1?= =?utf-8?B?SkdsbEhtNVBoRVVsbS8xbjJsblpweTlFRXUrMVkzdUc3dnNxZGRUdURqbEZv?= =?utf-8?B?WUEwbzFp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keWJ3?= =?utf-8?B?cm1hYjc3UThjRkdLSVlycm1scC9yczUzeVNlN0ozVmxDNnNpd3pCa3ZxektW?= =?utf-8?B?bCs3aFRyWFU3dUVOSDROeDNyT2dYUU54dmtYS1JiRkxxNUZhVDFkOEFhYnNj?= =?utf-8?B?bHRJM1ROZGtPSmZ5VW13OGRuWkZCN3V1NkRzWnFURU44TGRCMm5pTXJhV3ZO?= =?utf-8?B?Z2VGaVMxT2RpMEE3TGtZWGJtYzV0Wm9zT3UzQmRVNGl1amd4Z0daT2hnL1Vi?= =?utf-8?B?bnFhTHBpWTViaXhsTk4vaDVEeE9GR1h0dVdhRzJJSFc3RTVOYlNING5FRHBC?= =?utf-8?B?d3JOd05kL2dYUStzRldYNWR3Unh6bU5vQXo4bmZSRmppU0ZrL3dXaE9tQUtP?= =?utf-8?B?eDBpUjVxaHZObjdNMDlOVlVFMnVtTklmTEJnR3VQb3hWdHBPVHFMWEFyRnNk?= =?utf-8?B?SFRzalBSYjNDbHdpWnpGd1hUbXFxc1ZRZTdFek13aU45akViVVJRRng0U3VD?= =?utf-8?B?NmprSFFTRU9BRE5NbHNWQ1RtME5icU5GZ2xKOGNlelJ1bW1xbkVmYVJpclBB?= =?utf-8?Q?wVE3RxZ/KmKYK1LWu+8Bdx0=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: ea94c5a2-8bb6-4cb9-c5f9-08dd104992fe X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2024 07:43:54.1081 (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: BXszZwXww1PrisbXNPACx0KC9qFL13JYzX3fDsgMb2sS7n9M5hMuZ3bNi7MJCLaMCJjBYI3lF/bsily79k8wx4+Af90LzyMx0NHgkXpqYto/DMu9j1nmWW1ZEF4EVLvl 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.82; envelope-from=clement.mathieu--drif@eviden.com; helo=smarthost1.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: 1732866420357019100 From: Cl=C3=A9ment Mathieu--Drif ats_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 | 1 + 2 files changed, 10 insertions(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index b6e84acc93..72bdf07834 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -1243,3 +1243,12 @@ bool pcie_pasid_enabled(const PCIDevice *dev) 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 63604ccc6e..7e7b8baa6e 100644 --- a/include/hw/pci/pcie.h +++ b/include/hw/pci/pcie.h @@ -158,4 +158,5 @@ void pcie_pasid_init(PCIDevice *dev, uint16_t offset, u= int8_t pasid_width, bool exec_perm, bool priv_mod); =20 bool pcie_pasid_enabled(const PCIDevice *dev); +bool pcie_ats_enabled(const PCIDevice *dev); #endif /* QEMU_PCIE_H */ --=20 2.47.0