ia64/xen-unstable

changeset 3809:c9a96907ffca

bitkeeper revision 1.1193 (420d72d0IYG07QeED-l3FKZf5M7o1g)

fix build
Signed-off-by: ian@xensource.com
author iap10@freefall.cl.cam.ac.uk
date Sat Feb 12 03:06:56 2005 +0000 (2005-02-12)
parents c62ae5f347a4
children c695b365394d
files xen/arch/x86/dom0_ops.c xen/arch/x86/vmx.c
line diff
     1.1 --- a/xen/arch/x86/dom0_ops.c	Sat Feb 12 01:52:41 2005 +0000
     1.2 +++ b/xen/arch/x86/dom0_ops.c	Sat Feb 12 03:06:56 2005 +0000
     1.3 @@ -348,16 +348,21 @@ void arch_getdomaininfo_ctxt(
     1.4      struct exec_domain *ed, full_execution_context_t *c)
     1.5  { 
     1.6      int i;
     1.7 -    unsigned long vmx_domain = ed->arch.arch_vmx.flags;
     1.8 +#ifdef __i386__  /* Remove when x86_64 VMX is implemented */
     1.9 +    unsigned long vmx_domain;
    1.10      extern void save_vmx_execution_context(execution_context_t *);
    1.11 +#endif
    1.12  
    1.13      c->flags = 0;
    1.14      memcpy(&c->cpu_ctxt, 
    1.15             &ed->arch.user_ctxt,
    1.16             sizeof(ed->arch.user_ctxt));
    1.17  
    1.18 +#ifdef __i386__
    1.19 +    vmx_domain = ed->arch.arch_vmx.flags;
    1.20      if (vmx_domain)
    1.21          save_vmx_execution_context(&c->cpu_ctxt);
    1.22 +#endif
    1.23  
    1.24      if ( test_bit(EDF_DONEFPUINIT, &ed->ed_flags) )
    1.25          c->flags |= ECF_I387_VALID;
     2.1 --- a/xen/arch/x86/vmx.c	Sat Feb 12 01:52:41 2005 +0000
     2.2 +++ b/xen/arch/x86/vmx.c	Sat Feb 12 03:06:56 2005 +0000
     2.3 @@ -646,6 +646,20 @@ static void vmx_print_line(const char c,
     2.4          print_buf[index++] = c;
     2.5  }
     2.6  
     2.7 +void save_vmx_execution_context(execution_context_t *ctxt)
     2.8 +{
     2.9 +    __vmread(GUEST_SS_SELECTOR, &ctxt->ss);
    2.10 +    __vmread(GUEST_ESP, &ctxt->esp);
    2.11 +    __vmread(GUEST_EFLAGS, &ctxt->eflags);
    2.12 +    __vmread(GUEST_CS_SELECTOR, &ctxt->cs);
    2.13 +    __vmread(GUEST_EIP, &ctxt->eip);
    2.14 +
    2.15 +    __vmread(GUEST_GS_SELECTOR, &ctxt->gs);
    2.16 +    __vmread(GUEST_FS_SELECTOR, &ctxt->fs);
    2.17 +    __vmread(GUEST_ES_SELECTOR, &ctxt->es);
    2.18 +    __vmread(GUEST_DS_SELECTOR, &ctxt->ds);
    2.19 +}
    2.20 +
    2.21  #ifdef XEN_DEBUGGER
    2.22  void save_xen_regs(struct xen_regs *regs)
    2.23  {