Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4756233rwd; Tue, 30 May 2023 09:24:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ49ZZJl2ylC+P804t8gFaIDwV/pjGvfBsEOhsGhCgpOjbzWzUfhD38MiDUUnUg3uXJeSKMc X-Received: by 2002:a17:902:f68e:b0:1ac:6b92:70c8 with SMTP id l14-20020a170902f68e00b001ac6b9270c8mr2840023plg.48.1685463877575; Tue, 30 May 2023 09:24:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685463877; cv=none; d=google.com; s=arc-20160816; b=P9Qzv6PYbMhWoMCpBgOwhqexl/2DUf3B0PI2Hq+mGgcuwXbGRqFhyo+YtmFnn/Nr6i efuPv14ULQoWBxaN4MusMQHywbPrB9P9wpyfWvwQils6T2SVE72qeGYOg4GUz218n3D/ YyeHGbIkDfPkZUX1BjuF7binadOwPTTSSdBJ4Vt23ICzkct/DiTT6Pquh++pOZO8/Bx0 gfiB9Om5BxutAaNPn9wJTrjaUZ3/fPKbY1ypRiQz/KbYL2fLMzW64JRQXVbKNiSmGSi0 a4ctFmeClxM+hWgkhaDL3FmewU7c0f//Mn2QI9iZyx1iKYLn+lkojVApeZ6k/Kf/UVkK yrtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=m93yS995VjAenJm1Tq30bXHcCehNtX8a6hAD3sks2W4=; b=oDy123GN4B0aRiNDAAgAG+0cy3UTvl/W2s5WsFxcehjqj5KL8skcOwKla8tj2UIgDZ 1n0ZlXzRmC2dzl55WQFVwuD86bZzDBCQqiUCgCaH9N5RrH/9dOpuBbNxdtN25sm65qao mDcIQ6rzyTRHiiRInTb1s86S4irfXbr5VXjUlZE1UC9k5z27jM1lr7+SxTweR4luEtiS U9uKmvBWATuR1BS88sgdyO3oMnIEqRxcAEu03O5c78Q6OCmV54ZIWzUofktAEeISFRN1 VVq07VbayT4sWFQjV/IemKDGVYvcgZNYv2FNh38QMD+8QHZiKkCnB/9KiZg9XF8/QDnL kYPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=AfBAWRGV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=kHOcw6J0; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e15-20020a17090301cf00b001b04a379cd2si32516plh.348.2023.05.30.09.24.23; Tue, 30 May 2023 09:24:37 -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=@linutronix.de header.s=2020 header.b=AfBAWRGV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=kHOcw6J0; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231663AbjE3QAx (ORCPT + 99 others); Tue, 30 May 2023 12:00:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233089AbjE3QAu (ORCPT ); Tue, 30 May 2023 12:00:50 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B074B2; Tue, 30 May 2023 09:00:49 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1685462447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=m93yS995VjAenJm1Tq30bXHcCehNtX8a6hAD3sks2W4=; b=AfBAWRGV89Mc653n/xLqy7vteib+6M5/l2mZj+wR8AGKO3PMoCQnprQPz2JjGFxvFh3npR 75LwJDM0EE4g+P7BnJV6fDBo0D5A2wsMq2qcoO+Epgc1++GT/hm/IsyZQlfl88sd3wNdLj HacEZyX2iikiKMUlVpHMaBRfI2+ABpbUurQzM9ir/bGUnTaJbVHwLys+6ejBpuK/Ql2gfK 8t5edlP2m1H7BWSDdUEp+QUPxhedXZYO6JcbMtV5DS0rwT2VI36zKlSE9ot+0iGtjPkQ+7 L4moXOZFPonmdPVRaj68CTj/NyhRRfgqXsWZ04Esn64uoqL2rtpo8bp2DKqCyA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1685462447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=m93yS995VjAenJm1Tq30bXHcCehNtX8a6hAD3sks2W4=; b=kHOcw6J0QHtLvp0yEL0d0xC3npNrA5vZH/XdZXuEI3If84/jq/yLIElk56Kjr2Nz9yF9mV nI3pJZIHdR0bsSDw== To: "Kirill A. Shutemov" , Tom Lendacky Cc: LKML , x86@kernel.org, David Woodhouse , Andrew Cooper , Brian Gerst , Arjan van de Veen , Paolo Bonzini , Paul McKenney , Sean Christopherson , 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: Disable parallel bootup if cc_vendor != NONE In-Reply-To: <20230530122951.2wu5rwcu26ofov6f@box.shutemov.name> References: <20230524204818.3tjlwah2euncxzmh@box.shutemov.name> <87y1lbl7r6.ffs@tglx> <87sfbhlwp9.ffs@tglx> <20230529023939.mc2akptpxcg3eh2f@box.shutemov.name> <87bki3kkfi.ffs@tglx> <20230529203129.sthnhzgds7ynddxd@box.shutemov.name> <20230530005428.jyrc2ezx5raohlrt@box.shutemov.name> <87mt1mjhk3.ffs@tglx> <87jzwqjeey.ffs@tglx> <87cz2ija1e.ffs@tglx> <20230530122951.2wu5rwcu26ofov6f@box.shutemov.name> Date: Tue, 30 May 2023 18:00:46 +0200 Message-ID: <87wn0pizbl.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, 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 Tue, May 30 2023 at 15:29, Kirill A. Shutemov wrote: > On Tue, May 30, 2023 at 02:09:17PM +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. >> >> Check for cc_vendor != CC_VENDOR_NONE instead. That might be overbroad, but >> definitely works for both AMD and Intel. > > It boots fine with TDX, but I think it is wrong. cc_get_vendor() will > report CC_VENDOR_AMD even on bare metal if SME is enabled. I don't think > we want it. Right. Did not think about that. But the same way is CC_ATTR_GUEST_MEM_ENCRYPT overbroad for AMD. Only SEV-ES traps RDMSR if I'm understandig that maze correctly. Thanks, tglx