ia64/xen-unstable

changeset 3576:eef1949801b8

bitkeeper revision 1.1159.212.49 (41fa4434nLllzsfL7vjx8HW46L4qtA)

Merge firebug.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into firebug.cl.cam.ac.uk:/auto/anfs/scratch/scramble/kaf24/xen-unstable.bk
author kaf24@firebug.cl.cam.ac.uk
date Fri Jan 28 13:55:00 2005 +0000 (2005-01-28)
parents d9cdcc864e90 e477186c9c82
children e8d6036117fd 2266301ae541
files BitKeeper/etc/logging_ok xen/arch/x86/Makefile xen/arch/x86/boot/x86_64.S xen/arch/x86/domain.c xen/arch/x86/e820.c xen/arch/x86/memory.c xen/arch/x86/x86_32/xen.lds xen/arch/x86/x86_64/xen.lds xen/include/asm-x86/mm.h xen/include/public/arch-x86_64.h
line diff
     1.1 --- a/BitKeeper/etc/logging_ok	Fri Jan 28 13:39:03 2005 +0000
     1.2 +++ b/BitKeeper/etc/logging_ok	Fri Jan 28 13:55:00 2005 +0000
     1.3 @@ -27,6 +27,7 @@ iap10@tetris.cl.cam.ac.uk
     1.4  jws22@gauntlet.cl.cam.ac.uk
     1.5  jws@cairnwell.research
     1.6  kaf24@camelot.eng.3leafnetworks.com
     1.7 +kaf24@firebug.cl.cam.ac.uk
     1.8  kaf24@freefall.cl.cam.ac.uk
     1.9  kaf24@labyrinth.cl.cam.ac.uk
    1.10  kaf24@pb001.cl.cam.ac.uk
     2.1 --- a/xen/arch/x86/Makefile	Fri Jan 28 13:39:03 2005 +0000
     2.2 +++ b/xen/arch/x86/Makefile	Fri Jan 28 13:55:00 2005 +0000
     2.3 @@ -15,6 +15,7 @@ OBJS := $(subst $(TARGET_SUBARCH)/asm-of
     2.4  ifneq ($(TARGET_SUBARCH),x86_32)
     2.5  OBJS := $(subst vmx.o,,$(OBJS))
     2.6  OBJS := $(subst vmx_io.o,,$(OBJS))
     2.7 +OBJS := $(subst vmx_platform.o,,$(OBJS))
     2.8  OBJS := $(subst vmx_vmcs.o,,$(OBJS))
     2.9  endif
    2.10  
     3.1 --- a/xen/arch/x86/boot/x86_64.S	Fri Jan 28 13:39:03 2005 +0000
     3.2 +++ b/xen/arch/x86/boot/x86_64.S	Fri Jan 28 13:55:00 2005 +0000
     3.3 @@ -156,7 +156,8 @@ 1:      mov     %eax,(%rdi)
     3.4          lea     start(%rip),%rax
     3.5          sub     $0x100000,%rax
     3.6          add     %rax,%rdi
     3.7 -        call    cmain
     3.8 +        call    __start_xen
     3.9 +        ud2     /* Force a panic (invalid opcode). */
    3.10  
    3.11  /* This is the default interrupt handler. */
    3.12  int_msg:
    3.13 @@ -264,10 +265,9 @@ phys_to_machine_mapping:
    3.14  copy_from_user: 
    3.15  show_registers: 
    3.16  do_iopl: 
    3.17 -.globl idt_table, copy_user_generic, memcmp, idt_tables, new_thread
    3.18 +.globl idt_table, copy_user_generic, idt_tables, new_thread
    3.19  idt_table:
    3.20  copy_user_generic:
    3.21 -memcmp:
    3.22  idt_tables:
    3.23  new_thread:
    3.24  .globl switch_to, __get_user_1, __get_user_4, __get_user_8, trap_init
     4.1 --- a/xen/arch/x86/domain.c	Fri Jan 28 13:39:03 2005 +0000
     4.2 +++ b/xen/arch/x86/domain.c	Fri Jan 28 13:55:00 2005 +0000
     4.3 @@ -364,8 +364,6 @@ static void monitor_rm_pagetable(struct 
     4.4      l2_pgentry_t *mpl2e;
     4.5      unsigned long mpfn;
     4.6  
     4.7 -    ASSERT( m->monitor_table );
     4.8 -    
     4.9      mpl2e = (l2_pgentry_t *) map_domain_mem(pagetable_val(m->monitor_table));
    4.10      /*
    4.11       * First get the pfn for guest_pl2e_cache by looking at monitor_table
    4.12 @@ -510,8 +508,10 @@ int arch_final_setup_guestos(struct exec
    4.13          }
    4.14      }
    4.15  
    4.16 +#ifdef CONFIG_VMX
    4.17      if (c->flags & ECF_VMX_GUEST)
    4.18          return vmx_final_setup_guestos(d, c);
    4.19 +#endif
    4.20  
    4.21      return 0;
    4.22  }
    4.23 @@ -747,6 +747,7 @@ static void relinquish_list(struct domai
    4.24      spin_unlock_recursive(&d->page_alloc_lock);
    4.25  }
    4.26  
    4.27 +#ifdef CONFIG_VMX
    4.28  static void vmx_domain_relinquish_memory(struct exec_domain *ed)
    4.29  {
    4.30      struct domain *d = ed->domain;
    4.31 @@ -776,6 +777,7 @@ static void vmx_domain_relinquish_memory
    4.32      }
    4.33  
    4.34  }
    4.35 +#endif
    4.36  
    4.37  void domain_relinquish_memory(struct domain *d)
    4.38  {
    4.39 @@ -788,15 +790,18 @@ void domain_relinquish_memory(struct dom
    4.40      shadow_mode_disable(d);
    4.41  
    4.42      /* Drop the in-use reference to the page-table base. */
    4.43 -    for_each_exec_domain(d, ed) {
    4.44 +    for_each_exec_domain ( d, ed )
    4.45 +    {
    4.46          if ( pagetable_val(ed->mm.pagetable) != 0 )
    4.47              put_page_and_type(&frame_table[pagetable_val(ed->mm.pagetable) >>
    4.48                                             PAGE_SHIFT]);
    4.49      }
    4.50  
    4.51 -    if (VMX_DOMAIN(d->exec_domain[0]))
    4.52 -        for_each_exec_domain(d, ed)
    4.53 +#ifdef CONFIG_VMX
    4.54 +    if ( VMX_DOMAIN(d->exec_domain[0]) )
    4.55 +        for_each_exec_domain ( d, ed )
    4.56              vmx_domain_relinquish_memory(ed);
    4.57 +#endif
    4.58  
    4.59      /*
    4.60       * Relinquish GDT mappings. No need for explicit unmapping of the LDT as 
     5.1 --- a/xen/arch/x86/e820.c	Fri Jan 28 13:39:03 2005 +0000
     5.2 +++ b/xen/arch/x86/e820.c	Fri Jan 28 13:55:00 2005 +0000
     5.3 @@ -305,17 +305,11 @@ static unsigned long __init find_max_pfn
     5.4      return max_pfn;
     5.5  }
     5.6  
     5.7 -static void __init machine_specific_memory_setup(
     5.8 -    struct e820entry *raw, int raw_nr)
     5.9 +#ifdef __i386__
    5.10 +static void __init clip_4gb(void)
    5.11  {
    5.12 -    char nr = (char)raw_nr;
    5.13      int i;
    5.14  
    5.15 -    sanitize_e820_map(raw, &nr);
    5.16 -
    5.17 -    (void)copy_e820_map(raw, nr);
    5.18 -
    5.19 -#ifdef __i386__
    5.20      /* 32-bit systems restricted to a 4GB physical memory map. */
    5.21      for ( i = 0; i < e820.nr_map; i++ )
    5.22      {
    5.23 @@ -335,7 +329,18 @@ static void __init machine_specific_memo
    5.24              e820.nr_map = i + 1;                
    5.25          }            
    5.26      }
    5.27 +}
    5.28 +#else
    5.29 +#define clip_4gb() ((void)0)
    5.30  #endif
    5.31 +
    5.32 +static void __init machine_specific_memory_setup(
    5.33 +    struct e820entry *raw, int raw_nr)
    5.34 +{
    5.35 +    char nr = (char)raw_nr;
    5.36 +    sanitize_e820_map(raw, &nr);
    5.37 +    (void)copy_e820_map(raw, nr);
    5.38 +    clip_4gb();
    5.39  }
    5.40  
    5.41  unsigned long init_e820(struct e820entry *raw, int raw_nr)
     6.1 --- a/xen/arch/x86/memory.c	Fri Jan 28 13:39:03 2005 +0000
     6.2 +++ b/xen/arch/x86/memory.c	Fri Jan 28 13:55:00 2005 +0000
     6.3 @@ -148,6 +148,7 @@ unsigned long max_page;
     6.4  
     6.5  void __init init_frametable(void)
     6.6  {
     6.7 +#ifdef __i386__
     6.8      unsigned long i, p;
     6.9  
    6.10      frame_table      = (struct pfn_info *)FRAMETABLE_VIRT_START;
    6.11 @@ -164,6 +165,7 @@ void __init init_frametable(void)
    6.12      }
    6.13  
    6.14      memset(frame_table, 0, frame_table_size);
    6.15 +#endif
    6.16  }
    6.17  
    6.18  void arch_init_memory(void)
     7.1 --- a/xen/arch/x86/x86_32/xen.lds	Fri Jan 28 13:39:03 2005 +0000
     7.2 +++ b/xen/arch/x86/x86_32/xen.lds	Fri Jan 28 13:55:00 2005 +0000
     7.3 @@ -25,12 +25,12 @@ SECTIONS
     7.4    .rodata : { *(.rodata) *(.rodata.*) } :text
     7.5    .kstrtab : { *(.kstrtab) } :text
     7.6  
     7.7 -  . = ALIGN(16);		/* Exception table */
     7.8 +  . = ALIGN(32);		/* Exception table */
     7.9    __start___ex_table = .;
    7.10    __ex_table : { *(__ex_table) } :text
    7.11    __stop___ex_table = .;
    7.12  
    7.13 -  . = ALIGN(16);		/* Pre-exception table */
    7.14 +  . = ALIGN(32);		/* Pre-exception table */
    7.15    __start___pre_ex_table = .;
    7.16    __pre_ex_table : { *(__pre_ex_table) } :text
    7.17    __stop___pre_ex_table = .;
    7.18 @@ -57,7 +57,7 @@ SECTIONS
    7.19    __init_begin = .;
    7.20    .text.init : { *(.text.init) } :text
    7.21    .data.init : { *(.data.init) } :text
    7.22 -  . = ALIGN(16);
    7.23 +  . = ALIGN(32);
    7.24    __setup_start = .;
    7.25    .setup.init : { *(.setup.init) } :text
    7.26    __setup_end = .;
     8.1 --- a/xen/arch/x86/x86_64/xen.lds	Fri Jan 28 13:39:03 2005 +0000
     8.2 +++ b/xen/arch/x86/x86_64/xen.lds	Fri Jan 28 13:55:00 2005 +0000
     8.3 @@ -23,12 +23,12 @@ SECTIONS
     8.4    .rodata : { *(.rodata) *(.rodata.*) } :text
     8.5    .kstrtab : { *(.kstrtab) } :text
     8.6  
     8.7 -  . = ALIGN(16);		/* Exception table */
     8.8 +  . = ALIGN(32);		/* Exception table */
     8.9    __start___ex_table = .;
    8.10    __ex_table : { *(__ex_table) } :text
    8.11    __stop___ex_table = .;
    8.12  
    8.13 -  . = ALIGN(16);                /* Pre-exception table */
    8.14 +  . = ALIGN(32);                /* Pre-exception table */
    8.15    __start___pre_ex_table = .;
    8.16    __pre_ex_table : { *(__pre_ex_table) } :text
    8.17    __stop___pre_ex_table = .;
    8.18 @@ -55,7 +55,7 @@ SECTIONS
    8.19    __init_begin = .;
    8.20    .text.init : { *(.text.init) } :text
    8.21    .data.init : { *(.data.init) } :text
    8.22 -  . = ALIGN(16);
    8.23 +  . = ALIGN(32);
    8.24    __setup_start = .;
    8.25    .setup.init : { *(.setup.init) } :text
    8.26    __setup_end = .;
     9.1 --- a/xen/include/asm-x86/mm.h	Fri Jan 28 13:39:03 2005 +0000
     9.2 +++ b/xen/include/asm-x86/mm.h	Fri Jan 28 13:55:00 2005 +0000
     9.3 @@ -225,6 +225,7 @@ void synchronise_pagetables(unsigned lon
     9.4  #ifdef __x86_64__
     9.5  extern unsigned long *machine_to_phys_mapping;
     9.6  extern unsigned long *phys_to_machine_mapping;
     9.7 +#define m2p_start_mfn virt_to_phys(machine_to_phys_mapping)
     9.8  #else
     9.9  /* Don't call virt_to_phys on this: it isn't direct mapped.  Using
    9.10     m2p_start_mfn instead. */
    10.1 --- a/xen/include/public/arch-x86_64.h	Fri Jan 28 13:39:03 2005 +0000
    10.2 +++ b/xen/include/public/arch-x86_64.h	Fri Jan 28 13:55:00 2005 +0000
    10.3 @@ -115,6 +115,7 @@ typedef u64 tsc_timestamp_t; /* RDTSC ti
    10.4   */
    10.5  typedef struct {
    10.6  #define ECF_I387_VALID (1<<0)
    10.7 +#define ECF_VMX_GUEST  (2<<0)
    10.8      unsigned long flags;
    10.9      execution_context_t cpu_ctxt;           /* User-level CPU registers     */
   10.10      char          fpu_ctxt[512];            /* User-level FPU registers     */