On 4/28/2025 7:50 PM, Edgecombe, Rick P wrote:
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.
Today, fpu_alloc_guest_fpstate() -> __fpstate_reset() sets
vcpu->arch.guest_fpu.fpstate->user_xfeatures using
fpu_user_cfg.default_features.
Are you really saying that switching this to
guest_default_cfg.user_features would constitute a uABI change? Do you
consider fpu_user_cfg.default_features to be part of the uABI or
anything else?