Re: [PATCH v12 12/23] KVM: selftests: Add helper to initialize TDX VM

From: Reinette Chatre

Date: Wed Oct 29 2025 - 19:01:58 EST




On 10/29/25 2:16 PM, Ira Weiny wrote:
>
>> +
>> +#define vm_tdx_vm_ioctl(vm, cmd, flags, arg) \
>> +({ \
>> + int ret = __vm_tdx_vm_ioctl(vm, cmd, flags, arg); \
>> + \
>> + __TEST_ASSERT_VM_VCPU_IOCTL(!ret, #cmd, ret, vm); \
>> +})
>> +
>> +#define __vm_tdx_vcpu_ioctl(vcpu, cmd, metadata, arg) \
>
> NIT: Why not just call 'metadata', 'flags'?
>

Making this change would make the code easier to read by being consistent
with caller here as well as with kernel terms. If making this change please
consider its callers also, for example the "metadata" local variable of
tdx_init_mem_region() introduced in patch #14. Naming it flags would then also
be consistent with this change as well as how the flag is used in the kernel.

Reinette