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] Merged.

# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID ad2720178268926f8b94271f8d3574dba7b23e55
# Parent  7d75f5a88f0687f4fca129c8a4b2242f1f60ad2a
# Parent  51bb139329b201df006fe83d7e7eb1d0037675b6
Merged.

diff -r 7d75f5a88f06 -r ad2720178268 
linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c        Fri Nov 18 
13:04:53 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c        Fri Nov 18 
13:05:38 2005
@@ -37,16 +37,10 @@
 #include <asm-xen/balloon.h>
 #include <asm-xen/xen-public/memory.h>
 #include <linux/module.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 #include <linux/percpu.h>
 #include <asm/tlbflush.h>
-#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 -r 7d75f5a88f06 -r ad2720178268 
linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c     Fri Nov 18 13:04:53 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c     Fri Nov 18 13:05:38 2005
@@ -121,11 +121,7 @@
 
 /* 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 -r 7d75f5a88f06 -r ad2720178268 
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
--- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c        Fri Nov 18 
13:04:53 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c        Fri Nov 18 
13:05:38 2005
@@ -91,7 +91,6 @@
 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 @@
                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 -r 7d75f5a88f06 -r ad2720178268 
linux-2.6-xen-sparse/drivers/xen/console/console.c
--- a/linux-2.6-xen-sparse/drivers/xen/console/console.c        Fri Nov 18 
13:04:53 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c        Fri Nov 18 
13:05:38 2005
@@ -128,12 +128,7 @@
 /* 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 @@
        }
 }
 
-#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 @@
        .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 @@
                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 @@
 
        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 @@
 
 /******************** 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 @@
        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 @@
 
        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 @@
        }
 }
 
-#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 @@
        .con_scrolldelta =      DUMMY,
 };
 #endif
-#endif
 
 static int __init xencons_init(void)
 {
@@ -699,19 +632,10 @@
 
        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 @@
                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 -r 7d75f5a88f06 -r ad2720178268 
linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c
--- a/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c  Fri Nov 18 13:04:53 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c  Fri Nov 18 13:05:38 2005
@@ -436,9 +436,7 @@
        .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 -r 7d75f5a88f06 -r ad2720178268 
linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c
--- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Fri Nov 18 
13:04:53 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Fri Nov 18 
13:05:38 2005
@@ -31,11 +31,6 @@
 #include <asm-xen/xen-public/xen.h>
 #include <asm-xen/xen-public/dom0_ops.h>
 #include <asm-xen/xen_proc.h>
-
-#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;
 
diff -r 7d75f5a88f06 -r ad2720178268 
linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h        Fri Nov 
18 13:04:53 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h        Fri Nov 
18 13:05:38 2005
@@ -39,15 +39,11 @@
 #include <asm/ptrace.h>
 #include <asm/page.h>
 #if defined(__i386__)
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 #  ifdef CONFIG_X86_PAE
 #   include <asm-generic/pgtable-nopud.h>
 #  else
 #   include <asm-generic/pgtable-nopmd.h>
 #  endif
-# else
-#  define pud_t pgd_t
-# endif
 #endif
 
 extern shared_info_t *HYPERVISOR_shared_info;
@@ -113,22 +109,6 @@
 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 -r 7d75f5a88f06 -r ad2720178268 tools/libxc/xc_linux_save.c
--- a/tools/libxc/xc_linux_save.c       Fri Nov 18 13:04:53 2005
+++ b/tools/libxc/xc_linux_save.c       Fri Nov 18 13:05:38 2005
@@ -729,6 +729,11 @@
 
     /* 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, 

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

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