DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
To: <david.hunt@intel.com>
Cc: <dev@dpdk.org>, <david.marchand@redhat.com>, <ferruh.yigit@amd.com>
Subject: [PATCH v4 2/4] eal: add x86 cpuid support for monitorx
Date: Tue, 18 Apr 2023 01:25:27 -0700	[thread overview]
Message-ID: <20230418082529.544777-3-sivaprasad.tummala@amd.com> (raw)
In-Reply-To: <20230418082529.544777-1-sivaprasad.tummala@amd.com>

Add a new CPUID flag to indicate support for monitorx instruction
on AMD EPYC processors.

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
---
 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


  parent reply	other threads:[~2023-04-18  8:26 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 11:53 [PATCH v2 1/3] " Sivaprasad Tummala
2023-04-13 11:53 ` [PATCH v2 2/3] doc: announce new cpu flag added to rte_cpu_flag_t Sivaprasad Tummala
2023-04-17  4:31   ` [PATCH v3 1/4] " Sivaprasad Tummala
2023-04-18  8:14     ` [PATCH v4 0/4] power: monitor support for AMD EPYC processors Sivaprasad Tummala
2023-04-18  8:25     ` Sivaprasad Tummala
2023-04-18  8:25       ` [PATCH v4 1/4] doc: announce new cpu flag added to rte_cpu_flag_t Sivaprasad Tummala
2023-04-18  8:52         ` Ferruh Yigit
2023-04-18  9:22           ` Bruce Richardson
2023-06-01  9:23             ` David Marchand
2023-07-05 11:32         ` Konstantin Ananyev
2023-08-16 18:59         ` [PATCH v5 1/3] eal: add x86 cpuid support for monitorx Sivaprasad Tummala
2023-08-16 18:59           ` [PATCH v5 2/3] eal: removed unnecessary checks in x86 power monitor APIs Sivaprasad Tummala
2023-08-16 18:59           ` [PATCH v5 3/3] power: amd power monitor support Sivaprasad Tummala
2023-08-16 19:27             ` Tyler Retzlaff
2023-08-17 11:34               ` Tummala, Sivaprasad
2023-08-17 14:18                 ` Konstantin Ananyev
2023-08-18 13:25                   ` Ferruh Yigit
2023-08-18 13:48                     ` Bruce Richardson
2023-08-21 15:42                       ` Tyler Retzlaff
2023-08-22 22:30                       ` Konstantin Ananyev
2023-08-23  9:19                         ` Ferruh Yigit
2023-08-23 16:03                           ` Tyler Retzlaff
2023-08-24  9:04                             ` Ferruh Yigit
2023-08-25 16:00                               ` Tyler Retzlaff
2023-08-30 22:45                                 ` Konstantin Ananyev
2023-09-27 10:38                                   ` Tummala, Sivaprasad
2023-09-28 10:11                                     ` Konstantin Ananyev
2023-10-06  8:26             ` David Marchand
2023-10-09  8:02               ` Tummala, Sivaprasad
2023-10-09 14:05             ` [PATCH v6 1/3] eal: add x86 cpuid support for monitorx Sivaprasad Tummala
2023-10-09 14:05               ` [PATCH v6 2/3] eal: removed unnecessary checks in x86 power monitor APIs Sivaprasad Tummala
2023-10-09 14:05               ` [PATCH v6 3/3] power: amd power monitor support Sivaprasad Tummala
2023-10-10  8:59                 ` David Marchand
2023-10-11  9:33                   ` Tummala, Sivaprasad
2023-10-10 10:14                 ` Konstantin Ananyev
2023-10-09 16:23               ` [PATCH v6 1/3] eal: add x86 cpuid support for monitorx Patrick Robb
2023-10-10  8:21                 ` David Marchand
2023-04-18  8:25       ` Sivaprasad Tummala [this message]
2023-06-14 13:15         ` [PATCH v4 2/4] " Burakov, Anatoly
2023-04-18  8:25       ` [PATCH v4 3/4] eal: removed unnecessary checks in x86 power monitor APIs Sivaprasad Tummala
2023-06-14 13:14         ` Burakov, Anatoly
2023-04-18  8:25       ` [PATCH v4 4/4] power: amd power monitor support Sivaprasad Tummala
2023-06-14 13:14         ` Burakov, Anatoly
2023-04-13 11:53 ` [PATCH v2 3/3] " Sivaprasad Tummala
2023-04-17  4:34   ` [PATCH v3 4/4] " Sivaprasad Tummala
2023-04-13 11:59 ` [PATCH v2 1/3] eal: add x86 cpuid support for monitorx David Marchand
2023-04-13 17:50   ` Tummala, Sivaprasad
2023-04-14  7:05     ` David Marchand
2023-04-14  8:51       ` Tummala, Sivaprasad
2023-04-14 11:48       ` Ferruh Yigit
2023-04-17  4:32 ` [PATCH v3 2/4] " Sivaprasad Tummala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230418082529.544777-3-sivaprasad.tummala@amd.com \
    --to=sivaprasad.tummala@amd.com \
    --cc=david.hunt@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).