aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Waychison <mikew@google.com>2011-07-21 18:38:10 -0400
committerAvi Kivity <avi@redhat.com>2011-09-25 12:17:58 -0400
commit14fa67ee95d4f7313fbf149fe37faccb903857c8 (patch)
tree37bb43f42e4ba4758788300bcf2eb7a1ed6069fb
parent2b3c246a682c50f5415c71fc5387a114a6f0d643 (diff)
KVM: x86: get_msr support for HV_X64_MSR_APIC_ASSIST_PAGE
"get" support for the HV_X64_MSR_APIC_ASSIST_PAGE msr was missing, even though it is explicitly enumerated as something the vmm should save in msrs_to_save and reported to userland via the KVM_GET_MSR_INDEX_LIST ioctl. Add "get" support for HV_X64_MSR_APIC_ASSIST_PAGE. We simply return the guest visible value of this register, which seems to be correct as a set on the register is validated for us already. Signed-off-by: Mike Waychison <mikew@google.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 41dfebea6218..e80f0d7c2c0d 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1825,6 +1825,8 @@ static int get_msr_hyperv(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
1825 return kvm_hv_vapic_msr_read(vcpu, APIC_ICR, pdata); 1825 return kvm_hv_vapic_msr_read(vcpu, APIC_ICR, pdata);
1826 case HV_X64_MSR_TPR: 1826 case HV_X64_MSR_TPR:
1827 return kvm_hv_vapic_msr_read(vcpu, APIC_TASKPRI, pdata); 1827 return kvm_hv_vapic_msr_read(vcpu, APIC_TASKPRI, pdata);
1828 case HV_X64_MSR_APIC_ASSIST_PAGE:
1829 return vcpu->arch.hv_vapic;
1828 default: 1830 default:
1829 pr_unimpl(vcpu, "Hyper-V unhandled rdmsr: 0x%x\n", msr); 1831 pr_unimpl(vcpu, "Hyper-V unhandled rdmsr: 0x%x\n", msr);
1830 return 1; 1832 return 1;