Re: [RFC PATCH v2 00/69] KVM: X86: TDX support

From: Sean Christopherson
Date: Wed Jul 28 2021 - 12:51:58 EST


On Mon, Jul 26, 2021, Paolo Bonzini wrote:
> On 03/07/21 00:04, isaku.yamahata@xxxxxxxxx wrote:
> > * Patch organization
> > The patch 66 is main change. The preceding patches(1-65) The preceding
> > patches(01-61) are refactoring the code and introducing additional hooks.
> >
> > - 01-12: They are preparations. introduce architecture constants, code
> > refactoring, export symbols for following patches.
> > - 13-40: start to introduce the new type of VM and allow the coexistence of
> > multiple type of VM. allow/disallow KVM ioctl where
> > appropriate. Especially make per-system ioctl to per-VM ioctl.
> > - 41-65: refactoring KVM VMX/MMU and adding new hooks for Secure EPT.
> > - 66: main patch to add "basic" support for building/running TDX.
> > - 67: trace points for
> > - 68-69: Documentation
>
> Queued 2,3,17-20,23,44-45, thanks.

I strongly object to merging these two until we see the new SEAMLDR code:

[RFC PATCH v2 02/69] KVM: X86: move kvm_cpu_vmxon() from vmx.c to virtext.h
[RFC PATCH v2 03/69] KVM: X86: move out the definition vmcs_hdr/vmcs from kvm to x86

If the SEAMLDR code ends up being fully contained in KVM, then this is unnecessary
churn and exposes code outside of KVM that we may not want exposed (yet). E.g.
setting and clearing CR4.VMXE (in the fault path) in cpu_vmxon() may not be
necessary/desirable for SEAMLDR, we simply can't tell without seeing the code.