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