This allows other callers to use desc.c without conflict. Fixes apic.flat failure with -smp 2. Signed-off-by: Avi Kivity <avi@xxxxxxxxxx> --- lib/x86/smp.c | 23 ++--------------------- 1 files changed, 2 insertions(+), 21 deletions(-) diff --git a/lib/x86/smp.c b/lib/x86/smp.c index 0d8bae8..d4c8106 100644 --- a/lib/x86/smp.c +++ b/lib/x86/smp.c @@ -42,26 +42,6 @@ asm ( #endif ); - -static void set_ipi_descriptor(void (*ipi_entry)(void)) -{ - unsigned short *desc = (void *)(IPI_VECTOR * sizeof(long) * 2); - unsigned short cs; - unsigned long ipi = (unsigned long)ipi_entry; - - asm ("mov %%cs, %0" : "=r"(cs)); - desc[0] = ipi; - desc[1] = cs; - desc[2] = 0x8e00; - desc[3] = ipi >> 16; -#ifdef __x86_64__ - desc[4] = ipi >> 32; - desc[5] = ipi >> 48; - desc[6] = 0; - desc[7] = 0; -#endif -} - void spin_lock(struct spinlock *lock) { int v = 1; @@ -134,7 +114,8 @@ void smp_init(void) _cpu_count = fwcfg_get_nb_cpus(); - set_ipi_descriptor(ipi_entry); + setup_idt(); + set_idt_entry(IPI_VECTOR, ipi_entry, 0); setup_smp_id(0); for (i = 1; i < cpu_count(); ++i) -- 1.7.6.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