[PATCH QEMU-KVM 26/34] test: Use xapic_write() to enable xapic()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



apic_write() depends on apic_ops, which is shared among cpus and
can be modified if another cpu enabled x2apic.  Use xapic_write()
which is race-proof.

Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
---
 kvm/user/test/lib/x86/apic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kvm/user/test/lib/x86/apic.c b/kvm/user/test/lib/x86/apic.c
index 16e51bc..1fc3888 100644
--- a/kvm/user/test/lib/x86/apic.c
+++ b/kvm/user/test/lib/x86/apic.c
@@ -139,7 +139,7 @@ void ioapic_write_redir(unsigned line, ioapic_redir_entry_t e)
 void enable_apic(void)
 {
     printf("enabling apic\n");
-    apic_write(0xf0, 0x1ff); /* spurious vector register */
+    xapic_write(0xf0, 0x1ff); /* spurious vector register */
 }
 
 void mask_pic_interrupts(void)
-- 
1.6.4.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux