diff options
author | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2003-06-04 16:59:44 +0000 |
---|---|---|
committer | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2003-06-04 16:59:44 +0000 |
commit | f8e9aa0b6f30ba9cd26d686c335044620a65e452 (patch) | |
tree | d5839b7123a369eb19e89fcddc097d6266ecd3ce /xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c | |
parent | 8f09f5ed1674ddf635c6ac26afe785cb3a80f77d (diff) | |
download | xen-f8e9aa0b6f30ba9cd26d686c335044620a65e452.tar.gz xen-f8e9aa0b6f30ba9cd26d686c335044620a65e452.tar.bz2 xen-f8e9aa0b6f30ba9cd26d686c335044620a65e452.zip |
bitkeeper revision 1.253 (3ede2580BOyG2X8oTsgB7U5xY-U9XQ)
processor.h, setup.c, process.c, ioport.c, head.S:
Yet another IOPL fix -- tested this time :-)
Diffstat (limited to 'xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c')
-rw-r--r-- | xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c index b4e7a6cd14..6605ce2e65 100644 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c @@ -252,6 +252,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, struct task_struct * p, struct pt_regs * regs) { struct pt_regs * childregs; + unsigned long eflags; childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p)) - 1; struct_cpy(childregs, regs); @@ -269,6 +270,10 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, unlazy_fpu(current); struct_cpy(&p->thread.i387, ¤t->thread.i387); + + __asm__ __volatile__ ( "pushfl; popl %0" : "=r" (eflags) : ); + p->thread.io_pl = (eflags >> 12) & 3; + /* We're careful with hypercall privileges. Don't allow inheritance. */ p->thread.hypercall_pl = 1; @@ -368,8 +373,7 @@ void __switch_to(struct task_struct *prev_p, struct task_struct *next_p) queue_multicall2(__HYPERVISOR_stack_switch, __KERNEL_DS, next->esp0); /* Next call will silently fail if we are a non-privileged guest OS. */ queue_multicall2(__HYPERVISOR_set_priv_levels, - ((((struct pt_regs *)next->esp0)-1)->eflags>>12)&3, - next->hypercall_pl); + next->io_pl, next->hypercall_pl); /* EXECUTE ALL TASK SWITCH XEN SYSCALLS AT THIS POINT. */ execute_multicall_list(); |