WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Merge

# HG changeset patch
# User Tim Deegan <tim.deegan@xxxxxxxxxxxxx>
# Node ID 79b56c02b836c2074817cae5907525029bc131ff
# Parent  646a120334efd0c9b015875dce0b4e3d196b8a31
# Parent  9dabb06c66f57f61b2b0524c414b39b2126492cb
Merge
---
 tools/python/xen/xend/XendDomainInfo.py |    2 +-
 tools/python/xen/xm/main.py             |    5 +++++
 xen/arch/x86/Makefile                   |   17 +++++++++--------
 xen/arch/x86/microcode.c                |   11 ++++++++---
 xen/arch/x86/platform_hypercall.c       |   16 ++++++++--------
 xen/arch/x86/x86_32/asm-offsets.c       |    1 -
 xen/arch/x86/x86_64/asm-offsets.c       |    1 -
 xen/include/asm-x86/multicall.h         |    2 +-
 8 files changed, 32 insertions(+), 23 deletions(-)

diff -r 646a120334ef -r 79b56c02b836 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Thu Oct 05 16:21:39 2006 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Thu Oct 05 16:48:28 2006 +0100
@@ -1745,7 +1745,7 @@ class XendDomainInfo:
         blcfg = None
         # FIXME: this assumes that we want to use the first disk device
         for (n,c) in self.info['device']:
-            if not n or not c or n != "vbd":
+            if not n or not c or not(n in ["vbd", "tap"]):
                 continue
             disk = sxp.child_value(c, "uname")
             if disk is None:
diff -r 646a120334ef -r 79b56c02b836 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Thu Oct 05 16:21:39 2006 +0100
+++ b/tools/python/xen/xm/main.py       Thu Oct 05 16:48:28 2006 +0100
@@ -290,6 +290,11 @@ all_commands = (domain_commands + host_c
 
 def cmdHelp(cmd):
     """Print help for a specific subcommand."""
+    
+    for fc in SUBCOMMAND_HELP.keys():
+        if fc[:len(cmd)] == cmd:
+            cmd = fc
+            break
     
     try:
         args, desc = SUBCOMMAND_HELP[cmd]
diff -r 646a120334ef -r 79b56c02b836 xen/arch/x86/Makefile
--- a/xen/arch/x86/Makefile     Thu Oct 05 16:21:39 2006 +0100
+++ b/xen/arch/x86/Makefile     Thu Oct 05 16:48:28 2006 +0100
@@ -53,18 +53,18 @@ obj-$(crash_debug) += gdbstub.o
        $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/common/symbols-dummy.o
        $(LD) $(LDFLAGS) -T xen.lds -N \
            boot/$(TARGET_SUBARCH).o $(ALL_OBJS) \
-           $(BASEDIR)/common/symbols-dummy.o -o $@
-       $(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S
-       $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o
+           $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0
+       $(NM) -n $(@D)/.$(@F).0 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).0.S
+       $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o
        $(LD) $(LDFLAGS) -T xen.lds -N \
            boot/$(TARGET_SUBARCH).o $(ALL_OBJS) \
-           $(BASEDIR)/xen-syms.o -o $@
-       $(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S
-       $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o
+           $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
+       $(NM) -n $(@D)/.$(@F).1 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).1.S
+       $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
        $(LD) $(LDFLAGS) -T xen.lds -N \
            boot/$(TARGET_SUBARCH).o $(ALL_OBJS) \
-           $(BASEDIR)/xen-syms.o -o $@
-       rm -f $(BASEDIR)/xen-syms.S $(BASEDIR)/xen-syms.o
+           $(@D)/.$(@F).1.o -o $@
+       rm -f $(@D)/.$(@F).[0-9]*
 
 asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(HDRS)
        $(CC) $(CFLAGS) -S -o $@ $<
@@ -78,3 +78,4 @@ boot/mkelf32: boot/mkelf32.c
 .PHONY: clean
 clean::
        rm -f asm-offsets.s xen.lds boot/*.o boot/*~ boot/core boot/mkelf32
+       rm -f $(BASEDIR)/.xen-syms.[0-9]*
diff -r 646a120334ef -r 79b56c02b836 xen/arch/x86/microcode.c
--- a/xen/arch/x86/microcode.c  Thu Oct 05 16:21:39 2006 +0100
+++ b/xen/arch/x86/microcode.c  Thu Oct 05 16:48:28 2006 +0100
@@ -455,7 +455,7 @@ out:
        return error;
 }
 
-int microcode_update(void *buf, unsigned long len)
+int microcode_update(XEN_GUEST_HANDLE(void) buf, unsigned long len)
 {
        int ret;
 
@@ -464,10 +464,15 @@ int microcode_update(void *buf, unsigned
                return -EINVAL;
        }
 
+       if (len != (typeof(user_buffer_size))len) {
+               printk(KERN_ERR "microcode: too much data\n");
+               return -E2BIG;
+       }
+
        mutex_lock(&microcode_mutex);
 
-       user_buffer = (void __user *) buf;
-       user_buffer_size = (int) len;
+       user_buffer = buf.p;
+       user_buffer_size = len;
 
        ret = do_microcode_update();
 
diff -r 646a120334ef -r 79b56c02b836 xen/arch/x86/platform_hypercall.c
--- a/xen/arch/x86/platform_hypercall.c Thu Oct 05 16:21:39 2006 +0100
+++ b/xen/arch/x86/platform_hypercall.c Thu Oct 05 16:48:28 2006 +0100
@@ -58,12 +58,13 @@ long do_platform_op(XEN_GUEST_HANDLE(xen
             op->u.add_memtype.nr_mfns,
             op->u.add_memtype.type,
             1);
-        if ( ret > 0 )
+        if ( ret >= 0 )
         {
             op->u.add_memtype.handle = 0;
             op->u.add_memtype.reg    = ret;
-            (void)copy_to_guest(u_xenpf_op, op, 1);
-            ret = 0;
+            ret = copy_to_guest(u_xenpf_op, op, 1) ? -EFAULT : 0;
+            if ( ret != 0 )
+                mtrr_del_page(ret, 0, 0);
         }
     }
     break;
@@ -75,7 +76,7 @@ long do_platform_op(XEN_GUEST_HANDLE(xen
             && (int)op->u.del_memtype.reg >= 0)
         {
             ret = mtrr_del_page(op->u.del_memtype.reg, 0, 0);
-            if (ret > 0)
+            if ( ret > 0 )
                 ret = 0;
         }
         else
@@ -96,16 +97,15 @@ long do_platform_op(XEN_GUEST_HANDLE(xen
             op->u.read_memtype.mfn     = mfn;
             op->u.read_memtype.nr_mfns = nr_mfns;
             op->u.read_memtype.type    = type;
-            (void)copy_to_guest(u_xenpf_op, op, 1);
-            ret = 0;
+            ret = copy_to_guest(u_xenpf_op, op, 1) ? -EFAULT : 0;
         }
     }
     break;
 
     case XENPF_microcode_update:
     {
-        extern int microcode_update(void *buf, unsigned long len);
-        ret = microcode_update(op->u.microcode.data.p,
+        extern int microcode_update(XEN_GUEST_HANDLE(void), unsigned long len);
+        ret = microcode_update(op->u.microcode.data,
                                op->u.microcode.length);
     }
     break;
diff -r 646a120334ef -r 79b56c02b836 xen/arch/x86/x86_32/asm-offsets.c
--- a/xen/arch/x86/x86_32/asm-offsets.c Thu Oct 05 16:21:39 2006 +0100
+++ b/xen/arch/x86/x86_32/asm-offsets.c Thu Oct 05 16:48:28 2006 +0100
@@ -118,7 +118,6 @@ void __dummy__(void)
     OFFSET(MULTICALL_arg3, struct multicall_entry, args[3]);
     OFFSET(MULTICALL_arg4, struct multicall_entry, args[4]);
     OFFSET(MULTICALL_arg5, struct multicall_entry, args[5]);
-    OFFSET(MULTICALL_arg6, struct multicall_entry, args[6]);
     OFFSET(MULTICALL_result, struct multicall_entry, result);
     BLANK();
 
diff -r 646a120334ef -r 79b56c02b836 xen/arch/x86/x86_64/asm-offsets.c
--- a/xen/arch/x86/x86_64/asm-offsets.c Thu Oct 05 16:21:39 2006 +0100
+++ b/xen/arch/x86/x86_64/asm-offsets.c Thu Oct 05 16:48:28 2006 +0100
@@ -112,7 +112,6 @@ void __dummy__(void)
     OFFSET(MULTICALL_arg3, struct multicall_entry, args[3]);
     OFFSET(MULTICALL_arg4, struct multicall_entry, args[4]);
     OFFSET(MULTICALL_arg5, struct multicall_entry, args[5]);
-    OFFSET(MULTICALL_arg6, struct multicall_entry, args[6]);
     OFFSET(MULTICALL_result, struct multicall_entry, result);
     BLANK();
 
diff -r 646a120334ef -r 79b56c02b836 xen/include/asm-x86/multicall.h
--- a/xen/include/asm-x86/multicall.h   Thu Oct 05 16:21:39 2006 +0100
+++ b/xen/include/asm-x86/multicall.h   Thu Oct 05 16:48:28 2006 +0100
@@ -16,7 +16,7 @@
             "    movq  "STR(MULTICALL_op)"(%0),%%rax; "      \
             "    cmpq  $("STR(NR_hypercalls)"),%%rax; "      \
             "    jae   2f; "                                 \
-            "    leaq  "STR(hypercall_table)"(%%rip),%%rdi; "\
+            "    leaq  hypercall_table(%%rip),%%rdi; "       \
             "    leaq  (%%rdi,%%rax,8),%%rax; "              \
             "    movq  "STR(MULTICALL_arg0)"(%0),%%rdi; "    \
             "    movq  "STR(MULTICALL_arg1)"(%0),%%rsi; "    \

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>