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

[Xen-changelog] Merged.



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 80e393599413fdcd38b1e438042e22d218bec272
# Parent  418954da5c0f58bc856893f3850b0d97deb143ec
# Parent  c640c0c7f821a202fecda775811184d1cf851cbe
Merged.

diff -r 418954da5c0f -r 80e393599413 docs/man/xm.pod.1
--- a/docs/man/xm.pod.1 Thu Nov 17 11:59:12 2005
+++ b/docs/man/xm.pod.1 Thu Nov 17 11:59:58 2005
@@ -550,10 +550,10 @@
 
 =item B<sched-sedf> I<period> I<slice> I<latency-hint> I<extratime> I<weight>
 
-Set Simple EDF scheduler parameters.  This scheduler provides weighted
-CPU sharing in an intuitive way and uses realtime-algorithms to ensure
-time guarantees.  For more information see
-docs/misc/sedf_scheduler_mini-HOWTO.txt in the Xen distribution.
+Set Simple EDF (Earliest Deadline First) scheduler parameters.  This
+scheduler provides weighted CPU sharing in an intuitive way and uses
+realtime-algorithms to ensure time guarantees.  For more information
+see docs/misc/sedf_scheduler_mini-HOWTO.txt in the Xen distribution.
 
 B<PARAMETERS>
 
@@ -640,10 +640,53 @@
 
 =head2 NETWORK DEVICES
 
-=item B<network-attach> I<domain-id> I<[script=script]> I<[ip=ipaddr]>
+=item B<network-attach> I<domain-id> I<[script=scriptname]> I<[ip=ipaddr]>
 I<[mac=macaddr]> I<[bridge=bridge-name]> I<[backend=bedomain-id]>
 
+Creates a new network device in the domain specified by domain-id.  It
+takes the following optional options:
+
+B<OPTIONS>
+
+=over 4
+
+=item I<script=scriptname>
+
+Use the specified script name to bring up the network.  Defaults to
+the default setting in xend-config.sxp for I<vif-script>.
+
+=item I<ip=ipaddr>
+
+Passes the specified IP Address to the adapter on creation.  
+
+FIXME: this currently appears to be B<broken>.  I'm not sure under what
+circumstances this should actually work.
+
+=item I<mac=macaddr>
+
+The MAC address that the domain will see on its ethernet device.  If
+the device is not specified it will be randomly generated with the
+00:16:3e vendor id prefix.
+
+=item I<bridge=bridge-name>
+
+The name of the bridge to attach the vif to, in case you have more
+than one.  This defaults to 
+
+=item I<backend=bedomain-id>
+
+The backend domain id.  By default this is domain 0.
+
+=back
+
 =item B<network-detach> I<domain-id> I<devid>
+
+Removes the network device from the domain specified by I<domain-id>.
+I<devid> is the virtual interface device number within the domain
+(i.e. the 3 in vif22.3).
+
+FIXME: this is currently B<broken>.  Network devices aren't completely
+removed from domain 0.
 
 =item B<network-list> I<domain-id>
 
diff -r 418954da5c0f -r 80e393599413 docs/src/user/installation.tex
--- a/docs/src/user/installation.tex    Thu Nov 17 11:59:12 2005
+++ b/docs/src/user/installation.tex    Thu Nov 17 11:59:58 2005
@@ -24,11 +24,6 @@
 \item [$\dag$] The Linux hotplug system\footnote{Available from {\tt
       http://linux-hotplug.sourceforge.net/}} (e.g., \path{/sbin/hotplug}
       and related scripts)
-\item [$\dag$] An installation of Twisted~v1.3 or
-  above\footnote{Available from {\tt http://www.twistedmatrix.com}}.
-  There may be a binary package available for your distribution;
-  alternatively it can be installed by running `{\sl make
-    install-twisted}' in the root of the Xen source tree.
 \item [$*$] Build tools (gcc v3.2.x or v3.3.x, binutils, GNU make).
 \item [$*$] Development installation of libcurl (e.g.,\ libcurl-devel).
 \item [$*$] Development installation of zlib (e.g.,\ zlib-dev).
diff -r 418954da5c0f -r 80e393599413 
linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c
--- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Thu Nov 17 
11:59:12 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Thu Nov 17 
11:59:58 2005
@@ -219,7 +219,6 @@
 
 #ifndef __ia64__
        case IOCTL_PRIVCMD_GET_MACH2PHYS_MFNS: {
-
                pgd_t *pgd; 
                pud_t *pud; 
                pmd_t *pmd; 
@@ -235,13 +234,13 @@
 
                p = m.arr; 
 
-               for(i=0; i < m.num; i++) { 
-
+               for (i=0; i < m.num; i++) { 
                        pgd = pgd_offset_k(m2pv);
                        pud = pud_offset(pgd, m2pv);
                        pmd = pmd_offset(pud, m2pv);
-                       m2p_mfn = (*(uint64_t *)pmd >> PAGE_SHIFT)&0xFFFFFFFF;
-                       
+                       m2p_mfn  = (*(uint64_t *)pmd >> PAGE_SHIFT)&0xFFFFFFFF;
+                       m2p_mfn += pte_index(m2pv);
+
                        if (put_user(m2p_mfn, p + i))
                                return -EFAULT;
 
diff -r 418954da5c0f -r 80e393599413 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Thu Nov 17 
11:59:12 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Thu Nov 17 
11:59:58 2005
@@ -299,8 +299,8 @@
 
        DPRINTK("state is %d, %s, %s",
                state, dev->otherend_watch.node, vec[XS_WATCH_PATH]);
-
-       drv->otherend_changed(dev, state);
+       if (drv->otherend_changed)
+               drv->otherend_changed(dev, state);
 }
 
 
diff -r 418954da5c0f -r 80e393599413 tools/libxc/xc_linux_restore.c
--- a/tools/libxc/xc_linux_restore.c    Thu Nov 17 11:59:12 2005
+++ b/tools/libxc/xc_linux_restore.c    Thu Nov 17 11:59:58 2005
@@ -146,7 +146,7 @@
     unsigned long buf[PAGE_SIZE/sizeof(unsigned long)];
 
     struct mmuext_op pin[MAX_PIN_BATCH];
-    unsigned int nr_pins = 0;
+    unsigned int nr_pins; 
 
 
     max_pfn = nr_pfns; 
@@ -501,7 +501,16 @@
      * Pin page tables. Do this after writing to them as otherwise Xen
      * will barf when doing the type-checking.
      */
+    nr_pins = 0; 
     for (i = 0; i < max_pfn; i++) {
+
+        if (i == (max_pfn-1) || nr_pins == MAX_PIN_BATCH) {
+            if (xc_mmuext_op(xc_handle, pin, nr_pins, dom) < 0) { 
+                ERR("Failed to pin batch of %d page tables", nr_pins); 
+                goto out;
+            } 
+            nr_pins = 0;
+        }
 
         if ( (pfn_type[i] & LPINTAB) == 0 )
             continue;
@@ -529,16 +538,8 @@
         }
 
         pin[nr_pins].arg1.mfn = p2m[i];
-
-        nr_pins ++; 
-        
-        if (i == (max_pfn-1) || nr_pins == MAX_PIN_BATCH) {
-            if (xc_mmuext_op(xc_handle, pin, nr_pins, dom) < 0) { 
-                ERR("Failed to pin batch of %d page tables", nr_pins); 
-                goto out;
-            } 
-            nr_pins = 0;
-        }
+        nr_pins++; 
+
     }
 
     DPRINTF("\b\b\b\b100%%\n");
diff -r 418954da5c0f -r 80e393599413 tools/xm-test/README
--- a/tools/xm-test/README      Thu Nov 17 11:59:12 2005
+++ b/tools/xm-test/README      Thu Nov 17 11:59:58 2005
@@ -38,26 +38,60 @@
 downloaded, extracted, and compiled.  Due to the need to create
 special files, this process must be done as root:
 
+   # ./autogen
    # ./configure
    # make
 
-NB: If you have the initrd.img from a previous version of xm-test, you
-can copy it into the ramdisk directory to eliminate the need to
-rebuild it.  So far, nothing has changed in the ramdisk since xm-test
-version 0.1.1.  If you do this, there is no need to run 'make' again.
+NB: If you have the initrd.img from another installation of xm-test,
+you can copy it into the ramdisk directory to eliminate the need to
+rebuild it.  If you do this, there is no need to run 'make' again.
 Simply copy the initrd.img file into ramdisk/ and then run the
-runtest.sh script.
+runtest.sh script.  Note that in general, you should not attempt to
+use a ramdisk from a previous minor version of xm-test (i.e., don't
+use a ramdisk from 0.4.0 with 0.5.0.  0.5.0 should work for 0.5.3
+though)
 
 
 Running
 =======
 
-By running "./runtest.sh logfile" at the top level, all tests will be
-run in alphabetic order.  To run a specific test group, run "make
-check" from inside that group directory.  For example:
+To run the full test suite, do the following as root:
+
+   # ./runtest.sh <logfile>
+
+This will run all tests, as well as generate and submit a report at
+the end.  All output files will begin with "<logfile>."  If you wish to
+prevent submission of a report, add "-d" to the command line like this:
+
+   # ./runtest.sh -d <logfile>
+
+It may be useful to run tests without submission as above, and then
+submit the report at a later time.  To do so, run runtest.sh with the
+-s flag and the name of the previously-generated report:
+
+   # ./runtest.sh -s <logfile>
+
+For people needing a quick test run instead the full suite, a quick
+mode has been added that will attempt to run a representative subset
+of tests.  This is not a substitute for the whole suite, but will
+verify that some of the major functions of xen and xm are working:
+
+   # ./runtest.sh -q <logfile>
+
+Because of the current structure of the reporting software, submission
+of quick test run results is not supported.
+
+It may be desirable to run a specific test group.  This can be
+accomplished by doing the following:
 
    # cd tests/create
-   # make check
+   # TEST_VERBOSE=1 make check
+
+When developing or debugging a specific feature, a single test can be
+run to avoid having to run even a whole test group:
+
+   # cd tests/create
+   # TEST_VERBOSE=1 make check TESTS=01_create_basic_pos.test
 
 The runtest.sh script will create several files, including a .report
 file, which is the cleaned up, email-friendly report of failures.
@@ -69,15 +103,9 @@
 allocated to Dom0.  More memory available for allocation to DomUs
 means a more rigorous test.
 
-If you wish to run xm-test in an automated batch environment, you can
-run the script with the "-b" flag, which will try to prevent it from
-asking any questions interactively.  You should run it manually at
-least once to generate the "contact_info" file, which will be used in
-subsequent runs.
-
-BIG FAT WARNING: The framework assumes it is running on a dedicated
-machine.  As such, the library automatically destroys any running
-DomUs on the sytem to provide each test with a "clean slate".
+BIG FAT WARNING: The test framework assumes it is running on a
+dedicated machine.  As such, the library automatically destroys any
+running DomUs on the system to provide each test with a "clean slate".
 
 
 Extending
@@ -99,6 +127,9 @@
 subcommand itself.  The "Makefile.am.template" should be copied into
 the new group directory as "Makefile.am".
 
+See the Writing_Tests_HOWTO file for more detailed information on
+adding tests to the suite.
+
 
 Developer Notes
 ===============
@@ -114,21 +145,6 @@
 Known Issues
 ============
 
-- 08/22/2005 Dan Smith:
-    Current versions of Xen experience long delays on
-    boot, due to the blkif frontend waiting (and timing
-    out) for the backend.  We now implicitly introduce
-    a pause in XmTestDomain.start() to remedy
-    this across all tests that need it.
-
-- 09/22/2005 Dan Smith:
-    The save, restore, and migrate tests have been turned
-    back on, as we have implemented timeout functionality 
-    in "traceCommand".  Since migrate is known to hang, we 
-    can now safely include it in the default test run, and
-    have it be killed if it never finishes.  As before,
-    feedback about these tests would be specifically
-    appreciated.
 
 Reporting Bugs
 ==============
diff -r 418954da5c0f -r 80e393599413 tools/xm-test/lib/XmTestLib/Console.py
--- a/tools/xm-test/lib/XmTestLib/Console.py    Thu Nov 17 11:59:12 2005
+++ b/tools/xm-test/lib/XmTestLib/Console.py    Thu Nov 17 11:59:58 2005
@@ -33,9 +33,13 @@
 
 from Test import *
 
+TIMEDOUT = 1
+RUNAWAY  = 2
+
 class ConsoleError(Exception):
-    def __init__(self, msg):
+    def __init__(self, msg, reason=TIMEDOUT):
         self.errMsg = msg
+        self.reason = reason
 
     def __str__(self):
         return str(self.errMsg)
@@ -149,7 +153,7 @@
 
             if self.limit and bytes >= self.limit:
                 raise ConsoleError("Console run-away (exceeded %i bytes)"
-                                   % self.limit)
+                                   % self.limit, RUNAWAY)
 
         if self.debugMe:
             print "Ignored %i bytes of miscellaneous console output" % bytes
@@ -187,7 +191,7 @@
 
             if self.limit and bytes >= self.limit:
                 raise ConsoleError("Console run-away (exceeded %i bytes)"
-                                   % self.limit)
+                                   % self.limit, RUNAWAY)
 
             if str == "\n":
                 if lines > 0:
diff -r 418954da5c0f -r 80e393599413 
tools/xm-test/tests/memset/04_memset_smallmem_pos.py
--- a/tools/xm-test/tests/memset/04_memset_smallmem_pos.py      Thu Nov 17 
11:59:12 2005
+++ b/tools/xm-test/tests/memset/04_memset_smallmem_pos.py      Thu Nov 17 
11:59:58 2005
@@ -36,6 +36,17 @@
     # See if this hits the byte limit
     console.runCmd("ls")
 except ConsoleError, e:
-    FAIL(str(e))
+    if e.reason == RUNAWAY:
+        # Need to stop the domain before we restart the console daemon
+        domain.destroy()
+        if verbose:
+            print "*** Attempting restart of xenconsoled"
+            s, o = traceCommand("killall xenconsoled")
+            s, o = traceCommand("xenconsoled")
+            if s != 0:
+                print "*** Starting xenconsoled failed: %i" % s
+        FAIL("Bug #380: I crashed the console system")
+    else:
+        FAIL(str(e))
 
 domain.destroy()
diff -r 418954da5c0f -r 80e393599413 
tools/xm-test/tests/pause/01_pause_basic_pos.py
--- a/tools/xm-test/tests/pause/01_pause_basic_pos.py   Thu Nov 17 11:59:12 2005
+++ b/tools/xm-test/tests/pause/01_pause_basic_pos.py   Thu Nov 17 11:59:58 2005
@@ -49,12 +49,9 @@
 if status != 0:
        FAIL("xm pause returned invalid %i != 0", status)
 
-# Attach a console to it
+# Try to attach a console to it
 try:
     console = XmConsole(domain.getName(), historySaveCmds=True)
-except ConsoleError, e:
-    FAIL(str(e))
-try:
     run = console.runCmd("ls")
     #If we get here, console attached to paused domain (unexpected)
     FAIL("console attached to supposedly paused domain")
diff -r 418954da5c0f -r 80e393599413 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Thu Nov 17 11:59:12 2005
+++ b/xen/arch/x86/domain.c     Thu Nov 17 11:59:58 2005
@@ -240,7 +240,10 @@
 
 void free_perdomain_pt(struct domain *d)
 {
-    free_xenheap_page(d->arch.mm_perdomain_pt);
+    free_xenheap_pages(
+        d->arch.mm_perdomain_pt,
+        get_order_from_bytes(PDPT_L1_ENTRIES * sizeof(l1_pgentry_t)));
+
 #ifdef __x86_64__
     free_xenheap_page(d->arch.mm_perdomain_l2);
     free_xenheap_page(d->arch.mm_perdomain_l3);
@@ -251,7 +254,7 @@
 {
     struct domain *d = v->domain;
     l1_pgentry_t gdt_l1e;
-    int vcpuid;
+    int vcpuid, pdpt_order;
 
     if ( is_idle_task(d) )
         return;
@@ -263,13 +266,10 @@
     v->vcpu_info = &d->shared_info->vcpu_data[v->vcpu_id];
     v->cpumap = CPUMAP_RUNANYWHERE;
     SHARE_PFN_WITH_DOMAIN(virt_to_page(d->shared_info), d);
-    set_pfn_from_mfn(virt_to_phys(d->shared_info) >> PAGE_SHIFT,
-            INVALID_M2P_ENTRY);
-
-    d->arch.mm_perdomain_pt = alloc_xenheap_page();
-    memset(d->arch.mm_perdomain_pt, 0, PAGE_SIZE);
-    set_pfn_from_mfn(virt_to_phys(d->arch.mm_perdomain_pt) >> PAGE_SHIFT,
-            INVALID_M2P_ENTRY);
+
+    pdpt_order = get_order_from_bytes(PDPT_L1_ENTRIES * sizeof(l1_pgentry_t));
+    d->arch.mm_perdomain_pt = alloc_xenheap_pages(pdpt_order);
+    memset(d->arch.mm_perdomain_pt, 0, PAGE_SIZE << pdpt_order);
     v->arch.perdomain_ptes = d->arch.mm_perdomain_pt;
 
     /*
@@ -293,9 +293,11 @@
 
     d->arch.mm_perdomain_l2 = alloc_xenheap_page();
     memset(d->arch.mm_perdomain_l2, 0, PAGE_SIZE);
-    d->arch.mm_perdomain_l2[l2_table_offset(PERDOMAIN_VIRT_START)] =
-        l2e_from_page(virt_to_page(d->arch.mm_perdomain_pt),
-                        __PAGE_HYPERVISOR);
+    for ( i = 0; i < (1 << pdpt_order); i++ )
+        d->arch.mm_perdomain_l2[l2_table_offset(PERDOMAIN_VIRT_START)+i] =
+            l2e_from_page(virt_to_page(d->arch.mm_perdomain_pt)+i,
+                          __PAGE_HYPERVISOR);
+
     d->arch.mm_perdomain_l3 = alloc_xenheap_page();
     memset(d->arch.mm_perdomain_l3, 0, PAGE_SIZE);
     d->arch.mm_perdomain_l3[l3_table_offset(PERDOMAIN_VIRT_START)] =
diff -r 418954da5c0f -r 80e393599413 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Thu Nov 17 11:59:12 2005
+++ b/xen/arch/x86/mm.c Thu Nov 17 11:59:58 2005
@@ -738,7 +738,7 @@
     memcpy(&pl2e[L2_PAGETABLE_FIRST_XEN_SLOT & (L2_PAGETABLE_ENTRIES-1)],
            &idle_pg_table_l2[L2_PAGETABLE_FIRST_XEN_SLOT],
            L2_PAGETABLE_XEN_SLOTS * sizeof(l2_pgentry_t));
-    for ( i = 0; i < (PERDOMAIN_MBYTES >> (L2_PAGETABLE_SHIFT - 20)); i++ )
+    for ( i = 0; i < PDPT_L2_ENTRIES; i++ )
         pl2e[l2_table_offset(PERDOMAIN_VIRT_START) + i] =
             l2e_from_page(
                 virt_to_page(page_get_owner(page)->arch.mm_perdomain_pt) + i,
diff -r 418954da5c0f -r 80e393599413 xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c     Thu Nov 17 11:59:12 2005
+++ b/xen/arch/x86/shadow.c     Thu Nov 17 11:59:58 2005
@@ -2710,7 +2710,7 @@
            &idle_pg_table_l2[L2_PAGETABLE_FIRST_XEN_SLOT],
            L2_PAGETABLE_XEN_SLOTS * sizeof(l2_pgentry_t));       
 
-        for ( i = 0; i < (PERDOMAIN_MBYTES >> (L2_PAGETABLE_SHIFT - 20)); i++ )
+        for ( i = 0; i < PDPT_L2_ENTRIES; i++ )
             spl2e[l2_table_offset(PERDOMAIN_VIRT_START) + i] =
                 l2e_from_page(
                     
virt_to_page(page_get_owner(&frame_table[gmfn])->arch.mm_perdomain_pt) + i, 
diff -r 418954da5c0f -r 80e393599413 xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h      Thu Nov 17 11:59:12 2005
+++ b/xen/include/asm-x86/config.h      Thu Nov 17 11:59:58 2005
@@ -291,6 +291,9 @@
 
 #define PDPT_VCPU_SHIFT       5
 #define PDPT_VCPU_VA_SHIFT    (PDPT_VCPU_SHIFT + PAGE_SHIFT)
+#define PDPT_L1_ENTRIES       (MAX_VIRT_CPUS << PDPT_VCPU_SHIFT)
+#define PDPT_L2_ENTRIES       \
+    ((PDPT_L1_ENTRIES + (1 << PAGETABLE_ORDER) - 1) >> PAGETABLE_ORDER)
 
 #if defined(__x86_64__)
 #define ELFSIZE 64

_______________________________________________
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®.