summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2014-11-26 11:07:05 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2014-12-04 09:29:05 -0500
commitdecdc28382b93dc642b83b32758b7440036cab76 (patch)
tree4cde6dd4bc8c8a4d9a4bac766418dee5b48492a4 /arch
parentc69d3d9bc168b31de2072bf91c7e6879943b1381 (diff)
KVM: x86: use MSR_ICR instead of a number
0x830 MSR is 0x300 xAPIC MMIO, which is MSR_ICR. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/lapic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 1b9bf964f3e4..3634303218a3 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)
1887 return 1; 1887 return 1;
1888 1888
1889 /* if this is ICR write vector before command */ 1889 /* if this is ICR write vector before command */
1890 if (msr == 0x830) 1890 if (reg == APIC_ICR)
1891 apic_reg_write(apic, APIC_ICR2, (u32)(data >> 32)); 1891 apic_reg_write(apic, APIC_ICR2, (u32)(data >> 32));
1892 return apic_reg_write(apic, reg, (u32)data); 1892 return apic_reg_write(apic, reg, (u32)data);
1893} 1893}
@@ -1908,7 +1908,7 @@ int kvm_x2apic_msr_read(struct kvm_vcpu *vcpu, u32 msr, u64 *data)
1908 1908
1909 if (apic_reg_read(apic, reg, 4, &low)) 1909 if (apic_reg_read(apic, reg, 4, &low))
1910 return 1; 1910 return 1;
1911 if (msr == 0x830) 1911 if (reg == APIC_ICR)
1912 apic_reg_read(apic, APIC_ICR2, 4, &high); 1912 apic_reg_read(apic, APIC_ICR2, 4, &high);
1913 1913
1914 *data = (((u64)high) << 32) | low; 1914 *data = (((u64)high) << 32) | low;