@@ -914,11 +914,11 @@ static int cf_check hvm_save_cpu_ctxt(struct vcpu *v, hvm_domain_context_t *h)
if ( v->fpu_initialised )
{
- BUILD_BUG_ON(sizeof(ctxt.fpu_regs) !=
- sizeof(v->arch.xsave_area->fpu_sse));
- memcpy(ctxt.fpu_regs, &v->arch.xsave_area->fpu_sse,
- sizeof(ctxt.fpu_regs));
+ const struct xsave_struct *xsave_area = vcpu_map_xsave_area(v);
+ BUILD_BUG_ON(sizeof(ctxt.fpu_regs) != sizeof(xsave_area->fpu_sse));
+ memcpy(ctxt.fpu_regs, &xsave_area->fpu_sse, sizeof(ctxt.fpu_regs));
+ vcpu_unmap_xsave_area(v, xsave_area);
ctxt.flags = XEN_X86_FPU_INITIALISED;
}
No functional change. Signed-off-by: Alejandro Vallejo <alejandro.vallejo@cloud.com> --- xen/arch/x86/hvm/hvm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)