Re: [PATCH v3 1/4] x86/tdx: Add tdx_mcall_tdreport() API support

Sathyanarayanan Kuppuswamy
2022-04-19T03:54:01Z

On 4/18/22 8:51 PM, Kai Huang wrote:
>> Users are responsible to allocate aligned data. I don't think we need
>> to add a check for it. If it is unaligned, TDCALL will return error.
> Actually this is the kernel memory, but not user memory. Otherwise
> virt_to_phys() doesn't make sense. You copied the user data to kernel memory in
> the last patch. So whether user memory is aligned doesn't matter, and in last
> patch, you have guaranteed the alignment is met during kernel memory allocation.

I mean't user of this API (not user space). But I agree with your
comments.

--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer