[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a3ea7446-901f-1d33-47a9-35755b4d86d5@redhat.com>
Date: Thu, 26 May 2022 14:01:43 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Ben Gardon <bgardon@...gle.com>, kvm@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Peter Xu <peterx@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
David Matlack <dmatlack@...gle.com>,
Jim Mattson <jmattson@...gle.com>,
David Dunn <daviddunn@...gle.com>,
Jing Zhang <jingzhangos@...gle.com>,
Junaid Shahid <junaids@...gle.com>
Subject: Re: [PATCH] KVM: x86/MMU: Zap non-leaf SPTEs when disabling dirty
logging
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
Powered by blists - more mailing lists