--- linux-2.6.18.2/arch/alpha/kernel/irq.c 2006-09-20 16:57:57 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/alpha/kernel/irq.c 2006-10-25 03:39:09 +0200 @@ -140,6 +141,7 @@ handle_irq(int irq, struct pt_regs * reg * handled by some other CPU. (or is disabled) */ static unsigned int illegal_count=0; + struct vx_info_save vxis; if ((unsigned) irq > ACTUAL_NR_IRQS && illegal_count < MAX_ILLEGAL_IRQS ) { irq_err_count++; --- linux-2.6.18.2/arch/alpha/kernel/irq.c 2006-09-20 16:57:57 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/alpha/kernel/irq.c 2006-10-25 03:39:09 +0200 @@ -157,6 +159,8 @@ handle_irq(int irq, struct pt_regs * reg * at IPL 0. */ local_irq_disable(); + __enter_vx_admin(&vxis); __do_IRQ(irq, regs); + __leave_vx_admin(&vxis); irq_exit(); } --- linux-2.6.18.2/arch/cris/kernel/irq.c 2006-09-20 16:57:57 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/cris/kernel/irq.c 2006-10-13 20:52:32 +0200 @@ -92,6 +93,8 @@ skip: asmlinkage void do_IRQ(int irq, struct pt_regs * regs) { unsigned long sp; + struct vx_info_save vxis; + irq_enter(); sp = rdsp(); if (unlikely((sp & (PAGE_SIZE - 1)) < (PAGE_SIZE/8))) { --- linux-2.6.18.2/arch/cris/kernel/irq.c 2006-09-20 16:57:57 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/cris/kernel/irq.c 2006-10-13 20:52:32 +0200 @@ -98,7 +101,9 @@ ***** printk("do_IRQ: stack overflow: %lX\n", sp); show_stack(NULL, (unsigned long *)sp); } + __enter_vx_admin(&vxis); __do_IRQ(irq, regs); + __leave_vx_admin(&vxis); irq_exit(); } --- linux-2.6.18.2/arch/frv/kernel/irq.c 2006-09-20 16:57:57 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/frv/kernel/irq.c 2006-10-13 20:52:40 +0200 @@ -282,6 +283,7 @@ EXPORT_SYMBOL(enable_irq); asmlinkage void do_IRQ(void) { struct irq_source *source; + struct vx_info_save vxis; int level, cpu; irq_enter(); --- linux-2.6.18.2/arch/frv/kernel/irq.c 2006-09-20 16:57:57 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/frv/kernel/irq.c 2006-10-13 20:52:40 +0200 @@ -298,8 +300,10 @@ asmlinkage void do_IRQ(void) kstat_this_cpu.irqs[level]++; + __enter_vx_admin(&vxis); for (source = frv_irq_levels[level].sources; source; source = source->next) source->doirq(source); + __leave_vx_admin(&vxis); __clr_MASK(level); --- linux-2.6.18.2/arch/i386/kernel/irq.c 2006-09-20 16:57:58 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/i386/kernel/irq.c 2006-10-13 20:52:50 +0200 @@ -55,6 +56,7 @@ fastcall unsigned int do_IRQ(struct pt_r { /* high bit used in ret_from_ code */ int irq = ~regs->orig_eax; + struct vx_info_save vxis; #ifdef CONFIG_4KSTACKS union irq_ctx *curctx, *irqctx; u32 *isp; --- linux-2.6.18.2/arch/i386/kernel/irq.c 2006-09-20 16:57:58 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/i386/kernel/irq.c 2006-10-13 20:52:50 +0200 @@ -81,7 +83,7 @@ fastcall unsigned int do_IRQ(struct pt_r } } #endif - + __enter_vx_admin(&vxis); #ifdef CONFIG_4KSTACKS curctx = (union irq_ctx *) current_thread_info(); --- linux-2.6.18.2/arch/i386/kernel/irq.c 2006-09-20 16:57:58 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/i386/kernel/irq.c 2006-10-13 20:52:50 +0200 @@ -120,6 +122,7 @@ fastcall unsigned int do_IRQ(struct pt_r } else #endif __do_IRQ(irq, regs); + __leave_vx_admin(&vxis); irq_exit(); --- linux-2.6.18.2/arch/m32r/kernel/irq.c 2006-09-20 16:57:58 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/m32r/kernel/irq.c 2006-10-13 20:53:02 +0200 @@ -77,6 +78,8 @@ skip: */ asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs) { + struct vx_info_save vxis; + irq_enter(); #ifdef CONFIG_DEBUG_STACKOVERFLOW --- linux-2.6.18.2/arch/m32r/kernel/irq.c 2006-09-20 16:57:58 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/m32r/kernel/irq.c 2006-10-13 20:53:02 +0200 @@ -82,7 +85,9 @@ ***** #ifdef CONFIG_DEBUG_STACKOVERFLOW /* FIXME M32R */ #endif + __enter_vx_admin(&vxis); __do_IRQ(irq, regs); + __leave_vx_admin(&vxis); irq_exit(); return 1; --- linux-2.6.18.2/arch/mips/kernel/irq.c 2006-09-20 16:57:58 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/mips/kernel/irq.c 2006-10-13 20:53:09 +0200 @@ -55,10 +56,14 @@ unsigned long irq_hwmask[NR_IRQS]; */ asmlinkage unsigned int do_IRQ(unsigned int irq, struct pt_regs *regs) { + struct vx_info_save vxis; + irq_enter(); + __enter_vx_admin(&vxis); __DO_IRQ_SMTC_HOOK(); __do_IRQ(irq, regs); + __leave_vx_admin(&vxis); irq_exit(); --- linux-2.6.18.2/arch/powerpc/kernel/irq.c 2006-09-20 16:58:01 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/powerpc/kernel/irq.c 2006-10-13 20:34:37 +0200 @@ -218,6 +219,9 @@ void do_IRQ(struct pt_regs *regs) irq = ppc_md.get_irq(regs); if (irq != NO_IRQ && irq != NO_IRQ_IGNORE) { + struct vx_info_save vxis; + + __enter_vx_admin(&vxis); #ifdef CONFIG_IRQSTACKS /* Switch to the irq stack to handle this */ curtp = current_thread_info(); --- linux-2.6.18.2/arch/powerpc/kernel/irq.c 2006-09-20 16:58:01 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/powerpc/kernel/irq.c 2006-10-13 20:34:37 +0200 @@ -236,6 +240,7 @@ void do_IRQ(struct pt_regs *regs) } else #endif generic_handle_irq(irq, regs); + __leave_vx_admin(&vxis); } else if (irq != NO_IRQ_IGNORE) /* That's not SMP safe ... but who cares ? */ ppc_spurious_interrupts++; --- linux-2.6.18.2/arch/powerpc/kernel/irq.c 2006-09-20 16:58:01 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/powerpc/kernel/irq.c 2006-10-13 20:34:37 +0200 @@ -244,9 +249,13 @@ void do_IRQ(struct pt_regs *regs) #ifdef CONFIG_PPC_ISERIES if (get_lppaca()->int_dword.fields.decr_int) { + struct vx_info_save vxis; + get_lppaca()->int_dword.fields.decr_int = 0; /* Signal a fake decrementer interrupt */ + __enter_vx_admin(&vxis); timer_interrupt(regs); + __leave_vx_admin(&vxis); } #endif } --- linux-2.6.18.2/arch/sh/kernel/irq.c 2006-09-20 16:58:01 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sh/kernel/irq.c 2006-10-13 20:53:27 +0200 @@ -66,6 +67,7 @@ asmlinkage int do_IRQ(unsigned long r4, struct pt_regs regs) { int irq = r4; + struct vx_info_save vxis; irq_enter(); --- linux-2.6.18.2/arch/sh/kernel/irq.c 2006-09-20 16:58:01 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sh/kernel/irq.c 2006-10-13 20:53:27 +0200 @@ -87,7 +89,9 @@ asmlinkage int do_IRQ(unsigned long r4, #endif irq = irq_demux(irq); + __enter_vx_admin(&vxis); __do_IRQ(irq, ®s); + __leave_vx_admin(&vxis); irq_exit(); return 1; } --- linux-2.6.18.2/arch/sh64/kernel/irq.c 2006-09-20 16:58:01 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sh64/kernel/irq.c 2006-10-13 20:53:48 +0200 @@ -102,7 +103,11 @@ asmlinkage int do_IRQ(unsigned long vect irq = irq_demux(vector_num); if (irq >= 0) { + struct vx_info_save vxis; + + __enter_vx_admin(&vxis); __do_IRQ(irq, regs); + __leave_vx_admin(&vxis); } else { printk("unexpected IRQ trap at vector %03lx\n", vector_num); } --- linux-2.6.18.2/arch/um/kernel/irq.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/um/kernel/irq.c 2006-10-13 20:54:08 +0200 @@ -370,10 +371,15 @@ void forward_interrupts(int pid) */ unsigned int do_IRQ(int irq, union uml_pt_regs *regs) { - irq_enter(); - __do_IRQ(irq, (struct pt_regs *)regs); - irq_exit(); - return 1; + struct vx_info_save vxis; + + irq_enter(); + + __enter_vx_admin(&vxis); + __do_IRQ(irq, (struct pt_regs *)regs); + __leave_vx_admin(&vxis); + irq_exit(); + return 1; } int um_request_irq(unsigned int irq, int fd, int type, --- linux-2.6.18.2/arch/v850/kernel/irq.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/v850/kernel/irq.c 2006-10-25 03:39:09 +0200 @@ -100,8 +101,12 @@ int show_interrupts(struct seq_file *p, interrupt. */ unsigned int handle_irq (int irq, struct pt_regs *regs) { + struct vx_info_save vxis; + irq_enter(); + __enter_vx_admin(&vxis); __do_IRQ(irq, regs); + __leave_vx_admin(&vxis); irq_exit(); return 1; } --- linux-2.6.18.2/arch/x86_64/kernel/irq.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/x86_64/kernel/irq.c 2006-10-13 20:54:24 +0200 @@ -117,6 +118,7 @@ asmlinkage unsigned int do_IRQ(struct pt { /* high bit used in ret_from_ code */ unsigned irq = ~regs->orig_rax; + struct vx_info_save vxis; if (unlikely(irq >= NR_IRQS)) { printk(KERN_EMERG "%s: cannot handle IRQ %d\n", --- linux-2.6.18.2/arch/x86_64/kernel/irq.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/x86_64/kernel/irq.c 2006-10-13 20:54:24 +0200 @@ -129,7 +131,9 @@ asmlinkage unsigned int do_IRQ(struct pt #ifdef CONFIG_DEBUG_STACKOVERFLOW stack_overflow_check(regs); #endif + __enter_vx_admin(&vxis); __do_IRQ(irq, regs); + __leave_vx_admin(&vxis); irq_exit(); return 1; --- linux-2.6.18.2/arch/xtensa/kernel/irq.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/xtensa/kernel/irq.c 2006-10-13 20:54:36 +0200 @@ -48,6 +49,8 @@ void ack_bad_irq(unsigned int irq) unsigned int do_IRQ(int irq, struct pt_regs *regs) { + struct vx_info_save vxis; + irq_enter(); #ifdef CONFIG_DEBUG_STACKOVERFLOW --- linux-2.6.18.2/arch/xtensa/kernel/irq.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/xtensa/kernel/irq.c 2006-10-13 20:54:36 +0200 @@ -63,9 +66,9 @@ unsigned int do_IRQ(int irq, struct pt_ sp - sizeof(struct thread_info)); } #endif - + __enter_vx_admin(&vxis); __do_IRQ(irq, regs); - + __leave_vx_admin(&vxis); irq_exit(); return 1; --- linux-2.6.18.2/drivers/block/loop.c 2006-09-20 16:58:07 +0200 +++ linux-2.6.18.2-vs2.1.1/drivers/block/loop.c 2006-09-25 15:40:02 +0200 @@ -741,6 +742,7 @@ static int loop_set_fd(struct loop_devic struct file *file, *f; struct inode *inode; struct address_space *mapping; + struct vx_info_save vxis; unsigned lo_blocksize; int lo_flags = 0; int error; --- linux-2.6.18.2/drivers/block/loop.c 2006-09-20 16:58:07 +0200 +++ linux-2.6.18.2-vs2.1.1/drivers/block/loop.c 2006-09-25 15:40:02 +0200 @@ -837,7 +840,9 @@ static int loop_set_fd(struct loop_devic set_blocksize(bdev, lo_blocksize); + __enter_vx_admin(&vxis); error = kernel_thread(loop_thread, lo, CLONE_KERNEL); + __leave_vx_admin(&vxis); if (error < 0) goto out_putf; wait_for_completion(&lo->lo_done); --- linux-2.6.18.2/drivers/s390/cio/cio.c 2006-09-20 16:58:27 +0200 +++ linux-2.6.18.2-vs2.1.1/drivers/s390/cio/cio.c 2006-10-13 20:54:50 +0200 @@ -639,6 +640,8 @@ do_IRQ (struct pt_regs *regs) spin_lock(&sch->lock); /* Store interrupt response block to lowcore. */ if (tsch (tpi_info->schid, irb) == 0 && sch) { + struct vx_info_save vxis; + /* Keep subchannel information word up to date. */ memcpy (&sch->schib.scsw, &irb->scsw, sizeof (irb->scsw)); --- linux-2.6.18.2/drivers/s390/cio/cio.c 2006-09-20 16:58:27 +0200 +++ linux-2.6.18.2-vs2.1.1/drivers/s390/cio/cio.c 2006-10-13 20:54:50 +0200 @@ -643,8 +646,10 @@ ***** memcpy (&sch->schib.scsw, &irb->scsw, sizeof (irb->scsw)); /* Call interrupt handler if there is one. */ + __enter_vx_admin(&vxis); if (sch->driver && sch->driver->irq) sch->driver->irq(&sch->dev); + __leave_vx_admin(&vxis); } if (sch) spin_unlock(&sch->lock); --- linux-2.6.18.2/include/asm-mips/irq.h 2006-09-20 16:58:41 +0200 +++ linux-2.6.18.2-vs2.1.1/include/asm-mips/irq.h 2006-10-13 20:55:06 +0200 @@ -57,9 +58,13 @@ do { \ */ #define do_IRQ(irq, regs) \ do { \ + struct vx_info_save vxis; \ + \ irq_enter(); \ __DO_IRQ_SMTC_HOOK(); \ + __enter_vx_admin(&vxis); \ __do_IRQ((irq), (regs)); \ + __leave_vx_admin(&vxis); \ irq_exit(); \ } while (0) --- linux-2.6.18.2/kernel/irq/handle.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/irq/handle.c 2006-10-29 20:13:29 +0100 @@ -170,6 +171,7 @@ fastcall unsigned int __do_IRQ(unsigned { struct irq_desc *desc = irq_desc + irq; struct irqaction *action; + struct vx_info_save vxis; unsigned int status; kstat_this_cpu.irqs[irq]++; --- linux-2.6.18.2/kernel/irq/handle.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/irq/handle.c 2006-10-29 20:13:29 +0100 @@ -179,6 +181,7 @@ fastcall unsigned int __do_IRQ(unsigned /* * No locking required for CPU-local interrupts: */ + __enter_vx_admin(&vxis); if (desc->chip->ack) desc->chip->ack(irq); action_ret = handle_IRQ_event(irq, regs, desc->action); --- linux-2.6.18.2/kernel/irq/handle.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/irq/handle.c 2006-10-29 20:13:29 +0100 @@ -183,6 +186,7 @@ ***** desc->chip->ack(irq); action_ret = handle_IRQ_event(irq, regs, desc->action); desc->chip->end(irq); + __leave_vx_admin(&vxis); return 1; } --- linux-2.6.18.2/kernel/irq/handle.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/irq/handle.c 2006-10-29 20:13:29 +0100 @@ -187,6 +191,7 @@ ***** } spin_lock(&desc->lock); + __enter_vx_admin(&vxis); if (desc->chip->ack) desc->chip->ack(irq); /* --- linux-2.6.18.2/kernel/irq/handle.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/irq/handle.c 2006-10-29 20:13:29 +0100 @@ -249,6 +254,7 @@ out: * disabled while the handler was running. */ desc->chip->end(irq); + __leave_vx_admin(&vxis); spin_unlock(&desc->lock); return 1; --- linux-2.6.18.2/kernel/posix-timers.c 2006-06-18 04:55:31 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/posix-timers.c 2006-10-06 23:10:42 +0200 @@ -298,6 +299,10 @@ void do_schedule_next_timer(struct sigin int posix_timer_event(struct k_itimer *timr,int si_private) { + struct vx_info_save vxis; + int ret; + + enter_vx_info(task_get_vx_info(timr->it_process), &vxis); memset(&timr->sigq->info, 0, sizeof(siginfo_t)); timr->sigq->info.si_sys_private = si_private; /* Send signal to the process that owns this timer.*/ --- linux-2.6.18.2/kernel/posix-timers.c 2006-06-18 04:55:31 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/posix-timers.c 2006-10-06 23:10:42 +0200 @@ -310,11 +315,11 @@ int posix_timer_event(struct k_itimer *t if (timr->it_sigev_notify & SIGEV_THREAD_ID) { struct task_struct *leader; - int ret = send_sigqueue(timr->it_sigev_signo, timr->sigq, - timr->it_process); + ret = send_sigqueue(timr->it_sigev_signo, timr->sigq, + timr->it_process); if (likely(ret >= 0)) - return ret; + goto out; timr->it_sigev_notify = SIGEV_SIGNAL; leader = timr->it_process->group_leader; --- linux-2.6.18.2/kernel/posix-timers.c 2006-06-18 04:55:31 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/posix-timers.c 2006-10-06 23:10:42 +0200 @@ -322,8 +327,12 @@ int posix_timer_event(struct k_itimer *t timr->it_process = leader; } - return send_group_sigqueue(timr->it_sigev_signo, timr->sigq, - timr->it_process); + ret = send_group_sigqueue(timr->it_sigev_signo, timr->sigq, + timr->it_process); +out: + leave_vx_info(&vxis); + put_vx_info(vxis.vxi); + return ret; } EXPORT_SYMBOL_GPL(posix_timer_event); --- linux-2.6.18.2/kernel/printk.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/printk.c 2006-09-25 17:37:24 +0200 @@ -510,8 +507,10 @@ asmlinkage int vprintk(const char *fmt, char *p; static char printk_buf[1024]; static int log_level_unknown = 1; + struct vx_info_save vxis; preempt_disable(); + __enter_vx_admin(&vxis); if (unlikely(oops_in_progress) && printk_cpu == smp_processor_id()) /* If a crash is occurring during printk() on this CPU, * make sure we can't deadlock */ --- linux-2.6.18.2/kernel/printk.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/printk.c 2006-09-25 17:37:24 +0200 @@ -620,6 +619,7 @@ asmlinkage int vprintk(const char *fmt, local_irq_restore(flags); } + __leave_vx_admin(&vxis); preempt_enable(); return printed_len; } --- linux-2.6.18.2/kernel/softirq.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/softirq.c 2006-09-25 17:56:22 +0200 @@ -205,6 +206,7 @@ EXPORT_SYMBOL(local_bh_enable_ip); asmlinkage void __do_softirq(void) { + struct vx_info_save vxis; struct softirq_action *h; __u32 pending; int max_restart = MAX_SOFTIRQ_RESTART; --- linux-2.6.18.2/kernel/softirq.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/softirq.c 2006-09-25 17:56:22 +0200 @@ -214,6 +216,7 @@ asmlinkage void __do_softirq(void) account_system_vtime(current); __local_bh_disable((unsigned long)__builtin_return_address(0)); + __enter_vx_admin(&vxis); trace_softirq_enter(); cpu = smp_processor_id(); --- linux-2.6.18.2/kernel/softirq.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/softirq.c 2006-09-25 17:56:22 +0200 @@ -245,6 +248,7 @@ restart: trace_softirq_exit(); + __leave_vx_admin(&vxis); account_system_vtime(current); _local_bh_enable(); }