KVM: arm64: Ignore EAGAIN for walks outside of a fault
authorOliver Upton <oliver.upton@linux.dev>
Fri, 2 Dec 2022 18:51:52 +0000 (18:51 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 12 Jan 2023 21:09:20 +0000 (21:09 +0000)
commitddcadb297ce5cc1cec0b0882d8b750e5e06fc9f4
treeb753ae0cfa880cbbe16aaa130debe6258d1ec90c
parent9a7ad19ac804df56d3a150bcbe8f467a63821625
KVM: arm64: Ignore EAGAIN for walks outside of a fault

The page table walkers are invoked outside fault handling paths, such as
write protecting a range of memory. EAGAIN is generally used by the
walkers to retry execution due to races on a particular PTE, like taking
an access fault on a PTE being invalidated from another thread.

This early return behavior is undesirable for walkers that operate
outside a fault handler. Suppress EAGAIN and continue the walk if
operating outside a fault handler.

Link: https://lore.kernel.org/r/20221202185156.696189-3-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/kvm_pgtable.h
arch/arm64/kvm/hyp/pgtable.c
arch/arm64/kvm/mmu.c