[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] merge with xen-unstable.hg



# HG changeset patch
# User awilliam@xxxxxxxxxxxx
# Date 1170028032 25200
# Node ID 7286802c961935926d06ac35b958780f3177b95e
# Parent  e5cfd902d7e426702adf446cf01d5a3c36a9c3e5
# Parent  f8ddcb7581173f1b3a756a1cb96491ec1ff65403
merge with xen-unstable.hg
---
 tools/firmware/hvmloader/32bitbios_support.c      |    7 +++-
 tools/firmware/rombios/32bit/Makefile             |    2 -
 tools/firmware/rombios/32bit/tcgbios/Makefile     |    2 -
 tools/python/xen/xend/XendDomain.py               |    3 +
 tools/python/xen/xend/server/ConsoleController.py |    2 +
 tools/python/xen/xm/main.py                       |   13 +++++++
 tools/xenstat/xentop/xentop.c                     |    6 ++-
 xen/arch/x86/hvm/hvm.c                            |   19 +++++++++++
 xen/common/libelf/libelf-private.h                |   36 ++++++++++++----------
 xen/common/libelf/libelf-tools.c                  |    4 +-
 xen/include/Makefile                              |    4 +-
 xen/include/public/domctl.h                       |    2 -
 xen/include/public/foreign/mkheader.py            |    4 +-
 xen/include/public/libelf.h                       |   33 ++++----------------
 xen/tools/compat-build-header.py                  |    2 -
 15 files changed, 84 insertions(+), 55 deletions(-)

diff -r e5cfd902d7e4 -r 7286802c9619 
tools/firmware/hvmloader/32bitbios_support.c
--- a/tools/firmware/hvmloader/32bitbios_support.c      Sun Jan 28 16:37:02 
2007 -0700
+++ b/tools/firmware/hvmloader/32bitbios_support.c      Sun Jan 28 16:47:12 
2007 -0700
@@ -17,7 +17,12 @@
  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
  * Place - Suite 330, Boston, MA 02111-1307 USA.
  */
+#include <inttypes.h>
 #include <elf.h>
+#ifdef __sun__
+#include <sys/machelf.h>
+#endif
+
 #include <xen/hvm/e820.h>
 #include "util.h"
 #include "config.h"
@@ -35,7 +40,7 @@ static int relocate_elf(unsigned char *e
     int i;
 
     if (ehdr->e_type != ET_REL) {
-        printf("Not a relocatabel BIOS object file. Has type %d, need %d\n",
+        printf("Not a relocatable BIOS object file. Has type %d, need %d\n",
                ehdr->e_type, ET_REL);
         return -1;
     }
diff -r e5cfd902d7e4 -r 7286802c9619 tools/firmware/rombios/32bit/Makefile
--- a/tools/firmware/rombios/32bit/Makefile     Sun Jan 28 16:37:02 2007 -0700
+++ b/tools/firmware/rombios/32bit/Makefile     Sun Jan 28 16:47:12 2007 -0700
@@ -30,7 +30,7 @@ clean:
        done;
 
 $(TARGET): subdirs 32bitbios.o util.o
-       ld $(LDFLAGS_DIRECT) -r 32bitbios.o $(MODULES) util.o -o 32bitbios_all.o
+       $(LD) $(LDFLAGS_DIRECT) -r 32bitbios.o $(MODULES) util.o -o 
32bitbios_all.o
        @nm 32bitbios_all.o |                                \
          grep -E -q '^ +U ' && {                            \
            echo "There are undefined symbols in the BIOS:"; \
diff -r e5cfd902d7e4 -r 7286802c9619 
tools/firmware/rombios/32bit/tcgbios/Makefile
--- a/tools/firmware/rombios/32bit/tcgbios/Makefile     Sun Jan 28 16:37:02 
2007 -0700
+++ b/tools/firmware/rombios/32bit/tcgbios/Makefile     Sun Jan 28 16:47:12 
2007 -0700
@@ -19,4 +19,4 @@ clean:
        rm -rf *.o $(TARGET)
 
 $(TARGET): $(OBJECTS)
-       ld $(LDFLAGS_DIRECT) -r $^ -o $@
+       $(LD) $(LDFLAGS_DIRECT) -r $^ -o $@
diff -r e5cfd902d7e4 -r 7286802c9619 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Sun Jan 28 16:37:02 2007 -0700
+++ b/tools/python/xen/xend/XendDomain.py       Sun Jan 28 16:47:12 2007 -0700
@@ -943,6 +943,9 @@ class XendDomain:
                                  POWER_STATE_NAMES[dominfo.state])
             
             dominfo.start(is_managed = True)
+            self.domain_sched_credit_set(dominfo.getDomid(),
+                                         dominfo.getWeight(),
+                                         dominfo.getCap())
         finally:
             self.domains_lock.release()
         dominfo.waitForDevices()
diff -r e5cfd902d7e4 -r 7286802c9619 
tools/python/xen/xend/server/ConsoleController.py
--- a/tools/python/xen/xend/server/ConsoleController.py Sun Jan 28 16:37:02 
2007 -0700
+++ b/tools/python/xen/xend/server/ConsoleController.py Sun Jan 28 16:47:12 
2007 -0700
@@ -27,3 +27,5 @@ class ConsoleController(DevController):
                        if val != None])
         return config
 
+    def migrate(self, deviceConfig, network, dst, step, domName):
+        return 0
diff -r e5cfd902d7e4 -r 7286802c9619 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Sun Jan 28 16:37:02 2007 -0700
+++ b/tools/python/xen/xm/main.py       Sun Jan 28 16:47:12 2007 -0700
@@ -706,6 +706,15 @@ def parse_doms_info(info):
         'seclabel' : security.get_security_printlabel(info),
         }
 
+def check_sched_type(sched):
+    current = 'unknown'
+    for x in server.xend.node.info()[1:]:
+        if len(x) > 1 and x[0] == 'xen_scheduler':
+            current = x[1]
+            break
+    if sched != current:
+        err("Xen is running with the %s scheduler" % current)
+        sys.exit(1)
 
 def parse_sedf_info(info):
     def get_info(n, t, d):
@@ -1098,6 +1107,8 @@ def xm_sched_sedf(args):
         print( ("%(name)-32s %(domid)3d %(period)9.1f %(slice)9.1f" +
                 " %(latency)7.1f %(extratime)6d %(weight)6d") % info)
 
+    check_sched_type('sedf')
+
     # we want to just display current info if no parameters are passed
     if len(args) == 0:
         domid = None
@@ -1170,6 +1181,8 @@ def xm_sched_credit(args):
 def xm_sched_credit(args):
     """Get/Set options for Credit Scheduler."""
     
+    check_sched_type('credit')
+
     try:
         opts, params = getopt.getopt(args, "d:w:c:",
             ["domain=", "weight=", "cap="])
diff -r e5cfd902d7e4 -r 7286802c9619 tools/xenstat/xentop/xentop.c
--- a/tools/xenstat/xentop/xentop.c     Sun Jan 28 16:37:02 2007 -0700
+++ b/tools/xenstat/xentop/xentop.c     Sun Jan 28 16:47:12 2007 -0700
@@ -998,9 +998,11 @@ int main(int argc, char **argv)
 
        while ((opt = getopt_long(argc, argv, sopts, lopts, &optind)) != -1) {
                switch (opt) {
+               default:
+                       usage(argv[0]);
+                       exit(1);
+               case '?':
                case 'h':
-               case '?':
-               default:
                        usage(argv[0]);
                        exit(0);
                case 'V':
diff -r e5cfd902d7e4 -r 7286802c9619 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Sun Jan 28 16:37:02 2007 -0700
+++ b/xen/arch/x86/hvm/hvm.c    Sun Jan 28 16:47:12 2007 -0700
@@ -189,9 +189,26 @@ void hvm_domain_destroy(struct domain *d
         unmap_domain_page_global((void *)d->arch.hvm_domain.buffered_io_va);
 }
 
+#define HVM_VCPU_CTXT_MAGIC 0x85963130
+void hvm_save_cpu_ctxt(hvm_domain_context_t *h, void *opaque)
+{
+    struct vcpu *v = opaque;
+
+    if ( test_bit(_VCPUF_down, &v->vcpu_flags) ) {
+        hvm_put_32u(h, 0x0);
+        return;
+    }
+
+    hvm_put_32u(h, HVM_VCPU_CTXT_MAGIC);
+    hvm_funcs.save_cpu_ctxt(h, opaque);
+}
+
 int hvm_load_cpu_ctxt(hvm_domain_context_t *h, void *opaque, int version)
 {
     struct vcpu *v = opaque;
+
+    if ( hvm_get_32u(h) != HVM_VCPU_CTXT_MAGIC )
+        return 0;
 
     if ( hvm_funcs.load_cpu_ctxt(h, opaque, version) < 0 )
         return -EINVAL;
@@ -208,7 +225,7 @@ int hvm_vcpu_initialise(struct vcpu *v)
     int rc;
 
     hvm_register_savevm(v->domain, "xen_hvm_cpu", v->vcpu_id, 1,
-                        hvm_funcs.save_cpu_ctxt, hvm_load_cpu_ctxt, 
+                        hvm_save_cpu_ctxt, hvm_load_cpu_ctxt, 
                         (void *)v);
 
     if ( (rc = vlapic_init(v)) != 0 )
diff -r e5cfd902d7e4 -r 7286802c9619 xen/common/libelf/libelf-private.h
--- a/xen/common/libelf/libelf-private.h        Sun Jan 28 16:37:02 2007 -0700
+++ b/xen/common/libelf/libelf-private.h        Sun Jan 28 16:47:12 2007 -0700
@@ -1,7 +1,13 @@
+#ifndef __LIBELF_PRIVATE_H__
+#define __LIBELF_PRIVATE_H_
+
 #ifdef __XEN__
 
+#include <xen/config.h>
+#include <xen/types.h>
 #include <xen/string.h>
 #include <xen/lib.h>
+#include <asm/byteorder.h>
 #include <public/elfnote.h>
 #include <public/libelf.h>
 
@@ -11,29 +17,25 @@
        printk(fmt, ## args )
 
 #define strtoull(str, end, base) simple_strtoull(str, end, base)
-#define bswap_16(x) \
-     ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
-#define bswap_32(x) \
-     (  (((x) & 0xff000000) >> 24)  \
-      | (((x) & 0x00ff0000) >>  8)  \
-      | (((x) & 0x0000ff00) <<  8)  \
-      | (((x) & 0x000000ff) << 24))
-#define bswap_64(x) \
-     (  (((x) & 0xff00000000000000ull) >> 56)  \
-      | (((x) & 0x00ff000000000000ull) >> 40)  \
-      | (((x) & 0x0000ff0000000000ull) >> 24)  \
-      | (((x) & 0x000000ff00000000ull) >> 8)   \
-      | (((x) & 0x00000000ff000000ull) << 8)   \
-      | (((x) & 0x0000000000ff0000ull) << 24)  \
-      | (((x) & 0x000000000000ff00ull) << 40)  \
-      | (((x) & 0x00000000000000ffull) << 56))
+#define bswap_16(x) swab16(x)
+#define bswap_32(x) swab32(x)
+#define bswap_64(x) swab64(x)
 
 #else /* !__XEN__ */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stddef.h>
+#include <inttypes.h>
+#ifdef __sun__
+#include <sys/byteorder.h>
+#define bswap_16(x) BSWAP_16(x)
+#define bswap_32(x) BSWAP_32(x)
+#define bswap_64(x) BSWAP_64(x)
+#else
 #include <byteswap.h>
+#endif
 #include <xen/elfnote.h>
 #include <xen/libelf.h>
 
@@ -49,3 +51,5 @@
        } while (0)
 
 #endif
+
+#endif /* __LIBELF_PRIVATE_H_ */
diff -r e5cfd902d7e4 -r 7286802c9619 xen/common/libelf/libelf-tools.c
--- a/xen/common/libelf/libelf-tools.c  Sun Jan 28 16:37:02 2007 -0700
+++ b/xen/common/libelf/libelf-tools.c  Sun Jan 28 16:47:12 2007 -0700
@@ -7,7 +7,7 @@
 /* ------------------------------------------------------------------------ */
 
 uint64_t elf_access_unsigned(struct elf_binary * elf, const void *ptr,
-                            off_t offset, size_t size)
+                            uint64_t offset, size_t size)
 {
     int need_swap = elf_swap(elf);
     const uint8_t *u8;
@@ -35,7 +35,7 @@ uint64_t elf_access_unsigned(struct elf_
 }
 
 int64_t elf_access_signed(struct elf_binary *elf, const void *ptr,
-                         off_t offset, size_t size)
+                         uint64_t offset, size_t size)
 {
     int need_swap = elf_swap(elf);
     const int8_t *s8;
diff -r e5cfd902d7e4 -r 7286802c9619 xen/include/Makefile
--- a/xen/include/Makefile      Sun Jan 28 16:37:02 2007 -0700
+++ b/xen/include/Makefile      Sun Jan 28 16:47:12 2007 -0700
@@ -30,8 +30,8 @@ cppflags-$(CONFIG_X86)    += -m32
 cppflags-$(CONFIG_X86)    += -m32
 
 # 8-byte types are 4-byte aligned on x86_32 ...
-prefix-$(CONFIG_X86)      := \#pragma pack(push, 4)
-suffix-$(CONFIG_X86)      := \#pragma pack(pop)
+prefix-$(CONFIG_X86)      := \#pragma pack(4)
+suffix-$(CONFIG_X86)      := \#pragma pack()
 
 endif
 
diff -r e5cfd902d7e4 -r 7286802c9619 xen/include/public/domctl.h
--- a/xen/include/public/domctl.h       Sun Jan 28 16:37:02 2007 -0700
+++ b/xen/include/public/domctl.h       Sun Jan 28 16:47:12 2007 -0700
@@ -386,7 +386,7 @@ typedef struct xen_domctl_settimeoffset 
 typedef struct xen_domctl_settimeoffset xen_domctl_settimeoffset_t;
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_settimeoffset_t);
  
-#define HVM_CTXT_SIZE        6144
+#define HVM_CTXT_SIZE        8192
 typedef struct hvm_domain_context {
     uint32_t cur;
     uint32_t size;
diff -r e5cfd902d7e4 -r 7286802c9619 xen/include/public/foreign/mkheader.py
--- a/xen/include/public/foreign/mkheader.py    Sun Jan 28 16:37:02 2007 -0700
+++ b/xen/include/public/foreign/mkheader.py    Sun Jan 28 16:47:12 2007 -0700
@@ -24,10 +24,10 @@ inttypes["x86_32"] = {
 };
 header["x86_32"] = """
 #define __i386___X86_32 1
-#pragma pack(push, 4)
+#pragma pack(4)
 """;
 footer["x86_32"] = """
-#pragma pack(pop)
+#pragma pack()
 """;
 
 # x86_64
diff -r e5cfd902d7e4 -r 7286802c9619 xen/include/public/libelf.h
--- a/xen/include/public/libelf.h       Sun Jan 28 16:37:02 2007 -0700
+++ b/xen/include/public/libelf.h       Sun Jan 28 16:47:12 2007 -0700
@@ -1,25 +1,12 @@
 #ifndef __XC_LIBELF__
 #define __XC_LIBELF__ 1
 
-#ifdef __XEN__
-
-#include <xen/inttypes.h>
-#include <public/features.h>
-typedef uint64_t off_t;
-
-#define LITTLE_ENDIAN 1234
-#define BIG_ENDIAN    4321
 #if defined(__i386__) || defined(__x86_64) || defined(__ia64__)
-#define BYTE_ORDER LITTLE_ENDIAN
+#define XEN_ELF_LITTLE_ENDIAN
 #elif defined(__powerpc__)
-#define BYTE_ORDER BIG_ENDIAN
-#endif
-
-#else /* !__XEN__ */
-
-#include <stddef.h>
-#include <inttypes.h>
-
+#define XEN_ELF_BIG_ENDIAN
+#else
+#error define architectural endianness
 #endif
 
 #undef ELFSIZE
@@ -91,14 +78,10 @@ struct elf_binary {
 /* ------------------------------------------------------------------------ */
 /* accessing elf header fields                                              */
 
-#if !defined(BYTE_ORDER)
-# error BYTE_ORDER not defined
-#elif BYTE_ORDER == BIG_ENDIAN
+#ifdef XEN_ELF_BIG_ENDIAN
 # define NATIVE_ELFDATA ELFDATA2MSB
-#elif BYTE_ORDER == LITTLE_ENDIAN
+#else
 # define NATIVE_ELFDATA ELFDATA2LSB
-#else
-# error BYTE_ORDER unknown
 #endif
 
 #define elf_32bit(elf) (ELFCLASS32 == (elf)->class)
@@ -131,9 +114,9 @@ struct elf_binary {
        : sizeof((str)->e32))
 
 uint64_t elf_access_unsigned(struct elf_binary *elf, const void *ptr,
-                            off_t offset, size_t size);
+                            uint64_t offset, size_t size);
 int64_t elf_access_signed(struct elf_binary *elf, const void *ptr,
-                         off_t offset, size_t size);
+                         uint64_t offset, size_t size);
 
 uint64_t elf_round_up(struct elf_binary *elf, uint64_t addr);
 
diff -r e5cfd902d7e4 -r 7286802c9619 xen/tools/compat-build-header.py
--- a/xen/tools/compat-build-header.py  Sun Jan 28 16:37:02 2007 -0700
+++ b/xen/tools/compat-build-header.py  Sun Jan 28 16:47:12 2007 -0700
@@ -3,7 +3,7 @@ import re,sys
 import re,sys
 
 pats = [
- [ r"__InClUdE__", r"#include" ],
+ [ r"__InClUdE__(.*)", r"#include\1\n#pragma pack(4)" ],
  [ r"\"xen-compat.h\"", r"<public/xen-compat.h>" ],
  [ r"(struct|union|enum)\s+(xen_?)?(\w)", r"\1 compat_\3" ],
  [ r"@KeeP@", r"" ],

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.