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

Re: [Xen-devel] [PATCH 1/4] VT-d/qinval: make local variable used for communication with IOMMU "volatile"


  • To: Jan Beulich <JBeulich@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Zhang, Yang Z" <yang.z.zhang@xxxxxxxxx>
  • Date: Fri, 20 Jun 2014 02:09:49 +0000
  • Accept-language: en-US
  • Cc: "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
  • Delivery-date: Fri, 20 Jun 2014 02:10:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: AQHPiWE5w97fZhuEYEWXIT0eidL9EZt5RnCw
  • Thread-topic: [PATCH 1/4] VT-d/qinval: make local variable used for communication with IOMMU "volatile"

Jan Beulich wrote on 2014-06-16:
> Without that there is - afaict - nothing preventing the compiler from 
> putting the variable into a register for the duration of the wait loop.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Yang Zhang <yang.z.zhang@xxxxxxxxx>

> 
> --- a/xen/drivers/passthrough/vtd/qinval.c
> +++ b/xen/drivers/passthrough/vtd/qinval.c
> @@ -196,7 +196,7 @@ static int queue_invalidate_wait(struct
>      u8 iflag, u8 sw, u8 fn) { s_time_t start_time;
> -    u32 poll_slot = QINVAL_STAT_INIT;
> +    volatile u32 poll_slot = QINVAL_STAT_INIT;
>      int index = -1;
>      int ret = -1;
>      unsigned long flags;
>


Best regards,
Yang



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