summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/hyp/pgtable.c
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2022-12-02 19:51:53 +0100
committerOliver Upton <oliver.upton@linux.dev>2023-01-12 22:09:20 +0100
commit76259cca479501579b0c524826c25fcc8bb90e97 (patch)
tree6cdded89f42ae1fe334e452dd53c25a780bceb50 /arch/arm64/kvm/hyp/pgtable.c
parentKVM: arm64: Ignore EAGAIN for walks outside of a fault (diff)
downloadlinux-76259cca479501579b0c524826c25fcc8bb90e97.tar.xz
linux-76259cca479501579b0c524826c25fcc8bb90e97.zip
KVM: arm64: Return EAGAIN for invalid PTE in attr walker
Return EAGAIN for invalid PTEs in the attr walker, signaling to the caller that any serialization and/or invalidation can be elided. Link: https://lore.kernel.org/r/20221202185156.696189-4-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'arch/arm64/kvm/hyp/pgtable.c')
-rw-r--r--arch/arm64/kvm/hyp/pgtable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c
index 98818214a479..204e59e05674 100644
--- a/arch/arm64/kvm/hyp/pgtable.c
+++ b/arch/arm64/kvm/hyp/pgtable.c
@@ -1048,7 +1048,7 @@ static int stage2_attr_walker(const struct kvm_pgtable_visit_ctx *ctx,
struct kvm_pgtable_mm_ops *mm_ops = ctx->mm_ops;
if (!kvm_pte_valid(ctx->old))
- return 0;
+ return -EAGAIN;
data->level = ctx->level;
data->pte = pte;