diff options
author | Mike Waychison <mikew@google.com> | 2011-07-23 03:31:45 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-09-25 12:17:58 -0400 |
commit | d1613ad5d0018a009bd4865b0fa5930abb5ed259 (patch) | |
tree | b901e359168ad8b5721a9b3ea094431635712586 | |
parent | 14fa67ee95d4f7313fbf149fe37faccb903857c8 (diff) |
KVM: Really fix HV_X64_MSR_APIC_ASSIST_PAGE
Commit 0945d4b228 tried to fix the get_msr path for the
HV_X64_MSR_APIC_ASSIST_PAGE msr, but was poorly tested. We should be
returning 0 if the read succeeded, and passing the value back to the
caller via the pdata out argument, not returning the value directly.
Signed-off-by: Mike Waychison <mikew@google.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | arch/x86/kvm/x86.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index e80f0d7c2c0d..6cb353c83a12 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -1826,7 +1826,8 @@ static int get_msr_hyperv(struct kvm_vcpu *vcpu, u32 msr, u64 *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: | 1828 | case HV_X64_MSR_APIC_ASSIST_PAGE: |
1829 | return vcpu->arch.hv_vapic; | 1829 | data = vcpu->arch.hv_vapic; |
1830 | break; | ||
1830 | default: | 1831 | default: |
1831 | pr_unimpl(vcpu, "Hyper-V unhandled rdmsr: 0x%x\n", msr); | 1832 | pr_unimpl(vcpu, "Hyper-V unhandled rdmsr: 0x%x\n", msr); |
1832 | return 1; | 1833 | return 1; |