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 66A704297B; Tue, 18 Apr 2023 10:26:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C23A42B8E; Tue, 18 Apr 2023 10:26:00 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2075.outbound.protection.outlook.com [40.107.237.75]) by mails.dpdk.org (Postfix) with ESMTP id 049D040698 for ; Tue, 18 Apr 2023 10:25:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PX5TY3ebbt6WVBqxz/fJIeKSTAFttXevZvKNwm2sYGQtjcvttTuTXb1DVfT0vXNJya1kGDY+BFy590JuR72wiZtXj9z3Z5o6n/NL7OVxhbyY5krU0FJw6CtKSajqFer79CJ2CJFt4Jl+O77yfWaLTdSejY5NYi9SgcxSm6nqU1Xlp2j3R61Lj99nc3fSPhcRfIYLffwPsR14bzU50PeMt3wif+zgs4OLUvy4ItdUo56Vw1g2eTCVTDmzOZeIbAbcrOEzQdzkAaAiybZpCnv4gv3UlZzKQ0F3M9/GCIKJjIA1v5uiJ3tcksGX9KJlZH6UYVqdw2xVM+BGLcJAoh28bw== 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=gLacJMu9thxlgh5qQ4cBQ5pxjQvYwlU3K6FiH7xTVqiBEeOpLtShHRZZSTdPahboXSV4nXvTYEWBTBVBg42196s54Jo59ZmzYgyGuqhckD4IJvyofCUo+5X6+Hv/EWMO0Ghh/sI3tg8WjWmC5+7xxW2JybzFJ+AGSP+qU6SHxjb7kR1dDJQ6KKY/I20tV4d1aQJhZRXi+/Btqkh06uBRJDQ9G9jPyUqEfOCYjzh+eSW9rWsloKW8gVLLWyzBdSB8HZSyYxqCIyljb+SIOfVA0uYK4ucojBg4UjyASGhgkvbhmkD6reOFycRkcmxHQLyKWft85ge5nG0rQifD4oHoYg== 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=KL7Qj6kz/eJV/8Gxu5kt5WqsrQajHemveG6gg2v1GXj6BCdGy3Q6XzSxyjmxPku3rKzabMEhfnVDEkCYIGTWediytzR2M2WtSPyuOo2BinlUZR2XFmqq89lLcsaS8yVv/Um94PR3BGinXM7HW05+D9xD1HKBvJ60r5hIYyDq+3A= Received: from BN9PR03CA0277.namprd03.prod.outlook.com (2603:10b6:408:f5::12) by SJ1PR12MB6194.namprd12.prod.outlook.com (2603:10b6:a03:458::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Tue, 18 Apr 2023 08:25:56 +0000 Received: from BN8NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f5:cafe::7d) by BN9PR03CA0277.outlook.office365.com (2603:10b6:408:f5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.47 via Frontend Transport; Tue, 18 Apr 2023 08:25:55 +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 BN8NAM11FT053.mail.protection.outlook.com (10.13.177.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6319.20 via Frontend Transport; Tue, 18 Apr 2023 08:25:55 +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; Tue, 18 Apr 2023 03:25:52 -0500 From: Sivaprasad Tummala To: CC: , , Subject: [PATCH v4 2/4] eal: add x86 cpuid support for monitorx Date: Tue, 18 Apr 2023 01:25:27 -0700 Message-ID: <20230418082529.544777-3-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230418082529.544777-1-sivaprasad.tummala@amd.com> References: <20230417043136.470110-1-sivaprasad.tummala@amd.com> <20230418082529.544777-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: BN8NAM11FT053:EE_|SJ1PR12MB6194:EE_ X-MS-Office365-Filtering-Correlation-Id: 7ccb06bb-d723-4053-1973-08db3fe687ce X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CODmPn3voxXCLrvzog1kLTLBUMCxfzUpO6+dVU0qPk8Kyewkqkjl+bijldCZ/EGFmoOYun7P64XAjiXhf5zlWbi/+OALYhQGPCoIdcoWoxAzRZjQ4JsHLCHDx3wXPm/s8EbDzusOqiM8yk90g77WCaQf5KEeokJ7WMM9gDiBLb4BmrI1LGkF5QEv8uYYf59s5cg7akQR7a/tcShgJ5EFw00oudfFpECjSgwBSC9RZlm/Ycna4POcRl7pXYo5Y4Zv03zPuhs/fXD2naiO5QElRLjNoWJwZWcQVsYuemMiEGULn0eDy87OBtgxjGE4722d8On+GxcTbO61SP4tNmowsuFWhCouCxUmbTG263OsizHfhmF5D9ZoqAfILhP7JSYQpScTqJ5n8GouphYIjjbu5vWsHW89LlKPO+hl0pUlpYYnvTJQ5JfItjpFmColUOMDeakgPFc8Wc/ZPSYyF+0vDrQ5eWANU5mQ4ytSh/Hj1/I4tzH8QuZmLmt8KEzL6UnFplcTnTPzuBCTmRY/pCkRU3z0IaJpdxaaGclzZ08mpv3OA3bv8b2RgDBBmRYHINC6xI+OKoo/z3G6G3ftEsoQpS3N1c+776xhR/Bx0SLeavc0NyZmDlnMEflBoNTga/AEAJsV4GkB2KFHgJqOyTWfSRZjApJcLcf2CQmRJ+LTxLcawRCukPbETTkdy4m9ftflwgHMLX/wlsi3kOp0UevZ8fgzXC4Q2MAmTDAvY+8PBno= 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)(396003)(39860400002)(376002)(346002)(136003)(451199021)(40470700004)(36840700001)(46966006)(356005)(81166007)(2906002)(82740400003)(40480700001)(40460700003)(478600001)(7696005)(6666004)(2616005)(47076005)(36860700001)(1076003)(26005)(426003)(336012)(86362001)(16526019)(186003)(36756003)(41300700001)(44832011)(316002)(5660300002)(8676002)(8936002)(82310400005)(54906003)(6916009)(4326008)(70206006)(70586007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2023 08:25:55.6047 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7ccb06bb-d723-4053-1973-08db3fe687ce 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: BN8NAM11FT053.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6194 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