ia64/xen-unstable

changeset 6539:99914b54f7bf

Merge.
author adsharma@los-vmm.sc.intel.com
date Thu Aug 18 10:40:02 2005 -0800 (2005-08-18)
parents 84ee014ebd41 978ce7f6a3eb
children 81576d3d1ca8
files .hgignore Config.mk Makefile buildconfigs/Rules.mk buildconfigs/mk.linux-2.6-xen buildconfigs/mk.linux-2.6-xen0 buildconfigs/mk.linux-2.6-xenU docs/misc/shype4xen_readme.txt docs/src/user.tex linux-2.4-xen-sparse/arch/xen/Makefile linux-2.4-xen-sparse/arch/xen/config.in linux-2.4-xen-sparse/arch/xen/kernel/time.c linux-2.4-xen-sparse/include/asm-xen/bugs.h linux-2.4-xen-sparse/include/asm-xen/fixmap.h linux-2.4-xen-sparse/include/asm-xen/highmem.h linux-2.4-xen-sparse/include/asm-xen/hw_irq.h linux-2.4-xen-sparse/include/asm-xen/io.h linux-2.4-xen-sparse/include/asm-xen/irq.h linux-2.4-xen-sparse/include/asm-xen/mmu_context.h linux-2.4-xen-sparse/include/asm-xen/page.h linux-2.4-xen-sparse/include/asm-xen/pci.h linux-2.4-xen-sparse/include/asm-xen/pgalloc.h linux-2.4-xen-sparse/include/asm-xen/pgtable.h linux-2.4-xen-sparse/include/asm-xen/processor.h linux-2.4-xen-sparse/include/asm-xen/segment.h linux-2.4-xen-sparse/include/asm-xen/smp.h linux-2.4-xen-sparse/include/asm-xen/system.h linux-2.4-xen-sparse/include/asm-xen/vga.h linux-2.4-xen-sparse/include/linux/blk.h linux-2.4-xen-sparse/include/linux/highmem.h linux-2.4-xen-sparse/include/linux/irq.h linux-2.4-xen-sparse/include/linux/mm.h linux-2.4-xen-sparse/include/linux/sched.h linux-2.4-xen-sparse/include/linux/skbuff.h linux-2.4-xen-sparse/include/linux/timer.h linux-2.4-xen-sparse/mkbuildtree linux-2.6-xen-sparse/arch/xen/Kconfig linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32 linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64 linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32 linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64 linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_32 linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_64 linux-2.6-xen-sparse/arch/xen/i386/Kconfig linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile linux-2.6-xen-sparse/arch/xen/i386/kernel/entry.S linux-2.6-xen-sparse/arch/xen/i386/kernel/head.S linux-2.6-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c linux-2.6-xen-sparse/arch/xen/i386/kernel/ioport.c linux-2.6-xen-sparse/arch/xen/i386/kernel/irq.c linux-2.6-xen-sparse/arch/xen/i386/kernel/mpparse.c linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c linux-2.6-xen-sparse/arch/xen/i386/kernel/traps.c linux-2.6-xen-sparse/arch/xen/i386/mm/highmem.c linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6-xen-sparse/arch/xen/i386/mm/init.c linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c linux-2.6-xen-sparse/arch/xen/i386/pci/irq.c linux-2.6-xen-sparse/arch/xen/kernel/evtchn.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/kernel/skbuff.c linux-2.6-xen-sparse/arch/xen/x86_64/Kconfig linux-2.6-xen-sparse/arch/xen/x86_64/Makefile linux-2.6-xen-sparse/arch/xen/x86_64/kernel/Makefile linux-2.6-xen-sparse/arch/xen/x86_64/kernel/apic.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S linux-2.6-xen-sparse/arch/xen/x86_64/kernel/genapic.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/genapic_xen.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head.S linux-2.6-xen-sparse/arch/xen/x86_64/kernel/ioport.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/irq.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-nommu.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.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/smp.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/traps.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/xen_entry.S linux-2.6-xen-sparse/arch/xen/x86_64/mm/fault.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/ioremap.c linux-2.6-xen-sparse/drivers/xen/Makefile linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6-xen-sparse/drivers/xen/blkback/Makefile linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6-xen-sparse/drivers/xen/blkback/common.h linux-2.6-xen-sparse/drivers/xen/blkback/control.c linux-2.6-xen-sparse/drivers/xen/blkback/interface.c linux-2.6-xen-sparse/drivers/xen/blkback/vbd.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/blkfront/vbd.c linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h linux-2.6-xen-sparse/drivers/xen/blktap/blktap_controlmsg.c linux-2.6-xen-sparse/drivers/xen/blktap/blktap_datapath.c linux-2.6-xen-sparse/drivers/xen/blktap/blktap_userdev.c 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/privcmd/privcmd.c linux-2.6-xen-sparse/drivers/xen/usbback/common.h linux-2.6-xen-sparse/drivers/xen/usbback/interface.c linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront.c linux-2.6-xen-sparse/drivers/xen/usbfront/xhci.h linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.h linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c linux-2.6-xen-sparse/include/asm-generic/pgtable.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/fixmap.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/kmap_types.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pci.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgalloc.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-3level.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/scatterlist.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/swiotlb.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/io.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/irq_vectors.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pci.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/processor.h linux-2.6-xen-sparse/include/asm-xen/balloon.h linux-2.6-xen-sparse/include/asm-xen/ctrl_if.h linux-2.6-xen-sparse/include/asm-xen/evtchn.h linux-2.6-xen-sparse/include/asm-xen/gnttab.h linux-2.6-xen-sparse/include/asm-xen/hypervisor.h linux-2.6-xen-sparse/include/asm-xen/xenbus.h linux-2.6-xen-sparse/include/linux/highmem.h linux-2.6-xen-sparse/include/linux/mm.h linux-2.6-xen-sparse/kernel/irq/manage.c linux-2.6-xen-sparse/mkbuildtree linux-2.6-xen-sparse/mm/highmem.c linux-2.6-xen-sparse/mm/memory.c patches/linux-2.6.12/patch-2.6.12.5 patches/linux-2.6.12/smp-alts.patch tools/Makefile tools/blktap/blktaplib.c tools/console/client/main.c tools/console/daemon/io.c tools/console/daemon/utils.c tools/debugger/gdb/gdbbuild tools/debugger/libxendebug/xendebug.c tools/debugger/pdb/Domain.ml tools/debugger/pdb/Domain.mli tools/debugger/pdb/Makefile tools/debugger/pdb/PDB.ml tools/debugger/pdb/Process.ml tools/debugger/pdb/Process.mli tools/debugger/pdb/Util.ml tools/debugger/pdb/Xen_domain.ml tools/debugger/pdb/Xen_domain.mli tools/debugger/pdb/debugger.ml tools/debugger/pdb/linux-2.6-module/Makefile tools/debugger/pdb/linux-2.6-module/debug.c tools/debugger/pdb/linux-2.6-module/module.c tools/debugger/pdb/linux-2.6-module/pdb_debug.h tools/debugger/pdb/linux-2.6-module/pdb_module.h tools/debugger/pdb/linux-2.6-patches/Makefile tools/debugger/pdb/linux-2.6-patches/i386_ksyms.patch tools/debugger/pdb/linux-2.6-patches/kdebug.patch tools/debugger/pdb/linux-2.6-patches/makefile.patch tools/debugger/pdb/linux-2.6-patches/ptrace.patch tools/debugger/pdb/linux-2.6-patches/traps.patch tools/debugger/pdb/pdb_caml_domain.c tools/debugger/pdb/pdb_caml_process.c tools/debugger/pdb/pdb_caml_xcs.c tools/debugger/pdb/pdb_caml_xen.h tools/debugger/pdb/readme tools/debugger/pdb/server.ml tools/examples/Makefile tools/examples/network-bridge tools/examples/xend-config.sxp tools/examples/xmexample.vmx tools/firmware/rombios/rombios.c tools/ioemu/hw/pc.c tools/ioemu/hw/pckbd.c tools/ioemu/monitor.c tools/ioemu/target-i386-dm/Makefile tools/ioemu/target-i386-dm/helper2.c tools/ioemu/target-i386-dm/qemu-dm.debug tools/ioemu/vl.c tools/ioemu/vl.h tools/ioemu/vnc.c tools/libxc/Makefile tools/libxc/linux_boot_params.h tools/libxc/xc.h tools/libxc/xc_core.c tools/libxc/xc_domain.c tools/libxc/xc_gnttab.c tools/libxc/xc_linux_build.c tools/libxc/xc_linux_restore.c tools/libxc/xc_linux_save.c tools/libxc/xc_load_elf.c tools/libxc/xc_private.c tools/libxc/xc_private.h tools/libxc/xc_ptrace.c tools/libxc/xc_vmx_build.c tools/misc/Makefile tools/misc/policyprocessor/XmlToBinInterface.java tools/misc/xend tools/python/setup.py tools/python/xen/lowlevel/xc/xc.c tools/python/xen/lowlevel/xs/xs.c tools/python/xen/lowlevel/xu/xu.c tools/python/xen/sv/CreateDomain.py tools/python/xen/sv/DomInfo.py tools/python/xen/sv/GenTabbed.py tools/python/xen/sv/HTMLBase.py tools/python/xen/sv/Main.py tools/python/xen/sv/NodeInfo.py tools/python/xen/sv/RestoreDomain.py tools/python/xen/sv/Wizard.py tools/python/xen/sv/__init__.py tools/python/xen/sv/util.py tools/python/xen/web/SrvBase.py tools/python/xen/web/SrvDir.py tools/python/xen/web/__init__.py tools/python/xen/web/connection.py tools/python/xen/web/httpserver.py tools/python/xen/web/protocol.py tools/python/xen/web/reactor.py tools/python/xen/web/resource.py tools/python/xen/web/static.py tools/python/xen/web/tcp.py tools/python/xen/web/unix.py tools/python/xen/xend/Args.py tools/python/xen/xend/EventServer.py tools/python/xen/xend/PrettyPrint.py tools/python/xen/xend/Vifctl.py tools/python/xen/xend/XendCheckpoint.py tools/python/xen/xend/XendClient.py tools/python/xen/xend/XendDB.py tools/python/xen/xend/XendDmesg.py tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/XendError.py tools/python/xen/xend/XendLogging.py tools/python/xen/xend/XendNode.py tools/python/xen/xend/XendProtocol.py tools/python/xen/xend/XendRoot.py tools/python/xen/xend/XendVnet.py tools/python/xen/xend/encode.py tools/python/xen/xend/image.py tools/python/xen/xend/scheduler.py tools/python/xen/xend/server/SrvDaemon.py tools/python/xen/xend/server/SrvDmesg.py tools/python/xen/xend/server/SrvDomain.py tools/python/xen/xend/server/SrvDomainDir.py tools/python/xen/xend/server/SrvNode.py tools/python/xen/xend/server/SrvRoot.py tools/python/xen/xend/server/SrvServer.py tools/python/xen/xend/server/SrvVnetDir.py tools/python/xen/xend/server/SrvXendLog.py tools/python/xen/xend/server/blkif.py tools/python/xen/xend/server/channel.py tools/python/xen/xend/server/controller.py tools/python/xen/xend/server/event.py tools/python/xen/xend/server/messages.py tools/python/xen/xend/server/netif.py tools/python/xen/xend/server/params.py tools/python/xen/xend/server/pciif.py tools/python/xen/xend/server/relocate.py tools/python/xen/xend/sxp.py tools/python/xen/xend/uuid.py tools/python/xen/xend/xenstore/__init__.py tools/python/xen/xend/xenstore/xsnode.py tools/python/xen/xend/xenstore/xsobj.py tools/python/xen/xend/xenstore/xsresource.py tools/python/xen/xm/create.py tools/python/xen/xm/destroy.py tools/python/xen/xm/help.py tools/python/xen/xm/main.py tools/python/xen/xm/migrate.py tools/python/xen/xm/opts.py tools/python/xen/xm/shutdown.py tools/python/xen/xm/sysrq.py tools/security/secpol_tool.c tools/sv/Makefile tools/sv/images/destroy.png tools/sv/images/finish.png tools/sv/images/next.png tools/sv/images/pause.png tools/sv/images/previous.png tools/sv/images/reboot.png tools/sv/images/shutdown.png tools/sv/images/small-destroy.png tools/sv/images/small-pause.png tools/sv/images/small-unpause.png tools/sv/images/unpause.png tools/sv/images/xen.png tools/sv/inc/script.js tools/sv/inc/style.css tools/sv/index.psp tools/xcs/xcs.h tools/xcutils/xc_restore.c tools/xenstore/Makefile tools/xenstore/TODO tools/xenstore/testsuite/test.sh tools/xenstore/utils.c tools/xenstore/utils.h tools/xenstore/xenstored.h tools/xenstore/xenstored_core.c tools/xenstore/xenstored_core.h tools/xenstore/xenstored_domain.c tools/xenstore/xenstored_domain.h tools/xenstore/xenstored_transaction.c tools/xenstore/xenstored_transaction.h tools/xenstore/xenstored_watch.c tools/xenstore/xenstored_watch.h tools/xenstore/xs.c tools/xenstore/xs.h tools/xenstore/xs_lib.c tools/xenstore/xs_lib.h tools/xenstore/xs_random.c tools/xenstore/xs_test.c tools/xentrace/xentrace.c xen/Makefile xen/Rules.mk xen/acm/acm_core.c xen/acm/acm_policy.c xen/arch/ia64/Makefile xen/arch/ia64/Rules.mk xen/arch/ia64/asm-offsets.c xen/arch/ia64/asm-xsi-offsets.c xen/arch/ia64/dom_fw.c xen/arch/ia64/domain.c xen/arch/ia64/grant_table.c xen/arch/ia64/hypercall.c xen/arch/ia64/hyperprivop.S xen/arch/ia64/mmio.c xen/arch/ia64/pal_emul.c xen/arch/ia64/patch/linux-2.6.11/irq_ia64.c xen/arch/ia64/patch/linux-2.6.11/kregs.h xen/arch/ia64/pcdp.c xen/arch/ia64/process.c xen/arch/ia64/regionreg.c xen/arch/ia64/tools/mkbuildtree xen/arch/ia64/vcpu.c xen/arch/ia64/vlsapic.c xen/arch/ia64/vmmu.c xen/arch/ia64/vmx_hypercall.c xen/arch/ia64/vmx_ivt.S xen/arch/ia64/vmx_support.c xen/arch/ia64/vmx_vcpu.c xen/arch/ia64/vmx_virt.c xen/arch/ia64/vtlb.c xen/arch/ia64/xenasm.S xen/arch/ia64/xenmem.c xen/arch/ia64/xenmisc.c xen/arch/ia64/xensetup.c xen/arch/ia64/xentime.c xen/arch/x86/Makefile xen/arch/x86/acpi/boot.c xen/arch/x86/apic.c xen/arch/x86/audit.c xen/arch/x86/cpu/common.c xen/arch/x86/dom0_ops.c xen/arch/x86/domain.c xen/arch/x86/domain_build.c xen/arch/x86/genapic/es7000plat.c xen/arch/x86/i8259.c xen/arch/x86/io_apic.c xen/arch/x86/mm.c xen/arch/x86/mpparse.c xen/arch/x86/setup.c xen/arch/x86/shadow.c xen/arch/x86/shadow32.c xen/arch/x86/shadow_public.c xen/arch/x86/smpboot.c xen/arch/x86/time.c xen/arch/x86/traps.c xen/arch/x86/vmx.c xen/arch/x86/vmx_intercept.c xen/arch/x86/vmx_io.c xen/arch/x86/vmx_platform.c xen/arch/x86/vmx_vmcs.c xen/arch/x86/x86_32/entry.S xen/arch/x86/x86_32/mm.c xen/arch/x86/x86_32/traps.c xen/arch/x86/x86_64/entry.S xen/arch/x86/x86_64/mm.c xen/arch/x86/x86_64/traps.c xen/common/ac_timer.c xen/common/dom0_ops.c xen/common/dom_mem_ops.c xen/common/domain.c xen/common/grant_table.c xen/common/page_alloc.c xen/common/perfc.c xen/common/sched_sedf.c xen/common/schedule.c xen/common/symbols.c xen/common/xmalloc.c xen/drivers/char/console.c xen/drivers/char/ns16550.c xen/include/acm/acm_core.h xen/include/acm/acm_hooks.h xen/include/asm-ia64/config.h xen/include/asm-ia64/domain.h xen/include/asm-ia64/event.h xen/include/asm-ia64/ia64_int.h xen/include/asm-ia64/privop.h xen/include/asm-ia64/regionreg.h xen/include/asm-ia64/regs.h xen/include/asm-ia64/vcpu.h xen/include/asm-ia64/vmx.h xen/include/asm-ia64/vmx_uaccess.h xen/include/asm-ia64/vmx_vcpu.h xen/include/asm-ia64/vmx_vpd.h xen/include/asm-ia64/xensystem.h xen/include/asm-x86/apicdef.h xen/include/asm-x86/config.h xen/include/asm-x86/e820.h xen/include/asm-x86/event.h xen/include/asm-x86/fixmap.h xen/include/asm-x86/genapic.h xen/include/asm-x86/hpet.h xen/include/asm-x86/io.h xen/include/asm-x86/mach-bigsmp/mach_apic.h xen/include/asm-x86/mach-default/mach_apic.h xen/include/asm-x86/mach-es7000/mach_apic.h xen/include/asm-x86/mach-generic/mach_apic.h xen/include/asm-x86/mach-summit/mach_apic.h xen/include/asm-x86/mach-summit/mach_mpparse.h xen/include/asm-x86/mm.h xen/include/asm-x86/page.h xen/include/asm-x86/shadow.h xen/include/asm-x86/shadow_64.h xen/include/asm-x86/shadow_public.h xen/include/asm-x86/time.h xen/include/asm-x86/types.h xen/include/asm-x86/uaccess.h xen/include/asm-x86/vmx.h xen/include/asm-x86/vmx_virpit.h xen/include/asm-x86/vmx_vmcs.h xen/include/asm-x86/x86_32/uaccess.h xen/include/asm-x86/x86_64/page.h xen/include/public/arch-ia64.h xen/include/public/dom0_ops.h xen/include/public/grant_table.h xen/include/public/io/blkif.h xen/include/public/io/domain_controller.h xen/include/public/io/netif.h xen/include/public/trace.h xen/include/public/xen.h xen/include/xen/ac_timer.h xen/include/xen/domain.h xen/include/xen/event.h xen/include/xen/grant_table.h xen/include/xen/mm.h xen/include/xen/perfc_defn.h xen/include/xen/sched.h xen/include/xen/serial.h xen/include/xen/symbols.h xen/include/xen/time.h xen/include/xen/trace.h xen/tools/Makefile xen/tools/symbols.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32	Wed Aug 17 12:34:38 2005 -0800
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32	Thu Aug 18 10:40:02 2005 -0800
     1.3 @@ -541,7 +541,7 @@ CONFIG_IP_NF_MATCH_IPRANGE=m
     1.4  # CONFIG_IP_NF_MATCH_STATE is not set
     1.5  # CONFIG_IP_NF_MATCH_CONNTRACK is not set
     1.6  # CONFIG_IP_NF_MATCH_OWNER is not set
     1.7 -# CONFIG_IP_NF_MATCH_PHYSDEV is not set
     1.8 +CONFIG_IP_NF_MATCH_PHYSDEV=y
     1.9  # CONFIG_IP_NF_MATCH_ADDRTYPE is not set
    1.10  # CONFIG_IP_NF_MATCH_REALM is not set
    1.11  # CONFIG_IP_NF_MATCH_SCTP is not set
    1.12 @@ -689,7 +689,7 @@ CONFIG_E1000=y
    1.13  # CONFIG_HAMACHI is not set
    1.14  # CONFIG_YELLOWFIN is not set
    1.15  # CONFIG_R8169 is not set
    1.16 -# CONFIG_SK98LIN is not set
    1.17 +CONFIG_SK98LIN=y
    1.18  # CONFIG_VIA_VELOCITY is not set
    1.19  CONFIG_TIGON3=y
    1.20  # CONFIG_BNX2 is not set
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64	Wed Aug 17 12:34:38 2005 -0800
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64	Thu Aug 18 10:40:02 2005 -0800
     2.3 @@ -480,7 +480,7 @@ CONFIG_IP_NF_MATCH_IPRANGE=m
     2.4  # CONFIG_IP_NF_MATCH_STATE is not set
     2.5  # CONFIG_IP_NF_MATCH_CONNTRACK is not set
     2.6  # CONFIG_IP_NF_MATCH_OWNER is not set
     2.7 -# CONFIG_IP_NF_MATCH_PHYSDEV is not set
     2.8 +CONFIG_IP_NF_MATCH_PHYSDEV=y
     2.9  # CONFIG_IP_NF_MATCH_ADDRTYPE is not set
    2.10  # CONFIG_IP_NF_MATCH_REALM is not set
    2.11  # CONFIG_IP_NF_MATCH_SCTP is not set
    2.12 @@ -611,7 +611,7 @@ CONFIG_E1000=y
    2.13  # CONFIG_HAMACHI is not set
    2.14  # CONFIG_YELLOWFIN is not set
    2.15  # CONFIG_R8169 is not set
    2.16 -# CONFIG_SK98LIN is not set
    2.17 +CONFIG_SK98LIN=y
    2.18  # CONFIG_VIA_VELOCITY is not set
    2.19  CONFIG_TIGON3=y
    2.20  # CONFIG_BNX2 is not set
     3.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64	Wed Aug 17 12:34:38 2005 -0800
     3.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64	Thu Aug 18 10:40:02 2005 -0800
     3.3 @@ -1,7 +1,7 @@
     3.4  #
     3.5  # Automatically generated make config: don't edit
     3.6 -# Linux kernel version: 2.6.12.4-xenU
     3.7 -# Mon Aug 15 19:25:22 2005
     3.8 +# Linux kernel version: 2.6.12-xenU
     3.9 +# Thu Aug 18 11:15:14 2005
    3.10  #
    3.11  CONFIG_XEN=y
    3.12  CONFIG_ARCH_XEN=y
    3.13 @@ -270,7 +270,10 @@ CONFIG_IP_ROUTE_FWMARK=y
    3.14  CONFIG_IP_ROUTE_MULTIPATH=y
    3.15  # CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
    3.16  CONFIG_IP_ROUTE_VERBOSE=y
    3.17 -# CONFIG_IP_PNP is not set
    3.18 +CONFIG_IP_PNP=y
    3.19 +CONFIG_IP_PNP_DHCP=y
    3.20 +CONFIG_IP_PNP_BOOTP=y
    3.21 +CONFIG_IP_PNP_RARP=y
    3.22  CONFIG_NET_IPIP=m
    3.23  CONFIG_NET_IPGRE=m
    3.24  CONFIG_NET_IPGRE_BROADCAST=y
     4.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c	Wed Aug 17 12:34:38 2005 -0800
     4.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c	Thu Aug 18 10:40:02 2005 -0800
     4.3 @@ -49,13 +49,14 @@ int swiotlb_force;
     4.4   * swiotlb_sync_single_*, to see if the memory was in fact allocated by this
     4.5   * API.
     4.6   */
     4.7 -static char *io_tlb_start, *io_tlb_end;
     4.8 +static char *iotlb_virt_start, *iotlb_virt_end;
     4.9 +static dma_addr_t iotlb_bus_start, iotlb_bus_end;
    4.10  
    4.11  /*
    4.12 - * The number of IO TLB blocks (in groups of 64) betweeen io_tlb_start and
    4.13 - * io_tlb_end.  This is command line adjustable via setup_io_tlb_npages.
    4.14 + * The number of IO TLB blocks (in groups of 64) betweeen iotlb_virt_start and
    4.15 + * iotlb_virt_end.  This is command line adjustable via setup_io_tlb_npages.
    4.16   */
    4.17 -static unsigned long io_tlb_nslabs;
    4.18 +static unsigned long iotlb_nslabs;
    4.19  
    4.20  /*
    4.21   * When the IOMMU overflows we return a fallback buffer. This sets the size.
    4.22 @@ -88,11 +89,14 @@ static DEFINE_SPINLOCK(io_tlb_lock);
    4.23  static int __init
    4.24  setup_io_tlb_npages(char *str)
    4.25  {
    4.26 +	/* Unlike ia64, the size is aperture in megabytes, not 'slabs'! */
    4.27  	if (isdigit(*str)) {
    4.28 -		io_tlb_nslabs = simple_strtoul(str, &str, 0) <<
    4.29 -			(PAGE_SHIFT - IO_TLB_SHIFT);
    4.30 -		/* avoid tail segment of size < IO_TLB_SEGSIZE */
    4.31 -		io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
    4.32 +		iotlb_nslabs = simple_strtoul(str, &str, 0) <<
    4.33 +			(20 - IO_TLB_SHIFT);
    4.34 +		iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE);
    4.35 +		/* Round up to power of two (xen_create_contiguous_region). */
    4.36 +		while (iotlb_nslabs & (iotlb_nslabs-1))
    4.37 +			iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1);
    4.38  	}
    4.39  	if (*str == ',')
    4.40  		++str;
    4.41 @@ -114,45 +118,55 @@ setup_io_tlb_npages(char *str)
    4.42  void
    4.43  swiotlb_init_with_default_size (size_t default_size)
    4.44  {
    4.45 -	unsigned long i;
    4.46 +	unsigned long i, bytes;
    4.47  
    4.48 -	if (!io_tlb_nslabs) {
    4.49 -		io_tlb_nslabs = (default_size >> PAGE_SHIFT);
    4.50 -		io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
    4.51 +	if (!iotlb_nslabs) {
    4.52 +		iotlb_nslabs = (default_size >> IO_TLB_SHIFT);
    4.53 +		iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE);
    4.54 +		/* Round up to power of two (xen_create_contiguous_region). */
    4.55 +		while (iotlb_nslabs & (iotlb_nslabs-1))
    4.56 +			iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1);
    4.57  	}
    4.58  
    4.59 +	bytes = iotlb_nslabs * (1UL << IO_TLB_SHIFT);
    4.60 +
    4.61  	/*
    4.62  	 * Get IO TLB memory from the low pages
    4.63  	 */
    4.64 -	io_tlb_start = alloc_bootmem_low_pages(io_tlb_nslabs *
    4.65 -					       (1 << IO_TLB_SHIFT));
    4.66 -	if (!io_tlb_start)
    4.67 +	iotlb_virt_start = alloc_bootmem_low_pages(bytes);
    4.68 +	if (!iotlb_virt_start)
    4.69  		panic("Cannot allocate SWIOTLB buffer");
    4.70  
    4.71  	xen_create_contiguous_region(
    4.72 -		(unsigned long)io_tlb_start, 
    4.73 -		get_order(io_tlb_nslabs * (1 << IO_TLB_SHIFT)));
    4.74 +		(unsigned long)iotlb_virt_start, get_order(bytes));
    4.75  
    4.76 -	io_tlb_end = io_tlb_start + io_tlb_nslabs * (1 << IO_TLB_SHIFT);
    4.77 +	iotlb_virt_end = iotlb_virt_start + bytes;
    4.78  
    4.79  	/*
    4.80  	 * Allocate and initialize the free list array.  This array is used
    4.81  	 * to find contiguous free memory regions of size up to IO_TLB_SEGSIZE
    4.82 -	 * between io_tlb_start and io_tlb_end.
    4.83 +	 * between iotlb_virt_start and iotlb_virt_end.
    4.84  	 */
    4.85 -	io_tlb_list = alloc_bootmem(io_tlb_nslabs * sizeof(int));
    4.86 -	for (i = 0; i < io_tlb_nslabs; i++)
    4.87 +	io_tlb_list = alloc_bootmem(iotlb_nslabs * sizeof(int));
    4.88 +	for (i = 0; i < iotlb_nslabs; i++)
    4.89   		io_tlb_list[i] = IO_TLB_SEGSIZE - OFFSET(i, IO_TLB_SEGSIZE);
    4.90  	io_tlb_index = 0;
    4.91  	io_tlb_orig_addr = alloc_bootmem(
    4.92 -		io_tlb_nslabs * sizeof(*io_tlb_orig_addr));
    4.93 +		iotlb_nslabs * sizeof(*io_tlb_orig_addr));
    4.94  
    4.95  	/*
    4.96  	 * Get the overflow emergency buffer
    4.97  	 */
    4.98  	io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow);
    4.99 -	printk(KERN_INFO "Placing software IO TLB between 0x%lx - 0x%lx\n",
   4.100 -	       virt_to_bus(io_tlb_start), virt_to_bus(io_tlb_end-1));
   4.101 +	iotlb_bus_start = virt_to_bus(iotlb_virt_start);
   4.102 +	iotlb_bus_end   = iotlb_bus_start + bytes;
   4.103 +	printk(KERN_INFO "Software IO TLB enabled: \n"
   4.104 +	       " Aperture:     %lu megabytes\n"
   4.105 +	       " Bus range:    0x%016lx - 0x%016lx\n"
   4.106 +	       " Kernel range: 0x%016lx - 0x%016lx\n",
   4.107 +	       bytes >> 20,
   4.108 +	       (unsigned long)iotlb_bus_start, (unsigned long)iotlb_bus_end,
   4.109 +	       (unsigned long)iotlb_virt_start, (unsigned long)iotlb_virt_end);
   4.110  }
   4.111  
   4.112  void
   4.113 @@ -240,7 +254,7 @@ map_single(struct device *hwdev, struct 
   4.114  	{
   4.115  		wrap = index = ALIGN(io_tlb_index, stride);
   4.116  
   4.117 -		if (index >= io_tlb_nslabs)
   4.118 +		if (index >= iotlb_nslabs)
   4.119  			wrap = index = 0;
   4.120  
   4.121  		do {
   4.122 @@ -260,7 +274,7 @@ map_single(struct device *hwdev, struct 
   4.123  				      IO_TLB_SEGSIZE -1) && io_tlb_list[i];
   4.124  				     i--)
   4.125  					io_tlb_list[i] = ++count;
   4.126 -				dma_addr = io_tlb_start +
   4.127 +				dma_addr = iotlb_virt_start +
   4.128  					(index << IO_TLB_SHIFT);
   4.129  
   4.130  				/*
   4.131 @@ -268,13 +282,13 @@ map_single(struct device *hwdev, struct 
   4.132  				 * the next round.
   4.133  				 */
   4.134  				io_tlb_index = 
   4.135 -					((index + nslots) < io_tlb_nslabs
   4.136 +					((index + nslots) < iotlb_nslabs
   4.137  					 ? (index + nslots) : 0);
   4.138  
   4.139  				goto found;
   4.140  			}
   4.141  			index += stride;
   4.142 -			if (index >= io_tlb_nslabs)
   4.143 +			if (index >= iotlb_nslabs)
   4.144  				index = 0;
   4.145  		} while (index != wrap);
   4.146  
   4.147 @@ -304,7 +318,7 @@ unmap_single(struct device *hwdev, char 
   4.148  {
   4.149  	unsigned long flags;
   4.150  	int i, count, nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
   4.151 -	int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT;
   4.152 +	int index = (dma_addr - iotlb_virt_start) >> IO_TLB_SHIFT;
   4.153  	struct phys_addr buffer = io_tlb_orig_addr[index];
   4.154  
   4.155  	/*
   4.156 @@ -345,7 +359,7 @@ unmap_single(struct device *hwdev, char 
   4.157  static void
   4.158  sync_single(struct device *hwdev, char *dma_addr, size_t size, int dir)
   4.159  {
   4.160 -	int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT;
   4.161 +	int index = (dma_addr - iotlb_virt_start) >> IO_TLB_SHIFT;
   4.162  	struct phys_addr buffer = io_tlb_orig_addr[index];
   4.163  	BUG_ON((dir != DMA_FROM_DEVICE) && (dir != DMA_TO_DEVICE));
   4.164  	__sync_single(buffer, dma_addr, size, dir);
   4.165 @@ -431,11 +445,9 @@ void
   4.166  swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr, size_t size,
   4.167  		     int dir)
   4.168  {
   4.169 -	char *dma_addr = bus_to_virt(dev_addr);
   4.170 -
   4.171  	BUG_ON(dir == DMA_NONE);
   4.172 -	if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
   4.173 -		unmap_single(hwdev, dma_addr, size, dir);
   4.174 +	if ((dev_addr >= iotlb_bus_start) && (dev_addr < iotlb_bus_end))
   4.175 +		unmap_single(hwdev, bus_to_virt(dev_addr), size, dir);
   4.176  }
   4.177  
   4.178  /*
   4.179 @@ -452,22 +464,18 @@ void
   4.180  swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
   4.181  			    size_t size, int dir)
   4.182  {
   4.183 -	char *dma_addr = bus_to_virt(dev_addr);
   4.184 -
   4.185  	BUG_ON(dir == DMA_NONE);
   4.186 -	if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
   4.187 -		sync_single(hwdev, dma_addr, size, dir);
   4.188 +	if ((dev_addr >= iotlb_bus_start) && (dev_addr < iotlb_bus_end))
   4.189 +		sync_single(hwdev, bus_to_virt(dev_addr), size, dir);
   4.190  }
   4.191  
   4.192  void
   4.193  swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr,
   4.194  			       size_t size, int dir)
   4.195  {
   4.196 -	char *dma_addr = bus_to_virt(dev_addr);
   4.197 -
   4.198  	BUG_ON(dir == DMA_NONE);
   4.199 -	if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
   4.200 -		sync_single(hwdev, dma_addr, size, dir);
   4.201 +	if ((dev_addr >= iotlb_bus_start) && (dev_addr < iotlb_bus_end))
   4.202 +		sync_single(hwdev, bus_to_virt(dev_addr), size, dir);
   4.203  }
   4.204  
   4.205  /*
   4.206 @@ -603,11 +611,9 @@ void
   4.207  swiotlb_unmap_page(struct device *hwdev, dma_addr_t dma_address,
   4.208  		   size_t size, enum dma_data_direction direction)
   4.209  {
   4.210 -	char *dma_addr = bus_to_virt(dma_address);
   4.211 -
   4.212  	BUG_ON(direction == DMA_NONE);
   4.213 -	if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
   4.214 -		unmap_single(hwdev, dma_addr, size, direction);
   4.215 +	if ((dma_address >= iotlb_bus_start) && (dma_address < iotlb_bus_end))
   4.216 +		unmap_single(hwdev, bus_to_virt(dma_address), size, direction);
   4.217  }
   4.218  
   4.219  int
     5.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c	Wed Aug 17 12:34:38 2005 -0800
     5.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c	Thu Aug 18 10:40:02 2005 -0800
     5.3 @@ -59,124 +59,124 @@
     5.4  #ifndef CONFIG_XEN_SHADOW_MODE
     5.5  void xen_l1_entry_update(pte_t *ptr, pte_t val)
     5.6  {
     5.7 -    mmu_update_t u;
     5.8 -    u.ptr = virt_to_machine(ptr);
     5.9 -    u.val = pte_val_ma(val);
    5.10 -    BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
    5.11 +	mmu_update_t u;
    5.12 +	u.ptr = virt_to_machine(ptr);
    5.13 +	u.val = pte_val_ma(val);
    5.14 +	BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
    5.15  }
    5.16  
    5.17  void xen_l2_entry_update(pmd_t *ptr, pmd_t val)
    5.18  {
    5.19 -    mmu_update_t u;
    5.20 -    u.ptr = virt_to_machine(ptr);
    5.21 -    u.val = pmd_val_ma(val);
    5.22 -    BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
    5.23 +	mmu_update_t u;
    5.24 +	u.ptr = virt_to_machine(ptr);
    5.25 +	u.val = pmd_val_ma(val);
    5.26 +	BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
    5.27  }
    5.28  
    5.29  #ifdef CONFIG_X86_PAE
    5.30  void xen_l3_entry_update(pud_t *ptr, pud_t val)
    5.31  {
    5.32 -    mmu_update_t u;
    5.33 -    u.ptr = virt_to_machine(ptr);
    5.34 -    u.val = pud_val_ma(val);
    5.35 -    BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
    5.36 +	mmu_update_t u;
    5.37 +	u.ptr = virt_to_machine(ptr);
    5.38 +	u.val = pud_val_ma(val);
    5.39 +	BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
    5.40  }
    5.41  #endif
    5.42  
    5.43  #ifdef CONFIG_X86_64
    5.44  void xen_l3_entry_update(pud_t *ptr, pud_t val)
    5.45  {
    5.46 -    mmu_update_t u;
    5.47 -    u.ptr = virt_to_machine(ptr);
    5.48 -    u.val = val.pud;
    5.49 -    BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
    5.50 +	mmu_update_t u;
    5.51 +	u.ptr = virt_to_machine(ptr);
    5.52 +	u.val = val.pud;
    5.53 +	BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
    5.54  }
    5.55  
    5.56  void xen_l4_entry_update(pgd_t *ptr, pgd_t val)
    5.57  {
    5.58 -    mmu_update_t u;
    5.59 -    u.ptr = virt_to_machine(ptr);
    5.60 -    u.val = val.pgd;
    5.61 -    BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
    5.62 +	mmu_update_t u;
    5.63 +	u.ptr = virt_to_machine(ptr);
    5.64 +	u.val = val.pgd;
    5.65 +	BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
    5.66  }
    5.67  #endif /* CONFIG_X86_64 */
    5.68  #endif /* CONFIG_XEN_SHADOW_MODE */
    5.69  
    5.70  void xen_machphys_update(unsigned long mfn, unsigned long pfn)
    5.71  {
    5.72 -    mmu_update_t u;
    5.73 -    u.ptr = (mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE;
    5.74 -    u.val = pfn;
    5.75 -    BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
    5.76 +	mmu_update_t u;
    5.77 +	u.ptr = (mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE;
    5.78 +	u.val = pfn;
    5.79 +	BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
    5.80  }
    5.81  
    5.82  void xen_pt_switch(unsigned long ptr)
    5.83  {
    5.84 -    struct mmuext_op op;
    5.85 -    op.cmd = MMUEXT_NEW_BASEPTR;
    5.86 -    op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
    5.87 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
    5.88 +	struct mmuext_op op;
    5.89 +	op.cmd = MMUEXT_NEW_BASEPTR;
    5.90 +	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
    5.91 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
    5.92  }
    5.93  
    5.94  void xen_new_user_pt(unsigned long ptr)
    5.95  {
    5.96 -    struct mmuext_op op;
    5.97 -    op.cmd = MMUEXT_NEW_USER_BASEPTR;
    5.98 -    op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
    5.99 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.100 +	struct mmuext_op op;
   5.101 +	op.cmd = MMUEXT_NEW_USER_BASEPTR;
   5.102 +	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.103 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.104  }
   5.105  
   5.106  void xen_tlb_flush(void)
   5.107  {
   5.108 -    struct mmuext_op op;
   5.109 -    op.cmd = MMUEXT_TLB_FLUSH_LOCAL;
   5.110 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.111 +	struct mmuext_op op;
   5.112 +	op.cmd = MMUEXT_TLB_FLUSH_LOCAL;
   5.113 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.114  }
   5.115  
   5.116  void xen_invlpg(unsigned long ptr)
   5.117  {
   5.118 -    struct mmuext_op op;
   5.119 -    op.cmd = MMUEXT_INVLPG_LOCAL;
   5.120 -    op.linear_addr = ptr & PAGE_MASK;
   5.121 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.122 +	struct mmuext_op op;
   5.123 +	op.cmd = MMUEXT_INVLPG_LOCAL;
   5.124 +	op.linear_addr = ptr & PAGE_MASK;
   5.125 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.126  }
   5.127  
   5.128  #ifdef CONFIG_SMP
   5.129  
   5.130  void xen_tlb_flush_all(void)
   5.131  {
   5.132 -    struct mmuext_op op;
   5.133 -    op.cmd = MMUEXT_TLB_FLUSH_ALL;
   5.134 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.135 +	struct mmuext_op op;
   5.136 +	op.cmd = MMUEXT_TLB_FLUSH_ALL;
   5.137 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.138  }
   5.139  
   5.140  void xen_tlb_flush_mask(cpumask_t *mask)
   5.141  {
   5.142 -    struct mmuext_op op;
   5.143 -    if ( cpus_empty(*mask) )
   5.144 -        return;
   5.145 -    op.cmd = MMUEXT_TLB_FLUSH_MULTI;
   5.146 -    op.vcpumask = mask->bits;
   5.147 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.148 +	struct mmuext_op op;
   5.149 +	if ( cpus_empty(*mask) )
   5.150 +		return;
   5.151 +	op.cmd = MMUEXT_TLB_FLUSH_MULTI;
   5.152 +	op.vcpumask = mask->bits;
   5.153 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.154  }
   5.155  
   5.156  void xen_invlpg_all(unsigned long ptr)
   5.157  {
   5.158 -    struct mmuext_op op;
   5.159 -    op.cmd = MMUEXT_INVLPG_ALL;
   5.160 -    op.linear_addr = ptr & PAGE_MASK;
   5.161 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.162 +	struct mmuext_op op;
   5.163 +	op.cmd = MMUEXT_INVLPG_ALL;
   5.164 +	op.linear_addr = ptr & PAGE_MASK;
   5.165 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.166  }
   5.167  
   5.168  void xen_invlpg_mask(cpumask_t *mask, unsigned long ptr)
   5.169  {
   5.170 -    struct mmuext_op op;
   5.171 -    if ( cpus_empty(*mask) )
   5.172 -        return;
   5.173 -    op.cmd = MMUEXT_INVLPG_MULTI;
   5.174 -    op.vcpumask = mask->bits;
   5.175 -    op.linear_addr = ptr & PAGE_MASK;
   5.176 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.177 +	struct mmuext_op op;
   5.178 +	if ( cpus_empty(*mask) )
   5.179 +		return;
   5.180 +	op.cmd = MMUEXT_INVLPG_MULTI;
   5.181 +	op.vcpumask = mask->bits;
   5.182 +	op.linear_addr = ptr & PAGE_MASK;
   5.183 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.184  }
   5.185  
   5.186  #endif /* CONFIG_SMP */
   5.187 @@ -184,221 +184,281 @@ void xen_invlpg_mask(cpumask_t *mask, un
   5.188  #ifndef CONFIG_XEN_SHADOW_MODE
   5.189  void xen_pgd_pin(unsigned long ptr)
   5.190  {
   5.191 -    struct mmuext_op op;
   5.192 +	struct mmuext_op op;
   5.193  #ifdef CONFIG_X86_64
   5.194 -    op.cmd = MMUEXT_PIN_L4_TABLE;
   5.195 +	op.cmd = MMUEXT_PIN_L4_TABLE;
   5.196  #elif defined(CONFIG_X86_PAE)
   5.197 -    op.cmd = MMUEXT_PIN_L3_TABLE;
   5.198 +	op.cmd = MMUEXT_PIN_L3_TABLE;
   5.199  #else
   5.200 -    op.cmd = MMUEXT_PIN_L2_TABLE;
   5.201 +	op.cmd = MMUEXT_PIN_L2_TABLE;
   5.202  #endif
   5.203 -    op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.204 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.205 +	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.206 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.207  }
   5.208  
   5.209  void xen_pgd_unpin(unsigned long ptr)
   5.210  {
   5.211 -    struct mmuext_op op;
   5.212 -    op.cmd = MMUEXT_UNPIN_TABLE;
   5.213 -    op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.214 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.215 +	struct mmuext_op op;
   5.216 +	op.cmd = MMUEXT_UNPIN_TABLE;
   5.217 +	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.218 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.219  }
   5.220  
   5.221  void xen_pte_pin(unsigned long ptr)
   5.222  {
   5.223 -    struct mmuext_op op;
   5.224 -    op.cmd = MMUEXT_PIN_L1_TABLE;
   5.225 -    op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.226 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.227 +	struct mmuext_op op;
   5.228 +	op.cmd = MMUEXT_PIN_L1_TABLE;
   5.229 +	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.230 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.231  }
   5.232  
   5.233  void xen_pte_unpin(unsigned long ptr)
   5.234  {
   5.235 -    struct mmuext_op op;
   5.236 -    op.cmd = MMUEXT_UNPIN_TABLE;
   5.237 -    op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.238 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.239 +	struct mmuext_op op;
   5.240 +	op.cmd = MMUEXT_UNPIN_TABLE;
   5.241 +	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.242 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.243  }
   5.244  
   5.245  #ifdef CONFIG_X86_64
   5.246  void xen_pud_pin(unsigned long ptr)
   5.247  {
   5.248 -    struct mmuext_op op;
   5.249 -    op.cmd = MMUEXT_PIN_L3_TABLE;
   5.250 -    op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.251 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.252 +	struct mmuext_op op;
   5.253 +	op.cmd = MMUEXT_PIN_L3_TABLE;
   5.254 +	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.255 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.256  }
   5.257  
   5.258  void xen_pud_unpin(unsigned long ptr)
   5.259  {
   5.260 -    struct mmuext_op op;
   5.261 -    op.cmd = MMUEXT_UNPIN_TABLE;
   5.262 -    op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.263 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.264 +	struct mmuext_op op;
   5.265 +	op.cmd = MMUEXT_UNPIN_TABLE;
   5.266 +	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.267 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.268  }
   5.269  
   5.270  void xen_pmd_pin(unsigned long ptr)
   5.271  {
   5.272 -    struct mmuext_op op;
   5.273 -    op.cmd = MMUEXT_PIN_L2_TABLE;
   5.274 -    op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.275 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.276 +	struct mmuext_op op;
   5.277 +	op.cmd = MMUEXT_PIN_L2_TABLE;
   5.278 +	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.279 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.280  }
   5.281  
   5.282  void xen_pmd_unpin(unsigned long ptr)
   5.283  {
   5.284 -    struct mmuext_op op;
   5.285 -    op.cmd = MMUEXT_UNPIN_TABLE;
   5.286 -    op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.287 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.288 +	struct mmuext_op op;
   5.289 +	op.cmd = MMUEXT_UNPIN_TABLE;
   5.290 +	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   5.291 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.292  }
   5.293  #endif /* CONFIG_X86_64 */
   5.294  #endif /* CONFIG_XEN_SHADOW_MODE */
   5.295  
   5.296  void xen_set_ldt(unsigned long ptr, unsigned long len)
   5.297  {
   5.298 -    struct mmuext_op op;
   5.299 -    op.cmd = MMUEXT_SET_LDT;
   5.300 -    op.linear_addr = ptr;
   5.301 -    op.nr_ents = len;
   5.302 -    BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.303 +	struct mmuext_op op;
   5.304 +	op.cmd = MMUEXT_SET_LDT;
   5.305 +	op.linear_addr = ptr;
   5.306 +	op.nr_ents = len;
   5.307 +	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   5.308 +}
   5.309 +
   5.310 +/*
   5.311 + * Bitmap is indexed by page number. If bit is set, the page is part of a
   5.312 + * xen_create_contiguous_region() area of memory.
   5.313 + */
   5.314 +unsigned long *contiguous_bitmap;
   5.315 +
   5.316 +static void contiguous_bitmap_set(
   5.317 +	unsigned long first_page, unsigned long nr_pages)
   5.318 +{
   5.319 +	unsigned long start_off, end_off, curr_idx, end_idx;
   5.320 +
   5.321 +	curr_idx  = first_page / BITS_PER_LONG;
   5.322 +	start_off = first_page & (BITS_PER_LONG-1);
   5.323 +	end_idx   = (first_page + nr_pages) / BITS_PER_LONG;
   5.324 +	end_off   = (first_page + nr_pages) & (BITS_PER_LONG-1);
   5.325 +
   5.326 +	if (curr_idx == end_idx) {
   5.327 +		contiguous_bitmap[curr_idx] |=
   5.328 +			((1UL<<end_off)-1) & -(1UL<<start_off);
   5.329 +	} else {
   5.330 +		contiguous_bitmap[curr_idx] |= -(1UL<<start_off);
   5.331 +		while ( ++curr_idx < end_idx )
   5.332 +			contiguous_bitmap[curr_idx] = ~0UL;
   5.333 +		contiguous_bitmap[curr_idx] |= (1UL<<end_off)-1;
   5.334 +	}
   5.335 +}
   5.336 +
   5.337 +static void contiguous_bitmap_clear(
   5.338 +	unsigned long first_page, unsigned long nr_pages)
   5.339 +{
   5.340 +	unsigned long start_off, end_off, curr_idx, end_idx;
   5.341 +
   5.342 +	curr_idx  = first_page / BITS_PER_LONG;
   5.343 +	start_off = first_page & (BITS_PER_LONG-1);
   5.344 +	end_idx   = (first_page + nr_pages) / BITS_PER_LONG;
   5.345 +	end_off   = (first_page + nr_pages) & (BITS_PER_LONG-1);
   5.346 +
   5.347 +	if (curr_idx == end_idx) {
   5.348 +		contiguous_bitmap[curr_idx] &=
   5.349 +			-(1UL<<end_off) | ((1UL<<start_off)-1);
   5.350 +	} else {
   5.351 +		contiguous_bitmap[curr_idx] &= (1UL<<start_off)-1;
   5.352 +		while ( ++curr_idx != end_idx )
   5.353 +			contiguous_bitmap[curr_idx] = 0;
   5.354 +		contiguous_bitmap[curr_idx] &= -(1UL<<end_off);
   5.355 +	}
   5.356  }
   5.357  
   5.358  /* Ensure multi-page extents are contiguous in machine memory. */
   5.359  void xen_create_contiguous_region(unsigned long vstart, unsigned int order)
   5.360  {
   5.361 -    pgd_t         *pgd; 
   5.362 -    pud_t         *pud; 
   5.363 -    pmd_t         *pmd;
   5.364 -    pte_t         *pte;
   5.365 -    unsigned long  mfn, i, flags;
   5.366 -
   5.367 -    scrub_pages(vstart, 1 << order);
   5.368 -
   5.369 -    balloon_lock(flags);
   5.370 +	pgd_t         *pgd; 
   5.371 +	pud_t         *pud; 
   5.372 +	pmd_t         *pmd;
   5.373 +	pte_t         *pte;
   5.374 +	unsigned long  mfn, i, flags;
   5.375  
   5.376 -    /* 1. Zap current PTEs, giving away the underlying pages. */
   5.377 -    for (i = 0; i < (1<<order); i++) {
   5.378 -        pgd = pgd_offset_k(vstart + (i*PAGE_SIZE));
   5.379 -        pud = pud_offset(pgd, (vstart + (i*PAGE_SIZE)));
   5.380 -        pmd = pmd_offset(pud, (vstart + (i*PAGE_SIZE)));
   5.381 -        pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
   5.382 -        mfn = pte_mfn(*pte);
   5.383 -        BUG_ON(HYPERVISOR_update_va_mapping(
   5.384 -            vstart + (i*PAGE_SIZE), __pte_ma(0), 0));
   5.385 -        phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
   5.386 -            INVALID_P2M_ENTRY;
   5.387 -        BUG_ON(HYPERVISOR_dom_mem_op(
   5.388 -            MEMOP_decrease_reservation, &mfn, 1, 0) != 1);
   5.389 -    }
   5.390 +	scrub_pages(vstart, 1 << order);
   5.391  
   5.392 -    /* 2. Get a new contiguous memory extent. */
   5.393 -    BUG_ON(HYPERVISOR_dom_mem_op(
   5.394 -	       MEMOP_increase_reservation, &mfn, 1, order | (32<<8)) != 1);
   5.395 +	balloon_lock(flags);
   5.396  
   5.397 -    /* 3. Map the new extent in place of old pages. */
   5.398 -    for (i = 0; i < (1<<order); i++) {
   5.399 -        BUG_ON(HYPERVISOR_update_va_mapping(
   5.400 -            vstart + (i*PAGE_SIZE),
   5.401 -            __pte_ma(((mfn+i)<<PAGE_SHIFT)|__PAGE_KERNEL), 0));
   5.402 -        xen_machphys_update(mfn+i, (__pa(vstart)>>PAGE_SHIFT)+i);
   5.403 -        phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] = mfn+i;
   5.404 -    }
   5.405 +	/* 1. Zap current PTEs, giving away the underlying pages. */
   5.406 +	for (i = 0; i < (1<<order); i++) {
   5.407 +		pgd = pgd_offset_k(vstart + (i*PAGE_SIZE));
   5.408 +		pud = pud_offset(pgd, (vstart + (i*PAGE_SIZE)));
   5.409 +		pmd = pmd_offset(pud, (vstart + (i*PAGE_SIZE)));
   5.410 +		pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
   5.411 +		mfn = pte_mfn(*pte);
   5.412 +		BUG_ON(HYPERVISOR_update_va_mapping(
   5.413 +			vstart + (i*PAGE_SIZE), __pte_ma(0), 0));
   5.414 +		phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
   5.415 +			INVALID_P2M_ENTRY;
   5.416 +		BUG_ON(HYPERVISOR_dom_mem_op(
   5.417 +			MEMOP_decrease_reservation, &mfn, 1, 0) != 1);
   5.418 +	}
   5.419  
   5.420 -    flush_tlb_all();
   5.421 +	/* 2. Get a new contiguous memory extent. */
   5.422 +	BUG_ON(HYPERVISOR_dom_mem_op(
   5.423 +		MEMOP_increase_reservation, &mfn, 1, order | (32<<8)) != 1);
   5.424  
   5.425 -    balloon_unlock(flags);
   5.426 +	/* 3. Map the new extent in place of old pages. */
   5.427 +	for (i = 0; i < (1<<order); i++) {
   5.428 +		BUG_ON(HYPERVISOR_update_va_mapping(
   5.429 +			vstart + (i*PAGE_SIZE),
   5.430 +			pfn_pte_ma(mfn+i, PAGE_KERNEL), 0));
   5.431 +		xen_machphys_update(mfn+i, (__pa(vstart)>>PAGE_SHIFT)+i);
   5.432 +		phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] = mfn+i;
   5.433 +	}
   5.434 +
   5.435 +	flush_tlb_all();
   5.436 +
   5.437 +	contiguous_bitmap_set(__pa(vstart) >> PAGE_SHIFT, 1UL << order);
   5.438 +
   5.439 +	balloon_unlock(flags);
   5.440  }
   5.441  
   5.442  void xen_destroy_contiguous_region(unsigned long vstart, unsigned int order)
   5.443  {
   5.444 -    pgd_t         *pgd; 
   5.445 -    pud_t         *pud; 
   5.446 -    pmd_t         *pmd;
   5.447 -    pte_t         *pte;
   5.448 -    unsigned long  mfn, i, flags;
   5.449 -
   5.450 -    scrub_pages(vstart, 1 << order);
   5.451 -
   5.452 -    balloon_lock(flags);
   5.453 +	pgd_t         *pgd; 
   5.454 +	pud_t         *pud; 
   5.455 +	pmd_t         *pmd;
   5.456 +	pte_t         *pte;
   5.457 +	unsigned long  mfn, i, flags;
   5.458  
   5.459 -    /* 1. Zap current PTEs, giving away the underlying pages. */
   5.460 -    for (i = 0; i < (1<<order); i++) {
   5.461 -        pgd = pgd_offset_k(vstart + (i*PAGE_SIZE));
   5.462 -        pud = pud_offset(pgd, (vstart + (i*PAGE_SIZE)));
   5.463 -        pmd = pmd_offset(pud, (vstart + (i*PAGE_SIZE)));
   5.464 -        pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
   5.465 -        mfn = pte_mfn(*pte);
   5.466 -        BUG_ON(HYPERVISOR_update_va_mapping(
   5.467 -            vstart + (i*PAGE_SIZE), __pte_ma(0), 0));
   5.468 -        phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
   5.469 -            INVALID_P2M_ENTRY;
   5.470 -        BUG_ON(HYPERVISOR_dom_mem_op(
   5.471 -            MEMOP_decrease_reservation, &mfn, 1, 0) != 1);
   5.472 -    }
   5.473 +	scrub_pages(vstart, 1 << order);
   5.474  
   5.475 -    /* 2. Map new pages in place of old pages. */
   5.476 -    for (i = 0; i < (1<<order); i++) {
   5.477 -        BUG_ON(HYPERVISOR_dom_mem_op(
   5.478 -            MEMOP_increase_reservation, &mfn, 1, 0) != 1);
   5.479 -        BUG_ON(HYPERVISOR_update_va_mapping(
   5.480 -            vstart + (i*PAGE_SIZE),
   5.481 -            __pte_ma((mfn<<PAGE_SHIFT)|__PAGE_KERNEL), 0));
   5.482 -        xen_machphys_update(mfn, (__pa(vstart)>>PAGE_SHIFT)+i);
   5.483 -        phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] = mfn;
   5.484 -    }
   5.485 +	balloon_lock(flags);
   5.486  
   5.487 -    flush_tlb_all();
   5.488 +	contiguous_bitmap_clear(__pa(vstart) >> PAGE_SHIFT, 1UL << order);
   5.489  
   5.490 -    balloon_unlock(flags);
   5.491 +	/* 1. Zap current PTEs, giving away the underlying pages. */
   5.492 +	for (i = 0; i < (1<<order); i++) {
   5.493 +		pgd = pgd_offset_k(vstart + (i*PAGE_SIZE));
   5.494 +		pud = pud_offset(pgd, (vstart + (i*PAGE_SIZE)));
   5.495 +		pmd = pmd_offset(pud, (vstart + (i*PAGE_SIZE)));
   5.496 +		pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
   5.497 +		mfn = pte_mfn(*pte);
   5.498 +		BUG_ON(HYPERVISOR_update_va_mapping(
   5.499 +			vstart + (i*PAGE_SIZE), __pte_ma(0), 0));
   5.500 +		phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
   5.501 +			INVALID_P2M_ENTRY;
   5.502 +		BUG_ON(HYPERVISOR_dom_mem_op(
   5.503 +			MEMOP_decrease_reservation, &mfn, 1, 0) != 1);
   5.504 +	}
   5.505 +
   5.506 +	/* 2. Map new pages in place of old pages. */
   5.507 +	for (i = 0; i < (1<<order); i++) {
   5.508 +		BUG_ON(HYPERVISOR_dom_mem_op(
   5.509 +			MEMOP_increase_reservation, &mfn, 1, 0) != 1);
   5.510 +		BUG_ON(HYPERVISOR_update_va_mapping(
   5.511 +			vstart + (i*PAGE_SIZE),
   5.512 +			pfn_pte_ma(mfn, PAGE_KERNEL), 0));
   5.513 +		xen_machphys_update(mfn, (__pa(vstart)>>PAGE_SHIFT)+i);
   5.514 +		phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] = mfn;
   5.515 +	}
   5.516 +
   5.517 +	flush_tlb_all();
   5.518 +
   5.519 +	balloon_unlock(flags);
   5.520  }
   5.521  
   5.522  
   5.523  unsigned long allocate_empty_lowmem_region(unsigned long pages)
   5.524  {
   5.525 -    pgd_t         *pgd;
   5.526 -    pud_t         *pud; 
   5.527 -    pmd_t         *pmd;
   5.528 -    pte_t         *pte;
   5.529 -    unsigned long *pfn_array;
   5.530 -    unsigned long  vstart;
   5.531 -    unsigned long  i;
   5.532 -    unsigned int   order = get_order(pages*PAGE_SIZE);
   5.533 -
   5.534 -    vstart = __get_free_pages(GFP_KERNEL, order);
   5.535 -    if ( vstart == 0 )
   5.536 -        return 0UL;
   5.537 -
   5.538 -    scrub_pages(vstart, 1 << order);
   5.539 -
   5.540 -    pfn_array = vmalloc((1<<order) * sizeof(*pfn_array));
   5.541 -    if ( pfn_array == NULL )
   5.542 -        BUG();
   5.543 +	pgd_t         *pgd;
   5.544 +	pud_t         *pud; 
   5.545 +	pmd_t         *pmd;
   5.546 +	pte_t         *pte;
   5.547 +	unsigned long *pfn_array;
   5.548 +	unsigned long  vstart;
   5.549 +	unsigned long  i;
   5.550 +	unsigned int   order = get_order(pages*PAGE_SIZE);
   5.551  
   5.552 -    for ( i = 0; i < (1<<order); i++ )
   5.553 -    {
   5.554 -        pgd = pgd_offset_k(   (vstart + (i*PAGE_SIZE)));
   5.555 -        pud = pud_offset(pgd, (vstart + (i*PAGE_SIZE)));
   5.556 -        pmd = pmd_offset(pud, (vstart + (i*PAGE_SIZE)));
   5.557 -        pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE))); 
   5.558 -        pfn_array[i] = pte_mfn(*pte);
   5.559 +	vstart = __get_free_pages(GFP_KERNEL, order);
   5.560 +	if (vstart == 0)
   5.561 +		return 0UL;
   5.562 +
   5.563 +	scrub_pages(vstart, 1 << order);
   5.564 +
   5.565 +	pfn_array = vmalloc((1<<order) * sizeof(*pfn_array));
   5.566 +	BUG_ON(pfn_array == NULL);
   5.567 +
   5.568 +	for (i = 0; i < (1<<order); i++) {
   5.569 +		pgd = pgd_offset_k(   (vstart + (i*PAGE_SIZE)));
   5.570 +		pud = pud_offset(pgd, (vstart + (i*PAGE_SIZE)));
   5.571 +		pmd = pmd_offset(pud, (vstart + (i*PAGE_SIZE)));
   5.572 +		pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE))); 
   5.573 +		pfn_array[i] = pte_mfn(*pte);
   5.574  #ifdef CONFIG_X86_64
   5.575 -        xen_l1_entry_update(pte, __pte(0));
   5.576 +		xen_l1_entry_update(pte, __pte(0));
   5.577  #else
   5.578 -        BUG_ON(HYPERVISOR_update_va_mapping(vstart + (i*PAGE_SIZE), 
   5.579 -					    __pte_ma(0), 0));
   5.580 +		BUG_ON(HYPERVISOR_update_va_mapping(vstart + (i*PAGE_SIZE), 
   5.581 +						    __pte_ma(0), 0));
   5.582  #endif
   5.583 -        phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
   5.584 -            INVALID_P2M_ENTRY;
   5.585 -    }
   5.586 +		phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
   5.587 +			INVALID_P2M_ENTRY;
   5.588 +	}
   5.589  
   5.590 -    flush_tlb_all();
   5.591 +	flush_tlb_all();
   5.592  
   5.593 -    balloon_put_pages(pfn_array, 1 << order);
   5.594 +	balloon_put_pages(pfn_array, 1 << order);
   5.595  
   5.596 -    vfree(pfn_array);
   5.597 +	vfree(pfn_array);
   5.598  
   5.599 -    return vstart;
   5.600 +	return vstart;
   5.601  }
   5.602  
   5.603  EXPORT_SYMBOL(allocate_empty_lowmem_region);
   5.604 +
   5.605 +/*
   5.606 + * Local variables:
   5.607 + *  c-file-style: "linux"
   5.608 + *  indent-tabs-mode: t
   5.609 + *  c-indent-level: 8
   5.610 + *  c-basic-offset: 8
   5.611 + *  tab-width: 8
   5.612 + * End:
   5.613 + */
     6.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c	Wed Aug 17 12:34:38 2005 -0800
     6.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c	Thu Aug 18 10:40:02 2005 -0800
     6.3 @@ -41,6 +41,8 @@
     6.4  #include <asm/sections.h>
     6.5  #include <asm-xen/hypervisor.h>
     6.6  
     6.7 +extern unsigned long *contiguous_bitmap;
     6.8 +
     6.9  #if defined(CONFIG_SWIOTLB)
    6.10  extern void swiotlb_init(void);
    6.11  int swiotlb;
    6.12 @@ -637,6 +639,11 @@ void __init mem_init(void)
    6.13  	int bad_ppro;
    6.14  	unsigned long pfn;
    6.15  
    6.16 +	contiguous_bitmap = alloc_bootmem_low_pages(
    6.17 +		(max_low_pfn + 2*BITS_PER_LONG) >> 3);
    6.18 +	BUG_ON(!contiguous_bitmap);
    6.19 +	memset(contiguous_bitmap, 0, (max_low_pfn + 2*BITS_PER_LONG) >> 3);
    6.20 +
    6.21  #if defined(CONFIG_SWIOTLB)
    6.22  	swiotlb_init();	
    6.23  #endif
     7.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c	Wed Aug 17 12:34:38 2005 -0800
     7.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c	Thu Aug 18 10:40:02 2005 -0800
     7.3 @@ -300,17 +300,17 @@ void __init bt_iounmap(void *addr, unsig
     7.4  
     7.5  
     7.6  static int direct_remap_area_pte_fn(pte_t *pte, 
     7.7 -                                    struct page *pte_page,
     7.8 -                                    unsigned long address, 
     7.9 -                                    void *data)
    7.10 +				    struct page *pte_page,
    7.11 +				    unsigned long address, 
    7.12 +				    void *data)
    7.13  {
    7.14 -        mmu_update_t **v = (mmu_update_t **)data;
    7.15 +	mmu_update_t **v = (mmu_update_t **)data;
    7.16  
    7.17 -        (*v)->ptr = (pfn_to_mfn(page_to_pfn(pte_page)) << PAGE_SHIFT)
    7.18 -                    | ((unsigned long)pte & ~PAGE_MASK);
    7.19 -        (*v)++;
    7.20 +	(*v)->ptr = ((physaddr_t)pfn_to_mfn(page_to_pfn(pte_page)) <<
    7.21 +		     PAGE_SHIFT) | ((unsigned long)pte & ~PAGE_MASK);
    7.22 +	(*v)++;
    7.23  
    7.24 -        return 0;
    7.25 +	return 0;
    7.26  }
    7.27  
    7.28  int direct_remap_area_pages(struct mm_struct *mm,
    7.29 @@ -397,6 +397,16 @@ int touch_pte_range(struct mm_struct *mm
    7.30  	}
    7.31  
    7.32  	return generic_page_range(mm, address, size, f, NULL);
    7.33 -}                 
    7.34 +} 
    7.35  
    7.36  EXPORT_SYMBOL(touch_pte_range);
    7.37 +
    7.38 +/*
    7.39 + * Local variables:
    7.40 + *  c-file-style: "linux"
    7.41 + *  indent-tabs-mode: t
    7.42 + *  c-indent-level: 8
    7.43 + *  c-basic-offset: 8
    7.44 + *  tab-width: 8
    7.45 + * End:
    7.46 + */
     8.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c	Wed Aug 17 12:34:38 2005 -0800
     8.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c	Thu Aug 18 10:40:02 2005 -0800
     8.3 @@ -426,16 +426,10 @@ static __init void parse_cmdline_early (
     8.4  #ifdef CONFIG_XEN
     8.5  static void __init contig_initmem_init(void)
     8.6  {
     8.7 -        unsigned long bootmap_size, bootmap; 
     8.8 -
     8.9 -        bootmap_size = bootmem_bootmap_pages(end_pfn)<<PAGE_SHIFT;
    8.10 -        bootmap = start_pfn;
    8.11 -        bootmap_size = init_bootmem(bootmap, end_pfn);
    8.12 -        reserve_bootmem(bootmap, bootmap_size);
    8.13 -        
    8.14 -        free_bootmem(start_pfn << PAGE_SHIFT, (end_pfn - start_pfn) << PAGE_SHIFT);   
    8.15 -        reserve_bootmem(0, (PFN_PHYS(start_pfn) +
    8.16 -                            bootmap_size + PAGE_SIZE-1));
    8.17 +        unsigned long bootmap_size = init_bootmem(start_pfn, end_pfn);
    8.18 +        free_bootmem(0, end_pfn << PAGE_SHIFT);   
    8.19 +        /* XXX KAF: Why can't we leave low 1MB of memory free? */
    8.20 +        reserve_bootmem(0, (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1));
    8.21  }
    8.22  #else
    8.23  static void __init contig_initmem_init(void)
     9.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c	Wed Aug 17 12:34:38 2005 -0800
     9.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c	Thu Aug 18 10:40:02 2005 -0800
     9.3 @@ -40,6 +40,12 @@
     9.4  #include <asm/proto.h>
     9.5  #include <asm/smp.h>
     9.6  
     9.7 +extern unsigned long *contiguous_bitmap;
     9.8 +
     9.9 +#if defined(CONFIG_SWIOTLB)
    9.10 +extern void swiotlb_init(void);
    9.11 +#endif
    9.12 +
    9.13  #ifndef Dprintk
    9.14  #define Dprintk(x...)
    9.15  #endif
    9.16 @@ -794,8 +800,12 @@ void __init mem_init(void)
    9.17  	int codesize, reservedpages, datasize, initsize;
    9.18  	int tmp;
    9.19  
    9.20 +	contiguous_bitmap = alloc_bootmem_low_pages(
    9.21 +		(end_pfn + 2*BITS_PER_LONG) >> 3);
    9.22 +	BUG_ON(!contiguous_bitmap);
    9.23 +	memset(contiguous_bitmap, 0, (end_pfn + 2*BITS_PER_LONG) >> 3);
    9.24 +
    9.25  #if defined(CONFIG_SWIOTLB)
    9.26 -	extern void swiotlb_init(void);
    9.27  	swiotlb_init();	
    9.28  #endif
    9.29  
    10.1 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Wed Aug 17 12:34:38 2005 -0800
    10.2 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Thu Aug 18 10:40:02 2005 -0800
    10.3 @@ -213,9 +213,7 @@ static void balloon_process(void *unused
    10.4              {
    10.5                  BUG_ON(HYPERVISOR_update_va_mapping(
    10.6                      (unsigned long)__va(pfn << PAGE_SHIFT),
    10.7 -                    __pte_ma((mfn_list[i] << PAGE_SHIFT) |
    10.8 -                             pgprot_val(PAGE_KERNEL)),
    10.9 -                    0));
   10.10 +                    pfn_pte_ma(mfn_list[i], PAGE_KERNEL), 0));
   10.11              }
   10.12  
   10.13              /* Finally, relinquish the memory back to the system allocator. */
    11.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c	Wed Aug 17 12:34:38 2005 -0800
    11.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c	Thu Aug 18 10:40:02 2005 -0800
    11.3 @@ -406,21 +406,15 @@ static void dispatch_probe(blkif_t *blki
    11.4  #endif
    11.5  
    11.6  
    11.7 -#ifdef CONFIG_XEN_BLKDEV_TAP_BE
    11.8      if ( HYPERVISOR_update_va_mapping_otherdomain(
    11.9          MMAP_VADDR(pending_idx, 0),
   11.10 -        (pte_t) { (req->frame_and_sects[0] & PAGE_MASK) | __PAGE_KERNEL },
   11.11 +        pfn_pte_ma(req->frame_and_sects[0] >> PAGE_SHIFT, PAGE_KERNEL),
   11.12 +#ifdef CONFIG_XEN_BLKDEV_TAP_BE
   11.13          0, (blkif->is_blktap ? ID_TO_DOM(req->id) : blkif->domid) ) )
   11.14 -        
   11.15 -        goto out;
   11.16  #else
   11.17 -    if ( HYPERVISOR_update_va_mapping_otherdomain(
   11.18 -        MMAP_VADDR(pending_idx, 0),
   11.19 -        (pte_t) { (req->frame_and_sects[0] & PAGE_MASK) | __PAGE_KERNEL },
   11.20 -        0, blkif->domid) ) 
   11.21 -        
   11.22 +        0, blkif->domid) )
   11.23 +#endif
   11.24          goto out;
   11.25 -#endif
   11.26  #endif /* endif CONFIG_XEN_BLKDEV_GRANT */
   11.27     
   11.28      rsp = vbd_probe(blkif, (vdisk_t *)MMAP_VADDR(pending_idx, 0), 
    12.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h	Wed Aug 17 12:34:38 2005 -0800
    12.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h	Thu Aug 18 10:40:02 2005 -0800
    12.3 @@ -26,7 +26,9 @@ address_needs_mapping(struct device *hwd
    12.4  static inline int
    12.5  range_straddles_page_boundary(void *p, size_t size)
    12.6  {
    12.7 -	return ((((unsigned long)p & ~PAGE_MASK) + size) > PAGE_SIZE);
    12.8 +	extern unsigned long *contiguous_bitmap;
    12.9 +	return (((((unsigned long)p & ~PAGE_MASK) + size) > PAGE_SIZE) &&
   12.10 +		!test_bit(__pa(p) >> PAGE_SHIFT, contiguous_bitmap));
   12.11  }
   12.12  
   12.13  #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
    13.1 --- a/tools/examples/network-bridge	Wed Aug 17 12:34:38 2005 -0800
    13.2 +++ b/tools/examples/network-bridge	Thu Aug 18 10:40:02 2005 -0800
    13.3 @@ -51,7 +51,7 @@ for arg ; do export "${arg}" ; done
    13.4  
    13.5  bridge=${bridge:-xen-br0}
    13.6  netdev=${netdev:-eth0}
    13.7 -antispoof=${antispoof:-yes}
    13.8 +antispoof=${antispoof:-no}
    13.9  
   13.10  echo "*network $OP bridge=$bridge netdev=$netdev antispoof=$antispoof" >&2
   13.11  
    14.1 --- a/tools/python/xen/xm/create.py	Wed Aug 17 12:34:38 2005 -0800
    14.2 +++ b/tools/python/xen/xm/create.py	Thu Aug 18 10:40:02 2005 -0800
    14.3 @@ -23,6 +23,7 @@ import string
    14.4  import sys
    14.5  import socket
    14.6  import commands
    14.7 +import time
    14.8  
    14.9  import xen.lowlevel.xc
   14.10  
   14.11 @@ -674,18 +675,33 @@ def get_dom0_alloc():
   14.12      return 0
   14.13  
   14.14  def balloon_out(dom0_min_mem, opts):
   14.15 -    """Balloon out to get memory for domU, if necessarily"""
   14.16 +    """Balloon out memory from dom0 if necessary"""
   14.17      SLACK = 4
   14.18 +    timeout = 20 # 2s
   14.19 +    ret = 0
   14.20  
   14.21      xc = xen.lowlevel.xc.new()
   14.22      pinfo = xc.physinfo()
   14.23 -    free_mem = pinfo['free_pages']/256
   14.24 -    if free_mem < opts.vals.memory + SLACK:
   14.25 -        need_mem = opts.vals.memory + SLACK - free_mem
   14.26 -        cur_alloc = get_dom0_alloc()
   14.27 -        if cur_alloc - need_mem >= dom0_min_mem:
   14.28 -            server.xend_domain_mem_target_set(0, cur_alloc - need_mem)
   14.29 +    free_mem = pinfo['free_pages'] / 256
   14.30 +    domU_need_mem = opts.vals.memory + SLACK 
   14.31 +
   14.32 +    dom0_cur_alloc = get_dom0_alloc()
   14.33 +    dom0_new_alloc = dom0_cur_alloc - (domU_need_mem - free_mem)
   14.34 +
   14.35 +    if free_mem < domU_need_mem and dom0_new_alloc >= dom0_min_mem:
   14.36 +
   14.37 +        server.xend_domain_mem_target_set(0, dom0_new_alloc)
   14.38 +
   14.39 +        while dom0_cur_alloc > dom0_new_alloc and timeout > 0:
   14.40 +            time.sleep(0.1) # sleep 100ms
   14.41 +            dom0_cur_alloc = get_dom0_alloc()
   14.42 +            timeout -= 1
   14.43 +        
   14.44 +        if dom0_cur_alloc > dom0_new_alloc:
   14.45 +            ret = 1
   14.46 +    
   14.47      del xc
   14.48 +    return ret
   14.49  
   14.50  def main(argv):
   14.51      random.seed()
   14.52 @@ -717,7 +733,8 @@ def main(argv):
   14.53      else:
   14.54          dom0_min_mem = xroot.get_dom0_min_mem()
   14.55          if dom0_min_mem != 0:
   14.56 -            balloon_out(dom0_min_mem, opts)
   14.57 +            if balloon_out(dom0_min_mem, opts):
   14.58 +                return
   14.59  
   14.60          dom = make_domain(opts, config)
   14.61          if opts.vals.console_autoconnect:
    15.1 --- a/tools/python/xen/xm/main.py	Wed Aug 17 12:34:38 2005 -0800
    15.2 +++ b/tools/python/xen/xm/main.py	Thu Aug 18 10:40:02 2005 -0800
    15.3 @@ -200,7 +200,11 @@ def xm_migrate(args):
    15.4  def xm_list(args):
    15.5      use_long = 0
    15.6      show_vcpus = 0
    15.7 -    (options, params) = getopt(args, 'lv', ['long','vcpus'])
    15.8 +    try:
    15.9 +        (options, params) = getopt(args, 'lv', ['long','vcpus'])
   15.10 +    except GetoptError, opterr:
   15.11 +        err(opterr)
   15.12 +        sys.exit(1)
   15.13      
   15.14      n = len(params)
   15.15      for (k, v) in options:
    16.1 --- a/xen/arch/x86/mm.c	Wed Aug 17 12:34:38 2005 -0800
    16.2 +++ b/xen/arch/x86/mm.c	Thu Aug 18 10:40:02 2005 -0800
    16.3 @@ -3059,7 +3059,7 @@ static int ptwr_emulated_update(
    16.4      }
    16.5  
    16.6      /* Turn a sub-word access into a full-word access. */
    16.7 -    if (bytes != sizeof(physaddr_t))
    16.8 +    if ( bytes != sizeof(physaddr_t) )
    16.9      {
   16.10          int           rc;
   16.11          physaddr_t    full;
   16.12 @@ -3076,6 +3076,10 @@ static int ptwr_emulated_update(
   16.13          val  &= (((physaddr_t)1 << (bytes*8)) - 1);
   16.14          val <<= (offset)*8;
   16.15          val  |= full;
   16.16 +        /* Also fill in missing parts of the cmpxchg old value. */
   16.17 +        old  &= (((physaddr_t)1 << (bytes*8)) - 1);
   16.18 +        old <<= (offset)*8;
   16.19 +        old  |= full;
   16.20      }
   16.21  
   16.22      /* Read the PTE that maps the page being updated. */
   16.23 @@ -3111,7 +3115,7 @@ static int ptwr_emulated_update(
   16.24      if ( do_cmpxchg )
   16.25      {
   16.26          ol1e = l1e_from_intpte(old);
   16.27 -        if ( cmpxchg((unsigned long *)pl1e, old, val) != old )
   16.28 +        if ( cmpxchg((intpte_t *)pl1e, old, val) != old )
   16.29          {
   16.30              unmap_domain_page(pl1e);
   16.31              put_page_from_l1e(nl1e, d);
   16.32 @@ -3299,8 +3303,8 @@ int ptwr_do_page_fault(struct domain *d,
   16.33      
   16.34      /* Finally, make the p.t. page writable by the guest OS. */
   16.35      l1e_add_flags(pte, _PAGE_RW);
   16.36 -    if ( unlikely(__copy_to_user(&linear_pg_table[l1_linear_offset(addr)],
   16.37 -                                 &pte, sizeof(pte))) )
   16.38 +    if ( unlikely(__put_user(pte.l1,
   16.39 +                             &linear_pg_table[l1_linear_offset(addr)].l1)) )
   16.40      {
   16.41          MEM_LOG("ptwr: Could not update pte at %p", (unsigned long *)
   16.42                  &linear_pg_table[l1_linear_offset(addr)]);
    17.1 --- a/xen/arch/x86/setup.c	Wed Aug 17 12:34:38 2005 -0800
    17.2 +++ b/xen/arch/x86/setup.c	Thu Aug 18 10:40:02 2005 -0800
    17.3 @@ -244,6 +244,8 @@ static void __init start_of_day(void)
    17.4  
    17.5  #define EARLY_FAIL() for ( ; ; ) __asm__ __volatile__ ( "hlt" )
    17.6  
    17.7 +static struct e820entry e820_raw[E820MAX];
    17.8 +
    17.9  void __init __start_xen(multiboot_info_t *mbi)
   17.10  {
   17.11      char *cmdline;
   17.12 @@ -253,7 +255,6 @@ void __init __start_xen(multiboot_info_t
   17.13      unsigned long _initrd_start = 0, _initrd_len = 0;
   17.14      unsigned int initrdidx = 1;
   17.15      physaddr_t s, e;
   17.16 -    struct e820entry e820_raw[E820MAX];
   17.17      int i, e820_raw_nr = 0, bytes = 0;
   17.18      struct ns16550_defaults ns16550 = {
   17.19          .data_bits = 8,
    18.1 --- a/xen/arch/x86/traps.c	Wed Aug 17 12:34:38 2005 -0800
    18.2 +++ b/xen/arch/x86/traps.c	Thu Aug 18 10:40:02 2005 -0800
    18.3 @@ -159,10 +159,8 @@ void show_trace(unsigned long *esp)
    18.4          addr = *stack++;
    18.5          if ( is_kernel_text(addr) )
    18.6          {
    18.7 -            if ( (i != 0) && ((i % 6) == 0) )
    18.8 -                printk("\n   ");
    18.9              printk("[<%p>]", _p(addr));
   18.10 -            print_symbol(" %s\n", addr);
   18.11 +            print_symbol(" %s\n   ", addr);
   18.12              i++;
   18.13          }
   18.14      }
    19.1 --- a/xen/arch/x86/x86_32/traps.c	Wed Aug 17 12:34:38 2005 -0800
    19.2 +++ b/xen/arch/x86/x86_32/traps.c	Thu Aug 18 10:40:02 2005 -0800
    19.3 @@ -66,8 +66,9 @@ void show_registers(struct cpu_user_regs
    19.4  
    19.5      printk("CPU:    %d\nEIP:    %04lx:[<%08lx>]",
    19.6             smp_processor_id(), (unsigned long)0xffff & regs->cs, eip);
    19.7 -    print_symbol(" %s\n", eip);
    19.8 -    printk("EFLAGS: %08lx   CONTEXT: %s\n", eflags, context);
    19.9 +    if ( !GUEST_MODE(regs) )
   19.10 +        print_symbol(" %s", eip);
   19.11 +    printk("\nEFLAGS: %08lx   CONTEXT: %s\n", eflags, context);
   19.12      printk("eax: %08x   ebx: %08x   ecx: %08x   edx: %08x\n",
   19.13             regs->eax, regs->ebx, regs->ecx, regs->edx);
   19.14      printk("esi: %08x   edi: %08x   ebp: %08x   esp: %08lx\n",
    20.1 --- a/xen/arch/x86/x86_64/traps.c	Wed Aug 17 12:34:38 2005 -0800
    20.2 +++ b/xen/arch/x86/x86_64/traps.c	Thu Aug 18 10:40:02 2005 -0800
    20.3 @@ -17,8 +17,9 @@ void show_registers(struct cpu_user_regs
    20.4  {
    20.5      printk("CPU:    %d\nEIP:    %04x:[<%016lx>]",
    20.6             smp_processor_id(), 0xffff & regs->cs, regs->rip);
    20.7 -    print_symbol(" %s\n", regs->rip);
    20.8 -    printk("EFLAGS: %016lx\n", regs->eflags);
    20.9 +    if ( !GUEST_MODE(regs) )
   20.10 +        print_symbol(" %s", regs->rip);
   20.11 +    printk("\nEFLAGS: %016lx\n", regs->eflags);
   20.12      printk("rax: %016lx   rbx: %016lx   rcx: %016lx   rdx: %016lx\n",
   20.13             regs->rax, regs->rbx, regs->rcx, regs->rdx);
   20.14      printk("rsi: %016lx   rdi: %016lx   rbp: %016lx   rsp: %016lx\n",
    21.1 --- a/xen/drivers/char/console.c	Wed Aug 17 12:34:38 2005 -0800
    21.2 +++ b/xen/drivers/char/console.c	Thu Aug 18 10:40:02 2005 -0800
    21.3 @@ -652,8 +652,9 @@ static int __init debugtrace_init(void)
    21.4  void panic(const char *fmt, ...)
    21.5  {
    21.6      va_list args;
    21.7 -    char buf[128], cpustr[10];
    21.8 +    char buf[128];
    21.9      unsigned long flags;
   21.10 +    static spinlock_t lock = SPIN_LOCK_UNLOCKED;
   21.11      extern void machine_restart(char *);
   21.12      
   21.13      debugtrace_dump();
   21.14 @@ -665,16 +666,13 @@ void panic(const char *fmt, ...)
   21.15      debugger_trap_immediate();
   21.16  
   21.17      /* Spit out multiline message in one go. */
   21.18 -    spin_lock_irqsave(&console_lock, flags);
   21.19 -    __putstr("\n****************************************\n");
   21.20 -    __putstr("Panic on CPU");
   21.21 -    sprintf(cpustr, "%d", smp_processor_id());
   21.22 -    __putstr(cpustr);
   21.23 -    __putstr(":\n");
   21.24 -    __putstr(buf);
   21.25 -    __putstr("****************************************\n\n");
   21.26 -    __putstr("Reboot in five seconds...\n");
   21.27 -    spin_unlock_irqrestore(&console_lock, flags);
   21.28 +    spin_lock_irqsave(&lock, flags);
   21.29 +    printk("\n****************************************\n");
   21.30 +    printk("Panic on CPU %d:\n", smp_processor_id());
   21.31 +    printk(buf);
   21.32 +    printk("****************************************\n\n");
   21.33 +    printk("Reboot in five seconds...\n");
   21.34 +    spin_unlock_irqrestore(&lock, flags);
   21.35  
   21.36      watchdog_disable();
   21.37      mdelay(5000);
    22.1 --- a/xen/include/asm-x86/uaccess.h	Wed Aug 17 12:34:38 2005 -0800
    22.2 +++ b/xen/include/asm-x86/uaccess.h	Thu Aug 18 10:40:02 2005 -0800
    22.3 @@ -125,22 +125,20 @@ extern void __put_user_bad(void);
    22.4  	__pu_err;							\
    22.5  })							
    22.6  
    22.7 -#define __get_user_nocheck(x,ptr,size)				\
    22.8 -({								\
    22.9 -	long __gu_err, __gu_val;				\
   22.10 -	__get_user_size(__gu_val,(ptr),(size),__gu_err,-EFAULT);\
   22.11 -	(x) = (__typeof__(*(ptr)))__gu_val;			\
   22.12 -	__gu_err;						\
   22.13 +#define __get_user_nocheck(x,ptr,size)                          \
   22.14 +({                                                              \
   22.15 +	long __gu_err;                                          \
   22.16 +	__get_user_size((x),(ptr),(size),__gu_err,-EFAULT);     \
   22.17 +	__gu_err;                                               \
   22.18  })
   22.19  
   22.20 -#define __get_user_check(x,ptr,size)					\
   22.21 -({									\
   22.22 -	long __gu_err, __gu_val;					\
   22.23 -	__typeof__(*(ptr)) __user *__gu_addr = (ptr);			\
   22.24 -	__get_user_size(__gu_val,__gu_addr,(size),__gu_err,-EFAULT);	\
   22.25 -	(x) = (__typeof__(*(ptr)))__gu_val;				\
   22.26 -	if (!__addr_ok(__gu_addr)) __gu_err = -EFAULT;			\
   22.27 -	__gu_err;							\
   22.28 +#define __get_user_check(x,ptr,size)                            \
   22.29 +({                                                              \
   22.30 +	long __gu_err;                                          \
   22.31 +	__typeof__(*(ptr)) __user *__gu_addr = (ptr);           \
   22.32 +	__get_user_size((x),__gu_addr,(size),__gu_err,-EFAULT); \
   22.33 +	if (!__addr_ok(__gu_addr)) __gu_err = -EFAULT;          \
   22.34 +	__gu_err;                                               \
   22.35  })							
   22.36  
   22.37  struct __large_struct { unsigned long buf[100]; };