]> git.baikalelectronics.ru Git - kernel.git/commit
x86/fpu: Make XFD initialization in __fpstate_reset() a function argument
authorJing Liu <jing2.liu@intel.com>
Wed, 5 Jan 2022 12:35:16 +0000 (04:35 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Jan 2022 18:40:57 +0000 (13:40 -0500)
commita5091ff31557dab8a5f0cee228afb0a40f6979b1
treecc67a9974d7e4e4b441730a2292ea9c0720e52c9
parent9b0d47b6576099a14d9ef219730806b6ffc77a36
x86/fpu: Make XFD initialization in __fpstate_reset() a function argument

vCPU threads are different from native tasks regarding to the initial XFD
value. While all native tasks follow a fixed value (init_fpstate::xfd)
established by the FPU core at boot, vCPU threads need to obey the reset
value (i.e. ZERO) defined by the specification, to meet the expectation of
the guest.

Let the caller supply an argument and adjust the host and guest related
invocations accordingly.

Signed-off-by: Jing Liu <jing2.liu@intel.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jing Liu <jing2.liu@intel.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20220105123532.12586-6-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kernel/fpu/core.c