Commit 189fd1b0 authored by Michael Roth's avatar Michael Roth Committed by Sean Christopherson
Browse files

KVM: TDX: Document alignment requirements for KVM_TDX_INIT_MEM_REGION



Since it was never possible to use a non-PAGE_SIZE-aligned @source_addr,
go ahead and document this as a requirement. This is in preparation for
enforcing page-aligned @source_addr for all architectures in
guest_memfd.

Reviewed-by: default avatarVishal Annapurve <vannapurve@google.com>
Tested-by: default avatarKai Huang <kai.huang@intel.com>
Signed-off-by: default avatarMichael Roth <michael.roth@amd.com>
Reviewed-by: default avatarYan Zhao <yan.y.zhao@intel.com>
Link: https://patch.msgid.link/20260108214622.1084057-6-michael.roth@amd.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent dcbcc232
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ KVM_TDX_INIT_MEM_REGION
:Returns: 0 on success, <0 on error

Initialize @nr_pages TDX guest private memory starting from @gpa with userspace
provided data from @source_addr.
provided data from @source_addr. @source_addr must be PAGE_SIZE-aligned.

Note, before calling this sub command, memory attribute of the range
[gpa, gpa + nr_pages] needs to be private.  Userspace can use