Lines Matching defs:msr

190 static void synic_exit(struct kvm_vcpu_hv_synic *synic, u32 msr)
196 hv_vcpu->exit.u.synic.msr = msr;
205 u32 msr, u64 data, bool host)
213 trace_kvm_hv_synic_set_msr(vcpu->vcpu_id, msr, data, host);
216 switch (msr) {
220 synic_exit(synic, msr);
239 synic_exit(synic, msr);
251 synic_exit(synic, msr);
264 ret = synic_set_sint(synic, msr - HV_X64_MSR_SINT0, data, host);
291 if (vcpu->run->hyperv.u.syndbg.msr == HV_X64_MSR_SYNDBG_CONTROL)
297 static void syndbg_exit(struct kvm_vcpu *vcpu, u32 msr)
303 hv_vcpu->exit.u.syndbg.msr = msr;
314 static int syndbg_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host)
322 vcpu_to_hv_vcpu(vcpu)->vp_index, msr, data);
323 switch (msr) {
327 syndbg_exit(vcpu, msr);
341 syndbg_exit(vcpu, msr);
353 static int syndbg_get_msr(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata, bool host)
360 switch (msr) {
384 vcpu_to_hv_vcpu(vcpu)->vp_index, msr,
390 static int synic_get_msr(struct kvm_vcpu_hv_synic *synic, u32 msr, u64 *pdata,
399 switch (msr) {
416 *pdata = atomic64_read(&synic->sint[msr - HV_X64_MSR_SINT0]);
926 static bool kvm_hv_msr_partition_wide(u32 msr)
930 switch (msr) {
1136 static int kvm_hv_set_msr_pw(struct kvm_vcpu *vcpu, u32 msr, u64 data,
1142 switch (msr) {
1180 msr - HV_X64_MSR_CRASH_P0,
1206 return syndbg_set_msr(vcpu, msr, data, host);
1209 msr, data);
1225 static int kvm_hv_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host)
1229 switch (msr) {
1302 return synic_set_msr(vcpu_to_synic(vcpu), msr, data, host);
1307 int timer_index = (msr - HV_X64_MSR_STIMER0_CONFIG)/2;
1316 int timer_index = (msr - HV_X64_MSR_STIMER0_COUNT)/2;
1329 msr, data);
1336 static int kvm_hv_get_msr_pw(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata,
1343 switch (msr) {
1358 msr - HV_X64_MSR_CRASH_P0,
1376 return syndbg_get_msr(vcpu, msr, pdata, host);
1378 vcpu_unimpl(vcpu, "Hyper-V unhandled rdmsr: 0x%x\n", msr);
1386 static int kvm_hv_get_msr(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata,
1392 switch (msr) {
1414 return synic_get_msr(vcpu_to_synic(vcpu), msr, pdata, host);
1419 int timer_index = (msr - HV_X64_MSR_STIMER0_CONFIG)/2;
1428 int timer_index = (msr - HV_X64_MSR_STIMER0_COUNT)/2;
1440 vcpu_unimpl(vcpu, "Hyper-V unhandled rdmsr: 0x%x\n", msr);
1447 int kvm_hv_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host)
1449 if (kvm_hv_msr_partition_wide(msr)) {
1453 r = kvm_hv_set_msr_pw(vcpu, msr, data, host);
1457 return kvm_hv_set_msr(vcpu, msr, data, host);
1460 int kvm_hv_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata, bool host)
1462 if (kvm_hv_msr_partition_wide(msr)) {
1466 r = kvm_hv_get_msr_pw(vcpu, msr, pdata, host);
1470 return kvm_hv_get_msr(vcpu, msr, pdata, host);