[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241118123948.4796-2-kalyazin@amazon.com>
Date: Mon, 18 Nov 2024 12:39:43 +0000
From: Nikita Kalyazin <kalyazin@...zon.com>
To: <pbonzini@...hat.com>, <seanjc@...gle.com>, <corbet@....net>,
<tglx@...utronix.de>, <mingo@...hat.com>, <bp@...en8.de>,
<dave.hansen@...ux.intel.com>, <hpa@...or.com>, <rostedt@...dmis.org>,
<mhiramat@...nel.org>, <mathieu.desnoyers@...icios.com>,
<kvm@...r.kernel.org>, <linux-doc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-trace-kernel@...r.kernel.org>
CC: <jthoughton@...gle.com>, <david@...hat.com>, <peterx@...hat.com>,
<oleg@...hat.com>, <vkuznets@...hat.com>, <gshan@...hat.com>,
<graf@...zon.de>, <jgowans@...zon.com>, <roypat@...zon.co.uk>,
<derekmn@...zon.com>, <nsaenz@...zon.es>, <xmarcalx@...zon.com>,
<kalyazin@...zon.com>
Subject: [RFC PATCH 1/6] Documentation: KVM: add userfault KVM exit flag
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@...zon.com>
---
Documentation/virt/kvm/api.rst | 3 +++
1 file changed, 3 insertions(+)
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
--
2.40.1
Powered by blists - more mailing lists