Re: [PATCH] KVM: x86/mmu: Clean up function comments for dirty logging APIs

From: Sean Christopherson
Date: Thu Jun 13 2024 - 19:35:41 EST


On Thu, Jun 13, 2024, David Matlack wrote:
> On 2024-06-11 02:58 PM, Sean Christopherson wrote:
> > I don't actually care too much about the comment itself, I really just want to
> > get rid of the annoying warnings (I was *very* tempted to just delete the extra
> > asterisk), so if anyone has any opinion whatsoever...
>
> I vote to drop it and document the nuance around PML in the function

As in, drop the function comment entirely? I'm definitely a-ok with that too.

> > @@ -1373,14 +1354,26 @@ static void kvm_mmu_clear_dirty_pt_masked(struct kvm *kvm,
> > }
> >
> > /**
> > - * kvm_arch_mmu_enable_log_dirty_pt_masked - enable dirty logging for selected
> > - * PT level pages.
> > + * kvm_arch_mmu_enable_log_dirty_pt_masked - (Re)Enable dirty logging for a set
> > + * of GFNs
> > *
> > - * It calls kvm_mmu_write_protect_pt_masked to write protect selected pages to
> > - * enable dirty logging for them.
> > + * @kvm: kvm instance
> > + * @slot: slot to containing the gfns to dirty log
> > + * @gfn_offset: start of the BITS_PER_LONG pages we care about
>
> Someone once told me to avoid using "we" in comments :)

Darn copy+paste.