/tools/power/x86/turbostat/ |
D | turbostat.c | 279 int get_msr_sum(int cpu, off_t offset, unsigned long long *msr); 497 int get_msr(int cpu, off_t offset, unsigned long long *msr) in get_msr() argument 501 retval = pread(get_msr_fd(cpu), msr, sizeof(*msr), offset); in get_msr() 503 if (retval != sizeof *msr) in get_msr() 1895 unsigned long long msr; in get_counters() local 1972 if (get_msr(cpu, MSR_SMI_COUNT, &msr)) in get_counters() 1974 t->smi_count = msr & 0xFFFFFFFF; in get_counters() 2012 if (get_msr(cpu, MSR_IA32_THERM_STATUS, &msr)) in get_counters() 2014 c->core_temp_c = tcc_activation_temp - ((msr >> 16) & 0x7F); in get_counters() 2018 if (get_msr(cpu, MSR_CORE_ENERGY_STAT, &msr)) in get_counters() [all …]
|
/tools/testing/selftests/kvm/x86_64/ |
D | user_msr_test.c | 33 static void deny_msr(uint8_t *bitmap, u32 msr) in deny_msr() argument 35 u32 idx = msr & (KVM_MSR_FILTER_MAX_BITMAP_SIZE - 1); in deny_msr() 156 run->msr.data = run->msr.index; in handle_rdmsr() 159 if (run->msr.index == MSR_SYSCALL_MASK || in handle_rdmsr() 160 run->msr.index == MSR_GS_BASE) { in handle_rdmsr() 161 TEST_ASSERT(run->msr.reason == KVM_MSR_EXIT_REASON_FILTER, in handle_rdmsr() 165 if (run->msr.index == 0xdeadbeef) { in handle_rdmsr() 166 TEST_ASSERT(run->msr.reason == KVM_MSR_EXIT_REASON_UNKNOWN, in handle_rdmsr() 176 if (run->msr.index == MSR_IA32_POWER_CTL) { in handle_wrmsr() 177 TEST_ASSERT(run->msr.data == 0x1234, in handle_wrmsr() [all …]
|
D | kvm_pv_test.c | 69 #define TEST_MSR(msr) { .idx = msr, .name = #msr } argument 71 #define PR_MSR(msr) ucall(UCALL_PR_MSR, 1, msr) argument 90 static void test_msr(struct msr_data *msr) in test_msr() argument 92 PR_MSR(msr); in test_msr() 93 do_rdmsr(msr->idx); in test_msr() 97 do_wrmsr(msr->idx, 0); in test_msr() 156 struct msr_data *msr = (struct msr_data *)uc->args[0]; in pr_msr() local 158 pr_info("testing msr: %s (%#x)\n", msr->name, msr->idx); in pr_msr()
|
/tools/power/x86/x86_energy_perf_policy/ |
D | x86_energy_perf_policy.c | 677 int get_msr(int cpu, int offset, unsigned long long *msr) in get_msr() argument 688 retval = pread(fd, msr, sizeof(*msr), offset); in get_msr() 689 if (retval != sizeof(*msr)) { in get_msr() 695 fprintf(stderr, "get_msr(cpu%d, 0x%X, 0x%llX)\n", cpu, offset, *msr); in get_msr() 734 unsigned long long msr; in read_hwp_cap() local 736 get_msr(cpu, msr_offset, &msr); in read_hwp_cap() 738 cap->highest = msr_perf_2_ratio(HWP_HIGHEST_PERF(msr)); in read_hwp_cap() 739 cap->guaranteed = msr_perf_2_ratio(HWP_GUARANTEED_PERF(msr)); in read_hwp_cap() 740 cap->efficient = msr_perf_2_ratio(HWP_MOSTEFFICIENT_PERF(msr)); in read_hwp_cap() 741 cap->lowest = msr_perf_2_ratio(HWP_LOWEST_PERF(msr)); in read_hwp_cap() [all …]
|
/tools/power/cpupower/debug/i386/ |
D | centrino-decode.c | 28 static int rdmsr(unsigned int cpu, unsigned int msr, in rdmsr() argument 47 if (lseek(fd, msr, SEEK_CUR) == -1) in rdmsr() 63 static void decode (unsigned int msr) in decode() argument 68 multiplier = ((msr >> 8) & 0xFF); in decode() 70 mv = (((msr & 0xFF) * 16) + 700); in decode() 72 printf("0x%x means multiplier %d @ %d mV\n", msr, multiplier, mv); in decode()
|
D | powernow-k8-decode.c | 30 uint64_t msr = 0; in get_fidvid() local 43 if (read(fd, &msr, 8) != 8) in get_fidvid() 46 *fid = ((uint32_t )(msr & 0xffffffffull)) & MSR_S_LO_CURRENT_FID; in get_fidvid() 47 *vid = ((uint32_t )(msr>>32 & 0xffffffffull)) & MSR_S_HI_CURRENT_VID; in get_fidvid()
|
/tools/testing/selftests/intel_pstate/ |
D | msr.c | 16 long long msr; in main() local 36 pread(fd, &msr, sizeof(msr), 0x199); in main() 38 printf("msr 0x199: 0x%llx\n", msr); in main()
|
D | run.sh | 67 ./msr 0 >> /tmp/result.$1 114 msr=$(cat /tmp/result.${freq} | grep "msr" | awk ' { print $3 } ') 120 $msr
|
D | .gitignore | 3 msr
|
D | Makefile | 9 TEST_GEN_FILES := msr aperf
|
/tools/power/cpupower/utils/idle_monitor/ |
D | nhm_idle.c | 74 int msr; in nhm_get_count() local 78 msr = MSR_CORE_C3_RESIDENCY; in nhm_get_count() 81 msr = MSR_CORE_C6_RESIDENCY; in nhm_get_count() 84 msr = MSR_PKG_C3_RESIDENCY; in nhm_get_count() 87 msr = MSR_PKG_C6_RESIDENCY; in nhm_get_count() 90 msr = MSR_TSC; in nhm_get_count() 95 if (read_msr(cpu, msr, val)) in nhm_get_count()
|
D | hsw_ext_idle.c | 65 int msr; in hsw_ext_get_count() local 69 msr = MSR_PKG_C8_RESIDENCY; in hsw_ext_get_count() 72 msr = MSR_PKG_C9_RESIDENCY; in hsw_ext_get_count() 75 msr = MSR_PKG_C10_RESIDENCY; in hsw_ext_get_count() 78 msr = MSR_TSC; in hsw_ext_get_count() 83 if (read_msr(cpu, msr, val)) in hsw_ext_get_count()
|
D | snb_idle.c | 63 int msr; in snb_get_count() local 67 msr = MSR_CORE_C7_RESIDENCY; in snb_get_count() 70 msr = MSR_PKG_C2_RESIDENCY; in snb_get_count() 73 msr = MSR_PKG_C7_RESIDENCY; in snb_get_count() 76 msr = MSR_TSC; in snb_get_count() 81 if (read_msr(cpu, msr, val)) in snb_get_count()
|
/tools/perf/trace/beauty/tracepoints/ |
D | x86_msr.c | 24 static size_t x86_MSR__scnprintf(unsigned long msr, char *bf, size_t size, bool show_prefix) in x86_MSR__scnprintf() argument 26 return strarrays__scnprintf(&strarrays__x86_MSRs_tables, bf, size, "%#x", show_prefix, msr); in x86_MSR__scnprintf()
|
D | x86_msr.sh | 10 x86_msr_index=${arch_x86_header_dir}/msr-index.h
|
/tools/testing/selftests/arm64/mte/ |
D | mte_helper.S | 101 msr tco, #MT_PSTATE_TCO_EN 113 msr tco, #MT_PSTATE_TCO_DIS
|
/tools/perf/arch/powerpc/include/ |
D | dwarf-regs-table.h | 20 REG_DWARFNUM_NAME(msr, 66),
|
/tools/testing/selftests/kvm/include/x86_64/ |
D | processor.h | 104 static inline uint64_t rdmsr(uint32_t msr) in rdmsr() argument 108 __asm__ __volatile__("rdmsr" : "=a"(a), "=d"(d) : "c"(msr) : "memory"); in rdmsr() 113 static inline void wrmsr(uint32_t msr, uint64_t value) in wrmsr() argument 118 __asm__ __volatile__("wrmsr" :: "a"(a), "d"(d), "c"(msr) : "memory"); in wrmsr()
|
/tools/testing/selftests/powerpc/tm/ |
D | .gitignore | 4 tm-signal-msr-resv
|
D | Makefile | 5 TEST_GEN_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack \
|
/tools/testing/selftests/ftrace/test.d/kprobe/ |
D | kprobe_args_syntax.tc | 33 BADREG=%msr
|
/tools/perf/arch/powerpc/util/ |
D | dwarf-regs.c | 67 REG_DWARFNUM_NAME(msr, 66),
|
D | perf_regs.c | 53 SMPL_REG(msr, PERF_REG_POWERPC_MSR),
|
/tools/testing/selftests/kvm/lib/x86_64/ |
D | vmx.c | 94 vmx->msr = (void *)vm_vaddr_alloc(vm, getpagesize(), 0x10000, 0, 0); in vcpu_alloc_vmx() 95 vmx->msr_hva = addr_gva2hva(vm, (uintptr_t)vmx->msr); in vcpu_alloc_vmx() 96 vmx->msr_gpa = addr_gva2gpa(vm, (uintptr_t)vmx->msr); in vcpu_alloc_vmx()
|
/tools/perf/pmu-events/ |
D | jevents.c | 553 struct msrmap *msr = NULL; in json_events() local 596 msr = lookup_msr(map, val); in json_events() 666 if (msr != NULL) in json_events() 667 addfield(map, &event, ",", msr->pname, msrval); in json_events()
|