ia64/xen-unstable

changeset 4474:6bbac0aca316

bitkeeper revision 1.1271 (42527d4814Ue_cd-FzUT4Dr8TSIJAA)

Merge maf46@ssh-relay1.cl.cam.ac.uk:/usr/groups/xeno/BK/xen-unstable.bk
into fleming.research:/scratch/fleming/mafetter/xen.work

Signed-off-by: michael.fetterman@cl.cam.ac.uk
author mafetter@fleming.research
date Tue Apr 05 11:58:00 2005 +0000 (2005-04-05)
parents 602b1e28aba3 38d7ac8f210f
children a474e06bc485
files linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/pgalloc.h tools/python/xen/xm/main.py xen/arch/x86/domain_build.c xen/common/kernel.c xen/include/xen/init.h
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c	Tue Apr 05 08:49:46 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c	Tue Apr 05 11:58:00 2005 +0000
     1.3 @@ -167,7 +167,7 @@ void show_regs(struct pt_regs * regs)
     1.4  	if (regs->xcs & 2)
     1.5  		printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
     1.6  	printk(" EFLAGS: %08lx    %s  (%s)\n",
     1.7 -	       regs->eflags, print_tainted(),UTS_RELEASE);
     1.8 +	       regs->eflags, print_tainted(), system_utsname.release);
     1.9  	printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
    1.10  		regs->eax,regs->ebx,regs->ecx,regs->edx);
    1.11  	printk("ESI: %08lx EDI: %08lx EBP: %08lx",
     2.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c	Tue Apr 05 08:49:46 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c	Tue Apr 05 11:58:00 2005 +0000
     2.3 @@ -194,7 +194,7 @@ static void __init kernel_physical_mappi
     2.4  			}
     2.5  		}
     2.6  		pmd_idx = 0;
     2.7 -	}	
     2.8 +	}
     2.9  }
    2.10  
    2.11  static inline int page_kills_ppro(unsigned long pagenr)
     3.1 --- a/linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c	Tue Apr 05 08:49:46 2005 +0000
     3.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c	Tue Apr 05 11:58:00 2005 +0000
     3.3 @@ -58,10 +58,8 @@
     3.4          DP("***************************************************************");
     3.5          DP("** WARNING: Currently emulating unsupported memory accesses  **");
     3.6          DP("**          in /lib/tls libraries. The emulation is very     **");
     3.7 -        DP("**          slow, and may not work correctly with all        **");
     3.8 -        DP("**          programs (e.g., some may 'Segmentation fault').  **");
     3.9 -        DP("**          TO ENSURE FULL PERFORMANCE AND CORRECT FUNCTION, **");
    3.10 -        DP("**          YOU MUST EXECUTE THE FOLLOWING AS ROOT:          **");
    3.11 +        DP("**          slow. To ensure full performance you should      **");
    3.12 +        DP("**          execute the following as root:                   **");
    3.13          DP("**          mv /lib/tls /lib/tls.disabled                    **");
    3.14          DP("***************************************************************");
    3.15          DP("***************************************************************");
     4.1 --- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/pgalloc.h	Tue Apr 05 08:49:46 2005 +0000
     4.2 +++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/pgalloc.h	Tue Apr 05 11:58:00 2005 +0000
     4.3 @@ -9,13 +9,12 @@
     4.4  #include <asm/io.h>		/* for phys_to_virt and page_to_pseudophys */
     4.5  
     4.6  #define pmd_populate_kernel(mm, pmd, pte) \
     4.7 -	set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte)))
     4.8 +		set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte)))
     4.9  
    4.10 -#define pmd_populate(mm, pmd, pte) do {				\
    4.11 +#define pmd_populate(mm, pmd, pte) 				\
    4.12  	set_pmd(pmd, __pmd(_PAGE_TABLE +			\
    4.13  		((unsigned long long)page_to_pfn(pte) <<	\
    4.14 -			(unsigned long long) PAGE_SHIFT)));	\
    4.15 -} while (0)
    4.16 +			(unsigned long long) PAGE_SHIFT)))
    4.17  /*
    4.18   * Allocate and free page tables.
    4.19   */
     5.1 --- a/tools/python/xen/xm/main.py	Tue Apr 05 08:49:46 2005 +0000
     5.2 +++ b/tools/python/xen/xm/main.py	Tue Apr 05 11:58:00 2005 +0000
     5.3 @@ -14,6 +14,31 @@ from xen.xend.XendClient import main as 
     5.4  from xen.xm import create, destroy, migrate, shutdown, sysrq
     5.5  from xen.xm.opts import *
     5.6  
     5.7 +def unit(c):
     5.8 +    if not c.isalpha():
     5.9 +        return 0
    5.10 +    base = 1
    5.11 +    if c == 'G' or c == 'g': base = 1024 * 1024 * 1024
    5.12 +    elif c == 'M' or c == 'm': base = 1024 * 1024
    5.13 +    elif c == 'K' or c == 'k': base = 1024
    5.14 +    else:
    5.15 +        print 'ignoring unknown unit'
    5.16 +    return base
    5.17 +
    5.18 +def int_unit(str, dest):
    5.19 +    base = unit(str[-1])
    5.20 +    if not base:
    5.21 +        return int(str)
    5.22 +
    5.23 +    value = int(str[:-1])
    5.24 +    dst_base = unit(dest)
    5.25 +    if dst_base == 0:
    5.26 +        dst_base = 1
    5.27 +    if dst_base > base:
    5.28 +        return value / (dst_base / base)
    5.29 +    else:
    5.30 +        return value * (base / dst_base)
    5.31 +
    5.32  class Group:
    5.33  
    5.34      name = ""
    5.35 @@ -475,7 +500,7 @@ class ProgMaxmem(Prog):
    5.36      def main(self, args):
    5.37          if len(args) != 3: self.err("%s: Invalid argument(s)" % args[0])
    5.38          dom = args[1]
    5.39 -        mem = int(args[2])
    5.40 +        mem = int_unit(args[2], 'm')
    5.41          server.xend_domain_maxmem_set(dom, mem)
    5.42  
    5.43  xm.prog(ProgMaxmem)
    5.44 @@ -493,7 +518,7 @@ MEMORY_TARGET megabytes"""
    5.45      def main(self, args):
    5.46          if len(args) != 3: self.err("%s: Invalid argument(s)" % args[0])
    5.47          dom = args[1]
    5.48 -        mem_target = int(args[2])
    5.49 +        mem_target = int_unit(args[2], 'm')
    5.50          server.xend_domain_mem_target_set(dom, mem_target)
    5.51  
    5.52  xm.prog(ProgBalloon)
     6.1 --- a/xen/arch/x86/domain_build.c	Tue Apr 05 08:49:46 2005 +0000
     6.2 +++ b/xen/arch/x86/domain_build.c	Tue Apr 05 11:58:00 2005 +0000
     6.3 @@ -23,7 +23,7 @@
     6.4  
     6.5  /* opt_dom0_mem: Kilobytes of memory allocated to domain 0. */
     6.6  static unsigned int opt_dom0_mem = 0;
     6.7 -integer_param("dom0_mem", opt_dom0_mem);
     6.8 +integer_unit_param("dom0_mem", opt_dom0_mem);
     6.9  
    6.10  static unsigned int opt_dom0_shadow = 0;
    6.11  boolean_param("dom0_shadow", opt_dom0_shadow);
     7.1 --- a/xen/common/kernel.c	Tue Apr 05 08:49:46 2005 +0000
     7.2 +++ b/xen/common/kernel.c	Tue Apr 05 11:58:00 2005 +0000
     7.3 @@ -55,6 +55,24 @@ void cmdline_parse(char *cmdline)
     7.4                      *(unsigned int *)param->var =
     7.5                          simple_strtol(opt, (char **)&opt, 0);
     7.6                  break;
     7.7 +            case OPT_UINT_UNIT:
     7.8 +                if ( opt != NULL )
     7.9 +                {
    7.10 +                    int base = 1;
    7.11 +                    unsigned int value;
    7.12 +
    7.13 +                    value = simple_strtoul(opt, (char **)&opt, 0);
    7.14 +                    if (*opt == 'G' || *opt == 'g') {
    7.15 +                        base = 1024 * 1024;
    7.16 +                        opt++;
    7.17 +                    } if (*opt == 'M' || *opt == 'm') {
    7.18 +                        base = 1024;
    7.19 +                        opt++;
    7.20 +                    } else if (*opt == 'K' || *opt == 'k')
    7.21 +                        opt++;
    7.22 +                    *(unsigned int *) param->var = value * base;
    7.23 +                }
    7.24 +                break;
    7.25              case OPT_BOOL:
    7.26                  *(int *)param->var = 1;
    7.27                  break;
     8.1 --- a/xen/include/xen/init.h	Tue Apr 05 08:49:46 2005 +0000
     8.2 +++ b/xen/include/xen/init.h	Tue Apr 05 11:58:00 2005 +0000
     8.3 @@ -59,7 +59,7 @@ extern initcall_t __initcall_start, __in
     8.4   */
     8.5  struct kernel_param {
     8.6      const char *name;
     8.7 -    enum { OPT_STR, OPT_UINT, OPT_BOOL } type;
     8.8 +    enum { OPT_STR, OPT_UINT, OPT_UINT_UNIT, OPT_BOOL } type;
     8.9      void *var;
    8.10      unsigned int len;
    8.11  };
    8.12 @@ -74,6 +74,10 @@ extern struct kernel_param __setup_start
    8.13      static char __setup_str_##_var[] __initdata = _name; \
    8.14      static struct kernel_param __setup_##_var __attribute_used__ \
    8.15          __initsetup = { __setup_str_##_var, OPT_UINT, &_var, sizeof(_var) }
    8.16 +#define integer_unit_param(_name, _var) \
    8.17 +    static char __setup_str_##_var[] __initdata = _name; \
    8.18 +    static struct kernel_param __setup_##_var __attribute_used__ \
    8.19 +        __initsetup = { __setup_str_##_var, OPT_UINT_UNIT, &_var, sizeof(_var) }
    8.20  #define string_param(_name, _var) \
    8.21      static char __setup_str_##_var[] __initdata = _name; \
    8.22      static struct kernel_param __setup_##_var __attribute_used__ \