Re: [RFC v2-fix-v2 2/2] x86/tdx: Ignore WBINVD instruction for TDX guest

From: Dave Hansen
Date: Tue May 25 2021 - 00:32:24 EST

On 5/24/21 7:13 PM, Andi Kleen wrote:
> I don't see any point of all of this. We really just want to be the same
> as KVM. Not get into the business of patching a bazillion sub systems
> that cannot be used in TDX anyways.

Andi, there's a fundamental difference between KVM the hypervisor and a
TDX guest: KVM the hypervisor runs unknown guests, and lots of them.

TD guest support as a whole has to handle one thing: running *one* Linux
kernel. Further, the guest support shares a source tree with that
kernel. TD guest support doesn't have to run random binaries for which
there is no source. All of the source is *RIGHT* *THERE*.

The only reason TD guest support would have to fall back to KVM's dirty
tricks is a desire to treat the rest of the kernel like a black box.
KVM frankly has no other choice. TD guest support has all the choices
in the world.