Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp3988286rdb; Wed, 30 Aug 2023 11:54:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkttODBqMGO4g1zyt6KRCxuNi6ZJBzNflcqdCiks4SclU53blZs1ctG+xWT9qHpBbT4v87 X-Received: by 2002:a05:6358:787:b0:132:d333:4a5c with SMTP id n7-20020a056358078700b00132d3334a5cmr3779336rwj.10.1693421649439; Wed, 30 Aug 2023 11:54:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693421649; cv=none; d=google.com; s=arc-20160816; b=DwoisKF35hbuD93t10vdDwDv+4/kRLqhvvBRJxcKiWfi3rD5KTkDoBc+HIWDQ+4Tzg r6S+vi/IItaEzZUAYcJazPNqlhygWoc6E0ITqxrezTuapkbyhk1vF4wl8X2MlWsjbL+P YOCKkWCftnFZMxhiTIpLAY/2vL/amG0DgYxDX0q6HqrheE7WoSNGGlw7gkoEfddwg0le AlJ9ol/t9FJH83OH2QQbC1fRQl41e2KfLD8JpNE1PnV0UxEA3PuB5lqImhhMPbXLsNoC yVcZNyJbkvrKV+GDZi/f1Q8sAtVze3H7uClhUzntH2PNk5FkJV7bMCQz5w01kYDhFB84 650Q== 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=/RtsjvrmkKJScgVrxehDPGVYBrGPzyLiaq4J0V/sdzg=; fh=TCS3BljOZJyzAmFeC4KBHOPT7ThvIscPR8rphkqVJLQ=; b=SOpj+O27GCC9iLvHuRCyk9JmTYMCtZyHlVPLnD7aFt3Cu2t76yi+JhgkaPh4BXuLi5 xEWX8qZmL6GOcLHZ6lV0yyxKqfyKP/Ld4WIDt1egSvIrKcGFuhKE48KwPZDoJmLgGxtL Eh/swFsxdCjeaR2qkfYzwL1nWzL1k+bEWnMGBf+W1W2XBcKsOc9ohn52aEIVvSwHz6IK /JRDM+UKkeoutpyLJkshxPP1uiRGmeyTnX+rS1qA3lfGP6xGoXwigpWwZ0ZHvzljAsH4 C++Lp09TManzmIcbV4NPNjUMPrNEgnNh8yJM6FMGNzQma6DaUMU0ncjUG8r3UZRuWEJv O9Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YgNxlX6m; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k62-20020a638441000000b00564c1d10dbdsi12583411pgd.132.2023.08.30.11.53.54; Wed, 30 Aug 2023 11:54:09 -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=@intel.com header.s=Intel header.b=YgNxlX6m; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244141AbjH3Sue (ORCPT + 99 others); Wed, 30 Aug 2023 14:50:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244438AbjH3NL6 (ORCPT ); Wed, 30 Aug 2023 09:11:58 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 651CFCD7 for ; Wed, 30 Aug 2023 06:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693401114; x=1724937114; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=HLlwTVXS9iMeZ1L4KBSbq0Q+tuxm+t8Afphf5KGLsnk=; b=YgNxlX6m9tMpsjLifsvvv0mjsuZKO1MR3ACAiqM21ZCrKNKZ98G0hrDd CISCeHaSuvnrD52xcyTQcUNU2gATBoJb12AIJST+f4a44dTkUocThNqdt EwukuhxcumizQpmaUcO4txSvEfVxJ+4ss3vY+ZMqvca6BOB22dTq58Cai AydoMN3nt6eZmyC9yVUXJP7o1CMQLTXG+DbqQxqduy9V/8DFh0fsONZvX pqtBNT7HcwpO+Ce6lE+t6KRihH5jb5EypcaAK4dQxyHUtANeeW1dG2FhJ rTIXX7Cy5CGJ1B/QrxSEtcH0Qs+xYIRyFt9RRPaE6wnDONTXXUYuAg1UX w==; X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="406638569" X-IronPort-AV: E=Sophos;i="6.02,213,1688454000"; d="scan'208";a="406638569" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2023 06:10:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="688904503" X-IronPort-AV: E=Sophos;i="6.02,213,1688454000"; d="scan'208";a="688904503" Received: from tguenthe-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.252.57.167]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2023 06:10:31 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id 1F6521099E2; Wed, 30 Aug 2023 16:10:28 +0300 (+03) Date: Wed, 30 Aug 2023 16:10:28 +0300 From: "kirill.shutemov@linux.intel.com" To: "Huang, Kai" Cc: "Hansen, Dave" , "Christopherson,, Sean" , "x86@kernel.org" , "bp@alien8.de" , "peterz@infradead.org" , "hpa@zytor.com" , "mingo@redhat.com" , "tglx@linutronix.de" , "linux-kernel@vger.kernel.org" , "pbonzini@redhat.com" , "Yamahata, Isaku" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "n.borisov.lkml@gmail.com" Subject: Re: [PATCH v4 07/12] x86/tdx: Make TDX_HYPERCALL asm similar to TDX_MODULE_CALL Message-ID: <20230830131028.lbtwtefap7khvt44@box.shutemov.name> References: <0cbf25e7aee3256288045023a31f65f0cef90af4.1692096753.git.kai.huang@intel.com> <20230825233558.xzqukr3vbccii7f4@box> <1a40b4dc8d155618723671685e7ad53e3fce0aa4.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1a40b4dc8d155618723671685e7ad53e3fce0aa4.camel@intel.com> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 Sat, Aug 26, 2023 at 12:50:11AM +0000, Huang, Kai wrote: > On Sat, 2023-08-26 at 02:35 +0300, kirill.shutemov@linux.intel.com wrote: > > On Tue, Aug 15, 2023 at 11:02:01PM +1200, Kai Huang wrote: > > > + /* > > > + * Failure of __tdcall_hypercall() indicates a failure of the TDVMCALL > > > + * mechanism itself and that something has gone horribly wrong with > > > + * the TDX module. __tdx_hypercall_failed() never returns. > > > + */ > > > + if (__tdcall_hypercall(TDG_VP_VMCALL, &margs)) > > > + __tdx_hypercall_failed(); > > > > Do we even need __tdx_hypercall_failed() anymore? Just call panic() > > directly, no? > > > > __tdx_hypercall() is currently annotated with 'noinstr' (which is also the > behaviour of the old code). We need it otherwise we will get build warning like > below: > > https://lore.kernel.org/lkml/a23ce8fd289141cea3a1b4f3dace221dca847238.camel@intel.com/T/#m205b29ce3e33983ec6be733c2afffbfd5cb653ff Okay, fair enough. We can return back to it later. Reviewed-by: Kirill A. Shutemov -- Kiryl Shutsemau / Kirill A. Shutemov