| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen: Port the array_index_nospec() infrastructure from Linux
 >>> On 06.07.18 at 14:37, <andrew.cooper3@xxxxxxxxxx> wrote:
> This is as the infrastructure appeared in Linux 4.17, adapted slightly for
> Xen.  The architecture independent array_index_mask_nospec() is ported for
> ARMs benefit, as it currently lacks the optimised version.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
with one question though:
> --- a/xen/include/xen/compiler.h
> +++ b/xen/include/xen/compiler.h
> @@ -81,6 +81,10 @@
>  #pragma GCC visibility push(hidden)
>  #endif
>  
> +/* Make the optimizer believe the variable can be manipulated arbitrarily. 
> */
> +#define OPTIMIZER_HIDE_VAR(var)                 \
> +    __asm__ ("" : "=g" (var) : "0" (var))
Why not a simple "+g" output?
Also I think you want to add blanks inside the parentheses.
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  |