From nobody Mon Nov 25 07:40:30 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=1717071962; cv=pass; d=zohomail.com; s=zohoarc; b=bJ3FdphhBxM0aa48Iam4B7UUWynFnbRzCrLtZE4daD5oUZjB7JwLowqqazypiGI/kmuL95TUD0S9bVy1A/tuWssRHV34w1EnOHfRN4NrUOqIHVBK3RuXo5FjKW661iv9Dq+fNU6Qvg57IxYaFFRcFQ2kNy/4HNZ2ezBzusI/UrA= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717071962; 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=tCBCyA3QC3xUDKpKmhu7uFqyaQRiN7sbA9LPX/ickcQ=; b=HYP87e+C9uomfmtz2DdbmVa1o+JmmSFYAdzveN1b7HWs25E9kmufV6HHdp+WHYjAPeyr/+TzdSEw/0M7qLKfdqzyyfMd69/fcld+sJnE21opjK+bS+D+PuVD1RcuDsRHFXK0DBVq5VAL/bL1RIhHRptKK32O+B41BxSLFjMPfKw= 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 1717071962157450.27736935204166; Thu, 30 May 2024 05:26:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCeqS-000798-G2; Thu, 30 May 2024 08:25:24 -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 1sCeqR-00078N-Dv for qemu-devel@nongnu.org; Thu, 30 May 2024 08:25:23 -0400 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 1sCeqB-0006Bm-DU for qemu-devel@nongnu.org; Thu, 30 May 2024 08:25:23 -0400 Received: from mail-he1eur01lp2051.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) ([104.47.0.51]) by smarthost3.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 14:25:01 +0200 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by AS8PR07MB8069.eurprd07.prod.outlook.com (2603:10a6:20b:358::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.21; Thu, 30 May 2024 12:25:00 +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.018; Thu, 30 May 2024 12:25:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1717071907; x=1748607907; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=tCBCyA3QC3xUDKpKmhu7uFqyaQRiN7sbA9LPX/ickcQ=; b=jGZtNmrpk2W7yawblOYzWUa7xq32pT8JyLK7sHOj+jeeXhd04gAk79Gn J9vIJ5vFcoXQGJYRMcqHFOufkx4Y+TTyub37qCyblOwRtCy/k6A+Vvief EqBBV1aMBum5wt2AsP8Scok9XHiQNNf9xdGnB5bBHACJudcsfiTL2mwui m+LiyVDWml3NyuwU1H2d8oinbyo0EQCY77NMO1HsK0v5faWrcop2EWGiP ZAnpymuoka3hV/+0GpzuxZMwN7+MS2p3iLJ37eUmj/qkG3jL0HpEuzM10 KosgzzbsCSwvNUlQQeNpUaBrslP1V19WO360W7rgjMDceWHYt6aVDfvvM A==; X-IronPort-AV: E=Sophos;i="6.08,201,1712613600"; d="scan'208";a="13581113" X-MGA-submission: =?us-ascii?q?MDEmsCtzrkQ3an1DIC4XTmJRGd2v9fmMbMkrAm?= =?us-ascii?q?u7zCjTwJvzQOFKqKw0Wa6croVj5nujNjkqSpzkKRvD93hvknunVtas7+?= =?us-ascii?q?zhSyJMr5GVs4Kzk4C/lUYVMu+fDA8UzIn3LSiM1g8mqjPh8EF76z2AaA?= =?us-ascii?q?z81o+hfLyFZIUHVnZC9wvcTw=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YX5Lbg5jQavsx0vGtIwvNSvbLY09T5ec0oezCG5qGhdGPWfEAuDx7hhT6KHhT1zTdPt9yZzgywhmVbmXm6kmc7vax3fvUCQjC6akoPiPRebwOjqC+E50kUbFBxVqtso/lp/38llnPYirNYxhMHdLYGHnoLWifl3E15P1ho8KnEDQDLFZyf3j1N993+IG2LFZ8Tizc0ekOY569uAiVBRsPt8syzOa//0nuROCCqbaTUVLEWugob54xtl3ufROu6A/X7Jlqn/ZDfTbB7xxRp/Byh6xqdBijMhqOWQO1olZem7ig5D8ybaivqmgCQQ9o0rHlbCTPLM+jOmpPsCptGMmqw== 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=tCBCyA3QC3xUDKpKmhu7uFqyaQRiN7sbA9LPX/ickcQ=; b=MKouLe79O9V83CjdxMRQpaG0zIgkko8wYsFtP9pjdtl0EkrcdWFp1rj6Vy/8dgy8S7/hm85rnpt98kdRRQcw5ZOlhOiQBucshA5CJTzaY0sNDeNIYCVDRhjq6yapOX/20WfZDQcPKf0ncwCNGWB0GfX4IwQ3WyQkCWH3AhOR2AhYACPhpP5Tq80Spn0TDr6JAgVfOpcFPr5a1/YxIFk52FdXX2VFjefJ5nC/asP3XPwzXyFDS1dmVt+as3JgSk+N3uAF4YmWAOFJS2WkBiIvp2TYdvsC1+nL4A2qVwzdQAFAj8zWuLE75/n5HBggvujGpkOUeqoA9t5KwizTBE4W/w== 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 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" , CLEMENT MATHIEU--DRIF Subject: [PATCH v1 2/8] pcie: helper functions to check to check if PRI is enabled Thread-Topic: [PATCH v1 2/8] pcie: helper functions to check to check if PRI is enabled Thread-Index: AQHasoxkPVm+Hva2J0qbK0L/RbRYyg== Date: Thu, 30 May 2024 12:25:00 +0000 Message-ID: <20240530122439.42888-3-clement.mathieu--drif@eviden.com> References: <20240530122439.42888-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240530122439.42888-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_|AS8PR07MB8069:EE_ x-ms-office365-filtering-correlation-id: f6d05f19-6b2e-4424-14bf-08dc80a386cf x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|376005|1800799015|366007|38070700009; x-microsoft-antispam-message-info: =?utf-8?B?T293ZUJGV0V2cURCOWcxSnZkNWxvR2RyQ0E3LzFZRklxeVNEeW5RWFRzWk5J?= =?utf-8?B?dlFPY2RjRGhDSUZEUGdXaE9mTHNpNFNrMnBUNUNoL01OVUd3cFMvSTA0NWpZ?= =?utf-8?B?c21oRU5SZ1VobnBkZmtGMFBaeityenhrVUQvZGxCZ0xOVE9GWkNQaGJOZkNm?= =?utf-8?B?amJRdDgxOEd3SnFNM29xKzFUempvclluckovY0h5aWlsR2dGanlHOXdZSnV5?= =?utf-8?B?YzhOYm1aQ2FhUS9PQVAyb3VFRkZxOGE2dW55cUhKY2syWUorYnBydHh5dEkz?= =?utf-8?B?Z1MxMUtWL1ZEK2hmZ1U1bU5kcEhWL3BXMnFGYmZvR2Y2ZVpvVXVlUWpFeWRi?= =?utf-8?B?Z0RCb24zb01kV0M0SW1UWEhYcjFiZ3lyMGdLRnBqNXhXUjlRcFRsOThaVVVx?= =?utf-8?B?cmZvRDN6ZGpJOHpWWlNqbHV3OGxvaWw3Z0VpSjF5VzJKTGwrTzY0UVkyY0Jx?= =?utf-8?B?OUJKa0F3RGk3UERGY2t1dlJPOEt4bjNQWmdISDJtVk1RL1JTMml4SlppWlB4?= =?utf-8?B?TkhvVWF5UXlPTUl0YlVSSmMyQm12OGpRcDgwRDlGQVR2V1RTdjZka2dHSStO?= =?utf-8?B?cytFR1J3NXVOSlVDazZWNGdFZVpYZS9VTjFzZU9EM3NJc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SnlUektreU1WVnorZjM0QWhQRXpt?= =?utf-8?B?cm9NTS9RVWcxOFRhb1YyY21jOWQ2akZ3Q241Y0RXbGEwUFFMNHRCaTdHelRZ?= =?utf-8?B?Y1lvZEVXajNXc0dZRUZPdXd4MThINzJacmdocjB0RS9sdVpHcGxnRUtHVG84?= =?utf-8?B?WEtjL2d2RkN3bzFnQmlNTlBmVGcveVVJS2JUblQyN0ZUNGx1c1ZpZEVrZXZM?= =?utf-8?B?dzFWeVVYSUxLVlpUa0VscUtOVDJHQWxDeGt6eGZqMjYrS1JZS3A2azBkaFFj?= =?utf-8?B?U3JoMjJRU0t5eFFGTnU3UT09?= 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)(1800799015)(366007)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?TWVWMXVxN1dlbnNubW9LbTVJQWR6bU5tdEU1RTBsZ3VtODJNZis2OHdrbzhN?= =?utf-8?B?RHVwbVZWSWRuVUYveUk5RnhyZUVnNEQvdGhlSWpDNzJNY3J4UUsyYWhGVDdD?= =?utf-8?B?Tm43QUt6eFdpYTFmU3RNUnAwb2s0b0dNc1VySW10OHZrVndUbUdGcjFXR084?= =?utf-8?B?aklBdlFxeGNncVVLVG9OQnE3aERsRENINTVneWt4Nm10QS9sTVZSZ0FtV2Vv?= =?utf-8?B?ZkJEZ3VVWm9nL2Evc3NaMXVYU3dVbVQxckYxTWFQcE01b29zK1RiSDBEeisr?= =?utf-8?B?c2xpYnVmMmNYTjk2KzN6SkEvMGpuUkhqNGVWaG5JaDRkZEhmR2ZURWdBZWll?= =?utf-8?B?cWE5K0xHYlJYejR4RXB4Znp1dnNqb0xsbEhndVJCVXZVb2UrREdJOVVBakZX?= =?utf-8?B?Wk1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f-8" Content-ID: <35438FC9CF2B344E9BD802F41DF4AC96@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: f6d05f19-6b2e-4424-14bf-08dc80a386cf X-MS-Exchange-CrossTenant-originalarrivaltime: 30 May 2024 12:25:00.9136 (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: WNhv5rNTny6DvUouGbTvPczPnbH964czV+yfGLwMqtb8t9xEeilxM/hqUcrK/fgGgrzXb87lH3MWvj/GJarOGywzYj4Y/6FqFa1zctqCLX7D2ry0JcsLp9HbQEC4VX4Q X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB8069 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: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: 1717071963992100003 pri_enabled can be used to check whether the capability is present and enabled on a PCIe device 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 053bca6949..3fb6588c31 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -1227,6 +1227,15 @@ void pcie_pri_init(PCIDevice *dev, uint16_t offset, = uint32_t outstanding_pr_cap, dev->exp.pri_cap =3D offset; } =20 +bool pcie_pri_enabled(const PCIDevice *dev) +{ + if (!pci_is_express(dev) || !dev->exp.pri_cap) { + return false; + } + return (pci_get_word(dev->config + dev->exp.pri_cap + PCI_PRI_CTRL) & + PCI_PRI_CTRL_ENABLE) !=3D 0; +} + bool pcie_pasid_enabled(const PCIDevice *dev) { if (!pci_is_express(dev) || !dev->exp.pasid_cap) { diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h index 198d6da817..b976fd739a 100644 --- a/include/hw/pci/pcie.h +++ b/include/hw/pci/pcie.h @@ -158,6 +158,7 @@ void pcie_pasid_init(PCIDevice *dev, uint16_t offset, u= int8_t pasid_width, void pcie_pri_init(PCIDevice *dev, uint16_t offset, uint32_t outstanding_p= r_cap, bool prg_response_pasid_req); =20 +bool pcie_pri_enabled(const PCIDevice *dev); bool pcie_pasid_enabled(const PCIDevice *dev); bool pcie_ats_enabled(const PCIDevice *dev); #endif /* QEMU_PCIE_H */ --=20 2.45.1