Commit cd283252 authored by Paolo Bonzini's avatar Paolo Bonzini

KVM: VMX: support MSR_IA32_ARCH_CAPABILITIES as a feature MSR

This lets userspace read the MSR_IA32_ARCH_CAPABILITIES and check that all
requested features are available on the host.
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 786b71f5
...@@ -1092,6 +1092,7 @@ static u32 msr_based_features[] = { ...@@ -1092,6 +1092,7 @@ static u32 msr_based_features[] = {
MSR_F10H_DECFG, MSR_F10H_DECFG,
MSR_IA32_UCODE_REV, MSR_IA32_UCODE_REV,
MSR_IA32_ARCH_CAPABILITIES,
}; };
static unsigned int num_msr_based_features; static unsigned int num_msr_based_features;
...@@ -1100,7 +1101,8 @@ static int kvm_get_msr_feature(struct kvm_msr_entry *msr) ...@@ -1100,7 +1101,8 @@ static int kvm_get_msr_feature(struct kvm_msr_entry *msr)
{ {
switch (msr->index) { switch (msr->index) {
case MSR_IA32_UCODE_REV: case MSR_IA32_UCODE_REV:
rdmsrl(msr->index, msr->data); case MSR_IA32_ARCH_CAPABILITIES:
rdmsrl_safe(msr->index, &msr->data);
break; break;
default: default:
if (kvm_x86_ops->get_msr_feature(msr)) if (kvm_x86_ops->get_msr_feature(msr))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment