Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp208883lqp; Thu, 4 Apr 2024 10:47:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVjzr3+NwtVpiBl/v7yAglaQlE5+k6TVH0jOEw+WYReqjZJL+qwojaUvLMlnQoDC0A/0CyA5FgroQLOOB4sjYY9iUTjqejehZwoybM1A== X-Google-Smtp-Source: AGHT+IEaF3fhzS92+1H5S5YM1wDal5y/ABT0ARlrmj+WX8x3FpV4M4CixM8ERIp9+OWjTxmmjq1k X-Received: by 2002:a05:6808:1a1c:b0:3c3:d622:b46b with SMTP id bk28-20020a0568081a1c00b003c3d622b46bmr3841314oib.45.1712252839654; Thu, 04 Apr 2024 10:47:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712252839; cv=pass; d=google.com; s=arc-20160816; b=R+oVEJl/9QmpI68VqZSTSzrwD7x8jlWbt2SgPZNscmWSLRBYJ39mOF/yFnyfjTHEzQ 4TltxZH47wczFHf2Xpgu2JW9r18tW8intE924BBaftWvw6URoRkgJ2GCQdKhYLILBgzt DamRoxNZwkhSxHzGaFe/5qi1ewHShg3/jzH9pYZ/EU6KjPXaALfNlzUztArb6wCXHk7j zN3AMY86jZA3rtu9Brq7N3Y5jz71Vt0mupy4yUBjsfZPDCxA1YtrP1oqDm+T3EKpOhr0 MhVysKpbVxJ9mAW3aNmyk3TfI/US1gh5Xs7+4vyvGSbDAYohAMwAaFQfT8BffxIV6XN4 3PLw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9oWODb/Rr73MQruDK63A88hVKxxdKcVzAXF7jtY3zoQ=; fh=8scsGQn+hJ1HvbMI23kGOdGh/wtWpH4wdCi8Q1zCFc4=; b=aZ6A4G/iPat3Xz4SOFVvupMUXl4DP9L6rIUFdhrCemuNhNdFa86RGEePsZ6SVd+1G6 JyJpswwSlFee/1diuI/Np+so2TIiF6FCOJiDq96Yo9ElZ79IAqgfZODdPu58CjKR6HJe 4fI3UGJH/19btMf08IIc4dyLqNrm4iNC0yerP2JGnjbUKhnYFnZV7i0xUKq6lqfMuY/D pNnH8MC6E3Rt41Pxh/g56IYET71ZxKTelIKhD5IyQhK2UipZ43MdaoGqKLJfHhiKD+oC TtcfMQ8KOHgpoTFpJccqgIbDX7F8g6pJhWPPzlhI29dm8UNaYByutsfD0k4h8hmjUWOr g88A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=f9LcFEzE; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-131570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131570-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k16-20020ac85fd0000000b00434581f7ecfsi767377qta.612.2024.04.04.10.47.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 10:47:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=f9LcFEzE; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-131570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131570-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 14E451C29363 for ; Thu, 4 Apr 2024 14:10:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FF7412BEAE; Thu, 4 Apr 2024 14:08:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="f9LcFEzE" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C92812AADB; Thu, 4 Apr 2024 14:08:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712239729; cv=none; b=H8s0mkoogHoMPiyjivfmaKHpUXMc5Th478A7kDVOapxXTgHViZqwd46YwMVL4BU7ona2JPp7/wqRrmu3ADLOxYIpQs54o8x+cOmLsj3V9BiyPKMWw12o5BhREzfMLqx33RIDTlqvY4pq2GW5rV/WOeJEkMs0jiBZJXeAWLpyD6Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712239729; c=relaxed/simple; bh=Q5TomExR4q7N42k/kGEiT4EFIaCXwmnC4kGd5qGtxFo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Qmehk52zHV3icXsaUssZgGCGpRMeCWL4WpcDxqnQlkormLTJR/jKFQF+Gxs/LlPT/043Y25v6BobWwBZDzoPEWN6cH1eIqGgUpthDx66nWMkGxKF/Q00ycKH9g6erYm7A8zIT9NXXqViAsTqfqR8hL937sH+F+FvoWxpjww44B8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=f9LcFEzE; arc=none smtp.client-ip=198.175.65.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712239729; x=1743775729; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Q5TomExR4q7N42k/kGEiT4EFIaCXwmnC4kGd5qGtxFo=; b=f9LcFEzENae1yKSGwvzRWe6EpnXH44R1Ar0tB5vNDH44aECpNhXJyFR8 XT5rIs2c5Hm76KneukHNBgBxDr+SGd5oIz8nyX0AWY5vDTrdCGycsP/5Q HSTqxayC5NmypoinbGVqZc4yG3qOGojp/Uhf+XJ2k68PQY7+SfqaqgYPi ZpZ5fWAm/sWnSzVrJRNbso2cw74pMBAl2TwoRIvE0ugMVJYz6LwU5zI0u BsGtkaLQG3mZKdaiqouzbHNaJzLFKytJacVo3/rV3hkp2IWtCIWyzyCLW NoIaT48zfFyd8E+Ue9AJ5AZeUOOAhl34Oo/K09xqU/mYTQuhtfyjZ7kA8 g==; X-CSE-ConnectionGUID: ibPwKLg8SGqRDyhiJRHfZA== X-CSE-MsgGUID: BeMRogxrSzadVLR6DPasAQ== X-IronPort-AV: E=McAfee;i="6600,9927,11034"; a="7686470" X-IronPort-AV: E=Sophos;i="6.07,179,1708416000"; d="scan'208";a="7686470" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2024 07:08:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11034"; a="937086590" X-IronPort-AV: E=Sophos;i="6.07,179,1708416000"; d="scan'208";a="937086590" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 04 Apr 2024 07:08:44 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 1AB858B3; Thu, 4 Apr 2024 17:08:43 +0300 (EEST) Date: Thu, 4 Apr 2024 17:08:43 +0300 From: "Kirill A. Shutemov" To: isaku.yamahata@intel.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, Paolo Bonzini , erdemaktas@google.com, Sean Christopherson , Sagi Shahar , Kai Huang , chen.bo@intel.com, hang.yuan@intel.com, tina.zhang@intel.com Subject: Re: [PATCH v19 002/130] x86/virt/tdx: Move TDMR metadata fields map table to local variable Message-ID: References: <44d9530187b4b0b1c05e150fa73fe22ab54fc911.1708933498.git.isaku.yamahata@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44d9530187b4b0b1c05e150fa73fe22ab54fc911.1708933498.git.isaku.yamahata@intel.com> On Mon, Feb 26, 2024 at 12:25:04AM -0800, isaku.yamahata@intel.com wrote: > From: Kai Huang > > The kernel reads all TDMR related global metadata fields based on a > table which maps the metadata fields to the corresponding members of > 'struct tdx_tdmr_sysinfo'. Currently this table is a static variable. > > But this table is only used by the function which reads these metadata > fields and becomes useless after reading is done. Change the table > to function local variable. > > Signed-off-by: Kai Huang > Signed-off-by: Isaku Yamahata Reviewed-by: Kirill A. Shutemov -- Kiryl Shutsemau / Kirill A. Shutemov