On 16/06/14 13:47, Jan Beulich wrote: > 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 I seem to remember Tim saying that behaviour like this is covered by -fno-strict-aliasing Either way, it is certainly correct for it to be marked as volatile. Reviewed-by: Andrew Cooper > > --- 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; > > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel