[PATCH v13 03/35] KVM: Use gfn instead of hva for mmu_notifier_retry
David Matlack
dmatlack at google.com
Tue Oct 31 05:21:12 AEDT 2023
On Mon, Oct 30, 2023 at 10:01 AM Paolo Bonzini <pbonzini at redhat.com> wrote:
>
> On Mon, Oct 30, 2023 at 5:53 PM David Matlack <dmatlack at google.com> wrote:
> >
> > On 2023-10-27 11:21 AM, Sean Christopherson wrote:
> > > From: Chao Peng <chao.p.peng at linux.intel.com>
> > >
> > > Currently in mmu_notifier invalidate path, hva range is recorded and
> > > then checked against by mmu_notifier_retry_hva() in the page fault
> > > handling path. However, for the to be introduced private memory, a page
> > ^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > Is there a missing word here?
>
> No but there could be missing hyphens ("for the to-be-introduced
> private memory"); possibly a "soon" could help parsing and that is
> what you were talking about?
Ah that explains it :)
>
> > > if (likely(kvm->mmu_invalidate_in_progress == 1)) {
> > > + kvm->mmu_invalidate_range_start = INVALID_GPA;
> > > + kvm->mmu_invalidate_range_end = INVALID_GPA;
> >
> > I don't think this is incorrect, but I was a little suprised to see this
> > here rather than in end() when mmu_invalidate_in_progress decrements to
> > 0.
>
> I think that would be incorrect on the very first start?
Good point. KVM could initialize start/end before registering
notifiers, but that's extra code.
More information about the Linuxppc-dev
mailing list