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 AD6D943085; Wed, 16 Aug 2023 21:00:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3ACBC40693; Wed, 16 Aug 2023 21:00:19 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2084.outbound.protection.outlook.com [40.107.93.84]) by mails.dpdk.org (Postfix) with ESMTP id C78424003C for ; Wed, 16 Aug 2023 21:00:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UQrCLmxfMKj7Q1FeXEwVmXD3LN5vyPjUaUBWnZ1iu+sHWP/Z92EET2aF5bp8tr8BU9LMPQ0RLL4RdzRTEoh2LN1RmjB1A5Hjo0DmAo1ZB0o7QUUqnjVCnimFj4DnU672Erlsjy7VzV4JM2ay8unvgHqtRPz/KnSfEbEf+7ZtoqzfHaffktEC31H8Wea1lWWEvYyCA3tQ2+928Znzpmhh3OtmIDnurPK0pqc+/TfUA6dnCX7y9m2gxNk2LYFclyczYjKiyChbphttc5LoF78Hu6RiZ9C0oCsDtQ5xjlNrdF9+BGz4go69jnj6DTaRY/umHxG/UCYs2D5R25DfL9U2Ag== 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=ncYMi/sgn9ilX6etOtHBdp1m9JaTBU/QtwUezntBpM8=; b=NPUjmytU5Hh6+R/xRFXxRZ9GLtbXT0wQHGp2lnk7PZ43k4snU+n4rdTfUdbbFvtm/zcPpXomSZ+taQZngB+jSYuUNssR86LGbWI5KjmGu/Wuu8a1uxx4vBY92cVbinHzDbSwXwoYpBM+XjKN9snlCpySDbjmleSjMWJKvHUVfXYZGXlvis7OWqHc8F5nk6oTVNkO7LUes54lVrF9PV0H17+PnC67Znmz+lv5G1RcDTEplwOggeP0fWVWACSxQKl/8UyNu4qi/yI8xvUHc2g/3R8LFcRVac/y+Znyjypz4wlchugo0nw+ByzfAdzOp26+zOqBEydHf0efLKgElnB8vw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.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=ncYMi/sgn9ilX6etOtHBdp1m9JaTBU/QtwUezntBpM8=; b=IknxryhF9zhVw7/LvGiPRnAK08f6vVHhC4iMXu2wCBj8qahWW22KRDKKR+sc+JSb1WZj0VLfMai7u1/ysO3jez6vl9qCldOX/qUhKGip3lh62rRKFCCthbJK2tVgG+aQP24BMw4iZx6Nv9TtGBEdYyXSdOjcjAMoVJe4ck9pua4= Received: from PH0P220CA0004.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:d3::22) by SJ0PR12MB7460.namprd12.prod.outlook.com (2603:10b6:a03:48d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.26; Wed, 16 Aug 2023 19:00:15 +0000 Received: from SN1PEPF000252A2.namprd05.prod.outlook.com (2603:10b6:510:d3:cafe::65) by PH0P220CA0004.outlook.office365.com (2603:10b6:510:d3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.33 via Frontend Transport; Wed, 16 Aug 2023 19:00:15 +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 SN1PEPF000252A2.mail.protection.outlook.com (10.167.242.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6699.15 via Frontend Transport; Wed, 16 Aug 2023 19:00:15 +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; Wed, 16 Aug 2023 14:00:13 -0500 From: Sivaprasad Tummala To: , , , , CC: Subject: [PATCH v5 1/3] eal: add x86 cpuid support for monitorx Date: Wed, 16 Aug 2023 11:59:57 -0700 Message-ID: <20230816185959.1331336-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230418082529.544777-2-sivaprasad.tummala@amd.com> References: <20230418082529.544777-2-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: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF000252A2:EE_|SJ0PR12MB7460:EE_ X-MS-Office365-Filtering-Correlation-Id: d58b88bf-161b-4176-f912-08db9e8b06e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nwUWszdJ5XrTveIq2wV6iTzOvalYGMcfTa7EkP3RrKHwpWBj0mwie1CNdL6+ROwiogFYqyAzY/OPPcrd7X+mE3oHMskmW1tElhSXDnCqx69j7LTlgDNBQZ7np3aeSMwz4ZtImRnosxFkqdLiB/+/mpXZnZhvWycFfEIS2jriZzEL95kjl0lOhJQq9wnRB/GBAdWoD7SC0GHmLWolaLIS87CvMTdLvCBMbly9eVJe6sKKNs1Vehfl6NQQQvsd3AFKAeTJsUdoosxvKxjMTyBGtUoB4ct3kw6ekvygQJ51gHkAe39031tHclWeIG49U9D/ImIlX/lskCvmabVx0jX4/zJek/5HZVCfJnR3+dEUMha5UqqXDZNzWnYth5ofqY2YJJs/8Lw2xyqzsfqJZk6M6QOVEh2UVZgoOZNHHzCRdVC0LEFq44D9h8JOIE2m85f4BpX6tWSYQXsz2pnBLqOoOu0dKK0Xn+cjnoCNoxii+js1uZfmtzJLMT9cJAraE/yMYLI8nvBxhh/m6nVh2wLFiPV3X6T6pGd/Q+bDCuMUl1szZycN+30whwpEocqsWn+BKBhGeKLpEfi+VhXssOQZP2OQkwbZvRKQOyGzfQ2CG6V2gqp3L7w60Pm7Ayt3U2gnDKc3CeHRA1yZEr7zt6f1ylz1zfofsItf0ajRNScawMRiZ2X42j721KMLxx4MbgCLY8F5srLc9P2Q07U2cKFMkJQCWYZy9Gn9umgdXxzx/gvMqeX7JcEezvvMopJtoH53zKk3t4U3OyHMWrDs2Ia4qQ== 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)(136003)(396003)(346002)(39860400002)(376002)(1800799009)(451199024)(82310400011)(186009)(40470700004)(36840700001)(46966006)(2906002)(40460700003)(83380400001)(86362001)(40480700001)(478600001)(426003)(336012)(36756003)(7696005)(2616005)(6666004)(1076003)(26005)(16526019)(44832011)(5660300002)(36860700001)(41300700001)(356005)(82740400003)(316002)(81166007)(70206006)(70586007)(110136005)(8676002)(8936002)(4326008)(47076005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2023 19:00:15.5940 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d58b88bf-161b-4176-f912-08db9e8b06e7 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: SN1PEPF000252A2.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB7460 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 --- Depends-on: series-29173 ("test/cpuflags: removed test for NUMFLAGS") --- lib/eal/x86/include/rte_cpuflags.h | 2 +- lib/eal/x86/rte_cpuflags.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/eal/x86/include/rte_cpuflags.h b/lib/eal/x86/include/rte_cpuflags.h index 7fc6117243..402281f2b1 100644 --- a/lib/eal/x86/include/rte_cpuflags.h +++ b/lib/eal/x86/include/rte_cpuflags.h @@ -133,7 +133,7 @@ enum rte_cpu_flag_t { RTE_CPUFLAG_AVX512VP2INTERSECT, /**< AVX512 Two Register Intersection */ RTE_CPUFLAG_WAITPKG, /**< UMONITOR/UMWAIT/TPAUSE */ - + RTE_CPUFLAG_MONITORX, /**< MONITORX */ /* The last item */ }; diff --git a/lib/eal/x86/rte_cpuflags.c b/lib/eal/x86/rte_cpuflags.c index 22061cb6d3..063dc7a624 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) @@ -194,5 +195,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