aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2017-09-08 19:15:57 -0400
committerIngo Molnar <mingo@kernel.org>2017-09-13 05:02:26 -0400
commit213ff44ae4eb5224010166db2f851e4eea068268 (patch)
tree8f6d3a7b581978fa9e7304056d470c5455096764
parent30c1bbffe629985d86bf68796a224ea4eac2685b (diff)
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>
-rw-r--r--arch/x86/kernel/cpu/mshyperv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 3b3f713e15e5..236324e83a3a 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -59,8 +59,6 @@ void hyperv_vector_handler(struct pt_regs *regs)
59void hv_setup_vmbus_irq(void (*handler)(void)) 59void hv_setup_vmbus_irq(void (*handler)(void))
60{ 60{
61 vmbus_handler = handler; 61 vmbus_handler = handler;
62 /* Setup the IDT for hypervisor callback */
63 alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector);
64} 62}
65 63
66void hv_remove_vmbus_irq(void) 64void hv_remove_vmbus_irq(void)
@@ -251,6 +249,8 @@ static void __init ms_hyperv_init_platform(void)
251 */ 249 */
252 x86_platform.apic_post_init = hyperv_init; 250 x86_platform.apic_post_init = hyperv_init;
253 hyperv_setup_mmu_ops(); 251 hyperv_setup_mmu_ops();
252 /* Setup the IDT for hypervisor callback */
253 alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector);
254#endif 254#endif
255} 255}
256 256