Message ID | a55e86430c81274af86d2d1c23cdce2f53fef7d6.1709288433.git.kai.huang@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-88324-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp1007906dyb; Fri, 1 Mar 2024 03:21:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWx71h2kh9jyTDSe/lLvyMLO5UCqu0R8a/deMPE9I0M7cE4EwhRf1Ke8UDfMDXGkNLWHQBxLf34/my7R/fMdFuRWpld6A== X-Google-Smtp-Source: AGHT+IH6CmGJSTqOymMewQS8R09D+/M+94G7xV2Mc/7M16qdUQdJ3px1b6r+b7jbuJK/f0dWixZN X-Received: by 2002:a05:6808:2082:b0:3c1:cb68:1f20 with SMTP id s2-20020a056808208200b003c1cb681f20mr1829345oiw.3.1709292109257; Fri, 01 Mar 2024 03:21:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709292109; cv=pass; d=google.com; s=arc-20160816; b=ubndePGOymDxaJyKCL+LAStEHrIhTZGrOh5C5So7VhRuHZR/POFn0C09ZSxsX8cRZo 0ylPy46YIteIUFd0yktXmmLdI5Oi80JaLahrijmf8XsHmJC8qitnVxiCm7iHDho+WpHo A9vXJO+HJWQP7+LKqsArvRWkIhM2CZvihj9IcRu0thsKi7Zc92qbreSkuT5losDxIL1K i1gKZ6UlfDeWY0ctd6IfFsFGWgrVMiPCir+jAlAkJ8J1zO4DR/D87bptxgZePOslnWgR AfIQ56yMMK5ysA/wriVSBX2s/jpTNTtvvq00IUyhIX0tYkaJPoq/fR+CnheJY2huxIGu ew9Q== 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=E4hNpBzDR64zpJa4nUepmr5ddEej7YzhQBmt6IC7ECk=; fh=SNirUdkKHR93c4vQEHw73adUAE5UKXjSGs0zqjyJP7c=; b=rU0xRQo9ua/Ljg9WJ9k2VNiGlT3oOVPgeezYbKndpbO1zqOgU5fdn+mb70+Mj30ckD CiFuM9M3+r9DJX0HUBpPcNPnKpGGpfXZFynnMaXmUTiJ6vspJUdJ0aJsaaW4w1OR8LPF MHne+IooVuV+Mc8xQ7wOIEQr8EHyI4K/E51uqzNACv8BdZyvzcmj81MoXHe+zdLKQurT USBdDoOMRvYRY7tnQp1uwxUsJCLTL1zNwK14wmxt+XVpnPsFhfVW2Dh8TFv1ia9TZokj J3tq+/NAn56u6hTvDVEtnNmfKliSqdksBtFxJjtLGwmqLRz9zfaIpO8hTEWiaKpgNGzK usOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ap+wXX4d; 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-88324-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88324-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h27-20020aa79f5b000000b006e5ad30334dsi1971629pfr.69.2024.03.01.03.21.48 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 03:21:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88324-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ap+wXX4d; 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-88324-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88324-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0CE93B22DB7 for <ouuuleilei@gmail.com>; Fri, 1 Mar 2024 11:21:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0F536D1CE; Fri, 1 Mar 2024 11:21:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ap+wXX4d" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 219BD6CBF7; Fri, 1 Mar 2024 11:20:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709292059; cv=none; b=T7HXNreFL+hXZnMO4b/Ry0qc1tY0V3HE0NY9uXzLp9lyQGJ+2sIWAFOiYV3iAz4YkXkppenqOAUtdaepGfRH6fIWQWqv0kVfbUUbYJQ56OUlhMMM2NBIK+ddzw+hLImVv9lQUQTcXyH11Qvg/31GDvFm9Ukc5ka09+0k5FPindQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709292059; c=relaxed/simple; bh=RvFOMtve6JbPnJm8Y06EMADvK3SIt9TrmBxajx/qPAA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aVei3dHE64z9cktfMl3R47V/dyJs8cdjlRhkyJTlOKUv1bGuY4W9UVoVPEMvby95vOKVNMRTS6I9b6BaaPWK/HjAFdVTbvBjrzhDfvG4CChqNmbpiO4tMJ8YyBCmAlikvPtiWGV/ri9eH6bRsmMEztmkPNqSgopIt/Ws9aa8Eb0= 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=ap+wXX4d; arc=none smtp.client-ip=192.198.163.11 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=1709292057; x=1740828057; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RvFOMtve6JbPnJm8Y06EMADvK3SIt9TrmBxajx/qPAA=; b=ap+wXX4dblhEZmOZqQ7QsltO2h6M6LFHj4H/I9xb7ewzpZ8QXDvfztdg lEb16nKG5TUJomJNi7R3tDvvpBvgafZtJdN+rLsCcWy94pcxQs6S3zusJ b1odKNqejbYbTSUcjKI9CbNcOSlmuSQVV8aAJgIssfUbxhBpJ7p6O855w EzDYPwqa5Sxexi2OFWuZSlJ7zybkEnTq0av8DmNtLogDEhcv3RaznugHD 163DYXdvuAsUQat3M3K85AiYjytcHHYT+Rk0hj1T5Zy7irHlBJ2LjCT2R ZtBm0DB5UYQzLorkdSegabqJDUEJXkkfs0s3xYgDs9267JZrFQovQYT6d A==; X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="14465032" X-IronPort-AV: E=Sophos;i="6.06,196,1705392000"; d="scan'208";a="14465032" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2024 03:20:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,196,1705392000"; d="scan'208";a="31350675" Received: from rcaudill-mobl3.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.209.48.180]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2024 03:20:53 -0800 From: Kai Huang <kai.huang@intel.com> To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: x86@kernel.org, dave.hansen@intel.com, kirill.shutemov@linux.intel.com, peterz@infradead.org, tglx@linutronix.de, bp@alien8.de, mingo@redhat.com, hpa@zytor.com, seanjc@google.com, pbonzini@redhat.com, isaku.yamahata@intel.com, jgross@suse.com, kai.huang@intel.com Subject: [PATCH 1/5] x86/virt/tdx: Rename _offset to _member for TD_SYSINFO_MAP() macro Date: Sat, 2 Mar 2024 00:20:33 +1300 Message-ID: <a55e86430c81274af86d2d1c23cdce2f53fef7d6.1709288433.git.kai.huang@intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <cover.1709288433.git.kai.huang@intel.com> References: <cover.1709288433.git.kai.huang@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792322682395003456 X-GMAIL-MSGID: 1792322682395003456 |
Series |
TDX host: Provide TDX module metadata reading APIs
|
|
Commit Message
Kai Huang
March 1, 2024, 11:20 a.m. UTC
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 <kai.huang@intel.com> Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> --- 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[] = {