timer: option --vmware-tsc-map for VMware guest
authorDamien Millescamps <damien.millescamps@6wind.com>
Fri, 21 Sep 2012 11:36:40 +0000 (11:36 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 17 Sep 2013 12:09:22 +0000 (14:09 +0200)
commit6286101324294f7922f0268007252d1f008c49e4
tree81f23158fe49adf033b9e6a173666b93cd286de8
parentcbecb7229232e0ad18fc65e17b207adcf38d1097
timer: option --vmware-tsc-map for VMware guest

The VMWare TSC mapping uses a hook to RDPMC to read the physical TSC
in the case of VMware ESXi.

Signed-off-by: Damien Millescamps <damien.millescamps@6wind.com>
Acked-by: Jean-Mickael Guerin <jmg@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Introduce new option --vmware-tsc-map, ignored if
CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT is not set.

Default is CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y.

if CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT is set:
    rte_rdtsc() selects at runtime between Vmware mapping of
    TSC or native TSC
else
    rte_rdtsc() always uses native rdtsc.

When running DPDK on VMware guest, enable --vmware-tsc-map to
read the physical TSC.
Caution: ESXi should pass monitor_control.pseudo_perfctr = TRUE
othewise it results in general protection fault.

Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
config/defconfig_i686-default-linuxapp-gcc
config/defconfig_i686-default-linuxapp-icc
config/defconfig_x86_64-default-linuxapp-gcc
config/defconfig_x86_64-default-linuxapp-icc
lib/librte_eal/common/include/rte_cycles.h
lib/librte_eal/linuxapp/eal/eal.c
lib/librte_eal/linuxapp/eal/include/eal_internal_cfg.h