lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b1eb467e-1cb4-0e5e-c3e0-d99044f83ab6@linux.intel.com>
Date:   Tue, 8 Jun 2021 21:54:28 -0700
From:   "Kuppuswamy, Sathyanarayanan" 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>
To:     Andi Kleen <ak@...ux.intel.com>, Andy Lutomirski <luto@...nel.org>,
        "Williams, Dan J" <dan.j.williams@...el.com>
Cc:     "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Dave Hansen <dave.hansen@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Kirill Shutemov <kirill.shutemov@...ux.intel.com>,
        Kuppuswamy Sathyanarayanan <knsathya@...nel.org>,
        Raj Ashok <ashok.raj@...el.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC v2-fix-v4 1/1] x86/tdx: Skip WBINVD instruction for TDX
 guest



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ