Skip to contentSkip to conversation

KVM: fix documentation for KVM_CREATE_GUEST_MEMFD

PATCH Applied Carlos López 2 participants 3 messages Apr 24, 2024 – May 3, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: fix documentation for KVM_CREATE_GUEST_MEMFD

The KVM_CREATE_GUEST_MEMFD ioctl returns a file descriptor, and is documented as such in the description. However, the "Returns" field in the documentation states that the ioctl returns 0 on success. Update this to match the description.

---
 Documentation/virt/kvm/api.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/virt/kvm/api.rst +1 -1
index 0b5a33ee71ee..57bd2b2b1532 100644
@@ -6316,7 +6316,7 @@ The "flags" field is reserved for future extensions and must be '0'.
 :Architectures: none
 :Type: vm ioctl
 :Parameters: struct kvm_create_guest_memfd(in)
-:Returns: 0 on success, <0 on error
+:Returns: A file descriptor on success, <0 on error
 
 KVM_CREATE_GUEST_MEMFD creates an anonymous file and returns a file descriptor
 that refers to it.  guest_memfd files are roughly analogous to files created
Signature · 1 line
2.35.3
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Carlos López

The KVM_CREATE_GUEST_MEMFD ioctl returns a file descriptor, and is documented as such in the description. However, the "Returns" field in the documentation states that the ioctl returns 0 on success. Update this to match the description.

Ugh, copy+paste fail. Good job me. In case want this backported,

Fixes a7800aa80ea4 ("KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory")
reviewer Applied
#2 lore raw
In reply to Carlos López
Quoted 6 lines · Carlos López

The KVM_CREATE_GUEST_MEMFD ioctl returns a file descriptor, and is documented as such in the description. However, the "Returns" field in the documentation states that the ioctl returns 0 on success. Update this to match the description.

Applied to kvm-x86 generic, thanks!

[1/1] KVM: fix documentation for KVM_CREATE_GUEST_MEMFD

      https://github.com/kvm-x86/linux/commit/2098acaf2445

--
https://github.com/kvm-x86/linux/tree/next