diff -r 484848f240e8 xen/arch/x86/x86_32/traps.c --- a/xen/arch/x86/x86_32/traps.c Wed Aug 08 17:50:24 2007 +0100 +++ b/xen/arch/x86/x86_32/traps.c Thu Aug 09 10:04:52 2007 +0000 @@ -172,6 +172,7 @@ unsigned long do_iret(void) unsigned long do_iret(void) { struct cpu_user_regs *regs = guest_cpu_user_regs(); + struct vcpu *v = current; u32 eflags; /* Check worst-case stack frame for overlap with Xen protected area. */ @@ -215,10 +216,10 @@ unsigned long do_iret(void) } /* No longer in NMI context. */ - current->nmi_masked = 0; + v->nmi_masked = 0; /* Restore upcall mask from supplied EFLAGS.IF. */ - current->vcpu_info->evtchn_upcall_mask = !(eflags & X86_EFLAGS_IF); + vcpu_info(v, evtchn_upcall_mask) = !(eflags & X86_EFLAGS_IF); /* * The hypercall exit path will overwrite EAX with this return @@ -228,7 +229,7 @@ unsigned long do_iret(void) exit_and_crash: gdprintk(XENLOG_ERR, "Fatal error\n"); - domain_crash(current->domain); + domain_crash(v->domain); return 0; } diff -r 484848f240e8 xen/arch/x86/x86_64/traps.c --- a/xen/arch/x86/x86_64/traps.c Wed Aug 08 17:50:24 2007 +0100 +++ b/xen/arch/x86/x86_64/traps.c Thu Aug 09 10:13:21 2007 +0000 @@ -235,10 +235,10 @@ unsigned long do_iret(void) } /* No longer in NMI context. */ - current->nmi_masked = 0; + v->nmi_masked = 0; /* Restore upcall mask from supplied EFLAGS.IF. */ - vcpu_info(current, evtchn_upcall_mask) = !(iret_saved.rflags & EF_IE); + vcpu_info(v, evtchn_upcall_mask) = !(iret_saved.rflags & EF_IE); /* Saved %rax gets written back to regs->rax in entry.S. */ return iret_saved.rax;