ia64/xen-unstable

changeset 6127:f972da9a2dda

Fix getdomaininfo for vmx guests.
Replaces Intel patch [14/15].
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Aug 11 21:19:45 2005 +0000 (2005-08-11)
parents 01e223b2a350
children 57b3fdca5dae
files xen/arch/x86/dom0_ops.c
line diff
     1.1 --- a/xen/arch/x86/dom0_ops.c	Thu Aug 11 21:09:06 2005 +0000
     1.2 +++ b/xen/arch/x86/dom0_ops.c	Thu Aug 11 21:19:45 2005 +0000
     1.3 @@ -404,16 +404,18 @@ void arch_getdomaininfo_ctxt(
     1.4  
     1.5      memcpy(c, &v->arch.guest_context, sizeof(*c));
     1.6  
     1.7 -    /* IOPL privileges are virtualised -- merge back into returned eflags. */
     1.8 -    BUG_ON((c->user_regs.eflags & EF_IOPL) != 0);
     1.9 -    c->user_regs.eflags |= v->arch.iopl << 12;
    1.10 -
    1.11      if ( VMX_DOMAIN(v) )
    1.12      {
    1.13          save_vmx_cpu_user_regs(&c->user_regs);
    1.14          __vmread(CR0_READ_SHADOW, &c->ctrlreg[0]);
    1.15          __vmread(CR4_READ_SHADOW, &c->ctrlreg[4]);
    1.16      }
    1.17 +    else
    1.18 +    {
    1.19 +        /* IOPL privileges are virtualised: merge back into returned eflags. */
    1.20 +        BUG_ON((c->user_regs.eflags & EF_IOPL) != 0);
    1.21 +        c->user_regs.eflags |= v->arch.iopl << 12;
    1.22 +    }
    1.23  
    1.24      c->flags = 0;
    1.25      if ( test_bit(_VCPUF_fpu_initialised, &v->vcpu_flags) )