* [PATCH] KVM: x86: use MSR_ICR instead of a number
@ 2014-11-26 16:07 Radim Krčmář
2014-11-27 17:07 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Radim Krčmář @ 2014-11-26 16:07 UTC (permalink / raw)
To: linux-kernel; +Cc: kvm, Paolo Bonzini
0x830 MSR is 0x300 xAPIC MMIO, which is MSR_ICR.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.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;
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: x86: use MSR_ICR instead of a number
2014-11-26 16:07 [PATCH] KVM: x86: use MSR_ICR instead of a number Radim Krčmář
@ 2014-11-27 17:07 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2014-11-27 17:07 UTC (permalink / raw)
To: Radim Krčmář, linux-kernel; +Cc: kvm
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@redhat.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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-27 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-26 16:07 [PATCH] KVM: x86: use MSR_ICR instead of a number Radim Krčmář
2014-11-27 17:07 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.