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:   Thu, 14 Oct 2021 13:33:52 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     "Liu, Jing2" <jing2.liu@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     "x86@...nel.org" <x86@...nel.org>,
        "Bae, Chang Seok" <chang.seok.bae@...el.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Arjan van de Ven <arjan@...ux.intel.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "Nakajima, Jun" <jun.nakajima@...el.com>,
        Jing Liu <jing2.liu@...ux.intel.com>,
        "seanjc@...gle.com" <seanjc@...gle.com>,
        "Cooper, Andrew" <andrew.cooper3@...rix.com>
Subject: Re: [patch 13/31] x86/fpu: Move KVMs FPU swapping to FPU core

On 14/10/21 13:21, Liu, Jing2 wrote:
> Got it, the principle is once XCR0[n]=1 and XFD[n]=0, then guest is allowed
> to use the dynamic XSAVE state, thus KVM must prepare all things well
> before. This probably happens shortly after guest #NM.
> 
> Only one thing: it seems we assume that vcpu->arch.xfd is guest runtime
> value. And before guest initializes XFD, KVM provides
> vcpu->arch.xfd[18]=1, right? But the spec asks XFD reset value as zero.
> If so, between guest init XCR0 to 1 and init XFD to 1, it's XCR0[n]=1 and
> XFD[n]=0. If a guest never init XFD and directly use dynamic state...
> 
> Or do we want to provide guest a XFD[18]=1 value at the very beginning?

On reset the guest value has to be zero.  For Linux, which we control, 
we probably want to write the bit in XFD before XSETBV.  For other OSes 
there's nothing we can do, but hopefully they make similar considerations.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ