From nobody Fri Apr 4 03:47:05 2025 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=1740653874; cv=pass; d=zohomail.com; s=zohoarc; b=V50rJO6DTnH7UyKWUpqB3MAZqNw3UT7TmOSUzsEWBN0ed28EQW0qyRexQGKbwwZlkzRHqtHGhC3UE9CqIkxgKwAbGeJNbxh0uGBfTUQTb3K6GRwNZO37DJI3nXxWHxjaus3yblcJe6L1a31PWmasChHEoegT3JUCyy9yYrZnoho= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1740653874; h=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=KdmPJO5RPn+KvHUqO9BHrSYOABK1AmuO2QQjcSjxo28=; b=MIfxyojQG4KqPniZBcgWPR6jVsGtYhSYrN0Bb0ClQCFF5bfgmU/GsMog3RLU4nPJEOmBWsafD6P1dSNhp8S3BifsANehy3prU+hlSoe6K7sAXy6zCcfsm7V572IvyfgssAwxk2aqNZ6Vb4YjA3pF3i0U59t6VFEhFf1YrwHm58Q= 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 1740653874784430.26926728639194; Thu, 27 Feb 2025 02:57:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tnbXb-0004ez-BF; Thu, 27 Feb 2025 05:54:55 -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 1tnbXY-0004Y3-CB for qemu-devel@nongnu.org; Thu, 27 Feb 2025 05:54:53 -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 1tnbXW-0005qC-Dg for qemu-devel@nongnu.org; Thu, 27 Feb 2025 05:54:52 -0500 Received: from mail-db5eur02lp2106.outbound.protection.outlook.com (HELO EUR02-DB5-obe.outbound.protection.outlook.com) ([104.47.11.106]) by smarthost3.eviden.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 27 Feb 2025 11:54:45 +0100 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by VI1PR07MB9421.eurprd07.prod.outlook.com (2603:10a6:800:1c0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8466.19; Thu, 27 Feb 2025 10:54:42 +0000 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com ([fe80::fbd7:ca71:b636:6f9d]) by AM8PR07MB7602.eurprd07.prod.outlook.com ([fe80::fbd7:ca71:b636:6f9d%7]) with mapi id 15.20.8445.017; Thu, 27 Feb 2025 10:54:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1740653690; x=1772189690; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=fDuNj2e5Z+tVyKsZ9Vl/nMf+ohGdmNjrvRU9Wlq6dmM=; b=PDOpTzQh6ExBqf1H/vyjkpwBUycko+v7aJ6+6/E2N9tzfziJQZyZ8fV7 P+mBUUIXKyQNlKTfGU81XSjlgwkPtY0Eyjcvfsnuu3V64Oq/ztkRyRlDY BOru91Fqexj+JQz0ZtYKk8dTTPrFg1BLI0el6UdyvR2Fx8BoJJNUh2h7t eO9Zegvh7QpWF5lNh0MemXd9AWlXLqp4H8pOGhGC2xNju5H7ESGMxUNt3 gKmZIcj7HuQVyVXRGeh5LbG0SkOBK+LyqHBFgmS+oYS+nm+xVLgNK/+ki Lzof3aGqWokeGLmXGs4Js+vWEkZTCaD/zezVaymKPoNoGAOFlb7PCA2SK A==; X-CSE-ConnectionGUID: Y8r2H4dESNqgShyLgoUIuw== X-CSE-MsgGUID: /KNB5JpOTAmHNLBT3NFIag== X-IronPort-AV: E=Sophos;i="6.13,319,1732575600"; d="scan'208";a="31822963" X-MGA-submission: =?us-ascii?q?MDHawFV+MDl33gxkMWw2KYIyxKcNyrlGFPYy7e?= =?us-ascii?q?j1nXjczrCl/PWfIY1EYZaZQbU0rlVIWHVCtjF3Jxa7Jfh1CTUDEyxF4c?= =?us-ascii?q?YhMefGwGqODHG8C7G7LZxyWZsjrI7V+7HVt0SSmkaUhxBnte6gTzSJ3q?= =?us-ascii?q?iubTisi1YuymnNVDf9JfqOeg=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=r0cdCun8aPhL5yNFFKxXrpA3+aScIDND1pRrqsNuj0MjHsKUiiTiihU4G9lT76xuWvcUPhxCgpLSb9SUyw94Y3xKFDB9IcNHUW/mq59OKecM1MhKlBZBF3HQPR/a1KeCDJfaQnG7NA3kthti+lMRh5+f22MN/iX5LyIUnzxUI/Ge3yCfN2tPVQGejA/kMrNa0/KhxD6pAN6AFISfqmomh88Petw6uE5poOulvwQcJVuue/Ghx2fCGPZ1vRxmKjYcl1PM0HjO0J1JXkMkrgobB9eOgCdGoRjo/qJe68wUgAH3sMjZSfjli4v+O6/rteVSzj0dEwsHrJwpobhuD7oJ7w== 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=KdmPJO5RPn+KvHUqO9BHrSYOABK1AmuO2QQjcSjxo28=; b=TLPVsxVWBdYmIDsm/G72UKRa8EibyO6paGTr/X0ivV9yFdFqPUZwzOnyLyLVGCff1/akNZSk+si4N82YcG+OD2a5UlqFPnqnmJofOcL8lF9dbg1V1cR3W7lIUYErQLo4jysnyx+UF1rjh/vtDshkjfJZQXXOhFCbXo6nbk994OF7XCYmtE4uQGa5GKbsH0zxlSl/eZeW+68iIZ7smA1463wtulI2DiZK/hLa0YL4ZVOTI8Dmwkh+6Lih+ba0ItPuSLFXraaiiZ/jWJjLNIYubQ/J4IegBdb4zOFo8I0XjKTx9H5pqfBEWm7zBgBc+FkDfD0OegY+m2mcpaCpLJgl6w== 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=KdmPJO5RPn+KvHUqO9BHrSYOABK1AmuO2QQjcSjxo28=; b=G7n/f+9X81EEAevpNAEBFXcHiR6O7CRQ08fUU8geyfD4TSOoGm1+g05Mf8bvHw7pYe2mLrDgPSMTwizdH3M7MQrBouw1+ICcYYUoEtpKglO/MG4F52jp8Rh4sR+/FJr1p25dEgmYRRvxDhApTksVHLZqJmxrPFQDdVLwyabn+7F+NJjCilOolVa+l/dI8h1lQ9FlK+lYo1cMvCrgW9YAaDOOxyzrA0LnleZ3NIGX3mZxOGtYCTh9Rxi4URTXl7kWX03WY7l9nQWX4DsxrGbJwBZudIgZT0qmlz+ZQW2Bna88JrdhunurJTmBS/Os8Z6beiRQf7kjnAqRAHlJOML6Pw== 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 v4 07/19] pcie: Helper function to check if ATS is enabled Thread-Topic: [PATCH v4 07/19] pcie: Helper function to check if ATS is enabled Thread-Index: AQHbiQYBOv1+QKz6XkaWkGVVgEGHEA== Date: Thu, 27 Feb 2025 10:54:42 +0000 Message-ID: <20250227105339.388598-8-clement.mathieu--drif@eviden.com> References: <20250227105339.388598-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20250227105339.388598-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_|VI1PR07MB9421:EE_ x-ms-office365-filtering-correlation-id: 67798e8b-414a-4410-c3c1-08dd571d242f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|376014|7416014|1800799024|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?Q?gnryjlUGax44W5qniX/Rn4j3t+CeaXuKtp80mp6EhprSQCy4fxGG3ECHu3?= =?iso-8859-1?Q?uRb45PismCaULfIuf9qjOLraNqO+sYC9wnjUmRnzWfMVTugGJEn4pb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fAWGnzk4klPGsZsPITImLxiQrR2EJ69gkO9Yg5k31?= =?iso-8859-1?Q?YsGygmiXPNgSKEB4hE1a+76kJUBEro2PL5B/TWxYalHIhh151O/PgrCKon?= =?iso-8859-1?Q?/LbIFk4kcycjFQpP+NjmcyoswFSAvtM1gyp0xg8dx/JkaQV63yWO2dO2hN?= =?iso-8859-1?Q?aPnXXV8GSK7bBM6teiq27j/dvtsq2ELsEzrKEx2w5b+tnd7OFE5HzNVveN?= =?iso-8859-1?Q?gLNeUvcSvP39XSqc21/sU6hK3hxqfb4MYHbEbyeiDRxuKkg+21cpy29xqV?= =?iso-8859-1?Q?dfQjN9vGi0JMAoaTscrwXWi5NC2gYjXatFdfbst8ByruKONJMylpOmK//D?= =?iso-8859-1?Q?p5+QjC1pbe1V44Tlt70SiroiZBeGINt6lIg12UHODQxfuxEyqStCnu67Fb?= =?iso-8859-1?Q?MGux1j3Qgcg3BkNcI025ekjTiLRex5pDhcU4TZLgKU8G3N6KhNRBf8riBl?= =?iso-8859-1?Q?mcvAT9CkFxc8htjSGkvRf+/LINQiSH+dAZcbxpicUlYPTIqv2zMB32yUsm?= =?iso-8859-1?Q?ViDagzckr67dol45hXJYFI?= 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:(13230040)(366016)(376014)(7416014)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?qtUnGgYPB2t7tR3tNWm8Juk912Q6jq/6Ev5AJvXeA6qiXXdUOnORTbMTSQ?= =?iso-8859-1?Q?wcSYArhpAPX8No6aXeC8LvdDnnhvLCAxO3SgoZVJDrlOYtlRZtC96P3+Gs?= =?iso-8859-1?Q?6AVAgM9afKxF+EbwA4nso4K5OaeS+qrBnKVfZCRzz4vbVYd932Ogu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WLqqoXTYYKBbVPeDWLzvhcC?= =?iso-8859-1?Q?e58x4x2hqtQSJkwmXtZdttq3h/QYmXBs+IT3ULYacY+T/q32WmVmmx02mI?= =?iso-8859-1?Q?4zwvh/k6uGRNxIKMmsTNCjSCjxRIhXiNFUQ+rM1ghn783FJKvu16B4r/It?= =?iso-8859-1?Q?IOXIvlkS4ROnMcfOV60Mk6SjN4JmQxx+HnwS/ow7XvEwcdvzwFlnZGYd9B?= =?iso-8859-1?Q?vdnbzImfq2G4YC1gz9EpxoIfpRDHHZXCeWd1ciSG5O6uPQRALI+M69Ee9O?= =?iso-8859-1?Q?ejuZ1m1rxtUbBAQkctovvQyI0GQbS7Sm96zPTQBx641hfOe4jtwXrwek1e?= =?iso-8859-1?Q?6bFW5mXDuFOZ7hBtWGt0LVKPx249/2wWAEGUZu2Ea1VOYSAvt1JTuAoofM?= =?iso-8859-1?Q?JSpcZv+Nl6lW1LR0QE1GJVUa385WOBaMNA3Yo3/XiD+bUOhncgciHp/Ay0?= =?iso-8859-1?Q?YvntpzcBQ64UTr2JAjU7gfz73MeG/Vqdf9trKTfZN4y7IzKrO0plFB1Gsq?= =?iso-8859-1?Q?bpm/KWPjL+rcPo7TTEAahUk4n3ijlSLjIl/3gQh/tUewTllQvpvx/xP08n?= =?iso-8859-1?Q?yKwJTTV9UvbECWZoZzjH1JiXgay1Uvh57b9DkGHcuC9/Vdx4Ac2l+rw/qR?= =?iso-8859-1?Q?9hKnI7Nhad0EHnxp3EQ=3D?= 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: 67798e8b-414a-4410-c3c1-08dd571d242f X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2025 10:54:42.7470 (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: fPqYCnAHcUK40Eaok3EWByTwv72dsmur0dSqKCwTsrR2CM6qPsIgabvZH+CRinZ8swG/cTyuMR3dDjMwbNMFCvWJbCldW08TexVtJzBXU8GDQrTQeTnO1QW1VsK1gmbC X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB9421 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_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_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: 1740653875138019000 Content-Type: text/plain; charset="utf-8" From: Clement 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: Clement 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 8186d64234..3b8fd6f33c 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -1247,3 +1247,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.48.1