mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 16:55:08 +07:00
KVM: X86: Do the same ignore_msrs check for feature msrs
Logically the ignore_msrs and report_ignored_msrs should also apply to feature MSRs. Add them in. Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20200622220442.21998-3-peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
6abe9c1386
commit
12bc2132b1
@ -2359,7 +2359,7 @@ static int svm_get_msr_feature(struct kvm_msr_entry *msr)
|
|||||||
msr->data |= MSR_F10H_DECFG_LFENCE_SERIALIZE;
|
msr->data |= MSR_F10H_DECFG_LFENCE_SERIALIZE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return 1;
|
return KVM_MSR_RET_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1815,7 +1815,7 @@ static int vmx_get_msr_feature(struct kvm_msr_entry *msr)
|
|||||||
msr->data = vmx_get_perf_capabilities();
|
msr->data = vmx_get_perf_capabilities();
|
||||||
return 0;
|
return 0;
|
||||||
default:
|
default:
|
||||||
return 1;
|
return KVM_MSR_RET_INVALID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1412,8 +1412,7 @@ static int kvm_get_msr_feature(struct kvm_msr_entry *msr)
|
|||||||
rdmsrl_safe(msr->index, &msr->data);
|
rdmsrl_safe(msr->index, &msr->data);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (kvm_x86_ops.get_msr_feature(msr))
|
return kvm_x86_ops.get_msr_feature(msr);
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1425,6 +1424,13 @@ static int do_get_msr_feature(struct kvm_vcpu *vcpu, unsigned index, u64 *data)
|
|||||||
|
|
||||||
msr.index = index;
|
msr.index = index;
|
||||||
r = kvm_get_msr_feature(&msr);
|
r = kvm_get_msr_feature(&msr);
|
||||||
|
|
||||||
|
if (r == KVM_MSR_RET_INVALID) {
|
||||||
|
/* Unconditionally clear the output for simplicity */
|
||||||
|
*data = 0;
|
||||||
|
r = kvm_msr_ignored_check(vcpu, index, 0, false);
|
||||||
|
}
|
||||||
|
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user