Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp381220lqc; Thu, 7 Mar 2024 23:26:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUIC7rhKvb+ujm8ssh5byUAGIEf+4BAERvRVkW6gqleUYNnFYqlVM+leb8PgJoeRFg3MkwlkckOSTadzJwEw3FAlm7mU58miXVwKkJL/A== X-Google-Smtp-Source: AGHT+IG+No4KIJHxxcaoz2iT8h/xJ+rgoPP9H7PqI8bmldhqD/i4sEqesWKGGZIzebjZhzNfQVkY X-Received: by 2002:a50:d65d:0:b0:567:ee8:7b6e with SMTP id c29-20020a50d65d000000b005670ee87b6emr1536433edj.22.1709882760751; Thu, 07 Mar 2024 23:26:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709882760; cv=pass; d=google.com; s=arc-20160816; b=USsjCyLdNAlx14m47edk9ckqaJOvEFItJt+qZDz32rJJeWxE97nrksLSgwi+yizRAU d3mA0LzDGE6j2vN36e/c3gwIVVHe/ply300Tjfz4cMn30g+3HY8/J3cG6yGLLWysLUqu dXUi4R9zr/XvTVBLypwp8R2m+ZKuyh4LvlogCxj6ZGUFk7Rr3HX9wc9Cy8+MUC/TrH0T P6Qd1v06qk6JvoLCGCMEsZ1ZsZO3tEHk5gKKnKd+wuksNWh/Dsryd01igKoMdQ0l70K8 8s/B2Un0K6/1elXPxPjWx467sJsHPITwTN+pGvijwoy09C0f3yZPTJ0ECNR85Ha1SWGr rvUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=NgfGMTWAzawms9WgtBrnR9/G5f79K4gjhfWNqc3BQT0=; fh=L/tkX2cOqHKwWqIWddzRExEvwgd471IJL29QYab3GZo=; b=ErLA6Ir6Pt4U7Dji67XJcsYrDZ8Iq5S4vJTKN+/H+gGyx0lmgQPWyAnsBNoIQOyU+5 TQZqrAcgmXfy9k/MTvZP4eIv9jLHBFp0233dIZi6vIwwVWp7EDFP2WvNs0tXZVZ7N5wX 227ENr1Yj8SQf/nuMeExZMzZ6hdxmarreOgGyXsOQ18J5r7Xb/IRtTIzhOiH3va0Lxmz 5uw03qwF2C5GhYy5HM4t9ehVqPF+XKdi7Hp64N/UWfHgEHtVzPHoVwwp1ec+LGntSyR2 qudSnOuBoWAEKVDJjkw8/UCf6zqjCeljrhwnNfKbBIkgVpiWnZJhYS4f5SojuuXUPoLE 4Rdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=clsdDwxl; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-96577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96577-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r18-20020a056402235200b005678a5c4593si3311375eda.50.2024.03.07.23.26.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 23:26:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=clsdDwxl; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-96577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96577-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 758581F23194 for ; Fri, 8 Mar 2024 07:26:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3169A4EB5D; Fri, 8 Mar 2024 07:25:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="clsdDwxl" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 47B6832C96; Fri, 8 Mar 2024 07:25:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709882749; cv=none; b=DjGXc0QoCDKq+BhCXOkl9mmtBb/TxKe6hyDdDOoKmmqsRQvLY31i1oAFo5viaSKdTPkZWPv2a4zLpgTkCfuAZ6K3VsFzrIRoQqOUOapKUbG93eNd1h00SJKZ7SHX8wAEJ4L5D0l9SbhCrNdehoo778nNsbLI/9ErFoC2npVBwow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709882749; c=relaxed/simple; bh=Mlep5D6pLWTGzpou+y6uGzZkCXbRptiwjnssLGrv4z8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=I62U3DxotkfPH/wXAEbYmQj9ZQpANl5ycJdujVtlQ26lU5QyaFu7K8M1Tx8UGCXyHqosH/8mYLE3Hky8FjZ0Pd3JRno+ySn3B0BkC6UjT0lnMFs6meNWJGqeSc5pFUj7asIyh/cNOlwKaDUJ5INKjmwr0LAujERsRNRGneSkuTg= 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=clsdDwxl; arc=none smtp.client-ip=198.175.65.14 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=1709882748; x=1741418748; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Mlep5D6pLWTGzpou+y6uGzZkCXbRptiwjnssLGrv4z8=; b=clsdDwxlJkCL08CRG9WOTwJp8hTWhdOWGJTLDP8RwNb2VQsgHcrNrt2X FlfKETgViUJtEfD9N79rBhZnRotHshIoLM9wdPTOmbo/h1IAbBLm5e1Ny 6It5JXqjZ2mGl9DOC7TbAzejNfhRLLynsEuEpTzHQF6PEaaki0tQ5/9iV SJ7JXdgxUx7dvgMZudyOLTT4iiOcg5vzk459pWTVGiGO0M8ftR4i6aYCf xRfRXU6hDIwgW+yVIeuw7f/+yNS6lC1GfPtauX/ETEO/i65+BfWZ55z5F 1krUX2dMdIB+hnBfFNzm1uEFlqHDKgUv+YL2febguoXdvFjhwC3wKV163 w==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="8404006" X-IronPort-AV: E=Sophos;i="6.07,108,1708416000"; d="scan'208";a="8404006" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 23:25:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,108,1708416000"; d="scan'208";a="10377664" Received: from binbinwu-mobl.ccr.corp.intel.com (HELO [10.124.242.47]) ([10.124.242.47]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 23:25:43 -0800 Message-ID: <162cd71a-65c1-4782-92c9-e4bfa6a3af69@linux.intel.com> Date: Fri, 8 Mar 2024 15:25:40 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v19 001/130] x86/virt/tdx: Rename _offset to _member for TD_SYSINFO_MAP() macro 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, "Kirill A . Shutemov" References: From: Binbin Wu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/26/2024 4:25 PM, isaku.yamahata@intel.com wrote: > 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 Reviewed-by: Binbin Wu > --- > 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[] = {