/openbmc/linux/tools/testing/selftests/kvm/x86_64/ |
H A D | vmx_msrs_test.c | 15 static void vmx_fixed1_msr_test(struct kvm_vcpu *vcpu, uint32_t msr_index, in vmx_fixed1_msr_test() argument 18 uint64_t val = vcpu_get_msr(vcpu, msr_index); in vmx_fixed1_msr_test() 24 vcpu_set_msr(vcpu, msr_index, val & ~BIT_ULL(bit)); in vmx_fixed1_msr_test() 25 vcpu_set_msr(vcpu, msr_index, val); in vmx_fixed1_msr_test() 29 static void vmx_fixed0_msr_test(struct kvm_vcpu *vcpu, uint32_t msr_index, in vmx_fixed0_msr_test() argument 32 uint64_t val = vcpu_get_msr(vcpu, msr_index); in vmx_fixed0_msr_test() 38 vcpu_set_msr(vcpu, msr_index, val | BIT_ULL(bit)); in vmx_fixed0_msr_test() 39 vcpu_set_msr(vcpu, msr_index, val); in vmx_fixed0_msr_test() 43 static void vmx_fixed0and1_msr_test(struct kvm_vcpu *vcpu, uint32_t msr_index) in vmx_fixed0and1_msr_test() argument 45 vmx_fixed0_msr_test(vcpu, msr_index, GENMASK_ULL(31, 0)); in vmx_fixed0and1_msr_test() [all …]
|
H A D | userspace_msr_exit_test.c | 407 static void process_rdmsr(struct kvm_vcpu *vcpu, uint32_t msr_index) in process_rdmsr() argument 414 TEST_ASSERT(run->msr.index == msr_index, in process_rdmsr() 416 run->msr.index, msr_index); in process_rdmsr() 439 static void process_wrmsr(struct kvm_vcpu *vcpu, uint32_t msr_index) in process_wrmsr() argument 446 TEST_ASSERT(run->msr.index == msr_index, in process_wrmsr() 448 run->msr.index, msr_index); in process_wrmsr() 505 uint32_t msr_index) in run_guest_then_process_rdmsr() argument 508 process_rdmsr(vcpu, msr_index); in run_guest_then_process_rdmsr() 512 uint32_t msr_index) in run_guest_then_process_wrmsr() argument 515 process_wrmsr(vcpu, msr_index); in run_guest_then_process_wrmsr()
|
/openbmc/linux/arch/x86/xen/ |
H A D | pmu.c | 147 static bool is_intel_pmu_msr(u32 msr_index, int *type, int *index) in is_intel_pmu_msr() argument 156 switch (msr_index) { in is_intel_pmu_msr() 171 if ((msr_index >= MSR_CORE_PERF_FIXED_CTR0) && in is_intel_pmu_msr() 172 (msr_index < MSR_CORE_PERF_FIXED_CTR0 + in is_intel_pmu_msr() 174 *index = msr_index - MSR_CORE_PERF_FIXED_CTR0; in is_intel_pmu_msr() 179 if ((msr_index >= MSR_P6_EVNTSEL0) && in is_intel_pmu_msr() 180 (msr_index < MSR_P6_EVNTSEL0 + intel_num_arch_counters)) { in is_intel_pmu_msr() 181 *index = msr_index - MSR_P6_EVNTSEL0; in is_intel_pmu_msr() 186 msr_index_pmc = msr_index & MSR_PMC_ALIAS_MASK; in is_intel_pmu_msr()
|
/openbmc/linux/drivers/thermal/intel/ |
H A D | intel_powerclamp.c | 345 int msr_index; member 350 .msr_index = MSR_PKG_C##id##_RESIDENCY, \ 371 while (info->msr_index) { in has_pkg_state_counter() 372 if (!rdmsrl_safe(info->msr_index, &val)) in has_pkg_state_counter() 386 while (info->msr_index) { in pkg_state_counter() 388 if (!rdmsrl_safe(info->msr_index, &val)) in pkg_state_counter()
|
/openbmc/linux/arch/x86/kvm/vmx/ |
H A D | nested.c | 945 u32 msr_index, in nested_vmx_get_vmexit_msr_value() argument 969 msr_index); in nested_vmx_get_vmexit_msr_value() 1037 if (e.index == msr_index) in nested_msr_store_list_has_msr() 1044 u32 msr_index) in prepare_vmx_msr_autostore_list() argument 1068 msr_index); in prepare_vmx_msr_autostore_list() 1238 switch (msr_index) { in vmx_get_control_msr() 1339 switch (msr_index) { in vmx_get_fixed0_msr() 1380 switch (msr_index) { in vmx_set_vmx_msr() 1436 switch (msr_index) { in vmx_get_vmx_msr() 6034 msr_index -= 0xc0000000; in nested_vmx_exit_handled_msr() [all …]
|
H A D | nested.h | 31 int vmx_set_vmx_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data); 32 int vmx_get_vmx_msr(struct nested_vmx_msrs *msrs, u32 msr_index, u64 *pdata);
|
H A D | hyperv.h | 188 void nested_evmcs_filter_control_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata);
|
H A D | hyperv.c | 419 void nested_evmcs_filter_control_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata) in nested_evmcs_filter_control_msr() argument 429 switch (msr_index) { in nested_evmcs_filter_control_msr()
|
H A D | vmx.c | 2176 u32 msr_index = msr_info->index; in vmx_set_msr() local 2180 switch (msr_index) { in vmx_set_msr() 2239 kvm_pr_unimpl_wrmsr(vcpu, msr_index, data); in vmx_set_msr() 2367 [msr_index - MSR_IA32_SGXLEPUBKEYHASH0] = data; in vmx_set_msr() 2374 return vmx_set_vmx_msr(vcpu, msr_index, data); in vmx_set_msr() 2460 msr = vmx_find_uret_msr(vmx, msr_index); in vmx_set_msr() 2468 if (msr_index == MSR_IA32_ARCH_CAPABILITIES) in vmx_set_msr()
|
/openbmc/linux/tools/testing/selftests/kvm/lib/x86_64/ |
H A D | processor.c | 681 uint64_t kvm_get_feature_msr(uint64_t msr_index) in kvm_get_feature_msr() argument 690 buffer.entry.index = msr_index; in kvm_get_feature_msr() 792 uint64_t vcpu_get_msr(struct kvm_vcpu *vcpu, uint64_t msr_index) in vcpu_get_msr() argument 800 buffer.entry.index = msr_index; in vcpu_get_msr() 807 int _vcpu_set_msr(struct kvm_vcpu *vcpu, uint64_t msr_index, uint64_t msr_value) in _vcpu_set_msr() argument 816 buffer.entry.index = msr_index; in _vcpu_set_msr() 925 bool kvm_msr_is_in_save_restore_list(uint32_t msr_index) in kvm_msr_is_in_save_restore_list() argument 931 if (list->indices[i] == msr_index) in kvm_msr_is_in_save_restore_list()
|
/openbmc/linux/arch/x86/kvm/ |
H A D | kvm_emulate.h | 202 int (*set_msr_with_filter)(struct x86_emulate_ctxt *ctxt, u32 msr_index, u64 data); 203 int (*get_msr_with_filter)(struct x86_emulate_ctxt *ctxt, u32 msr_index, u64 *pdata); 204 int (*get_msr)(struct x86_emulate_ctxt *ctxt, u32 msr_index, u64 *pdata);
|
H A D | x86.c | 3625 if (msrs_to_save[i] == msr_index) in kvm_is_msr_to_save() 7120 .index = msr_index, in kvm_probe_feature_msr() 7140 switch (msr_index) { in kvm_probe_msr_to_save() 7173 (msr_index - MSR_IA32_RTIT_ADDR0_A >= in kvm_probe_msr_to_save() 8189 u32 msr_index, u64 *pdata) in emulator_get_msr_with_filter() argument 8203 trace_kvm_msr_read_ex(msr_index); in emulator_get_msr_with_filter() 8207 trace_kvm_msr_read(msr_index, *pdata); in emulator_get_msr_with_filter() 8212 u32 msr_index, u64 data) in emulator_set_msr_with_filter() argument 8226 trace_kvm_msr_write_ex(msr_index, data); in emulator_set_msr_with_filter() 8230 trace_kvm_msr_write(msr_index, data); in emulator_set_msr_with_filter() [all …]
|
H A D | emulate.c | 3342 u64 msr_index = reg_read(ctxt, VCPU_REGS_RCX); in em_wrmsr() local 3348 r = ctxt->ops->set_msr_with_filter(ctxt, msr_index, msr_data); in em_wrmsr() 3358 u64 msr_index = reg_read(ctxt, VCPU_REGS_RCX); in em_rdmsr() local 3362 r = ctxt->ops->get_msr_with_filter(ctxt, msr_index, &msr_data); in em_rdmsr()
|
/openbmc/linux/tools/testing/selftests/kvm/include/x86_64/ |
H A D | processor.h | 805 bool kvm_msr_is_in_save_restore_list(uint32_t msr_index); 806 uint64_t kvm_get_feature_msr(uint64_t msr_index); 1017 uint64_t vcpu_get_msr(struct kvm_vcpu *vcpu, uint64_t msr_index); 1018 int _vcpu_set_msr(struct kvm_vcpu *vcpu, uint64_t msr_index, uint64_t msr_value);
|