x86/hvm: introduce a flags field in the CPU save record
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 14 Jan 2016 09:37:53 +0000 (10:37 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 14 Jan 2016 09:37:53 +0000 (10:37 +0100)
commita3b6844d3b7ac8445669337c222b0cff2cf90484
tree1b3edb4eec4e2a259ff3d25990f1cf264e668d94
parentaf3eb9bf2f979631795750ee5924bdd5a88ded95
x86/hvm: introduce a flags field in the CPU save record

Introduce a new flags field and use bit 0 to signal if the FPU has been
initialised or not. Previously Xen always wrongly assumed the FPU was
initialised on restore.

While modifying the FPU restore part of hvm_load_cpu_ctxt remove the
memcpy branching, since v->arch.fpu_ctxt will always point to the right
area for hosts with XSAVE or without it.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/hvm.c
xen/include/public/arch-x86/hvm/save.h