Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp8027817rwl; Thu, 23 Mar 2023 11:34:22 -0700 (PDT) X-Google-Smtp-Source: AKy350aj7N5Mkzp4Ha8hTVF5GhC4QME1V8cacd2dpBxt1A3u5dTFgdxD+B2kwK2IrMQ96WwmT7x8 X-Received: by 2002:a05:6402:202:b0:4fb:59bb:ce6f with SMTP id t2-20020a056402020200b004fb59bbce6fmr345722edv.35.1679596462117; Thu, 23 Mar 2023 11:34:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679596462; cv=pass; d=google.com; s=arc-20160816; b=Z62xW3rmlwPwGAmHHZn0oZ4YSFJUaXWGOr+Zk25teXfbtTwYuAsVj+Vr9OKq7p9OQC YIpKWGjJd2r9l+yju/fCHZMOKYx3atxgeI9VUpTO+/sCRilJx2W/tOPlSiee7LyFc7Fi eRlmjdaHCnZH4h3gHU1RZZHFkCietA7HhdzPOWDYCnRQTvQCuiRrKj3MF66VedIhXWp4 T8GyDKEDkWnMIjZhmcw8GVgOnoNWMLTllb0vw4OU+do29OC1MJ2OOjhLZxuyjWnbwbiD yKiKfpLf/oS3WCKtEH/qlrzsXcJKOjsXsPV3suHnYT5RlH2TlY/CkoDr4U/4CMAvK1uR kuug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature; bh=Wl227QzWtprzs2Acd+G561gMA+OsNwnDcjRriI5KEM0=; b=cBBgfco/FXy0UnXvJa3iastFi7A9bVMgWLM0aGdg5qeDT/h9kmIQbSlsRYteYgWeNu gStuKaOjJC578EaEKYI4Jf5cmDGOPea/PvY1Q9bQojBLsyReUzx7v/fRzupFUPbTrmp3 LuT7ZkUBjtigWSRp6ZA/GZSvs28uxH2aioevCtDYzK1c4wHuWvOn3CPm+rLzJ9noCYz1 Fpb6NWZZ7VwixiFzq+pVSP/EoWbycd3jMugTUvZV4Ab+RcxsC0Daw1AsuJuZuO2YNHCb EjAIZlpGstseP2eJrE5aeCLvrZfL4vvMawmpommpbIdxy82trbjmcZvckAYlR18fivA8 vZ+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=2udb98OB; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7-20020aa7d987000000b004c03a4171b1si17477802eds.56.2023.03.23.11.33.45; Thu, 23 Mar 2023 11:34:22 -0700 (PDT) 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=@amd.com header.s=selector1 header.b=2udb98OB; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230463AbjCWS2t (ORCPT + 99 others); Thu, 23 Mar 2023 14:28:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229708AbjCWS2r (ORCPT ); Thu, 23 Mar 2023 14:28:47 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2067.outbound.protection.outlook.com [40.107.237.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B32A10AB8; Thu, 23 Mar 2023 11:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fDzSJRXkOHD5fm9OdAVJIrn3OQ+xGPYOnIEjEI+XAjyxeKfAP/5+fkvukanBk7SgqHw6nlsMxojJeVh7ho+v4ejw9BZPnINn409FsYQEEkodO0O2Q0M26vBzDvDm7oDmpOM5LgfYJ8CyCofe+Pp5Lsmg4nkBgK/I5CbMYCyzbva+6jFv+qr55FHU00dczZJnXm029TDq9Bn3d+qDdFflret0rJBhbrrSc/aaRBfZZ7DqFQ6i+Tw44Kq52UjXotE56aRn/2/6gEwHeOSPuoO0GglS16S/wAROeyiMbUzmchD6BqrE02XWWiok7OpR42pfYK46ZHFnNBJ0As+SmjyLTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Wl227QzWtprzs2Acd+G561gMA+OsNwnDcjRriI5KEM0=; b=I+luw208awt8LMCmzTTG/EXlsMNzea6KXRrduKRlRYC55Bn0iKDRNkChqr+WXLeRHk6JODF3pogtG5Eljq91TA1O258ZLchaPLIlj/L1EN4uAzCu8mKI6RIKR7TuG97WGZd1or5S0Yn6QDEjMI08D/zxwq785BBZP+3bpAotKQ+6vlVXQVHgn2be0DpKxDotVf0HiaT/lOEpmQDySwJ7ArLt4m4KpHY+5j4/RtVnRUdYVEWnqgTjTEYWT+ukV+dhROEmvUUJ/9AL6A/4O0IUouov5U1viwtYogUawRG3wfDwuc7LK//HSYPaN/n+GpO1+gsBKwsCvB5OGN+dRCkajQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Wl227QzWtprzs2Acd+G561gMA+OsNwnDcjRriI5KEM0=; b=2udb98OBPLsaoCHM+qe4oCn6oV9o8sbpyHFfeu3zAKb8mWhXS4juusU5UZpwgdysimRg14lDvKj8SatVlIKaxdg/OxskduFB/I0Mq/jkIu9KulsQ/KxF/JeThQDJ5Pv+XcJ4AbNfwVempvSkz3hc5lZ+0ePa3DfQAvQkJvD6eMI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) by MN2PR12MB4536.namprd12.prod.outlook.com (2603:10b6:208:263::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Thu, 23 Mar 2023 18:28:42 +0000 Received: from DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::5b56:bf13:70be:ea60]) by DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::5b56:bf13:70be:ea60%6]) with mapi id 15.20.6178.037; Thu, 23 Mar 2023 18:28:42 +0000 Message-ID: <19ec60aa-fa11-c44e-a6d1-9583f2e7707a@amd.com> Date: Thu, 23 Mar 2023 13:28:38 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v16 8/8] x86/smpboot: Allow parallel bringup for SEV-ES To: "Woodhouse, David" , "usama.arif@bytedance.com" , "bp@alien8.de" Cc: "kvm@vger.kernel.org" , "brgerst@gmail.com" , "arjan@linux.intel.com" , "hewenliang4@huawei.com" , "dave.hansen@linux.intel.com" , "simon.evans@bytedance.com" , "linux-kernel@vger.kernel.org" , "mingo@redhat.com" , "oleksandr@natalenko.name" , "kim.phillips@amd.com" , "tglx@linutronix.de" , "fam.zheng@bytedance.com" , "mimoja@mimoja.de" , "seanjc@google.com" , "liangma@liangbit.com" , "pbonzini@redhat.com" , "hpa@zytor.com" , "punit.agrawal@bytedance.com" , "pmenzel@molgen.mpg.de" , "piotrgorski@cachyos.org" , "gpiccoli@igalia.com" , "paulmck@kernel.org" , "Rapan, Sabin" , "rcu@vger.kernel.org" , "x86@kernel.org" References: <20230321194008.785922-1-usama.arif@bytedance.com> <20230321194008.785922-9-usama.arif@bytedance.com> <20230322224735.GAZBuFh9ld6FuYEyoH@fat_crate.local> <2c3dd773-31ca-d4b1-78a2-b39f3785c7c5@amd.com> <751f572f940220775054dc09324b20b929d7d66d.camel@amazon.co.uk> Content-Language: en-US From: Tom Lendacky In-Reply-To: <751f572f940220775054dc09324b20b929d7d66d.camel@amazon.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: CH2PR14CA0022.namprd14.prod.outlook.com (2603:10b6:610:60::32) To DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR12MB5229:EE_|MN2PR12MB4536:EE_ X-MS-Office365-Filtering-Correlation-Id: 42f9d9e4-52a8-4570-1a69-08db2bcc6dd9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Pu/INOTsl8/YVKgz5vShmTDkF5PkPJtig4WiH5t/dLzCUaMHKsYBI57pgqDkX9MIA9q4EAe3RfBLD655vQBqcjMCyhno7BKcChPLW2F3WOamkdHou8B4OTdwO6DAM4jcWcUnR5tBuD7uOHY/IyRPpP6vf41xEOtT+5Dty3wGvtLk+bjbrlFncTJHB+rk1dMorXGzCfjcPB27ZLUh9RfEPuJUkpD2edK69Hs5LMrqBwuL7n7LoCj4LJS3PP8QYEYsKiq2R34g+0DHAHMaPgj/2EIL+D/GjOk5av3GW09xePmwMUVeVQiQ53Yxa02MuJi/SiJtd4dNMm8DP3dPciPLj1PaPiO5+BEhdBMqByxLSJLYM1hItjiVglxaeyNWjGYTH4TVbVE4VFntqupCp4fJ89Um1eXR+8owvQp30voh3lRLukaN0sdTfvJdJqGMUCCgGw/8T+vhRb5OnrTMS2/VX1Zq5KdbOzGKqX+6PUNlaoZHBPVOyECCGbSAZtwlNgM217ymNjzlZ5elej7hfY3nQjL/EZPPTGP3amyvoKy3Y45a1xIXI1erWRmMrDoKOVJ2Ar8B9Z7P7pTztNosarjYgDgAg2/IHjErhySDyWkS8km+FGOaky3qXbqewkEtLxq6eVPO0XpsbOUBXyePqkelr4TJJHF+U561UvmvWnWx7T0lq5fezcphi+S6wbNo6I7mx5Pr6LdZqnAfviW/xmdAzy0Q/6HkStPA101JjqY/0Rs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5229.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(39860400002)(366004)(396003)(376002)(136003)(346002)(451199018)(31686004)(8936002)(66946007)(66476007)(66556008)(41300700001)(4326008)(8676002)(86362001)(36756003)(38100700002)(6512007)(6506007)(53546011)(31696002)(26005)(83380400001)(2616005)(186003)(6666004)(316002)(478600001)(6486002)(54906003)(110136005)(5660300002)(2906002)(7416002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?c2N1N29mcU11TkJXd3ZqbnZkQVg2RmVPcURIWTZ0S2M1TEM2aW5POTFIS0pY?= =?utf-8?B?Nmk5ekg0Und6QUp2azFmRDQxb0pOYnR1dDJjbHVXeFJHUFQ4N21KMDAya1V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yL0YzVmZHejVTd1hVQTUySnJLUk5uV2hP?= =?utf-8?B?Nndtdm91M1M1ckw1QWJzOXRLR1h2bWY1cG9nZXJqVkxvRjdEMnhSM0hEdkRs?= =?utf-8?B?NndSWVFvVHc3cEVmUkovWmpvYThlQ3lpN2cvenptYjFHcVA0TW5wd0Z4TmlV?= =?utf-8?B?VGF1eVdQb2N3WTVnNkZDRDEwWlVHQmFOREJLVTlmdVpCQU82ZjRCeVo5QnRs?= =?utf-8?Q?kM0jJttCjvFiemv5KGDMfg/Lh?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42f9d9e4-52a8-4570-1a69-08db2bcc6dd9 X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5229.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2023 18:28:42.0886 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Kf7Bw4+8wyD+HUjouyRiRcHD800WtQJoOts/crp+KvmJcJc1Z2xrdgcQtwaJ3GY4vpUrkJvCKQgdXTOZK59TVA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4536 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=unavailable 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 3/23/23 10:34, Woodhouse, David wrote: > On Thu, 2023-03-23 at 08:16 -0500, Tom Lendacky wrote: >> >> Maybe call this sev_early_get_cpuid_0b() or such to imply that the MSR >> protocol is being used and only retrieving / returning edx. > > Or indeed sev_early_get_apicid() since that's what it's actually doing, > and the caller doesn't care *how*. Sounds good. > >> Also, since it is a function now and can be used at any point, the current >> GHCB MSR should be saved on entry and restored on exit. > > Well, I don't know that it should be callable at any point. This is > only supposed to be called from head_64.S. I agree. But once it's there, someone somewhere in the future may look and go, oh, I can call this. So I think it either needs a nice comment above it about how it is currently used/called and what to do if it needs to be called from someplace other than head_64.S or the MSR needs to be saved/restored. Thanks, Tom > > > > > > Amazon Development Centre (London) Ltd. Registered in England and Wales with registration number 04543232 with its registered office at 1 Principal Place, Worship Street, London EC2A 2FA, United Kingdom. > > >