Skip to content

Commit c20722c

Browse files
committed
Documentation: kvm/sev: clarify usage of KVM_MEMORY_ENCRYPT_OP
Explain that it operates on the VM file descriptor, and also clarify how detection of SEV operates on old kernels predating commit 2da1ed6 ("KVM: SVM: document KVM_MEM_ENCRYPT_OP, let userspace detect if SEV is available"). Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 19cebba commit c20722c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Documentation/virt/kvm/x86/amd-memory-encryption.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ defined in the CPUID 0x8000001f[ecx] field.
4949
The KVM_MEMORY_ENCRYPT_OP ioctl
5050
===============================
5151

52-
The main ioctl to access SEV is KVM_MEMORY_ENCRYPT_OP. If the argument
53-
to KVM_MEMORY_ENCRYPT_OP is NULL, the ioctl returns 0 if SEV is enabled
54-
and ``ENOTTY`` if it is disabled (on some older versions of Linux,
55-
the ioctl runs normally even with a NULL argument, and therefore will
56-
likely return ``EFAULT``). If non-NULL, the argument to KVM_MEMORY_ENCRYPT_OP
57-
must be a struct kvm_sev_cmd::
52+
The main ioctl to access SEV is KVM_MEMORY_ENCRYPT_OP, which operates on
53+
the VM file descriptor. If the argument to KVM_MEMORY_ENCRYPT_OP is NULL,
54+
the ioctl returns 0 if SEV is enabled and ``ENOTTY`` if it is disabled
55+
(on some older versions of Linux, the ioctl tries to run normally even
56+
with a NULL argument, and therefore will likely return ``EFAULT`` instead
57+
of zero if SEV is enabled). If non-NULL, the argument to
58+
KVM_MEMORY_ENCRYPT_OP must be a struct kvm_sev_cmd::
5859

5960
struct kvm_sev_cmd {
6061
__u32 id;

0 commit comments

Comments
 (0)