From: Paolo Bonzini <pbonzini@redhat.com>
To: Ben Gardon <bgardon@google.com>, kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Peter Xu <peterx@redhat.com>,
Sean Christopherson <seanjc@google.com>,
David Matlack <dmatlack@google.com>,
Jim Mattson <jmattson@google.com>,
David Dunn <daviddunn@google.com>,
Jing Zhang <jingzhangos@google.com>,
Junaid Shahid <junaids@google.com>
Subject: Re: [PATCH] KVM: x86/MMU: Zap non-leaf SPTEs when disabling dirty logging
Date: Thu, 26 May 2022 14:01:43 +0200 [thread overview]
Message-ID: <a3ea7446-901f-1d33-47a9-35755b4d86d5@redhat.com> (raw)
In-Reply-To: <20220525230904.1584480-1-bgardon@google.com>
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
next prev parent reply other threads:[~2022-05-26 12:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 23:09 Ben Gardon
2022-05-25 23:12 ` Ben Gardon
2022-05-26 1:30 ` Yuan Yao
2022-05-26 15:57 ` Ben Gardon
2022-05-26 12:01 ` Paolo Bonzini [this message]
2022-05-26 14:30 ` Peter Xu
2022-05-26 15:52 ` Paolo Bonzini
2022-05-26 16:00 ` Ben Gardon
2022-06-06 23:11 ` Ben Gardon
2022-05-26 16:40 ` David Matlack
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a3ea7446-901f-1d33-47a9-35755b4d86d5@redhat.com \
--to=pbonzini@redhat.com \
--cc=bgardon@google.com \
--cc=daviddunn@google.com \
--cc=dmatlack@google.com \
--cc=jingzhangos@google.com \
--cc=jmattson@google.com \
--cc=junaids@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterx@redhat.com \
--cc=seanjc@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®