ia64/xen-unstable

changeset 6435:b4b3f6be5226

merge?
author cl349@firebug.cl.cam.ac.uk
date Thu Aug 25 17:27:49 2005 +0000 (2005-08-25)
parents 6ac24e39c9a4 f7cdd99d1106
children 9fb0bad776dd 112d44270733
files Config.mk extras/mini-os/include/hypervisor.h extras/mini-os/include/mm.h extras/mini-os/kernel.c extras/mini-os/mm.c linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64 linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/common.c linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c linux-2.6-xen-sparse/arch/xen/i386/kernel/traps.c linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c linux-2.6-xen-sparse/arch/xen/kernel/reboot.c linux-2.6-xen-sparse/arch/xen/x86_64/ia32/syscall32.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/early_printk.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head.S linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head64.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6-xen-sparse/drivers/xen/blkfront/block.h linux-2.6-xen-sparse/drivers/xen/console/console.c linux-2.6-xen-sparse/drivers/xen/netback/Makefile linux-2.6-xen-sparse/drivers/xen/netback/common.h linux-2.6-xen-sparse/drivers/xen/netback/interface.c linux-2.6-xen-sparse/drivers/xen/netback/netback.c linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/page.h linux-2.6-xen-sparse/include/asm-xen/gnttab.h tools/blktap/blktaplib.h tools/blktap/parallax/block-async.h tools/blktap/parallax/blockstore.h tools/console/Makefile tools/console/client/main.c tools/console/daemon/io.c tools/console/daemon/main.c tools/console/daemon/utils.c tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c tools/debugger/libxendebug/Makefile tools/debugger/libxendebug/xendebug.c tools/debugger/libxendebug/xendebug.h tools/debugger/pdb/pdb_caml_domain.c tools/debugger/pdb/pdb_caml_evtchn.c tools/debugger/pdb/pdb_caml_process.c tools/debugger/pdb/pdb_caml_xc.c tools/debugger/pdb/pdb_caml_xcs.c tools/debugger/pdb/pdb_xen.c tools/examples/Makefile tools/examples/README tools/examples/vif-bridge tools/firmware/acpi/acpi2_0.h tools/ioemu/hw/i8254.c tools/ioemu/hw/i8259.c tools/ioemu/hw/ioapic.h tools/ioemu/target-i386-dm/Makefile tools/ioemu/target-i386-dm/helper2.c tools/ioemu/vl.c tools/libxc/Makefile tools/libxc/xc_core.c tools/libxc/xc_domain.c tools/libxc/xc_linux_build.c tools/libxc/xc_linux_restore.c tools/libxc/xc_linux_save.c tools/libxc/xc_load_aout9.c tools/libxc/xc_load_bin.c tools/libxc/xc_load_elf.c tools/libxc/xc_private.c tools/libxc/xc_private.h tools/libxc/xc_vmx_build.c tools/libxc/xenctrl.h tools/libxc/xenguest.h tools/libxc/xg_private.c tools/libxc/xg_private.h tools/misc/Makefile tools/misc/cpuperf/Makefile tools/misc/cpuperf/cpuperf_xeno.h tools/misc/xc_shadow.c tools/misc/xenperf.c tools/python/setup.py tools/python/xen/lowlevel/xc/xc.c tools/python/xen/lowlevel/xu/xu.c tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xm/main.py tools/xcs/Makefile tools/xcs/dump.h tools/xcs/xcs.h tools/xcs/xcsdump.c tools/xcutils/Makefile tools/xcutils/xc_restore.c tools/xcutils/xc_save.c tools/xenstore/Makefile tools/xenstore/xs_dom0_test.c tools/xenstore/xs_lib.h tools/xentrace/Makefile tools/xentrace/xenctx.c xen/arch/x86/cpu/amd.c xen/arch/x86/mm.c xen/arch/x86/x86_32/mm.c xen/arch/x86/x86_64/mm.c
line diff
     1.1 --- a/xen/arch/x86/x86_32/mm.c	Thu Aug 25 17:27:31 2005 +0000
     1.2 +++ b/xen/arch/x86/x86_32/mm.c	Thu Aug 25 17:27:49 2005 +0000
     1.3 @@ -93,15 +93,10 @@ void __init paging_init(void)
     1.4  
     1.5      /*
     1.6       * Allocate and map the machine-to-phys table and create read-only mapping 
     1.7 -     * of MPT for guest-OS use.  Without PAE we'll end up with one 4MB page, 
     1.8 -     * with PAE we'll allocate 2MB pages depending on the amount of memory 
     1.9 -     * installed, but at least 4MB to cover 4GB address space.  This is needed 
    1.10 -     * to make PCI I/O memory address lookups work in guests.
    1.11 +     * of MPT for guest-OS use.
    1.12       */
    1.13      mpt_size  = (max_page * 4) + (1UL << L2_PAGETABLE_SHIFT) - 1UL;
    1.14      mpt_size &= ~((1UL << L2_PAGETABLE_SHIFT) - 1UL);
    1.15 -    if ( mpt_size < (4 << 20) )
    1.16 -        mpt_size = 4 << 20;
    1.17      for ( i = 0; i < (mpt_size >> L2_PAGETABLE_SHIFT); i++ )
    1.18      {
    1.19          if ( (pg = alloc_domheap_pages(NULL, PAGETABLE_ORDER, 0)) == NULL )
     2.1 --- a/xen/arch/x86/x86_64/mm.c	Thu Aug 25 17:27:31 2005 +0000
     2.2 +++ b/xen/arch/x86/x86_64/mm.c	Thu Aug 25 17:27:49 2005 +0000
     2.3 @@ -74,7 +74,7 @@ l2_pgentry_t *virt_to_xen_l2e(unsigned l
     2.4  
     2.5  void __init paging_init(void)
     2.6  {
     2.7 -    unsigned long i;
     2.8 +    unsigned long i, mpt_size;
     2.9      l3_pgentry_t *l3_ro_mpt;
    2.10      l2_pgentry_t *l2_ro_mpt;
    2.11      struct pfn_info *pg;
    2.12 @@ -98,16 +98,17 @@ void __init paging_init(void)
    2.13       * Allocate and map the machine-to-phys table.
    2.14       * This also ensures L3 is present for fixmaps.
    2.15       */
    2.16 -    for ( i = 0; i < max_page; i += ((1UL << L2_PAGETABLE_SHIFT) / 4) )
    2.17 +    mpt_size  = (max_page * 4) + (1UL << L2_PAGETABLE_SHIFT) - 1UL;
    2.18 +    mpt_size &= ~((1UL << L2_PAGETABLE_SHIFT) - 1UL);
    2.19 +    for ( i = 0; i < (mpt_size >> L2_PAGETABLE_SHIFT); i++ )
    2.20      {
    2.21 -        pg = alloc_domheap_pages(NULL, PAGETABLE_ORDER, 0);
    2.22 -        if ( pg == NULL )
    2.23 +        if ( (pg = alloc_domheap_pages(NULL, PAGETABLE_ORDER, 0)) == NULL )
    2.24              panic("Not enough memory for m2p table\n");
    2.25          map_pages_to_xen(
    2.26 -            RDWR_MPT_VIRT_START + i*8, page_to_pfn(pg), 
    2.27 +            RDWR_MPT_VIRT_START + (i << L2_PAGETABLE_SHIFT), page_to_pfn(pg), 
    2.28              1UL << PAGETABLE_ORDER,
    2.29              PAGE_HYPERVISOR);
    2.30 -        memset((void *)(RDWR_MPT_VIRT_START + i*8), 0x55,
    2.31 +        memset((void *)(RDWR_MPT_VIRT_START + (i << L2_PAGETABLE_SHIFT)), 0x55,
    2.32                 1UL << L2_PAGETABLE_SHIFT);
    2.33          *l2_ro_mpt++ = l2e_from_page(
    2.34              pg, _PAGE_GLOBAL|_PAGE_PSE|_PAGE_USER|_PAGE_PRESENT);