Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4279370pxj; Wed, 12 May 2021 01:55:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJws9qVZdAEit//xFHYmX2B7H4XlJz52WtwiMONr3ieWwIczwS6x24XHDEClPkpAhrFR5cE5 X-Received: by 2002:a50:cd57:: with SMTP id d23mr41128204edj.5.1620809724427; Wed, 12 May 2021 01:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620809724; cv=none; d=google.com; s=arc-20160816; b=SlpD8pArMePCYk/7MTVwC2OYYigTGTDJ7c4mh8+cmWh4tRNJoSQvv3em7/QopZge0/ JOsfkyYjDedxXJZIGfHN2cy61zWkIAh8sSrY2ryEOVLOSxOCXAes2Ah5WQsESQuDGr78 tIldyG7VenHzap3Scc7gpKs8PMp/qIinvdD2CjUhEDNAwGFxXa4UmoHFWpBSIcU7G7XM GI5jLpU4p+eNjvYpCmNM30snKHMG7RPcda5wxN94CgPHNn8xVNliMj+AXrs0ETjPoxch CZitqBQDBrkyD76hgIe2X+u2Ykf6v6cguXs8cUU17kBbPII36wTpyKmNPH+dW9nxzQVa l9ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/MqLJ4rj5L9md7sMeoP8AyNO73HQlye6pz1itww7fL0=; b=zfpL+pBmdc4NYG1IN6mtul2P7iRztSg8dl3lR8youHVtPCtO54GHWwX5oL05nKh573 DYBRGlfmIvhvkQJS0ySRonspYu6wWyEndfczYlS1l5Bxj5+aXZVqv69iNvgHZs+Z3h4T vfmTCMvxmQ8R2uTq4FVk5G9sreGtapeQR1PGPZylPGuzTgnbhhgxmMcbjRHu+gkiQ/Ge sPO1iFz27TrOf7cvd38f9j3XvwLTGLu3aEKk6E0PK7kBCrTyRgGoeoW+QweX4IwC6QZF fN60qz5v22tssbUssn0ki3H/P8BMc72EFuHw581epd2Oy5++PAe9T84SOfgxgn/9wXXZ fkcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VH7QEH+8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g18si10650081ejb.311.2021.05.12.01.55.00; Wed, 12 May 2021 01:55:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VH7QEH+8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230401AbhELIxF (ORCPT + 99 others); Wed, 12 May 2021 04:53:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230295AbhELIxE (ORCPT ); Wed, 12 May 2021 04:53:04 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1ABDCC061574 for ; Wed, 12 May 2021 01:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=/MqLJ4rj5L9md7sMeoP8AyNO73HQlye6pz1itww7fL0=; b=VH7QEH+8UXpc3iQM9a9fSnn8j9 ydrqlOcHTf/nuBBN6RYNYWugp5wJry3Pq3ucdVgzZHOXD5owD43L8bVJkWC/n8dZPrD7OPlT41by0 qOtDPCblF2WKGl8eruNFA3LckTJmeynOg7tPf9jtkMRbeDWZ0ycfH0wyQJpK/wrFLA5y9TV/mP5xF DHv200DgV9vIiybbWAI6SNzleG0yHr2ZJOZjro0EGefQT7A37crZm1UI40x1fdVnm+Y3C/WmhMRel Q/Hf325Ekd4sVcQcM5USRQmiKZA1Y1vNzgHVYf2UonpMatEb8D7v20dR1r3nhjcUQA3z1lNISxtLF +QcoHrYQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lgkZ6-0086jG-0Y; Wed, 12 May 2021 08:50:32 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 76E3C3001E1; Wed, 12 May 2021 10:49:59 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5D35B29CB9DBF; Wed, 12 May 2021 10:49:59 +0200 (CEST) Date: Wed, 12 May 2021 10:49:59 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: Lai Jiangshan , LKML , x86@kernel.org, Joerg Roedel , Borislav Petkov Subject: Re: [patch 1/2 v2] x86/cpu: Init AP exception handling from cpu_init_secondary() Message-ID: References: <20210507110210.147106915@linutronix.de> <20210507114000.429303187@linutronix.de> <87wns8ko48.ffs@nanos.tec.linutronix.de> <87k0o6gtvu.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k0o6gtvu.ffs@nanos.tec.linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 10, 2021 at 11:29:25PM +0200, Thomas Gleixner wrote: > +#ifdef CONFIG_SMP > +void cpu_init_secondary(void) > +{ /* * Relies on the BP having set-up the IDT tables, which * are loaded on this CPU in the below * cpu_init_exception_handling(). */ > + cpu_init_exception_handling(); > + cpu_init(); > +} > +#endif Or something along those lines? It took me a little to figure out why start_secondary() didn't have idt_setup_traps(), hopefully something like this will avoid a little future confusion.