[PATCH] KVM: arm64: Don't livelock when AT can't resolve a fault IPA
Fuad Tabba
fuad.tabba at linux.dev
Mon Nov 2 04:19:55 PST 2026
Hi Ard,
On Mon, 02 Nov 2026 09:47:49 +0000, Ard Biesheuvel <ardb+git at google.com> wrote:
[...]
> When a stage-2 permission fault doesn't report its IPA in HPFAR_EL2,
> __get_fault_info() recovers it with an AT S1E1R/S1E1A on FAR_EL2. If that
> fails, kvm_hyp_handle_memory_fault() goes straight back to the guest, on
> the assumption that the replayed access will either succeed or take a
> fault that the slow path can handle.
[...]
Tested on QEMU (pKVM with protected and non-protected guests, VHE and
nVHE, and page_fault_test) and on an Apple M4 in nVHE, booting UEFI
guests with DAMON_STAT on. On the M4 I added a trace event to the new
branch, and it fired once in 120 boots, on a guest write to the UEFI
flash (a read-only memslot).
Since a guest can livelock on this, I was wondering if it should be Cc: stable.
Reviewed-by: Fuad Tabba <fuad.tabba at linux.dev>
Tested-by: Fuad Tabba <fuad.tabba at linux.dev>
Cheers,
/fuad
More information about the linux-arm-kernel
mailing list