From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 168F4C47E49 for ; Wed, 23 Oct 2019 22:35:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EAACA2064A for ; Wed, 23 Oct 2019 22:35:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407905AbfJWWfo (ORCPT ); Wed, 23 Oct 2019 18:35:44 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:51240 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405970AbfJWWfn (ORCPT ); Wed, 23 Oct 2019 18:35:43 -0400 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iNPE0-0002HD-Ee; Thu, 24 Oct 2019 00:35:29 +0200 Date: Thu, 24 Oct 2019 00:35:27 +0200 (CEST) From: Thomas Gleixner To: Josh Poimboeuf cc: LKML , x86@kernel.org, Peter Zijlstra , Andy Lutomirski , Will Deacon , Paolo Bonzini , kvm@vger.kernel.org, linux-arch@vger.kernel.org, Mike Rapoport , Miroslav Benes Subject: Re: [patch V2 03/17] x86/traps: Remove pointless irq enable from do_spurious_interrupt_bug() In-Reply-To: <20191023213107.m7ishskghswktspp@treble> Message-ID: References: <20191023122705.198339581@linutronix.de> <20191023123117.871608831@linutronix.de> <20191023213107.m7ishskghswktspp@treble> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1616076872-1571870128=:1852" X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1616076872-1571870128=:1852 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Wed, 23 Oct 2019, Josh Poimboeuf wrote: > On Wed, Oct 23, 2019 at 02:27:08PM +0200, Thomas Gleixner wrote: > > That function returns immediately after conditionally reenabling interrupts which > > is more than pointless and requires the ASM code to disable interrupts again. > > > > Signed-off-by: Thomas Gleixner > > --- > > arch/x86/kernel/traps.c | 1 - > > 1 file changed, 1 deletion(-) > > > > --- a/arch/x86/kernel/traps.c > > +++ b/arch/x86/kernel/traps.c > > @@ -871,7 +871,6 @@ do_simd_coprocessor_error(struct pt_regs > > dotraplinkage void > > do_spurious_interrupt_bug(struct pt_regs *regs, long error_code) > > { > > - cond_local_irq_enable(regs); > > } > > I think we can just remove this handler altogether. The Intel and AMD > manuals say vector 15 (X86_TRAP_SPURIOUS) is reserved. Right, but this has history. Pentium Pro Erratum: PROBLEM: If the APIC subsystem is configured in mixed mode with Virtual Wire mode implemented through the local APIC, an interrupt vector of 0Fh (Intel reserved encoding) may be generated by the local APIC (Int 15). This vector may be generated upon receipt of a spurious interrupt (an interrupt which is removed before the system receives the INTA sequence) instead of the programmed 8259 spurious interrupt vector. IMPLICATION: The spurious interrupt vector programmed in the 8259 is normally handled by an operating system’s spurious interrupt handler. However, a vector of 0Fh is unknown to some operating systems, which would crash if this erratum occurred. Initially (2.1.) there was a printk() in that handler, which later got ifdeffed out (2.1.54). So I rather keep that thing at least as long as we support PPro :) Even if we ditch that the handler is not really hurting anyone. Thanks, tglx --8323329-1616076872-1571870128=:1852--