diff options
| author | Louis Burda <quent.burda@gmail.com> | 2022-08-13 18:06:20 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2022-08-13 18:15:36 +0200 |
| commit | 0f3b9caf389b486541614836bf180b64544615cb (patch) | |
| tree | 114368cf56f56075ff16c314645c00145b905b5d /kmod/asm.h | |
| parent | 98babf91dcf166bc7644a3d70a90dac272f12a75 (diff) | |
| download | cachepc-0f3b9caf389b486541614836bf180b64544615cb.tar.gz cachepc-0f3b9caf389b486541614836bf180b64544615cb.zip | |
Fixup test/kvm, add target_set to ioctl tests as argument
Diffstat (limited to 'kmod/asm.h')
| -rwxr-xr-x | kmod/asm.h | 19 |
1 files changed, 0 insertions, 19 deletions
@@ -5,9 +5,6 @@ #define CPUID_AFFECTED_REGS "rax", "rbx", "rcx", "rdx" __attribute__((always_inline)) -static inline uint64_t cachepc_readpmc(uint64_t event); - -__attribute__((always_inline)) static inline void cachepc_cpuid(void); __attribute__((always_inline)) @@ -22,22 +19,6 @@ static inline void cachepc_mfence(void); __attribute__((always_inline)) static inline void cachepc_readq(void *p); -uint64_t -cachepc_readpmc(uint64_t event) -{ - uint32_t lo, hi; - - event = 0xC0010201 + 2 * event; - - asm volatile ( - "rdmsr" - : "=a" (lo), "=d" (hi) - : "c"(event) - ); - - return ((uint64_t) hi << 32) | (uint64_t) lo; -} - void cachepc_cpuid(void) { |
