From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "Bae, Chang Seok" <chang.seok.bae@intel.com>
Cc: "ebiggers@google.com" <ebiggers@google.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"Hansen, Dave" <dave.hansen@intel.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"Spassov, Stanislav" <stanspas@amazon.de>,
"levymitchell0@gmail.com" <levymitchell0@gmail.com>,
"samuel.holland@sifive.com" <samuel.holland@sifive.com>,
"Li, Xin3" <xin3.li@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"vigbalas@amd.com" <vigbalas@amd.com>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"john.allen@amd.com" <john.allen@amd.com>,
"mlevitsk@redhat.com" <mlevitsk@redhat.com>,
"Yang, Weijiang" <weijiang.yang@intel.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"aruna.ramakrishna@oracle.com" <aruna.ramakrishna@oracle.com>,
"Gao, Chao" <chao.gao@intel.com>, "bp@alien8.de" <bp@alien8.de>,
"seanjc@google.com" <seanjc@google.com>,
"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH v5 3/7] x86/fpu/xstate: Differentiate default features for host and guest FPUs
Date: Wed, 30 Apr 2025 15:33:23 +0000 [thread overview]
Message-ID: <b1f5bcc441b74bef6efe91da1055a3a4efe13613.camel@intel.com> (raw)
In-Reply-To: <281354d3-1f04-483d-a6d0-baf6fdcec376@intel.com>
On Wed, 2025-04-30 at 08:01 -0700, Chang S. Bae wrote:
> On 4/28/2025 8:36 PM, Edgecombe, Rick P wrote:
> >
> > KVM_GET_XSAVE is part of KVM's API. It uses fields configured in struct
> > fpu_guest. If fpu_user_cfg.default_features changes value (in the current code)
> > it would change KVM's uABI.
>
> Not quite. The ABI reflects the XSAVE format directly. The XSAVE header
> indicates which feature states are present, so while the _contents_ of
> the buffer may vary depending on the feature set, the _format_ itself
> remains unchanged. That doesn't constitute a uABI change.
Heh, ok sure.
>
> > It should be simple. Two new configuration fields are added in this patch that
> > match the existing concept and values of existing configurations fields. Per
> > Sean, there are no plans to have them diverge. So why add them.
>
> I'm fine with dropping them -- as long as the resulting code remains
> clear and avoids unnecessary complexity around VCPU allocation.
>
> Here are some of the considerations that led me to suggest them in the
> first place:
>
> * The guest-only feature model should be established in a clean and
> structured way.
> * The initialization logic should stay explicit -- especially to make
> it clear what constitutes guest features, even when they match host
> features. That naturally led to introducing a dedicated data
> structure.
> * Since the VCPU FPU container includes struct fpstate, it felt
> appropriate to mirror relevant fields where useful.
> * Including user_size and user_xfeatures made the VCPU allocation logic
> more straightforward and self-contained.
>
> And to clarify -- this addition doesn’t necessarily imply divergence
> from fpu_guest_cfg. Its usage is local to setting up the guest fpstate,
> and nothing more.
I'd like to close this out. I see there there is currently one concept of user
features and size, and per Sean, KVM intends to stay consistent with the rest of
the kernel - leaving it at one concept. This was new info since you suggested
the fields. So why don't you propose a resolution here and we'll just go with
it.
next prev parent reply other threads:[~2025-04-30 15:33 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 7:24 [PATCH v5 0/7] Introduce CET supervisor state support Chao Gao
2025-04-10 7:24 ` [PATCH v5 1/7] x86/fpu/xstate: Always preserve non-user xfeatures/flags in __state_perm Chao Gao
2025-04-18 20:50 ` Chang S. Bae
2025-04-10 7:24 ` [PATCH v5 2/7] x86/fpu: Drop @perm from guest pseudo FPU container Chao Gao
2025-04-18 20:51 ` Chang S. Bae
2025-04-18 20:54 ` Chang S. Bae
2025-04-19 1:01 ` Chao Gao
2025-04-10 7:24 ` [PATCH v5 3/7] x86/fpu/xstate: Differentiate default features for host and guest FPUs Chao Gao
2025-04-24 22:52 ` Edgecombe, Rick P
2025-04-25 8:24 ` Chao Gao
2025-04-25 16:09 ` Edgecombe, Rick P
2025-04-25 23:48 ` Sean Christopherson
2025-04-28 3:26 ` Chao Gao
2025-04-28 7:44 ` Xin Li
2025-04-28 14:28 ` Sean Christopherson
2025-04-28 6:31 ` Xin Li
2025-04-28 15:42 ` Edgecombe, Rick P
2025-04-29 1:11 ` Chang S. Bae
2025-04-29 2:50 ` Edgecombe, Rick P
2025-04-29 3:22 ` Chang S. Bae
2025-04-29 3:36 ` Edgecombe, Rick P
2025-04-30 3:27 ` Chao Gao
2025-04-30 15:01 ` Chang S. Bae
2025-04-30 15:33 ` Edgecombe, Rick P [this message]
2025-04-30 16:20 ` Sean Christopherson
2025-04-30 18:26 ` Chang S. Bae
2025-04-28 5:51 ` Xin Li
2025-04-28 6:12 ` Xin Li
2025-05-01 14:24 ` Chang S. Bae
2025-05-06 3:29 ` Chao Gao
2025-04-10 7:24 ` [PATCH v5 4/7] x86/fpu: Initialize guest FPU permissions from guest defaults Chao Gao
2025-04-30 15:45 ` Edgecombe, Rick P
2025-04-10 7:24 ` [PATCH v5 5/7] x86/fpu: Initialize guest fpstate and FPU pseudo container " Chao Gao
2025-04-30 18:29 ` Edgecombe, Rick P
2025-05-01 14:24 ` Chang S. Bae
2025-05-06 3:33 ` Chao Gao
2025-04-10 7:24 ` [PATCH v5 6/7] x86/fpu/xstate: Introduce "guest-only" supervisor xfeature set Chao Gao
2025-04-24 22:58 ` Edgecombe, Rick P
2025-04-10 7:24 ` [PATCH v5 7/7] x86/fpu/xstate: Add CET supervisor xfeature support as a guest-only feature Chao Gao
2025-04-24 23:28 ` [PATCH v5 0/7] Introduce CET supervisor state support Edgecombe, Rick P
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b1f5bcc441b74bef6efe91da1055a3a4efe13613.camel@intel.com \
--to=rick.p.edgecombe@intel.com \
--cc=aruna.ramakrishna@oracle.com \
--cc=bp@alien8.de \
--cc=chang.seok.bae@intel.com \
--cc=chao.gao@intel.com \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=ebiggers@google.com \
--cc=hpa@zytor.com \
--cc=john.allen@amd.com \
--cc=kvm@vger.kernel.org \
--cc=levymitchell0@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mlevitsk@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=samuel.holland@sifive.com \
--cc=seanjc@google.com \
--cc=stanspas@amazon.de \
--cc=tglx@linutronix.de \
--cc=vigbalas@amd.com \
--cc=weijiang.yang@intel.com \
--cc=x86@kernel.org \
--cc=xin3.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox