Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2367101pxb; Wed, 9 Feb 2022 17:21:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJx00z1yfuJbf4+mcUmnna34s+yJlHvDfYWtmNAB+9wyZFhfi1NCK50jpTTYrC81VAi8XmxQ X-Received: by 2002:a17:902:e294:: with SMTP id o20mr5053875plc.58.1644456115409; Wed, 09 Feb 2022 17:21:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644456115; cv=none; d=google.com; s=arc-20160816; b=WbVPD2nE2Yge534EtHjDNw9s7EtikaM8WgODwJ87zqmHmls5E3V8Wn2stsKo8KxsAj Uk/jFkLIBOkXheRAjrPUixj/og9ktUd0A/XjxnoGg4eF6a0uqlrHF18SROGCexfLZ/Xw nb6SCaw+S2BWw3rpz0mUBojpOorco2GV5kdpdO5in8K5gdV9v8s8ZWZp7BtMai2xzLZQ fzuEjCuJXutqAlpolLW6bUeHr7CHecmBPmmtRzSs0+fQzg3klSTYdNseA4i2pL9ZXQv/ fh9dzEvQOSlXl7Gfhxgf13L1CLd9slpNSD0pIri6kleGMmZa89FTSg/H0HeMniLEnx9o XmNg== 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:dkim-signature; bh=XWLLyk1K8bfKzJedzmC1sFWb4iWL67xU1QxSZHF4aB8=; b=YeIST16S0RfpDeTzYLqDnvamtSaDLYyXk9kqG1PItABM9LNDQs8WR5hbExVU3coUAp CMTUIhqguDfsTa1RFwWNGhTjSeZtH7VVR6sDxL4DGv4Pj2uk3erVQ+qtSZ11pv/Yzop0 bClTy4GmrjcGBqDksbB32FlKEN98uj9f5Dj/8SF5oWuhWJy/8wARrN47tGRN3slbo2gK tbEeNz/LmulwwfFOfdP7rbkyJQD5ru/YpIAyWkymjk5xNPb7TZaYbotkc7QKch2hBq83 rGxr7rredGR4tDioM5lf3tS7lTlFaq7kh0TKpAopo5414lkN+t4nhGmVwxCq1lZoIKtw z0Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=XNShvWlg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id gm13si69688pjb.116.2022.02.09.17.21.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 17:21:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=XNShvWlg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4BCF1765F; Wed, 9 Feb 2022 17:21:39 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231263AbiBJBVc (ORCPT + 99 others); Wed, 9 Feb 2022 20:21:32 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:38540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230391AbiBJBV2 (ORCPT ); Wed, 9 Feb 2022 20:21:28 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FA237651 for ; Wed, 9 Feb 2022 17:21:29 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id v13-20020a17090ac90d00b001b87bc106bdso6936309pjt.4 for ; Wed, 09 Feb 2022 17:21:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=XWLLyk1K8bfKzJedzmC1sFWb4iWL67xU1QxSZHF4aB8=; b=XNShvWlg/NeIyAfYGVaBcqrHzDAVDur9USDuZi3W2M5ist2p48UKF0SSmAIWRx9wDo 8SuzqVc+BIerw6jPCIV0yUBdXchxww2HrVKE1lNEyIkMswe/x/GsaWQzpmw8fiyc3/q+ xMRWamP5cVmJJWotaAu36q56YK4qUivk/30r4RgQCSfoKaG5S4a5TwohPlhtbGaWcn1I nYD8jQ0yWvZIApbFUvwWgkTaWksTIj8gPLjKB8Wx/+ml6o70SyXSjUMNAXJwKeqtiKmk 8OYvtF+YZ3rv+kGAulEmNDWUV34YH2IhuhykgRzRAQKUCvv4WbHrGHjrT8szM5MZqAnp nPMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=XWLLyk1K8bfKzJedzmC1sFWb4iWL67xU1QxSZHF4aB8=; b=z9Wt58fvGOV6J4ob3nB59WGMN5fD4G3Y9J374Y9sy+5YM4U9AKy0Tl+4Nzp/h/1+r+ xP0RZdML3JWNYfSQ1x2LCAPMZJvAYvfCDIYJiIos+vUw+J0T82gDiqMNdv1Hnev8L6V1 ig3cdj8g9w1073DbsZepIw+ZXgkttzjs+T+EJlZSB1rMGBMLeIC8PLgAInhs8G9BeLg+ hgsWxTfyLw3ENjWYihCI5M/lvFudtq76d7UCzRrR2KlwXcYoXy0JTcMhGIWvys1FJnp9 oCWccWhNeSJazIBjMMcQlmzBnSTFbZNd8fhuTFXO08hMuAHGRX1rbrZh9YZOkuio6iXX D0Zw== X-Gm-Message-State: AOAM533t+AeOUhvcEpkUC+/VcDcxmRLzHepTMVd4zEZ1Q261J4La3gks UNGgOw/iK3VDElXJ9nVwbOH6MQ== X-Received: by 2002:a17:903:234f:: with SMTP id c15mr4902041plh.50.1644456088551; Wed, 09 Feb 2022 17:21:28 -0800 (PST) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id l13sm14816202pgs.16.2022.02.09.17.21.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 17:21:27 -0800 (PST) Date: Thu, 10 Feb 2022 01:21:24 +0000 From: Sean Christopherson To: "Kirill A. Shutemov" Cc: Thomas Gleixner , bp@alien8.de, aarcange@redhat.com, ak@linux.intel.com, dan.j.williams@intel.com, dave.hansen@intel.com, david@redhat.com, hpa@zytor.com, jgross@suse.com, jmattson@google.com, joro@8bytes.org, jpoimboe@redhat.com, knsathya@kernel.org, linux-kernel@vger.kernel.org, luto@kernel.org, mingo@redhat.com, pbonzini@redhat.com, peterz@infradead.org, sathyanarayanan.kuppuswamy@linux.intel.com, sdeep@vmware.com, tony.luck@intel.com, vkuznets@redhat.com, wanpengli@tencent.com, x86@kernel.org Subject: Re: [PATCHv2.1 05/29] x86/tdx: Add HLT support for TDX guests Message-ID: References: <20220129223021.29417-1-kirill.shutemov@linux.intel.com> <874k5iz3ih.ffs@tglx> <20220202124830.yd4vkmy56j67tyz4@black.fi.intel.com> <875ypxur1n.ffs@tglx> <20220204165539.oqw7bj3ri4hzjiy6@black.fi.intel.com> <20220209143407.by4s2h4zybfbvlhv@black.fi.intel.com> <20220209222327.5c2gv5owhhgzg2rs@black.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209222327.5c2gv5owhhgzg2rs@black.fi.intel.com> X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no 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 Thu, Feb 10, 2022, Kirill A. Shutemov wrote: > On Wed, Feb 09, 2022 at 06:05:52PM +0000, Sean Christopherson wrote: > > On Wed, Feb 09, 2022, Kirill A. Shutemov wrote: > > > On Mon, Feb 07, 2022 at 10:52:19PM +0000, Sean Christopherson wrote: > > > .Lskip_sti: > > > tdcall > > > > > > /* > > > * TDVMCALL leaf does not suppose to fail. If it fails something > > > * is horribly wrong with TDX module. Stop the world. > > > */ > > > test %rax, %rax > > > je .Lsuccess > > > ud2 > > > > If the ud2 or call to an external "do panic" helper is out-of-line, then the happy > > path avoids a taken branch. Not a big deal, but it's also trivial to do. > > Something like this? Yep. > I assume FRAME_END is irrelevent after UD2. Not irrelevant, but we don't want to do FRAME_END in this case. Keeping the current frame pointer (setup by FRAME_BEGIN, torn down by FRAME_END) will let the unwinder do its thing when its using frame pointers.