Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932534AbdIHIUA (ORCPT ); Fri, 8 Sep 2017 04:20:00 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:54147 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753827AbdIHITz (ORCPT ); Fri, 8 Sep 2017 04:19:55 -0400 Date: Fri, 8 Sep 2017 10:19:52 +0200 (CEST) From: Thomas Gleixner To: LKML cc: Stephen Hemminger , Simon Xiao , KY Srinivasan , Haiyang Zhang , Steven Rostedt , Peter Zijlstra , Linus Torvalds , Josh Poimboeuf , "H. Peter Anvin" , Denys Vlasenko , Brian Gerst , Borislav Petkov , Andy Lutomirski Subject: [PATCH] x86/idt: Unbreak MS HyperV hypercall vector install Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1144 Lines: 30 The rework of the IDT setup changed the way how unused system gates are accounted. At the end of the gate initialization all unused gates in the system vector area are set to the spurios handler and marked as used for consistency reasons. Marking them as used breaks MS HyperV because it installs its hypercall vector after that point and the installation is guarded by the bit in the used_vectors map. So the hyperv vector stays directed to the spurious interrupt handler. Leave them marked as unused again and unbreak HyperV that way. Fixes: dc20b2d52653 ("x86/idt: Move interrupt gate initialization to IDT code") Reported-by: Stephen Hemminger Signed-off-by: Thomas Gleixner --- arch/x86/kernel/idt.c | 1 - 1 file changed, 1 deletion(-) --- a/arch/x86/kernel/idt.c +++ b/arch/x86/kernel/idt.c @@ -320,7 +320,6 @@ void __init idt_setup_apic_and_irq_gates for_each_clear_bit_from(i, used_vectors, NR_VECTORS) { #ifdef CONFIG_X86_LOCAL_APIC - set_bit(i, used_vectors); set_intr_gate(i, spurious_interrupt); #else entry = irq_entries_start + 8 * (i - FIRST_EXTERNAL_VECTOR);