[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86: consolidate legacy FPU state loading



On Tue, Jun 26, 2018 at 01:51:47AM -0600, Jan Beulich wrote:
> First of all introduce a helper function instead of replicating almost
> the same code for PV and HVM. The differences between the two pieces of
> code actually points out an issue (which is also addressed here): In
> the HVM case FCW would not have been set to FCW_RESET in certain cases
> (note for example that XRSTOR loads FCW_DEFAULT rather then FCW_RESET
> when the respective xstate_bv bit is clear).
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>

I do wonder if this function can be used in hvm_vcpu_reset_state as
well.

> +void vcpu_load_fpu(struct vcpu *v, struct xsave_struct *xsave_area,
> +                   const void *data, unsigned int fcw_default)
> +{
> +    /*
> +     * For the entire function please note that vcpu_init_fpu() (above) 
> points

The "above" isn't very useful here. It will become stale once code is
shuffled.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.