diff options
| author | Bradley Morgan <include@grrlz.net> | 2026-07-17 14:03:13 +0100 |
|---|---|---|
| committer | Oliver Upton <oupton@kernel.org> | 2026-07-31 00:11:56 -0700 |
| commit | 56fd1fc526e6413781a6980aa13ed9db104cbfea (patch) | |
| tree | ba5f60355fde34b88ef5840fc022fb7f75da97d6 /include | |
| parent | 6bf0215c565ee122ffff7241b297a7b88f71005f (diff) | |
KVM: arm64: Top up stage-2 memcache for dirty logging faults
Dirty logging forces new stage-2 mappings to page size but does not
always split an existing block first (eager splitting is best effort
and off by default). A non-write permission fault on such a block, an
instruction fetch, still needs a page-table page to split it, but the
top-up is gated on write faults.
With the cache empty, kvm_mmu_memory_cache_alloc() hits its
guest-triggerable WARN_ON(!nobjs) and falls back to a GFP_ATOMIC
allocation under mmu_lock, with a BUG_ON() if that fails.
Top up the memcache for any permission fault while dirty logging is
active.
Fixes: 6f745f1bb5bf ("KVM: arm64: Convert user_mem_abort() to generic page-table API")
Link: https://lore.kernel.org/all/20260623165634.699011F000E9@smtp.kernel.org/
Signed-off-by: Bradley Morgan <include@grrlz.net>
[tabba: reword the commit message for the generic, non-pKVM failure mode]
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
Tested-by: Bradley Morgan <include@grrlz.net> # On pixel 7, Android 17 CP2A.260705.006
Test: Bradley Morgan <include@grrlz.net> # On QEMU arm64 host
Link: https://patch.msgid.link/20260717130317.1953574-4-fuad.tabba@linux.dev
Signed-off-by: Oliver Upton <oupton@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
