Re: [PATCH v2 1/2] KVM: arm64: skip pKVM cache flushes for non cacheable mappings
Bradley Morgan
include at grrlz.net
Tue Jun 23 12:56:27 PDT 2026
On June 23, 2026 7:51:05 PM GMT+01:00, Bradley Morgan <include at grrlz.net>
wrote:
>On June 23, 2026 6:13:48 PM GMT+01:00, Marc Zyngier <maz at kernel.org>
>wrote:
>>On Tue, 23 Jun 2026 18:04:07 +0100,
>>Bradley Morgan <include at grrlz.net> wrote:
>>>
>>> I'll go and do V3 with another sashiko suggestion. I'll fix your path
>>too.
>>
>>Before you do that, please verify that whatever Sashiko spits out
>>makes any sense. I'm not convinced by its reply on v1 at all.
>>
>> M.
>>
>>
>
>Marc,
>
>hi, I have verified sashikos concern.
>
>I am out right now. So I will give a very short result.
>
>
>Sashiko is being bit dramatic with the whole "Critical" rating, but it
>is real in another way
>
>
>I'll explain it in the code in about 30-40 mins.
>
>Thanks!
hey, I'm back now. Let me explain
For the dirty logging report, I agree the bot's wording was not the
greatest..
The issue is not best described as a *guaranteed* -ENOMEM guest abort.
The actual failure path seems to be:
user_mem_abort() skips topup_mmu_memcache() for permission faults,
unless dirty logging is active and
kvm_is_write_fault() is true.
For an instruction permission fault, kvm_is_write_fault() is false.
Dirty logging makes kvm_s2_resolve_vma_size() force max_map_size to
PAGE_SIZE.
If the existing stage 2 entry is *still* a PMD, then kvm_s2_fault_map()
has mapping_size == PAGE_SIZE but perm_fault_granule == PMD_SIZE, so
it calls kvm_pgtable_stage2_map() instead of relax_perms().
The generic stage 2 walker then needs a page table page to split the
PMD in stage2_map_walk_leaf().
So the real issue is that this path can enter the split path without
having topped up the memcache. Eager splitting does not make it
impossible....
since it is best effort and the default split chunk size is 0.
About the V3, I won't send the V3 yet. Until more people review / or
it's been a few days
Thanks!
More information about the linux-arm-kernel
mailing list