diff --git a/.hgignore b/.hgignore index c9ad17fc52..a142796726 100644 --- a/.hgignore +++ b/.hgignore @@ -171,6 +171,7 @@ ^tools/xentrace/tbctl$ ^tools/xentrace/xenctx$ ^tools/xentrace/xentrace$ +^tools/xm-test/ramdisk/buildroot ^xen/BLOG$ ^xen/TAGS$ ^xen/arch/x86/asm-offsets\.s$ diff --git a/docs/man/xm.pod.1 b/docs/man/xm.pod.1 index 4162b6e3d3..495f7c7ce0 100644 --- a/docs/man/xm.pod.1 +++ b/docs/man/xm.pod.1 @@ -626,12 +626,62 @@ event. =item B I I I I I<[bedomain-id]> -Create a new virtual block device +Create a new virtual block device. This will trigger a hotplug event +for the guest. + +B + +=over 4 + +=item I + +The domain id of the guest domain that the device will be attached to. + +=item I + +The device in the backend domain (usually domain 0) to be exported. +This can be specified as a physical partition (phy:sda7) or as a file +mounted as loopback (file://path/to/loop.iso). + +=item I + +How the device should be presented to the guest domain. It can be +specified as either a symbolic name, such as /dev/hdc, for common +devices, or by device id, such as 0x1400 (/dev/hdc device id in hex). + +=item I + +The access mode for the device from the guest domain. Supported modes +are I (read/write) or I (read-only). + +=item I + +The back end domain hosting the device. This defaults to domain 0. + +=back + +B + +=over 4 + +=item I + +xm block-attach guestdomain file://path/to/dsl-2.0RC2.iso /dev/hdc ro + +This will mount the dsl iso as /dev/hdc in the guestdomain as a read +only device. This will probably not be detected as a cdrom by the +guest, but mounting /dev/hdc manually will work. + +=back =item B I I -Destroy a domain's virtual block device. DevId may either be a device -ID or the device name as mounted in the guest. +Destroy a domain's virtual block device. devid B be the device +id given to the device by domain 0. You will need to run I to determine that number. + +FIXME: this is currently B. Even though a block device is +removed from domU, it appears to still be allocated in the domain 0. =item B I @@ -722,7 +772,7 @@ Delete a vnet. =head1 SEE ALSO -B(5) +B(5), B(1) BVT scheduling paper: K.J. Duda and D.R. Cheriton. Borrowed Virtual Time (BVT) scheduling: supporting latency-sensitive threads in a diff --git a/docs/man/xmdomain.cfg.pod.5 b/docs/man/xmdomain.cfg.pod.5 index 313c3bc4b4..4b9a35a446 100644 --- a/docs/man/xmdomain.cfg.pod.5 +++ b/docs/man/xmdomain.cfg.pod.5 @@ -1,6 +1,6 @@ =head1 NAME -xmdomain.cfg - xm domain create config file format +xmdomain.cfg - xm domain config file format =head1 SYNOPSIS @@ -10,17 +10,22 @@ xmdomain.cfg - xm domain create config file format =head1 DESCRIPTION -The xm(1) program uses python executable config files to define +The B(1) program uses python executable config files to define domains to create from scratch. Each of these config files needs to contain a number of required options, and may specify many more. -Domain configuration files live in /etc/xen by default, though the -full path to the config file must be specified in the I -command, so they can exist anywhere in the filesystem. +Domain configuration files live in /etc/xen by default, if you store +config files anywhere else the full path to the config file must be +specified in the I command. -/etc/xen/auto is a special case however, as domain config files in -that directory will be started automatically at system boot if the -xendomain init script is enabled. +/etc/xen/auto is a special case. Domain config files in that +directory will be started automatically at system boot if the +xendomain init script is enabled. The contents of /etc/xen/auto +should be symlinks to files in /etc/xen to allow I to be +used without full paths. + +Options are specified by I statements in the +xmdomain.cfg files. =head1 OPTIONS @@ -29,50 +34,157 @@ file. =over 4 -=item I +=item B -The kernel image used in the domain. +The kernel image for the domain. The format of the parameter is the +fully qualified path to the kernel image file, +i.e. I. -=item I -The initial ramdisk to be used in the domain. Default xen domU -kernels do not usually need a ramdisk. +=item B -=item I +The initial ramdisk for the domain. The format of the parameter is +the fully qualified path to the initrd, i.e. I. On +many Linux distros you will not need a ramdisk if using the default +xen kernel. -The amount of memory, in megabytes to allocate to the domain when it +=item B + +The amount of RAM, in megabytes, to allocate to the domain when it starts. Allocating insufficient memory for a domain may produce -extremely bizarre behavior. +extremely bizarre behavior. If there isn't enough free memory left on +the machine to fulfill this request, the domain will fail to start. -=item I +Xen does not support overcommit of memory, so the total memory of all +guests (+ 64 MB needed for Xen) must be less than or equal to the +physical RAM in the machine. -A unique name for the domain. You can not create 2 domains with the -same name. +=item B -=item I +A unique name for the domain. Attempting to create two domains with +the same name will cause an error. -Root stanza for the domain (required for Linux domains). +=item B -=item I +Specifies the root device for the domain. This is required for Linux +domains, and possibly other OSes. -An array of disk stanzas +=item B -=back +The number of network interfaces allocated to the domain on boot. It +defaults to 1. -A bare minimal config file example might be as follows: +=item B - kernel = "/boot/vmlinuz-2.6-xenU" - memory = 128 - name = "MyLinux" - root = "/dev/hda1 ro" +An array of block device stanzas, in the form: -=head1 ADDITIONAL OPTIONS + disk = [ "stanza1", "stanza2", ... ] + +Each stanza has 3 terms, seperated by commas, +"backend-dev,frontend-dev,mode". =over 4 -=item I +=item I -=back +The device in the backend domain that will be exported to the guest +(frontend) domain. Supported formats include: + +I - export the physical device listed. The device can be +in symbolic form, as in sda7, or as the hex major/minor number, as in +0x301 (which is hda1). + +I - export the file listed as a loopback device. +This will take care of the loopback setup before exporting the device. + +=item I + +How the device should appear in the guest domain. The device can be +in symbolic form, as in sda7, or as the hex major/minor number, as in +0x301 (which is hda1). + +=item I + +The access mode for the device. There are currently 2 valid options, +I (read-only), I (read/write). + +=back + +=item B + +An arrray of virtual interface stanzas in the form: + + vif = [ "stanza1", "stanza2", ... ] + +Each stanza specifies a set of I options separated by +commas, in the form: "name1=value1, name2=value2, ..." + +B + +=over 4 + +=item I + +The network bridge to be used for this device. This is especially +needed if multiple bridges exist on the machine. + +=item I + +The MAC address for the virtual interface. If mac is not specified, +one will be randomly chosen by xen with the 00:16:3e vendor id prefix. + +=back + +=back + +=head1 ADDITIONAL OPTIONS + +The following options are also supported in the config file, though +are far more rarely used. + +=over 4 + +=item B + +Which builder should be used to construct the domain. This defaults +to the I if not specified, which is the builder for +paravirtualized Linux domains. + +=item B + +Specifies which CPU the domain should be started on, where 0 specifies +the first cpu, 1 the second, and so on. This defaults to -1, which +means Xen is free to pick which CPU to start on. + +=item B + +Extra information to append to the end of the kernel parameter line. +The format is a string, the contents of which can be anything that the +kernel supports. For instance: + + extra = "4" + +Will cause the domain to boot to runlevel 4. + +=item B + +The IP address of the NFS server to use as the root device for the +domain. In order to do this you'll need to specify I, +and specify I. + +=item B + +The directory on the NFS server to be used as the root filesystem. +Specified as a fully qualified path, i.e. I. + +=item B + +The number of virtual cpus to allocate to the domain. In order to use +this the xen kernel must be compiled with SMP support. + +This defaults to 1, meaning running the domain as a UP. + +=back =head1 DOMAIN SHUTDOWN OPTIONS @@ -81,17 +193,17 @@ unplanned) under certain events. The 3 events currently captured are: =over 4 -=item I +=item B Triggered on either an I or graceful shutdown from inside the DomU. -=item I +=item B Triggered on either an I or graceful reboot from inside the DomU. -=item I +=item B Triggered when a DomU goes to the crashed state for any reason. @@ -101,23 +213,23 @@ All of them take one of 4 valid states listed below. =over 4 -=item I +=item B The domain will be cleaned up completely. No attempt at respawning will occur. This is what a typical shutdown would look like. -=item I +=item B The domain will be restarted with the same name as the old domain. This is what a typical reboot would look like. -=item I +=item B The domain will not be cleaned up at all. This is often useful for crash state domains which ensures that enough evidence is to debug the real issue. -=item I +=item B The old domain will not be cleaned up, but will be renamed so a new domain can be restarted in it's place. The old domain will be renamed with @@ -127,6 +239,39 @@ it holds, so that the new one may take them. =back +=head1 EXAMPLES + +The following are quick examples of ways that domains might be +configured. They should not be considered an exhaustive set. + +=over 4 + +=item I + + kernel = "/boot/vmlinuz-2.6-xenU" + memory = 128 + name = "MyLinux" + root = "/dev/hda1 ro" + disk = [ "file:/var/xen/mylinux.img,hda1,w" ] + +This creates a domain called MyLinux with 128 MB of memory using a +default xen kernel, and the file /var/xen/mylinux.img loopback mounted +at hda1, which is the root filesystem. + +=item I + +FIXME: write me + +=item I + +FIXME: write me + +=item I + +FIXME: write me + +=back + =head1 SEE ALSO B(1) diff --git a/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c b/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c index 9c8129be20..05d16638ab 100644 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c @@ -37,16 +37,10 @@ #include #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #include #include -#endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -#define pte_offset_kernel pte_offset -#define pud_t pgd_t -#define pud_offset(d, va) d -#elif defined(CONFIG_X86_64) +#ifdef CONFIG_X86_64 #define pmd_val_ma(v) (v).pmd #else #ifdef CONFIG_X86_PAE diff --git a/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c b/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c index 0f516e5373..c5ddef540b 100644 --- a/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c +++ b/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c @@ -121,11 +121,7 @@ static void init_evtchn_cpu_bindings(void) /* Upcall to generic IRQ layer. */ #ifdef CONFIG_X86 -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) extern fastcall unsigned int do_IRQ(struct pt_regs *regs); -#else -extern asmlinkage unsigned int do_IRQ(struct pt_regs *regs); -#endif #if defined (__i386__) #define IRQ_REG orig_eax #elif defined (__x86_64__) diff --git a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c index 2367594baa..15d18e917e 100644 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c @@ -91,7 +91,6 @@ static void balloon_process(void *unused); static DECLARE_WORK(balloon_worker, balloon_process, NULL); static struct timer_list balloon_timer; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) /* Use the private and mapping fields of struct page as a list. */ #define PAGE_TO_LIST(p) ((struct list_head *)&p->private) #define LIST_TO_PAGE(l) \ @@ -102,19 +101,6 @@ static struct timer_list balloon_timer; p->mapping = NULL; \ p->private = 0; \ } while(0) -#else -/* There's a dedicated list field in struct page we can use. */ -#define PAGE_TO_LIST(p) ( &p->list ) -#define LIST_TO_PAGE(l) ( list_entry(l, struct page, list) ) -#define UNLIST_PAGE(p) ( list_del(&p->list) ) -#define pte_offset_kernel pte_offset -#define pud_t pgd_t -#define pud_offset(d, va) d -#define pud_none(d) 0 -#define pud_bad(d) 0 -#define subsys_initcall(_fn) __initcall(_fn) -#define pfn_to_page(_pfn) (mem_map + (_pfn)) -#endif #define IPRINTK(fmt, args...) \ printk(KERN_INFO "xen_mem: " fmt, ##args) diff --git a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c index 667c888da7..a88ba31315 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c @@ -57,6 +57,7 @@ #define BLKIF_STATE_DISCONNECTED 0 #define BLKIF_STATE_CONNECTED 1 +#define BLKIF_STATE_SUSPENDED 2 #define MAXIMUM_OUTSTANDING_BLOCK_REQS \ (BLKIF_MAX_SEGMENTS_PER_REQUEST * BLKIF_RING_SIZE) @@ -75,7 +76,7 @@ static irqreturn_t blkif_int(int irq, void *dev_id, struct pt_regs *ptregs); static void blkif_restart_queue(void *arg); static void blkif_recover(struct blkfront_info *); static void blkif_completion(struct blk_shadow *); -static void blkif_free(struct blkfront_info *); +static void blkif_free(struct blkfront_info *, int); /** @@ -144,7 +145,7 @@ static int blkfront_resume(struct xenbus_device *dev) DPRINTK("blkfront_resume: %s\n", dev->nodename); - blkif_free(info); + blkif_free(info, 1); err = talk_to_backend(dev, info); if (!err) @@ -207,7 +208,7 @@ again: if (message) xenbus_dev_fatal(dev, err, "%s", message); destroy_blkring: - blkif_free(info); + blkif_free(info, 0); out: return err; } @@ -252,7 +253,7 @@ static int setup_blkring(struct xenbus_device *dev, return 0; fail: - blkif_free(info); + blkif_free(info, 0); return err; } @@ -295,7 +296,8 @@ static void connect(struct blkfront_info *info) unsigned int binfo; int err; - if (info->connected == BLKIF_STATE_CONNECTED) + if( (info->connected == BLKIF_STATE_CONNECTED) || + (info->connected == BLKIF_STATE_SUSPENDED) ) return; DPRINTK("blkfront.c:connect:%s.\n", info->xbdev->otherend); @@ -354,7 +356,7 @@ static int blkfront_remove(struct xenbus_device *dev) DPRINTK("blkfront_remove: %s removed\n", dev->nodename); - blkif_free(info); + blkif_free(info, 0); kfree(info); @@ -569,6 +571,7 @@ void do_blkif_request(request_queue_t *rq) req->nr_sectors, req->buffer, rq_data_dir(req) ? "write" : "read"); + blkdev_dequeue_request(req); if (blkif_queue_request(req)) { blk_requeue_request(rq, req); @@ -643,11 +646,12 @@ static irqreturn_t blkif_int(int irq, void *dev_id, struct pt_regs *ptregs) return IRQ_HANDLED; } -static void blkif_free(struct blkfront_info *info) +static void blkif_free(struct blkfront_info *info, int suspend) { /* Prevent new requests being issued until we fix things up. */ spin_lock_irq(&blkif_io_lock); - info->connected = BLKIF_STATE_DISCONNECTED; + info->connected = suspend ? + BLKIF_STATE_SUSPENDED : BLKIF_STATE_DISCONNECTED; spin_unlock_irq(&blkif_io_lock); /* Free resources associated with old device channel. */ diff --git a/linux-2.6-xen-sparse/drivers/xen/console/console.c b/linux-2.6-xen-sparse/drivers/xen/console/console.c index a9f72453a6..7ba0fed9ed 100644 --- a/linux-2.6-xen-sparse/drivers/xen/console/console.c +++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c @@ -128,12 +128,7 @@ static spinlock_t xencons_lock = SPIN_LOCK_UNLOCKED; /* Common transmit-kick routine. */ static void __xencons_tx_flush(void); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) static struct tty_driver *xencons_driver; -#else -static struct tty_driver xencons_driver; -#endif - /******************** Kernel console driver ********************************/ @@ -170,18 +165,11 @@ static void kcons_write_dom0( } } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) static struct tty_driver *kcons_device(struct console *c, int *index) { *index = c->index; return xencons_driver; } -#else -static kdev_t kcons_device(struct console *c) -{ - return MKDEV(TTY_MAJOR, (xc_mode == XC_SERIAL) ? 64 : 1); -} -#endif static struct console kcons_info = { .device = kcons_device, @@ -189,13 +177,8 @@ static struct console kcons_info = { .index = -1, }; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #define __RETCODE 0 static int __init xen_console_init(void) -#else -#define __RETCODE -void xen_console_init(void) -#endif { if (xen_init() < 0) return __RETCODE; @@ -204,10 +187,8 @@ void xen_console_init(void) if (xc_mode == XC_DEFAULT) xc_mode = XC_SERIAL; kcons_info.write = kcons_write_dom0; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) if (xc_mode == XC_SERIAL) kcons_info.flags |= CON_ENABLED; -#endif } else { if (xc_mode == XC_DEFAULT) xc_mode = XC_TTY; @@ -237,9 +218,7 @@ void xen_console_init(void) return __RETCODE; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) console_initcall(xen_console_init); -#endif /*** Useful function for console debugging -- goes straight to Xen. ***/ asmlinkage int xprintk(const char *fmt, ...) @@ -283,15 +262,8 @@ void xencons_force_flush(void) /******************** User-space console driver (/dev/console) ************/ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #define DRV(_d) (_d) #define TTY_INDEX(_tty) ((_tty)->index) -#else -static int xencons_refcount; -static struct tty_struct *xencons_table[MAX_NR_CONSOLES]; -#define DRV(_d) (&(_d)) -#define TTY_INDEX(_tty) (MINOR((_tty)->device) - xencons_driver.minor_start) -#endif static struct termios *xencons_termios[MAX_NR_CONSOLES]; static struct termios *xencons_termios_locked[MAX_NR_CONSOLES]; @@ -484,7 +456,6 @@ static inline int __xencons_put_char(int ch) return 1; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) static int xencons_write( struct tty_struct *tty, const unsigned char *buf, @@ -509,42 +480,6 @@ static int xencons_write( return i; } -#else -static int xencons_write( - struct tty_struct *tty, - int from_user, - const u_char *buf, - int count) -{ - int i; - unsigned long flags; - - if (from_user && verify_area(VERIFY_READ, buf, count)) - return -EINVAL; - - if (TTY_INDEX(tty) != 0) - return count; - - spin_lock_irqsave(&xencons_lock, flags); - - for (i = 0; i < count; i++) { - char ch; - if (from_user) - __get_user(ch, buf + i); - else - ch = buf[i]; - if (!__xencons_put_char(ch)) - break; - } - - if (i != 0) - __xencons_tx_flush(); - - spin_unlock_irqrestore(&xencons_lock, flags); - - return i; -} -#endif static void xencons_put_char(struct tty_struct *tty, u_char ch) { @@ -629,7 +564,6 @@ static void xencons_close(struct tty_struct *tty, struct file *filp) } } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) static struct tty_operations xencons_ops = { .open = xencons_open, .close = xencons_close, @@ -685,7 +619,6 @@ const struct consw xennull_con = { .con_scrolldelta = DUMMY, }; #endif -#endif static int __init xencons_init(void) { @@ -699,19 +632,10 @@ static int __init xencons_init(void) xencons_ring_init(); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) xencons_driver = alloc_tty_driver((xc_mode == XC_SERIAL) ? 1 : MAX_NR_CONSOLES); if (xencons_driver == NULL) return -ENOMEM; -#else - memset(&xencons_driver, 0, sizeof(struct tty_driver)); - xencons_driver.magic = TTY_DRIVER_MAGIC; - xencons_driver.refcount = &xencons_refcount; - xencons_driver.table = xencons_table; - xencons_driver.num = - (xc_mode == XC_SERIAL) ? 1 : MAX_NR_CONSOLES; -#endif DRV(xencons_driver)->major = TTY_MAJOR; DRV(xencons_driver)->type = TTY_DRIVER_TYPE_SERIAL; @@ -735,37 +659,18 @@ static int __init xencons_init(void) DRV(xencons_driver)->name_base = xc_num; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) tty_set_operations(xencons_driver, &xencons_ops); -#else - xencons_driver.open = xencons_open; - xencons_driver.close = xencons_close; - xencons_driver.write = xencons_write; - xencons_driver.write_room = xencons_write_room; - xencons_driver.put_char = xencons_put_char; - xencons_driver.flush_chars = xencons_flush_chars; - xencons_driver.chars_in_buffer = xencons_chars_in_buffer; - xencons_driver.send_xchar = xencons_send_xchar; - xencons_driver.flush_buffer = xencons_flush_buffer; - xencons_driver.throttle = xencons_throttle; - xencons_driver.unthrottle = xencons_unthrottle; - xencons_driver.wait_until_sent = xencons_wait_until_sent; -#endif if ((rc = tty_register_driver(DRV(xencons_driver))) != 0) { printk("WARNING: Failed to register Xen virtual " "console driver as '%s%d'\n", DRV(xencons_driver)->name, DRV(xencons_driver)->name_base); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) put_tty_driver(xencons_driver); xencons_driver = NULL; -#endif return rc; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) tty_register_device(xencons_driver, 0, NULL); -#endif if (xen_start_info->flags & SIF_INITDOMAIN) { xencons_priv_irq = bind_virq_to_irqhandler( diff --git a/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c b/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c index 42f4a8f70a..85c65e95a8 100644 --- a/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c +++ b/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c @@ -436,9 +436,7 @@ static struct miscdevice evtchn_miscdev = { .minor = EVTCHN_MINOR, .name = "evtchn", .fops = &evtchn_fops, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .devfs_name = "misc/evtchn", -#endif }; static int __init evtchn_init(void) diff --git a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c index 5239a18fc6..cf0c0eb7d7 100644 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c @@ -32,11 +32,6 @@ #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -#define pud_t pgd_t -#define pud_offset(d, va) d -#endif - static struct proc_dir_entry *privcmd_intf; static int privcmd_ioctl(struct inode *inode, struct file *file, diff --git a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h index 09517d24ae..899734e1fb 100644 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h @@ -39,15 +39,11 @@ #include #include #if defined(__i386__) -# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) # ifdef CONFIG_X86_PAE # include # else # include # endif -# else -# define pud_t pgd_t -# endif #endif extern shared_info_t *HYPERVISOR_shared_info; @@ -113,22 +109,6 @@ void xen_tlb_flush_mask(cpumask_t *mask); void xen_invlpg_mask(cpumask_t *mask, unsigned long ptr); #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -/* -** XXX SMH: 2.4 doesn't have percpu.h (or support SMP guests) so just -** include sufficient #defines to allow the below to build. -*/ -#define DEFINE_PER_CPU(type, name) \ - __typeof__(type) per_cpu__##name - -#define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var)) -#define __get_cpu_var(var) per_cpu__##var -#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name - -#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) -#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) -#endif /* linux < 2.6.0 */ - /* Returns zero on success else negative errno. */ int xen_create_contiguous_region( unsigned long vstart, unsigned int order, unsigned int address_bits); diff --git a/tools/ioemu/vl.c b/tools/ioemu/vl.c index b6fb5e923d..79c885b6ef 100644 --- a/tools/ioemu/vl.c +++ b/tools/ioemu/vl.c @@ -137,7 +137,7 @@ int adlib_enabled = 1; int gus_enabled = 1; int pci_enabled = 1; int prep_enabled = 0; -int rtc_utc = 1; +int rtc_utc = 0; int cirrus_vga_enabled = 1; int vga_accelerate = 1; int graphic_width = 800; diff --git a/tools/libxc/xc_linux_save.c b/tools/libxc/xc_linux_save.c index 50871436b4..54cdb2ce15 100644 --- a/tools/libxc/xc_linux_save.c +++ b/tools/libxc/xc_linux_save.c @@ -729,6 +729,11 @@ int xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, /* Domain is still running at this point */ + if (live && (pt_levels != 2)) { + ERR("Live migration supported only for 32-bit non-pae"); + goto out; + } + if (live) { if (xc_shadow_control(xc_handle, dom, diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index f3fd00f6d9..4633b5870c 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -40,26 +40,81 @@ from xen.xm.opts import * import console +# Strings for shorthelp +console_help = "console Attach to domain DomId's console." +create_help = """create [-c] + [Name=Value].. Create a domain based on Config File""" +destroy_help = "destroy Terminate a domain immediately" +help_help = "help Display this message" +list_help = "list [--long] [DomId, ...] List information about domains" +mem_max_help = "mem-max Set maximum memory reservation for a domain" +mem_set_help = "mem-set Adjust the current memory usage for a domain" +migrate_help = "migrate Migrate a domain to another machine" +pause_help = "pause Pause execution of a domain" +reboot_help = "reboot [-w][-a] Reboot a domain" +restore_help = "restore Create a domain from a saved state file" +save_help = "save Save domain state (and config) to file" +shutdown_help ="shutdown [-w][-a][-R|-H] Shutdown a domain" +top_help = "top Monitor system and domains in real-time" +unpause_help = "unpause Unpause a paused domain" + +help_spacer = """ + """ + +# Strings for longhelp +sysrq_help = "sysrq Send a sysrq to a domain" +domid_help = "domid Converts a domain name to a domain id" +domname_help = "domname Convert a domain id to a domain name" +set_vcpus_help = """set-vcpus Enable the specified number of VCPUs in a + domain""" +vcpu_list_help = "vcpu-list List the VCPUs for a domain (or all domains)" +vcpu_pin_help = "vcpu-pin Set which cpus a VCPU can use" +dmesg_help = "dmesg [--clear] Read or clear Xen's message buffer" +info_help = "info Get information about the xen host" +log_help = "log Print the xend log" +sched_bvt_help = """sched-bvt Set Borrowed Virtual Time scheduler + parameters""" +sched_bvt_ctxallow_help = """sched-bvt-ctxallow Set the BVT scheduler context switch + allowance""" +sched_sedf_help = "sched-sedf Set simple EDF parameters" +block_attach_help = """block-attach + [BackDomId] Create a new virtual block device""" +block_detach_help = """block-detach Destroy a domain's virtual block device, + where may either be the device ID + or the device name as mounted in the guest""" + +block_list_help = "block-list List virtual block devices for a domain" +network_attach_help = """network-attach [script=