ia64/xen-unstable

changeset 11760:79b56c02b836

Merge
author Tim Deegan <tim.deegan@xensource.com>
date Thu Oct 05 16:48:28 2006 +0100 (2006-10-05)
parents 646a120334ef 9dabb06c66f5
children be6f5e262d84
files
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Thu Oct 05 16:21:39 2006 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Oct 05 16:48:28 2006 +0100
     1.3 @@ -1745,7 +1745,7 @@ class XendDomainInfo:
     1.4          blcfg = None
     1.5          # FIXME: this assumes that we want to use the first disk device
     1.6          for (n,c) in self.info['device']:
     1.7 -            if not n or not c or n != "vbd":
     1.8 +            if not n or not c or not(n in ["vbd", "tap"]):
     1.9                  continue
    1.10              disk = sxp.child_value(c, "uname")
    1.11              if disk is None:
     2.1 --- a/tools/python/xen/xm/main.py	Thu Oct 05 16:21:39 2006 +0100
     2.2 +++ b/tools/python/xen/xm/main.py	Thu Oct 05 16:48:28 2006 +0100
     2.3 @@ -291,6 +291,11 @@ all_commands = (domain_commands + host_c
     2.4  def cmdHelp(cmd):
     2.5      """Print help for a specific subcommand."""
     2.6      
     2.7 +    for fc in SUBCOMMAND_HELP.keys():
     2.8 +        if fc[:len(cmd)] == cmd:
     2.9 +            cmd = fc
    2.10 +            break
    2.11 +    
    2.12      try:
    2.13          args, desc = SUBCOMMAND_HELP[cmd]
    2.14      except KeyError:
     3.1 --- a/xen/arch/x86/Makefile	Thu Oct 05 16:21:39 2006 +0100
     3.2 +++ b/xen/arch/x86/Makefile	Thu Oct 05 16:48:28 2006 +0100
     3.3 @@ -53,18 +53,18 @@ obj-$(crash_debug) += gdbstub.o
     3.4  	$(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/common/symbols-dummy.o
     3.5  	$(LD) $(LDFLAGS) -T xen.lds -N \
     3.6  	    boot/$(TARGET_SUBARCH).o $(ALL_OBJS) \
     3.7 -	    $(BASEDIR)/common/symbols-dummy.o -o $@
     3.8 -	$(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S
     3.9 -	$(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o
    3.10 +	    $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0
    3.11 +	$(NM) -n $(@D)/.$(@F).0 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).0.S
    3.12 +	$(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o
    3.13  	$(LD) $(LDFLAGS) -T xen.lds -N \
    3.14  	    boot/$(TARGET_SUBARCH).o $(ALL_OBJS) \
    3.15 -	    $(BASEDIR)/xen-syms.o -o $@
    3.16 -	$(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S
    3.17 -	$(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o
    3.18 +	    $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
    3.19 +	$(NM) -n $(@D)/.$(@F).1 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).1.S
    3.20 +	$(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
    3.21  	$(LD) $(LDFLAGS) -T xen.lds -N \
    3.22  	    boot/$(TARGET_SUBARCH).o $(ALL_OBJS) \
    3.23 -	    $(BASEDIR)/xen-syms.o -o $@
    3.24 -	rm -f $(BASEDIR)/xen-syms.S $(BASEDIR)/xen-syms.o
    3.25 +	    $(@D)/.$(@F).1.o -o $@
    3.26 +	rm -f $(@D)/.$(@F).[0-9]*
    3.27  
    3.28  asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(HDRS)
    3.29  	$(CC) $(CFLAGS) -S -o $@ $<
    3.30 @@ -78,3 +78,4 @@ boot/mkelf32: boot/mkelf32.c
    3.31  .PHONY: clean
    3.32  clean::
    3.33  	rm -f asm-offsets.s xen.lds boot/*.o boot/*~ boot/core boot/mkelf32
    3.34 +	rm -f $(BASEDIR)/.xen-syms.[0-9]*
     4.1 --- a/xen/arch/x86/microcode.c	Thu Oct 05 16:21:39 2006 +0100
     4.2 +++ b/xen/arch/x86/microcode.c	Thu Oct 05 16:48:28 2006 +0100
     4.3 @@ -455,7 +455,7 @@ out:
     4.4  	return error;
     4.5  }
     4.6  
     4.7 -int microcode_update(void *buf, unsigned long len)
     4.8 +int microcode_update(XEN_GUEST_HANDLE(void) buf, unsigned long len)
     4.9  {
    4.10  	int ret;
    4.11  
    4.12 @@ -464,10 +464,15 @@ int microcode_update(void *buf, unsigned
    4.13  		return -EINVAL;
    4.14  	}
    4.15  
    4.16 +	if (len != (typeof(user_buffer_size))len) {
    4.17 +		printk(KERN_ERR "microcode: too much data\n");
    4.18 +		return -E2BIG;
    4.19 +	}
    4.20 +
    4.21  	mutex_lock(&microcode_mutex);
    4.22  
    4.23 -	user_buffer = (void __user *) buf;
    4.24 -	user_buffer_size = (int) len;
    4.25 +	user_buffer = buf.p;
    4.26 +	user_buffer_size = len;
    4.27  
    4.28  	ret = do_microcode_update();
    4.29  
     5.1 --- a/xen/arch/x86/platform_hypercall.c	Thu Oct 05 16:21:39 2006 +0100
     5.2 +++ b/xen/arch/x86/platform_hypercall.c	Thu Oct 05 16:48:28 2006 +0100
     5.3 @@ -58,12 +58,13 @@ long do_platform_op(XEN_GUEST_HANDLE(xen
     5.4              op->u.add_memtype.nr_mfns,
     5.5              op->u.add_memtype.type,
     5.6              1);
     5.7 -        if ( ret > 0 )
     5.8 +        if ( ret >= 0 )
     5.9          {
    5.10              op->u.add_memtype.handle = 0;
    5.11              op->u.add_memtype.reg    = ret;
    5.12 -            (void)copy_to_guest(u_xenpf_op, op, 1);
    5.13 -            ret = 0;
    5.14 +            ret = copy_to_guest(u_xenpf_op, op, 1) ? -EFAULT : 0;
    5.15 +            if ( ret != 0 )
    5.16 +                mtrr_del_page(ret, 0, 0);
    5.17          }
    5.18      }
    5.19      break;
    5.20 @@ -75,7 +76,7 @@ long do_platform_op(XEN_GUEST_HANDLE(xen
    5.21              && (int)op->u.del_memtype.reg >= 0)
    5.22          {
    5.23              ret = mtrr_del_page(op->u.del_memtype.reg, 0, 0);
    5.24 -            if (ret > 0)
    5.25 +            if ( ret > 0 )
    5.26                  ret = 0;
    5.27          }
    5.28          else
    5.29 @@ -96,16 +97,15 @@ long do_platform_op(XEN_GUEST_HANDLE(xen
    5.30              op->u.read_memtype.mfn     = mfn;
    5.31              op->u.read_memtype.nr_mfns = nr_mfns;
    5.32              op->u.read_memtype.type    = type;
    5.33 -            (void)copy_to_guest(u_xenpf_op, op, 1);
    5.34 -            ret = 0;
    5.35 +            ret = copy_to_guest(u_xenpf_op, op, 1) ? -EFAULT : 0;
    5.36          }
    5.37      }
    5.38      break;
    5.39  
    5.40      case XENPF_microcode_update:
    5.41      {
    5.42 -        extern int microcode_update(void *buf, unsigned long len);
    5.43 -        ret = microcode_update(op->u.microcode.data.p,
    5.44 +        extern int microcode_update(XEN_GUEST_HANDLE(void), unsigned long len);
    5.45 +        ret = microcode_update(op->u.microcode.data,
    5.46                                 op->u.microcode.length);
    5.47      }
    5.48      break;
     6.1 --- a/xen/arch/x86/x86_32/asm-offsets.c	Thu Oct 05 16:21:39 2006 +0100
     6.2 +++ b/xen/arch/x86/x86_32/asm-offsets.c	Thu Oct 05 16:48:28 2006 +0100
     6.3 @@ -118,7 +118,6 @@ void __dummy__(void)
     6.4      OFFSET(MULTICALL_arg3, struct multicall_entry, args[3]);
     6.5      OFFSET(MULTICALL_arg4, struct multicall_entry, args[4]);
     6.6      OFFSET(MULTICALL_arg5, struct multicall_entry, args[5]);
     6.7 -    OFFSET(MULTICALL_arg6, struct multicall_entry, args[6]);
     6.8      OFFSET(MULTICALL_result, struct multicall_entry, result);
     6.9      BLANK();
    6.10  
     7.1 --- a/xen/arch/x86/x86_64/asm-offsets.c	Thu Oct 05 16:21:39 2006 +0100
     7.2 +++ b/xen/arch/x86/x86_64/asm-offsets.c	Thu Oct 05 16:48:28 2006 +0100
     7.3 @@ -112,7 +112,6 @@ void __dummy__(void)
     7.4      OFFSET(MULTICALL_arg3, struct multicall_entry, args[3]);
     7.5      OFFSET(MULTICALL_arg4, struct multicall_entry, args[4]);
     7.6      OFFSET(MULTICALL_arg5, struct multicall_entry, args[5]);
     7.7 -    OFFSET(MULTICALL_arg6, struct multicall_entry, args[6]);
     7.8      OFFSET(MULTICALL_result, struct multicall_entry, result);
     7.9      BLANK();
    7.10  
     8.1 --- a/xen/include/asm-x86/multicall.h	Thu Oct 05 16:21:39 2006 +0100
     8.2 +++ b/xen/include/asm-x86/multicall.h	Thu Oct 05 16:48:28 2006 +0100
     8.3 @@ -16,7 +16,7 @@
     8.4              "    movq  "STR(MULTICALL_op)"(%0),%%rax; "      \
     8.5              "    cmpq  $("STR(NR_hypercalls)"),%%rax; "      \
     8.6              "    jae   2f; "                                 \
     8.7 -            "    leaq  "STR(hypercall_table)"(%%rip),%%rdi; "\
     8.8 +            "    leaq  hypercall_table(%%rip),%%rdi; "       \
     8.9              "    leaq  (%%rdi,%%rax,8),%%rax; "              \
    8.10              "    movq  "STR(MULTICALL_arg0)"(%0),%%rdi; "    \
    8.11              "    movq  "STR(MULTICALL_arg1)"(%0),%%rsi; "    \