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

Re: [Xen-devel] [PATCH] x86/gnttab: fix asm() operand in gnttab_clear_flag()


  • To: Jan Beulich <JBeulich@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Keir Fraser <keir.xen@xxxxxxxxx>
  • Date: Thu, 22 Mar 2012 17:14:00 +0000
  • Cc: Lin Ming <mlin@xxxxxxxxxxxxx>
  • Delivery-date: Thu, 22 Mar 2012 17:14:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac0ITywph7BwWlQccUqwUOt7U71jew==
  • Thread-topic: [Xen-devel] [PATCH] x86/gnttab: fix asm() operand in gnttab_clear_flag()

On 22/03/2012 15:55, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

> The operand needs to use the 'w' modifier in case the compiler happens
> to pick a register (which apparently it does for no-one but the
> reporter of this problem).
> 
> Reported-by: Lin Ming <mlin@xxxxxxxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Keir Fraser <keir@xxxxxxx>

> --- a/xen/include/asm-x86/grant_table.h
> +++ b/xen/include/asm-x86/grant_table.h
> @@ -54,7 +54,7 @@ static inline void gnttab_clear_flag(uns
>       * Note that this cannot be clear_bit(), as the access must be
>       * confined to the specified 2 bytes.
>       */
> -    asm volatile ("lock btrw %1,%0" : "=m" (*st) : "Ir" (nr), "m" (*st));
> +    asm volatile ("lock btrw %w1,%0" : "=m" (*st) : "Ir" (nr), "m" (*st));
>  }
>  
>  /* Foreign mappings of HHVM-guest pages do not modify the type count. */
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel



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