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 C297D42967; Mon, 17 Apr 2023 06:33:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B2E6D40DFB; Mon, 17 Apr 2023 06:33:06 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2065.outbound.protection.outlook.com [40.107.100.65]) by mails.dpdk.org (Postfix) with ESMTP id 38B0740698 for ; Mon, 17 Apr 2023 06:33:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ULsOTqsMvoFFUjc3x9bcFKSDtBX+wprFjzlUUFTeoCbZlNEda1VhO4iZ03QaUyOBROghg5G+kXxcZHTkBmHKygTXK3XCjF0nqYHtx0F7mVnOE7IR1KC6bztfj1On3MoP+pQkFDwHjAYUdaIfcou8KsGghaj50ESpn+pytYAZXq9ut4atlu0LPBe186cVsCTYZ2AS6fvigQT2gB59olC3a6SU/nRRTKIsP47yjrEe6EJRWaXjqoE4z+YZK4CMMSyLNVE7TxFvK7dri+MGBeYTmURRv7UpPKipVmMpOGAl47bV8cXhZxT/RGiU1imz66vhfapxrXJ/tBdhrAH2/qurxg== 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=DmsDhuU99Dg1CaEhMe2C9LrNPROBdfWYRCv5XVjQG3M=; b=HNCcO1WEaINZQJeiOYXl1JB3+hgP+TmMa2oACpeEy2R4VKr4cfRxoXLvXygQ9wGhfg2L9urxUYsfoio2Be3c7RFVlIp6EBpc8ey7OiPtPeLzc1RHmmA/hjII4YhP54JwLxxCFHmxhO+hJqBQEH7R+VNJBthq3h+WLqnCQ8eDCwx/a4DFC05GEcnTAE4UEwnKW52xtmKGSII24g9j+G8UkTNXaDeKWkhaE0Qhao+EivyCQZgXqZxXP2FzciS7bX1yme2VS3INZ5bmumIVssSaRljGTHwQP2E2mpOWQkxdr+FI7UcedUBEZ2wuKfR5GNhJJA0fnZd5Y/nY3lmi0v5dfg== 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=DmsDhuU99Dg1CaEhMe2C9LrNPROBdfWYRCv5XVjQG3M=; b=T+3hHKrp0hu25+LEebkw4VBZjt7s/9fh0fPVptm6w5evyy8R/rnYBOxbCnEUwpj68Dkf8o1lKx36RPprqh6BA1dqg+mH3ZJn65vkQnzCmVemCPtNhjDZ0GZGTBMu4+BZZJwiGLF7ZyTypn2uhlps29mG4JuMOppwkQLImZLbCkA= Received: from DM5PR07CA0111.namprd07.prod.outlook.com (2603:10b6:4:ae::40) by CY5PR12MB6250.namprd12.prod.outlook.com (2603:10b6:930:22::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30; Mon, 17 Apr 2023 04:33:03 +0000 Received: from DM6NAM11FT028.eop-nam11.prod.protection.outlook.com (2603:10b6:4:ae:cafe::a3) by DM5PR07CA0111.outlook.office365.com (2603:10b6:4:ae::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.46 via Frontend Transport; Mon, 17 Apr 2023 04:33:02 +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 DM6NAM11FT028.mail.protection.outlook.com (10.13.173.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6319.19 via Frontend Transport; Mon, 17 Apr 2023 04:33: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.2375.34; Sun, 16 Apr 2023 23:33:01 -0500 From: Sivaprasad Tummala To: CC: Subject: [PATCH v3 2/4] eal: add x86 cpuid support for monitorx Date: Sun, 16 Apr 2023 21:32:26 -0700 Message-ID: <20230417043226.470131-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230413115334.43172-1-sivaprasad.tummala@amd.com> References: <20230413115334.43172-1-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: DM6NAM11FT028:EE_|CY5PR12MB6250:EE_ X-MS-Office365-Filtering-Correlation-Id: 357dc2dc-bfcd-4b2d-09e3-08db3efcd4ea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mn2seQbIxLLaJ/+X1Fv8vrtNOQvRD3rYt0evCi6aBSPHa6kaZG4puNQ2ERirPffK/CvVWLNTth5BK6Vi5lg1pi+pzAbqIjTHtcuRBP98RGV5PrOcvDXG+DbSht3KPUekgRAqJESeNmS/KLkDZMXn93Y0kaeweNmn0FFGAu5uznKZbbY6GGO66MdunHcryryAlOTYTPpkj+G34h1PIGYMUAfW2mRnPxi51jN3cVZDgud+bgPFd+npkc9I2Ku5ijMPZ7pE8umh0A50qBGtrzWF+ymsAxkedBsi5tP3qHYSXCZEBC14d5cvVEuZzMmEX3BcWYAW7cw2ZzNFPCvJV9qiNBu8UhmLJu620cP/60OCw60zl5Dm8sjzn9XlTpft4nZ1rbfceLAuQT37ZMwHFrqC0VyxXtAvDWMc6JqYb9xuZshEjK16oRPJZEYoXgQ/C5X/DDFZGS3V75TWfA9x7mdmWE2sztYo6mp4bYFc8d0Wr1gGRaKTJ4s6k7NAyv49s5THRmMcsg3pXJIwZaDdW9k9i6mhdEJTUTvVBOr4eu4HVJjlL04FI/hanlW+DfFbJ8syRML6kwtTHxbcSo7m7Xd+ElJmCo2dDqbtmm9e8FdwESb1GpHOwbZNZnggVHvqsLB3+hNH5lx9JsdsMCD7O/S+bk5lAa6UOrNdw0YqjjugB6MvSofAW9MtJPqli6e9xaF6ysy7PRGeNN857yohqTw/TuWBvjoCYgw6MzJ9KhGSNZk= 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:(13230028)(4636009)(346002)(396003)(39860400002)(136003)(376002)(451199021)(40470700004)(36840700001)(46966006)(336012)(426003)(26005)(1076003)(70586007)(70206006)(36756003)(40480700001)(2906002)(6666004)(82310400005)(47076005)(7696005)(2616005)(186003)(16526019)(36860700001)(82740400003)(6916009)(4326008)(40460700003)(86362001)(44832011)(5660300002)(8676002)(8936002)(356005)(81166007)(478600001)(316002)(41300700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2023 04:33:02.7064 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 357dc2dc-bfcd-4b2d-09e3-08db3efcd4ea 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: DM6NAM11FT028.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6250 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 --- 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 92e90fb6e0..d3e608533a 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 */ /* The last item */ RTE_CPUFLAG_NUMFLAGS, /**< This should always be the last! */ diff --git a/lib/eal/x86/rte_cpuflags.c b/lib/eal/x86/rte_cpuflags.c index d6b518251b..22f3bed412 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) @@ -191,5 +192,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