/linux/tools/testing/selftests/kvm/lib/x86_64/ |
H A D | vmx.c | 129 cr0 &= rdmsr(MSR_IA32_VMX_CR0_FIXED1); in prepare_for_vmx_operation() 130 cr0 |= rdmsr(MSR_IA32_VMX_CR0_FIXED0); in prepare_for_vmx_operation() 134 cr4 &= rdmsr(MSR_IA32_VMX_CR4_FIXED1); in prepare_for_vmx_operation() 135 cr4 |= rdmsr(MSR_IA32_VMX_CR4_FIXED0); in prepare_for_vmx_operation() 148 feature_control = rdmsr(MSR_IA32_FEAT_CTL); in prepare_for_vmx_operation() 180 return rdmsr(MSR_IA32_VMX_EPT_VPID_CAP) & mask; in ept_vpid_cap_supported() 198 vmwrite(PIN_BASED_VM_EXEC_CONTROL, rdmsr(MSR_IA32_VMX_TRUE_PINBASED_CTLS)); in init_vmcs_control_fields() 216 rdmsr(MSR_IA32_VMX_TRUE_PROCBASED_CTLS) | CPU_BASED_ACTIVATE_SECONDARY_CONTROLS); in init_vmcs_control_fields() 218 vmwrite(CPU_BASED_VM_EXEC_CONTROL, rdmsr(MSR_IA32_VMX_TRUE_PROCBASED_CTLS)); in init_vmcs_control_fields() 226 vmwrite(VM_EXIT_CONTROLS, rdmsr(MSR_IA32_VMX_EXIT_CTLS) | in init_vmcs_control_fields() [all …]
|
H A D | apic.c | 11 rdmsr(MSR_IA32_APICBASE) & in apic_disable() 17 uint64_t val = rdmsr(MSR_IA32_APICBASE); in xapic_enable() 23 rdmsr(MSR_IA32_APICBASE) | MSR_IA32_APICBASE_ENABLE); in xapic_enable() 39 wrmsr(MSR_IA32_APICBASE, rdmsr(MSR_IA32_APICBASE) | in x2apic_enable()
|
H A D | svm.c | 75 efer = rdmsr(MSR_EFER); in generic_svm_setup() 90 save->efer = rdmsr(MSR_EFER); in generic_svm_setup() 97 save->g_pat = rdmsr(MSR_IA32_CR_PAT); in generic_svm_setup() 98 save->dbgctl = rdmsr(MSR_IA32_DEBUGCTLMSR); in generic_svm_setup()
|
/linux/drivers/cpufreq/ |
H A D | longrun.c | 39 rdmsr(MSR_TMTA_LONGRUN_FLAGS, msr_lo, msr_hi); in longrun_get_policy() 46 rdmsr(MSR_TMTA_LONGRUN_CTRL, msr_lo, msr_hi); in longrun_get_policy() 95 rdmsr(MSR_TMTA_LONGRUN_FLAGS, msr_lo, msr_hi); in longrun_set_policy() 107 rdmsr(MSR_TMTA_LONGRUN_CTRL, msr_lo, msr_hi); in longrun_set_policy() 180 rdmsr(MSR_TMTA_LRTI_READOUT, msr_lo, msr_hi); in longrun_determine_freqs() 182 rdmsr(MSR_TMTA_LRTI_VOLT_MHZ, msr_lo, msr_hi); in longrun_determine_freqs() 187 rdmsr(MSR_TMTA_LRTI_VOLT_MHZ, msr_lo, msr_hi); in longrun_determine_freqs() 204 rdmsr(MSR_TMTA_LONGRUN_CTRL, msr_lo, msr_hi); in longrun_determine_freqs()
|
H A D | speedstep-lib.c | 75 rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); in pentium3_get_frequency() 112 rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); in pentiumM_get_frequency() 135 rdmsr(MSR_FSB_FREQ, msr_lo, msr_tmp); in pentium_core_get_frequency() 160 rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); in pentium_core_get_frequency() 189 rdmsr(0x2c, msr_lo, msr_hi); in pentium4_get_frequency() 345 rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_hi); in speedstep_detect_processor() 358 rdmsr(MSR_IA32_PLATFORM_ID, msr_lo, msr_hi); in speedstep_detect_processor()
|
H A D | e_powersaver.c | 103 rdmsr(MSR_IA32_PERF_STATUS, lo, hi); in eps_get() 115 rdmsr(MSR_IA32_PERF_STATUS, lo, hi); in eps_set_state() 119 rdmsr(MSR_IA32_PERF_STATUS, lo, hi); in eps_set_state() 131 rdmsr(MSR_IA32_PERF_STATUS, lo, hi); in eps_set_state() 143 rdmsr(MSR_IA32_PERF_STATUS, lo, hi); in eps_set_state() 199 rdmsr(0x1153, lo, hi); in eps_cpu_init() 204 rdmsr(0x1154, lo, hi); in eps_cpu_init() 241 rdmsr(MSR_IA32_PERF_STATUS, lo, hi); in eps_cpu_init()
|
/linux/arch/x86/kernel/cpu/mce/ |
H A D | p5.c | 29 rdmsr(MSR_IA32_P5_MC_ADDR, loaddr, hi); in pentium_machine_check() 30 rdmsr(MSR_IA32_P5_MC_TYPE, lotype, hi); in pentium_machine_check() 58 rdmsr(MSR_IA32_P5_MC_ADDR, l, h); in intel_p5_mcheck_init() 59 rdmsr(MSR_IA32_P5_MC_TYPE, l, h); in intel_p5_mcheck_init()
|
/linux/tools/testing/selftests/kvm/x86_64/ |
H A D | ucna_injection_test.c | 71 uint64_t msr = rdmsr(MSR_IA32_APICBASE); in verify_apic_base_addr() 85 ctl2 = rdmsr(MSR_IA32_MCx_CTL2(UCNA_BANK)); in ucna_injection_guest_code() 94 ucna_addr = rdmsr(MSR_IA32_MCx_ADDR(UCNA_BANK)); in ucna_injection_guest_code() 97 ctl2 = rdmsr(MSR_IA32_MCx_CTL2(UCNA_BANK)); in ucna_injection_guest_code() 103 ucna_addr2 = rdmsr(MSR_IA32_MCx_ADDR(UCNA_BANK)); in ucna_injection_guest_code() 109 uint64_t ctl2 = rdmsr(MSR_IA32_MCx_CTL2(UCNA_BANK)); in cmci_disabled_guest_code() 117 uint64_t ctl2 = rdmsr(MSR_IA32_MCx_CTL2(UCNA_BANK)); in cmci_enabled_guest_code() 126 i_ucna_addr = rdmsr(MSR_IA32_MCx_ADDR(UCNA_BANK)); in guest_cmci_handler()
|
H A D | pmu_event_filter_test.c | 80 uint64_t v = rdmsr(msr) ^ bits_to_flip; in check_msr() 83 if (rdmsr(msr) != v) in check_msr() 88 if (rdmsr(msr) != v) in check_msr() 94 const uint64_t branches_retired = rdmsr(msr_base + 0); in run_and_measure_loop() 95 const uint64_t insn_retired = rdmsr(msr_base + 1); in run_and_measure_loop() 99 pmc_results.branches_retired = rdmsr(msr_base + 0) - branches_retired; in run_and_measure_loop() 100 pmc_results.instructions_retired = rdmsr(msr_base + 1) - insn_retired; in run_and_measure_loop() 421 const uint64_t loads = rdmsr(msr_base + 0); in masked_events_guest_test() 422 const uint64_t stores = rdmsr(msr_base + 1); in masked_events_guest_test() 423 const uint64_t loads_stores = rdmsr(msr_base + 2); in masked_events_guest_test() [all …]
|
H A D | amx_test.c | 139 GUEST_ASSERT(rdmsr(MSR_IA32_XFD) == 0); in init_regs() 170 GUEST_ASSERT(rdmsr(MSR_IA32_XFD) == XFEATURE_MASK_XTILE_DATA); in guest_code() 185 GUEST_ASSERT(rdmsr(MSR_IA32_XFD_ERR) == XFEATURE_MASK_XTILE_DATA); in guest_code() 186 GUEST_ASSERT(rdmsr(MSR_IA32_XFD) == XFEATURE_MASK_XTILE_DATA); in guest_code() 188 GUEST_ASSERT(rdmsr(MSR_IA32_XFD_ERR) == XFEATURE_MASK_XTILE_DATA); in guest_code() 189 GUEST_ASSERT(rdmsr(MSR_IA32_XFD) == XFEATURE_MASK_XTILE_DATA); in guest_code()
|
H A D | hyperv_clock.c | 56 tsc_freq = rdmsr(HV_X64_MSR_TSC_FREQUENCY); in check_tsc_msr_rdtsc() 61 t1 = rdmsr(HV_X64_MSR_TIME_REF_COUNT); in check_tsc_msr_rdtsc() 65 t2 = rdmsr(HV_X64_MSR_TIME_REF_COUNT); in check_tsc_msr_rdtsc() 90 r1 = rdmsr(HV_X64_MSR_TIME_REF_COUNT); in check_tsc_msr_tsc_page() 97 r2 = rdmsr(HV_X64_MSR_TIME_REF_COUNT); in check_tsc_msr_tsc_page()
|
H A D | vmx_preemption_timer_test.c | 86 basic.val = rdmsr(MSR_IA32_VMX_BASIC); in l1_guest_code() 87 ctrl_pin_rev.val = rdmsr(basic.ctrl ? MSR_IA32_VMX_TRUE_PINBASED_CTLS in l1_guest_code() 89 ctrl_exit_rev.val = rdmsr(basic.ctrl ? MSR_IA32_VMX_TRUE_EXIT_CTLS in l1_guest_code() 110 vmx_pt_rate = rdmsr(MSR_IA32_VMX_MISC) & 0x1F; in l1_guest_code()
|
H A D | sev_smoke_test.c | 22 GUEST_ASSERT(rdmsr(MSR_AMD64_SEV) & MSR_AMD64_SEV_ENABLED); in guest_sev_es_code() 23 GUEST_ASSERT(rdmsr(MSR_AMD64_SEV) & MSR_AMD64_SEV_ES_ENABLED); in guest_sev_es_code() 36 GUEST_ASSERT(rdmsr(MSR_AMD64_SEV) & MSR_AMD64_SEV_ENABLED); in guest_sev_code()
|
H A D | userspace_msr_exit_test.c | 296 GUEST_ASSERT(rdmsr(MSR_SYSCALL_MASK) == MSR_SYSCALL_MASK); in guest_msr_calls() 297 GUEST_ASSERT(rdmsr(MSR_GS_BASE) == MSR_GS_BASE); in guest_msr_calls() 299 GUEST_ASSERT(rdmsr(MSR_SYSCALL_MASK) != MSR_SYSCALL_MASK); in guest_msr_calls() 300 GUEST_ASSERT(rdmsr(MSR_GS_BASE) != MSR_GS_BASE); in guest_msr_calls() 307 rdmsr(MSR_IA32_POWER_CTL); in guest_msr_calls() 310 GUEST_ASSERT(rdmsr(0xdeadbeef) == 0xdeadbeef); in guest_msr_calls()
|
/linux/arch/x86/kernel/cpu/mtrr/ |
H A D | generic.c | 114 rdmsr(MSR_AMD64_SYSCFG, lo, hi); in k8_check_syscfg_dram_mod_en() 559 rdmsr(MTRRphysBase_MSR(index), vr->base_lo, vr->base_hi); in get_mtrr_var_range() 560 rdmsr(MTRRphysMask_MSR(index), vr->mask_lo, vr->mask_hi); in get_mtrr_var_range() 584 rdmsr(MSR_MTRRfix64K_00000, p[0], p[1]); in get_fixed_ranges() 587 rdmsr(MSR_MTRRfix16K_80000 + i, p[2 + i * 2], p[3 + i * 2]); in get_fixed_ranges() 589 rdmsr(MSR_MTRRfix4K_C0000 + i, p[6 + i * 2], p[7 + i * 2]); in get_fixed_ranges() 696 rdmsr(MSR_MTRRcap, lo, dummy); in get_mtrr_state() 704 rdmsr(MSR_MTRRdefType, lo, dummy); in get_mtrr_state() 712 rdmsr(MSR_K8_TOP_MEM2, low, high); in get_mtrr_state() 769 rdmsr(msr, lo, hi); in set_fixed_range() [all …]
|
H A D | amd.c | 15 rdmsr(MSR_K6_UWCCR, low, high); in amd_get_mtrr() 67 rdmsr(MSR_K6_UWCCR, regs[0], regs[1]); in amd_set_mtrr()
|
/linux/arch/x86/kernel/cpu/ |
H A D | centaur.c | 32 rdmsr(MSR_VIA_FCR, lo, hi); in init_c3() 40 rdmsr(MSR_VIA_RNG, lo, hi); in init_c3() 54 rdmsr(MSR_VIA_FCR, lo, hi); in init_c3() 180 rdmsr(MSR_IDT_FCR1, lo, hi); in init_centaur()
|
H A D | zhaoxin.c | 30 rdmsr(MSR_ZHAOXIN_FCR57, lo, hi); in init_zhaoxin_cap() 39 rdmsr(MSR_ZHAOXIN_FCR57, lo, hi); in init_zhaoxin_cap()
|
/linux/arch/x86/kernel/ |
H A D | tsc_msr.c | 181 rdmsr(MSR_PLATFORM_INFO, lo, hi); in cpu_khz_from_msr() 184 rdmsr(MSR_IA32_PERF_STATUS, lo, hi); in cpu_khz_from_msr() 189 rdmsr(MSR_FSB_FREQ, lo, hi); in cpu_khz_from_msr()
|
/linux/tools/power/cpupower/debug/i386/ |
H A D | centrino-decode.c | 28 static int rdmsr(unsigned int cpu, unsigned int msr, in rdmsr() function 80 err = rdmsr(cpu, MSR_IA32_PERF_STATUS, &lo, &hi); in decode_live()
|
/linux/tools/testing/selftests/kvm/include/x86_64/ |
H A D | apic.h | 79 return rdmsr(MSR_IA32_APICBASE) & MSR_IA32_APICBASE_BSP; in get_bsp_flag() 94 return rdmsr(APIC_BASE_MSR + (reg >> 4)); in x2apic_read_reg()
|
/linux/drivers/thermal/intel/ |
H A D | therm_throt.c | 730 rdmsr(MSR_IA32_MISC_ENABLE, l, h); in intel_init_thermal() 756 rdmsr(MSR_THERM2_CTL, l, h); in intel_init_thermal() 770 rdmsr(MSR_IA32_THERM_INTERRUPT, l, h); in intel_init_thermal() 784 rdmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT, l, h); in intel_init_thermal() 801 rdmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT, l, h); in intel_init_thermal() 807 rdmsr(MSR_IA32_MISC_ENABLE, l, h); in intel_init_thermal()
|
/linux/drivers/ata/ |
H A D | pata_cs5536.c | 36 #undef rdmsr /* avoid accidental MSR usage on, e.g. x86-64 */ 38 #define rdmsr(x, y, z) do { } while (0) macro 91 rdmsr(MSR_IDE_CFG + reg, *val, dummy); in cs5536_read()
|
/linux/arch/x86/mm/ |
H A D | mem_encrypt_boot.S | 117 rdmsr 150 rdmsr
|
/linux/drivers/char/hw_random/ |
H A D | via-rng.c | 153 rdmsr(MSR_VIA_RNG, lo, hi); in via_rng_init() 177 rdmsr(MSR_VIA_RNG, lo, hi); in via_rng_init()
|