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]
Date:   Wed, 20 Nov 2019 18:13:41 +0800
From:   Wanpeng Li <kernellwp@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        Paolo Bonzini <pbonzini@...hat.com>
Cc:     Sean Christopherson <sean.j.christopherson@...el.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        kvm <kvm@...r.kernel.org>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Jim Mattson <jmattson@...gle.com>,
        Liran Alon <liran.alon@...cle.com>,
        LKML <linux-kernel@...r.kernel.org>,
        "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH RFC] KVM: x86: tell guests if the exposed SMT topology is trustworthy

Hi Paolo,
On Wed, 6 Nov 2019 at 16:34, Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Tue, Nov 05, 2019 at 03:25:28PM -0800, Sean Christopherson wrote:
> > On Tue, Nov 05, 2019 at 09:02:18PM +0100, Peter Zijlstra wrote:
> > > On Tue, Nov 05, 2019 at 05:17:37PM +0100, Vitaly Kuznetsov wrote:
> > > > Virtualized guests may pick a different strategy to mitigate hardware
> > > > vulnerabilities when it comes to hyper-threading: disable SMT completely,
> > > > use core scheduling, or, for example, opt in for STIBP. Making the
> > > > decision, however, requires an extra bit of information which is currently
> > > > missing: does the topology the guest see match hardware or if it is 'fake'
> > > > and two vCPUs which look like different cores from guest's perspective can
> > > > actually be scheduled on the same physical core. Disabling SMT or doing
> > > > core scheduling only makes sense when the topology is trustworthy.
> > > >
> > > > Add two feature bits to KVM: KVM_FEATURE_TRUSTWORTHY_SMT with the meaning
> > > > that KVM_HINTS_TRUSTWORTHY_SMT bit answers the question if the exposed SMT
> > > > topology is actually trustworthy. It would, of course, be possible to get
> > > > away with a single bit (e.g. 'KVM_FEATURE_FAKE_SMT') and not lose backwards
> > > > compatibility but the current approach looks more straightforward.
> > >
> > > The only way virt topology can make any sense what so ever is if the
> > > vcpus are pinned to physical CPUs.
> > >
> > > And I was under the impression we already had a bit for that (isn't it
> > > used to disable paravirt spinlocks and the like?). But I cannot seem to
> > > find it in a hurry.
> >
> > Yep, KVM_HINTS_REALTIME does what you describe.
>
> *sigh*, that's a pretty shit name for it :/

My original commit name this to KVM_HINTS_DEDICATED, commit a4429e53c
(KVM: Introduce paravirtualization hints and KVM_HINTS_DEDICATED),
could we revert the KVM_HINTS_REALTIME renaming? A lot of guys
confused by this renaming now, Peterz, Marcelo ("The previous
definition was much better IMO: HINTS_DEDICATED".
https://lkml.org/lkml/2019/8/26/855).

    Wanpeng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ