ia64/xen-unstable
changeset 3183:2c2d547ca702
bitkeeper revision 1.1159.1.469 (41a9c2bcqd7AcyR2IqZKFxYUW-XVPg)
domain.c:
Check iopl when booting additional cpus.
smpboot.c:
Set iopl when booting additional cpus.
domain.c:
Check iopl when booting additional cpus.
smpboot.c:
Set iopl when booting additional cpus.
author | cl349@arcadians.cl.cam.ac.uk |
---|---|
date | Sun Nov 28 12:21:16 2004 +0000 (2004-11-28) |
parents | 51574b413767 |
children | 3e0c45a8c812 |
files | linux-2.6.9-xen-sparse/arch/xen/i386/kernel/smpboot.c xen/arch/x86/domain.c |
line diff
1.1 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/smpboot.c Sun Nov 28 11:43:57 2004 +0000 1.2 +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/smpboot.c Sun Nov 28 12:21:16 2004 +0000 1.3 @@ -880,7 +880,7 @@ static int __init do_boot_cpu(int apicid 1.4 ctxt.cpu_ctxt.cs = __KERNEL_CS; 1.5 ctxt.cpu_ctxt.eip = start_eip; 1.6 ctxt.cpu_ctxt.esp = idle->thread.esp; 1.7 - ctxt.cpu_ctxt.eflags = (1<<9) | (1<<2); 1.8 + ctxt.cpu_ctxt.eflags = (1<<9) | (1<<2) | (idle->thread.io_pl<<12); 1.9 1.10 /* FPU is set up to default initial state. */ 1.11 memset(ctxt.fpu_ctxt, 0, sizeof(ctxt.fpu_ctxt));
2.1 --- a/xen/arch/x86/domain.c Sun Nov 28 11:43:57 2004 +0000 2.2 +++ b/xen/arch/x86/domain.c Sun Nov 28 12:21:16 2004 +0000 2.3 @@ -248,6 +248,10 @@ int arch_final_setup_guestos(struct exec 2.4 &c->cpu_ctxt, 2.5 sizeof(d->thread.user_ctxt)); 2.6 2.7 + /* Clear IOPL for unprivileged domains. */ 2.8 + if (!IS_PRIV(d->domain)) 2.9 + d->thread.user_ctxt.eflags &= 0xffffcfff; 2.10 + 2.11 /* 2.12 * This is sufficient! If the descriptor DPL differs from CS RPL then we'll 2.13 * #GP. If DS, ES, FS, GS are DPL 0 then they'll be cleared automatically.