Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1171147rbb; Mon, 26 Feb 2024 00:28:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXwEciLSQBsgikBrijyvkjy0Bmv0uLjTV9pNRZZ6m10kXfIlqouzQjwVf7akVfJEMAsB6eDlubADY502/A2C4IiLo7DWt+EIwV3dm0dVQ== X-Google-Smtp-Source: AGHT+IHe6Zp1xT5EMn6zlIwd6z8+ZuwD2yrvy7W2kGU62dpLMERF695YHqz0U3Lt0GlJ7muoP7QF X-Received: by 2002:a17:902:c948:b0:1db:2caa:6c5e with SMTP id i8-20020a170902c94800b001db2caa6c5emr8571456pla.3.1708936118873; Mon, 26 Feb 2024 00:28:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708936118; cv=pass; d=google.com; s=arc-20160816; b=HW5cDzutnGMsAgPiPcnZmTYoIEHWrTa8DEm84h1umpUjg3jUaNotUU8SKGq8hQ8rGf Hr23tWhZXnHWpfwF4YQeTvc5kbVuhdchFX75ex+APHJu4Nmid/3o71wg0SrLkb4yhKKo zXtScknmxEJaDSBlSlriMeUwd4Nu381UqVc55o/WjWAZmmyJgZyQiGg7IGjPuzkofX0r IFt6YhIlpkitBA+vN5Mkplx26HsU0M8293Dv0oZZXD9oUne4d1F/M6Q6gW1xeS0jTckv 5OP5laapViQ/ev8la0MnmL/CPMZvCzwpDSWcfx+fENNMYQQgVLaT8ecRdecgleb4/t5A Mbyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=E/BCvF8vHQbRYWHEjgFEq7oADpNrN8pGN0aHHj2cT5U=; fh=wfzf/8eWbe9eyxhcv3ArurOzI8Y6mCaD4zS1Rilq9io=; b=HvaBdmF1UYKZjzj0OqC6rXFxLFYTNmohIwhkwaRhHdHaTHPcVSjCLd11uK95JXz3Dh M81zrUuTUSXF8ptF+hfQ2eiE2o0STAbkqxYX0fsMVzKUcLQiomhaLT9uoRYabFKbV8Wm ENDtxBTGUAYPQKzlXL4P1ed/YaOMuvD0rIUrNWpv88zWx5OwOqwY2u50UegYRNVK33DO yhsi33ou6joOWu/P6qVHDKZe1MAE4xMK4Np27XccCASZv4wo6l/IQbvUPm3db9TvvWcZ bi/XJZ1kws4kAR1qMJMFtQZ7efZ7QOhPFYDzONVgWk0nru4Qqztk08Y6Bb1j9kMlxBXa mcIQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HzQYTdDz; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-80761-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80761-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x10-20020a170902ea8a00b001dbd4cd7db8si3198438plb.627.2024.02.26.00.28.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 00:28:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80761-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HzQYTdDz; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-80761-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80761-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 935B1284288 for ; Mon, 26 Feb 2024 08:28:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 465CD1F606; Mon, 26 Feb 2024 08:27:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HzQYTdDz" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (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 6A43A1DA3F; Mon, 26 Feb 2024 08:27:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708936057; cv=none; b=DBRIxIiCZ/xZa3c+dbSNWWcCO+SNPCkNKv9yyzNCgdHFJe/K/LSxbP4nHngBpl9K69LjJ7xyd34wbxkL2H+thDQ+e2gyAwqsCjEqmFfmPLWo3HaOyeQweIvryIHazXsY1V+T9q7k4a0EyaKW4X8FxBjChc9pNU1JnL05kq7se3k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708936057; c=relaxed/simple; bh=w4lY8P57h5k6ODIw2ePbR3iDGqUeK20stwm2wWMGTNQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SGd9ir5hsXH8d/PcqEDgpwjgLW08nK9feJhBcrpRMEBezT4xvYIOke3PDh57lmTKJgYVChkZ0IImTGLqTBi/trivctplD5gHuJZwIjvfEFrFgCHwfe5yeziXY5ckIMzhOEyCKT3S0Tgzf6sCdWQpDN6u4l9t4K/EWx1h1cfK9EQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=HzQYTdDz; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708936056; x=1740472056; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=w4lY8P57h5k6ODIw2ePbR3iDGqUeK20stwm2wWMGTNQ=; b=HzQYTdDz1vU34CU77d53Ae1ZlSJLHE/pHMokY5oREH05Tr2Rq1WkHf5W b6n3rpcLCFsIYFAFKMSlTqlqz7vkOwM1L3ag1Tqa8cfgfUuJ9ZTM/PvNQ gVkLr+DCLi/T4ylRUOI+T30jCGVjgD3MJTOgBV2JBVrOmOxx7zeV1xVeM Ud2mBuwTJPx7dTVOORBjRTnYQ6/J5STDpQITkXCFKaJqr3RPQvP+EGczE EvNFDl64H+p8z7LuiS0vcOxBx3/W100ax6Mc+lqtj7AjTWuf8gBAZ2EbY Hdjz7Wa40zBOIOOknW9GdVKvqVF88mdTytMSjaMSQm9liAeD/3rRQECiT Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="3340694" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="3340694" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 00:27:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="7020034" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 00:27:33 -0800 From: isaku.yamahata@intel.com To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: isaku.yamahata@intel.com, 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, "Kirill A . Shutemov" Subject: [PATCH v19 001/130] x86/virt/tdx: Rename _offset to _member for TD_SYSINFO_MAP() macro Date: Mon, 26 Feb 2024 00:25:03 -0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Kai Huang TD_SYSINFO_MAP() macro actually takes the member of the 'struct tdx_tdmr_sysinfo' as the second argument and uses the offsetof() to calculate the offset for that member. Rename the macro argument _offset to _member to reflect this. Signed-off-by: Kai Huang Reviewed-by: Kirill A. Shutemov Signed-off-by: Isaku Yamahata --- arch/x86/virt/vmx/tdx/tdx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c index 4d6826a76f78..2aee64d2f27f 100644 --- a/arch/x86/virt/vmx/tdx/tdx.c +++ b/arch/x86/virt/vmx/tdx/tdx.c @@ -297,9 +297,9 @@ struct field_mapping { int offset; }; -#define TD_SYSINFO_MAP(_field_id, _offset) \ +#define TD_SYSINFO_MAP(_field_id, _member) \ { .field_id = MD_FIELD_ID_##_field_id, \ - .offset = offsetof(struct tdx_tdmr_sysinfo, _offset) } + .offset = offsetof(struct tdx_tdmr_sysinfo, _member) } /* Map TD_SYSINFO fields into 'struct tdx_tdmr_sysinfo': */ static const struct field_mapping fields[] = { -- 2.25.1