x86/hyper-V: Allocate the IDT entry early in boot

Allocate the hypervisor callback IDT entry early in the boot sequence.

The previous code would allocate the entry as part of registering the handler
when the vmbus driver loaded, and this caused a problem for the IDT cleanup
that Thomas is working on for v4.15.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: apw@canonical.com
Cc: devel@linuxdriverproject.org
Cc: gregkh@linuxfoundation.org
Cc: jasowang@redhat.com
Cc: olaf@aepfle.de
Link: http://lkml.kernel.org/r/20170908231557.2419-1-kys@exchange.microsoft.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

K. Y. Srinivasan and committed by
Ingo Molnar
213ff44a 30c1bbff

+2 -2
+2 -2
arch/x86/kernel/cpu/mshyperv.c
··· 59 void hv_setup_vmbus_irq(void (*handler)(void)) 60 { 61 vmbus_handler = handler; 62 - /* Setup the IDT for hypervisor callback */ 63 - alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector); 64 } 65 66 void hv_remove_vmbus_irq(void) ··· 249 */ 250 x86_platform.apic_post_init = hyperv_init; 251 hyperv_setup_mmu_ops(); 252 #endif 253 } 254
··· 59 void hv_setup_vmbus_irq(void (*handler)(void)) 60 { 61 vmbus_handler = handler; 62 } 63 64 void hv_remove_vmbus_irq(void) ··· 251 */ 252 x86_platform.apic_post_init = hyperv_init; 253 hyperv_setup_mmu_ops(); 254 + /* Setup the IDT for hypervisor callback */ 255 + alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector); 256 #endif 257 } 258