[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <936b00e2-1bcc-d5cc-5ae1-59f43ab5325f@redhat.com>
Date: Thu, 10 Jun 2021 14:45:55 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>,
Isaku Yamahata <isaku.yamahata@...el.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>, isaku.yamahata@...il.com
Subject: Re: [RFC PATCH 00/10] KVM: x86/mmu: simplify argument to kvm page
fault handler
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
Powered by blists - more mailing lists