[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Domain builders need only set bit 9 of EFLAGS (Interrupt Enable).
ChangeSet 1.1443, 2005/05/11 18:13:44+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx Domain builders need only set bit 9 of EFLAGS (Interrupt Enable). Setting this bit is enforced by Xen. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> tools/libxc/xc_linux_build.c | 2 +- tools/libxc/xc_plan9_build.c | 2 +- tools/libxc/xc_vmx_build.c | 2 +- xen/arch/x86/domain.c | 14 ++++++++------ 4 files changed, 11 insertions(+), 9 deletions(-) diff -Nru a/tools/libxc/xc_linux_build.c b/tools/libxc/xc_linux_build.c --- a/tools/libxc/xc_linux_build.c 2005-05-11 14:04:08 -04:00 +++ b/tools/libxc/xc_linux_build.c 2005-05-11 14:04:08 -04:00 @@ -409,7 +409,7 @@ ctxt->user_regs.eip = vkern_entry; ctxt->user_regs.esp = vstartinfo_start + 2*PAGE_SIZE; ctxt->user_regs.esi = vstartinfo_start; - ctxt->user_regs.eflags = (1<<9) | (1<<2); + ctxt->user_regs.eflags = 1 << 9; /* Interrupt Enable */ /* FPU is set up to default initial state. */ memset(&ctxt->fpu_ctxt, 0, sizeof(ctxt->fpu_ctxt)); diff -Nru a/tools/libxc/xc_plan9_build.c b/tools/libxc/xc_plan9_build.c --- a/tools/libxc/xc_plan9_build.c 2005-05-11 14:04:08 -04:00 +++ b/tools/libxc/xc_plan9_build.c 2005-05-11 14:04:08 -04:00 @@ -495,7 +495,7 @@ /* why is this set? */ ctxt->user_regs.esi = ctxt->user_regs.esp; - ctxt->user_regs.eflags = (1 << 9) | (1 << 2); + ctxt->user_regs.eflags = 1 << 9; /* Interrupt Enable */ /* FPU is set up to default initial state. */ memset(&ctxt->fpu_ctxt, 0, sizeof(ctxt->fpu_ctxt)); diff -Nru a/tools/libxc/xc_vmx_build.c b/tools/libxc/xc_vmx_build.c --- a/tools/libxc/xc_vmx_build.c 2005-05-11 14:04:08 -04:00 +++ b/tools/libxc/xc_vmx_build.c 2005-05-11 14:04:08 -04:00 @@ -447,7 +447,7 @@ ctxt->user_regs.esi = vboot_params_start; ctxt->user_regs.edi = vboot_params_start + 0x2d0; - ctxt->user_regs.eflags = (1<<2); + ctxt->user_regs.eflags = 0; return 0; diff -Nru a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c --- a/xen/arch/x86/domain.c 2005-05-11 14:04:08 -04:00 +++ b/xen/arch/x86/domain.c 2005-05-11 14:04:08 -04:00 @@ -409,13 +409,15 @@ memcpy(&ed->arch.guest_context, c, sizeof(*c)); - /* IOPL privileges are virtualised. */ - ed->arch.iopl = (ed->arch.guest_context.user_regs.eflags >> 12) & 3; - ed->arch.guest_context.user_regs.eflags &= ~EF_IOPL; + if ( !(c->flags & VGCF_VMX_GUEST) ) + { + /* IOPL privileges are virtualised. */ + ed->arch.iopl = (ed->arch.guest_context.user_regs.eflags >> 12) & 3; + ed->arch.guest_context.user_regs.eflags &= ~EF_IOPL; - /* Clear IOPL for unprivileged domains. */ - if ( !IS_PRIV(d) ) - ed->arch.guest_context.user_regs.eflags &= 0xffffcfff; + /* Ensure real hardware interrupts are enabled. */ + ed->arch.guest_context.user_regs.eflags |= EF_IE; + } if ( test_bit(EDF_DONEINIT, &ed->flags) ) return 0; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |