summaryrefslogtreecommitdiff
path: root/arch/arm64/include
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2023-02-13 22:33:10 +0000
committerOliver Upton <oliver.upton@linux.dev>2023-02-13 22:33:10 +0000
commit52b603628a2c06be38648aa025daa81e4355a7fc (patch)
treecdaf10e6f49c254f45be23e0b7888c114cad1972 /arch/arm64/include
parente8789ab7047a824fa415948d511634fea0c3aea3 (diff)
parent1dfc3e905089a0bcada268fb5691a605655e0319 (diff)
Merge branch kvm-arm64/parallel-access-faults into kvmarm/next
* kvm-arm64/parallel-access-faults: : Parallel stage-2 access fault handling : : The parallel faults changes that went in to 6.2 covered most stage-2 : aborts, with the exception of stage-2 access faults. Building on top of : the new infrastructure, this series adds support for handling access : faults (i.e. updating the access flag) in parallel. : : This is expected to provide a performance uplift for cores that do not : implement FEAT_HAFDBS, such as those from the fruit company. KVM: arm64: Condition HW AF updates on config option KVM: arm64: Handle access faults behind the read lock KVM: arm64: Don't serialize if the access flag isn't set KVM: arm64: Return EAGAIN for invalid PTE in attr walker KVM: arm64: Ignore EAGAIN for walks outside of a fault KVM: arm64: Use KVM's pte type/helpers in handle_access_fault() Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r--arch/arm64/include/asm/kvm_pgtable.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_pgtable.h b/arch/arm64/include/asm/kvm_pgtable.h
index 63f81b27a4e3..4cd6762bda80 100644
--- a/arch/arm64/include/asm/kvm_pgtable.h
+++ b/arch/arm64/include/asm/kvm_pgtable.h
@@ -71,6 +71,11 @@ static inline kvm_pte_t kvm_phys_to_pte(u64 pa)
return pte;
}
+static inline kvm_pfn_t kvm_pte_to_pfn(kvm_pte_t pte)
+{
+ return __phys_to_pfn(kvm_pte_to_phys(pte));
+}
+
static inline u64 kvm_granule_shift(u32 level)
{
/* Assumes KVM_PGTABLE_MAX_LEVELS is 4 */
@@ -188,12 +193,15 @@ typedef bool (*kvm_pgtable_force_pte_cb_t)(u64 addr, u64 end,
* children.
* @KVM_PGTABLE_WALK_SHARED: Indicates the page-tables may be shared
* with other software walkers.
+ * @KVM_PGTABLE_WALK_HANDLE_FAULT: Indicates the page-table walk was
+ * invoked from a fault handler.
*/
enum kvm_pgtable_walk_flags {
KVM_PGTABLE_WALK_LEAF = BIT(0),
KVM_PGTABLE_WALK_TABLE_PRE = BIT(1),
KVM_PGTABLE_WALK_TABLE_POST = BIT(2),
KVM_PGTABLE_WALK_SHARED = BIT(3),
+ KVM_PGTABLE_WALK_HANDLE_FAULT = BIT(4),
};
struct kvm_pgtable_visit_ctx {