From: Kai Huang <kai.huang@intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: Ben Gardon <bgardon@google.com>, kvm <kvm@vger.kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>
Subject: Re: [PATCH 2/3] KVM: x86/mmu: Fix pf_fixed count in tdp_mmu_map_handle_target_level()
Date: Fri, 07 May 2021 10:21:11 +1200 [thread overview]
Message-ID: <ea3238d8b55ac39de01cdf202af2be009c395277.camel@intel.com> (raw)
In-Reply-To: <YJQLXH/qebWuzLmF@google.com>
On Thu, 2021-05-06 at 15:29 +0000, Sean Christopherson wrote:
> On Thu, May 06, 2021, Kai Huang wrote:
> > On Wed, 2021-05-05 at 09:11 -0700, Ben Gardon wrote:
> > > It would probably also be worth putting a comment on pf_fixed so that
> > > people in the future know what it's supposed to mean and we don't get
> > > into archeology, reverse engineering the meaning of the stat again.
> >
> > It seems the legacy MMU code path is a better place to add the comment to explain when
> > pf_fixed should be increased. However I am not sure whether it is necessary for this
> > patch (and I confess I found it's hard to explain why to increase pf_fixed in case of
> > emulation :)). Or perhaps Sean can write a patch to add comment to legacy MMU :)
>
> Ya, I think it makes sense to hold off on documenting the existing behavior in
> the TDP MMU. As is often the case in KVM, just because KVM has always done
> something one way, doesn't mean it's correct/ideal. But, bikeshedding over what
> faults exactly should count towards pf_fixed is best left to a separate patch.
>
> > I ended up with below, by adding a comment in TDP MMU saying "to make it consistent with
> > legacy MMU...", and in the commit message, I put a lore link of this discussion, since I
> > found Sean's explanation is quite useful. When people are interested in, they can do a git
> > blame and find the commit msg of this change -- although it is not as straightforward as
> > having comment directly.
> >
> > Is this OK to you?
> >
> > And Sean?
>
> Yep, works for me.
Thanks!
next prev parent reply other threads:[~2021-05-06 22:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 9:37 [PATCH 0/3] TDP MMU: several minor fixes or improvements Kai Huang
2021-05-05 9:37 ` [PATCH 1/3] KVM: x86/mmu: Fix return value in tdp_mmu_map_handle_target_level() Kai Huang
2021-05-05 16:00 ` Sean Christopherson
2021-05-05 16:04 ` Ben Gardon
2021-05-06 1:56 ` Kai Huang
2021-05-05 9:37 ` [PATCH 2/3] KVM: x86/mmu: Fix pf_fixed count " Kai Huang
2021-05-05 16:11 ` Ben Gardon
2021-05-06 7:51 ` Kai Huang
2021-05-06 15:29 ` Sean Christopherson
2021-05-06 22:21 ` Kai Huang [this message]
2021-05-05 16:29 ` Sean Christopherson
2021-05-05 17:16 ` Sean Christopherson
2021-05-06 1:51 ` Kai Huang
2021-05-05 9:37 ` [PATCH 3/3] KVM: x86/mmu: Fix TDP MMU page table level Kai Huang
2021-05-05 16:28 ` Ben Gardon
2021-05-05 17:01 ` Ben Gardon
2021-05-05 20:19 ` Kai Huang
2021-05-06 8:00 ` Kai Huang
2021-05-06 16:22 ` Ben Gardon
2021-05-06 16:23 ` Ben Gardon
2021-05-06 22:19 ` Kai Huang
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=ea3238d8b55ac39de01cdf202af2be009c395277.camel@intel.com \
--to=kai.huang@intel.com \
--cc=bgardon@google.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.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).