Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1573037pxp; Thu, 17 Mar 2022 11:50:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBDDHeynPMt8Glyc7rpY+Xi1F3R9BB/tna0Bg/G3JKqfLaP2Gazh8AVu/5TJi1nErD0bNX X-Received: by 2002:a17:906:2811:b0:6ce:eacf:5210 with SMTP id r17-20020a170906281100b006ceeacf5210mr6169778ejc.618.1647543018507; Thu, 17 Mar 2022 11:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647543018; cv=none; d=google.com; s=arc-20160816; b=vALege2BFsL4XlG9f9ZYWupmxuNOaKCSHXtEEJNXTXkQdI1s4wMwy8w3v+6LxL2j/y YZoQFyGlpBT0uaXRaN9CRiHKP7p4Fiyddxnn2T5BFNnK0KfcgrWjfJM9GYiwm6sGha4B Cc77IFly1pgwGWDijWMZm5Dt548U7YbidGPabJjzHSnEVm+C+ohsXU/1f2KabAFl/wDu NepIxE2HMyYRvdbbwoBN8BJBQSnvZWQcwySng7PYceXZB63Pqg2YyHbuf0THd1JET26x N0ISlL8IqsOZ66+9po5otrIhI/YzWfNcZy82WVy4RwY6btEG88o/ZjnDwrBCrVIOEDys UD8A== 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=AkFqp/wks0AeBUh3MjSCJiSE3sFCCm9/cIgptBe41go=; b=CMR1tP2th1/sqIc/V30usmrXCHFme7qPWvRZLrdk5I/6st/q74o/EVjrPpyqUClvr2 vj5R8A1AiKf9iyep0e4h4PZ3GHQtwdWY1fZZ0USjY8uxCR+VzooMh6WQw4oXYOqIjEU/ dNDF/W+K0q+rmXpLx1VXy66CxYuUTP34cFUeOzU1MeXTHrwY5hXdhT4Fkj94mjPnrSpk rKAEfDgjkfXTg6w3Nyn+tdwFRJUu6OjuX5tFbn2CvlVL9Mibaib7ga2M5qQ1ZDYfPO4J TlYMMkmVcLQQJnK6OpqXH+FcTWt/ML3kvURa9qyhy4qNAl0cOVYfb1Yvg9bUTirhtCwK rInA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=geLLgiOR; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=1Duf42lb; 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 k17-20020a50ce51000000b00418ed1fc1easi2158963edj.428.2022.03.17.11.49.53; Thu, 17 Mar 2022 11:50:18 -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=geLLgiOR; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=1Duf42lb; 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 S232586AbiCQMt4 (ORCPT + 99 others); Thu, 17 Mar 2022 08:49:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233885AbiCQMt1 (ORCPT ); Thu, 17 Mar 2022 08:49:27 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1504124C20 for ; Thu, 17 Mar 2022 05:48:04 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1647521282; 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=AkFqp/wks0AeBUh3MjSCJiSE3sFCCm9/cIgptBe41go=; b=geLLgiORCEymvP35+lraR0XBsDosznASTNKNCh9KjtEDO0TU3x4yAo2dRE/1vo/1X3X8Ro 05XRaDsFtA6uwf8uQuP5sKG8/mHyAFwHP1FauNiCwnT7BqqNbkaiQUOtaCu/ijJ26fRfRI E6EL4Jrsyz5m0zRhRFBIrMrGTgVqd8S/FRETi8chAE/gSvAMwIFmZR7jnKqQwm6s65FWo/ z1Qyjk9c3FkzzPnmO4CXyAK2obvKNC59EMJx73McsHEvswRJc6B5/gB/x6DgcGvpiPIJ45 HudXPg3s2iME5VPxgcfsS/2UeSxCdQh5m/+hg+KNP2iALk4WLJj9s/tiNjTf+A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1647521282; 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=AkFqp/wks0AeBUh3MjSCJiSE3sFCCm9/cIgptBe41go=; b=1Duf42lbc4Qgplr3OzSXayu1+fDc1SkHYHYhsyiFTiHku6dlsDSNTgj66usMQ+grdVu4oq LCUfrgAQDY4mYGDw== To: "Kirill A. Shutemov" , mingo@redhat.com, bp@alien8.de, dave.hansen@intel.com, luto@kernel.org, peterz@infradead.org Cc: sathyanarayanan.kuppuswamy@linux.intel.com, aarcange@redhat.com, ak@linux.intel.com, dan.j.williams@intel.com, david@redhat.com, hpa@zytor.com, jgross@suse.com, jmattson@google.com, joro@8bytes.org, jpoimboe@redhat.com, knsathya@kernel.org, pbonzini@redhat.com, sdeep@vmware.com, seanjc@google.com, tony.luck@intel.com, vkuznets@redhat.com, wanpengli@tencent.com, thomas.lendacky@amd.com, brijesh.singh@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org, "Kirill A . Shutemov" Subject: Re: [PATCHv6 23/30] x86/boot: Avoid #VE during boot for TDX platforms In-Reply-To: <20220316020856.24435-24-kirill.shutemov@linux.intel.com> References: <20220316020856.24435-1-kirill.shutemov@linux.intel.com> <20220316020856.24435-24-kirill.shutemov@linux.intel.com> Date: Thu, 17 Mar 2022 13:48:01 +0100 Message-ID: <87tubwzqwu.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 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, Mar 16 2022 at 05:08, Kirill A. Shutemov wrote: > This theoretically makes the guest boot more fragile. If, for instance, > EFER was set up incorrectly and a WRMSR was performed, it will trigger > early exception panic or a triple fault, if it's before early > exceptions are set up. However, this is likely to trip up the guest > BIOS long before control reaches the kernel. In any case, these kinds > of problems are unlikely to occur in production environments, and > developers have good debug tools to fix them quickly. > > Change the common boot code to work on TDX and non-TDX systems. > This should have no functional effect on non-TDX systems. > > Signed-off-by: Sean Christopherson > Reviewed-by: Andi Kleen > Reviewed-by: Dan Williams > Signed-off-by: Kuppuswamy Sathyanarayanan > Signed-off-by: Kirill A. Shutemov Reviewed-by: Thomas Gleixner