KVM Archive on lore.kernel.org
 help / color / Atom feed
From: Isaku Yamahata <isaku.yamahata@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>,
	Isaku Yamahata <isaku.yamahata@intel.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>,
	isaku.yamahata@gmail.com
Subject: Re: [RFC PATCH 00/10] KVM: x86/mmu: simplify argument to kvm page fault handler
Date: Thu, 10 Jun 2021 15:00:56 -0700
Message-ID: <20210610220056.GA642297@private.email.ne.jp> (raw)
In-Reply-To: <936b00e2-1bcc-d5cc-5ae1-59f43ab5325f@redhat.com>

Thanks for feedback. Let me respin it.

On Thu, Jun 10, 2021 at 02:45:55PM +0200,
Paolo Bonzini <pbonzini@redhat.com> wrote:

> On 26/05/21 23:10, Sean Christopherson wrote:
> >    - Have kvm_mmu_do_page_fault() handle initialization of the struct.  That
> >      will allow making most of the fields const, and will avoid the rather painful
> >      kvm_page_fault_init().
> > 
> >    - Pass @vcpu separately.  Yes, it's associated with the fault, but literally
> >      the first line in every consumer is "struct kvm_vcpu *vcpu = kpf->vcpu;".
> > 
> >    - Use "fault" instead of "kpf", mostly because it reads better for people that
> >      aren't intimately familiar with the code, but also to avoid having to refactor
> >      a huge amount of code if we decide to rename kvm_page_fault, e.g. if we decide
> >      to use that name to return fault information to userspace.
> > 
> >    - Snapshot anything that is computed in multiple places, even if it is
> >      derivative of existing info.  E.g. it probably makes sense to grab
> 
> I agree with all of these (especially it was a bit weird not to see vcpu in
> the prototypes).  Thanks Sean for the review!
> 
> Paolo
> 

-- 
Isaku Yamahata <isaku.yamahata@gmail.com>

      reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 10:39 Isaku Yamahata
2021-04-20 10:39 ` [RFC PATCH 01/10] KVM: x86/mmu: make kvm_mmu_do_page_fault() receive single argument Isaku Yamahata
2021-04-20 10:39 ` [RFC PATCH 02/10] KVM: x86/mmu: make kvm_mmu:page_fault " Isaku Yamahata
2021-04-20 10:39 ` [RFC PATCH 03/10] KVM: x86/mmu: make direct_page_fault() " Isaku Yamahata
2021-04-20 10:39 ` [RFC PATCH 04/10] KVM: x86/mmu: make try_async_pf() " Isaku Yamahata
2021-04-20 10:39 ` [RFC PATCH 05/10] KVM: x86/mmu: make page_fault_handle_page_track() " Isaku Yamahata
2021-04-20 10:39 ` [RFC PATCH 06/10] KVM: x86/mmu: make handle_abnormal_pfn() " Isaku Yamahata
2021-04-20 10:39 ` [RFC PATCH 07/10] KVM: x86/mmu: make fast_page_fault() " Isaku Yamahata
2021-04-20 10:39 ` [RFC PATCH 08/10] KVM: x86/mmu: make __direct_map() " Isaku Yamahata
2021-04-20 10:39 ` [RFC PATCH 09/10] KVM: x86/mmu: make kvm_tdp_mmu_map() " Isaku Yamahata
2021-04-20 10:39 ` [RFC PATCH 10/10] KVM: x86/mmu: make FNAME(fetch) " Isaku Yamahata
2021-05-26 21:10 ` [RFC PATCH 00/10] KVM: x86/mmu: simplify argument to kvm page fault handler Sean Christopherson
2021-06-10 12:45   ` Paolo Bonzini
2021-06-10 22:00     ` Isaku Yamahata [this message]

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=20210610220056.GA642297@private.email.ne.jp \
    --to=isaku.yamahata@gmail.com \
    --cc=isaku.yamahata@intel.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@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

KVM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvm/0 kvm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvm kvm/ https://lore.kernel.org/kvm \
		kvm@vger.kernel.org
	public-inbox-index kvm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.kvm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git