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

Re: [Xen-devel] [V12 2/4] x86/xsaves: enable xsaves/xrstors/xsavec in xen



>>> On 25.11.15 at 08:51, <shuai.ruan@xxxxxxxxxxxxxxx> wrote:
> @@ -197,20 +373,26 @@ void xrstor(struct vcpu *v, uint64_t mask)
>      switch ( __builtin_expect(ptr->fpu_sse.x[FPU_WORD_SIZE_OFFSET], 8) )
>      {
>      default:
> -        asm volatile ( "1: .byte 0x48,0x0f,0xae,0x2f\n"
> -                       XRSTOR_FIXUP
> -                       : [ptr] "+&D" (ptr), [lmask_out] "+&a" (lmask)
> -                       : [mem] "m" (*ptr), [lmask_in] "g" (lmask),
> -                         [hmask] "d" (hmask), [size] "m" (xsave_cntxt_size)
> -                       : "ecx" );
> +        alternative_io( "1: .byte 0x48,0x0f,0xae,0x2f\n"
> +                        XRSTOR_FIXUP,
> +                        ".byte 0x48,0x0f,0xc7,0x1f\n"
> +                        XRSTOR_FIXUP,
> +                        X86_FEATURE_XSAVES,
> +                        ASM_OUTPUT2([ptr] "+&D" (ptr), [lmask_out] "+&a" 
> (lmask)),
> +                        [mem] "m" (*ptr), [lmask_in] "g" (lmask),
> +                        [hmask] "d" (hmask), [size] "m" (xsave_cntxt_size)
> +                        : "ecx" );

Mind explaining the point of the second XRSTOR_FIXUP?
Alternative patching doesn't deal with multiple sections at a time,
and I told you on the previous iteration that no second instance
should be necessary. If there is something I overlooked, please
tell me (you could and perhaps should have added such as remark
after the first --- separator at the top of the patch).

Jan


_______________________________________________
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®.