Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp272566pxb; Thu, 2 Sep 2021 03:58:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9FG1rn7OKfJ2BYQS23VOfvLhrIPNhl/jPCZnYv9i74Ff6GkqL/LrqHG2sS6pbbngi/Voe X-Received: by 2002:a05:6402:366:: with SMTP id s6mr2862686edw.329.1630580328300; Thu, 02 Sep 2021 03:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630580328; cv=none; d=google.com; s=arc-20160816; b=Q+epmcefPFBLJLZ497zufawToxNaLWLsMAE9+U4SPeX3LfPZBtb1KuvlOPaveX3CDE 16F1Z076WtC4Eqo/SnkguqDIuYrkOn5L1hyDe5mmUdgIYmGX120Qz8pDERQifrIUSFjX 623BMJX1JYq631ppcPB76Qio7oEdZoYGJL986t+oVoI5Rdfq3ijtBdSAWyR2tqBrs73W MrXcMszywqmuSm5V2H4Xh64GBKIR7pDu6b/3mysRUsmyfz7DiDo/r00DeukYZJj5qATG U7HEPqS+LGRLl/s4W2Khp7fHyQyAP8PvZa2Efb2U84xqNJwiwKN5Qj3bIidaKA5m7S/+ DupA== 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=xRZI+EF7Bb02HlmhwHew/8U98K28CzYAN65inQkPbLA=; b=UEGnDlt2KHdOq/AHnRv0Q/8OyXNY+C8qAOMgYo1YnvpooRei5DuuiDuVV5kTXaokQ4 GXljbrzBs5b4dXjWhYTSjZSeCRQhmQtiF9I7roymWgfzf37PQcoYhDWieyqIYGZag8K2 H/fk/87wcg7gg3Ynn89HwfYx0P8wlNrIDA8Bl2fXlWbafCFON+ovou0gDzyh7FcheL3T VzKNSMVwWOHGSP1hggCWdf3YiHcVumogTm/OLWQdKHglzIPgIVPaZGaVALuJ2WM0mQPW dIICUZq1gZDfzcP6IGP2PWdttIjStIevcRm2IyYzuIhvzQ4NZj5Cy3PJFAeFsCi1QrDD DJzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="qgwUZG/c"; 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 dm19si1605335edb.276.2021.09.02.03.58.13; Thu, 02 Sep 2021 03:58:48 -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="qgwUZG/c"; 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 S237125AbhIBK4B (ORCPT + 99 others); Thu, 2 Sep 2021 06:56:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233761AbhIBK4A (ORCPT ); Thu, 2 Sep 2021 06:56:00 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29CFAC061575 for ; Thu, 2 Sep 2021 03:55:02 -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=xRZI+EF7Bb02HlmhwHew/8U98K28CzYAN65inQkPbLA=; b=qgwUZG/cFtFFmCiMx1IAFICojh 7f+SYg96TVtEcKoLz294qVnFHbDWbjrJd2j+kqW133UQ+BxcHU2Au9HHWps9azq2TRqXcezFZ7Y5/ 08FUDzdXgjuyfo+hnflXXnTPqJfmqjxjJLo0SyuIuyhRsKkxdqtlZGiFJD/DTGrTQYNjgj0qTCUaK pHq3Vv9yJxKZAT147cfr5AFOtbjWgQ6HkB9UeGlsW0BprwWDk1WlyrQQSFkbZsuJkscbbTIPodzXA PXO7c2bR9km4keuJe333Kh3qIyfyojkCSiz1r6WuiDnf74Vf313kNBUfBO8aTfryLvkrKzwx4bwJ3 DpsGReSw==; 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 #2 (Red Hat Linux)) id 1mLkIG-003OPI-OB; Thu, 02 Sep 2021 10:50:36 +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 20D6B30029F; Thu, 2 Sep 2021 12:50:03 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 054722B1DE8E8; Thu, 2 Sep 2021 12:50:02 +0200 (CEST) Date: Thu, 2 Sep 2021 12:50:02 +0200 From: Peter Zijlstra To: Lai Jiangshan Cc: Joerg Roedel , Lai Jiangshan , linux-kernel@vger.kernel.org, Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Daniel Bristot de Oliveira , Brijesh Singh , Andy Shevchenko , Arvind Sankar , Chester Lin , Juergen Gross , andrew.cooper3@citrix.com Subject: Re: [PATCH 02/24] x86/traps: Move arch/x86/kernel/traps.c to arch/x86/entry/ Message-ID: References: <20210831175025.27570-1-jiangshanlai@gmail.com> <20210831175025.27570-3-jiangshanlai@gmail.com> <1f327579-e62a-df65-0763-e88243829db3@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1f327579-e62a-df65-0763-e88243829db3@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 02, 2021 at 05:21:51PM +0800, Lai Jiangshan wrote: > > > On 2021/9/2 16:09, Joerg Roedel wrote: > > On Wed, Sep 01, 2021 at 01:50:03AM +0800, Lai Jiangshan wrote: > > > arch/x86/entry/Makefile | 5 ++++- > > > arch/x86/{kernel => entry}/traps.c | 0 > > > arch/x86/kernel/Makefile | 5 +---- > > > 3 files changed, 5 insertions(+), 5 deletions(-) > > > rename arch/x86/{kernel => entry}/traps.c (100%) > > > > From looking over the patch-set I didn't spot the reason for putting the > > entry C code into traps.c. Can you explain that please? Otherwise I'd > > prefer to create a new file, like arch/x86/entry/entry64.c. > > > I agree, and I think Peter is handling it. I don't think I said that. I said I like the patches but there's a lot of scary code and details to review, which takes time. I've now done a second reading of the patches and provided some more feedback, but I'm very sure I didn't get to the scary details yet. One thing that got pointed out (by Andrew Cooper) is that by moving the whole SWAPGS trainwreck to C it becomes entirely 'trivial' to sneak in an 'accidental' per-cpu reference before having done the SWAPGS dance. I'm myself not (yet) convinced that's a good enough reason to leave it in ASM, but it does certainly need consideration.