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

[Xen-devel] map_domain_page_global() and interrupts


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Andrew Gallagher <ajcg@xxxxxxxxxxx>
  • Date: Sat, 28 Jul 2007 17:02:49 -0700 (PDT)
  • Delivery-date: Mon, 30 Jul 2007 10:00:09 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

In the file xen/arch/x86/x86_32/domain_page.c, the map_domain_page_global function has the following assertion: ASSERT(!in_irq() && local_irq_is_enabled()). This assertion is followed by use of a spin lock without disabling then reenabling irqs.

The assertion that the function is not called from an interrupted context seems to flag this function as not interrupt safe. Why is this? Is the use of the IOREMAP_VIRT not interrupt safe itself. The only reason this seems to be not interrupt safe is becuase of the use of a spinlock without disabling and reenabling irqs.

My question is that, if interrupts are disabled then reenabled before and after acquiring and releasing the spinlock, is it then ok to call this function from the context of an interrupt?

Thanks,
Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.