Re: [PATCH v6 5/7] x86/fpu: Initialize guest fpstate and FPU pseudo container from guest defaults

Dave Hansen
2025-05-07T18:04:10Z

On 5/7/25 11:01, Sean Christopherson wrote:
> And then a follow-up patch (or same patch?) to do this?
>
> if (fpstate->is_guest) {
> fpstate->size = guest_default_cfg.size;
> fpstate->xfeatures = guest_default_cfg.features;
> fpstate->xfd = 0;
> } else {
> fpstate->size = fpu_kernel_cfg.default_size;
> fpstate->xfeatures = fpu_kernel_cfg.default_features;
> fpstate->xfd = init_fpstate.xfd;
> }

That looks nice because it clearly highlights how guests and bare-metal
fpstates are different. I like it too.