Re: [RFC v2-fix-v4 1/1] x86/tdx: Skip WBINVD instruction for TDX guest

From: Andi Kleen
Date: Wed Jun 09 2021 - 00:40:54 EST



KVM only turns it into a noop if there is no VT-d, because with VT-d you
might need it to turn mappings into uncached and vice versa.
Wow, I found the kvm_arch_register_noncoherent_dma() stuff. That's horrifying. What's it for? e

e.g. if you want to run a GPU it really needs some uncached memory. Same is true for other more complex devices.

Now modern Linux of course will be preferring CLFLUSH instead for the conversion, but there are old versions that preferred WBINVD.

I don't think it's a DoS, as long as you're not too picky about latencies on the host.

-Andi