]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KVM: TDX: Document alignment requirements for KVM_TDX_INIT_MEM_REGION
authorMichael Roth <michael.roth@amd.com>
Thu, 8 Jan 2026 21:46:21 +0000 (15:46 -0600)
committerSean Christopherson <seanjc@google.com>
Thu, 15 Jan 2026 20:31:17 +0000 (12:31 -0800)
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: Vishal Annapurve <vannapurve@google.com>
Tested-by: Kai Huang <kai.huang@intel.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
Reviewed-by: Yan Zhao <yan.y.zhao@intel.com>
Link: https://patch.msgid.link/20260108214622.1084057-6-michael.roth@amd.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Documentation/virt/kvm/x86/intel-tdx.rst

index 5efac62c92c7b38519b65e00619372c474e1a632..6a222e9d09541d8f61b635e6eb6eef502ddf6b20 100644 (file)
@@ -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