Re: [PATCH v3 19/40] KVM: x86: Swap the include order between x86.h and mmu.h

From: Sean Christopherson

Date: Mon Jun 01 2026 - 17:20:36 EST


On Mon, Jun 01, 2026, Yosry Ahmed wrote:
> On Mon, Jun 01, 2026 at 07:55:28AM -0700, Sean Christopherson wrote:
> > On Sat, May 30, 2026, Yosry Ahmed wrote:
> > > On Fri, May 29, 2026 at 03:22:02PM -0700, Sean Christopherson wrote:
> > > > Invert the include ordering between x86.h and mmu.h, so that x86.h is the
> > > > "top-level" include for KVM x86.
> > >
> > > You're also silently moving mmu_is_nested().
> >
> > I'll explicitly call that out.
> >
> > > Aside from that, I thought top-level include means that other headers
> > > will include it, and it will include fewer headers. Seems like this is
> > > doing the opposite?
> >
> > Yeah, I'm probably using confusing terminology. I could quite figure out how
> > to concisely describe this. I like my pyramid visualation, so about:
> >
> > Invert the include ordering between x86.h and mmu.h, and move
> > mmu_is_nested() to mmu.h where it belongs (mmu_is_nested()'s placement in
> > x86.h was solely responsible for the existing ordering), so that x86.h is
> > the top of KVM x86's "include pyramid".
>
> Not to be pedantic, but I still can't quite figure out this
> analogy/visualization.
>
> How about just spelling it out:
>
> so that x86.h is not included by most headers (but includes them).

Works for me.