diff mbox series

[RFC,1/6] Documentation: KVM: add userfault KVM exit flag

Message ID 20241118123948.4796-2-kalyazin@amazon.com (mailing list archive)
State New
Headers show
Series KVM: x86: async PF user | expand

Commit Message

Nikita Kalyazin Nov. 18, 2024, 12:39 p.m. UTC
Update KVM documentation to reflect the change made in [1]:
add KVM_MEMORY_EXIT_FLAG_USERFAULT flag to struct memory_fault.

[1] https://lore.kernel.org/lkml/20240710234222.2333120-7-jthoughton@google.com/

Signed-off-by: Nikita Kalyazin <kalyazin@amazon.com>
---
 Documentation/virt/kvm/api.rst | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index 26a98fea718c..ffe9a2d0e525 100644
--- a/Documentation/virt/kvm/api.rst
+++ b/Documentation/virt/kvm/api.rst
@@ -6996,6 +6996,7 @@  spec refer, https://github.com/riscv/riscv-sbi-doc.
 		/* KVM_EXIT_MEMORY_FAULT */
 		struct {
   #define KVM_MEMORY_EXIT_FLAG_PRIVATE	(1ULL << 3)
+  #define KVM_MEMORY_EXIT_FLAG_USERFAULT  (1ULL << 4)
 			__u64 flags;
 			__u64 gpa;
 			__u64 size;
@@ -7009,6 +7010,8 @@  describes properties of the faulting access that are likely pertinent:
  - KVM_MEMORY_EXIT_FLAG_PRIVATE - When set, indicates the memory fault occurred
    on a private memory access.  When clear, indicates the fault occurred on a
    shared access.
+ - KVM_MEMORY_EXIT_FLAG_USERFAULT - When set, indicates the memory fault
+   occurred, because the vCPU attempted to access a gfn marked as userfault.
 
 Note!  KVM_EXIT_MEMORY_FAULT is unique among all KVM exit reasons in that it
 accompanies a return code of '-1', not '0'!  errno will always be set to EFAULT