diff options
author | Oliver Upton <oliver.upton@linux.dev> | 2022-12-02 18:51:52 +0000 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2023-01-12 21:09:20 +0000 |
commit | ddcadb297ce5cc1cec0b0882d8b750e5e06fc9f4 (patch) | |
tree | b753ae0cfa880cbbe16aaa130debe6258d1ec90c /arch/arm64/include/asm/kvm_pgtable.h | |
parent | 9a7ad19ac804df56d3a150bcbe8f467a63821625 (diff) | |
download | linux-stable-ddcadb297ce5cc1cec0b0882d8b750e5e06fc9f4.tar.gz linux-stable-ddcadb297ce5cc1cec0b0882d8b750e5e06fc9f4.tar.bz2 linux-stable-ddcadb297ce5cc1cec0b0882d8b750e5e06fc9f4.zip |
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>
Diffstat (limited to 'arch/arm64/include/asm/kvm_pgtable.h')
-rw-r--r-- | arch/arm64/include/asm/kvm_pgtable.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_pgtable.h b/arch/arm64/include/asm/kvm_pgtable.h index 192f33b88dc1..4cd6762bda80 100644 --- a/arch/arm64/include/asm/kvm_pgtable.h +++ b/arch/arm64/include/asm/kvm_pgtable.h @@ -193,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 { |