]> xenbits.xensource.com Git - xen.git/commit
x86/fpu: Rework fpu_setup_fpu() uses to split it in two
authorAlejandro Vallejo <alejandro.vallejo@cloud.com>
Mon, 7 Oct 2024 15:52:40 +0000 (16:52 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 21 Oct 2024 17:28:59 +0000 (18:28 +0100)
commit49a068471d77820af5dac5ad062cde7129e3faae
treea2e812e82c6144d82f98e6c7e950f2e0b901dead
parentedb48e76458bb93b89daa4bfb621f4419262d370
x86/fpu: Rework fpu_setup_fpu() uses to split it in two

It was trying to do too many things at once and there was no clear way of
defining what it was meant to do. This commit splits the function in two.

  1. A function to return the FPU to power-on reset values.
  2. A x87/SSE state loader (equivalent to the old function when it took
     a data pointer).

The old function also had a concept of "default" values that the FPU
would be configured for in some cases but not others. This patch removes
that 3rd vague initial state and replaces it with power-on reset.

While doing this make sure the abridged control tag is consistent with the
manuals and starts as 0xFF

Signed-off-by: Alejandro Vallejo <alejandro.vallejo@cloud.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/domain.c
xen/arch/x86/hvm/hvm.c
xen/arch/x86/i387.c
xen/arch/x86/include/asm/i387.h
xen/arch/x86/include/asm/xstate.h