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

Re: [Xen-devel] [PATCH V3 2/6] x86/xsaves: enable xsaves/xrstors in xen



On 05/08/15 02:57, Shuai Ruan wrote:
> This patch uses xsaves/xrstors instead of xsaveopt/xrstor
> to perform the xsave_area switching so that xen itself
> can benefit from them when available.
>
> Please note that xsaves/xrstors only use compact format.
>
> Signed-off-by: Shuai Ruan <shuai.ruan@xxxxxxxxxxxxxxx>
> ---
>  xen/arch/x86/i387.c          |  5 ++++
>  xen/arch/x86/xstate.c        | 70 
> +++++++++++++++++++++++++-------------------
>  xen/include/asm-x86/xstate.h |  4 ++-
>  3 files changed, 48 insertions(+), 31 deletions(-)
>
> diff --git a/xen/arch/x86/i387.c b/xen/arch/x86/i387.c
> index 14f2a79..9071374 100644
> --- a/xen/arch/x86/i387.c
> +++ b/xen/arch/x86/i387.c
> @@ -309,7 +309,12 @@ int vcpu_init_fpu(struct vcpu *v)
>          return rc;
>  
>      if ( v->arch.xsave_area )
> +    {
>          v->arch.fpu_ctxt = &v->arch.xsave_area->fpu_sse;
> +
> +        if ( cpu_has_xsaves )
> +            v->arch.xsave_area->xsave_hdr.xcomp_bv |= 
> XSTATE_COMPACTION_ENABLED;
> +    }

By making this change, you need to make arch_set_info_guest() able to
interpret and unpack a compressed xsave area without hardware support.

Otherwise, you have broken migration of PV vcpus between Skylake and
non-Skylake hardware.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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