ia64/xen-unstable

changeset 6011:d4fd332df775

Manual merge.
author kaf24@firebug.cl.cam.ac.uk
date Wed Aug 03 09:22:03 2005 +0000 (2005-08-03)
parents be8fe9b3987c f17987201c08
children 04dfb5158f3a
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/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/irq.c linux-2.6-xen-sparse/arch/xen/i386/kernel/mpparse.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/time.c linux-2.6-xen-sparse/arch/xen/i386/kernel/traps.c linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.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/x86_64/kernel/Makefile 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/blkback.c linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c linux-2.6-xen-sparse/drivers/xen/netback/common.h 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/usbback.c 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/hypercall.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-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/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/hypervisor.h linux-2.6-xen-sparse/include/asm-xen/xenbus.h linux-2.6-xen-sparse/include/linux/mm.h linux-2.6-xen-sparse/kernel/irq/manage.c linux-2.6-xen-sparse/mm/memory.c patches/linux-2.6.12/smp-alts.patch tools/Makefile tools/debugger/gdb/gdbbuild tools/debugger/libxendebug/xendebug.c 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_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/xend-config.sxp tools/firmware/rombios/rombios.c tools/ioemu/monitor.c tools/ioemu/target-i386-dm/qemu-dm.debug tools/ioemu/vnc.c tools/libxc/Makefile tools/libxc/xc.h 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_elf.c tools/libxc/xc_private.c tools/libxc/xc_private.h tools/libxc/xc_ptrace.c tools/misc/Makefile tools/misc/policyprocessor/XmlToBinInterface.java 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/Daemon.py tools/python/xen/sv/DomInfo.py tools/python/xen/sv/DomList.py tools/python/xen/sv/GenTabbed.py tools/python/xen/sv/HTMLBase.py tools/python/xen/sv/Main.py tools/python/xen/sv/MigrateDomain.py tools/python/xen/sv/NodeInfo.py tools/python/xen/sv/RestoreDomain.py tools/python/xen/sv/SaveDomain.py tools/python/xen/sv/TabView.py tools/python/xen/sv/Wizard.py tools/python/xen/sv/__init__.py tools/python/xen/sv/params.py tools/python/xen/sv/util.py tools/python/xen/xend/XendCheckpoint.py tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/XendRoot.py tools/python/xen/xend/image.py tools/python/xen/xend/server/SrvDaemon.py tools/python/xen/xend/server/channel.py tools/python/xen/xend/xenstore/xsnode.py tools/python/xen/xm/create.py tools/python/xen/xm/main.py tools/sv/Makefile tools/sv/images/destroy.png tools/sv/images/finish.png tools/sv/images/internet.jpg tools/sv/images/internet.psd tools/sv/images/next.png tools/sv/images/orb_01.jpg tools/sv/images/orb_02.jpg tools/sv/images/pause.png tools/sv/images/previous.png tools/sv/images/reboot.png tools/sv/images/seperator-left-highlight.jpg tools/sv/images/seperator-right-highlight.jpg tools/sv/images/seperator.jpg 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/02directory.sh tools/xenstore/testsuite/07watch.sh tools/xenstore/testsuite/08transaction.sh tools/xenstore/testsuite/09domain.sh tools/xenstore/testsuite/10domain-homedir.sh tools/xenstore/testsuite/11domain-watch.sh tools/xenstore/testsuite/12readonly.sh tools/xenstore/testsuite/13watch-ack.sh tools/xenstore/testsuite/test.sh 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.h tools/xenstore/xs_random.c tools/xenstore/xs_test.c xen/Makefile xen/acm/acm_core.c xen/acm/acm_policy.c xen/arch/ia64/Makefile xen/arch/ia64/asm-offsets.c xen/arch/ia64/dom_fw.c xen/arch/ia64/domain.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/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/cpu/common.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/mpparse.c xen/arch/x86/setup.c xen/arch/x86/shadow.c xen/arch/x86/shadow32.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/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/dom_mem_ops.c xen/common/domain.c xen/common/grant_table.c xen/common/page_alloc.c xen/common/sched_sedf.c xen/common/symbols.c xen/common/xmalloc.c xen/drivers/char/console.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/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/fixmap.h xen/include/asm-x86/genapic.h xen/include/asm-x86/hpet.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/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/vmx.h xen/include/asm-x86/vmx_virpit.h xen/include/asm-x86/vmx_vmcs.h xen/include/public/arch-ia64.h xen/include/public/grant_table.h xen/include/public/io/blkif.h xen/include/public/io/netif.h xen/include/public/xen.h xen/include/xen/mm.h xen/include/xen/sched.h xen/include/xen/symbols.h xen/include/xen/time.h xen/tools/Makefile xen/tools/symbols.c
line diff
     1.1 --- a/buildconfigs/Rules.mk	Tue Aug 02 15:38:45 2005 -0700
     1.2 +++ b/buildconfigs/Rules.mk	Wed Aug 03 09:22:03 2005 +0000
     1.3 @@ -115,7 +115,7 @@ config-update-pae:
     1.4  ifeq ($(XEN_TARGET_X86_PAE),y)
     1.5  	sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
     1.6  else
     1.7 -	@: # do nothing yet
     1.8 +	grep '^CONFIG_HIGHMEM64G=y' $(CONFIG_FILE) >/dev/null && ( sed -e 's!^CONFIG_HIGHMEM64G=y$$!\# CONFIG_HIGHMEM64G is not set!;s!^\# CONFIG_HIGHMEM4G is not set$$!CONFIG_HIGHMEM4G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE) ) || true
     1.9  endif
    1.10  
    1.11  # never delete any intermediate files.
     2.1 --- a/linux-2.4-xen-sparse/arch/xen/Makefile	Tue Aug 02 15:38:45 2005 -0700
     2.2 +++ b/linux-2.4-xen-sparse/arch/xen/Makefile	Wed Aug 03 09:22:03 2005 +0000
     2.3 @@ -61,7 +61,6 @@ SUBDIRS += arch/xen/drivers/console
     2.4  SUBDIRS += arch/xen/drivers/evtchn
     2.5  SUBDIRS += arch/xen/drivers/blkif
     2.6  SUBDIRS += arch/xen/drivers/netif
     2.7 -#SUBDIRS += arch/xen/drivers/usbif
     2.8  SUBDIRS += arch/xen/drivers/balloon
     2.9  ifdef CONFIG_XEN_PRIVILEGED_GUEST
    2.10  SUBDIRS += arch/xen/drivers/dom0 
    2.11 @@ -72,7 +71,6 @@ CORE_FILES += arch/xen/drivers/evtchn/dr
    2.12  CORE_FILES += arch/xen/drivers/console/drv.o
    2.13  DRIVERS += arch/xen/drivers/blkif/drv.o
    2.14  DRIVERS += arch/xen/drivers/netif/drv.o
    2.15 -DRIVERS += arch/xen/drivers/usbif/drv.o
    2.16  ifdef CONFIG_XEN_PRIVILEGED_GUEST
    2.17  CORE_FILES += arch/xen/drivers/dom0/drv.o
    2.18  endif
     3.1 --- a/linux-2.4-xen-sparse/arch/xen/config.in	Tue Aug 02 15:38:45 2005 -0700
     3.2 +++ b/linux-2.4-xen-sparse/arch/xen/config.in	Wed Aug 03 09:22:03 2005 +0000
     3.3 @@ -16,14 +16,10 @@ mainmenu_option next_comment
     3.4  comment 'Xen'
     3.5  bool 'Support for privileged operations (domain 0)' CONFIG_XEN_PRIVILEGED_GUEST
     3.6  bool 'Device-driver domain (physical device access)' CONFIG_XEN_PHYSDEV_ACCESS
     3.7 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
     3.8 -    bool 'USB-device backend driver' CONFIG_XEN_USB_BACKEND
     3.9 -fi
    3.10  bool 'Scrub memory before freeing it to Xen' CONFIG_XEN_SCRUB_PAGES
    3.11  bool 'Network-device frontend driver' CONFIG_XEN_NETDEV_FRONTEND
    3.12  bool 'Block-device frontend driver' CONFIG_XEN_BLKDEV_FRONTEND
    3.13  bool 'Block-device uses grant tables' CONFIG_XEN_BLKDEV_GRANT
    3.14 -bool 'USB-device frontend driver' CONFIG_XEN_USB_FRONTEND
    3.15  endmenu
    3.16  # The IBM S/390 patch needs this.
    3.17  define_bool CONFIG_NO_IDLE_HZ y
    3.18 @@ -267,7 +263,7 @@ fi
    3.19  
    3.20  source drivers/char/Config.in
    3.21  
    3.22 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" -o "$CONFIG_XEN_USB_FRONTEND" = "y" ]; then
    3.23 +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
    3.24     source drivers/media/Config.in
    3.25  fi
    3.26  
    3.27 @@ -302,14 +298,8 @@ if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" 
    3.28     endmenu
    3.29  fi
    3.30  
    3.31 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" -o "$CONFIG_XEN_USB_FRONTEND" = "y" ]; then
    3.32 -   if [ "$CONFIG_XEN_USB_FRONTEND" = "y" -o "$CONFIG_XEN_USB_BACKEND" = "y" ]; then
    3.33 -       define_bool CONFIG_USB y
    3.34 -   fi
    3.35 +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
    3.36     source drivers/usb/Config.in
    3.37 -fi
    3.38 -
    3.39 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
    3.40     source net/bluetooth/Config.in
    3.41  fi
    3.42  
     4.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32	Tue Aug 02 15:38:45 2005 -0700
     4.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32	Wed Aug 03 09:22:03 2005 +0000
     4.3 @@ -1,7 +1,7 @@
     4.4  #
     4.5  # Automatically generated make config: don't edit
     4.6  # Linux kernel version: 2.6.12-xen0
     4.7 -# Mon Jul 25 09:48:34 2005
     4.8 +# Wed Aug  3 09:54:56 2005
     4.9  #
    4.10  CONFIG_XEN=y
    4.11  CONFIG_ARCH_XEN=y
    4.12 @@ -18,8 +18,8 @@ CONFIG_XEN_BLKDEV_GRANT=y
    4.13  CONFIG_XEN_NETDEV_BACKEND=y
    4.14  CONFIG_XEN_BLKDEV_FRONTEND=y
    4.15  CONFIG_XEN_NETDEV_FRONTEND=y
    4.16 -#CONFIG_XEN_NETDEV_GRANT_TX=y
    4.17 -#CONFIG_XEN_NETDEV_GRANT_RX=y
    4.18 +# CONFIG_XEN_NETDEV_GRANT_TX is not set
    4.19 +# CONFIG_XEN_NETDEV_GRANT_RX is not set
    4.20  # CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set
    4.21  # CONFIG_XEN_BLKDEV_TAP is not set
    4.22  # CONFIG_XEN_SHADOW_MODE is not set
    4.23 @@ -93,11 +93,11 @@ CONFIG_GENERIC_IOMAP=y
    4.24  # CONFIG_M586 is not set
    4.25  # CONFIG_M586TSC is not set
    4.26  # CONFIG_M586MMX is not set
    4.27 -# CONFIG_M686 is not set
    4.28 +CONFIG_M686=y
    4.29  # CONFIG_MPENTIUMII is not set
    4.30  # CONFIG_MPENTIUMIII is not set
    4.31  # CONFIG_MPENTIUMM is not set
    4.32 -CONFIG_MPENTIUM4=y
    4.33 +# CONFIG_MPENTIUM4 is not set
    4.34  # CONFIG_MK6 is not set
    4.35  # CONFIG_MK7 is not set
    4.36  # CONFIG_MK8 is not set
    4.37 @@ -112,15 +112,15 @@ CONFIG_MPENTIUM4=y
    4.38  # CONFIG_X86_GENERIC is not set
    4.39  CONFIG_X86_CMPXCHG=y
    4.40  CONFIG_X86_XADD=y
    4.41 -CONFIG_X86_L1_CACHE_SHIFT=7
    4.42 +CONFIG_X86_L1_CACHE_SHIFT=5
    4.43  CONFIG_RWSEM_XCHGADD_ALGORITHM=y
    4.44  CONFIG_GENERIC_CALIBRATE_DELAY=y
    4.45 +CONFIG_X86_PPRO_FENCE=y
    4.46  CONFIG_X86_WP_WORKS_OK=y
    4.47  CONFIG_X86_INVLPG=y
    4.48  CONFIG_X86_BSWAP=y
    4.49  CONFIG_X86_POPAD_OK=y
    4.50  CONFIG_X86_GOOD_APIC=y
    4.51 -CONFIG_X86_INTEL_USERCOPY=y
    4.52  CONFIG_X86_USE_PPRO_CHECKSUM=y
    4.53  # CONFIG_HPET_TIMER is not set
    4.54  # CONFIG_HPET_EMULATE_RTC is not set
     5.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64	Tue Aug 02 15:38:45 2005 -0700
     5.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64	Wed Aug 03 09:22:03 2005 +0000
     5.3 @@ -1,7 +1,7 @@
     5.4  #
     5.5  # Automatically generated make config: don't edit
     5.6  # Linux kernel version: 2.6.12-xen0
     5.7 -# Wed Jun 29 10:01:20 2005
     5.8 +# Tue Aug  2 23:55:35 2005
     5.9  #
    5.10  CONFIG_XEN=y
    5.11  CONFIG_ARCH_XEN=y
    5.12 @@ -18,6 +18,8 @@ CONFIG_XEN_BLKDEV_GRANT=y
    5.13  CONFIG_XEN_NETDEV_BACKEND=y
    5.14  CONFIG_XEN_BLKDEV_FRONTEND=y
    5.15  CONFIG_XEN_NETDEV_FRONTEND=y
    5.16 +# CONFIG_XEN_NETDEV_GRANT_TX is not set
    5.17 +# CONFIG_XEN_NETDEV_GRANT_RX is not set
    5.18  # CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set
    5.19  # CONFIG_XEN_BLKDEV_TAP is not set
    5.20  # CONFIG_XEN_SHADOW_MODE is not set
     6.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32	Tue Aug 02 15:38:45 2005 -0700
     6.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32	Wed Aug 03 09:22:03 2005 +0000
     6.3 @@ -1,7 +1,7 @@
     6.4  #
     6.5  # Automatically generated make config: don't edit
     6.6  # Linux kernel version: 2.6.12-xenU
     6.7 -# Mon Jul 25 10:06:06 2005
     6.8 +# Wed Aug  3 09:57:44 2005
     6.9  #
    6.10  CONFIG_XEN=y
    6.11  CONFIG_ARCH_XEN=y
    6.12 @@ -15,8 +15,8 @@ CONFIG_NO_IDLE_HZ=y
    6.13  CONFIG_XEN_BLKDEV_GRANT=y
    6.14  CONFIG_XEN_BLKDEV_FRONTEND=y
    6.15  CONFIG_XEN_NETDEV_FRONTEND=y
    6.16 -#CONFIG_XEN_NETDEV_GRANT_TX=y
    6.17 -#CONFIG_XEN_NETDEV_GRANT_RX=y
    6.18 +# CONFIG_XEN_NETDEV_GRANT_TX is not set
    6.19 +# CONFIG_XEN_NETDEV_GRANT_RX is not set
    6.20  # CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set
    6.21  # CONFIG_XEN_BLKDEV_TAP is not set
    6.22  # CONFIG_XEN_SHADOW_MODE is not set
    6.23 @@ -90,11 +90,11 @@ CONFIG_GENERIC_IOMAP=y
    6.24  # CONFIG_M586 is not set
    6.25  # CONFIG_M586TSC is not set
    6.26  # CONFIG_M586MMX is not set
    6.27 -# CONFIG_M686 is not set
    6.28 +CONFIG_M686=y
    6.29  # CONFIG_MPENTIUMII is not set
    6.30  # CONFIG_MPENTIUMIII is not set
    6.31  # CONFIG_MPENTIUMM is not set
    6.32 -CONFIG_MPENTIUM4=y
    6.33 +# CONFIG_MPENTIUM4 is not set
    6.34  # CONFIG_MK6 is not set
    6.35  # CONFIG_MK7 is not set
    6.36  # CONFIG_MK8 is not set
    6.37 @@ -109,15 +109,15 @@ CONFIG_MPENTIUM4=y
    6.38  # CONFIG_X86_GENERIC is not set
    6.39  CONFIG_X86_CMPXCHG=y
    6.40  CONFIG_X86_XADD=y
    6.41 -CONFIG_X86_L1_CACHE_SHIFT=7
    6.42 +CONFIG_X86_L1_CACHE_SHIFT=5
    6.43  CONFIG_RWSEM_XCHGADD_ALGORITHM=y
    6.44  CONFIG_GENERIC_CALIBRATE_DELAY=y
    6.45 +CONFIG_X86_PPRO_FENCE=y
    6.46  CONFIG_X86_WP_WORKS_OK=y
    6.47  CONFIG_X86_INVLPG=y
    6.48  CONFIG_X86_BSWAP=y
    6.49  CONFIG_X86_POPAD_OK=y
    6.50  CONFIG_X86_GOOD_APIC=y
    6.51 -CONFIG_X86_INTEL_USERCOPY=y
    6.52  CONFIG_X86_USE_PPRO_CHECKSUM=y
    6.53  # CONFIG_HPET_TIMER is not set
    6.54  # CONFIG_HPET_EMULATE_RTC is not set
     7.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64	Tue Aug 02 15:38:45 2005 -0700
     7.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64	Wed Aug 03 09:22:03 2005 +0000
     7.3 @@ -1,7 +1,7 @@
     7.4  #
     7.5  # Automatically generated make config: don't edit
     7.6  # Linux kernel version: 2.6.12-xenU
     7.7 -# Thu Jul  7 11:43:14 2005
     7.8 +# Tue Aug  2 23:56:13 2005
     7.9  #
    7.10  CONFIG_XEN=y
    7.11  CONFIG_ARCH_XEN=y
    7.12 @@ -15,6 +15,8 @@ CONFIG_NO_IDLE_HZ=y
    7.13  CONFIG_XEN_BLKDEV_GRANT=y
    7.14  CONFIG_XEN_BLKDEV_FRONTEND=y
    7.15  CONFIG_XEN_NETDEV_FRONTEND=y
    7.16 +# CONFIG_XEN_NETDEV_GRANT_TX is not set
    7.17 +# CONFIG_XEN_NETDEV_GRANT_RX is not set
    7.18  # CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set
    7.19  # CONFIG_XEN_BLKDEV_TAP is not set
    7.20  # CONFIG_XEN_SHADOW_MODE is not set
     8.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c	Tue Aug 02 15:38:45 2005 -0700
     8.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c	Wed Aug 03 09:22:03 2005 +0000
     8.3 @@ -1529,7 +1529,7 @@ void __init smp_cpus_done(unsigned int m
     8.4  extern irqreturn_t smp_reschedule_interrupt(int, void *, struct pt_regs *);
     8.5  extern irqreturn_t smp_call_function_interrupt(int, void *, struct pt_regs *);
     8.6  
     8.7 -void __init smp_intr_init(void)
     8.8 +void smp_intr_init(void)
     8.9  {
    8.10  	int cpu = smp_processor_id();
    8.11  
    8.12 @@ -1546,3 +1546,28 @@ void __init smp_intr_init(void)
    8.13  	                   smp_call_function_interrupt,
    8.14  	                   SA_INTERRUPT, callfunc_name[cpu], NULL));
    8.15  }
    8.16 +
    8.17 +static void smp_intr_exit(void)
    8.18 +{
    8.19 +	int cpu = smp_processor_id();
    8.20 +
    8.21 +	free_irq(per_cpu(resched_irq, cpu), NULL);
    8.22 +	unbind_ipi_from_irq(RESCHEDULE_VECTOR);
    8.23 +
    8.24 +	free_irq(per_cpu(callfunc_irq, cpu), NULL);
    8.25 +	unbind_ipi_from_irq(CALL_FUNCTION_VECTOR);
    8.26 +}
    8.27 +
    8.28 +void smp_suspend(void)
    8.29 +{
    8.30 +	/* XXX todo: take down time and ipi's on all cpus */
    8.31 +	local_teardown_timer_irq();
    8.32 +	smp_intr_exit();
    8.33 +}
    8.34 +
    8.35 +void smp_resume(void)
    8.36 +{
    8.37 +	/* XXX todo: restore time and ipi's on all cpus */
    8.38 +	smp_intr_init();
    8.39 +	local_setup_timer_irq();
    8.40 +}
     9.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c	Tue Aug 02 15:38:45 2005 -0700
     9.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c	Wed Aug 03 09:22:03 2005 +0000
     9.3 @@ -860,6 +860,8 @@ void start_hz_timer(void)
     9.4  void time_suspend(void)
     9.5  {
     9.6  	/* nothing */
     9.7 +	teardown_irq(per_cpu(timer_irq, 0), &irq_timer);
     9.8 +	unbind_virq_from_irq(VIRQ_TIMER);
     9.9  }
    9.10  
    9.11  /* No locking required. We are only CPU running, and interrupts are off. */
    9.12 @@ -874,10 +876,25 @@ void time_resume(void)
    9.13  	processed_system_time =
    9.14  		per_cpu(shadow_time, smp_processor_id()).system_timestamp;
    9.15  	per_cpu(processed_system_time, 0) = processed_system_time;
    9.16 +
    9.17 +	per_cpu(timer_irq, 0) = bind_virq_to_irq(VIRQ_TIMER);
    9.18 +	(void)setup_irq(per_cpu(timer_irq, 0), &irq_timer);
    9.19  }
    9.20  
    9.21  #ifdef CONFIG_SMP
    9.22  static char timer_name[NR_CPUS][15];
    9.23 +void local_setup_timer_irq(void)
    9.24 +{
    9.25 +	int cpu = smp_processor_id();
    9.26 +
    9.27 +	if (cpu == 0)
    9.28 +		return;
    9.29 +	per_cpu(timer_irq, cpu) = bind_virq_to_irq(VIRQ_TIMER);
    9.30 +	sprintf(timer_name[cpu], "timer%d", cpu);
    9.31 +	BUG_ON(request_irq(per_cpu(timer_irq, cpu), timer_interrupt,
    9.32 +	                   SA_INTERRUPT, timer_name[cpu], NULL));
    9.33 +}
    9.34 +
    9.35  void local_setup_timer(void)
    9.36  {
    9.37  	int seq, cpu = smp_processor_id();
    9.38 @@ -888,10 +905,17 @@ void local_setup_timer(void)
    9.39  			per_cpu(shadow_time, cpu).system_timestamp;
    9.40  	} while (read_seqretry(&xtime_lock, seq));
    9.41  
    9.42 -	per_cpu(timer_irq, cpu) = bind_virq_to_irq(VIRQ_TIMER);
    9.43 -	sprintf(timer_name[cpu], "timer%d", cpu);
    9.44 -	BUG_ON(request_irq(per_cpu(timer_irq, cpu), timer_interrupt,
    9.45 -	                   SA_INTERRUPT, timer_name[cpu], NULL));
    9.46 +	local_setup_timer_irq();
    9.47 +}
    9.48 +
    9.49 +void local_teardown_timer_irq(void)
    9.50 +{
    9.51 +	int cpu = smp_processor_id();
    9.52 +
    9.53 +	if (cpu == 0)
    9.54 +		return;
    9.55 +	free_irq(per_cpu(timer_irq, cpu), NULL);
    9.56 +	unbind_virq_from_irq(VIRQ_TIMER);
    9.57  }
    9.58  #endif
    9.59  
    10.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c	Tue Aug 02 15:38:45 2005 -0700
    10.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c	Wed Aug 03 09:22:03 2005 +0000
    10.3 @@ -284,7 +284,7 @@ void unbind_ipi_from_irq(int ipi)
    10.4      evtchn_op_t op;
    10.5      int cpu    = smp_processor_id();
    10.6      int evtchn = per_cpu(ipi_to_evtchn, cpu)[ipi];
    10.7 -    int irq    = irq_to_evtchn[evtchn];
    10.8 +    int irq    = evtchn_to_irq[evtchn];
    10.9  
   10.10      spin_lock(&irq_mapping_update_lock);
   10.11  
    11.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Tue Aug 02 15:38:45 2005 -0700
    11.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Wed Aug 03 09:22:03 2005 +0000
    11.3 @@ -16,6 +16,7 @@ static int errno;
    11.4  #include <asm-xen/xen-public/dom0_ops.h>
    11.5  #include <asm-xen/linux-public/suspend.h>
    11.6  #include <asm-xen/queues.h>
    11.7 +#include <asm-xen/xenbus.h>
    11.8  
    11.9  void machine_restart(char * __unused)
   11.10  {
   11.11 @@ -90,6 +91,10 @@ static void __do_suspend(void)
   11.12  #define gnttab_resume()  do{}while(0)
   11.13  #endif
   11.14  
   11.15 +#ifdef CONFIG_SMP
   11.16 +    extern void smp_suspend(void);
   11.17 +    extern void smp_resume(void);
   11.18 +#endif
   11.19      extern void time_suspend(void);
   11.20      extern void time_resume(void);
   11.21      extern unsigned long max_pfn;
   11.22 @@ -114,6 +119,12 @@ static void __do_suspend(void)
   11.23  
   11.24      time_suspend();
   11.25  
   11.26 +#ifdef CONFIG_SMP
   11.27 +    smp_suspend();
   11.28 +#endif
   11.29 +
   11.30 +    xenbus_suspend();
   11.31 +
   11.32      ctrl_if_suspend();
   11.33  
   11.34      irq_suspend();
   11.35 @@ -153,6 +164,12 @@ static void __do_suspend(void)
   11.36  
   11.37      ctrl_if_resume();
   11.38  
   11.39 +    xenbus_resume();
   11.40 +
   11.41 +#ifdef CONFIG_SMP
   11.42 +    smp_resume();
   11.43 +#endif
   11.44 +
   11.45      time_resume();
   11.46  
   11.47      blkdev_resume();
    12.1 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Tue Aug 02 15:38:45 2005 -0700
    12.2 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Wed Aug 03 09:22:03 2005 +0000
    12.3 @@ -84,9 +84,6 @@ static struct timer_list balloon_timer;
    12.4  /* Flag for dom0 xenstore workaround */
    12.5  static int balloon_xenbus_init=0;
    12.6  
    12.7 -/* Init Function */
    12.8 -void balloon_init_watcher(void);
    12.9 -
   12.10  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
   12.11  /* Use the private and mapping fields of struct page as a list. */
   12.12  #define PAGE_TO_LIST(p) ( (struct list_head *)&p->private )
   12.13 @@ -354,27 +351,21 @@ static void watch_target(struct xenbus_w
   12.14      
   12.15  }
   12.16  
   12.17 -/* 
   12.18 -   Try to set up our watcher, if not already set
   12.19 -   
   12.20 -*/
   12.21 -void balloon_init_watcher(void) 
   12.22 +/* Init Function - Try to set up our watcher, if not already set. */
   12.23 +void balloon_init_watcher(void)
   12.24  {
   12.25      int err;
   12.26  
   12.27 -    if(!xen_start_info.store_evtchn)
   12.28 -    {
   12.29 +    if (!xen_start_info.store_evtchn) {
   12.30          IPRINTK("Delaying watcher init until xenstore is available\n");
   12.31          return;
   12.32      }
   12.33  
   12.34      down(&xenbus_lock);
   12.35  
   12.36 -    if(! balloon_xenbus_init) 
   12.37 -    {
   12.38 +    if (!balloon_xenbus_init) {
   12.39          err = register_xenbus_watch(&xb_watch);
   12.40 -        if(err) 
   12.41 -        {
   12.42 +        if (err) {
   12.43              /* BIG FAT FIXME: dom0 sequencing workaround
   12.44               * dom0 can't set a watch on memory/target until
   12.45               * after the tools create it.  So, we have to watch
   12.46 @@ -384,16 +375,13 @@ void balloon_init_watcher(void)
   12.47               * non-existant keys
   12.48               */
   12.49              register_xenbus_watch(&root_watch);
   12.50 -        } 
   12.51 -        else
   12.52 -        {
   12.53 +        } else {
   12.54              IPRINTK("Balloon xenbus watcher initialized\n");
   12.55              balloon_xenbus_init = 1;
   12.56          }
   12.57      }
   12.58  
   12.59      up(&xenbus_lock);
   12.60 -
   12.61  }
   12.62  
   12.63  EXPORT_SYMBOL(balloon_init_watcher);
    13.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c	Tue Aug 02 15:38:45 2005 -0700
    13.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c	Wed Aug 03 09:22:03 2005 +0000
    13.3 @@ -36,6 +36,8 @@
    13.4  #include <linux/err.h>
    13.5  #include "xenbus_comms.h"
    13.6  
    13.7 +static unsigned int xb_irq;
    13.8 +
    13.9  #define RINGBUF_DATASIZE ((PAGE_SIZE / 2) - sizeof(struct ringbuf_head))
   13.10  struct ringbuf_head
   13.11  {
   13.12 @@ -202,14 +204,17 @@ int xb_read(void *data, unsigned len)
   13.13  	return 0;
   13.14  }
   13.15  
   13.16 -/* Set up interrpt handler off store event channel. */
   13.17 +/* Set up interrupt handler off store event channel. */
   13.18  int xb_init_comms(void)
   13.19  {
   13.20 -	int err, irq;
   13.21 +	int err;
   13.22  
   13.23 -	irq = bind_evtchn_to_irq(xen_start_info.store_evtchn);
   13.24 +	if (!xen_start_info.store_evtchn)
   13.25 +		return 0;
   13.26  
   13.27 -	err = request_irq(irq, wake_waiting, SA_SHIRQ, "xenbus", &xb_waitq);
   13.28 +	xb_irq = bind_evtchn_to_irq(xen_start_info.store_evtchn);
   13.29 +
   13.30 +	err = request_irq(xb_irq, wake_waiting, 0, "xenbus", &xb_waitq);
   13.31  	if (err) {
   13.32  		printk(KERN_ERR "XENBUS request irq failed %i\n", err);
   13.33  		unbind_evtchn_from_irq(xen_start_info.store_evtchn);
   13.34 @@ -222,3 +227,13 @@ int xb_init_comms(void)
   13.35  
   13.36  	return 0;
   13.37  }
   13.38 +
   13.39 +void xb_suspend_comms(void)
   13.40 +{
   13.41 +
   13.42 +	if (!xen_start_info.store_evtchn)
   13.43 +		return;
   13.44 +
   13.45 +	free_irq(xb_irq, &xb_waitq);
   13.46 +	unbind_evtchn_from_irq(xen_start_info.store_evtchn);
   13.47 +}
    14.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.h	Tue Aug 02 15:38:45 2005 -0700
    14.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.h	Wed Aug 03 09:22:03 2005 +0000
    14.3 @@ -3,6 +3,7 @@
    14.4  #define _XENBUS_COMMS_H
    14.5  int xs_init(void);
    14.6  int xb_init_comms(void);
    14.7 +void xb_suspend_comms(void);
    14.8  
    14.9  /* Low level routines. */
   14.10  int xb_write(const void *data, unsigned len);
    15.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Tue Aug 02 15:38:45 2005 -0700
    15.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Wed Aug 03 09:22:03 2005 +0000
    15.3 @@ -29,6 +29,7 @@
    15.4  
    15.5  #include <asm-xen/hypervisor.h>
    15.6  #include <asm-xen/xenbus.h>
    15.7 +#include <asm-xen/balloon.h>
    15.8  #include <linux/kernel.h>
    15.9  #include <linux/err.h>
   15.10  #include <linux/string.h>
   15.11 @@ -295,6 +296,19 @@ static struct xenbus_watch dev_watch = {
   15.12  	.callback = dev_changed,
   15.13  };
   15.14  
   15.15 +void xenbus_suspend(void)
   15.16 +{
   15.17 +	/* We keep lock, so no comms can happen as page moves. */
   15.18 +	down(&xenbus_lock);
   15.19 +	xb_suspend_comms();
   15.20 +}
   15.21 +
   15.22 +void xenbus_resume(void)
   15.23 +{
   15.24 +	xb_init_comms();
   15.25 +	up(&xenbus_lock);
   15.26 +}
   15.27 +
   15.28  /* called from a thread in privcmd/privcmd.c */
   15.29  int do_xenbus_probe(void *unused)
   15.30  {
    16.1 --- a/linux-2.6-xen-sparse/include/asm-generic/pgtable.h	Tue Aug 02 15:38:45 2005 -0700
    16.2 +++ b/linux-2.6-xen-sparse/include/asm-generic/pgtable.h	Wed Aug 03 09:22:03 2005 +0000
    16.3 @@ -37,7 +37,7 @@ do {				  					\
    16.4   */
    16.5  #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
    16.6  do {				  					  \
    16.7 -	set_pte_at((__vma)>vm_mm, (__address), __ptep, __entry);	  \
    16.8 +	set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry);	  \
    16.9  	flush_tlb_page(__vma, __address);				  \
   16.10  } while (0)
   16.11  #endif
    17.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h	Tue Aug 02 15:38:45 2005 -0700
    17.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h	Wed Aug 03 09:22:03 2005 +0000
    17.3 @@ -129,6 +129,7 @@
    17.4  extern int  bind_virq_to_irq(int virq);
    17.5  extern void unbind_virq_from_irq(int virq);
    17.6  extern int  bind_ipi_to_irq(int ipi);
    17.7 +extern int  bind_ipi_on_cpu_to_irq(int ipi);
    17.8  extern void unbind_ipi_from_irq(int ipi);
    17.9  extern int  bind_evtchn_to_irq(int evtchn);
   17.10  extern void unbind_evtchn_from_irq(int evtchn);
    18.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/irq_vectors.h	Tue Aug 02 15:38:45 2005 -0700
    18.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/irq_vectors.h	Wed Aug 03 09:22:03 2005 +0000
    18.3 @@ -127,6 +127,7 @@
    18.4  extern int  bind_virq_to_irq(int virq);
    18.5  extern void unbind_virq_from_irq(int virq);
    18.6  extern int  bind_ipi_to_irq(int ipi);
    18.7 +extern int  bind_ipi_on_cpu_to_irq(int ipi);
    18.8  extern void unbind_ipi_from_irq(int ipi);
    18.9  extern int  bind_evtchn_to_irq(int evtchn);
   18.10  extern void unbind_evtchn_from_irq(int evtchn);
    19.1 --- a/linux-2.6-xen-sparse/include/asm-xen/balloon.h	Tue Aug 02 15:38:45 2005 -0700
    19.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/balloon.h	Wed Aug 03 09:22:03 2005 +0000
    19.3 @@ -48,4 +48,7 @@ extern spinlock_t balloon_lock;
    19.4  #define balloon_lock(__flags)   spin_lock_irqsave(&balloon_lock, __flags)
    19.5  #define balloon_unlock(__flags) spin_unlock_irqrestore(&balloon_lock, __flags)
    19.6  
    19.7 +/* Init Function - Try to set up our watcher, if not already set. */
    19.8 +void balloon_init_watcher(void);
    19.9 +
   19.10  #endif /* __ASM_BALLOON_H__ */
    20.1 --- a/linux-2.6-xen-sparse/include/asm-xen/xenbus.h	Tue Aug 02 15:38:45 2005 -0700
    20.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/xenbus.h	Wed Aug 03 09:22:03 2005 +0000
    20.3 @@ -115,4 +115,8 @@ struct xenbus_watch
    20.4  int register_xenbus_watch(struct xenbus_watch *watch);
    20.5  void unregister_xenbus_watch(struct xenbus_watch *watch);
    20.6  
    20.7 +/* Called from xen core code. */
    20.8 +void xenbus_suspend(void);
    20.9 +void xenbus_resume(void);
   20.10 +
   20.11  #endif /* _ASM_XEN_XENBUS_H */
    21.1 --- a/tools/libxc/xc.h	Tue Aug 02 15:38:45 2005 -0700
    21.2 +++ b/tools/libxc/xc.h	Wed Aug 03 09:22:03 2005 +0000
    21.3 @@ -279,9 +279,12 @@ int xc_linux_save(int xc_handle, int fd,
    21.4   * @parm fd the file descriptor to restore a domain from
    21.5   * @parm dom the id of the domain
    21.6   * @parm nr_pfns the number of pages
    21.7 + * @parm store_evtchn the store event channel for this domain to use
    21.8 + * @parm store_mfn returned with the mfn of the store page
    21.9   * @return 0 on success, -1 on failure
   21.10   */
   21.11 -int xc_linux_restore(int xc_handle, int io_fd, u32 dom, unsigned long nr_pfns);
   21.12 +int xc_linux_restore(int xc_handle, int io_fd, u32 dom, unsigned long nr_pfns,
   21.13 +		     unsigned int store_evtchn, unsigned long *store_mfn);
   21.14  
   21.15  int xc_linux_build(int xc_handle,
   21.16                     u32 domid,
    22.1 --- a/tools/libxc/xc_linux_restore.c	Tue Aug 02 15:38:45 2005 -0700
    22.2 +++ b/tools/libxc/xc_linux_restore.c	Wed Aug 03 09:22:03 2005 +0000
    22.3 @@ -48,7 +48,8 @@ read_exact(int fd, void *buf, size_t cou
    22.4      return r;
    22.5  }
    22.6  
    22.7 -int xc_linux_restore(int xc_handle, int io_fd, u32 dom, unsigned long nr_pfns)
    22.8 +int xc_linux_restore(int xc_handle, int io_fd, u32 dom, unsigned long nr_pfns,
    22.9 +		     unsigned int store_evtchn, unsigned long *store_mfn)
   22.10  {
   22.11      dom0_op_t op;
   22.12      int rc = 1, i, n, k;
   22.13 @@ -464,10 +465,13 @@ int xc_linux_restore(int xc_handle, int 
   22.14      }
   22.15      ctxt.user_regs.esi = mfn = pfn_to_mfn_table[pfn];
   22.16      p_srec = xc_map_foreign_range(
   22.17 -        xc_handle, dom, PAGE_SIZE, PROT_WRITE, mfn);
   22.18 +        xc_handle, dom, PAGE_SIZE, PROT_READ | PROT_WRITE, mfn);
   22.19      p_srec->resume_info.nr_pages    = nr_pfns;
   22.20      p_srec->resume_info.shared_info = shared_info_frame << PAGE_SHIFT;
   22.21      p_srec->resume_info.flags       = 0;
   22.22 +    *store_mfn = p_srec->resume_info.store_mfn   =
   22.23 +	pfn_to_mfn_table[p_srec->resume_info.store_mfn];
   22.24 +    p_srec->resume_info.store_evtchn = store_evtchn;
   22.25      munmap(p_srec, PAGE_SIZE);
   22.26  
   22.27      /* Uncanonicalise each GDT frame number. */
    23.1 --- a/tools/libxc/xc_linux_save.c	Tue Aug 02 15:38:45 2005 -0700
    23.2 +++ b/tools/libxc/xc_linux_save.c	Wed Aug 03 09:22:03 2005 +0000
    23.3 @@ -20,7 +20,7 @@
    23.4  #define DEBUG 0
    23.5  
    23.6  #if 1
    23.7 -#define ERR(_f, _a...) fprintf ( stderr, _f , ## _a )
    23.8 +#define ERR(_f, _a...) do { fprintf(stderr, _f , ## _a); fflush(stderr); } while (0)
    23.9  #else
   23.10  #define ERR(_f, _a...) ((void)0)
   23.11  #endif
   23.12 @@ -643,6 +643,22 @@ int xc_linux_save(int xc_handle, int io_
   23.13          goto out;
   23.14      }
   23.15  
   23.16 +    /* Map the suspend-record MFN to pin it. The page must be owned by 
   23.17 +       dom for this to succeed. */
   23.18 +    p_srec = xc_map_foreign_range(xc_handle, dom,
   23.19 +                                   sizeof(*p_srec), PROT_READ | PROT_WRITE, 
   23.20 +                                   ctxt.user_regs.esi);
   23.21 +    if (!p_srec){
   23.22 +        ERR("Couldn't map suspend record");
   23.23 +        goto out;
   23.24 +    }
   23.25 +
   23.26 +    /* Canonicalize store mfn. */
   23.27 +    if ( !translate_mfn_to_pfn(&p_srec->resume_info.store_mfn) ) {
   23.28 +	ERR("Store frame is not in range of pseudophys map");
   23.29 +	goto out;
   23.30 +    }
   23.31 +
   23.32      print_stats( xc_handle, dom, 0, &stats, 0 );
   23.33  
   23.34      /* Now write out each data page, canonicalising page tables as we go... */
   23.35 @@ -983,16 +999,6 @@ int xc_linux_save(int xc_handle, int io_
   23.36  	}
   23.37      }
   23.38  
   23.39 -    /* Map the suspend-record MFN to pin it. The page must be owned by 
   23.40 -       dom for this to succeed. */
   23.41 -    p_srec = xc_map_foreign_range(xc_handle, dom,
   23.42 -                                   sizeof(*p_srec), PROT_READ, 
   23.43 -                                   ctxt.user_regs.esi);
   23.44 -    if (!p_srec){
   23.45 -        ERR("Couldn't map suspend record");
   23.46 -        goto out;
   23.47 -    }
   23.48 -
   23.49      if (nr_pfns != p_srec->nr_pfns )
   23.50      {
   23.51  	ERR("Suspend record nr_pfns unexpected (%ld != %ld)",
    24.1 --- a/tools/python/xen/lowlevel/xs/xs.c	Tue Aug 02 15:38:45 2005 -0700
    24.2 +++ b/tools/python/xen/lowlevel/xs/xs.c	Wed Aug 03 09:22:03 2005 +0000
    24.3 @@ -254,11 +254,11 @@ static PyObject *xspy_get_permissions(Py
    24.4      val = PyList_New(perms_n);
    24.5      for (i = 0; i < perms_n; i++, perms++) {
    24.6          PyObject *p = Py_BuildValue("{s:i,s:i,s:i,s:i,s:i}",
    24.7 -                                    "dom",    perms->id,
    24.8 -                                    "read",   (perms->perms & XS_PERM_READ),
    24.9 -                                    "write",  (perms->perms & XS_PERM_WRITE),
   24.10 -                                    "create", (perms->perms & XS_PERM_CREATE),
   24.11 -                                    "owner",  (perms->perms & XS_PERM_OWNER));
   24.12 +                                    "dom",   perms->id,
   24.13 +                                    "read",  (perms->perms & XS_PERM_READ),
   24.14 +                                    "write", (perms->perms & XS_PERM_WRITE),
   24.15 +                                    "exist", (perms->perms & XS_PERM_ENOENT_OK),
   24.16 +                                    "owner", (perms->perms & XS_PERM_OWNER));
   24.17          PyList_SetItem(val, i, p);
   24.18      }
   24.19   exit:
    25.1 --- a/tools/python/xen/xend/XendCheckpoint.py	Tue Aug 02 15:38:45 2005 -0700
    25.2 +++ b/tools/python/xen/xend/XendCheckpoint.py	Wed Aug 03 09:22:03 2005 +0000
    25.3 @@ -6,6 +6,7 @@
    25.4  
    25.5  import errno
    25.6  import os
    25.7 +import re
    25.8  import select
    25.9  import sxp
   25.10  from string import join
   25.11 @@ -64,6 +65,13 @@ def save(xd, fd, dominfo):
   25.12                  if l.rstrip() == "suspend":
   25.13                      log.info("suspending %d" % dominfo.id)
   25.14                      xd.domain_shutdown(dominfo.id, reason='suspend')
   25.15 +                    if dominfo.store_channel:
   25.16 +                        try:
   25.17 +                            dominfo.db.releaseDomain(dominfo.id)
   25.18 +                        except Exception, ex:
   25.19 +                            log.warning("error in domain release on xenstore: %s",
   25.20 +                                        ex)
   25.21 +                            pass
   25.22                      dominfo.state_wait("suspended")
   25.23                      log.info("suspend %d done" % dominfo.id)
   25.24                      child.tochild.write("done\n")
   25.25 @@ -76,6 +84,11 @@ def save(xd, fd, dominfo):
   25.26      if child.wait() != 0:
   25.27          raise XendError("xc_save failed: %s" % lasterr)
   25.28  
   25.29 +    if dominfo.store_channel:
   25.30 +        dominfo.store_channel.close()
   25.31 +        dominfo.db['store_channel'].delete()
   25.32 +        dominfo.db.saveDB(save=True)
   25.33 +        dominfo.store_channel = None
   25.34      xd.domain_destroy(dominfo.id)
   25.35      return None
   25.36  
   25.37 @@ -107,8 +120,13 @@ def restore(xd, fd):
   25.38          raise XendError(
   25.39              "not a valid guest state file: pfn count out of range")
   25.40  
   25.41 +    if dominfo.store_channel:
   25.42 +        evtchn = dominfo.store_channel.port2
   25.43 +    else:
   25.44 +        evtchn = 0
   25.45 +
   25.46      cmd = [PATH_XC_RESTORE, str(xc.handle()), str(fd),
   25.47 -           str(dominfo.id), str(nr_pfns)]
   25.48 +           str(dominfo.id), str(nr_pfns), str(evtchn)]
   25.49      log.info("[xc_restore] " + join(cmd))
   25.50      child = xPopen3(cmd, True, -1, [fd, xc.handle()])
   25.51      child.tochild.close()
   25.52 @@ -128,7 +146,21 @@ def restore(xd, fd):
   25.53                  lasterr = l.rstrip()
   25.54              if fd == child.fromchild.fileno():
   25.55                  l = child.fromchild.readline()
   25.56 -                log.info(l.rstrip())
   25.57 +                while l:
   25.58 +                    m = re.match(r"^(store-mfn) (\d+)\n$", l)
   25.59 +                    if m:
   25.60 +                        if dominfo.store_channel:
   25.61 +                            dominfo.store_mfn = int(m.group(2))
   25.62 +                            if dominfo.store_mfn >= 0:
   25.63 +                                dominfo.db.introduceDomain(dominfo.id,
   25.64 +                                                           dominfo.store_mfn,
   25.65 +                                                           dominfo.store_channel)
   25.66 +                            dominfo.exportToDB(save=True, sync=True)
   25.67 +                    log.info(l.rstrip())
   25.68 +                    try:
   25.69 +                        l = child.fromchild.readline()
   25.70 +                    except:
   25.71 +                        l = None
   25.72          if filter(lambda (fd, event): event & select.POLLHUP, r):
   25.73              break
   25.74  
    26.1 --- a/tools/xcutils/xc_restore.c	Tue Aug 02 15:38:45 2005 -0700
    26.2 +++ b/tools/xcutils/xc_restore.c	Wed Aug 03 09:22:03 2005 +0000
    26.3 @@ -16,15 +16,23 @@
    26.4  int
    26.5  main(int argc, char **argv)
    26.6  {
    26.7 -    unsigned int xc_fd, io_fd, domid, nr_pfns;
    26.8 +    unsigned int xc_fd, io_fd, domid, nr_pfns, evtchn;
    26.9 +    int ret;
   26.10 +    unsigned long mfn;
   26.11  
   26.12 -    if (argc != 5)
   26.13 -	errx(1, "usage: %s xcfd iofd domid nr_pfns", argv[0]);
   26.14 +    if (argc != 6)
   26.15 +	errx(1, "usage: %s xcfd iofd domid nr_pfns evtchn", argv[0]);
   26.16  
   26.17      xc_fd = atoi(argv[1]);
   26.18      io_fd = atoi(argv[2]);
   26.19      domid = atoi(argv[3]);
   26.20      nr_pfns = atoi(argv[4]);
   26.21 +    evtchn = atoi(argv[5]);
   26.22  
   26.23 -    return xc_linux_restore(xc_fd, io_fd, domid, nr_pfns);
   26.24 +    ret = xc_linux_restore(xc_fd, io_fd, domid, nr_pfns, evtchn, &mfn);
   26.25 +    if (ret == 0) {
   26.26 +	printf("store-mfn %li\n", mfn);
   26.27 +	fflush(stdout);
   26.28 +    }
   26.29 +    return ret;
   26.30  }
    27.1 --- a/tools/xenstore/testsuite/07watch.sh	Tue Aug 02 15:38:45 2005 -0700
    27.2 +++ b/tools/xenstore/testsuite/07watch.sh	Wed Aug 03 09:22:03 2005 +0000
    27.3 @@ -160,3 +160,22 @@ 1 ackwatch token
    27.4  1 waitwatch' | ./xs_test 2>&1`" = "1:/test2/foo:token
    27.5  1:contents2
    27.6  1:waitwatch timeout" ]
    27.7 +
    27.8 +# We can watch something which doesn't exist.
    27.9 +[ "`echo '1 watch /dir/subdir token
   27.10 +2 mkdir /dir/subdir
   27.11 +1 waitwatch' | ./xs_test 2>&1`" = "1:/dir/subdir:token" ]
   27.12 +
   27.13 +# If we don't have permission, we won't see event (rm).
   27.14 +[ "`echo '1 setid 1
   27.15 +1 watch /dir/subdir token
   27.16 +setperm /dir 0 NONE
   27.17 +rm /dir/subdir
   27.18 +1 waitwatch' | ./xs_test 2>&1`" = "1:waitwatch timeout" ]
   27.19 +
   27.20 +# If we don't have permission, we won't see event (create).
   27.21 +[ "`echo '1 setid 1
   27.22 +1 watch /dir/subdir token
   27.23 +mkdir /dir/subdir
   27.24 +write /dir/subdir/entry create contents
   27.25 +1 waitwatch' | ./xs_test 2>&1`" = "1:waitwatch timeout" ]
    28.1 --- a/tools/xenstore/testsuite/test.sh	Tue Aug 02 15:38:45 2005 -0700
    28.2 +++ b/tools/xenstore/testsuite/test.sh	Wed Aug 03 09:22:03 2005 +0000
    28.3 @@ -14,7 +14,10 @@ run_test()
    28.4  	PID=`cat /tmp/pid`
    28.5  	rm /tmp/pid
    28.6      else
    28.7 -	PID=`./xenstored_test --output-pid`
    28.8 +	./xenstored_test --output-pid --trace-file=testsuite/tmp/trace --no-fork > /tmp/pid 2> testsuite/tmp/xenstored_errors &
    28.9 +	while [ ! -s /tmp/pid ]; do sleep 0; done
   28.10 +	PID=`cat /tmp/pid`
   28.11 +	rm /tmp/pid
   28.12      fi
   28.13      if sh -e $2 $1; then
   28.14  	if [ -s testsuite/tmp/vgout ]; then
    29.1 --- a/tools/xenstore/xenstored_core.c	Tue Aug 02 15:38:45 2005 -0700
    29.2 +++ b/tools/xenstore/xenstored_core.c	Wed Aug 03 09:22:03 2005 +0000
    29.3 @@ -504,11 +504,13 @@ void send_error(struct connection *conn,
    29.4  {
    29.5  	unsigned int i;
    29.6  
    29.7 -	for (i = 0; error != xsd_errors[i].errnum; i++)
    29.8 -		if (i == ARRAY_SIZE(xsd_errors) - 1)
    29.9 -			corrupt(conn, "Unknown error %i (%s)", error,
   29.10 -				strerror(error));
   29.11 -
   29.12 +	for (i = 0; error != xsd_errors[i].errnum; i++) {
   29.13 +		if (i == ARRAY_SIZE(xsd_errors) - 1) {
   29.14 +			eprintf("xenstored: error %i untranslatable", error);
   29.15 +			i = 0; 	/* EINVAL */
   29.16 +			break;
   29.17 +		}
   29.18 +	}
   29.19  	send_reply(conn, XS_ERROR, xsd_errors[i].errstring,
   29.20  			  strlen(xsd_errors[i].errstring) + 1);
   29.21  }
   29.22 @@ -705,7 +707,7 @@ static enum xs_perm_type perm_for_id(dom
   29.23  
   29.24  	/* Owners and tools get it all... */
   29.25  	if (!id || perms[0].id == id)
   29.26 -		return XS_PERM_READ|XS_PERM_WRITE|XS_PERM_CREATE|XS_PERM_OWNER;
   29.27 +		return XS_PERM_READ|XS_PERM_WRITE|XS_PERM_OWNER;
   29.28  
   29.29  	for (i = 1; i < num; i++)
   29.30  		if (perms[i].id == id)
   29.31 @@ -714,20 +716,13 @@ static enum xs_perm_type perm_for_id(dom
   29.32  	return perms[0].perms;
   29.33  }
   29.34  
   29.35 -/* We have a weird permissions system.  You can allow someone into a
   29.36 - * specific node without allowing it in the parents.  If it's going to
   29.37 - * fail, however, we don't want the errno to indicate any information
   29.38 - * about the node. */
   29.39 -static int check_with_parents(struct connection *conn, const char *node,
   29.40 -			      int errnum)
   29.41 +/* What do parents say? */
   29.42 +static enum xs_perm_type ask_parents(struct connection *conn,
   29.43 +				     const char *node)
   29.44  {
   29.45  	struct xs_permissions *perms;
   29.46  	unsigned int num;
   29.47  
   29.48 -	/* We always tell them about memory failures. */
   29.49 -	if (errnum == ENOMEM)
   29.50 -		return errnum;
   29.51 -
   29.52  	do {
   29.53  		node = get_parent(node);
   29.54  		perms = get_perms(conn->transaction, node, &num);
   29.55 @@ -739,10 +734,23 @@ static int check_with_parents(struct con
   29.56  	if (!perms)
   29.57  		corrupt(conn, "No permissions file at root");
   29.58  
   29.59 -	if (!(perm_for_id(conn->id, perms, num) & XS_PERM_READ))
   29.60 -		return EACCES;
   29.61 +	return perm_for_id(conn->id, perms, num);
   29.62 +}
   29.63  
   29.64 -	return errnum;
   29.65 +/* We have a weird permissions system.  You can allow someone into a
   29.66 + * specific node without allowing it in the parents.  If it's going to
   29.67 + * fail, however, we don't want the errno to indicate any information
   29.68 + * about the node. */
   29.69 +static int errno_from_parents(struct connection *conn, const char *node,
   29.70 +			      int errnum)
   29.71 +{
   29.72 +	/* We always tell them about memory failures. */
   29.73 +	if (errnum == ENOMEM)
   29.74 +		return errnum;
   29.75 +
   29.76 +	if (ask_parents(conn, node) & XS_PERM_READ)
   29.77 +		return errnum;
   29.78 +	return EACCES;
   29.79  }
   29.80  
   29.81  char *canonicalize(struct connection *conn, const char *node)
   29.82 @@ -774,24 +782,26 @@ bool check_node_perms(struct connection 
   29.83  	}
   29.84  
   29.85  	perms = get_perms(conn->transaction, node, &num);
   29.86 -	/* No permissions.  If we want to create it and
   29.87 -	 * it doesn't exist, check parent directory. */
   29.88 -	if (!perms && errno == ENOENT && (perm & XS_PERM_CREATE)) {
   29.89 -		char *parent = get_parent(node);
   29.90 -		if (!parent)
   29.91 -			return false;
   29.92  
   29.93 -		perms = get_perms(conn->transaction, parent, &num);
   29.94 -	}
   29.95 -	if (!perms) {
   29.96 -		errno = check_with_parents(conn, node, errno);
   29.97 +	if (perms) {
   29.98 +		if (perm_for_id(conn->id, perms, num) & perm)
   29.99 +			return true;
  29.100 +		errno = EACCES;
  29.101  		return false;
  29.102  	}
  29.103  
  29.104 -	if (perm_for_id(conn->id, perms, num) & perm)
  29.105 -		return true;
  29.106 +	/* If it's OK not to exist, we consult parents. */
  29.107 +	if (errno == ENOENT && (perm & XS_PERM_ENOENT_OK)) {
  29.108 +		if (ask_parents(conn, node) & perm)
  29.109 +			return true;
  29.110 +		/* Parents say they should not know. */
  29.111 +		errno = EACCES;
  29.112 +		return false;
  29.113 +	}
  29.114  
  29.115 -	errno = check_with_parents(conn, node, EACCES);
  29.116 +	/* They might not have permission to even *see* this node, in
  29.117 +	 * which case we return EACCES even if it's ENOENT or EIO. */
  29.118 +	errno = errno_from_parents(conn, node, errno);
  29.119  	return false;
  29.120  }
  29.121  
  29.122 @@ -928,9 +938,9 @@ static void do_write(struct connection *
  29.123  	if (streq(vec[1], XS_WRITE_NONE))
  29.124  		mode = XS_PERM_WRITE;
  29.125  	else if (streq(vec[1], XS_WRITE_CREATE))
  29.126 -		mode = XS_PERM_WRITE|XS_PERM_CREATE;
  29.127 +		mode = XS_PERM_WRITE|XS_PERM_ENOENT_OK;
  29.128  	else if (streq(vec[1], XS_WRITE_CREATE_EXCL))
  29.129 -		mode = XS_PERM_WRITE|XS_PERM_CREATE;
  29.130 +		mode = XS_PERM_WRITE|XS_PERM_ENOENT_OK;
  29.131  	else {
  29.132  		send_error(conn, EINVAL);
  29.133  		return;
  29.134 @@ -949,7 +959,7 @@ static void do_write(struct connection *
  29.135  		}
  29.136  
  29.137  		/* Not going to create it? */
  29.138 -		if (!(mode & XS_PERM_CREATE)) {
  29.139 +		if (streq(vec[1], XS_WRITE_NONE)) {
  29.140  			send_error(conn, ENOENT);
  29.141  			return;
  29.142  		}
  29.143 @@ -983,7 +993,7 @@ static void do_write(struct connection *
  29.144  static void do_mkdir(struct connection *conn, const char *node)
  29.145  {
  29.146  	node = canonicalize(conn, node);
  29.147 -	if (!check_node_perms(conn, node, XS_PERM_WRITE|XS_PERM_CREATE)) {
  29.148 +	if (!check_node_perms(conn, node, XS_PERM_WRITE|XS_PERM_ENOENT_OK)) {
  29.149  		send_error(conn, errno);
  29.150  		return;
  29.151  	}
    30.1 --- a/tools/xenstore/xenstored_watch.c	Tue Aug 02 15:38:45 2005 -0700
    30.2 +++ b/tools/xenstore/xenstored_watch.c	Wed Aug 03 09:22:03 2005 +0000
    30.3 @@ -95,10 +95,19 @@ static int destroy_watch_event(void *_ev
    30.4  	return 0;
    30.5  }
    30.6  
    30.7 -static void add_event(struct watch *watch, const char *node)
    30.8 +static void add_event(struct connection *conn,
    30.9 +		      struct watch *watch, const char *node)
   30.10  {
   30.11  	struct watch_event *event;
   30.12  
   30.13 +	/* Check read permission: no permission, no watch event.
   30.14 +	 * If it doesn't exist, we need permission to read parent.
   30.15 +	 */
   30.16 +	if (!check_node_perms(conn, node, XS_PERM_READ|XS_PERM_ENOENT_OK)) {
   30.17 +		fprintf(stderr, "No permission for %s\n", node);
   30.18 +		return;
   30.19 +	}
   30.20 +
   30.21  	if (watch->relative_path) {
   30.22  		node += strlen(watch->relative_path);
   30.23  		if (*node == '/') /* Could be "" */
   30.24 @@ -132,9 +141,9 @@ void fire_watches(struct connection *con
   30.25  
   30.26  		list_for_each_entry(watch, &i->watches, list) {
   30.27  			if (is_child(node, watch->node))
   30.28 -				add_event(watch, node);
   30.29 +				add_event(i, watch, node);
   30.30  			else if (recurse && is_child(watch->node, node))
   30.31 -				add_event(watch, watch->node);
   30.32 +				add_event(i, watch, watch->node);
   30.33  			else
   30.34  				continue;
   30.35  			/* If connection not doing anything, queue this. */
   30.36 @@ -206,7 +215,7 @@ void do_watch(struct connection *conn, s
   30.37  
   30.38  	relative = !strstarts(vec[0], "/");
   30.39  	vec[0] = canonicalize(conn, vec[0]);
   30.40 -	if (!check_node_perms(conn, vec[0], XS_PERM_READ)) {
   30.41 +	if (!is_valid_nodename(vec[0])) {
   30.42  		send_error(conn, errno);
   30.43  		return;
   30.44  	}
    31.1 --- a/tools/xenstore/xs_lib.h	Tue Aug 02 15:38:45 2005 -0700
    31.2 +++ b/tools/xenstore/xs_lib.h	Wed Aug 03 09:22:03 2005 +0000
    31.3 @@ -30,7 +30,7 @@ enum xs_perm_type {
    31.4  	XS_PERM_READ = 1,
    31.5  	XS_PERM_WRITE = 2,
    31.6  	/* Internal use. */
    31.7 -	XS_PERM_CREATE = 4,
    31.8 +	XS_PERM_ENOENT_OK = 4,
    31.9  	XS_PERM_OWNER = 8,
   31.10  };
   31.11