ia64/xen-unstable

changeset 3755:1494093616a3

bitkeeper revision 1.1159.1.561 (420a44fbc4-bx17m5WWwDlyH93ab-g)

Some simple renaming. 'guestos' -> 'kernel'.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Wed Feb 09 17:14:35 2005 +0000 (2005-02-09)
parents 2318bacbb21e
children bb187d778f52
files linux-2.4.29-xen-sparse/include/asm-xen/pgalloc.h linux-2.6.10-xen-sparse/arch/xen/i386/kernel/smpboot.c linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/segment.h tools/libxc/xc_linux_build.c tools/libxc/xc_linux_restore.c tools/libxc/xc_plan9_build.c tools/libxc/xc_vmx_build.c xen/arch/x86/dom0_ops.c xen/arch/x86/domain.c xen/arch/x86/traps.c xen/arch/x86/vmx_vmcs.c xen/arch/x86/x86_32/domain_build.c xen/arch/x86/x86_32/mm.c xen/arch/x86/x86_64/asm-offsets.c xen/arch/x86/x86_64/domain_build.c xen/arch/x86/x86_64/entry.S xen/arch/x86/x86_64/mm.c xen/common/dom0_ops.c xen/common/domain.c xen/include/asm-x86/desc.h xen/include/asm-x86/domain.h xen/include/asm-x86/processor.h xen/include/asm-x86/x86_32/regs.h xen/include/asm-x86/x86_64/regs.h xen/include/public/arch-x86_32.h xen/include/public/arch-x86_64.h xen/include/public/xen.h xen/include/xen/domain.h xen/include/xen/sched.h
line diff
     1.1 --- a/linux-2.4.29-xen-sparse/include/asm-xen/pgalloc.h	Wed Feb 09 16:24:23 2005 +0000
     1.2 +++ b/linux-2.4.29-xen-sparse/include/asm-xen/pgalloc.h	Wed Feb 09 17:14:35 2005 +0000
     1.3 @@ -227,7 +227,7 @@ static inline void flush_tlb_range(struc
     1.4  }
     1.5  
     1.6  #else
     1.7 -#error no guestos SMP support yet...
     1.8 +#error no kernel SMP support yet...
     1.9  #include <asm/smp.h>
    1.10  
    1.11  #define local_flush_tlb() \
     2.1 --- a/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/smpboot.c	Wed Feb 09 16:24:23 2005 +0000
     2.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/smpboot.c	Wed Feb 09 17:14:35 2005 +0000
     2.3 @@ -879,7 +879,7 @@ static int __init do_boot_cpu(int apicid
     2.4  	for ( i = 0; i < 256; i++ )
     2.5  	{
     2.6  		ctxt.trap_ctxt[i].vector = i;
     2.7 -		ctxt.trap_ctxt[i].cs     = FLAT_GUESTOS_CS;
     2.8 +		ctxt.trap_ctxt[i].cs     = FLAT_KERNEL_CS;
     2.9  	}
    2.10  	ctxt.fast_trap_idx = smp_trap_init(ctxt.trap_ctxt);
    2.11  
    2.12 @@ -901,8 +901,8 @@ static int __init do_boot_cpu(int apicid
    2.13  	}
    2.14  
    2.15  	/* Ring 1 stack is the initial stack. */
    2.16 -	ctxt.guestos_ss  = __KERNEL_DS;
    2.17 -	ctxt.guestos_esp = idle->thread.esp;
    2.18 +	ctxt.kernel_ss  = __KERNEL_DS;
    2.19 +	ctxt.kernel_esp = idle->thread.esp;
    2.20  
    2.21  	/* Callback handlers. */
    2.22  	ctxt.event_callback_cs     = __KERNEL_CS;
     3.1 --- a/linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/segment.h	Wed Feb 09 16:24:23 2005 +0000
     3.2 +++ b/linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/segment.h	Wed Feb 09 17:14:35 2005 +0000
     3.3 @@ -82,9 +82,9 @@
     3.4  
     3.5  /* Simple and small GDT entries for booting only */
     3.6  
     3.7 -#define __BOOT_CS	FLAT_GUESTOS_CS
     3.8 +#define __BOOT_CS	FLAT_KERNEL_CS
     3.9  
    3.10 -#define __BOOT_DS	FLAT_GUESTOS_DS
    3.11 +#define __BOOT_DS	FLAT_KERNEL_DS
    3.12  
    3.13  /*
    3.14   * The interrupt descriptor table has room for 256 idt's,
     4.1 --- a/tools/libxc/xc_linux_build.c	Wed Feb 09 16:24:23 2005 +0000
     4.2 +++ b/tools/libxc/xc_linux_build.c	Wed Feb 09 17:14:35 2005 +0000
     4.3 @@ -41,7 +41,7 @@ loadelfsymtab(
     4.4      char *elfbase, int xch, u32 dom, unsigned long *parray,
     4.5      struct domain_setup_info *dsi);
     4.6  
     4.7 -static int setup_guestos(int xc_handle,
     4.8 +static int setup_guest(int xc_handle,
     4.9                           u32 dom,
    4.10                           char *image, unsigned long image_size,
    4.11                           gzFile initrd_gfd, unsigned long initrd_len,
    4.12 @@ -384,7 +384,7 @@ int xc_linux_build(int xc_handle,
    4.13          goto error_out;
    4.14      }
    4.15  
    4.16 -    if ( setup_guestos(xc_handle, domid, image, image_size, 
    4.17 +    if ( setup_guest(xc_handle, domid, image, image_size, 
    4.18                         initrd_gfd, initrd_size, nr_pages, 
    4.19                         &vstartinfo_start, &vkern_entry,
    4.20                         ctxt, cmdline,
    4.21 @@ -406,19 +406,19 @@ int xc_linux_build(int xc_handle,
    4.22  
    4.23      /*
    4.24       * Initial register values:
    4.25 -     *  DS,ES,FS,GS = FLAT_GUESTOS_DS
    4.26 -     *       CS:EIP = FLAT_GUESTOS_CS:start_pc
    4.27 -     *       SS:ESP = FLAT_GUESTOS_DS:start_stack
    4.28 +     *  DS,ES,FS,GS = FLAT_KERNEL_DS
    4.29 +     *       CS:EIP = FLAT_KERNEL_CS:start_pc
    4.30 +     *       SS:ESP = FLAT_KERNEL_DS:start_stack
    4.31       *          ESI = start_info
    4.32       *  [EAX,EBX,ECX,EDX,EDI,EBP are zero]
    4.33       *       EFLAGS = IF | 2 (bit 1 is reserved and should always be 1)
    4.34       */
    4.35 -    ctxt->cpu_ctxt.ds = FLAT_GUESTOS_DS;
    4.36 -    ctxt->cpu_ctxt.es = FLAT_GUESTOS_DS;
    4.37 -    ctxt->cpu_ctxt.fs = FLAT_GUESTOS_DS;
    4.38 -    ctxt->cpu_ctxt.gs = FLAT_GUESTOS_DS;
    4.39 -    ctxt->cpu_ctxt.ss = FLAT_GUESTOS_DS;
    4.40 -    ctxt->cpu_ctxt.cs = FLAT_GUESTOS_CS;
    4.41 +    ctxt->cpu_ctxt.ds = FLAT_KERNEL_DS;
    4.42 +    ctxt->cpu_ctxt.es = FLAT_KERNEL_DS;
    4.43 +    ctxt->cpu_ctxt.fs = FLAT_KERNEL_DS;
    4.44 +    ctxt->cpu_ctxt.gs = FLAT_KERNEL_DS;
    4.45 +    ctxt->cpu_ctxt.ss = FLAT_KERNEL_DS;
    4.46 +    ctxt->cpu_ctxt.cs = FLAT_KERNEL_CS;
    4.47      ctxt->cpu_ctxt.eip = vkern_entry;
    4.48      ctxt->cpu_ctxt.esp = vstartinfo_start + 2*PAGE_SIZE;
    4.49      ctxt->cpu_ctxt.esi = vstartinfo_start;
    4.50 @@ -431,7 +431,7 @@ int xc_linux_build(int xc_handle,
    4.51      for ( i = 0; i < 256; i++ )
    4.52      {
    4.53          ctxt->trap_ctxt[i].vector = i;
    4.54 -        ctxt->trap_ctxt[i].cs     = FLAT_GUESTOS_CS;
    4.55 +        ctxt->trap_ctxt[i].cs     = FLAT_KERNEL_CS;
    4.56      }
    4.57      ctxt->fast_trap_idx = 0;
    4.58  
    4.59 @@ -442,16 +442,16 @@ int xc_linux_build(int xc_handle,
    4.60      ctxt->gdt_ents = 0;
    4.61  
    4.62      /* Ring 1 stack is the initial stack. */
    4.63 -    ctxt->guestos_ss  = FLAT_GUESTOS_DS;
    4.64 -    ctxt->guestos_esp = vstartinfo_start + 2*PAGE_SIZE;
    4.65 +    ctxt->kernel_ss  = FLAT_KERNEL_DS;
    4.66 +    ctxt->kernel_esp = vstartinfo_start + 2*PAGE_SIZE;
    4.67  
    4.68      /* No debugging. */
    4.69      memset(ctxt->debugreg, 0, sizeof(ctxt->debugreg));
    4.70  
    4.71      /* No callback handlers. */
    4.72 -    ctxt->event_callback_cs     = FLAT_GUESTOS_CS;
    4.73 +    ctxt->event_callback_cs     = FLAT_KERNEL_CS;
    4.74      ctxt->event_callback_eip    = 0;
    4.75 -    ctxt->failsafe_callback_cs  = FLAT_GUESTOS_CS;
    4.76 +    ctxt->failsafe_callback_cs  = FLAT_KERNEL_CS;
    4.77      ctxt->failsafe_callback_eip = 0;
    4.78  
    4.79      memset( &launch_op, 0, sizeof(launch_op) );
     5.1 --- a/tools/libxc/xc_linux_restore.c	Wed Feb 09 16:24:23 2005 +0000
     5.2 +++ b/tools/libxc/xc_linux_restore.c	Wed Feb 09 17:14:35 2005 +0000
     5.3 @@ -603,7 +603,7 @@ int xc_linux_restore(int xc_handle, XcIO
     5.4       *  4. fast_trap_idx is checked by Xen.
     5.5       *  5. ldt base must be page-aligned, no more than 8192 ents, ...
     5.6       *  6. gdt already done, and further checking is done by Xen.
     5.7 -     *  7. check that guestos_ss is safe.
     5.8 +     *  7. check that kernel_ss is safe.
     5.9       *  8. pt_base is already done.
    5.10       *  9. debugregs are checked by Xen.
    5.11       *  10. callback code selectors need checking.
    5.12 @@ -612,14 +612,14 @@ int xc_linux_restore(int xc_handle, XcIO
    5.13      {
    5.14          ctxt.trap_ctxt[i].vector = i;
    5.15          if ( (ctxt.trap_ctxt[i].cs & 3) == 0 )
    5.16 -            ctxt.trap_ctxt[i].cs = FLAT_GUESTOS_CS;
    5.17 +            ctxt.trap_ctxt[i].cs = FLAT_KERNEL_CS;
    5.18      }
    5.19 -    if ( (ctxt.guestos_ss & 3) == 0 )
    5.20 -        ctxt.guestos_ss = FLAT_GUESTOS_DS;
    5.21 +    if ( (ctxt.kernel_ss & 3) == 0 )
    5.22 +        ctxt.kernel_ss = FLAT_KERNEL_DS;
    5.23      if ( (ctxt.event_callback_cs & 3) == 0 )
    5.24 -        ctxt.event_callback_cs = FLAT_GUESTOS_CS;
    5.25 +        ctxt.event_callback_cs = FLAT_KERNEL_CS;
    5.26      if ( (ctxt.failsafe_callback_cs & 3) == 0 )
    5.27 -        ctxt.failsafe_callback_cs = FLAT_GUESTOS_CS;
    5.28 +        ctxt.failsafe_callback_cs = FLAT_KERNEL_CS;
    5.29      if ( ((ctxt.ldt_base & (PAGE_SIZE - 1)) != 0) ||
    5.30           (ctxt.ldt_ents > 8192) ||
    5.31           (ctxt.ldt_base > HYPERVISOR_VIRT_START) ||
     6.1 --- a/tools/libxc/xc_plan9_build.c	Wed Feb 09 16:24:23 2005 +0000
     6.2 +++ b/tools/libxc/xc_plan9_build.c	Wed Feb 09 17:14:35 2005 +0000
     6.3 @@ -133,7 +133,7 @@ static int
     6.4  #define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
     6.5  
     6.6  static int
     6.7 -setup_guestos(int xc_handle,
     6.8 +setup_guest(int xc_handle,
     6.9  	      u32 dom,
    6.10  	      gzFile kernel_gfd,
    6.11  	      unsigned long tot_pages,
    6.12 @@ -483,7 +483,7 @@ xc_plan9_build(int xc_handle,
    6.13  	}
    6.14  
    6.15  	DPRINTF(("xc_get_tot_pages returns %ld pages\n", tot_pages));
    6.16 -	if (setup_guestos(xc_handle, domid, kernel_gfd, tot_pages,
    6.17 +	if (setup_guest(xc_handle, domid, kernel_gfd, tot_pages,
    6.18  			  &virt_startinfo_addr,
    6.19  			  &load_addr, &st_ctxt, cmdline,
    6.20  			  op.u.getdomaininfo.shared_info_frame,
    6.21 @@ -502,19 +502,19 @@ xc_plan9_build(int xc_handle,
    6.22  
    6.23  	/*
    6.24  	 * Initial register values:
    6.25 -	 *  DS,ES,FS,GS = FLAT_GUESTOS_DS
    6.26 -	 *       CS:EIP = FLAT_GUESTOS_CS:start_pc
    6.27 -	 *       SS:ESP = FLAT_GUESTOS_DS:start_stack
    6.28 +	 *  DS,ES,FS,GS = FLAT_KERNEL_DS
    6.29 +	 *       CS:EIP = FLAT_KERNEL_CS:start_pc
    6.30 +	 *       SS:ESP = FLAT_KERNEL_DS:start_stack
    6.31  	 *          ESI = start_info
    6.32  	 *  [EAX,EBX,ECX,EDX,EDI,EBP are zero]
    6.33  	 *       EFLAGS = IF | 2 (bit 1 is reserved and should always be 1)
    6.34  	 */
    6.35 -	ctxt->cpu_ctxt.ds = FLAT_GUESTOS_DS;
    6.36 -	ctxt->cpu_ctxt.es = FLAT_GUESTOS_DS;
    6.37 -	ctxt->cpu_ctxt.fs = FLAT_GUESTOS_DS;
    6.38 -	ctxt->cpu_ctxt.gs = FLAT_GUESTOS_DS;
    6.39 -	ctxt->cpu_ctxt.ss = FLAT_GUESTOS_DS;
    6.40 -	ctxt->cpu_ctxt.cs = FLAT_GUESTOS_CS;
    6.41 +	ctxt->cpu_ctxt.ds = FLAT_KERNEL_DS;
    6.42 +	ctxt->cpu_ctxt.es = FLAT_KERNEL_DS;
    6.43 +	ctxt->cpu_ctxt.fs = FLAT_KERNEL_DS;
    6.44 +	ctxt->cpu_ctxt.gs = FLAT_KERNEL_DS;
    6.45 +	ctxt->cpu_ctxt.ss = FLAT_KERNEL_DS;
    6.46 +	ctxt->cpu_ctxt.cs = FLAT_KERNEL_CS;
    6.47  	ctxt->cpu_ctxt.eip = load_addr;
    6.48  	ctxt->cpu_ctxt.eip = 0x80100020;
    6.49  	/* put stack at top of second page */
    6.50 @@ -530,7 +530,7 @@ xc_plan9_build(int xc_handle,
    6.51  	/* Virtual IDT is empty at start-of-day. */
    6.52  	for (i = 0; i < 256; i++) {
    6.53  		ctxt->trap_ctxt[i].vector = i;
    6.54 -		ctxt->trap_ctxt[i].cs = FLAT_GUESTOS_CS;
    6.55 +		ctxt->trap_ctxt[i].cs = FLAT_KERNEL_CS;
    6.56  	}
    6.57  	ctxt->fast_trap_idx = 0;
    6.58  
    6.59 @@ -542,16 +542,16 @@ xc_plan9_build(int xc_handle,
    6.60  
    6.61  	/* Ring 1 stack is the initial stack. */
    6.62  	/* put stack at top of second page */
    6.63 -	ctxt->guestos_ss = FLAT_GUESTOS_DS;
    6.64 -	ctxt->guestos_esp = ctxt->cpu_ctxt.esp;
    6.65 +	ctxt->kernel_ss = FLAT_KERNEL_DS;
    6.66 +	ctxt->kernel_esp = ctxt->cpu_ctxt.esp;
    6.67  
    6.68  	/* No debugging. */
    6.69  	memset(ctxt->debugreg, 0, sizeof (ctxt->debugreg));
    6.70  
    6.71  	/* No callback handlers. */
    6.72 -	ctxt->event_callback_cs = FLAT_GUESTOS_CS;
    6.73 +	ctxt->event_callback_cs = FLAT_KERNEL_CS;
    6.74  	ctxt->event_callback_eip = 0;
    6.75 -	ctxt->failsafe_callback_cs = FLAT_GUESTOS_CS;
    6.76 +	ctxt->failsafe_callback_cs = FLAT_KERNEL_CS;
    6.77  	ctxt->failsafe_callback_eip = 0;
    6.78  
    6.79  	memset(&launch_op, 0, sizeof (launch_op));
     7.1 --- a/tools/libxc/xc_vmx_build.c	Wed Feb 09 16:24:23 2005 +0000
     7.2 +++ b/tools/libxc/xc_vmx_build.c	Wed Feb 09 17:14:35 2005 +0000
     7.3 @@ -108,7 +108,7 @@ static void build_e820map(struct mem_map
     7.4      mem_mapp->nr_map = nr_map;
     7.5  }
     7.6  
     7.7 -static int setup_guestos(int xc_handle,
     7.8 +static int setup_guest(int xc_handle,
     7.9                           u32 dom, int memsize,
    7.10                           char *image, unsigned long image_size,
    7.11                           gzFile initrd_gfd, unsigned long initrd_len,
    7.12 @@ -510,7 +510,7 @@ int xc_vmx_build(int xc_handle,
    7.13          goto error_out;
    7.14      }
    7.15  
    7.16 -    if ( setup_guestos(xc_handle, domid, memsize, image, image_size, 
    7.17 +    if ( setup_guest(xc_handle, domid, memsize, image, image_size, 
    7.18                         initrd_gfd, initrd_size, nr_pages, 
    7.19                         ctxt, cmdline,
    7.20                         op.u.getdomaininfo.shared_info_frame,
    7.21 @@ -535,7 +535,7 @@ int xc_vmx_build(int xc_handle,
    7.22      for ( i = 0; i < 256; i++ )
    7.23      {
    7.24          ctxt->trap_ctxt[i].vector = i;
    7.25 -        ctxt->trap_ctxt[i].cs     = FLAT_GUESTOS_CS;
    7.26 +        ctxt->trap_ctxt[i].cs     = FLAT_KERNEL_CS;
    7.27      }
    7.28      ctxt->fast_trap_idx = 0;
    7.29  
    7.30 @@ -547,16 +547,16 @@ int xc_vmx_build(int xc_handle,
    7.31  
    7.32      /* Ring 1 stack is the initial stack. */
    7.33  /*
    7.34 -    ctxt->guestos_ss  = FLAT_GUESTOS_DS;
    7.35 -    ctxt->guestos_esp = vstartinfo_start;
    7.36 +    ctxt->kernel_ss  = FLAT_KERNEL_DS;
    7.37 +    ctxt->kernel_esp = vstartinfo_start;
    7.38  */
    7.39      /* No debugging. */
    7.40      memset(ctxt->debugreg, 0, sizeof(ctxt->debugreg));
    7.41  
    7.42      /* No callback handlers. */
    7.43 -    ctxt->event_callback_cs     = FLAT_GUESTOS_CS;
    7.44 +    ctxt->event_callback_cs     = FLAT_KERNEL_CS;
    7.45      ctxt->event_callback_eip    = 0;
    7.46 -    ctxt->failsafe_callback_cs  = FLAT_GUESTOS_CS;
    7.47 +    ctxt->failsafe_callback_cs  = FLAT_KERNEL_CS;
    7.48      ctxt->failsafe_callback_eip = 0;
    7.49  
    7.50      memset( &launch_op, 0, sizeof(launch_op) );
     8.1 --- a/xen/arch/x86/dom0_ops.c	Wed Feb 09 16:24:23 2005 +0000
     8.2 +++ b/xen/arch/x86/dom0_ops.c	Wed Feb 09 17:14:35 2005 +0000
     8.3 @@ -355,8 +355,8 @@ void arch_getdomaininfo_ctxt(
     8.4             sizeof(ed->arch.user_ctxt));
     8.5      if ( test_bit(EDF_DONEFPUINIT, &ed->ed_flags) )
     8.6          c->flags |= ECF_I387_VALID;
     8.7 -    if ( GUESTOS_MODE(ed, &ed->arch.user_ctxt) )
     8.8 -        c->flags |= ECF_IN_GUESTOS;
     8.9 +    if ( KERNEL_MODE(ed, &ed->arch.user_ctxt) )
    8.10 +        c->flags |= ECF_IN_KERNEL;
    8.11      memcpy(&c->fpu_ctxt,
    8.12             &ed->arch.i387,
    8.13             sizeof(ed->arch.i387));
    8.14 @@ -381,8 +381,8 @@ void arch_getdomaininfo_ctxt(
    8.15                  l1_pgentry_to_pfn(ed->arch.perdomain_ptes[i]);
    8.16          c->gdt_ents = GET_GDT_ENTRIES(ed);
    8.17      }
    8.18 -    c->guestos_ss  = ed->arch.guestos_ss;
    8.19 -    c->guestos_esp = ed->arch.guestos_sp;
    8.20 +    c->kernel_ss  = ed->arch.kernel_ss;
    8.21 +    c->kernel_esp = ed->arch.kernel_sp;
    8.22      c->pt_base   = 
    8.23          pagetable_val(ed->arch.pagetable);
    8.24      memcpy(c->debugreg, 
     9.1 --- a/xen/arch/x86/domain.c	Wed Feb 09 16:24:23 2005 +0000
     9.2 +++ b/xen/arch/x86/domain.c	Wed Feb 09 17:14:35 2005 +0000
     9.3 @@ -288,7 +288,7 @@ void arch_do_createdomain(struct exec_do
     9.4              mk_l3_pgentry(__pa(d->arch.mm_perdomain_l2) | __PAGE_HYPERVISOR);
     9.5  #endif
     9.6  
     9.7 -        ed->arch.flags = TF_guestos_mode;
     9.8 +        ed->arch.flags = TF_kernel_mode;
     9.9      }
    9.10  }
    9.11  
    9.12 @@ -298,7 +298,7 @@ void arch_do_boot_vcpu(struct exec_domai
    9.13      ed->arch.schedule_tail = d->exec_domain[0]->arch.schedule_tail;
    9.14      ed->arch.perdomain_ptes = 
    9.15          d->arch.mm_perdomain_pt + (ed->eid << PDPT_VCPU_SHIFT);
    9.16 -    ed->arch.flags = TF_guestos_mode;
    9.17 +    ed->arch.flags = TF_kernel_mode;
    9.18  }
    9.19  
    9.20  #ifdef CONFIG_VMX
    9.21 @@ -384,7 +384,7 @@ static void monitor_rm_pagetable(struct 
    9.22      ed->arch.monitor_table = mk_pagetable(0);
    9.23  }
    9.24  
    9.25 -static int vmx_final_setup_guestos(struct exec_domain *ed,
    9.26 +static int vmx_final_setup_guest(struct exec_domain *ed,
    9.27                                     full_execution_context_t *full_context)
    9.28  {
    9.29      int error;
    9.30 @@ -439,7 +439,7 @@ out:
    9.31  }
    9.32  #endif
    9.33  
    9.34 -int arch_final_setup_guestos(
    9.35 +int arch_final_setup_guest(
    9.36      struct exec_domain *d, full_execution_context_t *c)
    9.37  {
    9.38      unsigned long phys_basetab;
    9.39 @@ -449,9 +449,9 @@ int arch_final_setup_guestos(
    9.40      if ( c->flags & ECF_I387_VALID )
    9.41          set_bit(EDF_DONEFPUINIT, &d->ed_flags);
    9.42  
    9.43 -    d->arch.flags &= ~TF_guestos_mode;
    9.44 -    if ( c->flags & ECF_IN_GUESTOS )
    9.45 -        d->arch.flags |= TF_guestos_mode;
    9.46 +    d->arch.flags &= ~TF_kernel_mode;
    9.47 +    if ( c->flags & ECF_IN_KERNEL )
    9.48 +        d->arch.flags |= TF_kernel_mode;
    9.49  
    9.50      memcpy(&d->arch.user_ctxt,
    9.51             &c->cpu_ctxt,
    9.52 @@ -485,8 +485,8 @@ int arch_final_setup_guestos(
    9.53      d->arch.ldt_base = c->ldt_base;
    9.54      d->arch.ldt_ents = c->ldt_ents;
    9.55  
    9.56 -    d->arch.guestos_ss = c->guestos_ss;
    9.57 -    d->arch.guestos_sp = c->guestos_esp;
    9.58 +    d->arch.kernel_ss = c->kernel_ss;
    9.59 +    d->arch.kernel_sp = c->kernel_esp;
    9.60  
    9.61      for ( i = 0; i < 8; i++ )
    9.62          (void)set_debugreg(d, i, c->debugreg[i]);
    9.63 @@ -517,7 +517,7 @@ int arch_final_setup_guestos(
    9.64  
    9.65  #ifdef CONFIG_VMX
    9.66      if (c->flags & ECF_VMX_GUEST)
    9.67 -        return vmx_final_setup_guestos(d, c);
    9.68 +        return vmx_final_setup_guest(d, c);
    9.69  #endif
    9.70  
    9.71      return 0;
    9.72 @@ -532,15 +532,15 @@ void new_thread(struct exec_domain *d,
    9.73  
    9.74      /*
    9.75       * Initial register values:
    9.76 -     *  DS,ES,FS,GS = FLAT_GUESTOS_DS
    9.77 -     *       CS:EIP = FLAT_GUESTOS_CS:start_pc
    9.78 -     *       SS:ESP = FLAT_GUESTOS_SS:start_stack
    9.79 +     *  DS,ES,FS,GS = FLAT_KERNEL_DS
    9.80 +     *       CS:EIP = FLAT_KERNEL_CS:start_pc
    9.81 +     *       SS:ESP = FLAT_KERNEL_SS:start_stack
    9.82       *          ESI = start_info
    9.83       *  [EAX,EBX,ECX,EDX,EDI,EBP are zero]
    9.84       */
    9.85 -    ec->ds = ec->es = ec->fs = ec->gs = FLAT_GUESTOS_DS;
    9.86 -    ec->ss = FLAT_GUESTOS_SS;
    9.87 -    ec->cs = FLAT_GUESTOS_CS;
    9.88 +    ec->ds = ec->es = ec->fs = ec->gs = FLAT_KERNEL_DS;
    9.89 +    ec->ss = FLAT_KERNEL_SS;
    9.90 +    ec->cs = FLAT_KERNEL_CS;
    9.91      ec->eip = start_pc;
    9.92      ec->esp = start_stack;
    9.93      ec->esi = start_info;
    9.94 @@ -625,8 +625,8 @@ void switch_to(struct exec_domain *prev_
    9.95  
    9.96  #ifdef __i386__
    9.97          /* Switch the guest OS ring-1 stack. */
    9.98 -        tss->esp1 = next_p->arch.guestos_sp;
    9.99 -        tss->ss1  = next_p->arch.guestos_ss;
   9.100 +        tss->esp1 = next_p->arch.kernel_sp;
   9.101 +        tss->ss1  = next_p->arch.kernel_ss;
   9.102  #endif
   9.103  
   9.104          /* Switch page tables. */
   9.105 @@ -738,15 +738,15 @@ void switch_to(struct exec_domain *prev_
   9.106                next_p->arch.user_ctxt.gs_base_app>>32);
   9.107  
   9.108      /* If in guest-OS mode, switch the GS bases around. */
   9.109 -    if ( next_p->arch.flags & TF_guestos_mode )
   9.110 +    if ( next_p->arch.flags & TF_kernel_mode )
   9.111          __asm__ __volatile__ ( "swapgs" );
   9.112  
   9.113      if ( unlikely(!all_segs_okay) )
   9.114      {
   9.115          unsigned long *rsp =
   9.116 -            (next_p->arch.flags & TF_guestos_mode) ?
   9.117 +            (next_p->arch.flags & TF_kernel_mode) ?
   9.118              (unsigned long *)stack_ec->rsp : 
   9.119 -            (unsigned long *)next_p->arch.guestos_sp;
   9.120 +            (unsigned long *)next_p->arch.kernel_sp;
   9.121  
   9.122          if ( put_user(stack_ec->ss,     rsp- 1) |
   9.123               put_user(stack_ec->rsp,    rsp- 2) |
   9.124 @@ -764,9 +764,9 @@ void switch_to(struct exec_domain *prev_
   9.125              domain_crash();
   9.126          }
   9.127  
   9.128 -        if ( !(next_p->arch.flags & TF_guestos_mode) )
   9.129 +        if ( !(next_p->arch.flags & TF_kernel_mode) )
   9.130          {
   9.131 -            next_p->arch.flags |= TF_guestos_mode;
   9.132 +            next_p->arch.flags |= TF_kernel_mode;
   9.133              __asm__ __volatile__ ( "swapgs" );
   9.134              /* XXX switch page tables XXX */
   9.135          }
    10.1 --- a/xen/arch/x86/traps.c	Wed Feb 09 16:24:23 2005 +0000
    10.2 +++ b/xen/arch/x86/traps.c	Wed Feb 09 17:14:35 2005 +0000
    10.3 @@ -522,7 +522,7 @@ asmlinkage int do_general_protection(str
    10.4  
    10.5      /* Emulate some simple privileged instructions when exec'ed in ring 1. */
    10.6      if ( (regs->error_code == 0) &&
    10.7 -         GUESTOS_MODE(ed, regs) &&
    10.8 +         KERNEL_MODE(ed, regs) &&
    10.9           emulate_privileged_op(regs) )
   10.10          return 0;
   10.11  
    11.1 --- a/xen/arch/x86/vmx_vmcs.c	Wed Feb 09 16:24:23 2005 +0000
    11.2 +++ b/xen/arch/x86/vmx_vmcs.c	Wed Feb 09 17:14:35 2005 +0000
    11.3 @@ -317,7 +317,7 @@ construct_init_vmcs_guest(execution_cont
    11.4      shadow_cr = host_env->cr0;
    11.5      shadow_cr &= ~(X86_CR0_PE | X86_CR0_PG);
    11.6      error |= __vmwrite(CR0_READ_SHADOW, shadow_cr);
    11.7 -    /* CR3 is set in vmx_final_setup_guestos */
    11.8 +    /* CR3 is set in vmx_final_setup_guest */
    11.9      error |= __vmwrite(GUEST_CR4, host_env->cr4);
   11.10      shadow_cr = host_env->cr4;
   11.11      shadow_cr &= ~(X86_CR4_PGE | X86_CR4_VMXE);
    12.1 --- a/xen/arch/x86/x86_32/domain_build.c	Wed Feb 09 16:24:23 2005 +0000
    12.2 +++ b/xen/arch/x86/x86_32/domain_build.c	Wed Feb 09 17:14:35 2005 +0000
    12.3 @@ -218,11 +218,11 @@ int construct_dom0(struct domain *d,
    12.4       * We're basically forcing default RPLs to 1, so that our "what privilege
    12.5       * level are we returning to?" logic works.
    12.6       */
    12.7 -    ed->arch.failsafe_selector = FLAT_GUESTOS_CS;
    12.8 -    ed->arch.event_selector    = FLAT_GUESTOS_CS;
    12.9 -    ed->arch.guestos_ss = FLAT_GUESTOS_SS;
   12.10 +    ed->arch.failsafe_selector = FLAT_KERNEL_CS;
   12.11 +    ed->arch.event_selector    = FLAT_KERNEL_CS;
   12.12 +    ed->arch.kernel_ss = FLAT_KERNEL_SS;
   12.13      for ( i = 0; i < 256; i++ ) 
   12.14 -        ed->arch.traps[i].cs = FLAT_GUESTOS_CS;
   12.15 +        ed->arch.traps[i].cs = FLAT_KERNEL_CS;
   12.16  
   12.17      /* WARNING: The new domain must have its 'processor' field filled in! */
   12.18      l2start = l2tab = (l2_pgentry_t *)mpt_alloc; mpt_alloc += PAGE_SIZE;
    13.1 --- a/xen/arch/x86/x86_32/mm.c	Wed Feb 09 16:24:23 2005 +0000
    13.2 +++ b/xen/arch/x86/x86_32/mm.c	Wed Feb 09 17:14:35 2005 +0000
    13.3 @@ -202,8 +202,8 @@ long do_stack_switch(unsigned long ss, u
    13.4      if ( (ss & 3) == 0 )
    13.5          return -EPERM;
    13.6  
    13.7 -    current->arch.guestos_ss = ss;
    13.8 -    current->arch.guestos_sp = esp;
    13.9 +    current->arch.kernel_ss = ss;
   13.10 +    current->arch.kernel_sp = esp;
   13.11      t->ss1  = ss;
   13.12      t->esp1 = esp;
   13.13  
   13.14 @@ -224,7 +224,7 @@ int check_descriptor(struct desc_struct 
   13.15      /*
   13.16       * We don't allow a DPL of zero. There is no legitimate reason for 
   13.17       * specifying DPL==0, and it gets rather dangerous if we also accept call 
   13.18 -     * gates (consider a call gate pointing at another guestos descriptor with 
   13.19 +     * gates (consider a call gate pointing at another kernel descriptor with 
   13.20       * DPL 0 -- this would get the OS ring-0 privileges).
   13.21       */
   13.22      if ( (b & _SEGMENT_DPL) == 0 )
    14.1 --- a/xen/arch/x86/x86_64/asm-offsets.c	Wed Feb 09 16:24:23 2005 +0000
    14.2 +++ b/xen/arch/x86/x86_64/asm-offsets.c	Wed Feb 09 17:14:35 2005 +0000
    14.3 @@ -49,7 +49,7 @@ void __dummy__(void)
    14.4      OFFSET(EDOMAIN_failsafe_addr, struct exec_domain, arch.failsafe_address);
    14.5      OFFSET(EDOMAIN_trap_bounce, struct exec_domain, arch.trap_bounce);
    14.6      OFFSET(EDOMAIN_thread_flags, struct exec_domain, arch.flags);
    14.7 -    OFFSET(EDOMAIN_guestos_sp, struct exec_domain, arch.guestos_sp);
    14.8 +    OFFSET(EDOMAIN_kernel_sp, struct exec_domain, arch.kernel_sp);
    14.9      BLANK();
   14.10  
   14.11      OFFSET(VCPUINFO_upcall_pending, vcpu_info_t, evtchn_upcall_pending);
    15.1 --- a/xen/arch/x86/x86_64/domain_build.c	Wed Feb 09 16:24:23 2005 +0000
    15.2 +++ b/xen/arch/x86/x86_64/domain_build.c	Wed Feb 09 17:14:35 2005 +0000
    15.3 @@ -225,11 +225,11 @@ int construct_dom0(struct domain *d,
    15.4       * We're basically forcing default RPLs to 1, so that our "what privilege
    15.5       * level are we returning to?" logic works.
    15.6       */
    15.7 -    ed->arch.failsafe_selector = FLAT_GUESTOS_CS;
    15.8 -    ed->arch.event_selector    = FLAT_GUESTOS_CS;
    15.9 -    ed->arch.guestos_ss = FLAT_GUESTOS_SS;
   15.10 +    ed->arch.failsafe_selector = FLAT_KERNEL_CS;
   15.11 +    ed->arch.event_selector    = FLAT_KERNEL_CS;
   15.12 +    ed->arch.kernel_ss = FLAT_KERNEL_SS;
   15.13      for ( i = 0; i < 256; i++ ) 
   15.14 -        ed->arch.traps[i].cs = FLAT_GUESTOS_CS;
   15.15 +        ed->arch.traps[i].cs = FLAT_KERNEL_CS;
   15.16  
   15.17      /* WARNING: The new domain must have its 'processor' field filled in! */
   15.18      phys_to_page(mpt_alloc)->u.inuse.type_info = PGT_l4_page_table;
    16.1 --- a/xen/arch/x86/x86_64/entry.S	Wed Feb 09 16:24:23 2005 +0000
    16.2 +++ b/xen/arch/x86/x86_64/entry.S	Wed Feb 09 17:14:35 2005 +0000
    16.3 @@ -152,10 +152,10 @@ process_softirqs:
    16.4  create_bounce_frame:
    16.5          /* Push new frame at existing %rsp if already in guest-OS mode. */
    16.6          movq  XREGS_rsp+8(%rsp),%rsi
    16.7 -        testb $TF_guestos_mode,EDOMAIN_thread_flags(%rbx)
    16.8 +        testb $TF_kernel_mode,EDOMAIN_thread_flags(%rbx)
    16.9          jnz   1f
   16.10          /* Push new frame at registered guest-OS stack top. */
   16.11 -        movq  EDOMAIN_guestos_sp(%rbx),%rsi
   16.12 +        movq  EDOMAIN_kernel_sp(%rbx),%rsi
   16.13  1:      movq  $HYPERVISOR_VIRT_START,%rax
   16.14          cmpq  %rax,%rsi
   16.15          jb    1f                        # In +ve address space? Then okay.
   16.16 @@ -203,9 +203,9 @@ FLT15:  movq  %rax,(%rsi)               
   16.17          /* Rewrite our stack frame and return to guest-OS mode. */
   16.18          /* IA32 Ref. Vol. 3: TF, VM, RF and NT flags are cleared on trap. */
   16.19          movb  $0,TRAPBOUNCE_flags(%rdx)
   16.20 -        testb $TF_guestos_mode,EDOMAIN_thread_flags(%rbx)
   16.21 +        testb $TF_kernel_mode,EDOMAIN_thread_flags(%rbx)
   16.22          jnz   1f
   16.23 -        orb   $TF_guestos_mode,EDOMAIN_thread_flags(%rbx)
   16.24 +        orb   $TF_kernel_mode,EDOMAIN_thread_flags(%rbx)
   16.25          swapgs
   16.26          /* XXX switch page tables XXX */
   16.27  1:      movl  $TRAP_syscall,XREGS_entry_vector+8(%rsp)
    17.1 --- a/xen/arch/x86/x86_64/mm.c	Wed Feb 09 16:24:23 2005 +0000
    17.2 +++ b/xen/arch/x86/x86_64/mm.c	Wed Feb 09 17:14:35 2005 +0000
    17.3 @@ -233,8 +233,8 @@ long do_stack_switch(unsigned long ss, u
    17.4  {
    17.5      if ( (ss & 3) != 3 )
    17.6          return -EPERM;
    17.7 -    current->arch.guestos_ss = ss;
    17.8 -    current->arch.guestos_sp = esp;
    17.9 +    current->arch.kernel_ss = ss;
   17.10 +    current->arch.kernel_sp = esp;
   17.11      return 0;
   17.12  }
   17.13  
    18.1 --- a/xen/common/dom0_ops.c	Wed Feb 09 16:24:23 2005 +0000
    18.2 +++ b/xen/common/dom0_ops.c	Wed Feb 09 17:14:35 2005 +0000
    18.3 @@ -118,7 +118,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
    18.4          ret = -EINVAL;
    18.5          if ( d != NULL )
    18.6          {
    18.7 -            ret = final_setup_guestos(d, &op->u.builddomain);
    18.8 +            ret = final_setup_guest(d, &op->u.builddomain);
    18.9              put_domain(d);
   18.10          }
   18.11      }
    19.1 --- a/xen/common/domain.c	Wed Feb 09 16:24:23 2005 +0000
    19.2 +++ b/xen/common/domain.c	Wed Feb 09 17:14:35 2005 +0000
    19.3 @@ -254,11 +254,11 @@ void domain_destruct(struct domain *d)
    19.4  
    19.5  
    19.6  /*
    19.7 - * final_setup_guestos is used for final setup and launching of domains other
    19.8 + * final_setup_guest is used for final setup and launching of domains other
    19.9   * than domain 0. ie. the domains that are being built by the userspace dom0
   19.10   * domain builder.
   19.11   */
   19.12 -int final_setup_guestos(struct domain *p, dom0_builddomain_t *builddomain)
   19.13 +int final_setup_guest(struct domain *p, dom0_builddomain_t *builddomain)
   19.14  {
   19.15      int rc = 0;
   19.16      full_execution_context_t *c;
   19.17 @@ -278,7 +278,7 @@ int final_setup_guestos(struct domain *p
   19.18          goto out;
   19.19      }
   19.20      
   19.21 -    if ( (rc = arch_final_setup_guestos(p->exec_domain[0],c)) != 0 )
   19.22 +    if ( (rc = arch_final_setup_guest(p->exec_domain[0],c)) != 0 )
   19.23          goto out;
   19.24  
   19.25      /* Set up the shared info structure. */
   19.26 @@ -293,7 +293,7 @@ int final_setup_guestos(struct domain *p
   19.27  }
   19.28  
   19.29  /*
   19.30 - * final_setup_guestos is used for final setup and launching of domains other
   19.31 + * final_setup_guest is used for final setup and launching of domains other
   19.32   * than domain 0. ie. the domains that are being built by the userspace dom0
   19.33   * domain builder.
   19.34   */
   19.35 @@ -333,7 +333,7 @@ long do_boot_vcpu(unsigned long vcpu, fu
   19.36  
   19.37      sched_add_domain(ed);
   19.38  
   19.39 -    if ( (rc = arch_final_setup_guestos(ed, c)) != 0 ) {
   19.40 +    if ( (rc = arch_final_setup_guest(ed, c)) != 0 ) {
   19.41          sched_rem_domain(ed);
   19.42          goto out;
   19.43      }
    20.1 --- a/xen/include/asm-x86/desc.h	Wed Feb 09 16:24:23 2005 +0000
    20.2 +++ b/xen/include/asm-x86/desc.h	Wed Feb 09 17:14:35 2005 +0000
    20.3 @@ -18,7 +18,7 @@
    20.4        (((_s)>>3) >  LAST_RESERVED_GDT_ENTRY) ||                            \
    20.5        ((_s)&4)) &&                                                         \
    20.6       (((_s)&3) == 1))
    20.7 -#define VALID_CODESEL(_s) ((_s) == FLAT_GUESTOS_CS || VALID_SEL(_s))
    20.8 +#define VALID_CODESEL(_s) ((_s) == FLAT_KERNEL_CS || VALID_SEL(_s))
    20.9  
   20.10  /* These are bitmasks for the high 32 bits of a descriptor table entry. */
   20.11  #define _SEGMENT_TYPE    (15<< 8)
    21.1 --- a/xen/include/asm-x86/domain.h	Wed Feb 09 16:24:23 2005 +0000
    21.2 +++ b/xen/include/asm-x86/domain.h	Wed Feb 09 17:14:35 2005 +0000
    21.3 @@ -45,8 +45,8 @@ struct arch_domain
    21.4  
    21.5  struct arch_exec_domain
    21.6  {
    21.7 -    unsigned long      guestos_sp;
    21.8 -    unsigned long      guestos_ss;
    21.9 +    unsigned long      kernel_sp;
   21.10 +    unsigned long      kernel_ss;
   21.11  
   21.12      unsigned long      flags; /* TF_ */
   21.13  
    22.1 --- a/xen/include/asm-x86/processor.h	Wed Feb 09 16:24:23 2005 +0000
    22.2 +++ b/xen/include/asm-x86/processor.h	Wed Feb 09 17:14:35 2005 +0000
    22.3 @@ -131,7 +131,7 @@
    22.4  
    22.5  /* arch_exec_domain' flags values */
    22.6  #define TF_failsafe_return     1
    22.7 -#define TF_guestos_mode        2
    22.8 +#define TF_kernel_mode        2
    22.9  
   22.10  #ifndef __ASSEMBLY__
   22.11  
    23.1 --- a/xen/include/asm-x86/x86_32/regs.h	Wed Feb 09 16:24:23 2005 +0000
    23.2 +++ b/xen/include/asm-x86/x86_32/regs.h	Wed Feb 09 17:14:35 2005 +0000
    23.3 @@ -10,6 +10,6 @@
    23.4  #define RING_2(_r)    (((_r)->cs & 3) == 2)
    23.5  #define RING_3(_r)    (((_r)->cs & 3) == 3)
    23.6  
    23.7 -#define GUESTOS_MODE(_e, _r) (!VM86_MODE(_r) && RING_1(_r))
    23.8 +#define KERNEL_MODE(_e, _r) (!VM86_MODE(_r) && RING_1(_r))
    23.9  
   23.10  #endif
    24.1 --- a/xen/include/asm-x86/x86_64/regs.h	Wed Feb 09 16:24:23 2005 +0000
    24.2 +++ b/xen/include/asm-x86/x86_64/regs.h	Wed Feb 09 17:14:35 2005 +0000
    24.3 @@ -10,6 +10,6 @@
    24.4  #define RING_2(_r)    (((_r)->cs & 3) == 2)
    24.5  #define RING_3(_r)    (((_r)->cs & 3) == 3)
    24.6  
    24.7 -#define GUESTOS_MODE(_e, _r) ((_e)->arch.flags & TF_guestos_mode)
    24.8 +#define KERNEL_MODE(_e, _r) ((_e)->arch.flags & TF_kernel_mode)
    24.9  
   24.10  #endif
    25.1 --- a/xen/include/public/arch-x86_32.h	Wed Feb 09 16:24:23 2005 +0000
    25.2 +++ b/xen/include/public/arch-x86_32.h	Wed Feb 09 17:14:35 2005 +0000
    25.3 @@ -54,9 +54,9 @@
    25.4  #define FLAT_RING3_DS 0x0833    /* GDT index 262 */
    25.5  #define FLAT_RING3_SS 0x0833    /* GDT index 262 */
    25.6  
    25.7 -#define FLAT_GUESTOS_CS FLAT_RING1_CS
    25.8 -#define FLAT_GUESTOS_DS FLAT_RING1_DS
    25.9 -#define FLAT_GUESTOS_SS FLAT_RING1_SS
   25.10 +#define FLAT_KERNEL_CS FLAT_RING1_CS
   25.11 +#define FLAT_KERNEL_DS FLAT_RING1_DS
   25.12 +#define FLAT_KERNEL_SS FLAT_RING1_SS
   25.13  #define FLAT_USER_CS    FLAT_RING3_CS
   25.14  #define FLAT_USER_DS    FLAT_RING3_DS
   25.15  #define FLAT_USER_SS    FLAT_RING3_SS
   25.16 @@ -133,7 +133,7 @@ typedef u64 tsc_timestamp_t; /* RDTSC ti
   25.17  typedef struct {
   25.18  #define ECF_I387_VALID (1<<0)
   25.19  #define ECF_VMX_GUEST  (1<<1)
   25.20 -#define ECF_IN_GUESTOS (1<<2)
   25.21 +#define ECF_IN_KERNEL (1<<2)
   25.22      unsigned long flags;
   25.23      execution_context_t cpu_ctxt;           /* User-level CPU registers     */
   25.24      char          fpu_ctxt[256];            /* User-level FPU registers     */
   25.25 @@ -141,7 +141,7 @@ typedef struct {
   25.26      unsigned int  fast_trap_idx;            /* "Fast trap" vector offset    */
   25.27      unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
   25.28      unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
   25.29 -    unsigned long guestos_ss, guestos_esp;  /* Virtual TSS (only SS1/ESP1)  */
   25.30 +    unsigned long kernel_ss, kernel_esp;  /* Virtual TSS (only SS1/ESP1)  */
   25.31      unsigned long pt_base;                  /* CR3 (pagetable base)         */
   25.32      unsigned long debugreg[8];              /* DB0-DB7 (debug registers)    */
   25.33      unsigned long event_callback_cs;        /* CS:EIP of event callback     */
    26.1 --- a/xen/include/public/arch-x86_64.h	Wed Feb 09 16:24:23 2005 +0000
    26.2 +++ b/xen/include/public/arch-x86_64.h	Wed Feb 09 17:14:35 2005 +0000
    26.3 @@ -49,15 +49,15 @@
    26.4  #define FLAT_RING3_SS32 0x082b  /* GDT index 262 */
    26.5  #define FLAT_RING3_SS64 0x082b  /* GDT index 262 */
    26.6  
    26.7 -#define FLAT_GUESTOS_DS64 FLAT_RING3_DS64
    26.8 -#define FLAT_GUESTOS_DS32 FLAT_RING3_DS32
    26.9 -#define FLAT_GUESTOS_DS   FLAT_GUESTOS_DS64
   26.10 -#define FLAT_GUESTOS_CS64 FLAT_RING3_CS64
   26.11 -#define FLAT_GUESTOS_CS32 FLAT_RING3_CS32
   26.12 -#define FLAT_GUESTOS_CS   FLAT_GUESTOS_CS64
   26.13 -#define FLAT_GUESTOS_SS64 FLAT_RING3_SS64
   26.14 -#define FLAT_GUESTOS_SS32 FLAT_RING3_SS32
   26.15 -#define FLAT_GUESTOS_SS   FLAT_GUESTOS_SS64
   26.16 +#define FLAT_KERNEL_DS64 FLAT_RING3_DS64
   26.17 +#define FLAT_KERNEL_DS32 FLAT_RING3_DS32
   26.18 +#define FLAT_KERNEL_DS   FLAT_KERNEL_DS64
   26.19 +#define FLAT_KERNEL_CS64 FLAT_RING3_CS64
   26.20 +#define FLAT_KERNEL_CS32 FLAT_RING3_CS32
   26.21 +#define FLAT_KERNEL_CS   FLAT_KERNEL_CS64
   26.22 +#define FLAT_KERNEL_SS64 FLAT_RING3_SS64
   26.23 +#define FLAT_KERNEL_SS32 FLAT_RING3_SS32
   26.24 +#define FLAT_KERNEL_SS   FLAT_KERNEL_SS64
   26.25  
   26.26  #define FLAT_USER_DS64 FLAT_RING3_DS64
   26.27  #define FLAT_USER_DS32 FLAT_RING3_DS32
   26.28 @@ -149,14 +149,14 @@ typedef u64 tsc_timestamp_t; /* RDTSC ti
   26.29  typedef struct {
   26.30  #define ECF_I387_VALID (1<<0)
   26.31  #define ECF_VMX_GUEST  (1<<1)
   26.32 -#define ECF_IN_GUESTOS (1<<2)
   26.33 +#define ECF_IN_KERNEL (1<<2)
   26.34      unsigned long flags;
   26.35      execution_context_t cpu_ctxt;           /* User-level CPU registers     */
   26.36      char          fpu_ctxt[512];            /* User-level FPU registers     */
   26.37      trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
   26.38      unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
   26.39      unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
   26.40 -    unsigned long guestos_ss, guestos_esp;  /* Virtual TSS (only SS1/ESP1)  */
   26.41 +    unsigned long kernel_ss, kernel_esp;  /* Virtual TSS (only SS1/ESP1)  */
   26.42      unsigned long pt_base;                  /* CR3 (pagetable base)         */
   26.43      unsigned long debugreg[8];              /* DB0-DB7 (debug registers)    */
   26.44      unsigned long event_callback_cs;        /* CS:EIP of event callback     */
    27.1 --- a/xen/include/public/xen.h	Wed Feb 09 16:24:23 2005 +0000
    27.2 +++ b/xen/include/public/xen.h	Wed Feb 09 17:14:35 2005 +0000
    27.3 @@ -299,7 +299,7 @@ typedef struct
    27.4  } PACKED vcpu_info_t;                   /* 8 + arch */
    27.5  
    27.6  /*
    27.7 - * Xen/guestos shared data -- pointer provided in start_info.
    27.8 + * Xen/kernel shared data -- pointer provided in start_info.
    27.9   * NB. We expect that this struct is smaller than a page.
   27.10   */
   27.11  typedef struct shared_info_st
    28.1 --- a/xen/include/xen/domain.h	Wed Feb 09 16:24:23 2005 +0000
    28.2 +++ b/xen/include/xen/domain.h	Wed Feb 09 17:14:35 2005 +0000
    28.3 @@ -18,7 +18,7 @@ extern void arch_do_createdomain(struct 
    28.4  
    28.5  extern void arch_do_boot_vcpu(struct exec_domain *ed);
    28.6  
    28.7 -extern int  arch_final_setup_guestos(
    28.8 +extern int  arch_final_setup_guest(
    28.9      struct exec_domain *d, full_execution_context_t *c);
   28.10  
   28.11  extern void free_perdomain_pt(struct domain *d);
    29.1 --- a/xen/include/xen/sched.h	Wed Feb 09 16:24:23 2005 +0000
    29.2 +++ b/xen/include/xen/sched.h	Wed Feb 09 17:14:35 2005 +0000
    29.3 @@ -222,7 +222,7 @@ extern int construct_dom0(struct domain 
    29.4                            unsigned long image_start, unsigned long image_len, 
    29.5                            unsigned long initrd_start, unsigned long initrd_len,
    29.6                            char *cmdline);
    29.7 -extern int final_setup_guestos(struct domain *d, dom0_builddomain_t *);
    29.8 +extern int final_setup_guest(struct domain *d, dom0_builddomain_t *);
    29.9  
   29.10  struct domain *find_domain_by_id(domid_t dom);
   29.11  struct domain *find_last_domain(void);