Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20517069rwd; Thu, 29 Jun 2023 03:30:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5K1s/I+xhzQTFCXvO2/vxLvhoeTfuwtcolXPFlFxxxBMLMCeRqIRLtHT7+SOPAtHCdQbsp X-Received: by 2002:a05:6a20:7288:b0:126:42ce:bd41 with SMTP id o8-20020a056a20728800b0012642cebd41mr15212793pzk.47.1688034617298; Thu, 29 Jun 2023 03:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688034617; cv=none; d=google.com; s=arc-20160816; b=y74n4gCOBJyn4xmw2pn9xgV73KaIQaOH4u10kk5bGjAY8nhgCWT2ICXNhnMwTxESXN z+Mqkei/C9uW8dbquyp7R6OrWmYITBKE9p2+EncwSfmBGXJ+9RuHKLQE8/Oe3OxvwRlT kpxPP19nNk04lSE+XRvyoVbLr0cjVgUqnxriO83DD65m4PsQiNB6qUdiBg/n+0VtaI/E 2OkteHjnnRrCpDBYGrwokWYV1CGJNwRbRgmU1CGi9BBp9cgw74RE95ygjQjzEgYIufkR CIYa7FBXKho7f992zyA4wRMGlaV0yVDTAvcN0DCZxffORt49fnstxKWsun4s0Tspm5Yj Ieig== 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=nDGbHYON3QMZZHI/rVaGi3YknFJKhjrwpLA6wDBndcI=; fh=QJighlHUBueMeXA0UhMHu3IeLWYANLH/dbsJGn8cF/U=; b=Iz0cvdTP8SzKEXK+3hTyIyu2ZGJunnMlrE08luRWwPyGKhN1Ewj9tHr0dAFpBfR/Op WTOvN1g7w5xeIk2CoscNOX6G678JZEvqj0GB5JUn/vRT8aLJ8tebkJVlGmLdGOmSe3mA PE/nHqc3pBs2W7EhD5VTZv/azABT3uTIVAjlZZ75/srDNmCFTNtLJwey7eBJBb9lwg8F /7G7yWPC4U9M2dBi2HpSobSVvo5s0HCU9rys5ea4MbGOkd3ij8B4z9pwb8jDR/rQv/GN 4Eulqyj3Iwj17IP9W/vlwdM+foAbXhyA0axo7Ywb7HZP8u0AfDnEOj4s2wvg4DAIjbaE CL6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=L5d3evnN; 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 lg13-20020a170902fb8d00b001b04a202754si735976plb.448.2023.06.29.03.30.05; Thu, 29 Jun 2023 03:30:17 -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=L5d3evnN; 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 S231443AbjF2KQ6 (ORCPT + 99 others); Thu, 29 Jun 2023 06:16:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231834AbjF2KPu (ORCPT ); Thu, 29 Jun 2023 06:15:50 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CCB63582; Thu, 29 Jun 2023 03:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688033730; x=1719569730; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=X08EZN+DaChxrUMPDyxcVgkqN2it75n3TMT5gy+uEis=; b=L5d3evnNqWGW76tiJqtGFD7voBsrSWu0SXiIO9ugJ9xls9PHvuLyK3No POgwlozs3TdTMDxFiS1PzRmKd+svLW5vvDzXemunWRBSuUQBUhb2KPray Ti8m1Y3M8E3mqjO9lh/iHZF/HPvaJ9XBEtffKIalDpogQfdgGTznUnRXv rE2MKl1n9W2LDaaFQH6X1CdrgsdR45o/PXIYOVqGACBpO0QU3mcn8w6QG PRxcVnWwBMWt7lmiCcEZDXw9161ryZDComIs+pQ3G/exrgz29/LADwdlU H3HebIwUV2gFydY8gVI1QbFCr1aha+9icVNO8XScxNC7oYClfLtiRGKv7 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="448452077" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="448452077" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2023 03:15:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="694569273" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="694569273" Received: from aahouzi-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.249.47.115]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2023 03:15:22 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id 29F1F1095C8; Thu, 29 Jun 2023 13:15:19 +0300 (+03) Date: Thu, 29 Jun 2023 13:15:19 +0300 From: kirill.shutemov@linux.intel.com To: Peter Zijlstra Cc: Kai Huang , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, dave.hansen@intel.com, tony.luck@intel.com, tglx@linutronix.de, bp@alien8.de, mingo@redhat.com, hpa@zytor.com, seanjc@google.com, pbonzini@redhat.com, david@redhat.com, dan.j.williams@intel.com, rafael.j.wysocki@intel.com, ashok.raj@intel.com, reinette.chatre@intel.com, len.brown@intel.com, ak@linux.intel.com, isaku.yamahata@intel.com, ying.huang@intel.com, chao.gao@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, nik.borisov@suse.com, bagasdotme@gmail.com, sagis@google.com, imammedo@redhat.com Subject: Re: [PATCH v12 05/22] x86/virt/tdx: Add SEAMCALL infrastructure Message-ID: <20230629101519.xhuia6d4gtiosesh@box.shutemov.name> References: <20230628125813.GA2438817@hirez.programming.kicks-ass.net> <20230628135436.GC2439977@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230628135436.GC2439977@hirez.programming.kicks-ass.net> 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_H2,SPF_HELO_NONE,SPF_NONE,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, Jun 28, 2023 at 03:54:36PM +0200, Peter Zijlstra wrote: > On Wed, Jun 28, 2023 at 02:58:13PM +0200, Peter Zijlstra wrote: > > > Can someone explain to me why __tdx_hypercall() is sane (per the above) > > but then we grew __tdx_module_call() as an absolute abomination and are > > apparently using that for seam too? > > That is, why do we have two different TDCALL wrappers? Makes no sense. __tdx_module_call() is the wrapper for TDCALL. __tdx_hypercall() is the wrapper for TDG.VP.VMCALL leaf function of TDCALL. The function is used often and it uses wider range or registers comparing to the rest of the TDCALL functions. -- Kiryl Shutsemau / Kirill A. Shutemov