lkml.org 
[lkml]   [2021]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC v2-fix-v4 1/1] x86/tdx: Skip WBINVD instruction for TDX guest
From
Date


On 6/8/21 9:40 PM, Andi Kleen wrote:
>
>>> 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
>

Currently we use prot_guest_has(PR_GUEST_DISABLE_WBINVD)) check for disabling the wbinvd()
usage (which can be selectively enabled for tested guests).

Is it alright to generalize it with boot_cpu_has(X86_FEATURE_HYPERVISOR) without
verify it?

>
>

--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer

\
 
 \ /
  Last update: 2021-06-09 06:55    [W:1.012 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site