[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v14 04/11] x86/hvm: Introduce hvm_save_cpu_xsave_states_one
>>> On 25.07.18 at 14:14, <aisaila@xxxxxxxxxxxxxxx> wrote: > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -1188,33 +1188,45 @@ HVM_REGISTER_SAVE_RESTORE(CPU, hvm_save_cpu_ctxt, > hvm_load_cpu_ctxt, > save_area) + \ > xstate_ctxt_size(xcr0)) > > -static int hvm_save_cpu_xsave_states(struct domain *d, hvm_domain_context_t > *h) > +static int hvm_save_cpu_xsave_states_one(struct vcpu *v, > hvm_domain_context_t *h) > { > - struct vcpu *v; > struct hvm_hw_cpu_xsave *ctxt; > + unsigned int size = HVM_CPU_XSAVE_SIZE(v->arch.xcr0_accum); > + int err = 0; Pointless initializer. > if ( !cpu_has_xsave ) > return 0; /* do nothing */ > > + err = _hvm_init_entry(h, CPU_XSAVE_CODE, v->vcpu_id, size); > + if ( err ) > + return err; > + > + ctxt = (struct hvm_hw_cpu_xsave *)&h->data[h->cur]; > + h->cur += size; > + ctxt->xfeature_mask = xfeature_mask; > + ctxt->xcr0 = v->arch.xcr0; > + ctxt->xcr0_accum = v->arch.xcr0_accum; > + > + expand_xsave_states(v, &ctxt->save_area, > + size - offsetof(typeof(*ctxt), save_area)); > + return 0; > +} Blank line please ahead of main return statement of a function. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |