On Mon, Jul 06, 2015 at 05:46:37PM +0100, Andre Przywara wrote:
[...]
>
> >> + inject = itte->enabled;
> >> +
> >> +out_unlock:
> >> + spin_unlock(&its->lock);
> >> +
> >> + if (inject) {
> >> + spin_lock(&dist->lock);
> >> + set_bit(cpuid, dist->irq_pending_on_cpu);
> > isn't it atomic op?
>
> It is, but that's not what the lock protects. It's there to avoid
> stepping on someone else's toes, who might deal with the ITS data
> structures at the same time and would not expect a value to change in
> the middle (think about code iterating over dist->irq_pending_on_cpu).
>
then should it be __set_bit ?
-Christoffer
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html