From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5D58E4233C; Mon, 9 Oct 2023 16:06:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA48E402E1; Mon, 9 Oct 2023 16:06:06 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2068.outbound.protection.outlook.com [40.107.93.68]) by mails.dpdk.org (Postfix) with ESMTP id A686D4026B for ; Mon, 9 Oct 2023 16:06:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JpKUs4ItnGQACByj2PMVBXpp4+DFQklRNlUVCYtOG8XGuZ4Mgw68GhmROTBbuiKd1O7PyWWKNz4rw+FK9qas+LQRoMrqdeBD8+8DGXM+IS3JMKnLKGYlf4I4jJDFrK0a1er+UnkubdaKH3ISI/nXnvDe6Bl0nD8l6ab+mAvkk23U6CJZT93V3W5Bn0BfvCpVd1oFAWtLLfSfaoOPcAloDU9q07QMzOkjazsfpIYUQ3/AchL4o8DFmqWr4TgE1HB9xY0Zaz7HV1z/rPhbgMGWIIj6DyfhgiMc7vPOuJ6V+TqmpPsjN9mCUMz7vaZ/3uOrjYloItO957dA955UJxp3bg== 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=6w4ZtzPxAwU9B0b2hnrcxo41wHkxa3zqBxiEVp5niDI=; b=IwrS9sxbfZTUUqGoGNfFMWdHi/GtY5RSH8zMJBwzlyEC6K31boPWHjQqi0dM6dZyEu4s9USoMjgtXKH85Ihe/6uiFlO4I2/00Q7JQPYrbX9mAJr0Plc1Iz+fiQZ9WKTWHHJFYPBimYKRrYC7UM+GEJCk5UOpHyLE5e3RqcV+2Omhs3P91AfQ7mg6e15s/QaOPjA+w0alUEOL4v8G+rdVj2DIfIKBB/HbhpmVeds+ALhxhYGg4rKnNMhwQ08+Up6H3qIPmEqJmZXBl8/GqqyIKq1r4kg/+LX8M9w0w1I03ub60pNFTFV9mRB+Zy8yiT9S2f+IwKAkeiICVBLd6Rkcng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6w4ZtzPxAwU9B0b2hnrcxo41wHkxa3zqBxiEVp5niDI=; b=Fxj8RUSur5Pf+kxxwWeSnvH/h+cV/BtWAJbfTrLXzQ4p29v72rjTPG+xaGcyWoa+iedge82Z1sT5Uif7w/2NsPf0TnjppbMNFb9nC2dsKZY/qWbpcgNa4xhoyQzig/SuBSHp84nhhWqtRK6qBX0+qslqzIaFDAe4l544HqND8mU= Received: from DM5PR08CA0035.namprd08.prod.outlook.com (2603:10b6:4:60::24) by SJ0PR12MB7006.namprd12.prod.outlook.com (2603:10b6:a03:486::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.24; Mon, 9 Oct 2023 14:06:03 +0000 Received: from DS2PEPF00003445.namprd04.prod.outlook.com (2603:10b6:4:60:cafe::27) by DM5PR08CA0035.outlook.office365.com (2603:10b6:4:60::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.37 via Frontend Transport; Mon, 9 Oct 2023 14:06:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS2PEPF00003445.mail.protection.outlook.com (10.167.17.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.14 via Frontend Transport; Mon, 9 Oct 2023 14:06:02 +0000 Received: from telco-siena.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 9 Oct 2023 09:06:01 -0500 From: Sivaprasad Tummala To: CC: , , , , , , Subject: [PATCH v6 1/3] eal: add x86 cpuid support for monitorx Date: Mon, 9 Oct 2023 07:05:44 -0700 Message-ID: <20231009140546.862553-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230816185959.1331336-3-sivaprasad.tummala@amd.com> References: <20230816185959.1331336-3-sivaprasad.tummala@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003445:EE_|SJ0PR12MB7006:EE_ X-MS-Office365-Filtering-Correlation-Id: 550a6460-7319-406b-f268-08dbc8d0df5a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CoqMsldUsTuGXpSj6gJPEfVc1aUlvrNIfapG/ZEU3cDZbnS2dBcQh6MenjUBLGNPul0CTewddAYSdId5eR3iHlhlxrqp/zdk9a+r1BPSq7JXzlK+0Furu8ugqFVEeHfLYdaXIosveS5Fl5uBfdaSmoo/MTKkyqlaFR9lVpup04Lve5IvFXjA+cF+mqAGDz6Ynf2hKsGihOUPGLWbhODqlTlwGxDI45mkd4ibp5j8QUzW3KksIso6LnxPih81D0x0kUA0BN0TRFjYrZ3ZItUe2HKZJqdmVSkRyxkeGznM2dAmc4aDRISQx9fmtllYQ1G8oVvg2bW6o1cWiMncndsG2RKKrLcrDpTj/ndk0t6lOOc5BIa/r6QJ+3retMx0T+jIwwQ8PrgGx34BtB43W44FnuPuqY5otFppYTInxiXybhko9mpDknd8DD3vxPtDKt6RmvNzqZG4TTRSPaAPKgbZAL8v0fqW257gTNjQupe67KAMhxfe/dwtZVGGbj9YOjYqnLk1O4s5Teld7EqQwR4dxPFx23gczKaOm3GbqqCvuzu6V1VRwSNTFCERMzEbUvabseQqhhtYAqrLW5wtFiSh7ukLVhS68k5yyfgmzicEYbtvV2ZaU0+QXiHxCysxY2GXaJP+UazswHtTylhyKMwCk3HDMLHeeviW3xoV0bHFib2nVJLdBdTNX+IC0Ghb8Gy6RzVD5/1cJ9maesDDFyBKjoTQJwc4dZac05OUlncmyPiQtpy/63HaT7eLlj/uSaKxpvDA5tvItnWLrlTrSOmquw== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(396003)(39860400002)(376002)(136003)(346002)(230922051799003)(186009)(1800799009)(82310400011)(451199024)(64100799003)(46966006)(36840700001)(40470700004)(40480700001)(40460700003)(16526019)(2616005)(336012)(1076003)(426003)(54906003)(26005)(47076005)(70206006)(36860700001)(316002)(70586007)(6916009)(8936002)(8676002)(5660300002)(4326008)(41300700001)(44832011)(6666004)(7696005)(2906002)(82740400003)(478600001)(36756003)(356005)(81166007)(86362001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2023 14:06:02.8308 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 550a6460-7319-406b-f268-08dbc8d0df5a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS2PEPF00003445.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB7006 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add a new CPUID flag to indicate support for monitorx instruction on AMD EPYC processors. Signed-off-by: Sivaprasad Tummala Acked-by: Anatoly Burakov --- lib/eal/x86/include/rte_cpuflags.h | 1 + lib/eal/x86/rte_cpuflags.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/eal/x86/include/rte_cpuflags.h b/lib/eal/x86/include/rte_cpuflags.h index d95bf33a16..1ee00e70fe 100644 --- a/lib/eal/x86/include/rte_cpuflags.h +++ b/lib/eal/x86/include/rte_cpuflags.h @@ -133,6 +133,7 @@ enum rte_cpu_flag_t { RTE_CPUFLAG_AVX512VP2INTERSECT, /**< AVX512 Two Register Intersection */ RTE_CPUFLAG_WAITPKG, /**< UMONITOR/UMWAIT/TPAUSE */ + RTE_CPUFLAG_MONITORX, /**< MONITORX */ }; #include "generic/rte_cpuflags.h" diff --git a/lib/eal/x86/rte_cpuflags.c b/lib/eal/x86/rte_cpuflags.c index 3fb1cb9bab..26163ab746 100644 --- a/lib/eal/x86/rte_cpuflags.c +++ b/lib/eal/x86/rte_cpuflags.c @@ -133,6 +133,7 @@ const struct feature_entry rte_cpu_feature_table[] = { FEAT_DEF(LAHF_SAHF, 0x80000001, 0, RTE_REG_ECX, 0) FEAT_DEF(LZCNT, 0x80000001, 0, RTE_REG_ECX, 4) + FEAT_DEF(MONITORX, 0x80000001, 0, RTE_REG_ECX, 29) FEAT_DEF(SYSCALL, 0x80000001, 0, RTE_REG_EDX, 11) FEAT_DEF(XD, 0x80000001, 0, RTE_REG_EDX, 20) @@ -195,5 +196,7 @@ rte_cpu_get_intrinsics_support(struct rte_cpu_intrinsics *intrinsics) intrinsics->power_pause = 1; if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_RTM)) intrinsics->power_monitor_multi = 1; + } else if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_MONITORX)) { + intrinsics->power_monitor = 1; } } -- 2.34.1