[COMMIT master] apic: use boot idt instead of a locally allocated idt

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

 



From: Avi Kivity <avi@xxxxxxxxxx>

This allows the smp support, which uses the boot idt, to work.

Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>

diff --git a/x86/apic.c b/x86/apic.c
index 48fa0f7..165f820 100644
--- a/x86/apic.c
+++ b/x86/apic.c
@@ -89,7 +89,7 @@ asm (
 #endif
     );
 
-static idt_entry_t idt[256];
+static idt_entry_t *idt = 0;
 
 static int g_fail;
 static int g_tests;
@@ -127,19 +127,6 @@ void test_enable_x2apic(void)
     }
 }
 
-static void init_idt(void)
-{
-    struct {
-        u16 limit;
-        ulong idt;
-    } __attribute__((packed)) idt_ptr = {
-        sizeof(idt_entry_t) * 256 - 1,
-        (ulong)&idt,
-    };
-
-    asm volatile("lidt %0" : : "m"(idt_ptr));
-}
-
 static void set_idt_entry(unsigned vec, void (*func)(isr_regs_t *regs))
 {
     u8 *thunk = vmalloc(50);
@@ -296,7 +283,6 @@ int main()
     mask_pic_interrupts();
     enable_apic();
     test_enable_x2apic();
-    init_idt();
 
     test_self_ipi();
 
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM Development]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Walks]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux