ia64/xen-unstable

changeset 879:18d30acdfb3e

bitkeeper revision 1.550 (3fa62d1fweoECOoyEeNP4Duqo5Btxw)

Many files:
More cleanups and renaming for suspend/resume.
author kaf24@scramble.cl.cam.ac.uk
date Mon Nov 03 10:25:35 2003 +0000 (2003-11-03)
parents 61c3759bc7be
children 0d9e340b7374
files tools/internal/xi_build.c tools/internal/xi_create.c tools/internal/xi_destroy.c tools/internal/xi_list.c tools/internal/xi_usage.c tools/misc/xen_log.c xen/arch/i386/smpboot.c xen/common/dom0_ops.c xen/common/domain.c xen/common/kernel.c xen/include/asm-i386/processor.h xen/include/hypervisor-ifs/dom0_ops.h xen/include/xeno/sched.h
line diff
     1.1 --- a/tools/internal/xi_build.c	Sat Nov 01 16:39:33 2003 +0000
     1.2 +++ b/tools/internal/xi_build.c	Mon Nov 03 10:25:35 2003 +0000
     1.3 @@ -15,8 +15,8 @@ static long get_tot_pages(int domain_id)
     1.4  {
     1.5      dom0_op_t op;
     1.6      op.cmd = DOM0_GETDOMAININFO;
     1.7 -    op.u.getdominfo.domain = domain_id;
     1.8 -    return (do_dom0_op(&op) < 0) ? -1 : op.u.getdominfo.tot_pages;
     1.9 +    op.u.getdomaininfo.domain = domain_id;
    1.10 +    return (do_dom0_op(&op) < 0) ? -1 : op.u.getdomaininfo.tot_pages;
    1.11  }
    1.12  
    1.13  static int get_pfn_list(
     2.1 --- a/tools/internal/xi_create.c	Sat Nov 01 16:39:33 2003 +0000
     2.2 +++ b/tools/internal/xi_create.c	Mon Nov 03 10:25:35 2003 +0000
     2.3 @@ -15,13 +15,13 @@ static int create_new_domain(long req_me
     2.4      dom0_op_t op;
     2.5  
     2.6      op.cmd = DOM0_CREATEDOMAIN;
     2.7 -    op.u.newdomain.memory_kb = req_mem;
     2.8 -    strncpy(op.u.newdomain.name, name, MAX_DOMAIN_NAME);
     2.9 -    op.u.newdomain.name[MAX_DOMAIN_NAME-1] = '\0';
    2.10 +    op.u.createdomain.memory_kb = req_mem;
    2.11 +    strncpy(op.u.createdomain.name, name, MAX_DOMAIN_NAME);
    2.12 +    op.u.createdomain.name[MAX_DOMAIN_NAME-1] = '\0';
    2.13  
    2.14      err = do_dom0_op(&op);
    2.15  
    2.16 -    return (err < 0) ? err : op.u.newdomain.domain;
    2.17 +    return (err < 0) ? err : op.u.createdomain.domain;
    2.18  }    
    2.19  
    2.20  int main(int argc, char **argv)
     3.1 --- a/tools/internal/xi_destroy.c	Sat Nov 01 16:39:33 2003 +0000
     3.2 +++ b/tools/internal/xi_destroy.c	Mon Nov 03 10:25:35 2003 +0000
     3.3 @@ -10,8 +10,8 @@ static int kill_domain(int dom_id, int f
     3.4      dom0_op_t op;
     3.5  
     3.6      op.cmd = DOM0_DESTROYDOMAIN;
     3.7 -    op.u.killdomain.domain = dom_id;
     3.8 -    op.u.killdomain.force  = force;
     3.9 +    op.u.destroydomain.domain = dom_id;
    3.10 +    op.u.destroydomain.force  = force;
    3.11  
    3.12      err = do_dom0_op(&op);
    3.13  
     4.1 --- a/tools/internal/xi_list.c	Sat Nov 01 16:39:33 2003 +0000
     4.2 +++ b/tools/internal/xi_list.c	Mon Nov 03 10:25:35 2003 +0000
     4.3 @@ -55,20 +55,20 @@ int main(int argc, char **argv)
     4.4      }
     4.5  
     4.6      op.cmd = DOM0_GETDOMAININFO;
     4.7 -    op.u.getdominfo.domain = 0;
     4.8 +    op.u.getdomaininfo.domain = 0;
     4.9      while ( do_dom0_op(&op) >= 0 )
    4.10      {
    4.11          printf("%8d %2d %1d %2d %s %08x %8ld %8d %s\n",
    4.12 -               op.u.getdominfo.domain, 
    4.13 -               op.u.getdominfo.processor,
    4.14 -               op.u.getdominfo.has_cpu,
    4.15 -               op.u.getdominfo.state,
    4.16 -               statestr(op.u.getdominfo.state),
    4.17 -               op.u.getdominfo.hyp_events,
    4.18 -               op.u.getdominfo.mcu_advance,
    4.19 -               op.u.getdominfo.tot_pages,
    4.20 -               op.u.getdominfo.name);
    4.21 -        op.u.getdominfo.domain++;
    4.22 +               op.u.getdomaininfo.domain, 
    4.23 +               op.u.getdomaininfo.processor,
    4.24 +               op.u.getdomaininfo.has_cpu,
    4.25 +               op.u.getdomaininfo.state,
    4.26 +               statestr(op.u.getdomaininfo.state),
    4.27 +               op.u.getdomaininfo.hyp_events,
    4.28 +               op.u.getdomaininfo.mcu_advance,
    4.29 +               op.u.getdomaininfo.tot_pages,
    4.30 +               op.u.getdomaininfo.name);
    4.31 +        op.u.getdomaininfo.domain++;
    4.32      }
    4.33  
    4.34      return 0;
     5.1 --- a/tools/internal/xi_usage.c	Sat Nov 01 16:39:33 2003 +0000
     5.2 +++ b/tools/internal/xi_usage.c	Mon Nov 03 10:25:35 2003 +0000
     5.3 @@ -22,13 +22,13 @@ int main(int argc, char **argv)
     5.4      domain = atol(argv[1]);
     5.5  
     5.6      op.cmd                 = DOM0_GETDOMAININFO;
     5.7 -    op.u.getdominfo.domain = domain;
     5.8 +    op.u.getdomaininfo.domain = domain;
     5.9      if ( do_dom0_op(&op) < 0 )
    5.10          return 1;
    5.11  
    5.12      printf("cpu%d: %lld\n", 
    5.13 -           op.u.getdominfo.processor,
    5.14 -           op.u.getdominfo.cpu_time);
    5.15 +           op.u.getdomaininfo.processor,
    5.16 +           op.u.getdomaininfo.cpu_time);
    5.17  
    5.18      if ( mlock(vifs, sizeof(vifs)) != 0 )
    5.19      {
     6.1 --- a/tools/misc/xen_log.c	Sat Nov 01 16:39:33 2003 +0000
     6.2 +++ b/tools/misc/xen_log.c	Mon Nov 03 10:25:35 2003 +0000
     6.3 @@ -85,14 +85,14 @@ void process(void)
     6.4          curport = ntohs(from.sin_port);
     6.5          if ( lastport != curport )
     6.6          {
     6.7 -            op.u.getdominfo.domain = (int)curport;
     6.8 +            op.u.getdomaininfo.domain = (int)curport;
     6.9              if ( do_dom0_op(&op) < 0 )
    6.10                  log("Error resolving domain name\n");
    6.11              else
    6.12                  lastport = curport;
    6.13          }
    6.14  
    6.15 -        sprintf(obuf, "[%s] %s", op.u.getdominfo.name, buf);
    6.16 +        sprintf(obuf, "[%s] %s", op.u.getdomaininfo.name, buf);
    6.17          log(obuf);
    6.18  
    6.19          fromlen = sizeof(from);
     7.1 --- a/xen/arch/i386/smpboot.c	Sat Nov 01 16:39:33 2003 +0000
     7.2 +++ b/xen/arch/i386/smpboot.c	Mon Nov 03 10:25:35 2003 +0000
     7.3 @@ -669,8 +669,8 @@ static void __init do_boot_cpu (int apic
     7.4  
     7.5      cpu = ++cpucount;
     7.6  
     7.7 -    if ( (idle = do_newdomain(IDLE_DOMAIN_ID, cpu)) == NULL )
     7.8 -        panic("failed 'newdomain' for CPU %d", cpu);
     7.9 +    if ( (idle = do_createdomain(IDLE_DOMAIN_ID, cpu)) == NULL )
    7.10 +        panic("failed 'createdomain' for CPU %d", cpu);
    7.11   
    7.12      idle->mm.pagetable = mk_pagetable(__pa(idle_pg_table));
    7.13  
     8.1 --- a/xen/common/dom0_ops.c	Sat Nov 01 16:39:33 2003 +0000
     8.2 +++ b/xen/common/dom0_ops.c	Mon Nov 03 10:25:35 2003 +0000
     8.3 @@ -144,17 +144,17 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
     8.4              goto exit_create;
     8.5  
     8.6          pro = (pro+1) % smp_num_cpus;
     8.7 -        p = do_newdomain(dom, pro);
     8.8 +        p = do_createdomain(dom, pro);
     8.9          if ( p == NULL ) 
    8.10              goto exit_create;
    8.11  
    8.12 -	if ( op.u.newdomain.name[0] )
    8.13 +	if ( op.u.createdomain.name[0] )
    8.14          {
    8.15 -            strncpy (p->name, op.u.newdomain.name, MAX_DOMAIN_NAME);
    8.16 +            strncpy (p->name, op.u.createdomain.name, MAX_DOMAIN_NAME);
    8.17              p->name[MAX_DOMAIN_NAME - 1] = 0;
    8.18  	}
    8.19  
    8.20 -        ret = alloc_new_dom_mem(p, op.u.newdomain.memory_kb);
    8.21 +        ret = alloc_new_dom_mem(p, op.u.createdomain.memory_kb);
    8.22          if ( ret != 0 ) 
    8.23          {
    8.24              __kill_domain(p);
    8.25 @@ -165,7 +165,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
    8.26          
    8.27          ret = p->domain;
    8.28          
    8.29 -        op.u.newdomain.domain = ret;
    8.30 +        op.u.createdomain.domain = ret;
    8.31          copy_to_user(u_dom0_op, &op, sizeof(op));
    8.32   
    8.33      exit_create:
    8.34 @@ -175,8 +175,8 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
    8.35  
    8.36      case DOM0_DESTROYDOMAIN:
    8.37      {
    8.38 -        unsigned int dom = op.u.killdomain.domain;
    8.39 -        int force = op.u.killdomain.force;
    8.40 +        unsigned int dom = op.u.destroydomain.domain;
    8.41 +        int force = op.u.destroydomain.force;
    8.42          ret = (dom == IDLE_DOMAIN_ID) ? -EPERM : kill_other_domain(dom, force);
    8.43      }
    8.44      break;
    8.45 @@ -250,7 +250,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
    8.46          read_lock_irqsave (&tasklist_lock, flags);
    8.47  
    8.48          while ( (p = p->next_task) != &idle0_task )
    8.49 -            if ( !is_idle_task(p) && (p->domain >= op.u.getdominfo.domain) )
    8.50 +            if ( !is_idle_task(p) && (p->domain >= op.u.getdomaininfo.domain) )
    8.51                  break;
    8.52  
    8.53          if ( p == &idle0_task )
    8.54 @@ -259,16 +259,16 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
    8.55          }
    8.56          else
    8.57          {
    8.58 -            op.u.getdominfo.domain      = p->domain;
    8.59 -            strcpy (op.u.getdominfo.name, p->name);
    8.60 -            op.u.getdominfo.processor   = p->processor;
    8.61 -            op.u.getdominfo.has_cpu     = p->has_cpu;
    8.62 -            op.u.getdominfo.state       = p->state;
    8.63 -            op.u.getdominfo.hyp_events  = p->hyp_events;
    8.64 -            op.u.getdominfo.mcu_advance = p->mcu_advance;
    8.65 -            op.u.getdominfo.tot_pages   = p->tot_pages;
    8.66 -            op.u.getdominfo.cpu_time    = p->cpu_time;
    8.67 -            memcpy(&op.u.getdominfo.ctxt, 
    8.68 +            op.u.getdomaininfo.domain      = p->domain;
    8.69 +            strcpy (op.u.getdomaininfo.name, p->name);
    8.70 +            op.u.getdomaininfo.processor   = p->processor;
    8.71 +            op.u.getdomaininfo.has_cpu     = p->has_cpu;
    8.72 +            op.u.getdomaininfo.state       = p->state;
    8.73 +            op.u.getdomaininfo.hyp_events  = p->hyp_events;
    8.74 +            op.u.getdomaininfo.mcu_advance = p->mcu_advance;
    8.75 +            op.u.getdomaininfo.tot_pages   = p->tot_pages;
    8.76 +            op.u.getdomaininfo.cpu_time    = p->cpu_time;
    8.77 +            memcpy(&op.u.getdomaininfo.ctxt, 
    8.78                     &p->shared_info->execution_context,
    8.79                     sizeof(execution_context_t));
    8.80          }
     9.1 --- a/xen/common/domain.c	Sat Nov 01 16:39:33 2003 +0000
     9.2 +++ b/xen/common/domain.c	Mon Nov 03 10:25:35 2003 +0000
     9.3 @@ -33,7 +33,7 @@ struct task_struct *task_hash[TASK_HASH_
     9.4  /*
     9.5   * create a new domain
     9.6   */
     9.7 -struct task_struct *do_newdomain(unsigned int dom_id, unsigned int cpu)
     9.8 +struct task_struct *do_createdomain(unsigned int dom_id, unsigned int cpu)
     9.9  {
    9.10      int retval, i;
    9.11      struct task_struct *p = NULL;
    9.12 @@ -441,7 +441,7 @@ static unsigned long alloc_page_from_dom
    9.13  /* setup_guestos is used for building dom0 solely. other domains are built in
    9.14   * userspace dom0 and final setup is being done by final_setup_guestos.
    9.15   */
    9.16 -int setup_guestos(struct task_struct *p, dom0_newdomain_t *params, 
    9.17 +int setup_guestos(struct task_struct *p, dom0_createdomain_t *params, 
    9.18                    unsigned int num_vifs,
    9.19                    char *phy_data_start, unsigned long data_len, 
    9.20  		  char *cmdline, unsigned long initrd_len)
    10.1 --- a/xen/common/kernel.c	Sat Nov 01 16:39:33 2003 +0000
    10.2 +++ b/xen/common/kernel.c	Mon Nov 03 10:25:35 2003 +0000
    10.3 @@ -92,7 +92,7 @@ static struct {
    10.4  void cmain (unsigned long magic, multiboot_info_t *mbi)
    10.5  {
    10.6      struct task_struct *new_dom;
    10.7 -    dom0_newdomain_t dom0_params;
    10.8 +    dom0_createdomain_t dom0_params;
    10.9      unsigned long max_page;
   10.10      unsigned char *cmdline;
   10.11      module_t *mod;
   10.12 @@ -190,7 +190,7 @@ void cmain (unsigned long magic, multibo
   10.13  
   10.14      init_page_allocator(__pa(&_end), MAX_MONITOR_ADDRESS);
   10.15   
   10.16 -    /* These things will get done by do_newdomain() for all other tasks. */
   10.17 +    /* These things will get done by do_createdomain() for all other tasks. */
   10.18      current->shared_info = (void *)get_free_page(GFP_KERNEL);
   10.19      memset(current->shared_info, 0, sizeof(shared_info_t));
   10.20      set_fs(USER_DS);
   10.21 @@ -209,7 +209,7 @@ void cmain (unsigned long magic, multibo
   10.22  
   10.23      /* Create initial domain 0. */
   10.24      dom0_params.memory_kb = opt_dom0_mem;
   10.25 -    new_dom = do_newdomain(0, 0);
   10.26 +    new_dom = do_createdomain(0, 0);
   10.27      if ( new_dom == NULL ) panic("Error creating domain 0\n");
   10.28  
   10.29      /*
    11.1 --- a/xen/include/asm-i386/processor.h	Sat Nov 01 16:39:33 2003 +0000
    11.2 +++ b/xen/include/asm-i386/processor.h	Mon Nov 03 10:25:35 2003 +0000
    11.3 @@ -294,7 +294,6 @@ struct i387_fsave_struct {
    11.4      long	foo;
    11.5      long	fos;
    11.6      long	st_space[20];	/* 8*10 bytes for each FP-reg = 80 bytes */
    11.7 -    long	status;		/* software status information */
    11.8  };
    11.9  
   11.10  struct i387_fxsave_struct {
   11.11 @@ -313,24 +312,9 @@ struct i387_fxsave_struct {
   11.12      long	padding[56];
   11.13  } __attribute__ ((aligned (16)));
   11.14  
   11.15 -struct i387_soft_struct {
   11.16 -    long	cwd;
   11.17 -    long	swd;
   11.18 -    long	twd;
   11.19 -    long	fip;
   11.20 -    long	fcs;
   11.21 -    long	foo;
   11.22 -    long	fos;
   11.23 -    long	st_space[20];	/* 8*10 bytes for each FP-reg = 80 bytes */
   11.24 -    unsigned char	ftop, changed, lookahead, no_update, rm, alimit;
   11.25 -    struct info	*info;
   11.26 -    unsigned long	entry_eip;
   11.27 -};
   11.28 -
   11.29  union i387_union {
   11.30      struct i387_fsave_struct	fsave;
   11.31      struct i387_fxsave_struct	fxsave;
   11.32 -    struct i387_soft_struct soft;
   11.33  };
   11.34  
   11.35  typedef struct {
   11.36 @@ -421,9 +405,32 @@ extern struct desc_struct *idt_tables[];
   11.37  	{~0, } /* ioperm */					\
   11.38  }
   11.39  
   11.40 -/* Forward declaration, a strange C thing */
   11.41 +struct mm_struct {
   11.42 +    /*
   11.43 +     * Every domain has a L1 pagetable of its own. Per-domain mappings
   11.44 +     * are put in this table (eg. the current GDT is mapped here).
   11.45 +     */
   11.46 +    l1_pgentry_t *perdomain_pt;
   11.47 +    pagetable_t  pagetable;
   11.48 +    /* Current LDT details. */
   11.49 +    unsigned long ldt_base, ldt_ents, shadow_ldt_mapcnt;
   11.50 +    /* Next entry is passed to LGDT on domain switch. */
   11.51 +    char gdt[6];
   11.52 +};
   11.53 +
   11.54 +#define IDLE0_MM                                                    \
   11.55 +{                                                                   \
   11.56 +    perdomain_pt: 0,                                                \
   11.57 +    pagetable:   mk_pagetable(__pa(idle_pg_table))                  \
   11.58 +}
   11.59 +
   11.60 +/* Convenient accessor for mm.gdt. */
   11.61 +#define SET_GDT_ENTRIES(_p, _e) ((*(u16 *)((_p)->mm.gdt + 0)) = (_e))
   11.62 +#define SET_GDT_ADDRESS(_p, _a) ((*(u32 *)((_p)->mm.gdt + 2)) = (_a))
   11.63 +#define GET_GDT_ENTRIES(_p)     ((*(u16 *)((_p)->mm.gdt + 0)))
   11.64 +#define GET_GDT_ADDRESS(_p)     ((*(u32 *)((_p)->mm.gdt + 2)))
   11.65 +
   11.66  struct task_struct;
   11.67 -struct mm_struct;
   11.68  
   11.69  /* Free all resources held by a thread. */
   11.70  extern void release_thread(struct task_struct *);
    12.1 --- a/xen/include/hypervisor-ifs/dom0_ops.h	Sat Nov 01 16:39:33 2003 +0000
    12.2 +++ b/xen/include/hypervisor-ifs/dom0_ops.h	Mon Nov 03 10:25:35 2003 +0000
    12.3 @@ -13,18 +13,35 @@
    12.4  #include "hypervisor-if.h"
    12.5  
    12.6  
    12.7 +/*
    12.8 + * The following is all CPU context. Note that the i387_ctxt block is filled 
    12.9 + * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
   12.10 + */
   12.11 +typedef struct full_execution_context_st
   12.12 +{
   12.13 +    execution_context_t i386_ctxt;          /* User-level CPU registers     */
   12.14 +    char          i387_ctxt[256];           /* User-level FPU registers     */
   12.15 +    trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
   12.16 +    unsigned int  fast_trap_idx;            /* "Fast trap" vector offset    */
   12.17 +    unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
   12.18 +    unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
   12.19 +    unsigned long ring1_ss, ring1_esp;      /* Virtual TSS (only SS1/ESP1)  */
   12.20 +    unsigned long pt_base;                  /* CR3 (pagetable base)         */
   12.21 +    unsigned long debugreg[8];              /* DB0-DB7 (debug registers)    */
   12.22 +} full_execution_context_t;
   12.23 +
   12.24  #define MAX_CMD_LEN       256
   12.25  #define MAX_DOMAIN_NAME    16
   12.26  
   12.27  #define DOM0_CREATEDOMAIN      8
   12.28 -typedef struct dom0_newdomain_st 
   12.29 +typedef struct dom0_createdomain_st 
   12.30  {
   12.31      /* IN parameters. */
   12.32      unsigned int memory_kb; 
   12.33      char name[MAX_DOMAIN_NAME];
   12.34      /* OUT parameters. */
   12.35      unsigned int domain; 
   12.36 -} dom0_newdomain_t;
   12.37 +} dom0_createdomain_t;
   12.38  
   12.39  #define DOM0_STARTDOMAIN      10
   12.40  typedef struct dom0_startdomain_st
   12.41 @@ -41,12 +58,12 @@ typedef struct dom0_stopdomain_st
   12.42  } dom0_stopdomain_t;
   12.43  
   12.44  #define DOM0_DESTROYDOMAIN     9
   12.45 -typedef struct dom0_killdomain_st
   12.46 +typedef struct dom0_destroydomain_st
   12.47  {
   12.48      /* IN variables. */
   12.49      unsigned int domain;
   12.50      int          force;
   12.51 -} dom0_killdomain_t;
   12.52 +} dom0_destroydomain_t;
   12.53  
   12.54  #define DOM0_GETMEMLIST        2
   12.55  typedef struct dom0_getmemlist_st
   12.56 @@ -71,7 +88,7 @@ typedef struct dom0_builddomain_st
   12.57      char cmd_line[MAX_CMD_LEN];
   12.58      unsigned long virt_mod_addr;
   12.59      unsigned long virt_mod_len;
   12.60 -    execution_context_t ctxt;
   12.61 +    full_execution_context_t ctxt;
   12.62  } dom0_builddomain_t;
   12.63  
   12.64  #define DOM0_BVTCTL            6
   12.65 @@ -93,7 +110,7 @@ typedef struct dom0_adjustdom_st
   12.66  } dom0_adjustdom_t;
   12.67  
   12.68  #define DOM0_GETDOMAININFO    12
   12.69 -typedef struct dom0_getdominfo_st
   12.70 +typedef struct dom0_getdomaininfo_st
   12.71  {
   12.72      /* IN variables. */
   12.73      unsigned int domain;
   12.74 @@ -106,8 +123,8 @@ typedef struct dom0_getdominfo_st
   12.75      unsigned long mcu_advance;
   12.76      unsigned int tot_pages;
   12.77      long long cpu_time;
   12.78 -    execution_context_t ctxt;
   12.79 -} dom0_getdominfo_t;
   12.80 +    full_execution_context_t ctxt;
   12.81 +} dom0_getdomaininfo_t;
   12.82  
   12.83  #define DOM0_GETPAGEFRAMEINFO 18
   12.84  typedef struct dom0_getpageframeinfo_st
   12.85 @@ -163,22 +180,21 @@ typedef struct dom0_op_st
   12.86      unsigned long cmd;
   12.87      union
   12.88      {
   12.89 -        dom0_newdomain_t newdomain;
   12.90 -        dom0_startdomain_t startdomain;
   12.91 -        dom0_stopdomain_t stopdomain;
   12.92 -        dom0_killdomain_t killdomain;
   12.93 -        dom0_getmemlist_t getmemlist;
   12.94 -        dom0_bvtctl_t bvtctl;
   12.95 -        dom0_adjustdom_t adjustdom;
   12.96 -        dom0_builddomain_t builddomain;
   12.97 -        dom0_getdominfo_t getdominfo;
   12.98 +        dom0_createdomain_t     createdomain;
   12.99 +        dom0_startdomain_t      startdomain;
  12.100 +        dom0_stopdomain_t       stopdomain;
  12.101 +        dom0_destroydomain_t    destroydomain;
  12.102 +        dom0_getmemlist_t       getmemlist;
  12.103 +        dom0_bvtctl_t           bvtctl;
  12.104 +        dom0_adjustdom_t        adjustdom;
  12.105 +        dom0_builddomain_t      builddomain;
  12.106 +        dom0_getdomaininfo_t    getdomaininfo;
  12.107          dom0_getpageframeinfo_t getpageframeinfo;
  12.108 -        dom0_iopl_t iopl;
  12.109 -	dom0_msr_t msr;
  12.110 -	dom0_debug_t debug;
  12.111 -	dom0_settime_t settime;
  12.112 -    }
  12.113 -    u;
  12.114 +        dom0_iopl_t             iopl;
  12.115 +	dom0_msr_t              msr;
  12.116 +	dom0_debug_t            debug;
  12.117 +	dom0_settime_t          settime;
  12.118 +    } u;
  12.119  } dom0_op_t;
  12.120  
  12.121  #endif
    13.1 --- a/xen/include/xeno/sched.h	Sat Nov 01 16:39:33 2003 +0000
    13.2 +++ b/xen/include/xeno/sched.h	Mon Nov 03 10:25:35 2003 +0000
    13.3 @@ -27,31 +27,7 @@ extern struct timeval xtime;
    13.4  
    13.5  #include <xeno/spinlock.h>
    13.6  
    13.7 -struct mm_struct {
    13.8 -    /*
    13.9 -     * Every domain has a L1 pagetable of its own. Per-domain mappings
   13.10 -     * are put in this table (eg. the current GDT is mapped here).
   13.11 -     */
   13.12 -    l1_pgentry_t *perdomain_pt;
   13.13 -    pagetable_t  pagetable;
   13.14 -    /* Current LDT details. */
   13.15 -    unsigned long ldt_base, ldt_ents, shadow_ldt_mapcnt;
   13.16 -    /* Next entry is passed to LGDT on domain switch. */
   13.17 -    char gdt[6];
   13.18 -};
   13.19 -
   13.20 -/* Convenient accessor for mm.gdt. */
   13.21 -#define SET_GDT_ENTRIES(_p, _e) ((*(u16 *)((_p)->mm.gdt + 0)) = (_e))
   13.22 -#define SET_GDT_ADDRESS(_p, _a) ((*(u32 *)((_p)->mm.gdt + 2)) = (_a))
   13.23 -#define GET_GDT_ENTRIES(_p)     ((*(u16 *)((_p)->mm.gdt + 0)))
   13.24 -#define GET_GDT_ADDRESS(_p)     ((*(u32 *)((_p)->mm.gdt + 2)))
   13.25 -
   13.26  extern struct mm_struct init_mm;
   13.27 -#define IDLE0_MM                                                    \
   13.28 -{                                                                   \
   13.29 -    perdomain_pt: 0,                                                \
   13.30 -    pagetable:   mk_pagetable(__pa(idle_pg_table))                  \
   13.31 -}
   13.32  
   13.33  #define _HYP_EVENT_NEED_RESCHED 0
   13.34  #define _HYP_EVENT_DIE          1
   13.35 @@ -218,9 +194,10 @@ extern kmem_cache_t *task_struct_cachep;
   13.36  #define get_task_struct(_p)  \
   13.37    atomic_inc(&(_p)->refcnt)
   13.38  
   13.39 -extern struct task_struct *do_newdomain(unsigned int dom_id, unsigned int cpu);
   13.40 +extern struct task_struct *do_createdomain(
   13.41 +    unsigned int dom_id, unsigned int cpu);
   13.42  extern int setup_guestos(
   13.43 -    struct task_struct *p, dom0_newdomain_t *params, unsigned int num_vifs,
   13.44 +    struct task_struct *p, dom0_createdomain_t *params, unsigned int num_vifs,
   13.45      char *data_start, unsigned long data_len, 
   13.46      char *cmdline, unsigned long initrd_len);
   13.47  extern int final_setup_guestos(struct task_struct *p, dom0_builddomain_t *);