Re: [PATCH v2 1/2] x86/virt/tdx: Retrieve TDX module version
From: Xiaoyao Li
Date: Mon Jan 12 2026 - 22:58:46 EST
On 1/13/2026 10:56 AM, Xu Yilun wrote:
On Mon, Jan 12, 2026 at 06:56:58AM -0800, Dave Hansen wrote:
On 1/11/26 18:25, Xiaoyao Li wrote:
... I know it's because minor_version has the least field ID among the
three. But the order of the field IDs doesn't stand for the order of the
reading. Reading the middle part y of x.y.z as first step looks a bit odd.
I wouldn't sweat it either way. Reading 4, 3, 5 would also look odd. I'm
fine with it as-is in the patch.
I prefer 3, 4, 5. The field IDs are not human readable hex magic so
should take extra care when copying from excel file to C file manually,
A different list order would make the code adding & reviewing even
harder.
I guess eventually we will introduce MACROs for these magic numbers to make the code more readable given that the decision is no longer auto-generate the code by the script? Though I'm not sure when that will happen.