[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6 1/2] xen/hvm: introduce a flags field in the CPU save record
>>> On 12.01.16 at 17:12, <roger.pau@xxxxxxxxxx> wrote: > @@ -2087,19 +2100,21 @@ static int hvm_load_cpu_ctxt(struct domain *d, > hvm_domain_context_t *h) > seg.attr.bytes = ctxt.ldtr_arbytes; > hvm_set_segment_register(v, x86_seg_ldtr, &seg); > > - /* In case xsave-absent save file is restored on a xsave-capable host */ > - if ( cpu_has_xsave && !xsave_enabled(v) ) > + v->fpu_initialised = !!(ctxt.flags & XEN_X86_FPU_INITIALISED); > + if ( v->fpu_initialised ) > { > - struct xsave_struct *xsave_area = v->arch.xsave_area; > + memcpy(v->arch.fpu_ctxt, ctxt.fpu_regs, sizeof(ctxt.fpu_regs)); > + /* In case xsave-absent save file is restored on a xsave-capable > host */ > + if ( cpu_has_xsave && !xsave_enabled(v) ) > + { > + struct xsave_struct *xsave_area = v->arch.xsave_area; > > - memcpy(v->arch.xsave_area, ctxt.fpu_regs, sizeof(ctxt.fpu_regs)); > - xsave_area->xsave_hdr.xstate_bv = XSTATE_FP_SSE; > - if ( cpu_has_xsaves || cpu_has_xsavec ) > - xsave_area->xsave_hdr.xcomp_bv = XSTATE_FP_SSE | > - XSTATE_COMPACTION_ENABLED; > + xsave_area->xsave_hdr.xstate_bv = XSTATE_FP_SSE; > + if ( cpu_has_xsaves || cpu_has_xsavec ) > + xsave_area->xsave_hdr.xcomp_bv = XSTATE_FP_SSE | > + XSTATE_COMPACTION_ENABLED; > + } > } > - else > - memcpy(v->arch.fpu_ctxt, ctxt.fpu_regs, sizeof(ctxt.fpu_regs)); > I would have expected this to simply be re-indentation, yet you changed from if/else to just if with the else code done ahead of it. If this really is intended, the commit message should explain it. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |