/kernel/linux/linux-5.10/arch/x86/oprofile/ |
D | op_model_ppro.c | 33 static void ppro_shutdown(struct op_msrs const * const msrs) in ppro_shutdown() argument 38 if (!msrs->counters[i].addr) in ppro_shutdown() 45 static int ppro_fill_in_addresses(struct op_msrs * const msrs) in ppro_fill_in_addresses() argument 57 msrs->counters[i].addr = MSR_P6_PERFCTR0 + i; in ppro_fill_in_addresses() 58 msrs->controls[i].addr = MSR_P6_EVNTSEL0 + i; in ppro_fill_in_addresses() 64 ppro_shutdown(msrs); in ppro_fill_in_addresses() 73 struct op_msrs const * const msrs) in ppro_setup_ctrs() argument 97 if (!msrs->controls[i].addr) in ppro_setup_ctrs() 99 rdmsrl(msrs->controls[i].addr, val); in ppro_setup_ctrs() 103 wrmsrl(msrs->controls[i].addr, val); in ppro_setup_ctrs() [all …]
|
D | op_model_amd.c | 133 struct op_msrs const * const msrs) in op_amd_handle_ibs() argument 269 struct op_msrs const * const msrs) in op_mux_switch_ctrl() argument 279 rdmsrl(msrs->controls[i].addr, val); in op_mux_switch_ctrl() 282 wrmsrl(msrs->controls[i].addr, val); in op_mux_switch_ctrl() 290 static void op_amd_shutdown(struct op_msrs const * const msrs) in op_amd_shutdown() argument 295 if (!msrs->counters[i].addr) in op_amd_shutdown() 302 static int op_amd_fill_in_addresses(struct op_msrs * const msrs) in op_amd_fill_in_addresses() argument 315 msrs->counters[i].addr = MSR_F15H_PERF_CTR + (i << 1); in op_amd_fill_in_addresses() 316 msrs->controls[i].addr = MSR_F15H_PERF_CTL + (i << 1); in op_amd_fill_in_addresses() 318 msrs->controls[i].addr = MSR_K7_EVNTSEL0 + i; in op_amd_fill_in_addresses() [all …]
|
D | nmi_int.c | 75 static void nmi_cpu_save_registers(struct op_msrs *msrs) in nmi_cpu_save_registers() argument 77 struct op_msr *counters = msrs->counters; in nmi_cpu_save_registers() 78 struct op_msr *controls = msrs->controls; in nmi_cpu_save_registers() 94 struct op_msrs const *msrs = this_cpu_ptr(&cpu_msrs); in nmi_cpu_start() local 95 if (!msrs->controls) in nmi_cpu_start() 98 model->start(msrs); in nmi_cpu_start() 114 struct op_msrs const *msrs = this_cpu_ptr(&cpu_msrs); in nmi_cpu_stop() local 115 if (!msrs->controls) in nmi_cpu_stop() 118 model->stop(msrs); in nmi_cpu_stop() 181 static void nmi_cpu_setup_mux(int cpu, struct op_msrs const * const msrs) in nmi_cpu_setup_mux() argument [all …]
|
D | op_model_p4.c | 388 static void p4_shutdown(struct op_msrs const * const msrs) in p4_shutdown() argument 393 if (msrs->counters[i].addr) in p4_shutdown() 394 release_perfctr_nmi(msrs->counters[i].addr); in p4_shutdown() 402 if (msrs->controls[i].addr) in p4_shutdown() 403 release_evntsel_nmi(msrs->controls[i].addr); in p4_shutdown() 407 static int p4_fill_in_addresses(struct op_msrs * const msrs) in p4_fill_in_addresses() argument 420 msrs->counters[i].addr = addr; in p4_fill_in_addresses() 421 msrs->controls[i].addr = cccraddr; in p4_fill_in_addresses() 429 msrs->controls[i].addr = addr; in p4_fill_in_addresses() 438 msrs->controls[i].addr = addr; in p4_fill_in_addresses() [all …]
|
D | op_x86_model.h | 43 int (*fill_in_addresses)(struct op_msrs * const msrs); 45 struct op_msrs const * const msrs); 47 struct op_msrs const * const msrs); 48 void (*start)(struct op_msrs const * const msrs); 49 void (*stop)(struct op_msrs const * const msrs); 50 void (*shutdown)(struct op_msrs const * const msrs); 53 struct op_msrs const * const msrs);
|
/kernel/linux/linux-5.10/arch/x86/kvm/vmx/ |
D | nested.h | 20 void nested_vmx_setup_ctls_msrs(struct nested_vmx_msrs *msrs, u32 ept_caps); 32 int vmx_get_vmx_msr(struct nested_vmx_msrs *msrs, u32 msr_index, u64 *pdata); 105 return vmx_misc_cr3_count(to_vmx(vcpu)->nested.msrs.misc_low); in nested_cpu_vmx_misc_cr3_count() 115 return to_vmx(vcpu)->nested.msrs.misc_low & in nested_cpu_has_vmwrite_any_field() 121 return to_vmx(vcpu)->nested.msrs.misc_low & VMX_MISC_ZERO_LEN_INS; in nested_cpu_has_zero_length_injection() 126 return to_vmx(vcpu)->nested.msrs.procbased_ctls_high & in nested_cpu_supports_monitor_trap_flag() 132 return to_vmx(vcpu)->nested.msrs.secondary_ctls_high & in nested_cpu_has_vmx_shadow_vmcs() 258 u64 fixed0 = to_vmx(vcpu)->nested.msrs.cr0_fixed0; in nested_guest_cr0_valid() 259 u64 fixed1 = to_vmx(vcpu)->nested.msrs.cr0_fixed1; in nested_guest_cr0_valid() 262 if (to_vmx(vcpu)->nested.msrs.secondary_ctls_high & in nested_guest_cr0_valid() [all …]
|
D | nested.c | 360 to_vmx(vcpu)->nested.msrs.ept_caps & in nested_ept_init_mmu_context() 882 u64 vmx_misc = vmx_control_msr(vmx->nested.msrs.misc_low, in nested_vmx_max_atomic_switch_msrs() 883 vmx->nested.msrs.misc_high); in nested_vmx_max_atomic_switch_msrs() 1248 u64 vmx_basic = vmx->nested.msrs.basic; in vmx_restore_vmx_basic() 1267 vmx->nested.msrs.basic = data; in vmx_restore_vmx_basic() 1279 lowp = &vmx->nested.msrs.pinbased_ctls_low; in vmx_restore_control_msr() 1280 highp = &vmx->nested.msrs.pinbased_ctls_high; in vmx_restore_control_msr() 1283 lowp = &vmx->nested.msrs.procbased_ctls_low; in vmx_restore_control_msr() 1284 highp = &vmx->nested.msrs.procbased_ctls_high; in vmx_restore_control_msr() 1287 lowp = &vmx->nested.msrs.exit_ctls_low; in vmx_restore_control_msr() [all …]
|
D | vmx.c | 1943 if (vmx_get_vmx_msr(&vmx->nested.msrs, msr_info->index, in vmx_get_msr() 4262 vmx->nested.msrs.secondary_ctls_high |= control; in vmx_adjust_secondary_exec_control() 4264 vmx->nested.msrs.secondary_ctls_high &= ~control; in vmx_adjust_secondary_exec_control() 6625 struct perf_guest_switch_msr *msrs; in atomic_switch_perf_msrs() local 6627 msrs = perf_guest_get_msrs(&nr_msrs); in atomic_switch_perf_msrs() 6629 if (!msrs) in atomic_switch_perf_msrs() 6633 if (msrs[i].host == msrs[i].guest) in atomic_switch_perf_msrs() 6634 clear_atomic_switch_msr(vmx, msrs[i].msr); in atomic_switch_perf_msrs() 6636 add_atomic_switch_msr(vmx, msrs[i].msr, msrs[i].guest, in atomic_switch_perf_msrs() 6637 msrs[i].host, false); in atomic_switch_perf_msrs() [all …]
|
D | vmx.h | 189 struct nested_vmx_msrs msrs; member
|
/kernel/linux/linux-5.10/arch/x86/lib/ |
D | msr.c | 11 struct msr *msrs = NULL; in msrs_alloc() local 13 msrs = alloc_percpu(struct msr); in msrs_alloc() 14 if (!msrs) { in msrs_alloc() 19 return msrs; in msrs_alloc() 23 void msrs_free(struct msr *msrs) in msrs_free() argument 25 free_percpu(msrs); in msrs_free()
|
D | msr-smp.c | 14 if (rv->msrs) in __rdmsr_on_cpu() 15 reg = per_cpu_ptr(rv->msrs, this_cpu); in __rdmsr_on_cpu() 28 if (rv->msrs) in __wrmsr_on_cpu() 29 reg = per_cpu_ptr(rv->msrs, this_cpu); in __wrmsr_on_cpu() 100 struct msr *msrs, in __rwmsr_on_cpus() argument 108 rv.msrs = msrs; in __rwmsr_on_cpus() 127 void rdmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs) in rdmsr_on_cpus() argument 129 __rwmsr_on_cpus(mask, msr_no, msrs, __rdmsr_on_cpu); in rdmsr_on_cpus() 141 void wrmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs) in wrmsr_on_cpus() argument 143 __rwmsr_on_cpus(mask, msr_no, msrs, __wrmsr_on_cpu); in wrmsr_on_cpus()
|
/kernel/linux/linux-5.10/Documentation/trace/postprocess/ |
D | decode_msr.py | 7 msrs = dict() variable 13 msrs[int(m.group(2), 16)] = m.group(1) 26 if num in msrs: 27 r = msrs[num]
|
/kernel/linux/linux-5.10/arch/x86/include/asm/ |
D | msr.h | 27 struct msr *msrs; member 332 void msrs_free(struct msr *msrs); 341 void rdmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs); 342 void wrmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs); 371 struct msr *msrs) in rdmsr_on_cpus() argument 373 rdmsr_on_cpu(0, msr_no, &(msrs[0].l), &(msrs[0].h)); in rdmsr_on_cpus() 376 struct msr *msrs) in wrmsr_on_cpus() argument 378 wrmsr_on_cpu(0, msr_no, msrs[0].l, msrs[0].h); in wrmsr_on_cpus()
|
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/lib/x86_64/ |
D | processor.c | 918 struct kvm_msrs msrs; member 990 state = malloc(sizeof(*state) + nmsrs * sizeof(state->msrs.entries[0])); in vcpu_save_state() 1028 state->msrs.nmsrs = nmsrs; in vcpu_save_state() 1030 state->msrs.entries[i].index = list->indices[i]; in vcpu_save_state() 1031 r = ioctl(vcpu->fd, KVM_GET_MSRS, &state->msrs); in vcpu_save_state() 1062 r = ioctl(vcpu->fd, KVM_SET_MSRS, &state->msrs); in vcpu_load_state() 1063 … TEST_ASSERT(r == state->msrs.nmsrs, "Unexpected result from KVM_SET_MSRS, r: %i (failed at %x)", in vcpu_load_state() 1064 r, r == state->msrs.nmsrs ? -1 : state->msrs.entries[r].index); in vcpu_load_state()
|
/kernel/linux/linux-5.10/Documentation/virt/kvm/ |
D | cpuid.rst | 44 KVM_FEATURE_CLOCKSOURCE 0 kvmclock available at msrs 52 KVM_FEATURE_CLOCKSOURCE2 3 kvmclock available at msrs
|
D | api.rst | 214 __u32 nmsrs; /* number of msrs in entries */ 219 kvm adjusts nmsrs to reflect the actual number of msrs and fills in the 222 KVM_GET_MSR_INDEX_LIST returns the guest msrs that are supported. The list 608 :Returns: number of msrs successfully returned; 624 __u32 nmsrs; /* number of msrs in entries */ 648 :Returns: number of msrs successfully set (see below), -1 on error 4731 __u32 nmsrs; /* number of msrs in bitmap */
|
/kernel/linux/linux-5.10/drivers/edac/ |
D | amd64_edac.c | 14 static struct msr __percpu *msrs; variable 3096 rdmsr_on_cpus(mask, MSR_IA32_MCG_CTL, msrs); in nb_mce_bank_enabled_on_node() 3099 struct msr *reg = per_cpu_ptr(msrs, cpu); in nb_mce_bank_enabled_on_node() 3128 rdmsr_on_cpus(cmask, MSR_IA32_MCG_CTL, msrs); in toggle_ecc_err_reporting() 3132 struct msr *reg = per_cpu_ptr(msrs, cpu); in toggle_ecc_err_reporting() 3147 wrmsr_on_cpus(cmask, MSR_IA32_MCG_CTL, msrs); in toggle_ecc_err_reporting() 3704 msrs = msrs_alloc(); in amd64_edac_init() 3705 if (!msrs) in amd64_edac_init() 3743 msrs_free(msrs); in amd64_edac_init() 3744 msrs = NULL; in amd64_edac_init() [all …]
|
/kernel/linux/linux-5.10/arch/x86/kernel/cpu/mce/ |
D | amd.c | 607 u32 msrs[NR_BLOCKS]; in disable_err_thresholding() local 610 msrs[0] = 0x00000413; /* MC4_MISC0 */ in disable_err_thresholding() 611 msrs[1] = 0xc0000408; /* MC4_MISC1 */ in disable_err_thresholding() 619 msrs[0] = MSR_AMD64_SMCA_MCx_MISC(bank); in disable_err_thresholding() 634 msr_clear_bit(msrs[i], 62); in disable_err_thresholding()
|
/kernel/linux/linux-5.10/arch/x86/kvm/ |
D | x86.c | 175 u32 msrs[KVM_MAX_NR_USER_RETURN_MSRS]; member 303 struct kvm_user_return_msrs *msrs in kvm_on_user_return() local 313 if (msrs->registered) { in kvm_on_user_return() 314 msrs->registered = false; in kvm_on_user_return() 319 values = &msrs->values[slot]; in kvm_on_user_return() 321 wrmsrl(user_return_msrs_global.msrs[slot], values->host); in kvm_on_user_return() 346 user_return_msrs_global.msrs[slot] = msr; in kvm_define_user_return_msr() 355 struct kvm_user_return_msrs *msrs = per_cpu_ptr(user_return_msrs, cpu); in kvm_user_return_msr_cpu_online() local 360 rdmsrl_safe(user_return_msrs_global.msrs[i], &value); in kvm_user_return_msr_cpu_online() 361 msrs->values[i].host = value; in kvm_user_return_msr_cpu_online() [all …]
|