[AMD Official Use Only - General] Hi David,
> -----Original Message----- > From: David Marchand <david.march...@redhat.com> > Sent: Thursday, April 13, 2023 5:30 PM > To: Tummala, Sivaprasad <sivaprasad.tumm...@amd.com> > Cc: david.h...@intel.com; dev@dpdk.org; Thomas Monjalon > <tho...@monjalon.net>; Burakov, Anatoly <anatoly.bura...@intel.com> > Subject: Re: [PATCH v2 1/3] eal: add x86 cpuid support for monitorx > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > On Thu, Apr 13, 2023 at 1:54 PM Sivaprasad Tummala > <sivaprasad.tumm...@amd.com> wrote: > > > > Add a new CPUID flag to indicate support for monitorx instruction on > > AMD Epyc processors. > > > > Signed-off-by: Sivaprasad Tummala <sivaprasad.tumm...@amd.com> > > --- > > lib/eal/include/generic/rte_cpuflags.h | 2 ++ > > lib/eal/x86/include/rte_cpuflags.h | 1 + > > lib/eal/x86/rte_cpuflags.c | 3 +++ > > 3 files changed, 6 insertions(+) > > > > diff --git a/lib/eal/include/generic/rte_cpuflags.h > > b/lib/eal/include/generic/rte_cpuflags.h > > index d35551e931..db653a8dd7 100644 > > --- a/lib/eal/include/generic/rte_cpuflags.h > > +++ b/lib/eal/include/generic/rte_cpuflags.h > > @@ -26,6 +26,8 @@ struct rte_cpu_intrinsics { > > /**< indicates support for rte_power_pause function */ > > uint32_t power_monitor_multi : 1; > > /**< indicates support for rte_power_monitor_multi function */ > > + uint32_t amd_power_monitorx : 1; > > + /**< indicates amd support for rte_power_monitor function */ > > I did not look at the patch detail, I just stopped at this part. > What makes the AMD monitorx stuff special that it needs to be exposed in the > generic API? Monitorx is different ISA /opcode (0F 01 FA) as compared to UMonitor (0F 01 C8). This need to be distinguished on specific x86 platforms. Hence in the current power intrinsics, for x86 we require a new flag to distinguish MonitorX and UMonitor and invoke the appropriate x86 ISA in the datapath. Thanks & Regards, Sivaprasad