diff --git a/hypervisor/arch/x86/irq.c b/hypervisor/arch/x86/irq.c index c0a4d1946..7ec2c1b3d 100644 --- a/hypervisor/arch/x86/irq.c +++ b/hypervisor/arch/x86/irq.c @@ -445,6 +445,14 @@ void init_default_irqs(uint16_t cpu_id) } } +static void set_idt(struct host_idt_descriptor *idtd) +{ + + asm volatile (" lidtq %[idtd]\n" : /* no output parameters */ + : /* input parameters */ + [idtd] "m"(*idtd)); +} + void interrupt_init(uint16_t pcpu_id) { struct host_idt_descriptor *idtd = &HOST_IDTR; diff --git a/hypervisor/include/arch/x86/boot/idt.h b/hypervisor/include/arch/x86/boot/idt.h index e68354989..652ae3560 100644 --- a/hypervisor/include/arch/x86/boot/idt.h +++ b/hypervisor/include/arch/x86/boot/idt.h @@ -74,14 +74,6 @@ struct host_idt_descriptor { extern struct host_idt HOST_IDT; extern struct host_idt_descriptor HOST_IDTR; -static inline void set_idt(struct host_idt_descriptor *idtd) -{ - - asm volatile (" lidtq %[idtd]\n" : /* no output parameters */ - : /* input parameters */ - [idtd] "m"(*idtd)); -} - #endif /* end #ifndef ASSEMBLER */ #endif /* IDT_H */