summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorLorenzo Stoakes (ARM) <ljs@kernel.org>2026-09-23 16:15:49 +0100
committerMarc Zyngier <maz@kernel.org>2026-09-24 23:28:13 +0100
commitf1fbc7ef12caf0785fdb3ea24193dbd9c425d7b7 (patch)
tree9a7d8198978ef0108d349bc9f5d84373abcde4ae /tools/perf/scripts/python/stackcollapse.py
parentb477bcdfa0342145084948a079b606e058066d80 (diff)
KVM: arm64: Propagate and use kvm_s2_fault_result on S2 fault
When stage 2 page tables fault the net result may either be that a page is mapped, an error occurred or the fault should be retried (-EAGAIN). When a fault succeeds it may be upgraded to a PMD size via transparent_hugepage_adjust(). In order to support KVM pre-faulting the outcome of the fault and the mapping size must be recorded. Track the mapping size via new kvm_s2_fault_result struct, which is threaded through gmem_abort(), user_mem_abort() and kvm_s2_fault_map(). PKVM and SEA aren't relevant to synthetic pre-faulting so neither kvm_inject_sea() nor pkvm_mem_abort() are altered. Actual hardware faulting doesn't require this information, so kvm_handle_guest_abort() simply passes NULL kvm_s2_fault_result to gmem_abort() and user_mem_abort(). A non-NULL result also tells the abort handlers that the caller is pre-faulting rather than a vcpu, in which case -EAGAIN is propagated to the caller to allow the pre-fault to be retried. Likewise, only prepare a KVM_EXIT_MEMORY_FAULT in gmem_abort() when a real fault is being handled, as this updates vcpu state. No functional change intended. Suggested-by: Vincent Donnefort <vdonnefort@google.com> Reviewed-by: Oliver Upton <oupton@kernel.org> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev> Tested-by: Fuad Tabba <fuad.tabba@linux.dev> Link: https://patch.msgid.link/20260923-kvm-arm-prefault-v4-6-d4b0b4dfa8c3@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions