]> git.droids-corp.org - dpdk.git/commitdiff
eal/x86: add CPU flag for WAITPKG
authorLiang Ma <liang.j.ma@intel.com>
Tue, 27 Oct 2020 14:59:01 +0000 (14:59 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 29 Oct 2020 21:46:27 +0000 (22:46 +0100)
Add a new CPUID flag indicating processor support for UMONITOR/UMWAIT
and TPAUSE instructions instruction.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/librte_eal/x86/include/rte_cpuflags.h
lib/librte_eal/x86/rte_cpuflags.c

index c1d20364d14f87dc24c4261d92c11023b9657871..92e90fb6e0f07d239bd2ff13ab3169db7ffe22a0 100644 (file)
@@ -132,6 +132,8 @@ enum rte_cpu_flag_t {
        RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions 64B */
        RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register Intersection */
 
+       RTE_CPUFLAG_WAITPKG,                /**< UMONITOR/UMWAIT/TPAUSE */
+
        /* The last item */
        RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
 };
index 30439e79516531e244d6031dc1d8474d1f33f4cb..0325c4b93b9d49884353934403cebf2d6d12fd6c 100644 (file)
@@ -110,6 +110,8 @@ const struct feature_entry rte_cpu_feature_table[] = {
        FEAT_DEF(AVX512F, 0x00000007, 0, RTE_REG_EBX, 16)
        FEAT_DEF(RDSEED, 0x00000007, 0, RTE_REG_EBX, 18)
 
+       FEAT_DEF(WAITPKG, 0x00000007, 0, RTE_REG_ECX, 5)
+
        FEAT_DEF(LAHF_SAHF, 0x80000001, 0, RTE_REG_ECX,  0)
        FEAT_DEF(LZCNT, 0x80000001, 0, RTE_REG_ECX,  4)