All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Huang, Kai" <kai.huang@intel.com>
To: "peterz@infradead.org" <peterz@infradead.org>,
	"dmatlack@google.com" <dmatlack@google.com>
Cc: "rdunlap@infradead.org" <rdunlap@infradead.org>, "Christopherson,,
	Sean" <seanjc@google.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"bp@suse.de" <bp@suse.de>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"paulmck@kernel.org" <paulmck@kernel.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"damien.lemoal@opensource.wdc.com"
	<damien.lemoal@opensource.wdc.com>
Subject: Re: [PATCH 0/9] KVM: x86/mmu: Always enable the TDP MMU when TDP is enabled
Date: Wed, 17 Aug 2022 10:01:18 +0000	[thread overview]
Message-ID: <97103b92b9dc1723b1cbfe67ce529a0f065a76ed.camel@intel.com> (raw)
In-Reply-To: <CALzav=eWhg=ZMxVcGf9w_svn1XaTZABN5VoFP3fgxPiHohaMFQ@mail.gmail.com>

On Tue, 2022-08-16 at 09:30 -0700, David Matlack wrote:
> On Tue, Aug 16, 2022 at 1:17 AM Peter Zijlstra <peterz@infradead.org> wrote:
> > 
> > On Mon, Aug 15, 2022 at 04:01:01PM -0700, David Matlack wrote:
> > > Patch 1 deletes the module parameter tdp_mmu and forces KVM to always
> > > use the TDP MMU when TDP hardware support is enabled.  The rest of the
> > > patches are related cleanups that follow (although the kvm_faultin_pfn()
> > > cleanups at the end are only tangentially related at best).
> > > 
> > > The TDP MMU was introduced in 5.10 and has been enabled by default since
> > > 5.15. At this point there are no known functionality gaps between the
> > > TDP MMU and the shadow MMU, and the TDP MMU uses less memory and scales
> > > better with the number of vCPUs. In other words, there is no good reason
> > > to disable the TDP MMU.
> > 
> > Then how are you going to test the shadow mmu code -- which I assume is
> > still relevant for the platforms that don't have this hardware support
> > you speak of?
> 
> TDP hardware support can still be disabled with module parameters
> (kvm_intel.ept=N and kvm_amd.npt=N).
> 
> The tdp_mmu module parameter only controls whether KVM uses the TDP
> MMU or shadow MMU *when TDP hardware is enabled*.

With the tdp_mmu module parameter, when we develop some code, we can at least
easily test legacy MMU code (that it is still working) when *TDP hardware is
enabled* by turning the parameter off.  Or when there's some problem with TDP
MMU code, we can easily switch to use legacy MMU.

Do we want to lose those flexibilities?

-- 
Thanks,
-Kai



  parent reply	other threads:[~2022-08-17 10:01 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15 23:01 [PATCH 0/9] KVM: x86/mmu: Always enable the TDP MMU when TDP is enabled David Matlack
2022-08-15 23:01 ` [PATCH 1/9] " David Matlack
2022-08-17 10:05   ` Paolo Bonzini
2022-08-17 16:49     ` David Matlack
2022-08-17 16:53       ` Paolo Bonzini
2022-08-17 17:46         ` David Matlack
2022-08-15 23:01 ` [PATCH 2/9] KVM: x86/mmu: Drop kvm->arch.tdp_mmu_enabled David Matlack
2022-08-17 11:38   ` kernel test robot
2022-08-24 14:21   ` kernel test robot
2022-08-15 23:01 ` [PATCH 3/9] KVM: x86/mmu: Consolidate mmu_seq calculations in kvm_faultin_pfn() David Matlack
2022-08-15 23:01 ` [PATCH 4/9] KVM: x86/mmu: Rename __direct_map() to nonpaging_map() David Matlack
2022-08-15 23:01 ` [PATCH 5/9] KVM: x86/mmu: Separate TDP and non-paging fault handling David Matlack
2022-08-24 17:06   ` kernel test robot
2022-08-15 23:01 ` [PATCH 6/9] KVM: x86/mmu: Stop needlessly making MMU pages available for TDP MMU faults David Matlack
2022-08-15 23:01 ` [PATCH 7/9] KVM: x86/mmu: Handle "error PFNs" in kvm_faultin_pfn() David Matlack
2022-08-15 23:01 ` [PATCH 8/9] KVM: x86/mmu: Avoid memslot lookup during KVM_PFN_ERR_HWPOISON handling David Matlack
2022-08-15 23:01 ` [PATCH 9/9] KVM: x86/mmu: Try to handle no-slot faults during kvm_faultin_pfn() David Matlack
2022-08-15 23:09   ` David Matlack
2022-08-16  8:16 ` [PATCH 0/9] KVM: x86/mmu: Always enable the TDP MMU when TDP is enabled Peter Zijlstra
2022-08-16 16:30   ` David Matlack
2022-08-17  8:53     ` Peter Zijlstra
2022-08-17 10:01     ` Huang, Kai [this message]
2022-08-17 16:42       ` David Matlack
2022-08-17 23:36         ` Huang, Kai
2022-08-16 22:54 ` 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=97103b92b9dc1723b1cbfe67ce529a0f065a76ed.camel@intel.com \
    --to=kai.huang@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@suse.de \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=dmatlack@google.com \
    --cc=keescook@chromium.org \
    --cc=kvm@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rdunlap@infradead.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.