On Wed, May 28, 2025, Sean Christopherson wrote: > On Wed, May 28, 2025, Xiaoyao Li wrote: > > On 5/23/2025 8:11 AM, Sean Christopherson wrote: > > > diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c > > > index cbc84c6abc2e..41da2cb1e3f1 100644 > > > --- a/arch/x86/kvm/mmu/mmu.c > > > +++ b/arch/x86/kvm/mmu/mmu.c > > > @@ -3882,6 +3882,18 @@ static int mmu_alloc_direct_roots(struct kvm_vcpu *vcpu) > > > return r; > > > } > > > +static int kvm_mmu_alloc_page_hash(struct kvm *kvm) > > > +{ > > > + typeof(kvm->arch.mmu_page_hash) h; > > > > Out of curiousity, it is uncommon in KVM to use typeof() given that we know > > what the type actually is. Is there some specific reason? > > I'm pretty sure it's a leftover from various experiments. IIRC, I was trying to > do something odd and was having a hard time getting the type right :-) > > I'll drop the typeof() in favor of "struct hlist_head *", using typeof here isn't > justified and IMO makes the code a bit harder to read. Gah, I forgot to switch to address this when applying. I'll fixup the commit and force push; it'll only affect this series (hooray for topic branches).