Searched refs:msr_info (Results 1 - 10 of 10) sorted by relevance

/linux-4.4.14/arch/x86/lib/
H A Dmsr-smp.c8 struct msr_info *rv = info; __rdmsr_on_cpu()
22 struct msr_info *rv = info; __wrmsr_on_cpu()
37 struct msr_info rv; rdmsr_on_cpu()
53 struct msr_info rv; rdmsrl_on_cpu()
68 struct msr_info rv; wrmsr_on_cpu()
84 struct msr_info rv; wrmsrl_on_cpu()
101 struct msr_info rv; __rwmsr_on_cpus()
149 struct msr_info *rv = info; __rdmsr_safe_on_cpu()
156 struct msr_info *rv = info; __wrmsr_safe_on_cpu()
164 struct msr_info rv; rdmsr_safe_on_cpu()
180 struct msr_info rv; wrmsr_safe_on_cpu()
196 struct msr_info rv; wrmsrl_safe_on_cpu()
212 struct msr_info rv; rdmsrl_safe_on_cpu()
/linux-4.4.14/arch/x86/kvm/
H A Dpmu_intel.c199 static int intel_pmu_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) intel_pmu_set_msr() argument
203 u32 msr = msr_info->index; intel_pmu_set_msr()
204 u64 data = msr_info->data; intel_pmu_set_msr()
216 if (msr_info->host_initiated) { intel_pmu_set_msr()
231 if (!msr_info->host_initiated) intel_pmu_set_msr()
240 if (!msr_info->host_initiated) intel_pmu_set_msr()
H A Dpmu_amd.c126 static int amd_pmu_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) amd_pmu_set_msr() argument
130 u32 msr = msr_info->index; amd_pmu_set_msr()
131 u64 data = msr_info->data; amd_pmu_set_msr()
H A Dpmu.h27 int (*set_msr)(struct kvm_vcpu *vcpu, struct msr_data *msr_info);
110 int kvm_pmu_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info);
H A Dx86.c285 int kvm_set_apic_base(struct kvm_vcpu *vcpu, struct msr_data *msr_info) kvm_set_apic_base() argument
289 u64 new_state = msr_info->data & kvm_set_apic_base()
294 if (!msr_info->host_initiated && kvm_set_apic_base()
295 ((msr_info->data & reserved_bits) != 0 || kvm_set_apic_base()
303 kvm_lapic_set_base(vcpu, msr_info->data); kvm_set_apic_base()
2027 int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) kvm_set_msr_common() argument
2030 u32 msr = msr_info->index; kvm_set_msr_common()
2031 u64 data = msr_info->data; kvm_set_msr_common()
2077 return kvm_set_apic_base(vcpu, msr_info); kvm_set_msr_common()
2085 if (!msr_info->host_initiated) { kvm_set_msr_common()
2096 if (!msr_info->host_initiated) kvm_set_msr_common()
2112 if (vcpu->vcpu_id == 0 && !msr_info->host_initiated) { kvm_set_msr_common()
2181 return kvm_pmu_set_msr(vcpu, msr_info); kvm_set_msr_common()
2201 msr_info->host_initiated); kvm_set_msr_common()
2222 return kvm_pmu_set_msr(vcpu, msr_info); kvm_set_msr_common()
2284 int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) kvm_get_msr_common() argument
2286 switch (msr_info->index) { kvm_get_msr_common()
2303 msr_info->data = 0; kvm_get_msr_common()
2309 if (kvm_pmu_is_valid_msr(vcpu, msr_info->index)) kvm_get_msr_common()
2310 return kvm_pmu_get_msr(vcpu, msr_info->index, &msr_info->data); kvm_get_msr_common()
2311 msr_info->data = 0; kvm_get_msr_common()
2314 msr_info->data = 0x100000000ULL; kvm_get_msr_common()
2318 return kvm_mtrr_get_msr(vcpu, msr_info->index, &msr_info->data); kvm_get_msr_common()
2320 msr_info->data = 3; kvm_get_msr_common()
2334 msr_info->data = 1 << 24; kvm_get_msr_common()
2337 msr_info->data = kvm_get_apic_base(vcpu); kvm_get_msr_common()
2340 return kvm_x2apic_msr_read(vcpu, msr_info->index, &msr_info->data); kvm_get_msr_common()
2343 msr_info->data = kvm_get_lapic_tscdeadline_msr(vcpu); kvm_get_msr_common()
2346 msr_info->data = (u64)vcpu->arch.ia32_tsc_adjust_msr; kvm_get_msr_common()
2349 msr_info->data = vcpu->arch.ia32_misc_enable_msr; kvm_get_msr_common()
2352 if (!msr_info->host_initiated) kvm_get_msr_common()
2354 msr_info->data = vcpu->arch.smbase; kvm_get_msr_common()
2358 msr_info->data = 1000ULL; kvm_get_msr_common()
2360 msr_info->data |= (((uint64_t)4ULL) << 40); kvm_get_msr_common()
2363 msr_info->data = vcpu->arch.efer; kvm_get_msr_common()
2367 msr_info->data = vcpu->kvm->arch.wall_clock; kvm_get_msr_common()
2371 msr_info->data = vcpu->arch.time; kvm_get_msr_common()
2374 msr_info->data = vcpu->arch.apf.msr_val; kvm_get_msr_common()
2377 msr_info->data = vcpu->arch.st.msr_val; kvm_get_msr_common()
2380 msr_info->data = vcpu->arch.pv_eoi.msr_val; kvm_get_msr_common()
2388 return get_msr_mce(vcpu, msr_info->index, &msr_info->data); kvm_get_msr_common()
2399 msr_info->data = 0x20000000; kvm_get_msr_common()
2405 msr_info->index, &msr_info->data); kvm_get_msr_common()
2418 msr_info->data = 0xbe702111; kvm_get_msr_common()
2423 msr_info->data = vcpu->arch.osvw.length; kvm_get_msr_common()
2428 msr_info->data = vcpu->arch.osvw.status; kvm_get_msr_common()
2431 if (kvm_pmu_is_valid_msr(vcpu, msr_info->index)) kvm_get_msr_common()
2432 return kvm_pmu_get_msr(vcpu, msr_info->index, &msr_info->data); kvm_get_msr_common()
2434 vcpu_unimpl(vcpu, "unhandled rdmsr: 0x%x\n", msr_info->index); kvm_get_msr_common()
2437 vcpu_unimpl(vcpu, "ignored rdmsr: 0x%x\n", msr_info->index); kvm_get_msr_common()
2438 msr_info->data = 0; kvm_get_msr_common()
H A Dpmu.c274 int kvm_pmu_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) kvm_pmu_set_msr() argument
276 return kvm_x86_ops->pmu_ops->set_msr(vcpu, msr_info); kvm_pmu_set_msr()
H A Dsvm.c2990 static int svm_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) svm_get_msr() argument
2994 switch (msr_info->index) { svm_get_msr()
2996 msr_info->data = svm->vmcb->control.tsc_offset + svm_get_msr()
3002 msr_info->data = svm->vmcb->save.star; svm_get_msr()
3006 msr_info->data = svm->vmcb->save.lstar; svm_get_msr()
3009 msr_info->data = svm->vmcb->save.cstar; svm_get_msr()
3012 msr_info->data = svm->vmcb->save.kernel_gs_base; svm_get_msr()
3015 msr_info->data = svm->vmcb->save.sfmask; svm_get_msr()
3019 msr_info->data = svm->vmcb->save.sysenter_cs; svm_get_msr()
3022 msr_info->data = svm->sysenter_eip; svm_get_msr()
3025 msr_info->data = svm->sysenter_esp; svm_get_msr()
3033 msr_info->data = svm->vmcb->save.dbgctl; svm_get_msr()
3036 msr_info->data = svm->vmcb->save.br_from; svm_get_msr()
3039 msr_info->data = svm->vmcb->save.br_to; svm_get_msr()
3042 msr_info->data = svm->vmcb->save.last_excp_from; svm_get_msr()
3045 msr_info->data = svm->vmcb->save.last_excp_to; svm_get_msr()
3048 msr_info->data = svm->nested.hsave_msr; svm_get_msr()
3051 msr_info->data = svm->nested.vm_cr_msr; svm_get_msr()
3054 msr_info->data = 0x01000065; svm_get_msr()
3057 return kvm_get_msr_common(vcpu, msr_info); svm_get_msr()
3065 struct msr_data msr_info; rdmsr_interception() local
3067 msr_info.index = ecx; rdmsr_interception()
3068 msr_info.host_initiated = false; rdmsr_interception()
3069 if (svm_get_msr(&svm->vcpu, &msr_info)) { rdmsr_interception()
3073 trace_kvm_msr_read(ecx, msr_info.data); rdmsr_interception()
3076 msr_info.data & 0xffffffff); rdmsr_interception()
3078 msr_info.data >> 32); rdmsr_interception()
H A Dlapic.h70 int kvm_set_apic_base(struct kvm_vcpu *vcpu, struct msr_data *msr_info);
H A Dvmx.c2783 static int vmx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) vmx_get_msr() argument
2787 switch (msr_info->index) { vmx_get_msr()
2790 msr_info->data = vmcs_readl(GUEST_FS_BASE); vmx_get_msr()
2793 msr_info->data = vmcs_readl(GUEST_GS_BASE); vmx_get_msr()
2797 msr_info->data = to_vmx(vcpu)->msr_guest_kernel_gs_base; vmx_get_msr()
2801 return kvm_get_msr_common(vcpu, msr_info); vmx_get_msr()
2803 msr_info->data = guest_read_tsc(vcpu); vmx_get_msr()
2806 msr_info->data = vmcs_read32(GUEST_SYSENTER_CS); vmx_get_msr()
2809 msr_info->data = vmcs_readl(GUEST_SYSENTER_EIP); vmx_get_msr()
2812 msr_info->data = vmcs_readl(GUEST_SYSENTER_ESP); vmx_get_msr()
2817 msr_info->data = vmcs_read64(GUEST_BNDCFGS); vmx_get_msr()
2822 msr_info->data = to_vmx(vcpu)->nested.msr_ia32_feature_control; vmx_get_msr()
2827 return vmx_get_vmx_msr(vcpu, msr_info->index, &msr_info->data); vmx_get_msr()
2831 msr_info->data = vcpu->arch.ia32_xss; vmx_get_msr()
2834 if (!guest_cpuid_has_rdtscp(vcpu) && !msr_info->host_initiated) vmx_get_msr()
2838 msr = find_msr_entry(to_vmx(vcpu), msr_info->index); vmx_get_msr()
2840 msr_info->data = msr->data; vmx_get_msr()
2843 return kvm_get_msr_common(vcpu, msr_info); vmx_get_msr()
2856 static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) vmx_set_msr() argument
2861 u32 msr_index = msr_info->index; vmx_set_msr()
2862 u64 data = msr_info->data; vmx_set_msr()
2866 ret = kvm_set_msr_common(vcpu, msr_info); vmx_set_msr()
2897 kvm_write_tsc(vcpu, msr_info); vmx_set_msr()
2907 ret = kvm_set_msr_common(vcpu, msr_info); vmx_set_msr()
2910 ret = kvm_set_msr_common(vcpu, msr_info); vmx_set_msr()
2915 FEATURE_CONTROL_LOCKED && !msr_info->host_initiated)) vmx_set_msr()
2918 if (msr_info->host_initiated && data == 0) vmx_set_msr()
2940 if (!guest_cpuid_has_rdtscp(vcpu) && !msr_info->host_initiated) vmx_set_msr()
2961 ret = kvm_set_msr_common(vcpu, msr_info); vmx_set_msr()
5643 struct msr_data msr_info; handle_rdmsr() local
5645 msr_info.index = ecx; handle_rdmsr()
5646 msr_info.host_initiated = false; handle_rdmsr()
5647 if (vmx_get_msr(vcpu, &msr_info)) { handle_rdmsr()
5653 trace_kvm_msr_read(ecx, msr_info.data); handle_rdmsr()
5656 vcpu->arch.regs[VCPU_REGS_RAX] = msr_info.data & -1u; handle_rdmsr()
5657 vcpu->arch.regs[VCPU_REGS_RDX] = (msr_info.data >> 32) & -1u; handle_rdmsr()
9423 struct msr_data msr_info; nested_vmx_store_msr() local
9438 msr_info.host_initiated = false; nested_vmx_store_msr()
9439 msr_info.index = e.index; nested_vmx_store_msr()
9440 if (kvm_get_msr(vcpu, &msr_info)) { nested_vmx_store_msr()
9449 &msr_info.data, sizeof(msr_info.data))) { nested_vmx_store_msr()
9452 __func__, i, e.index, msr_info.data); nested_vmx_store_msr()
/linux-4.4.14/arch/x86/include/asm/
H A Dmsr.h23 struct msr_info { struct

Completed in 292 milliseconds