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: <15fd8eaf-ba71-4f0e-9aed-5f7a6f5a4ea7@zytor.com>
Date: Mon, 28 Apr 2025 00:44:06 -0700
From: Xin Li <xin@...or.com>
To: Chao Gao <chao.gao@...el.com>, Sean Christopherson <seanjc@...gle.com>
Cc: Rick P Edgecombe <rick.p.edgecombe@...el.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "ebiggers@...gle.com" <ebiggers@...gle.com>,
        Dave Hansen <dave.hansen@...el.com>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        Stanislav Spassov <stanspas@...zon.de>,
        "levymitchell0@...il.com" <levymitchell0@...il.com>,
        "samuel.holland@...ive.com" <samuel.holland@...ive.com>,
        Xin3 Li <xin3.li@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Weijiang Yang <weijiang.yang@...el.com>,
        "mingo@...hat.com"
 <mingo@...hat.com>,
        "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "john.allen@....com" <john.allen@....com>,
        "mlevitsk@...hat.com" <mlevitsk@...hat.com>,
        Chang Seok Bae <chang.seok.bae@...el.com>,
        "vigbalas@....com" <vigbalas@....com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "hpa@...or.com"
 <hpa@...or.com>, "bp@...en8.de" <bp@...en8.de>,
        "aruna.ramakrishna@...cle.com" <aruna.ramakrishna@...cle.com>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH v5 3/7] x86/fpu/xstate: Differentiate default features for
 host and guest FPUs

On 4/27/2025 8:26 PM, Chao Gao wrote:
>> For KVM, it's just the one MSR, and KVM needs to support save/restore of that MSR
>> no matter what, so supporting it via XSAVE would be more work, a bit sketchy, and
>> create yet another way for userspace to do weird things when saving/restoring vCPU
>> state.
> Agreed. One more issue of including CET_S into KVM_GET/SET_XSAVE{2} is:
> 
> XSAVE UABI buffers adhere to the standard format defined by the SDM, which
> never includes supervisor states. Attempting to incorporate supervisor states
> into UABI buffers would lead to many issues, such as deviating from the
> standard format and the need to define offsets for each supervisor state.

Good point.

FRED RSPs are in the supervisor state and are not defined within the
XSAVE area.  Their save/restore operations need to be explicitly added 
one by one.

Would it be sensible to introduce a KVM supervisor MSR state that
includes new MSRs?

This approach is similar to what KVM has with its CPUID API, allowing
batch MSR set/get operations and improving MSR code sharing.  Since the
FRED state is entirely defined in MSRs (except for CR4.FRED), this
should simplify the context save and restore for FRED.

Thanks!
     Xin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ