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 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Merged.

Add more in_irq() checking. Add irq_enter()/irq_exit() where

# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 7fd7f276bb38f08984fda45ef20ea8a085b482cd
# Parent  98f00a4ee0b45cb1bbf62bc8aabe99a2df23d815
Add more in_irq() checking. Add irq_enter()/irq_exit() where
they are missing in a few places.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/domain.c |    3 +++
 xen/arch/x86/smp.c    |    8 +++++++-
 xen/arch/x86/traps.c  |    2 ++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff -r 98f00a4ee0b4 -r 7fd7f276bb38 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Fri May 05 14:09:07 2006 +0100
+++ b/xen/arch/x86/domain.c     Fri May 05 15:15:56 2006 +0100
@@ -753,7 +753,10 @@ int __sync_lazy_execstate(void)
     switch_required = (this_cpu(curr_vcpu) != current);
 
     if ( switch_required )
+    {
+        ASSERT(current == idle_vcpu[smp_processor_id()]);
         __context_switch();
+    }
 
     local_irq_restore(flags);
 
diff -r 98f00a4ee0b4 -r 7fd7f276bb38 xen/arch/x86/smp.c
--- a/xen/arch/x86/smp.c        Fri May 05 14:09:07 2006 +0100
+++ b/xen/arch/x86/smp.c        Fri May 05 15:15:56 2006 +0100
@@ -169,6 +169,7 @@ fastcall void smp_invalidate_interrupt(v
 {
     ack_APIC_irq();
     perfc_incrc(ipis);
+    irq_enter();
     if ( !__sync_lazy_execstate() )
     {
         if ( flush_va == FLUSHVA_ALL )
@@ -177,6 +178,7 @@ fastcall void smp_invalidate_interrupt(v
             local_flush_tlb_one(flush_va);
     }
     cpu_clear(smp_processor_id(), flush_cpumask);
+    irq_exit();
 }
 
 void __flush_tlb_mask(cpumask_t mask, unsigned long va)
@@ -335,6 +337,8 @@ fastcall void smp_call_function_interrup
     if ( !cpu_isset(smp_processor_id(), call_data->selected) )
         return;
 
+    irq_enter();
+
     if ( call_data->wait )
     {
         (*func)(info);
@@ -347,4 +351,6 @@ fastcall void smp_call_function_interrup
         atomic_inc(&call_data->started);
         (*func)(info);
     }
-}
+
+    irq_exit();
+}
diff -r 98f00a4ee0b4 -r 7fd7f276bb38 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Fri May 05 14:09:07 2006 +0100
+++ b/xen/arch/x86/traps.c      Fri May 05 15:15:56 2006 +0100
@@ -674,6 +674,8 @@ asmlinkage int do_page_fault(struct cpu_
     unsigned long addr, fixup;
     int rc;
 
+    ASSERT(!in_irq());
+
     __asm__ __volatile__ ("mov %%cr2,%0" : "=r" (addr) : );
 
     DEBUGGER_trap_entry(TRAP_page_fault, regs);

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

<Prev in Thread] Current Thread [Next in Thread>