ia64/xen-unstable

changeset 5946:1efe6f4163ee

Merge with latest xen-unstable
author djm@kirby.fc.hp.com
date Mon Aug 01 12:19:36 2005 -0700 (2005-08-01)
parents 24dd9a53dd95 0db6a59abb95
children 6e20607ca839
files .hgignore 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/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/xenU_defconfig_x86_32 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/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/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/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-xen/asm-i386/hypercall.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/io.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 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_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/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_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/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/vmmu.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/policy_ops.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/event.h xen/include/asm-ia64/regionreg.h xen/include/asm-ia64/vcpu.h xen/include/asm-ia64/vmx.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
     9.1 --- a/linux-2.4-xen-sparse/arch/xen/Makefile	Mon Aug 01 12:11:00 2005 -0700
     9.2 +++ b/linux-2.4-xen-sparse/arch/xen/Makefile	Mon Aug 01 12:19:36 2005 -0700
     9.3 @@ -61,7 +61,7 @@ SUBDIRS += arch/xen/drivers/console
     9.4  SUBDIRS += arch/xen/drivers/evtchn
     9.5  SUBDIRS += arch/xen/drivers/blkif
     9.6  SUBDIRS += arch/xen/drivers/netif
     9.7 -SUBDIRS += arch/xen/drivers/usbif
     9.8 +#SUBDIRS += arch/xen/drivers/usbif
     9.9  SUBDIRS += arch/xen/drivers/balloon
    9.10  ifdef CONFIG_XEN_PRIVILEGED_GUEST
    9.11  SUBDIRS += arch/xen/drivers/dom0 
    10.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/time.c	Mon Aug 01 12:11:00 2005 -0700
    10.2 +++ b/linux-2.4-xen-sparse/arch/xen/kernel/time.c	Mon Aug 01 12:19:36 2005 -0700
    10.3 @@ -225,22 +225,31 @@ static int set_rtc_mmss(unsigned long no
    10.4   */
    10.5  static void __get_time_values_from_xen(void)
    10.6  {
    10.7 -    do {
    10.8 -        shadow_time_version = HYPERVISOR_shared_info->time_version2;
    10.9 -        rmb();
   10.10 -        shadow_tv.tv_sec    = HYPERVISOR_shared_info->wc_sec;
   10.11 -        shadow_tv.tv_usec   = HYPERVISOR_shared_info->wc_usec;
   10.12 -        shadow_tsc_stamp    = 
   10.13 -            (u32)(HYPERVISOR_shared_info->tsc_timestamp >> rdtsc_bitshift);
   10.14 -        shadow_system_time  = HYPERVISOR_shared_info->system_time;
   10.15 -        rmb();
   10.16 -    }
   10.17 -    while ( shadow_time_version != HYPERVISOR_shared_info->time_version1 );
   10.18 +	shared_info_t           *s = HYPERVISOR_shared_info;
   10.19 +	struct vcpu_time_info   *src;
   10.20 +	struct shadow_time_info *dst;
   10.21 +
   10.22 +	src = &s->vcpu_time[smp_processor_id()];
   10.23 +	dst = &per_cpu(shadow_time, smp_processor_id());
   10.24 +
   10.25 +	do {
   10.26 +		dst->version = src->time_version2;
   10.27 +		rmb();
   10.28 +		dst->tsc_timestamp     = src->tsc_timestamp;
   10.29 +		dst->system_timestamp  = src->system_time;
   10.30 +		dst->tsc_to_nsec_mul   = src->tsc_to_system_mul;
   10.31 +		dst->tsc_shift         = src->tsc_shift;
   10.32 +		rmb();
   10.33 +	}
   10.34 +	while (dst->version != src->time_version1);
   10.35 +
   10.36 +	dst->tsc_to_usec_mul = dst->tsc_to_nsec_mul / 1000;
   10.37 +
   10.38 +	if ((shadow_tv.tv_sec != s->wc_sec) ||
   10.39 +	    (shadow_tv.tv_usec != s->wc_usec))
   10.40 +		update_wallclock();
   10.41  }
   10.42  
   10.43 -#define TIME_VALUES_UP_TO_DATE \
   10.44 - ({ rmb(); (shadow_time_version == HYPERVISOR_shared_info->time_version2); })
   10.45 -
   10.46  
   10.47  /*
   10.48   * Returns the system time elapsed, in ns, since the current shadow_timestamp
   10.49 @@ -263,6 +272,17 @@ static inline unsigned long __get_time_d
   10.50      return (unsigned long)delta;
   10.51  }
   10.52  
   10.53 +static inline int time_values_up_to_date()
   10.54 +{
   10.55 +	struct vcpu_time_info   *src;
   10.56 +	struct shadow_time_info *dst;
   10.57 +
   10.58 +	src = &HYPERVISOR_shared_info->vcpu_time[smp_processor_id()];
   10.59 +	dst = &per_cpu(shadow_time, smp_processor_id());
   10.60 +
   10.61 +	return (dst->version == src->time_version2);
   10.62 +}
   10.63 +
   10.64  
   10.65  /*
   10.66   * Returns the current time-of-day in UTC timeval format.
   10.67 @@ -286,7 +306,7 @@ void do_gettimeofday(struct timeval *tv)
   10.68      __normalize_time(&_tv.tv_sec, &nsec);
   10.69      _tv.tv_usec += (long)nsec / 1000L;
   10.70  
   10.71 -    if ( unlikely(!TIME_VALUES_UP_TO_DATE) )
   10.72 +    if ( unlikely(!time_values_up_to_date()) )
   10.73      {
   10.74          /*
   10.75           * We may have blocked for a long time, rendering our calculations
    34.1 --- a/linux-2.4-xen-sparse/mkbuildtree	Mon Aug 01 12:11:00 2005 -0700
    34.2 +++ b/linux-2.4-xen-sparse/mkbuildtree	Mon Aug 01 12:19:36 2005 -0700
    34.3 @@ -102,8 +102,8 @@ for i in `find . -type l`; do rm -f $i; 
    34.4  relative_lndir ${RS}
    34.5  rm -f mkbuildtree
    34.6  
    34.7 -set ${RS}/../linux-2.6.*-xen-sparse
    34.8 -[ "$1" == "${RS}/../linux-2.6.*-xen-parse" ] && { echo "no Linux 2.6 sparse tree at ${RS}/../linux-2.6.*-xen-sparse"; exit 1; }
    34.9 +set ${RS}/../linux-2.6-xen-sparse
   34.10 +[ "$1" == "${RS}/../linux-2.6-xen-parse" ] && { echo "no Linux 2.6 sparse tree at ${RS}/../linux-2.6-xen-sparse"; exit 1; }
   34.11  LINUX_26="$1"
   34.12  
   34.13  
    36.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32	Mon Aug 01 12:11:00 2005 -0700
    36.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32	Mon Aug 01 12:19:36 2005 -0700
    36.3 @@ -18,8 +18,8 @@ CONFIG_XEN_BLKDEV_GRANT=y
    36.4  CONFIG_XEN_NETDEV_BACKEND=y
    36.5  CONFIG_XEN_BLKDEV_FRONTEND=y
    36.6  CONFIG_XEN_NETDEV_FRONTEND=y
    36.7 -# CONFIG_XEN_NETDEV_GRANT_TX is not set
    36.8 -# CONFIG_XEN_NETDEV_GRANT_RX is not set
    36.9 +CONFIG_XEN_NETDEV_GRANT_TX=y
   36.10 + CONFIG_XEN_NETDEV_GRANT_RX=y
   36.11  # CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set
   36.12  # CONFIG_XEN_BLKDEV_TAP is not set
   36.13  # CONFIG_XEN_SHADOW_MODE is not set
    37.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32	Mon Aug 01 12:11:00 2005 -0700
    37.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32	Mon Aug 01 12:19:36 2005 -0700
    37.3 @@ -15,8 +15,8 @@ CONFIG_NO_IDLE_HZ=y
    37.4  CONFIG_XEN_BLKDEV_GRANT=y
    37.5  CONFIG_XEN_BLKDEV_FRONTEND=y
    37.6  CONFIG_XEN_NETDEV_FRONTEND=y
    37.7 -# CONFIG_XEN_NETDEV_GRANT_TX is not set
    37.8 -# CONFIG_XEN_NETDEV_GRANT_RX is not set
    37.9 +CONFIG_XEN_NETDEV_GRANT_TX=y
   37.10 +CONFIG_XEN_NETDEV_GRANT_RX=y
   37.11  # CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set
   37.12  # CONFIG_XEN_BLKDEV_TAP is not set
   37.13  # CONFIG_XEN_SHADOW_MODE is not set
    44.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c	Mon Aug 01 12:11:00 2005 -0700
    44.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c	Mon Aug 01 12:19:36 2005 -0700
    44.3 @@ -295,15 +295,12 @@ static inline int time_values_up_to_date
    44.4  	struct vcpu_time_info   *src;
    44.5  	struct shadow_time_info *dst;
    44.6  
    44.7 -	src = &HYPERVISOR_shared_info->vcpu_time[smp_processor_id()];
    44.8 -	dst = &per_cpu(shadow_time, smp_processor_id());
    44.9 +	src = &HYPERVISOR_shared_info->vcpu_time[cpu]; 
   44.10 +	dst = &per_cpu(shadow_time, cpu); 
   44.11  
   44.12  	return (dst->version == src->time_version2);
   44.13  }
   44.14  
   44.15 -#define TIME_VALUES_UP_TO_DATE \
   44.16 - ({ rmb(); (shadow_time_version == HYPERVISOR_shared_info->time_version2); })
   44.17 -
   44.18  /*
   44.19   * This is a special lock that is owned by the CPU and holds the index
   44.20   * register we are working with.  It is required for NMI access to the
    45.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/traps.c	Mon Aug 01 12:11:00 2005 -0700
    45.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/traps.c	Mon Aug 01 12:19:36 2005 -0700
    45.3 @@ -90,9 +90,7 @@ asmlinkage void machine_check(void);
    45.4  
    45.5  static int kstack_depth_to_print = 24;
    45.6  struct notifier_block *i386die_chain;
    45.7 -DEFINE_SPINLOCK(die_notifier_lock);
    45.8 -EXPORT_SYMBOL(die_notifier_lock);
    45.9 -EXPORT_SYMBOL(i386die_chain);
   45.10 +static DEFINE_SPINLOCK(die_notifier_lock);
   45.11  
   45.12  int register_die_notifier(struct notifier_block *nb)
   45.13  {
    53.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Mon Aug 01 12:11:00 2005 -0700
    53.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Mon Aug 01 12:19:36 2005 -0700
    53.3 @@ -329,11 +329,11 @@ static int blkif_queue_request(struct re
    53.4                  buffer_ma >> PAGE_SHIFT;
    53.5  
    53.6              ring_req->frame_and_sects[ring_req->nr_segments++] =
    53.7 -                (((u32) ref) << 16) | (fsect << 3) | lsect;
    53.8 +                blkif_fas_from_gref(ref, fsect, lsect);
    53.9  
   53.10  #else
   53.11              ring_req->frame_and_sects[ring_req->nr_segments++] =
   53.12 -                buffer_ma | (fsect << 3) | lsect;
   53.13 +                blkif_fas(buffer_ma, fsect, lsect);
   53.14  #endif
   53.15          }
   53.16      }
   53.17 @@ -832,10 +832,10 @@ static int blkif_queue_request(unsigned 
   53.18                  buffer_ma >> PAGE_SHIFT;
   53.19  
   53.20              req->frame_and_sects[req->nr_segments] =
   53.21 -                (((u32) ref ) << 16) | (fsect << 3) | lsect;
   53.22 +                blkif_fas_from_gref(ref, fsect, lsect);
   53.23  #else
   53.24              req->frame_and_sects[req->nr_segments] =
   53.25 -                buffer_ma | (fsect << 3) | lsect;
   53.26 +                blkif_fas(buffer_ma, fsect, lsect);
   53.27  #endif
   53.28              if ( ++req->nr_segments < BLKIF_MAX_SEGMENTS_PER_REQUEST )
   53.29                  sg_next_sect += nr_sectors;
   53.30 @@ -887,9 +887,9 @@ static int blkif_queue_request(unsigned 
   53.31  
   53.32      blk_shadow[xid].frame[0] = buffer_ma >> PAGE_SHIFT;
   53.33  
   53.34 -    req->frame_and_sects[0] = (((u32) ref)<<16)  | (fsect<<3) | lsect;
   53.35 +    req->frame_and_sects[0] = blkif_fas_from_gref(ref, fsect, lsect);
   53.36  #else
   53.37 -    req->frame_and_sects[0] = buffer_ma | (fsect<<3) | lsect;
   53.38 +    req->frame_and_sects[0] = blkif_fas(buffer_ma, fsect, lsect);
   53.39  #endif
   53.40  
   53.41      /* Keep a private copy so we can reissue requests when recovering. */    
   53.42 @@ -1057,7 +1057,7 @@ void blkif_control_probe_send(blkif_requ
   53.43  
   53.44      gnttab_grant_foreign_access_ref( ref, rdomid, address >> PAGE_SHIFT, 0 );
   53.45  
   53.46 -    req->frame_and_sects[0] = (((u32) ref) << 16) | 7;
   53.47 +    req->frame_and_sects[0] = blkif_fas_from_gref(ref, 0, (PAGE_SIZE/512)-1);
   53.48  
   53.49      blkif_control_send(req, rsp);
   53.50  }
    54.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c	Mon Aug 01 12:11:00 2005 -0700
    54.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c	Mon Aug 01 12:19:36 2005 -0700
    54.3 @@ -137,7 +137,7 @@ static vdisk_t *xlvbd_probe(int *ret)
    54.4      blkif_control_probe_send(&req, &rsp,
    54.5                               (unsigned long)(virt_to_machine(buf)));
    54.6  #else
    54.7 -    req.frame_and_sects[0] = virt_to_machine(buf) | 7;
    54.8 +    req.frame_and_sects[0] = blkif_fas(virt_to_machine(buf), 0, ((PAGE_SIZE/512)-1);
    54.9  
   54.10      blkif_control_send(&req, &rsp);
   54.11  #endif
    68.1 --- a/linux-2.6-xen-sparse/include/asm-xen/hypervisor.h	Mon Aug 01 12:11:00 2005 -0700
    68.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/hypervisor.h	Mon Aug 01 12:19:36 2005 -0700
    68.3 @@ -46,6 +46,8 @@
    68.4  #  else
    68.5  #   include <asm-generic/pgtable-nopmd.h>
    68.6  #  endif
    68.7 +# else
    68.8 +#  define pud_t pgd_t
    68.9  # endif
   68.10  #endif
   68.11  
    75.1 --- a/tools/debugger/pdb/Makefile	Mon Aug 01 12:11:00 2005 -0700
    75.2 +++ b/tools/debugger/pdb/Makefile	Mon Aug 01 12:19:36 2005 -0700
    75.3 @@ -33,7 +33,7 @@ LIBDIRS    += ../libxendebug
    75.4  LIBS       += unix str
    75.5  
    75.6  # bc = byte-code, dc = debug byte-code
    75.7 -all : dc
    75.8 +all : patches dc
    75.9  
   75.10  SOURCES    += pdb_caml_xc.c 
   75.11  SOURCES    += pdb_caml_domain.c pdb_caml_process.c
   75.12 @@ -50,3 +50,6 @@ RESULT      = pdb
   75.13  
   75.14  include $(OCAMLMAKEFILE)
   75.15  
   75.16 +PATCHDIR    = ./linux-2.6-patches
   75.17 +patches :
   75.18 +	make -C $(PATCHDIR) patches
    85.1 --- a/tools/debugger/pdb/linux-2.6-module/module.c	Mon Aug 01 12:11:00 2005 -0700
    85.2 +++ b/tools/debugger/pdb/linux-2.6-module/module.c	Mon Aug 01 12:19:36 2005 -0700
    85.3 @@ -278,14 +278,10 @@ pdb_initialize (void)
    85.4      return err;
    85.5  }
    85.6  
    85.7 -extern struct notifier_block *i386die_chain;
    85.8 -extern spinlock_t die_notifier_lock;
    85.9 -
   85.10  static void __exit
   85.11  pdb_terminate(void)
   85.12  {
   85.13      int err = 0;
   85.14 -    unsigned long flags;
   85.15  
   85.16      printk("pdb cleanup\n");
   85.17  
   85.18 @@ -305,9 +301,8 @@ pdb_terminate(void)
   85.19  
   85.20      pdb_send_connection_status(PDB_CONNECTION_STATUS_DOWN, 0);
   85.21  
   85.22 -	spin_lock_irqsave(&die_notifier_lock, flags);
   85.23 -    err = notifier_chain_unregister(&i386die_chain, &pdb_exceptions_nb);
   85.24 -	spin_unlock_irqrestore(&die_notifier_lock, flags);
   85.25 +    /* handler for int1 & int3 */
   85.26 +    err = unregister_die_notifier(&pdb_exceptions_nb);
   85.27  
   85.28  	return;
   85.29  }
    88.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    88.2 +++ b/tools/debugger/pdb/linux-2.6-patches/Makefile	Mon Aug 01 12:19:36 2005 -0700
    88.3 @@ -0,0 +1,10 @@
    88.4 +XEN_ROOT   = ../../../..
    88.5 +LINUX_DIR  = linux-2.6.12-xenU
    88.6 +KDIR       = $(XEN_ROOT)/$(LINUX_DIR)
    88.7 +PATCH_DIR  = $(CURDIR)
    88.8 +
    88.9 +patches : patches-done
   88.10 +
   88.11 +patches-done :
   88.12 +	( for i in *.patch ; do ( cd $(KDIR) ; patch -p1 < $(PATCH_DIR)/$$i || exit 1 ) ; done )
   88.13 +	touch $@
    89.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    89.2 +++ b/tools/debugger/pdb/linux-2.6-patches/i386_ksyms.patch	Mon Aug 01 12:19:36 2005 -0700
    89.3 @@ -0,0 +1,11 @@
    89.4 +diff -u linux-2.6.12/arch/xen/i386/kernel/i386_ksyms.c linux-2.6.12-pdb/arch/xen/i386/kernel/i386_ksyms.c
    89.5 +--- linux-2.6.12/arch/xen/i386/kernel/i386_ksyms.c	2005-07-31 22:36:50.000000000 +0100
    89.6 ++++ linux-2.6.12-pdb/arch/xen/i386/kernel/i386_ksyms.c	2005-08-01 10:57:31.000000000 +0100
    89.7 +@@ -172,6 +172,7 @@
    89.8 + EXPORT_SYMBOL_GPL(unset_nmi_callback);
    89.9 + 
   89.10 + EXPORT_SYMBOL(register_die_notifier);
   89.11 ++EXPORT_SYMBOL(unregister_die_notifier);
   89.12 + #ifdef CONFIG_HAVE_DEC_LOCK
   89.13 + EXPORT_SYMBOL(_atomic_dec_and_lock);
   89.14 + #endif
    90.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    90.2 +++ b/tools/debugger/pdb/linux-2.6-patches/kdebug.patch	Mon Aug 01 12:19:36 2005 -0700
    90.3 @@ -0,0 +1,11 @@
    90.4 +diff -u linux-2.6.12/include/asm-i386/kdebug.h linux-2.6.12-pdb/include/asm-i386/kdebug.h
    90.5 +--- linux-2.6.12/include/asm-i386/kdebug.h	2005-06-17 20:48:29.000000000 +0100
    90.6 ++++ linux-2.6.12-pdb/include/asm-i386/kdebug.h	2005-08-01 11:11:53.000000000 +0100
    90.7 +@@ -21,6 +21,7 @@
    90.8 +    If you really want to do it first unregister - then synchronize_kernel - then free.
    90.9 +   */
   90.10 + int register_die_notifier(struct notifier_block *nb);
   90.11 ++int unregister_die_notifier(struct notifier_block *nb);
   90.12 + extern struct notifier_block *i386die_chain;
   90.13 + 
   90.14 + 
    91.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    91.2 +++ b/tools/debugger/pdb/linux-2.6-patches/makefile.patch	Mon Aug 01 12:19:36 2005 -0700
    91.3 @@ -0,0 +1,12 @@
    91.4 +diff -Naur linux-2.6.12/Makefile linux-2.6.12-pdb/Makefile
    91.5 +--- linux-2.6.12/Makefile	2005-08-01 01:21:21.000000000 +0100
    91.6 ++++ linux-2.6.12-pdb/Makefile	2005-08-01 10:28:10.000000000 +0100
    91.7 +@@ -508,7 +508,7 @@
    91.8 + ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
    91.9 + CFLAGS		+= -Os
   91.10 + else
   91.11 +-CFLAGS		+= -O2
   91.12 ++CFLAGS		+= -O
   91.13 + endif
   91.14 + 
   91.15 + #Add align options if CONFIG_CC_* is not equal to 0
    92.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    92.2 +++ b/tools/debugger/pdb/linux-2.6-patches/ptrace.patch	Mon Aug 01 12:19:36 2005 -0700
    92.3 @@ -0,0 +1,11 @@
    92.4 +diff -u linux-2.6.12/kernel/ptrace.c linux-2.6.12-pdb/kernel/ptrace.c
    92.5 +--- linux-2.6.12/kernel/ptrace.c       2005-06-17 20:48:29.000000000 +0100
    92.6 ++++ linux-2.6.12-pdb/kernel/ptrace.c   2005-07-22 13:23:16.000000000 +0100
    92.7 +@@ -239,6 +239,7 @@
    92.8 + 
    92.9 +        return buf - old_buf;
   92.10 + }
   92.11 ++EXPORT_SYMBOL(access_process_vm);
   92.12 + 
   92.13 + int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len)
   92.14 + {
    93.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    93.2 +++ b/tools/debugger/pdb/linux-2.6-patches/traps.patch	Mon Aug 01 12:19:36 2005 -0700
    93.3 @@ -0,0 +1,20 @@
    93.4 +diff -u linux-2.6.12/arch/xen/i386/kernel/traps.c linux-2.6.12-pdb/arch/xen/i386/kernel/traps.c
    93.5 +--- linux-2.6.12/arch/xen/i386/kernel/traps.c	2005-07-31 22:47:00.000000000 +0100
    93.6 ++++ linux-2.6.12-pdb/arch/xen/i386/kernel/traps.c	2005-07-31 22:47:32.000000000 +0100
    93.7 +@@ -102,6 +102,16 @@
    93.8 + 	return err;
    93.9 + }
   93.10 + 
   93.11 ++int unregister_die_notifier(struct notifier_block *nb)
   93.12 ++{
   93.13 ++	int err = 0;
   93.14 ++	unsigned long flags;
   93.15 ++	spin_lock_irqsave(&die_notifier_lock, flags);
   93.16 ++	err = notifier_chain_unregister(&i386die_chain, nb);
   93.17 ++	spin_unlock_irqrestore(&die_notifier_lock, flags);
   93.18 ++	return err;
   93.19 ++}
   93.20 ++
   93.21 + static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
   93.22 + {
   93.23 + 	return	p > (void *)tinfo &&
   229.1 --- a/xen/arch/x86/vmx_intercept.c	Mon Aug 01 12:11:00 2005 -0700
   229.2 +++ b/xen/arch/x86/vmx_intercept.c	Mon Aug 01 12:19:36 2005 -0700
   229.3 @@ -197,8 +197,7 @@ int intercept_pit_io(ioreq_t *p)
   229.4  static void pit_timer_fn(void *data)
   229.5  {
   229.6      struct vmx_virpit_t *vpit = data;
   229.7 -    s_time_t   next;
   229.8 -    int        missed_ticks;
   229.9 +    int missed_ticks;
  229.10  
  229.11      missed_ticks = (NOW() - vpit->scheduled) / MILLISECS(vpit->period);
  229.12  
  229.13 @@ -208,12 +207,11 @@ static void pit_timer_fn(void *data)
  229.14  
  229.15      /* pick up missed timer tick */
  229.16      if ( missed_ticks > 0 ) {
  229.17 -        vpit->pending_intr_nr+= missed_ticks;
  229.18 +        vpit->pending_intr_nr += missed_ticks;
  229.19          vpit->scheduled += missed_ticks * MILLISECS(vpit->period);
  229.20      }
  229.21 -    next = vpit->scheduled + MILLISECS(vpit->period);
  229.22 -    set_ac_timer(&vpit->pit_timer, next);
  229.23 -    vpit->scheduled = next;
  229.24 +    vpit->scheduled += MILLISECS(vpit->period);
  229.25 +    set_ac_timer(&vpit->pit_timer, vpit->scheduled);
  229.26  }
  229.27  
  229.28  
   278.1 --- a/xen/include/public/io/blkif.h	Mon Aug 01 12:11:00 2005 -0700
   278.2 +++ b/xen/include/public/io/blkif.h	Mon Aug 01 12:19:36 2005 -0700
   278.3 @@ -36,7 +36,7 @@ typedef struct blkif_request {
   278.4      blkif_vdev_t   device;       /* only for read/write requests         */
   278.5      unsigned long  id;           /* private guest value, echoed in resp  */
   278.6      blkif_sector_t sector_number;/* start sector idx on disk (r/w only)  */
   278.7 -    /* @f_a_s[2:0]=last_sect ; @f_a_s[5:3]=first_sect                        */
   278.8 +    /* @f_a_s[4:0]=last_sect ; @f_a_s[9:5]=first_sect                        */
   278.9  #ifdef CONFIG_XEN_BLKDEV_GRANT
  278.10      /* @f_a_s[:16]= grant reference (16 bits)                                */
  278.11  #else
  278.12 @@ -47,10 +47,12 @@ typedef struct blkif_request {
  278.13      unsigned long  frame_and_sects[BLKIF_MAX_SEGMENTS_PER_REQUEST];
  278.14  } blkif_request_t;
  278.15  
  278.16 -#define blkif_first_sect(_fas) (((_fas)>>3)&7)
  278.17 -#define blkif_last_sect(_fas)  ((_fas)&7)
  278.18 +#define blkif_fas(_addr, _fs, _ls) ((addr)|((_fs)<<5)|(_ls))
  278.19 +#define blkif_first_sect(_fas) (((_fas)>>5)&31)
  278.20 +#define blkif_last_sect(_fas)  ((_fas)&31)
  278.21  
  278.22  #ifdef CONFIG_XEN_BLKDEV_GRANT
  278.23 +#define blkif_fas_from_gref(_gref, _fs, _ls) (((_gref)<<16)|((_fs)<<5)|(_ls))
  278.24  #define blkif_gref_from_fas(_fas) ((_fas)>>16)
  278.25  #endif
  278.26  
   284.1 --- a/xen/include/xen/time.h	Mon Aug 01 12:11:00 2005 -0700
   284.2 +++ b/xen/include/xen/time.h	Mon Aug 01 12:19:36 2005 -0700
   284.3 @@ -51,9 +51,9 @@ typedef s64 s_time_t;
   284.4  s_time_t get_s_time(void);
   284.5  
   284.6  #define NOW()           ((s_time_t)get_s_time())
   284.7 -#define SECONDS(_s)     (((s_time_t)(_s))  * 1000000000ULL )
   284.8 -#define MILLISECS(_ms)  (((s_time_t)(_ms)) * 1000000ULL )
   284.9 -#define MICROSECS(_us)  (((s_time_t)(_us)) * 1000ULL )
  284.10 +#define SECONDS(_s)     ((s_time_t)((_s)  * 1000000000ULL))
  284.11 +#define MILLISECS(_ms)  ((s_time_t)((_ms) * 1000000ULL))
  284.12 +#define MICROSECS(_us)  ((s_time_t)((_us) * 1000ULL))
  284.13  
  284.14  extern void update_dom_time(struct vcpu *v);
  284.15  extern void do_settime(