summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2022-12-22 09:26:31 +0000
committerMarc Zyngier <maz@kernel.org>2023-01-03 10:01:52 +0000
commitb8f8d190fa8fa1909dda12d771df67125d6fbf0c (patch)
treef8ccf2401296fbef20c69fbb169eaaf9786afb61 /Documentation
parent406504c7b0405d74d74c15a667cd4c4620c3e7a9 (diff)
KVM: arm64: Document the behaviour of S1PTW faults on RO memslots
Although the KVM API says that a write to a RO memslot must result in a KVM_EXIT_MMIO describing the write, the arm64 architecture doesn't provide the *data* written by a Stage-1 page table walk (we only get the address). Since there isn't much userspace can do with so little information anyway, document the fact that such an access results in a guest exception, not an exit. This is consistent with the guest being terminally broken anyway. Reviewed-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/virt/kvm/api.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index 0dd5d8733dd5..42db72a0cbe6 100644
--- a/Documentation/virt/kvm/api.rst
+++ b/Documentation/virt/kvm/api.rst
@@ -1354,6 +1354,14 @@ the memory region are automatically reflected into the guest. For example, an
mmap() that affects the region will be made visible immediately. Another
example is madvise(MADV_DROP).
+Note: On arm64, a write generated by the page-table walker (to update
+the Access and Dirty flags, for example) never results in a
+KVM_EXIT_MMIO exit when the slot has the KVM_MEM_READONLY flag. This
+is because KVM cannot provide the data that would be written by the
+page-table walker, making it impossible to emulate the access.
+Instead, an abort (data abort if the cause of the page-table update
+was a load or a store, instruction abort if it was an instruction
+fetch) is injected in the guest.
4.36 KVM_SET_TSS_ADDR
---------------------