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] [linux-2.6.18-xen] merge with linux-2.6.18-xen.hg

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] merge with linux-2.6.18-xen.hg
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Aug 2008 05:51:09 -0700
Delivery-date: Mon, 11 Aug 2008 05:56:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1218420357 -32400
# Node ID cdd156cb645bc1ea1dce7b1b4ed42e2b4928383d
# Parent  a18df47f671b66e0d0fe68c28a882a69303a9a55
# Parent  56902bb0ce6dc021e291992543b86c4c81f36b83
merge with linux-2.6.18-xen.hg
---
 arch/i386/Kconfig                         |    4 ++--
 arch/i386/kernel/setup-xen.c              |   21 ++++++++++++++-------
 arch/i386/kernel/time-xen.c               |   11 +++++++++--
 arch/x86_64/kernel/e820-xen.c             |   21 +++++++++++++++++++++
 arch/x86_64/kernel/setup-xen.c            |   25 ++++++++++++++++++-------
 arch/x86_64/mm/init-xen.c                 |    7 +++++++
 drivers/acpi/processor_core.c             |    2 ++
 drivers/acpi/processor_extcntl.c          |    6 ++++++
 drivers/char/Kconfig                      |    2 +-
 drivers/video/Kconfig                     |    2 +-
 drivers/xen/core/machine_reboot.c         |   13 ++++---------
 drivers/xen/core/pci.c                    |   10 +++++++---
 drivers/xen/pciback/pci_stub.c            |    7 +++----
 include/asm-x86_64/mach-xen/asm/pgtable.h |    4 ++--
 14 files changed, 97 insertions(+), 38 deletions(-)

diff -r a18df47f671b -r cdd156cb645b arch/i386/Kconfig
--- a/arch/i386/Kconfig Fri Aug 08 11:39:35 2008 +0900
+++ b/arch/i386/Kconfig Mon Aug 11 11:05:57 2008 +0900
@@ -397,7 +397,7 @@ config I8K
 
 config X86_REBOOTFIXUPS
        bool "Enable X86 board specific fixups for reboot"
-       depends on X86
+       depends on !X86_XEN
        default n
        ---help---
          This enables chipset and/or board specific fixups to be done
@@ -661,7 +661,6 @@ config MTRR
 config MTRR
        bool "MTRR (Memory Type Range Register) support"
        depends on !XEN_UNPRIVILEGED_GUEST
-       default y if X86_XEN
        ---help---
          On Intel P6 family processors (Pentium Pro, Pentium II and later)
          the Memory Type Range Registers (MTRRs) may be used to control
@@ -781,6 +780,7 @@ config CRASH_DUMP
        bool "kernel crash dumps (EXPERIMENTAL)"
        depends on EXPERIMENTAL
        depends on HIGHMEM
+       depends on !XEN
        help
          Generate crash dump after being started by kexec.
 
diff -r a18df47f671b -r cdd156cb645b arch/i386/kernel/setup-xen.c
--- a/arch/i386/kernel/setup-xen.c      Fri Aug 08 11:39:35 2008 +0900
+++ b/arch/i386/kernel/setup-xen.c      Mon Aug 11 11:05:57 2008 +0900
@@ -405,7 +405,7 @@ EXPORT_SYMBOL(HYPERVISOR_shared_info);
 EXPORT_SYMBOL(HYPERVISOR_shared_info);
 
 unsigned long *phys_to_machine_mapping;
-unsigned long *pfn_to_mfn_frame_list_list, *pfn_to_mfn_frame_list[16];
+unsigned long *pfn_to_mfn_frame_list_list, **pfn_to_mfn_frame_list;
 EXPORT_SYMBOL(phys_to_machine_mapping);
 
 /* Raw start-of-day parameters from the hypervisor. */
@@ -831,6 +831,7 @@ static void __init parse_cmdline_early (
                        }
                }
 
+#ifndef CONFIG_XEN
                else if (!memcmp(from, "memmap=", 7)) {
                        if (to != command_line)
                                to--;
@@ -872,6 +873,7 @@ static void __init parse_cmdline_early (
                                }
                        }
                }
+#endif
 
                else if (!memcmp(from, "noexec=", 7))
                        noexec_setup(from + 7);
@@ -1617,7 +1619,7 @@ void __init setup_arch(char **cmdline_p)
        int i, j, k, fpp;
        struct physdev_set_iopl set_iopl;
        unsigned long max_low_pfn;
-       unsigned long p2m_pages;
+       unsigned long p2m_pages, size;
 
        /* Force a quick death if the kernel panics (not domain 0). */
        extern int panic_timeout;
@@ -1779,11 +1781,11 @@ void __init setup_arch(char **cmdline_p)
        if (!xen_feature(XENFEAT_auto_translated_physmap)) {
                phys_to_machine_mapping = alloc_bootmem_low_pages(
                     max_pfn * sizeof(unsigned long));
-               memset(phys_to_machine_mapping, ~0,
-                      max_pfn * sizeof(unsigned long));
                memcpy(phys_to_machine_mapping,
                       (unsigned long *)xen_start_info->mfn_list,
                       p2m_pages * sizeof(unsigned long));
+               memset(phys_to_machine_mapping + p2m_pages, ~0,
+                      (max_pfn - p2m_pages) * sizeof(unsigned long));
                free_bootmem(
                     __pa(xen_start_info->mfn_list),
                     PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
@@ -1793,13 +1795,18 @@ void __init setup_arch(char **cmdline_p)
                 * Initialise the list of the frames that specify the list of
                 * frames that make up the p2m table. Used by save/restore
                 */
-               pfn_to_mfn_frame_list_list = alloc_bootmem_low_pages(PAGE_SIZE);
-
                fpp = PAGE_SIZE/sizeof(unsigned long);
+               size = (max_pfn + fpp - 1) / fpp;
+               size = (size + fpp - 1) / fpp;
+               size *= sizeof(unsigned long);
+               BUG_ON(size > PAGE_SIZE);
+               pfn_to_mfn_frame_list_list = alloc_bootmem_low_pages(size);
+               pfn_to_mfn_frame_list = alloc_bootmem_low(size);
+
                for (i=0, j=0, k=-1; i< max_pfn; i+=fpp, j++) {
                        if ((j % fpp) == 0) {
                                k++;
-                               BUG_ON(k>=16);
+                               BUG_ON(k * sizeof(unsigned long) >= size);
                                pfn_to_mfn_frame_list[k] =
                                        alloc_bootmem_low_pages(PAGE_SIZE);
                                pfn_to_mfn_frame_list_list[k] =
diff -r a18df47f671b -r cdd156cb645b arch/i386/kernel/time-xen.c
--- a/arch/i386/kernel/time-xen.c       Fri Aug 08 11:39:35 2008 +0900
+++ b/arch/i386/kernel/time-xen.c       Mon Aug 11 11:05:57 2008 +0900
@@ -314,21 +314,28 @@ static void get_time_values_from_xen(uns
 {
        struct vcpu_time_info   *src;
        struct shadow_time_info *dst;
+       unsigned long flags;
+       u32 pre_version, post_version;
 
        src = &vcpu_info(cpu)->time;
        dst = &per_cpu(shadow_time, cpu);
 
+       local_irq_save(flags);
+
        do {
-               dst->version = src->version;
+               pre_version = dst->version = src->version;
                rmb();
                dst->tsc_timestamp     = src->tsc_timestamp;
                dst->system_timestamp  = src->system_time;
                dst->tsc_to_nsec_mul   = src->tsc_to_system_mul;
                dst->tsc_shift         = src->tsc_shift;
                rmb();
-       } while ((src->version & 1) | (dst->version ^ src->version));
+               post_version = src->version;
+       } while ((pre_version & 1) | (pre_version ^ post_version));
 
        dst->tsc_to_usec_mul = dst->tsc_to_nsec_mul / 1000;
+
+       local_irq_restore(flags);
 }
 
 static inline int time_values_up_to_date(unsigned int cpu)
diff -r a18df47f671b -r cdd156cb645b arch/x86_64/kernel/e820-xen.c
--- a/arch/x86_64/kernel/e820-xen.c     Fri Aug 08 11:39:35 2008 +0900
+++ b/arch/x86_64/kernel/e820-xen.c     Mon Aug 11 11:05:57 2008 +0900
@@ -16,6 +16,7 @@
 #include <linux/string.h>
 #include <linux/kexec.h>
 #include <linux/module.h>
+#include <linux/mm.h>
 
 #include <asm/pgtable.h>
 #include <asm/page.h>
@@ -703,6 +704,24 @@ void __init parse_memopt(char *p, char *
        i = e820.nr_map-1;
        current_end = e820.map[i].addr + e820.map[i].size;
 
+       /*
+        * A little less than 2% of available memory are needed for page
+        * tables, p2m map, and mem_map. Hence the maximum amount of memory
+        * we can potentially balloon up to cannot exceed about 50 times
+        * what we've been given initially.
+        */
+#define PAGE_OVERHEAD (PAGE_SIZE \
+                      / (sizeof(pte_t) + sizeof(long) + sizeof(struct page)))
+       if (end_user_pfn / (PAGE_OVERHEAD - 1) > xen_start_info->nr_pages) {
+               end = (xen_start_info->nr_pages * (PAGE_OVERHEAD - 1))
+                     << PAGE_SHIFT;
+               printk(KERN_WARNING "mem=%lu is invalid for an initial"
+                                   " allocation of %lu, using %lu\n",
+                      end_user_pfn << PAGE_SHIFT,
+                      xen_start_info->nr_pages << PAGE_SHIFT, end);
+               end_user_pfn = end >> PAGE_SHIFT;
+       }
+
        if (current_end < end) {
                /*
                  * The e820 map ends before our requested size so
@@ -715,6 +734,7 @@ void __init parse_memopt(char *p, char *
        }
 } 
 
+#ifndef CONFIG_XEN
 void __init parse_memmapopt(char *p, char **from)
 {
        unsigned long long start_at, mem_size;
@@ -735,6 +755,7 @@ void __init parse_memmapopt(char *p, cha
        }
        p = *from;
 }
+#endif
 
 unsigned long pci_mem_start = 0xaeedbabe;
 EXPORT_SYMBOL(pci_mem_start);
diff -r a18df47f671b -r cdd156cb645b arch/x86_64/kernel/setup-xen.c
--- a/arch/x86_64/kernel/setup-xen.c    Fri Aug 08 11:39:35 2008 +0900
+++ b/arch/x86_64/kernel/setup-xen.c    Mon Aug 11 11:05:57 2008 +0900
@@ -97,7 +97,7 @@ static struct notifier_block xen_panic_b
 };
 
 unsigned long *phys_to_machine_mapping;
-unsigned long *pfn_to_mfn_frame_list_list, *pfn_to_mfn_frame_list[512];
+unsigned long *pfn_to_mfn_frame_list_list, **pfn_to_mfn_frame_list;
 
 EXPORT_SYMBOL(phys_to_machine_mapping);
 
@@ -419,6 +419,7 @@ static __init void parse_cmdline_early (
                if (!memcmp(from, "mem=", 4))
                        parse_memopt(from+4, &from); 
 
+#ifndef CONFIG_XEN
                if (!memcmp(from, "memmap=", 7)) {
                        /* exactmap option is for used defined memory */
                        if (!memcmp(from+7, "exactmap", 8)) {
@@ -440,6 +441,7 @@ static __init void parse_cmdline_early (
                                userdef = 1;
                        }
                }
+#endif
 
 #ifdef CONFIG_NUMA
                if (!memcmp(from, "numa=", 5))
@@ -776,7 +778,7 @@ void __init setup_arch(char **cmdline_p)
 #ifdef CONFIG_XEN
        {
                int i, j, k, fpp;
-               unsigned long p2m_pages;
+               unsigned long p2m_pages, size;
 
                p2m_pages = end_pfn;
                if (xen_start_info->nr_pages > end_pfn) {
@@ -808,11 +810,11 @@ void __init setup_arch(char **cmdline_p)
                        /* Make sure we have a large enough P->M table. */
                        phys_to_machine_mapping = alloc_bootmem_pages(
                                end_pfn * sizeof(unsigned long));
-                       memset(phys_to_machine_mapping, ~0,
-                              end_pfn * sizeof(unsigned long));
                        memcpy(phys_to_machine_mapping,
                               (unsigned long *)xen_start_info->mfn_list,
                               p2m_pages * sizeof(unsigned long));
+                       memset(phys_to_machine_mapping + p2m_pages, ~0,
+                              (end_pfn - p2m_pages) * sizeof(unsigned long));
                        free_bootmem(
                                __pa(xen_start_info->mfn_list),
                                PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
@@ -823,13 +825,22 @@ void __init setup_arch(char **cmdline_p)
                         * list of frames that make up the p2m table. Used by
                          * save/restore.
                         */
-                       pfn_to_mfn_frame_list_list = 
alloc_bootmem_pages(PAGE_SIZE);
-
                        fpp = PAGE_SIZE/sizeof(unsigned long);
+                       size = (max_pfn + fpp - 1) / fpp;
+                       size = (size + fpp - 1) / fpp;
+                       size *= sizeof(unsigned long);
+                       pfn_to_mfn_frame_list_list = alloc_bootmem_pages(size);
+                       if (size > PAGE_SIZE
+                           && xen_create_contiguous_region((unsigned long)
+                                                           
pfn_to_mfn_frame_list_list,
+                                                           get_order(size), 0))
+                               BUG();
+                       pfn_to_mfn_frame_list = alloc_bootmem(size);
+
                        for (i=0, j=0, k=-1; i< end_pfn; i+=fpp, j++) {
                                if ((j % fpp) == 0) {
                                        k++;
-                                       BUG_ON(k>=fpp);
+                                       BUG_ON(k * sizeof(unsigned long) >= 
size);
                                        pfn_to_mfn_frame_list[k] =
                                                alloc_bootmem_pages(PAGE_SIZE);
                                        pfn_to_mfn_frame_list_list[k] =
diff -r a18df47f671b -r cdd156cb645b arch/x86_64/mm/init-xen.c
--- a/arch/x86_64/mm/init-xen.c Fri Aug 08 11:39:35 2008 +0900
+++ b/arch/x86_64/mm/init-xen.c Mon Aug 11 11:05:57 2008 +0900
@@ -610,6 +610,13 @@ static void __init extend_init_mapping(u
        while (va < (__START_KERNEL_map
                     + (start_pfn << PAGE_SHIFT)
                     + tables_space)) {
+               if (!pmd_index(va) && !pte_index(va)) {
+                       page = (unsigned long *)init_level4_pgt;
+                       addr = page[pgd_index(va)];
+                       addr_to_page(addr, page);
+                       addr = page[pud_index(va)];
+                       addr_to_page(addr, page);
+               }
                pmd = (pmd_t *)&page[pmd_index(va)];
                if (pmd_none(*pmd)) {
                        pte_page = alloc_static_page(&phys);
diff -r a18df47f671b -r cdd156cb645b drivers/acpi/processor_core.c
--- a/drivers/acpi/processor_core.c     Fri Aug 08 11:39:35 2008 +0900
+++ b/drivers/acpi/processor_core.c     Mon Aug 11 11:05:57 2008 +0900
@@ -509,7 +509,9 @@ static int acpi_processor_get_info(struc
                request_region(pr->throttling.address, 6, "ACPI CPU throttle");
        }
 
+#if defined(CONFIG_CPU_FREQ) || defined(CONFIG_PROCESSOR_EXTERNAL_CONTROL)
        acpi_processor_ppc_has_changed(pr);
+#endif
        acpi_processor_get_throttling_info(pr);
        acpi_processor_get_limit_info(pr);
 
diff -r a18df47f671b -r cdd156cb645b drivers/acpi/processor_extcntl.c
--- a/drivers/acpi/processor_extcntl.c  Fri Aug 08 11:39:35 2008 +0900
+++ b/drivers/acpi/processor_extcntl.c  Mon Aug 11 11:05:57 2008 +0900
@@ -29,6 +29,12 @@
 #include <linux/cpu.h>
 
 #include <acpi/processor.h>
+
+#define ACPI_PROCESSOR_COMPONENT        0x01000000
+#define ACPI_PROCESSOR_CLASS            "processor"
+#define ACPI_PROCESSOR_DRIVER_NAME      "ACPI Processor Driver"
+#define _COMPONENT              ACPI_PROCESSOR_COMPONENT
+ACPI_MODULE_NAME("acpi_processor")
 
 static int processor_extcntl_parse_csd(struct acpi_processor *pr);
 static int processor_extcntl_get_performance(struct acpi_processor *pr);
diff -r a18df47f671b -r cdd156cb645b drivers/char/Kconfig
--- a/drivers/char/Kconfig      Fri Aug 08 11:39:35 2008 +0900
+++ b/drivers/char/Kconfig      Mon Aug 11 11:05:57 2008 +0900
@@ -1005,7 +1005,7 @@ config HPET
 config HPET
        bool "HPET - High Precision Event Timer" if (X86 || IA64)
        default n
-       depends on ACPI
+       depends on ACPI && !XEN
        help
          If you say Y here, you will have a miscdevice named "/dev/hpet/".  
Each
          open selects one of the timers supported by the HPET.  The timers are
diff -r a18df47f671b -r cdd156cb645b drivers/video/Kconfig
--- a/drivers/video/Kconfig     Fri Aug 08 11:39:35 2008 +0900
+++ b/drivers/video/Kconfig     Mon Aug 11 11:05:57 2008 +0900
@@ -1254,7 +1254,7 @@ config FB_CYBLA
        tristate "Cyberblade/i1 support"
        depends on FB && PCI && X86_32 && !64BIT
        select FB_CFB_IMAGEBLIT
-       select VIDEO_SELECT
+       select VIDEO_SELECT if !XEN
        ---help---
          This driver is supposed to support the Trident Cyberblade/i1
          graphics core integrated in the VIA VT8601A North Bridge,
diff -r a18df47f671b -r cdd156cb645b drivers/xen/core/machine_reboot.c
--- a/drivers/xen/core/machine_reboot.c Fri Aug 08 11:39:35 2008 +0900
+++ b/drivers/xen/core/machine_reboot.c Mon Aug 11 11:05:57 2008 +0900
@@ -74,7 +74,7 @@ static void post_suspend(int suspend_can
        unsigned long shinfo_mfn;
        extern unsigned long max_pfn;
        extern unsigned long *pfn_to_mfn_frame_list_list;
-       extern unsigned long *pfn_to_mfn_frame_list[];
+       extern unsigned long **pfn_to_mfn_frame_list;
 
        if (suspend_cancelled) {
                xen_start_info->store_mfn =
@@ -184,14 +184,9 @@ static int take_machine_down(void *_susp
                 * We do it here just in case, but there's no need if we are
                 * in fast-suspend mode as that implies a new enough Xen.
                 */
-               if (!suspend->fast_suspend) {
-                       struct mmuext_op op;
-                       op.cmd = MMUEXT_NEW_USER_BASEPTR;
-                       op.arg1.mfn = pfn_to_mfn(__pa(__user_pgd(
-                               current->active_mm->pgd)) >> PAGE_SHIFT);
-                       if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF))
-                               BUG();
-               }
+               if (!suspend->fast_suspend)
+                       xen_new_user_pt(__pa(__user_pgd(
+                               current->active_mm->pgd)));
 #endif
        }
        time_resume();
diff -r a18df47f671b -r cdd156cb645b drivers/xen/core/pci.c
--- a/drivers/xen/core/pci.c    Fri Aug 08 11:39:35 2008 +0900
+++ b/drivers/xen/core/pci.c    Mon Aug 11 11:05:57 2008 +0900
@@ -23,9 +23,13 @@ static int pci_bus_probe_wrapper(struct 
                return r;
 
        r = pci_bus_probe(dev);
-       if (r)
-               WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_remove,
-                                             &manage_pci));
+       if (r) {
+               int ret;
+
+               ret = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_remove,
+                                           &manage_pci);
+               WARN_ON(ret && ret != -ENOSYS);
+       }
 
        return r;
 }
diff -r a18df47f671b -r cdd156cb645b drivers/xen/pciback/pci_stub.c
--- a/drivers/xen/pciback/pci_stub.c    Fri Aug 08 11:39:35 2008 +0900
+++ b/drivers/xen/pciback/pci_stub.c    Mon Aug 11 11:05:57 2008 +0900
@@ -813,11 +813,10 @@ int pciback_get_owner(struct pci_dev *de
 
        psdev = pcistub_device_find(pci_domain_nr(dev->bus), dev->bus->number,
                        PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
-       /* XXX will other domain has pciback support ??? */
-       if (!psdev || !psdev->pdev) {
-               printk(KERN_WARNING "no ownder\n");
+
+       if (!psdev || !psdev->pdev)
                return -1;
-       }
+
        return psdev->pdev->xdev->otherend_id;
 }
 #endif
diff -r a18df47f671b -r cdd156cb645b include/asm-x86_64/mach-xen/asm/pgtable.h
--- a/include/asm-x86_64/mach-xen/asm/pgtable.h Fri Aug 08 11:39:35 2008 +0900
+++ b/include/asm-x86_64/mach-xen/asm/pgtable.h Mon Aug 11 11:05:57 2008 +0900
@@ -135,11 +135,11 @@ static inline void pgd_clear (pgd_t * pg
 #define FIRST_USER_ADDRESS     0
 
 #ifndef __ASSEMBLY__
-#define MAXMEM          0x3fffffffffffUL
+#define MAXMEM          0xdfffffffffUL
 #define VMALLOC_START    0xffffc20000000000UL
 #define VMALLOC_END      0xffffe1ffffffffffUL
 #define MODULES_VADDR    0xffffffff88000000UL
-#define MODULES_END      0xfffffffffff00000UL
+#define MODULES_END      0xffffffffff000000UL
 #define MODULES_LEN   (MODULES_END - MODULES_VADDR)
 
 #define _PAGE_BIT_PRESENT      0

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

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