WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

Re: [Xen-devel] map_domain_page_global() and interrupts

To: Andrew Gallagher <ajcg@xxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] map_domain_page_global() and interrupts
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: 2007年7月30日 19:12:13 +0100
Delivery-date: 2007年7月30日 11:06:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <Pine.SOC.4.64.0707281657050.10764@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcfS1SclZcdgBT7IEdyr+AAWy6hiGQ==
Thread-topic: [Xen-devel] map_domain_page_global() and interrupts
User-agent: Microsoft-Entourage/11.3.3.061214
!in_irq() because the function is not reentrant.
local_irq_is_enabled() because the function uses flush_tlb_all() which must
be able to IPI remote CPUs. We mustn't have them stuck spinning on
globalmap_lock with interrupts disabled -- that would result in deadlock.
 -- Keir
On 29/7/07 01:02, "Andrew Gallagher" <ajcg@xxxxxxxxxxx> wrote:
> 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 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] Re: [Xen-changelog] [xen-unstable] [XEN] replace shadow_* with paging_* in common code , Hollis Blanchard
Next by Date: Re: [Xen-devel] Which GCC is best for building Xen? , Keir Fraser
Previous by Thread: [Xen-devel] map_domain_page_global() and interrupts , Andrew Gallagher
Next by Thread: [Xen-devel] Which GCC is best for building Xen? , Tim Post
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /