Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1592290rwb; Thu, 19 Jan 2023 12:44:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXvk0J/B0JouGvidu4k5lLWqSf2tb1OVA4XabEVtoUdTAcX1AgFqv+H7uj8cyxpCwuiS2ECD X-Received: by 2002:aa7:85c4:0:b0:58d:bb58:e928 with SMTP id z4-20020aa785c4000000b0058dbb58e928mr11778695pfn.32.1674161077786; Thu, 19 Jan 2023 12:44:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674161077; cv=none; d=google.com; s=arc-20160816; b=sSCiX+mdZW2faLXpDN9zO0pzt8phQvbTByVRmQa5C5df0amCvvIVVrH4vqRh0YHs77 Y/Hd12nYX/ZUeQFkHFepBJmJDED/M7kln7ZjT8rhWDbUfgq+0PItS+Ch+I4462/PWlz3 GPkd6a8XQ/BbLvacB3kSmQ2LpTBIAheGIjq+Y/9POl+/p50Ue/+s/kjUvGdsf+W+PR7t fIgJ9cO7PgA8/8IOCil5EnW3BgeDAxUPv6J+ggLmaR7+YzherJdV5pjxEC+peG1Qz5cF W/McqsEQK5ba2ZkOYhS0hm980H51l4Q0jOkCxqB/Jyh8mgIBjKF+hRAlDhEMJlpYNXWV qF7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:references:in-reply-to:user-agent:subject:cc:to:from :date:dkim-signature:dkim-filter; bh=KFNC6n5tjG56AZ6QGCCnA813vxZPvPdVzmseUKYQm/I=; b=SrZgOC+Ccx/nDTes/CcO7Qvw0lg5MIt6YwIiloocOa/cabYlDHyJiuS2je84pNMrV1 8npVr/+zmcGgL1rDe2wz/YY8/0OanXiFY4VE6lAJNMzxsmHB9mpdk1L2JwHC6kuVTA7G oMFM0IE92co0NbxfvMbMm/B/8t8EJ9gdnEwY212Rc4WyzMJIQPlsSJntzorEs+h/2bUV DS6K7G99q9BB1ClC+81a2Ud8fH/EyNSHCoPQx1xdBiv+tHq9rTRJyEtzibl/X5w9Cpx6 V0fn4beZLo9ju094zUIzRJPzYCFsXNiCX/zPOwjM3JH5hyBzfKe3UIBEvnx2B+5wW0D8 ahtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2023010601 header.b=TfwjDirp; 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=zytor.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay29-20020a056a00301d00b0058dd544fab0si7660918pfb.101.2023.01.19.12.44.31; Thu, 19 Jan 2023 12:44:37 -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=@zytor.com header.s=2023010601 header.b=TfwjDirp; 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=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230403AbjASTgL (ORCPT + 46 others); Thu, 19 Jan 2023 14:36:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230254AbjASTgI (ORCPT ); Thu, 19 Jan 2023 14:36:08 -0500 Received: from mail.zytor.com (unknown [IPv6:2607:7c80:54:3::138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13E434DCEC for ; Thu, 19 Jan 2023 11:36:03 -0800 (PST) Received: from [127.0.0.1] ([73.223.250.219]) (authenticated bits=0) by mail.zytor.com (8.17.1/8.17.1) with ESMTPSA id 30JJZ95D909956 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Thu, 19 Jan 2023 11:35:09 -0800 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 30JJZ95D909956 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2023010601; t=1674156911; bh=KFNC6n5tjG56AZ6QGCCnA813vxZPvPdVzmseUKYQm/I=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=TfwjDirpObGhbZuqhQo/OjXlYctFSVNIqq7knSM29fRDfZ2tQke+RwtNnj4zfQlUu Bq7qw2iSUSh4dJSDm7i/EaoS584mAtH8JI0HxllkzWt3z0T8MZU4Yg0NjdsZBw+YZK ZfM4pgmJ0Ook31LrNi0G4ZIduvwtcQZqBqp0unnHdEG7AuhbJIo+R1m0AcjiUZ0cRr NKhVSWrU3s9CUZaUwpuO6d8p7hTU5Lu7doD4erJ735/nqwxXHrIi/r4/iUAE4IvqIK 0aAr/sWn86woN3PLoEzLyYRrgoztLvaP7svvxfNwZ4ItddpzPXF3KsA96J5mrIBTMy XnFHIg1J9H7Nw== Date: Thu, 19 Jan 2023 11:35:06 -0800 From: "H. Peter Anvin" To: Peter Zijlstra , x86@kernel.org, Joan Bruguera CC: 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?= , jroedel@suse.de, kirill.shutemov@linux.intel.com, dave.hansen@intel.com, kai.huang@intel.com Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_v2_1/7=5D_x86/boot=3A_Remove_ve?= =?US-ASCII?Q?rify=5Fcpu=28=29_from_secondary=5Fstartup=5F64=28=29?= User-Agent: K-9 Mail for Android In-Reply-To: References: <20230116142533.905102512@infradead.org> <20230116143645.589522290@infradead.org> Message-ID: <5718C98C-C07A-4BD1-9182-7F3A8BDBC605@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 On January 18, 2023 1:45:44 AM PST, Peter Zijlstra = wrote: >On Mon, Jan 16, 2023 at 03:25:34PM +0100, Peter Zijlstra wrote: >> The boot trampolines from trampoline_64=2ES have code flow like: >>=20 >> 16bit BIOS SEV-ES 64bit EFI >>=20 >> 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() :=3D head_64=2ES:secondary_startup_64() >>=20 >> Since AP bringup always goes through the 16bit BIOS path (EFI doesn't >> touch the APs), there is already a verify_cpu() invocation=2E > >So supposedly TDX/ACPI-6=2E4 comes in on trampoline_startup64() for APs -= - >can any of the TDX capable folks tell me if we need verify_cpu() on >these? > >Aside from checking for LM, it seems to clear XD_DISABLE on Intel and >force enable SSE on AMD/K7=2E Surely none of that is needed for these >shiny new chips? > >I mean, I can hack up a patch that adds verify_cpu() to the 64bit entry >point, but it seems really sad to need that on modern systems=2E Sad, perhaps, but really better for orthogonality =E2=80=93 fewer special = cases=2E