Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp1894930rwb; Sun, 6 Aug 2023 05:32:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IELiQGrQUEIqUINGr9fErWxMs1o1+2jKvluRyVxmbBfy0FxSFGDiqjcNANdNrZvKN6/KOuS X-Received: by 2002:a05:6a20:1588:b0:140:8537:85c1 with SMTP id h8-20020a056a20158800b00140853785c1mr3733914pzj.28.1691325135176; Sun, 06 Aug 2023 05:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691325135; cv=none; d=google.com; s=arc-20160816; b=wvcMbRWfzv8sTHNUxz78jbW5Q6CLMLAaLpbQIT/m6ZyG6AgPr15DllulN5LkcQ6+nP RzSjUuzjW2BOW24TMXSvY4EJpt/H0wcpVYd+RZgLy5xc7fZ9z+wHUwCwi+0TR3W28uLu jioyQamrsCOIdusJfDK23enBqsZKZoMxdo1Y+CglxixjiSCL7TH1I+b82bZOQR9Ml5JX 2CgevYyOuSLnpQmtcSyh5EcYeAAO5emifw0PLjim574IQkHYI7RU9vygaVTy0SP5gWkQ TkGoLUXQlkMQr/PYbLTY1+L89yWSenpOgkPf78aLReCrb4w5bXIkNXI/m2h0nc7jHBc0 LirA== 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=/dcZGGhs/XKNODkEVLzuyjxGyegu+duVTdLdjj9iDLM=; fh=zN2JBeE3ky/Xz5p/ZSHHDMuLiv0fZP/68F4Zs1KJnZc=; b=qClaWjHBk6Uf9yIRuPnvXvkevao67+QZX4uYjwt69JbeL+Z8M5IB7e9WM5LPml2rdz OW1+a2ofdCg8wJnKEZgxsLO75raRoXvjlUF36Kei88YBtSooxooW+ywX4KHiKkWWKUoT SJv2TRgkRP6v+oQ5o7+CtbjpBPTPy2AvAC/pny0WQ1KpLYQQAKVJUrw9ujgg11TuLqr8 ziWb418EmuFPbkOqafaet4FspkevxuA6MuzFqQp99gVGyxnpRi/Nx4+DOu4y4BkSvwfg LLgxb/yikrGYcO23/ivhvv7QlGJuovQhON3BhcnobCGD1VQrmSJHEFP6pZxFRuJybDW6 hp6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=U1NyIg2u; 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 a63-20020a639042000000b00564bfbb19e7si2367072pge.728.2023.08.06.05.32.03; Sun, 06 Aug 2023 05:32:15 -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=U1NyIg2u; 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 S229595AbjHFL3X (ORCPT + 99 others); Sun, 6 Aug 2023 07:29:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjHFL3W (ORCPT ); Sun, 6 Aug 2023 07:29:22 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D7D219C for ; Sun, 6 Aug 2023 04:29:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691321362; x=1722857362; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=aENVWZ73ERq0TGITJrWWJ182YhToB6F3dDeQsx9B4sQ=; b=U1NyIg2ufEE+H9A7oN4vLRJB7AUStpsuPKNQrH5abuN95MHHMcKILdLE IxCYtgvVAWySUe9QFxr1rnWqlSrz/U+JKAz3Cn/dFVn9DyZqONVLm9pvA LfxmzHvn5Y+FFUUqm/7sLJYHEJKDYTmIGHx0VAEo7zghzcR5W/j7n+0Uq VYy/rXj98t8I1tCN6/tIGblDi8uNc5H48W23TL1XVTju/beOFyhm6lkef IUd2qdYDO23LG/giA+8CgUa1za1FEvys7IwbHb8BE0N4WoSB3gb5bLrWv SMG+jt+FC93iTvSiWkW+/pCeNOozt6gKib739XfrOo+TQrw12o17J5p8a Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10793"; a="369281380" X-IronPort-AV: E=Sophos;i="6.01,259,1684825200"; d="scan'208";a="369281380" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Aug 2023 04:29:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10793"; a="707516685" X-IronPort-AV: E=Sophos;i="6.01,259,1684825200"; d="scan'208";a="707516685" Received: from mvalka-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.252.63.122]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Aug 2023 04:29:18 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id 753B010A117; Sun, 6 Aug 2023 14:29:15 +0300 (+03) Date: Sun, 6 Aug 2023 14:29:15 +0300 From: kirill.shutemov@linux.intel.com To: Kai Huang Cc: peterz@infradead.org, linux-kernel@vger.kernel.org, dave.hansen@intel.com, tglx@linutronix.de, bp@alien8.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, seanjc@google.com, pbonzini@redhat.com, isaku.yamahata@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, n.borisov.lkml@gmail.com Subject: Re: [PATCH v3 09/12] x86/tdx: Remove 'struct tdx_hypercall_args' Message-ID: <20230806112915.pwolxzaz6tdteol5@box.shutemov.name> References: <9f0bca72a8d87a286faf32c9e306954028bbb9f6.1690369495.git.kai.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9f0bca72a8d87a286faf32c9e306954028bbb9f6.1690369495.git.kai.huang@intel.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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 Wed, Jul 26, 2023 at 11:25:11PM +1200, Kai Huang wrote: > Now 'struct tdx_hypercall_args' is basically 'struct tdx_module_args' > minus RCX. Although from __tdx_hypercall()'s perspective RCX isn't > used as shared register thus not part of input/output registers, it's > not worth to have a separate structure just due to one register. > > Remove the 'struct tdx_hypercall_args' and use 'struct tdx_module_args' > instead in __tdx_hypercall() related code. This also saves the memory > copy between the two structures within __tdx_hypercall(). > > Cc: Kirill A. Shutemov > Cc: Dave Hansen > Cc: Peter Zijlstra > Suggested-by: Peter Zijlstra > Signed-off-by: Kai Huang Reviewed-by: Kirill A. Shutemov -- Kiryl Shutsemau / Kirill A. Shutemov