On Mon, Jun 4, 2012 at 12:15 PM, Michael S. Tsirkin <m...@redhat.com> wrote:
> On Fri, Jun 01, 2012 at 10:13:06AM +0100, Stefan Hajnoczi wrote:
>> Other block drivers (cciss, rbd, nbd) use spin_unlock_irq() so I followed 
>> that.
>> To me this seems wrong: blk_run_queue() uses spin_lock_irqsave() but we 
>> enable
>> irqs with spin_unlock_irq().  If the caller of blk_run_queue() had irqs
>> disabled and we enable them again this could be a problem, right?  Can 
>> someone
>> more familiar with kernel locking comment?
>
> Why take the risk?  What's the advantage of enabling them here? VCPU is
> not running while the hypervisor is processing the notification anyway.
> And the next line returns from the function so the interrupts will get
> enabled.

I agree.  After looking through the code more following Asias' call
chain, I'm happy to use spin_unlock() and not worry about the irq
part.

Will fix.

Stefan
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to