Re: [PATCHv2 00/29] TDX Guest: TDX core support

From: Sean Christopherson
Date: Wed Feb 16 2022 - 11:08:36 EST


On Thu, Feb 10, 2022, Kai Huang wrote:
>
> > > No objection to omitting "coco". Though what about using "vmx" and "svm" instead
> > > of "tdx" and "sev".
> >
> > I'm not dead-set on this but ...
> >
> > > We lose the more explicit tie to coco, but it would mirror the
> > > sub-directories in arch/x86/kvm/
> >
> > ... having them too close in naming to the non-coco stuff, might cause
> > confusion when looking at:
> >
> > arch/x86/kvm/vmx/vmx.c
> >
> > vs
> >
> > arch/x86/virt/vmx/vmx.c
> >
> > Instead of having
> >
> > arch/x86/kvm/vmx/vmx.c
> >
> > and
> >
> > arch/x86/virt/tdx/vmx.c
> >
> > That second version differs just the right amount. :-)
>
> Having vmx.c under tdx/ directory looks a little bit strange.

Yeah, it's inverted. TDX is a built on top of VMX. If/when we end up with stuff
that is relevant to VMX but not TDX, then we'll be referencing tdx/ for things
that that don't care at all about TDX.