Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4542517rwb; Tue, 17 Jan 2023 02:09:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXvPqoS3Wh6KPGWDRf+LKQtlgCHYrOEwiwidAVEmhCjACIk97t0pSQB6xukRsV0BgulUb6g7 X-Received: by 2002:a05:6a20:ba4:b0:b6:478b:e98a with SMTP id i36-20020a056a200ba400b000b6478be98amr23052071pzh.47.1673950149794; Tue, 17 Jan 2023 02:09:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673950149; cv=none; d=google.com; s=arc-20160816; b=QmzEIp4Jd4IIpxtHS6ikRRx99cYCRJiGGLSf6vFZbWzWPc2pf0XSNq6zjmsFog78DS xG8sWmBTZ8Odouhbd6n/5q3rwe6eKZArpxRYA9eTTwpKpu45dRLYA8Yz86Pt51wnGrM7 TUvthoMjGPDCZCIQEdY6KB7jO7gzr61Fis7Tftx2AqpeBpmNukzt2uXe7CnDNRBVAorX ft5QL7SwQstJH6A2ZmwpBG+/jDF7AM5HyDN4JvPbtFeYDoQBC4sOwkr+e7nHMNQMZD0X zo3iu8zqzOWApY2r9POvG9pNIyeZDyb6Q2Ve/rrkYTEaqs77nuKjy9cwv5APfZirJute ej9A== 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:sender:dkim-signature; bh=exVmUOS71oVOAqiELfUuXDuaGik6dNbe+Gp7QyuOUb8=; b=GKoX5pGHk9DtQbxFEUzWVDF09U/m04KQ8T6P1iu6FYYqGTSDnl4+euCbB1DNuWTKky Nbn8NGnsaR/qvvJSts1Q61wY7hZoE35PP/rfuMu+yjSh/YUGR4NI8LlckXH9rK0yYY3N 5wFLyyuVuYMvVMtdYQo/A2Qqt8Ie092Gup6nsNv3LijIFUvJHfNG0brHp/rcCL6COIGb 4Vht2RE5u+oCY9tgg5uNEI9hC3NTC1uVHjjCSq9/I62TmiesVSUq92fIZKSYtPBqC4uS v6SK1jEc23RgrbkblNY0LWD1ph2MIe9FOm5Cx/RCVNt61Uv+lh9ahGlIFKJnPdD/k6Sd h5KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GpMinRaS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r132-20020a632b8a000000b00478a09699f8si4065748pgr.126.2023.01.17.02.09.03; Tue, 17 Jan 2023 02:09:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GpMinRaS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236635AbjAQJ20 (ORCPT + 49 others); Tue, 17 Jan 2023 04:28:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236577AbjAQJ1l (ORCPT ); Tue, 17 Jan 2023 04:27:41 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A73221F5EF for ; Tue, 17 Jan 2023 01:26:03 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id u19so73823153ejm.8 for ; Tue, 17 Jan 2023 01:26:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=exVmUOS71oVOAqiELfUuXDuaGik6dNbe+Gp7QyuOUb8=; b=GpMinRaS96fMLTxeHgP6Jtmqj9EhhkeoXQsvfQH8lrHGiCaqLd72g0fB9soxTwRier JlE3/pwdPSu/kOk7S9xJQ83vcthyeqA4CqwB1zRMHvcUCngcYebAClrC2HO3RFGGvhrR Q6vQDWVqaVhEwUDFyqWuM8hpLBdfP1YPrglsx0ubhV8Bz02IpG0sEsI8iBYTQawXD12c 7sqIT9NzVYEvMokLZVa0GEqrYIuo8kGf54k9JY0VfSZdUN+r5j0snoaBNGmJ8RjxbRNa ZI2x7Rj2WV3xzIfLu0PYIPsoqr9c97+xP/RgFiiseQpzwH8EB+aF/x9HpAm/hTbpvbxd H1bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=exVmUOS71oVOAqiELfUuXDuaGik6dNbe+Gp7QyuOUb8=; b=dodUa8SDE+iz+gkLEZCNUJH3hRGdXNdRA1PoPk9oXFGU50pZzMxDUAudc7JFUhwfpG YC2kLNOVhJdWA6IhiMmFH8ASyB+x5nKPkqa+N68/jZzS1bGywOpwRJFoLnxAYhUW9ef3 K3RJR4xC/jSAHS5CW2dUNgjRLXME9VD37H4zQTT94SmYmf8slBHFDwfz6o1gzeJlDBNr rCn4m41td+VDvnACWycdWE1ChulGUFeqWOM9uHMR51oMVYeYOrXX2J5qsxpl1G3A/7Ri cv4WsuFUDroG45uvfrGB8MBY2HrxxIGxjyx7PLoaURGWNwBcBvxZ0m7cIGVz0xUl3XLV 8iyw== X-Gm-Message-State: AFqh2krG765jisegvcAjyjJV7ZtetA8+me73Y+Qopnee9S9/Uhf2W732 BVhQUX7LLEGaMxW/9ZNfip8= X-Received: by 2002:a17:907:c618:b0:868:b2b6:ee71 with SMTP id ud24-20020a170907c61800b00868b2b6ee71mr2275817ejc.6.1673947561671; Tue, 17 Jan 2023 01:26:01 -0800 (PST) Received: from gmail.com (1F2EF7EB.nat.pool.telekom.hu. [31.46.247.235]) by smtp.gmail.com with ESMTPSA id vo16-20020a170907a81000b0086dc174caf2sm3692018ejc.220.2023.01.17.01.26.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 01:26:01 -0800 (PST) Sender: Ingo Molnar Date: Tue, 17 Jan 2023 10:25:58 +0100 From: Ingo Molnar To: Peter Zijlstra Cc: x86@kernel.org, Joan Bruguera , linux-kernel@vger.kernel.org, Juergen Gross , "Rafael J. Wysocki" , xen-devel , Jan Beulich , Roger Pau Monne , Kees Cook , mark.rutland@arm.com, Andrew Cooper , =?iso-8859-1?Q?J=F6rg_R=F6del?= , "H. Peter Anvin" , jroedel@suse.de Subject: Re: [PATCH v2 1/7] x86/boot: Remove verify_cpu() from secondary_startup_64() Message-ID: References: <20230116142533.905102512@infradead.org> <20230116143645.589522290@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230116143645.589522290@infradead.org> X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Peter Zijlstra wrote: > The boot trampolines from trampoline_64.S have code flow like: > > 16bit BIOS SEV-ES 64bit EFI > > trampoline_start() sev_es_trampoline_start() trampoline_start_64() > verify_cpu() | | > switch_to_protected: <---------------' v > | pa_trampoline_compat() > v | > startup_32() <-----------------------------------------------' > | > v > startup_64() > | > v > tr_start() := head_64.S:secondary_startup_64() oh ... this nice flow chart should move into a prominent C comment I think, it's far too good to be forgotten in an Git commit changelog. > Since AP bringup always goes through the 16bit BIOS path (EFI doesn't > touch the APs), there is already a verify_cpu() invocation. > > Removing the verify_cpu() invocation from secondary_startup_64() > renders the whole secondary_startup_64_no_verify() thing moot, so > remove that too. > > Cc: jroedel@suse.de > Cc: hpa@zytor.com > Fixes: e81dc127ef69 ("x86/callthunks: Add call patching for call depth tracking") > Reported-by: Joan Bruguera > Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Thanks, Ingo