[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] X86: Fix vcpu xsave bug
Jan Beulich wrote: >>>> On 15.11.13 at 17:55, "Liu, Jinsong" <jinsong.liu@xxxxxxxxx> wrote: >> --- a/xen/arch/x86/i387.c >> +++ b/xen/arch/x86/i387.c >> @@ -134,7 +134,7 @@ static inline void fpu_frstor(struct vcpu *v) >> /* FPU Save Functions */ >> /*******************************/ >> /* Save x87 extended state */ >> -static inline void fpu_xsave(struct vcpu *v) >> +static inline void fpu_xsave(struct vcpu *v, uint64_t mask) > > You get v passed here, so no need to add a new parameter. > >> @@ -145,7 +145,7 @@ static inline void fpu_xsave(struct vcpu *v) >> */ ok = set_xcr0(v->arch.xcr0_accum | XSTATE_FP_SSE); >> ASSERT(ok); - xsave(v, v->arch.nonlazy_xstate_used ? XSTATE_ALL : >> XSTATE_LAZY); + xsave(v, mask); > > Instead, you can check v->fpu_dirtied here. OK, remove mask parameter. > >> @@ -257,22 +257,29 @@ void vcpu_restore_fpu_lazy(struct vcpu *v) */ >> void vcpu_save_fpu(struct vcpu *v) >> { >> - if ( !v->fpu_dirtied ) >> - return; >> - > > And the - afaict - the only changed needed to this function is the > deletion above. > If I didn't misunderstand your meaning, it can not only delete these 2 lines, say, when (!v->fpu_dirtied) and in old platform that do fpu_fxsave/fpu_fsave? Thanks, Jinsong _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |