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: <bf9c19457081735f3b9be023fc41152d0be69b27.camel@intel.com>
Date: Tue, 29 Apr 2025 02:50:07 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "Bae, Chang Seok" <chang.seok.bae@...el.com>
CC: "ebiggers@...gle.com" <ebiggers@...gle.com>, "kvm@...r.kernel.org"
	<kvm@...r.kernel.org>, "Hansen, Dave" <dave.hansen@...el.com>,
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>, "Spassov,
 Stanislav" <stanspas@...zon.de>, "levymitchell0@...il.com"
	<levymitchell0@...il.com>, "samuel.holland@...ive.com"
	<samuel.holland@...ive.com>, "Li, Xin3" <xin3.li@...el.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo@...hat.com" <mingo@...hat.com>, "Yang, Weijiang"
	<weijiang.yang@...el.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>,
	"vigbalas@....com" <vigbalas@....com>, "hpa@...or.com" <hpa@...or.com>,
	"peterz@...radead.org" <peterz@...radead.org>, "aruna.ramakrishna@...cle.com"
	<aruna.ramakrishna@...cle.com>, "Gao, Chao" <chao.gao@...el.com>,
	"bp@...en8.de" <bp@...en8.de>, "seanjc@...gle.com" <seanjc@...gle.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 Mon, 2025-04-28 at 18:11 -0700, Chang S. Bae wrote:
> On 4/28/2025 8:42 AM, Edgecombe, Rick P wrote:
> > 
> > Right, so there should be no need to keep a separate features and buffer size
> > for KVM's xsave UABI, as this patch does. Let's just leave it using the core
> > kernels UABI version.
> 
> Hmm, why so?
> 
> As I see it, the vcpu->arch.guest_fpu structure is already exposed to 
> KVM. This series doesn’t modify those structures (fpu_guest and 
> fpstate), other than removing a dead field (patch 2).
> 
> Both ->usersize and ->user_xfeatures fields are already exposed -- 
> currently KVM just doesn’t reference them at all.
> 
> All the changes introduced here are transparent to KVM. Organizing the 
> initial values and wiring up guest_perm and fpstate are entirely 
> internal to the x86 core, no?

This patch adds struct vcpu_fpu_config, with new fields user_size,
user_features. Then those fields are used to configure the guest FPU, where
today it just uses fpu_user_cfg.default_features, etc.

KVM doesn't refer to any of those fields specifically, but since they are used
to configure struct fpu_guest they become part of KVM's uABI.

Per Sean, KVM's KVM_GET_XSAVE API won't differ from arch/x86's uABI behavior.
There is (and will be) only one default user features and size. So what is the
point of having a special guest version with identical values? Just use the
single one for guest FPU and normal.

Chao mentioned offline it was for symmetry. I don't want to make a big deal out
of it, but it doesn't make sense to me. It made me wonder if there was some
divergence in KVM and arch/x86 user features.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ