[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54775A6B.9060905@redhat.com>
Date: Thu, 27 Nov 2014 18:07:55 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Radim Krčmář <rkrcmar@...hat.com>,
linux-kernel@...r.kernel.org
CC: kvm@...r.kernel.org
Subject: Re: [PATCH] KVM: x86: use MSR_ICR instead of a number
On 26/11/2014 17:07, Radim Krčmář wrote:
> 0x830 MSR is 0x300 xAPIC MMIO, which is MSR_ICR.
>
> Signed-off-by: Radim Krčmář <rkrcmar@...hat.com>
> ---
> This applies on top of Amit's
> [PATCH v2] KVM: x86: Fix reserved x2apic registers
> in which I noticed this minor deficit.
>
> arch/x86/kvm/lapic.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index 9c90d31..687874f 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -1887,7 +1887,7 @@ int kvm_x2apic_msr_write(struct kvm_vcpu *vcpu, u32 msr, u64 data)
> return 1;
>
> /* if this is ICR write vector before command */
> - if (msr == 0x830)
> + if (reg == APIC_ICR)
> apic_reg_write(apic, APIC_ICR2, (u32)(data >> 32));
> return apic_reg_write(apic, reg, (u32)data);
> }
> @@ -1908,7 +1908,7 @@ int kvm_x2apic_msr_read(struct kvm_vcpu *vcpu, u32 msr, u64 *data)
>
> if (apic_reg_read(apic, reg, 4, &low))
> return 1;
> - if (msr == 0x830)
> + if (reg == APIC_ICR)
> apic_reg_read(apic, APIC_ICR2, 4, &high);
>
> *data = (((u64)high) << 32) | low;
>
Applied, thanks.
Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists