diff options
author | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2003-08-27 21:24:41 +0000 |
---|---|---|
committer | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2003-08-27 21:24:41 +0000 |
commit | de0dff07cc4d4130b4bd28f4102bb9a62e2fc792 (patch) | |
tree | 15e51749367ccaff170b3dbb7365e3df9cb4451f | |
parent | a6505336e3bad11c6260962c17abf973ffa92cbf (diff) | |
download | xen-de0dff07cc4d4130b4bd28f4102bb9a62e2fc792.tar.gz xen-de0dff07cc4d4130b4bd28f4102bb9a62e2fc792.tar.bz2 xen-de0dff07cc4d4130b4bd28f4102bb9a62e2fc792.zip |
bitkeeper revision 1.396 (3f4d2199UsCzVuRmn-0-L6lh9VGYZg)
Many files:
Small cleanups. Faster checksum calculation for console UDP packets.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | xen/TODO | 51 | ||||
-rw-r--r-- | xen/common/domain.c | 17 | ||||
-rw-r--r-- | xen/common/kernel.c | 25 | ||||
-rw-r--r-- | xen/common/schedule.c | 1 | ||||
-rw-r--r-- | xen/common/timer.c | 8 | ||||
-rw-r--r-- | xen/tools/elf-reloc.c | 2 | ||||
-rw-r--r-- | xen/tools/figlet/figlet.c | 4 |
8 files changed, 28 insertions, 82 deletions
@@ -13,7 +13,7 @@ # the latest Java 2 SDK on your execution path: <http://java.sun.com> # Also, you will need Apache's 'ant' build tool: <http://ant.apache.org> # -# If you received this sourec as part of a Xen release, you should find +# If you received this source as part of a Xen release, you should find # that appropriate versions of the build tools are already installed in # the initial system setup. @@ -1,19 +1,15 @@ -This is stuff we probably want to implement in the near future. I -think I have them in a sensible priority order -- the first few would -be nice to fix before a code release. The later ones can be -longer-term goals. +This is stuff we probably want to implement in the near future. -- Keir (16/3/03) -1. ACCURATE TIMERS AND WALL-CLOCK TIME --------------------------------------- -Currently our long-term timebase free runs on CPU0, with no external -calibration. We should run ntpd on domain 0 and allow this to warp -Xen's timebase. Once this is done, we can have a timebase per CPU and -not worry about relative drift (since they'll all get sync'ed -periodically by ntp). +1. DOMAIN-0 MANAGEMENT DAEMON +----------------------------- +A better control daemon is required for domain 0, which keeps proper +track of machine resources and can make sensible policy choices. This +may require support in Xen; for example, notifications (eg. DOMn is +killed), and requests (eg. can DOMn allocate x frames of memory?). 2. ASSIGNING DOMAINS TO PROCESSORS ---------------------------------- @@ -27,42 +23,11 @@ relationships between processors in the system (eg. which ones are siblings in the same package). We then use this to balance domains across packages, and across virtual processors within a package. -3. DOMAIN 0 MANAGEMENT DAEMON ------------------------------ -A better control daemon is required for domain 0, which keeps proper -track of machine resources and can make sensible policy choices. This -may require support in Xen; for example, notifications (eg. DOMn is -killed), and requests (eg. can DOMn allocate x frames of memory?). - -4. SANE NETWORK ROUTING +3. SANE NETWORK ROUTING ----------------------- The current virtual firewall/router is completely broken. Needs a new design and implementation! -5. NETWORK CHECKSUM OFFLOAD ---------------------------- -All the NICs that we support can checksum packets on behalf of guest -OSes. We need to add appropriate flags to and from each domain to -indicate, on transmit, which packets need the checksum added and, on -receive, which packets have been checked out as okay. We can steal -Linux's interface, which is entirely sane given NIC limitations. - -6. MODULE SUPPORT FOR XEN -------------------------- -Network and blkdev drivers are bloating Xen. At some point we want to -build drivers as modules, stick them in a cheesy ramfs, then relocate -them one by one at boot time. If a driver duccessfully probes hardware -we keep it, otherwise we blow it away. Alternative is to have a -central PCI ID to driver name repository. We then use that to decide -which drivers to load. - -Most of the hard stuff (relocating and the like) is done for us by -Linux's module system. - -7. NEW DESIGN FEATURES ----------------------- -This includes the last-chance page cache, and the unified buffer cache. - Graveyard diff --git a/xen/common/domain.c b/xen/common/domain.c index de004b0d9d..029ed12e57 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -671,12 +671,13 @@ int setup_guestos(struct task_struct *p, dom0_newdomain_t *params, ((p->tot_pages - 1) << PAGE_SHIFT); virt_startinfo_address->dom_id = p->domain; - virt_startinfo_address->flags = IS_PRIV(p) ? SIF_PRIVILEGED : 0; - // guest os can have console if: - // 1) its privileged (need iopl right now) - // 2) its the owner of the console (and therefore will get kbd/mouse events) - // 3) xen hasnt tried to touch the console (see console.h) - virt_startinfo_address->flags |= (IS_PRIV(p) && CONSOLE_ISOWNER(p) ) ? SIF_CONSOLE : 0; + virt_startinfo_address->flags = 0; + if ( IS_PRIV(p) ) + { + virt_startinfo_address->flags |= SIF_PRIVILEGED; + if ( CONSOLE_ISOWNER(p) ) + virt_startinfo_address->flags |= SIF_CONSOLE; + } if ( initrd_len ) { @@ -717,10 +718,10 @@ int setup_guestos(struct task_struct *p, dom0_newdomain_t *params, } *dst = '\0'; - /* If this guy's getting the console we'd better let go */ + /* If this guy's getting the console we'd better let go. */ if ( virt_startinfo_address->flags & SIF_CONSOLE ) { - // should reset the console, but seems to work anyhow... + /* NB. Should reset the console here. */ opt_console = 0; } diff --git a/xen/common/kernel.c b/xen/common/kernel.c index 08c3213192..10a7555eee 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -458,25 +458,12 @@ asmlinkage long sys_ni_syscall(void) unsigned short compute_cksum(unsigned short *buf, int count) { - /* Function written by ek247 - * Computes IP and UDP checksum. - * To be used for the fake console packets - * created in console_export - */ - - unsigned long sum=0; - - while (count--) - { - sum+=*buf++; - if (sum & 0xFFFF0000) - { - //carry occured, so wrap around - sum &=0xFFFF; - sum++; - } - } - return ~(sum & 0xFFFF); + unsigned long sum = 0; + while ( count-- ) + sum += *buf++; + sum += sum >> 16; + sum += sum >> 16; + return (unsigned short)~sum; } diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 06f66518d4..94acfdc338 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -171,7 +171,6 @@ int wake_up(struct task_struct *p) p->state = TASK_RUNNING; __add_to_runqueue_head(p); - //__add_to_runqueue_tail(p); /* set the BVT parameters */ if (p->avt < schedule_data[p->processor].svt) diff --git a/xen/common/timer.c b/xen/common/timer.c index 20d45ccbe6..ebc7f8d3b0 100644 --- a/xen/common/timer.c +++ b/xen/common/timer.c @@ -280,7 +280,7 @@ static inline void cascade_timers(struct timer_vec *tv) tmp = list_entry(curr, struct timer_list, list); next = curr->next; - list_del(curr); // not needed + list_del(curr); /* not needed */ internal_add_timer(tmp); curr = next; } @@ -509,18 +509,12 @@ static void update_wall_time(unsigned long ticks) static inline void do_process_times(struct task_struct *p, unsigned long user, unsigned long system) { - //unsigned long psecs; - -// psecs = (p->times.tms_utime += user); - //psecs += (p->times.tms_stime += system); } void update_one_process(struct task_struct *p, unsigned long user, unsigned long system, int cpu) { -// p->per_cpu_utime[cpu] += user; -// p->per_cpu_stime[cpu] += system; do_process_times(p, user, system); } diff --git a/xen/tools/elf-reloc.c b/xen/tools/elf-reloc.c index 19a839ee84..80e926f29e 100644 --- a/xen/tools/elf-reloc.c +++ b/xen/tools/elf-reloc.c @@ -4,7 +4,7 @@ * Usage: elf-reloc <old base> <new base> <image> * * Relocates <image> from <old base> address to <new base> address by - * frobbing the Elf headers. Segment contents are unmodified! + * frobbing the Elf headers. Segment contents are unmodified. */ #include <stdio.h> diff --git a/xen/tools/figlet/figlet.c b/xen/tools/figlet/figlet.c index 36cf7509c0..8e79e83170 100644 --- a/xen/tools/figlet/figlet.c +++ b/xen/tools/figlet/figlet.c @@ -5,9 +5,9 @@ * This is a HACKED figlet source file for Xen. * * Hacked to output C octal strings for inclusion in a header file. - * Support for opening zippe files is removed. + * Support for opening zipped files is removed. * - * Go to www.figlet.org for teh unhacked Figlet sources! + * Go to www.figlet.org for the unhacked Figlet sources. */ /**************************************************************************** |