From: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dave Hansen <dave.hansen@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, Shuah Khan <shuah@kernel.org>,
"H . Peter Anvin" <hpa@zytor.com>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Tony Luck <tony.luck@intel.com>, Andi Kleen <ak@linux.intel.com>,
Kai Huang <kai.huang@intel.com>,
Wander Lairson Costa <wander@redhat.com>,
Isaku Yamahata <isaku.yamahata@gmail.com>,
marcelo.cerri@canonical.com, tim.gardner@canonical.com,
khalid.elmously@canonical.com, philip.cox@canonical.com,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH v11 1/3] x86/tdx: Add TDX Guest attestation interface driver
Date: Mon, 29 Aug 2022 13:09:36 -0700 [thread overview]
Message-ID: <73b375c3-97a7-5f25-5abf-48d9ec6be2db@linux.intel.com> (raw)
In-Reply-To: <YwxO2L/MtCw/OHGB@kroah.com>
Hi,
On 8/28/22 10:30 PM, Greg Kroah-Hartman wrote:
>> struct tdx_report_req {
>> __u64 reportdata;;
>> __u64 tdreport;
>> __u32 rpd_len
>> __u32 tdr_len;
>> __u8 subtype;
>> };
> That's better, but again, please use pahole.
Following are the pahole dump of both formats.
With previous format, compiler adds 11 bytes in holes and 4 bytes of
padding.
Total size of struct is 40 bytes.
struct tdx_report_req {
__u8 subtype; /* 0 1 */
/* XXX 7 bytes hole, try to pack */
__u64 reportdata; /* 8 8 */
__u32 rpd_len; /* 16 4 */
/* XXX 4 bytes hole, try to pack */
__u64 tdreport; /* 24 8 */
__u32 tdr_len; /* 32 4 */
/* size: 40, cachelines: 1, members: 5 */
/* sum members: 25, holes: 2, sum holes: 11 */
/* padding: 4 */
/* last cacheline: 40 bytes */
};
With the changed format, we avoided the holes, but it still adds 7 bytes of padding.
Total size of struct is 32 bytes.
struct tdx_report_req {
__u64 reportdata; /* 0 8 */
__u64 tdreport; /* 8 8 */
__u32 rpd_len; /* 16 4 */
__u32 tdr_len; /* 20 4 */
__u8 subtype; /* 24 1 */
/* size: 32, cachelines: 1, members: 5 */
/* padding: 7 */
/* last cacheline: 32 bytes */
};
--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer
next prev parent reply other threads:[~2022-08-29 20:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 15:06 [PATCH v11 1/3] x86/tdx: Add TDX Guest attestation interface driver Kuppuswamy Sathyanarayanan
2022-08-26 15:06 ` [PATCH v11 2/3] selftests: tdx: Test TDX attestation GetReport support Kuppuswamy Sathyanarayanan
2022-08-26 15:06 ` [PATCH v11 3/3] Documentation/x86: Document TDX attestation process Kuppuswamy Sathyanarayanan
2022-08-29 2:50 ` Bagas Sanjaya
2022-08-29 3:05 ` Sathyanarayanan Kuppuswamy
2022-08-27 7:33 ` [PATCH v11 1/3] x86/tdx: Add TDX Guest attestation interface driver Greg Kroah-Hartman
2022-08-28 1:38 ` Sathyanarayanan Kuppuswamy
2022-08-27 7:45 ` Bagas Sanjaya
2022-08-28 1:52 ` Sathyanarayanan Kuppuswamy
2022-08-28 20:14 ` Dave Hansen
2022-08-29 0:19 ` Sathyanarayanan Kuppuswamy
2022-08-29 5:30 ` Greg Kroah-Hartman
2022-08-29 20:09 ` Sathyanarayanan Kuppuswamy [this message]
2022-08-29 20:28 ` Dave Hansen
2022-08-29 20:34 ` Sathyanarayanan Kuppuswamy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=73b375c3-97a7-5f25-5abf-48d9ec6be2db@linux.intel.com \
--to=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=ak@linux.intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=isaku.yamahata@gmail.com \
--cc=kai.huang@intel.com \
--cc=khalid.elmously@canonical.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=marcelo.cerri@canonical.com \
--cc=mingo@redhat.com \
--cc=philip.cox@canonical.com \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
--cc=tim.gardner@canonical.com \
--cc=tony.luck@intel.com \
--cc=wander@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.