Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp714931rwd; Wed, 31 May 2023 04:34:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4FxFZkq2yJikr1VCUU4j5Y7ojbQwQJOjuUNVGJqP029rupu3wIqugOles373XyGa28WYxa X-Received: by 2002:a17:90b:4c06:b0:256:57e6:673b with SMTP id na6-20020a17090b4c0600b0025657e6673bmr5769701pjb.16.1685532888505; Wed, 31 May 2023 04:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685532888; cv=none; d=google.com; s=arc-20160816; b=V6ibU6l47F8P6w7C1guXtk59DVT+VOq42usSvBMqm0JHJQlqeducYynevkB7/i2uOo gBAcM3fijt2cnqPHCnC8tgqfAP4L10oYW5KL6kvtI80XOKZKhyJamWeEqlXlFNh8q49a jQGwNQDKnZntE7CyZ+HQlPET3a2GngTuJr/QDXl/PgKOXdRXiYvA7+UPZg7LdjIWWKe9 Rf/iX5UwUGAjHk6/R7WcR/HLbgf3ZenGSzWUmANOzKcE1vl3pWQu06fjLRUGtPKHn3Zi GigwmKEsM0BFVgPq2/3ku22VlJkID3vrTIJBxxT8aWJxutuW4gyb2wHF7dvm1SS6l4k0 mCiQ== 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:feedback-id :dkim-signature:dkim-signature; bh=aeL29fTibpX7OH1ns9iCpikawL6pyGgQIxFzUFIJ5mE=; b=E3j/Eo6rFHcoHHqkl0tVRkTC4BvAd3wd7yr61Q/urxUCmh46re3Wg43McS6kewFviK El0UrbFgmn3GtGqjc5VdAICUoQkPziR/t46VqdaSjqIq9hGy0n/Z9FT1BncbegNTe7k8 I9XcEpT7KMngzIT4Ev7/GTr6zajciDM+XfeNfEOlSSGFsHcJg+VQsHBFz3SecYEIbsPG QurLQZ0iLVjd7Qjt7Eo8bUpPZUT7Ld8fDoVtJspQ6EyvM6oP5lTohFjWMFJeZhiV/xVt +TduDL/zswF2X4HqkR2MAKUoGVCsB6HnQN3PvJhQGfNzF5uPnz9wYt5jF0JGzdR//u9k e3Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov.name header.s=fm2 header.b=xUDCGtes; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=CKpieIWY; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020a17090a578200b00246a75f49desi185440pji.112.2023.05.31.04.34.36; Wed, 31 May 2023 04:34:48 -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=@shutemov.name header.s=fm2 header.b=xUDCGtes; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=CKpieIWY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235289AbjEaLIK (ORCPT + 99 others); Wed, 31 May 2023 07:08:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232807AbjEaLIH (ORCPT ); Wed, 31 May 2023 07:08:07 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06B3C126; Wed, 31 May 2023 04:08:05 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 4D0625C00F1; Wed, 31 May 2023 07:08:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 31 May 2023 07:08:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1685531284; x= 1685617684; bh=aeL29fTibpX7OH1ns9iCpikawL6pyGgQIxFzUFIJ5mE=; b=x UDCGtesaL634GL9eXdFKoKL1s1Tz9Ll4uk1Af1BMnvQGH4j9+1PhPANaEaVE379R CdP85tpEg9YcUW2h5dFDnyNMAmMCkYWCYlWHtfBYAhuz7I36GZhVasYeXJhtrGKQ 9Lrd5hHztASe4grn656Fm1LxjoNjOG1JM3Ad9/lCi0sHtpjyf+ptypYz5yGO613d qh8+Kv3Y5LpM1E1ielOLRn5Ok/JsogZMAHdTruPsKoySspbI4+TYmoxqI/VIiBEP 9NSI/2t5My7odxwCZX0DKZDp9MOjZtjLzlE2tfb83C3rAyCOX0y3uoPoI2tB10/o jG1KAHIWcun/pGj4MxlRQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1685531284; x=1685617684; bh=aeL29fTibpX7O H1ns9iCpikawL6pyGgQIxFzUFIJ5mE=; b=CKpieIWYKmOkyyCDiuZP8D+PUVECt T2ErndCGQJp98RFqZNoUkT/fLhMhJ/86fqOlgcQFwHL1AieUk9bVGqVQwn4r+E2W f0BdsMG0bUxMm93eQ9DkRhxUnn/i/uxmRKJyngDMg7NgPssfHdpcqc4Ji8JdwWKu KcmycyZC8ziSkBHUUx0EKF81JTIo9p1nky54jRBkScT+6/Vtg8YxhCTisfVZ1PtQ DxAb3nZ6wlHPyxA4NCng2CaUSohgQo62Msc4qWAgBMoDuT6fhd6tjX3xJipyPlE8 6WncsmBPKzOXGkMG97UzW0dluJcZkHMNBSKLi7gH8TFXTIx7+dO3jVsvQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeekledgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdttddttddtvdenucfhrhhomhepfdfmihhr ihhllhcutedrucfuhhhuthgvmhhovhdfuceokhhirhhilhhlsehshhhuthgvmhhovhdrnh grmhgvqeenucggtffrrghtthgvrhhnpefhieeghfdtfeehtdeftdehgfehuddtvdeuheet tddtheejueekjeegueeivdektdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehkihhrihhllhesshhhuhhtvghmohhvrdhnrghmvg X-ME-Proxy: Feedback-ID: ie3994620:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 31 May 2023 07:08:00 -0400 (EDT) Received: by box.shutemov.name (Postfix, from userid 1000) id D69A310BD95; Wed, 31 May 2023 14:07:56 +0300 (+03) Date: Wed, 31 May 2023 14:07:56 +0300 From: "Kirill A. Shutemov" To: Thomas Gleixner Cc: Tom Lendacky , Sean Christopherson , LKML , x86@kernel.org, David Woodhouse , Andrew Cooper , Brian Gerst , Arjan van de Veen , Paolo Bonzini , Paul McKenney , Oleksandr Natalenko , Paul Menzel , "Guilherme G. Piccoli" , Piotr Gorski , Usama Arif , Juergen Gross , Boris Ostrovsky , xen-devel@lists.xenproject.org, Russell King , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Guo Ren , linux-csky@vger.kernel.org, Thomas Bogendoerfer , linux-mips@vger.kernel.org, "James E.J. Bottomley" , Helge Deller , linux-parisc@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , linux-riscv@lists.infradead.org, Mark Rutland , Sabin Rapan , "Michael Kelley (LINUX)" , Dave Hansen Subject: Re: [patch] x86/smpboot: Fix the parallel bringup decision Message-ID: <20230531110756.g4cz2tjnc7ypskre@box.shutemov.name> References: <87jzwqjeey.ffs@tglx> <87cz2ija1e.ffs@tglx> <20230530122951.2wu5rwcu26ofov6f@box.shutemov.name> <87wn0pizbl.ffs@tglx> <87leh5iom8.ffs@tglx> <8751e955-e975-c6d4-630c-02912b9ef9da@amd.com> <871qiximen.ffs@tglx> <87ilc9gd2d.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ilc9gd2d.ffs@tglx> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Wed, May 31, 2023 at 09:44:26AM +0200, Thomas Gleixner wrote: > The decision to allow parallel bringup of secondary CPUs checks > CC_ATTR_GUEST_STATE_ENCRYPT to detect encrypted guests. Those cannot use > parallel bootup because accessing the local APIC is intercepted and raises > a #VC or #VE, which cannot be handled at that point. > > The check works correctly, but only for AMD encrypted guests. TDX does not > set that flag. > > As there is no real connection between CC attributes and the inability to > support parallel bringup, replace this with a generic control flag in > x86_cpuinit and let SEV-ES and TDX init code disable it. > > Fixes: 0c7ffa32dbd6 ("x86/smpboot/64: Implement arch_cpuhp_init_parallel_bringup() and enable it") > Reported-by: Kirill A. Shutemov > Signed-off-by: Thomas Gleixner Tested-by: Kirill A. Shutemov -- Kiryl Shutsemau / Kirill A. Shutemov