On Fri, 2023-02-10 at 14:59 +0800, Chao Gao wrote: > On Thu, Feb 09, 2023 at 10:40:16AM +0800, Robert Hoo wrote: > > kvm_mmu_ensure_valid_pgd() is stale. Update the comments according > > to > > latest code. > > > > No function changes. > > > > P.S. Sean firstly noticed this in > > Reported-by:? OK. Sean agree? > > Should not this be post separately? This patch has nothing to do with > LAM. It's too trivial to post separately, I think, just comments updates. And it on the code path of LAM KVM enabling, therefore I observed and update passingly; although no code change happens. > > > https://lore.kernel.org/kvm/Yg%2FguAXFLJBmDflh@xxxxxxxxxx/. > > > > Signed-off-by: Robert Hoo <robert.hu@xxxxxxxxxxxxxxx> > > --- > > arch/x86/kvm/mmu/mmu.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c > > index 1d61dfe37c77..9a780445a88e 100644 > > --- a/arch/x86/kvm/mmu/mmu.c > > +++ b/arch/x86/kvm/mmu/mmu.c > > @@ -4497,8 +4497,12 @@ void kvm_mmu_new_pgd(struct kvm_vcpu *vcpu, > > gpa_t new_pgd) > > struct kvm_mmu *mmu = vcpu->arch.mmu; > > union kvm_mmu_page_role new_role = mmu->root_role; > > > > + /* > > + * If no root is found in cache, current active root.hpa will > > be (set) > > + * INVALID_PAGE, a new root will be set up during > > vcpu_enter_guest() > > + * --> kvm_mmu_reload(). > > + */ > > if (!fast_pgd_switch(vcpu->kvm, mmu, new_pgd, new_role)) { > > - /* kvm_mmu_ensure_valid_pgd will set up a new root. */ > > return; > > } > > > > -- > > 2.31.1 > >