Home
last modified time | relevance | path

Searched refs:msr (Results 1 – 25 of 32) sorted by relevance

12

/tools/power/x86/turbostat/
Dturbostat.c279 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/
Duser_msr_test.c33 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 …]
Dkvm_pv_test.c69 #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/
Dx86_energy_perf_policy.c677 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/
Dcentrino-decode.c28 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()
Dpowernow-k8-decode.c30 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/
Dmsr.c16 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()
Drun.sh67 ./msr 0 >> /tmp/result.$1
114 msr=$(cat /tmp/result.${freq} | grep "msr" | awk ' { print $3 } ')
120 $msr
D.gitignore3 msr
DMakefile9 TEST_GEN_FILES := msr aperf
/tools/power/cpupower/utils/idle_monitor/
Dnhm_idle.c74 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()
Dhsw_ext_idle.c65 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()
Dsnb_idle.c63 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/
Dx86_msr.c24 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()
Dx86_msr.sh10 x86_msr_index=${arch_x86_header_dir}/msr-index.h
/tools/testing/selftests/arm64/mte/
Dmte_helper.S101 msr tco, #MT_PSTATE_TCO_EN
113 msr tco, #MT_PSTATE_TCO_DIS
/tools/perf/arch/powerpc/include/
Ddwarf-regs-table.h20 REG_DWARFNUM_NAME(msr, 66),
/tools/testing/selftests/kvm/include/x86_64/
Dprocessor.h104 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.gitignore4 tm-signal-msr-resv
DMakefile5 TEST_GEN_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack \
/tools/testing/selftests/ftrace/test.d/kprobe/
Dkprobe_args_syntax.tc33 BADREG=%msr
/tools/perf/arch/powerpc/util/
Ddwarf-regs.c67 REG_DWARFNUM_NAME(msr, 66),
Dperf_regs.c53 SMPL_REG(msr, PERF_REG_POWERPC_MSR),
/tools/testing/selftests/kvm/lib/x86_64/
Dvmx.c94 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/
Djevents.c553 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()

12