lkml.org 
[lkml]   [2022]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] KVM: x86/MMU: Zap non-leaf SPTEs when disabling dirty logging
From
On 5/26/22 01:09, Ben Gardon wrote:
> + WARN_ON(max_mapping_level < iter.level);
> +
> + /*
> + * If this page is already mapped at the highest
> + * viable level, there's nothing more to do.
> + */
> + if (max_mapping_level == iter.level)
> + continue;
> +
> + /*
> + * The page can be remapped at a higher level, so step
> + * up to zap the parent SPTE.
> + */
> + while (max_mapping_level > iter.level)
> + tdp_iter_step_up(&iter);
> +
> /* Note, a successful atomic zap also does a remote TLB flush. */
> - if (tdp_mmu_zap_spte_atomic(kvm, &iter))
> - goto retry;
> + tdp_mmu_zap_spte_atomic(kvm, &iter);
> +

Can you make this a sparate function (for example
tdp_mmu_zap_collapsible_spte_atomic)? Otherwise looks great!

Paolo

\
 
 \ /
  Last update: 2022-05-26 14:03    [W:0.104 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site