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

From: Andi Kleen
Date: Mon May 24 2021 - 21:02:35 EST



That makes KVM also broken for the cases where wbinvd is needed,


Or maybe your analysis is wrong?


but
it does not make the description of this patch correct.

If KVM was broken I'm sure we would hear about it.

The ACPI cases are for S3, which is not supported in guests, or for the old style manual IO port C6, which isn't supported either.

The persistent memory cases would require working DMA mappings, which we currently don't support. If DMA mappings were added we would need to para virtualized WBINVD, like the comments say.

AFAIK all the rest is for some caching attribute change, which is not possible in KVM (because it uses EPT.IgnorePAT=1) nor in TDX (which does the same). Some are for MTRR which is completely disabled if you're running under EPT.

-Andi