[PATCH kvm-unit-tests 1/2] apic: use boot idt instead of a locally allocated idt

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

 



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

Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
---
 x86/apic.c |   16 +---------------
 1 files changed, 1 insertions(+), 15 deletions(-)

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();
 
-- 
1.7.3.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