From: Sean Christopherson <seanjc@google.com>
To: David Matlack <dmatlack@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 0/2] KVM: x86/mmu: Do not recover NX Huge Pages when dirty logging is enabled
Date: Fri, 28 Oct 2022 21:07:14 +0000 [thread overview]
Message-ID: <Y1xEggz1oeNObHuP@google.com> (raw)
In-Reply-To: <CALzav=e-gJ77LCo7HsL4X37B96njySebw8DGbPV_xcHbhaCBag@mail.gmail.com>
On Fri, Oct 28, 2022, David Matlack wrote:
> I'll experiment with a more accurate solution. i.e. have the recovery
> worker lookup the memslot for each SP and check if it has dirty
> logging enabled. Maybe the increase in CPU usage won't be as bad as I
> thought.
If you end up grabbing the memslot, use kvm_mmu_max_mapping_level() instead of
checking only dirty logging. The way KVM will avoid zapping shadow pages that
could have been NX huge pages when they were created, but can no longer be NX huge
pages due to something other than dirty logging, e.g. because the gfn is being
shadow for nested TDP.
next prev parent reply other threads:[~2022-10-28 21:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 20:03 [PATCH 0/2] KVM: x86/mmu: Do not recover NX Huge Pages when dirty logging is enabled David Matlack
2022-10-27 20:03 ` [PATCH 1/2] KVM: Keep track of the number of memslots with dirty logging enabled David Matlack
2022-10-27 20:34 ` Sean Christopherson
2022-10-27 22:15 ` David Matlack
2022-10-27 23:04 ` Sean Christopherson
2022-10-27 20:03 ` [PATCH 2/2] KVM: x86/mmu: Do not recover NX Huge Pages when dirty logging is enabled David Matlack
2022-10-28 10:58 ` [PATCH 0/2] " Paolo Bonzini
2022-10-28 20:05 ` David Matlack
2022-10-28 21:07 ` Sean Christopherson [this message]
2022-10-28 21:24 ` David Matlack
2022-10-28 21:42 ` Sean Christopherson
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=Y1xEggz1oeNObHuP@google.com \
--to=seanjc@google.com \
--cc=dmatlack@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.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;
as well as URLs for NNTP newsgroup(s).