From 1b050077d2d72b15c73257c13e2e46932786f7e2 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Sat, 19 Sep 2009 00:30:49 +0200 Subject: target-i386: add RDTSCP support RDTSCP reads the time stamp counter and atomically also the content of a 32-bit MSR, which can be freely set by the OS. This allows CPU local data to be queried by userspace. Linux uses this to allow a fast implementation of the getcpu() syscall, which uses the vsyscall page to avoid a context switch. AMD CPUs since K8RevF and Intel CPUs since Nehalem support this instruction. RDTSCP is guarded by the RDTSCP CPUID bit (Fn8000_0001:EDX[27]). Signed-off-by: Andre Przywara Signed-off-by: Aurelien Jarno --- target-i386/helper.h | 1 + 1 file changed, 1 insertion(+) (limited to 'target-i386/helper.h') diff --git a/target-i386/helper.h b/target-i386/helper.h index 68d57b130a..ca953f47d9 100644 --- a/target-i386/helper.h +++ b/target-i386/helper.h @@ -80,6 +80,7 @@ DEF_HELPER_1(cmpxchg16b, void, tl) DEF_HELPER_0(single_step, void) DEF_HELPER_0(cpuid, void) DEF_HELPER_0(rdtsc, void) +DEF_HELPER_0(rdtscp, void) DEF_HELPER_0(rdpmc, void) DEF_HELPER_0(rdmsr, void) DEF_HELPER_0(wrmsr, void) -- cgit v1.2.1