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] reboot.c, init.c, hypervisor.h, evtchn.h, tlbflush.h, p

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] reboot.c, init.c, hypervisor.h, evtchn.h, tlbflush.h, pgtable-2level.h:
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Thu, 28 Apr 2005 15:08:57 +0000
Delivery-date: Thu, 28 Apr 2005 22:02:53 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1159.256.107, 2005/04/28 16:08:57+01:00, cl349@xxxxxxxxxxxxxxxxxxxx

        reboot.c, init.c, hypervisor.h, evtchn.h, tlbflush.h, pgtable-2level.h:
          sync w/ unstable.
        system.h:
          Fix typo.
        pgtable.h, fixup.c, irq.c, direct.c, timer_tsc.c, pci-dma.c, init.c, 
fault.c:
          Cleanup whitespace.
        page.h:
          Turn __pte and __pgd into #define's like the original definitions.
          Add casts to unsigned long for phys_to_machine_mapping and
          machine_to_phys_mapping.
        fixmap.h, Makefile:
          gnttab is not used in 2.0.
        .del-gnttab.c~4461d10e936c37ab:
          Delete: linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c
        .del-gnttab.h~974eaf5d22418ecd:
          Delete: linux-2.6.11-xen-sparse/include/asm-xen/gnttab.h
        setup.c:
          Add panic notification handler.
          Change phys_to_machine_mapping from unsigned long * to unsigned int *.
          Whitespace cleanups.
        page.h:
          Change phys_to_machine_mapping from unsigned long * to unsigned int *.
        process.c:
          UTSNAME -> system_utsname.release as in plain Linux.
          Disable preemption before reading smp_processor_id.
        head.S:
          sync w/ unstable for maintenance -- backport SMP-guest support bits.
          Break __xen_guest definition up in several lines.
        ldt.c, desc.h, common.c:
          Move queue flush into load_LDT().
        common.c:
          g/c unused code.
        Kconfig:
          Fix whitespace for microcode option.



 b/linux-2.6.11-xen-sparse/arch/xen/i386/Kconfig                     |   26 -
 b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c         |   14 
 b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S               |   32 +
 b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/ldt.c                |    5 
 b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c            |   41 +-
 b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c            |    5 
 b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c              |   38 +-
 b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c   |    4 
 b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/fault.c                  |    8 
 b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c                   |   23 -
 b/linux-2.6.11-xen-sparse/arch/xen/i386/pci/direct.c                |    8 
 b/linux-2.6.11-xen-sparse/arch/xen/i386/pci/irq.c                   |    2 
 b/linux-2.6.11-xen-sparse/arch/xen/kernel/Makefile                  |    2 
 b/linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c                   |    3 
 b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c                  |    8 
 b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/desc.h           |    1 
 b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h         |    1 
 b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/page.h           |   20 -
 b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h |    2 
 b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/pgtable.h        |    1 
 b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/system.h         |    2 
 b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/tlbflush.h       |    5 
 b/linux-2.6.11-xen-sparse/include/asm-xen/evtchn.h                  |    3 
 b/linux-2.6.11-xen-sparse/include/asm-xen/hypervisor.h              |    6 
 linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c                    |  163 
----------
 linux-2.6.11-xen-sparse/include/asm-xen/gnttab.h                    |   35 --
 26 files changed, 135 insertions(+), 323 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/Kconfig 
b/linux-2.6.11-xen-sparse/arch/xen/i386/Kconfig
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/Kconfig     2005-04-28 18:03:13 
-04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/Kconfig     2005-04-28 18:03:13 
-04:00
@@ -456,22 +456,22 @@
 #         enters thermal throttling.
 
 config MICROCODE
-        tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support"
+       tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support"
         depends on XEN_PRIVILEGED_GUEST
-        ---help---
-          If you say Y here and also to "/dev file system support" in the
-          'File systems' section, you will be able to update the microcode on
-          Intel processors in the IA32 family, e.g. Pentium Pro, Pentium II,
-          Pentium III, Pentium 4, Xeon etc.  You will obviously need the
-          actual microcode binary data itself which is not shipped with the
-          Linux kernel.
+       ---help---
+         If you say Y here and also to "/dev file system support" in the
+         'File systems' section, you will be able to update the microcode on
+         Intel processors in the IA32 family, e.g. Pentium Pro, Pentium II,
+         Pentium III, Pentium 4, Xeon etc.  You will obviously need the
+         actual microcode binary data itself which is not shipped with the
+         Linux kernel.
 
-          For latest news and information on obtaining all the required
-          ingredients for this driver, check:
-          <http://www.urbanmyth.org/microcode/>.
+         For latest news and information on obtaining all the required
+         ingredients for this driver, check:
+         <http://www.urbanmyth.org/microcode/>.
 
-          To compile this driver as a module, choose M here: the
-          module will be called microcode.
+         To compile this driver as a module, choose M here: the
+         module will be called microcode.
 
 #config X86_MSR
 #       tristate "/dev/cpu/*/msr - Model-specific register support"
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c 2005-04-28 
18:03:13 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c 2005-04-28 
18:03:13 -04:00
@@ -598,21 +598,10 @@
        }
 
        /*
-        * Initialize the per-CPU GDT with the boot GDT,
-        * and set up the GDT descriptor:
-        */
-       if (cpu) {
-               cpu_gdt_descr[cpu].size = GDT_SIZE;
-               cpu_gdt_descr[cpu].address = 0; /* XXXcl alloc page */
-               BUG();          /* XXXcl SMP */
-               memcpy((void *)cpu_gdt_descr[cpu].address,
-                   (void *)cpu_gdt_descr[0].address, GDT_SIZE);
-       }
-       /*
         * Set up the per-thread TLS descriptor cache:
         */
        memcpy(thread->tls_array, &get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN],
-           GDT_ENTRY_TLS_ENTRIES * 8);
+              GDT_ENTRY_TLS_ENTRIES * 8);
 
        cpu_gdt_init(&cpu_gdt_descr[cpu]);
 
@@ -633,7 +622,6 @@
        load_esp0(t, thread);
 
        load_LDT(&init_mm.context);
-       flush_page_update_queue();
 
        /* Clear %fs and %gs. */
        asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs");
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S       2005-04-28 
18:03:13 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S       2005-04-28 
18:03:13 -04:00
@@ -2,7 +2,9 @@
 #include <linux/config.h>
 
 .section __xen_guest
-       .ascii  "GUEST_OS=linux,GUEST_VER=2.6,XEN_VER=2.0,VIRT_BASE=0xC0000000"
+       .ascii  "GUEST_OS=linux,GUEST_VER=2.6"
+       .ascii  ",XEN_VER=2.0"
+       .ascii  ",VIRT_BASE=0xC0000000"
        .ascii  ",LOADER=generic"
        .ascii  ",PT_MODE_WRITABLE"
        .byte   0
@@ -31,14 +33,19 @@
 ENTRY(startup_32)
        cld
 
-       /* Set up the stack pointer */
-       lss stack_start,%esp
-
        /* Copy the necessary stuff from xen_start_info structure. */
        mov  $xen_start_info_union,%edi
        mov  $128,%ecx
        rep movsl
 
+#ifdef CONFIG_SMP
+ENTRY(startup_32_smp)
+       cld
+#endif /* CONFIG_SMP */
+
+       /* Set up the stack pointer */
+       lss stack_start,%esp
+
 checkCPUtype:
 
        /* get vendor info */
@@ -61,11 +68,22 @@
        movb %cl,X86_MASK
        movl %edx,X86_CAPABILITY
 
-       xorl %eax,%eax          # Clear FS/GS and LDT
+       incb ready
+
+       xorl %eax,%eax                  # Clear FS/GS and LDT
        movl %eax,%fs
        movl %eax,%gs
-       cld             # gcc2 wants the direction flag cleared at all times
+       cld                     # gcc2 wants the direction flag cleared at all 
times
 
+#ifdef CONFIG_SMP
+       movb ready, %cl 
+       cmpb $1,%cl
+       je 1f                   # the first CPU calls start_kernel
+                               # all other CPUs call initialize_secondary
+       call initialize_secondary
+       jmp L6
+1:
+#endif /* CONFIG_SMP */
        call start_kernel
 L6:
        jmp L6                  # main should never return here, but
@@ -87,6 +105,8 @@
 ENTRY(stack_start)
        .long init_thread_union+THREAD_SIZE
        .long __BOOT_DS
+
+ready: .byte 0
 
 .globl idt_descr
 .globl cpu_gdt_descr
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/ldt.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/ldt.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/ldt.c        2005-04-28 
18:03:13 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/ldt.c        2005-04-28 
18:03:13 -04:00
@@ -22,10 +22,8 @@
 #ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
 static void flush_ldt(void *null)
 {
-       if (current->active_mm) {
+       if (current->active_mm)
                load_LDT(&current->active_mm->context);
-               flush_page_update_queue();
-       }
 }
 #endif
 
@@ -64,7 +62,6 @@
                make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
                                    PAGE_SIZE);
                load_LDT(pc);
-               flush_page_update_queue();
 #ifdef CONFIG_SMP
                mask = cpumask_of_cpu(smp_processor_id());
                if (!cpus_equal(current->mm->cpu_vm_mask, mask))
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c    2005-04-28 
18:03:13 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c    2005-04-28 
18:03:13 -04:00
@@ -49,11 +49,11 @@
 
        /* 1. Zap current PTEs, giving away the underlying pages. */
        for (i = 0; i < (1<<order); i++) {
-               pgd = pgd_offset_k(   (vstart + (i*PAGE_SIZE)));
-               pud = pud_offset(pgd, (vstart + (i*PAGE_SIZE)));
-               pmd = pmd_offset(pud, (vstart + (i*PAGE_SIZE)));
-               pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
-               pfn = pte->pte_low >> PAGE_SHIFT;
+               pgd = pgd_offset_k(vstart + (i*PAGE_SIZE));
+               pud = pud_offset(pgd, vstart + (i*PAGE_SIZE));
+               pmd = pmd_offset(pud, vstart + (i*PAGE_SIZE));
+               pte = pte_offset_kernel(pmd, vstart + (i*PAGE_SIZE));
+               pfn = pte_val_ma(*pte) >> PAGE_SHIFT;
                queue_l1_entry_update(pte, 0);
                phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
                        INVALID_P2M_ENTRY;
@@ -66,21 +66,19 @@
                                  &pfn, 1, order) != 1) BUG();
        /* 3. Map the new extent in place of old pages. */
        for (i = 0; i < (1<<order); i++) {
-               pgd = pgd_offset_k(   (vstart + (i*PAGE_SIZE)));
-               pud = pud_offset(pgd, (vstart + (i*PAGE_SIZE)));
-               pmd = pmd_offset(pud, (vstart + (i*PAGE_SIZE)));
-               pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
-               queue_l1_entry_update(
-                       pte, ((pfn+i)<<PAGE_SHIFT)|__PAGE_KERNEL);
-               queue_machphys_update(
-                       pfn+i, (__pa(vstart)>>PAGE_SHIFT)+i);
-               phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
-                       pfn+i;
+               pgd = pgd_offset_k(vstart + (i*PAGE_SIZE));
+               pud = pud_offset(pgd, vstart + (i*PAGE_SIZE));
+               pmd = pmd_offset(pud, vstart + (i*PAGE_SIZE));
+               pte = pte_offset_kernel(pmd, vstart + (i*PAGE_SIZE));
+               queue_l1_entry_update(pte,
+                                     ((pfn+i)<<PAGE_SHIFT)|__PAGE_KERNEL);
+               queue_machphys_update(pfn+i, (__pa(vstart)>>PAGE_SHIFT)+i);
+               phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] = pfn+i;
        }
        /* Flush updates through and flush the TLB. */
        xen_tlb_flush();
 
-        balloon_unlock(flags);
+       balloon_unlock(flags);
 }
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
@@ -125,14 +123,13 @@
 
        vstart = __get_free_pages(gfp, order);
        ret = (void *)vstart;
-       if (ret == NULL)
-               return ret;
-
-       xen_contig_memory(vstart, order);
 
-       memset(ret, 0, size);
-       *dma_handle = virt_to_bus(ret);
+       if (ret != NULL) {
+               xen_contig_memory(vstart, order);
 
+               memset(ret, 0, size);
+               *dma_handle = virt_to_bus(ret);
+       }
        return ret;
 }
 
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c    2005-04-28 
18:03:13 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c    2005-04-28 
18:03:13 -04:00
@@ -94,10 +94,11 @@
 extern int set_timeout_timer(void);
 void xen_idle(void)
 {
-       int cpu = smp_processor_id();
+       int cpu;
 
        local_irq_disable();
 

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

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