-diff -Nurp ref-linux-2.6.16.9/arch/i386/boot-xen/Makefile tmp-linux-2.6-xen.patch/arch/i386/boot-xen/Makefile
---- ref-linux-2.6.16.9/arch/i386/boot-xen/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/boot-xen/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,21 @@
-+
-+OBJCOPYFLAGS := -g --strip-unneeded
-+
-+vmlinuz: vmlinux-stripped FORCE
-+ $(call if_changed,gzip)
-+
-+vmlinux-stripped: vmlinux FORCE
-+ $(call if_changed,objcopy)
-+
-+INSTALL_ROOT := $(patsubst %/boot,%,$(INSTALL_PATH))
-+
-+XINSTALL_NAME ?= $(KERNELRELEASE)
-+install:
-+ mkdir -p $(INSTALL_ROOT)/boot
-+ ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
-+ rm -f $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-+ install -m0644 vmlinuz $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-+ install -m0644 vmlinux $(INSTALL_ROOT)/boot/vmlinux-syms-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-+ install -m0664 .config $(INSTALL_ROOT)/boot/config-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-+ install -m0664 System.map $(INSTALL_ROOT)/boot/System.map-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-+ ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
-diff -Nurp ref-linux-2.6.16.9/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/i386/Kconfig
---- ref-linux-2.6.16.9/arch/i386/Kconfig 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/Kconfig 2006-04-10 00:05:52.000000000 +0200
-@@ -58,6 +58,15 @@ config X86_PC
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/Kconfig linux-2.6.16/arch/i386/Kconfig
+--- linux-2.6.16.orig/arch/i386/Kconfig 2006-06-26 09:49:46.000000000 +0200
++++ linux-2.6.16/arch/i386/Kconfig 2006-06-26 09:51:32.000000000 +0200
+@@ -58,6 +58,15 @@
help
Choose this option if your computer is a standard PC or compatible.
config X86_ELAN
bool "AMD Elan"
help
-@@ -159,6 +168,7 @@ source "arch/i386/Kconfig.cpu"
+@@ -159,6 +168,7 @@
config HPET_TIMER
bool "HPET Timer Support"
help
This enables the use of the HPET for the kernel's internal timer.
HPET is the next generation timer replacing legacy 8254s.
-@@ -202,6 +212,19 @@ config SMP
+@@ -202,6 +212,19 @@
If you don't know what to do here, say N.
config NR_CPUS
int "Maximum number of CPUs (2-255)"
range 2 255
-@@ -218,7 +241,7 @@ config NR_CPUS
+@@ -218,7 +241,7 @@
config SCHED_SMT
bool "SMT (Hyperthreading) scheduler support"
default off
help
SMT scheduler support improves the CPU scheduler's decision making
-@@ -230,7 +253,7 @@ source "kernel/Kconfig.preempt"
+@@ -230,7 +253,7 @@
config X86_UP_APIC
bool "Local APIC support on uniprocessors"
help
A local APIC (Advanced Programmable Interrupt Controller) is an
integrated interrupt controller in the CPU. If you have a single-CPU
-@@ -255,12 +278,12 @@ config X86_UP_IOAPIC
+@@ -255,12 +278,12 @@
config X86_LOCAL_APIC
bool
default y
config X86_VISWS_APIC
-@@ -268,9 +291,14 @@ config X86_VISWS_APIC
+@@ -268,9 +291,14 @@
depends on X86_VISWS
default y
---help---
Machine Check Exception support allows the processor to notify the
kernel if it detects a problem (e.g. overheating, component failure).
-@@ -360,6 +388,7 @@ config X86_REBOOTFIXUPS
+@@ -360,6 +388,7 @@
config MICROCODE
tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support"
---help---
If you say Y here and also to "/dev file system support" in the
'File systems' section, you will be able to update the microcode on
-@@ -377,6 +406,7 @@ config MICROCODE
+@@ -377,6 +406,7 @@
config X86_MSR
tristate "/dev/cpu/*/msr - Model-specific register support"
help
This device gives privileged processes access to the x86
Model-Specific Registers (MSRs). It is a character device with
-@@ -392,6 +422,10 @@ config X86_CPUID
+@@ -392,6 +422,10 @@
with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
/dev/cpu/31/cpuid.
source "drivers/firmware/Kconfig"
choice
-@@ -560,7 +594,7 @@ config HAVE_ARCH_EARLY_PFN_TO_NID
+@@ -580,7 +614,7 @@
config HIGHPTE
bool "Allocate 3rd-level pagetables from highmem"
help
The VM uses one page table entry for each page of physical memory.
For systems with a lot of RAM, this can be wasteful of precious
-@@ -569,6 +603,7 @@ config HIGHPTE
+@@ -589,6 +623,7 @@
config MATH_EMULATION
bool "Math emulation"
---help---
Linux can emulate a math coprocessor (used for floating point
operations) if you don't have one. 486DX and Pentium processors have
-@@ -594,6 +629,8 @@ config MATH_EMULATION
+@@ -614,6 +649,8 @@
config MTRR
bool "MTRR (Memory Type Range Register) support"
---help---
On Intel P6 family processors (Pentium Pro, Pentium II and later)
the Memory Type Range Registers (MTRRs) may be used to control
-@@ -628,7 +665,7 @@ config MTRR
+@@ -648,7 +685,7 @@
config EFI
bool "Boot from EFI support (EXPERIMENTAL)"
default n
---help---
This enables the the kernel to boot on EFI platforms using
-@@ -646,7 +683,7 @@ config EFI
+@@ -666,7 +703,7 @@
config IRQBALANCE
bool "Enable kernel irq balancing"
default y
help
The default yes will allow the kernel to do irq load balancing.
-@@ -689,7 +726,7 @@ source kernel/Kconfig.hz
+@@ -709,7 +746,7 @@
config KEXEC
bool "kexec system call (EXPERIMENTAL)"
help
kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel. It is like a reboot
-@@ -743,6 +780,7 @@ config HOTPLUG_CPU
+@@ -763,6 +800,7 @@
config DOUBLEFAULT
default y
bool "Enable doublefault exception handler" if EMBEDDED
help
This option allows trapping of rare doublefault exceptions that
would otherwise cause a system to silently reboot. Disabling this
-@@ -753,18 +791,20 @@ endmenu
+@@ -773,18 +811,20 @@
menu "Power management options (ACPI, APM)"
---help---
APM is a BIOS specification for saving power using several different
techniques. This is mostly useful for battery powered laptops with
-@@ -949,6 +989,7 @@ choice
+@@ -969,6 +1009,7 @@
config PCI_GOBIOS
bool "BIOS"
config PCI_GOMMCONFIG
bool "MMConfig"
-@@ -956,6 +997,13 @@ config PCI_GOMMCONFIG
+@@ -976,6 +1017,13 @@
config PCI_GODIRECT
bool "Direct"
config PCI_GOANY
bool "Any"
-@@ -963,7 +1011,7 @@ endchoice
+@@ -983,7 +1031,7 @@
config PCI_BIOS
bool
default y
config PCI_DIRECT
-@@ -976,6 +1024,18 @@ config PCI_MMCONFIG
+@@ -996,6 +1044,18 @@
depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY)
default y
source "drivers/pci/pcie/Kconfig"
source "drivers/pci/Kconfig"
-@@ -986,7 +1046,7 @@ config ISA_DMA_API
+@@ -1006,7 +1066,7 @@
config ISA
bool "ISA support"
help
Find out whether you have ISA slots on your motherboard. ISA is the
name of a bus system, i.e. the way the CPU talks to the other stuff
-@@ -1013,7 +1073,7 @@ config EISA
+@@ -1033,7 +1093,7 @@
source "drivers/eisa/Kconfig"
config MCA
default y if X86_VOYAGER
help
MicroChannel Architecture is found in some IBM PS/2 machines and
-@@ -1056,7 +1116,9 @@ source "fs/Kconfig"
+@@ -1076,7 +1136,9 @@
menu "Instrumentation Support"
depends on EXPERIMENTAL
config KPROBES
bool "Kprobes (EXPERIMENTAL)"
-@@ -1075,6 +1137,8 @@ source "security/Kconfig"
+@@ -1097,6 +1159,8 @@
source "crypto/Kconfig"
source "lib/Kconfig"
#
-@@ -1100,7 +1164,7 @@ config X86_SMP
+@@ -1122,7 +1186,7 @@
config X86_HT
bool
default y
config X86_BIOS_REBOOT
-@@ -1113,6 +1177,21 @@ config X86_TRAMPOLINE
+@@ -1135,6 +1199,21 @@
depends on X86_SMP || (X86_VOYAGER && SMP)
default y
config KTIME_SCALAR
bool
default y
-diff -Nurp ref-linux-2.6.16.9/arch/i386/Kconfig.cpu tmp-linux-2.6-xen.patch/arch/i386/Kconfig.cpu
---- ref-linux-2.6.16.9/arch/i386/Kconfig.cpu 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/Kconfig.cpu 2006-04-10 00:05:52.000000000 +0200
-@@ -251,7 +251,7 @@ config X86_PPRO_FENCE
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/Kconfig.cpu linux-2.6.16/arch/i386/Kconfig.cpu
+--- linux-2.6.16.orig/arch/i386/Kconfig.cpu 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/Kconfig.cpu 2006-06-26 09:51:32.000000000 +0200
+@@ -251,7 +251,7 @@
config X86_F00F_BUG
bool
default y
config X86_WP_WORKS_OK
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/acpi/boot-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/acpi/boot-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/acpi/boot-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/acpi/boot-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/Makefile linux-2.6.16/arch/i386/Makefile
+--- linux-2.6.16.orig/arch/i386/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -45,6 +45,11 @@
+
+ CFLAGS += $(cflags-y)
+
++cppflags-$(CONFIG_XEN) += \
++ -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION)
++
++CPPFLAGS += $(cppflags-y)
++
+ # Default subarch .c files
+ mcore-y := mach-default
+
+@@ -68,6 +73,10 @@
+ mflags-$(CONFIG_X86_SUMMIT) := -Iinclude/asm-i386/mach-summit
+ mcore-$(CONFIG_X86_SUMMIT) := mach-default
+
++# Xen subarch support
++mflags-$(CONFIG_X86_XEN) := -Iinclude/asm-i386/mach-xen
++mcore-$(CONFIG_X86_XEN) := mach-xen
++
+ # generic subarchitecture
+ mflags-$(CONFIG_X86_GENERICARCH) := -Iinclude/asm-i386/mach-generic
+ mcore-$(CONFIG_X86_GENERICARCH) := mach-default
+@@ -102,6 +111,19 @@
+ .PHONY: zImage bzImage compressed zlilo bzlilo \
+ zdisk bzdisk fdimage fdimage144 fdimage288 install
+
++ifdef CONFIG_XEN
++CPPFLAGS := -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS)
++head-y := arch/i386/kernel/head-xen.o arch/i386/kernel/init_task-xen.o
++boot := arch/i386/boot-xen
++.PHONY: vmlinuz
++all: vmlinuz
++
++vmlinuz: vmlinux
++ $(Q)$(MAKE) $(build)=$(boot) $@
++
++install:
++ $(Q)$(MAKE) $(build)=$(boot) XENGUEST=$(XENGUEST) $@
++else
+ all: bzImage
+
+ # KBUILD_IMAGE specify target image being built
+@@ -124,6 +146,7 @@
+
+ install:
+ $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
++endif
+
+ archclean:
+ $(Q)$(MAKE) $(clean)=arch/i386/boot
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/boot-xen/Makefile linux-2.6.16/arch/i386/boot-xen/Makefile
+--- linux-2.6.16.orig/arch/i386/boot-xen/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/boot-xen/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,21 @@
++
++OBJCOPYFLAGS := -g --strip-unneeded
++
++vmlinuz: vmlinux-stripped FORCE
++ $(call if_changed,gzip)
++
++vmlinux-stripped: vmlinux FORCE
++ $(call if_changed,objcopy)
++
++INSTALL_ROOT := $(patsubst %/boot,%,$(INSTALL_PATH))
++
++XINSTALL_NAME ?= $(KERNELRELEASE)
++install:
++ mkdir -p $(INSTALL_ROOT)/boot
++ ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
++ rm -f $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
++ install -m0644 vmlinuz $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
++ install -m0644 vmlinux $(INSTALL_ROOT)/boot/vmlinux-syms-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
++ install -m0664 .config $(INSTALL_ROOT)/boot/config-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
++ install -m0664 System.map $(INSTALL_ROOT)/boot/System.map-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
++ ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/Makefile linux-2.6.16/arch/i386/kernel/Makefile
+--- linux-2.6.16.orig/arch/i386/kernel/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -37,17 +37,26 @@
+ obj-$(CONFIG_DOUBLEFAULT) += doublefault.o
+ obj-$(CONFIG_VM86) += vm86.o
+ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
++obj-$(CONFIG_SMP_ALTERNATIVES) += smpalts.o
+
+ EXTRA_AFLAGS := -traditional
+
+ obj-$(CONFIG_SCx200) += scx200.o
+
++ifdef CONFIG_XEN
++vsyscall_note := vsyscall-note-xen.o
++else
++vsyscall_note := vsyscall-note.o
++endif
++
++VSYSCALL_TYPES-y := int80
++VSYSCALL_TYPES-$(CONFIG_X86_SYSENTER) += sysenter
+ # vsyscall.o contains the vsyscall DSO images as __initdata.
+ # We must build both images before we can assemble it.
+ # Note: kbuild does not track this dependency due to usage of .incbin
+-$(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so
+-targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so)
+-targets += vsyscall-note.o vsyscall.lds
++$(obj)/vsyscall.o: $(foreach F,$(VSYSCALL_TYPES-y),$(obj)/vsyscall-$F.so)
++targets += $(foreach F,$(VSYSCALL_TYPES-y),vsyscall-$F.o vsyscall-$F.so)
++targets += $(vsyscall_note) vsyscall.lds
+
+ # The DSO images are built using a special linker script.
+ quiet_cmd_syscall = SYSCALL $@
+@@ -62,7 +71,7 @@
+
+ $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so: \
+ $(obj)/vsyscall-%.so: $(src)/vsyscall.lds \
+- $(obj)/vsyscall-%.o $(obj)/vsyscall-note.o FORCE
++ $(obj)/vsyscall-%.o $(obj)/$(vsyscall_note) FORCE
+ $(call if_changed,syscall)
+
+ # We also create a special relocatable object that should mirror the symbol
+@@ -74,5 +83,18 @@
+
+ SYSCFLAGS_vsyscall-syms.o = -r
+ $(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \
+- $(obj)/vsyscall-sysenter.o $(obj)/vsyscall-note.o FORCE
++ $(foreach F,$(VSYSCALL_TYPES-y),$(obj)/vsyscall-$F.o) \
++ $(obj)/$(vsyscall_note) FORCE
+ $(call if_changed,syscall)
++
++ifdef CONFIG_XEN
++include $(srctree)/scripts/Makefile.xen
++
++obj-y += fixup.o
++microcode-$(subst m,y,$(CONFIG_MICROCODE)) := microcode-xen.o
++n-obj-xen := i8259.o timers/ reboot.o smpboot.o trampoline.o
++
++obj-y := $(call filterxen, $(obj-y), $(n-obj-xen))
++obj-y := $(call cherrypickxen, $(obj-y))
++extra-y := $(call cherrypickxen, $(extra-y))
++endif
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/acpi/Makefile linux-2.6.16/arch/i386/kernel/acpi/Makefile
+--- linux-2.6.16.orig/arch/i386/kernel/acpi/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/acpi/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -6,3 +6,7 @@
+ obj-y += cstate.o processor.o
+ endif
+
++ifdef CONFIG_XEN
++include $(srctree)/scripts/Makefile.xen
++obj-y := $(call cherrypickxen, $(obj-y), $(src))
++endif
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/acpi/boot-xen.c linux-2.6.16/arch/i386/kernel/acpi/boot-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/acpi/boot-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/acpi/boot-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1161 @@
+/*
+ * boot.c - Architecture-Specific Low-Level ACPI Boot Support
+
+ return 0;
+}
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/acpi/Makefile tmp-linux-2.6-xen.patch/arch/i386/kernel/acpi/Makefile
---- ref-linux-2.6.16.9/arch/i386/kernel/acpi/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/acpi/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -6,3 +6,7 @@ ifneq ($(CONFIG_ACPI_PROCESSOR),)
- obj-y += cstate.o processor.o
- endif
-
-+ifdef CONFIG_XEN
-+include $(srctree)/scripts/Makefile.xen
-+obj-y := $(call cherrypickxen, $(obj-y), $(src))
-+endif
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/apic-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/apic-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/apic-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/apic-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/apic-xen.c linux-2.6.16/arch/i386/kernel/apic-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/apic-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/apic-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,140 @@
+/*
+ * Local APIC handling, local APIC timers
+
+ return 0;
+}
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/asm-offsets.c tmp-linux-2.6-xen.patch/arch/i386/kernel/asm-offsets.c
---- ref-linux-2.6.16.9/arch/i386/kernel/asm-offsets.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/asm-offsets.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/asm-offsets.c linux-2.6.16/arch/i386/kernel/asm-offsets.c
+--- linux-2.6.16.orig/arch/i386/kernel/asm-offsets.c 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/asm-offsets.c 2006-06-26 09:51:32.000000000 +0200
@@ -13,6 +13,7 @@
#include <asm/fixmap.h>
#include <asm/processor.h>
#define DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
-@@ -63,10 +64,12 @@ void foo(void)
+@@ -63,10 +64,12 @@
OFFSET(pbe_orig_address, pbe, orig_address);
OFFSET(pbe_next, pbe, next);
- DEFINE(VSYSCALL_BASE, __fix_to_virt(FIX_VSYSCALL));
+ DEFINE(VSYSCALL_BASE, VSYSCALL_BASE);
}
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/cpu/common-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/common-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/cpu/common-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/common-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/cpu/Makefile linux-2.6.16/arch/i386/kernel/cpu/Makefile
+--- linux-2.6.16.orig/arch/i386/kernel/cpu/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/cpu/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -17,3 +17,8 @@
+
+ obj-$(CONFIG_MTRR) += mtrr/
+ obj-$(CONFIG_CPU_FREQ) += cpufreq/
++
++ifdef CONFIG_XEN
++include $(srctree)/scripts/Makefile.xen
++obj-y := $(call cherrypickxen, $(obj-y), $(src))
++endif
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/cpu/common-xen.c linux-2.6.16/arch/i386/kernel/cpu/common-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/cpu/common-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/cpu/common-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,715 @@
+#include <linux/init.h>
+#include <linux/string.h>
+ per_cpu(cpu_tlbstate, cpu).active_mm = &init_mm;
+}
+#endif
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/cpu/Makefile tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/Makefile
---- ref-linux-2.6.16.9/arch/i386/kernel/cpu/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -17,3 +17,8 @@ obj-$(CONFIG_X86_MCE) += mcheck/
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/cpu/mtrr/Makefile linux-2.6.16/arch/i386/kernel/cpu/mtrr/Makefile
+--- linux-2.6.16.orig/arch/i386/kernel/cpu/mtrr/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/cpu/mtrr/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -3,3 +3,10 @@
+ obj-y += cyrix.o
+ obj-y += centaur.o
- obj-$(CONFIG_MTRR) += mtrr/
- obj-$(CONFIG_CPU_FREQ) += cpufreq/
-+
+ifdef CONFIG_XEN
+include $(srctree)/scripts/Makefile.xen
-+obj-y := $(call cherrypickxen, $(obj-y), $(src))
++n-obj-xen := generic.o state.o amd.o cyrix.o centaur.o
++
++obj-y := $(call filterxen, $(obj-y), $(n-obj-xen))
++obj-y := $(call cherrypickxen, $(obj-y))
+endif
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/cpu/mtrr/main-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/mtrr/main-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/cpu/mtrr/main-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/mtrr/main-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/cpu/mtrr/main-xen.c linux-2.6.16/arch/i386/kernel/cpu/mtrr/main-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/cpu/mtrr/main-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/cpu/mtrr/main-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,196 @@
+#include <linux/init.h>
+#include <linux/proc_fs.h>
+}
+
+subsys_initcall(mtrr_init);
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/cpu/mtrr/Makefile tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/mtrr/Makefile
---- ref-linux-2.6.16.9/arch/i386/kernel/cpu/mtrr/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/mtrr/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -3,3 +3,10 @@ obj-y += amd.o
- obj-y += cyrix.o
- obj-y += centaur.o
-
-+ifdef CONFIG_XEN
-+include $(srctree)/scripts/Makefile.xen
-+n-obj-xen := generic.o state.o amd.o cyrix.o centaur.o
-+
-+obj-y := $(call filterxen, $(obj-y), $(n-obj-xen))
-+obj-y := $(call cherrypickxen, $(obj-y))
-+endif
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/early_printk-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/early_printk-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/early_printk-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/early_printk-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/early_printk-xen.c linux-2.6.16/arch/i386/kernel/early_printk-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/early_printk-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/early_printk-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,2 @@
+
+#include "../../x86_64/kernel/early_printk-xen.c"
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/entry-xen.S tmp-linux-2.6-xen.patch/arch/i386/kernel/entry-xen.S
---- ref-linux-2.6.16.9/arch/i386/kernel/entry-xen.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/entry-xen.S 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/entry-xen.S linux-2.6.16/arch/i386/kernel/entry-xen.S
+--- linux-2.6.16.orig/arch/i386/kernel/entry-xen.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/entry-xen.S 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,876 @@
+/*
+ * linux/arch/i386/entry.S
+#include "syscall_table.S"
+
+syscall_table_size=(.-sys_call_table)
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/fixup.c tmp-linux-2.6-xen.patch/arch/i386/kernel/fixup.c
---- ref-linux-2.6.16.9/arch/i386/kernel/fixup.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/fixup.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/fixup.c linux-2.6.16/arch/i386/kernel/fixup.c
+--- linux-2.6.16.orig/arch/i386/kernel/fixup.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/fixup.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,95 @@
+/******************************************************************************
+ * fixup.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/head-xen.S tmp-linux-2.6-xen.patch/arch/i386/kernel/head-xen.S
---- ref-linux-2.6.16.9/arch/i386/kernel/head-xen.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/head-xen.S 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/head-xen.S linux-2.6.16/arch/i386/kernel/head-xen.S
+--- linux-2.6.16.orig/arch/i386/kernel/head-xen.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/head-xen.S 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,171 @@
+
+
+#endif
+ .ascii ",LOADER=generic"
+ .byte 0
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/init_task-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/init_task-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/init_task-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/init_task-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/init_task-xen.c linux-2.6.16/arch/i386/kernel/init_task-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/init_task-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/init_task-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,51 @@
+#include <linux/mm.h>
+#include <linux/module.h>
+DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_internodealigned_in_smp = INIT_TSS;
+#endif
+
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/io_apic-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/io_apic-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/io_apic-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/io_apic-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/io_apic-xen.c linux-2.6.16/arch/i386/kernel/io_apic-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/io_apic-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/io_apic-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,2747 @@
+/*
+ * Intel IO-APIC support for multi-Pentium hosts.
+}
+
+#endif /* CONFIG_ACPI */
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/ioport-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/ioport-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/ioport-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/ioport-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/ioport-xen.c linux-2.6.16/arch/i386/kernel/ioport-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/ioport-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/ioport-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,122 @@
+/*
+ * linux/arch/i386/kernel/ioport.c
+ set_iopl_mask(t->iopl);
+ return 0;
+}
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/irq-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/irq-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/irq-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/irq-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/irq-xen.c linux-2.6.16/arch/i386/kernel/irq-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/irq-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/irq-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,306 @@
+/*
+ * linux/arch/i386/kernel/irq.c
+}
+#endif
+
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/ldt-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/ldt-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/ldt-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/ldt-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/ldt-xen.c linux-2.6.16/arch/i386/kernel/ldt-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/ldt-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/ldt-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,269 @@
+/*
+ * linux/kernel/ldt.c
+ }
+ return ret;
+}
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/Makefile tmp-linux-2.6-xen.patch/arch/i386/kernel/Makefile
---- ref-linux-2.6.16.9/arch/i386/kernel/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -37,17 +37,26 @@ obj-$(CONFIG_EFI) += efi.o efi_stub.o
- obj-$(CONFIG_DOUBLEFAULT) += doublefault.o
- obj-$(CONFIG_VM86) += vm86.o
- obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-+obj-$(CONFIG_SMP_ALTERNATIVES) += smpalts.o
-
- EXTRA_AFLAGS := -traditional
-
- obj-$(CONFIG_SCx200) += scx200.o
-
-+ifdef CONFIG_XEN
-+vsyscall_note := vsyscall-note-xen.o
-+else
-+vsyscall_note := vsyscall-note.o
-+endif
-+
-+VSYSCALL_TYPES-y := int80
-+VSYSCALL_TYPES-$(CONFIG_X86_SYSENTER) += sysenter
- # vsyscall.o contains the vsyscall DSO images as __initdata.
- # We must build both images before we can assemble it.
- # Note: kbuild does not track this dependency due to usage of .incbin
--$(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so
--targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so)
--targets += vsyscall-note.o vsyscall.lds
-+$(obj)/vsyscall.o: $(foreach F,$(VSYSCALL_TYPES-y),$(obj)/vsyscall-$F.so)
-+targets += $(foreach F,$(VSYSCALL_TYPES-y),vsyscall-$F.o vsyscall-$F.so)
-+targets += $(vsyscall_note) vsyscall.lds
-
- # The DSO images are built using a special linker script.
- quiet_cmd_syscall = SYSCALL $@
-@@ -62,7 +71,7 @@ SYSCFLAGS_vsyscall-int80.so = $(vsyscall
-
- $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so: \
- $(obj)/vsyscall-%.so: $(src)/vsyscall.lds \
-- $(obj)/vsyscall-%.o $(obj)/vsyscall-note.o FORCE
-+ $(obj)/vsyscall-%.o $(obj)/$(vsyscall_note) FORCE
- $(call if_changed,syscall)
-
- # We also create a special relocatable object that should mirror the symbol
-@@ -74,5 +83,18 @@ $(obj)/built-in.o: ld_flags += -R $(obj)
-
- SYSCFLAGS_vsyscall-syms.o = -r
- $(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \
-- $(obj)/vsyscall-sysenter.o $(obj)/vsyscall-note.o FORCE
-+ $(foreach F,$(VSYSCALL_TYPES-y),$(obj)/vsyscall-$F.o) \
-+ $(obj)/$(vsyscall_note) FORCE
- $(call if_changed,syscall)
-+
-+ifdef CONFIG_XEN
-+include $(srctree)/scripts/Makefile.xen
-+
-+obj-y += fixup.o
-+microcode-$(subst m,y,$(CONFIG_MICROCODE)) := microcode-xen.o
-+n-obj-xen := i8259.o timers/ reboot.o smpboot.o trampoline.o
-+
-+obj-y := $(call filterxen, $(obj-y), $(n-obj-xen))
-+obj-y := $(call cherrypickxen, $(obj-y))
-+extra-y := $(call cherrypickxen, $(extra-y))
-+endif
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/microcode-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/microcode-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/microcode-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/microcode-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/microcode-xen.c linux-2.6.16/arch/i386/kernel/microcode-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/microcode-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/microcode-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,165 @@
+/*
+ * Intel CPU Microcode Update Driver for Linux
+module_init(microcode_init)
+module_exit(microcode_exit)
+MODULE_ALIAS_MISCDEV(MICROCODE_MINOR);
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/mpparse-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/mpparse-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/mpparse-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/mpparse-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/mpparse-xen.c linux-2.6.16/arch/i386/kernel/mpparse-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/mpparse-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/mpparse-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1188 @@
+/*
+ * Intel Multiprocessor Specification 1.1 and 1.4
+
+#endif /* CONFIG_X86_IO_APIC */
+#endif /* CONFIG_ACPI */
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/pci-dma-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/pci-dma-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/pci-dma-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/pci-dma-xen.c linux-2.6.16/arch/i386/kernel/pci-dma-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/pci-dma-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/pci-dma-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,344 @@
+/*
+ * Dynamic DMA mapping support.
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/process-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/process-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/process-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/process-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/process-xen.c linux-2.6.16/arch/i386/kernel/process-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/process-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/process-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,833 @@
+/*
+ * linux/arch/i386/kernel/process.c
+ sp -= get_random_int() % 8192;
+ return sp & ~0xf;
+}
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/quirks-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/quirks-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/quirks-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/quirks-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/quirks-xen.c linux-2.6.16/arch/i386/kernel/quirks-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/quirks-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/quirks-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,48 @@
+/*
+ * This file contains work-arounds for x86 and x86_64 platform bugs.
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_intel_irqbalance);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, quirk_intel_irqbalance);
+#endif
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/setup-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/setup-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/setup-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/setup-xen.c linux-2.6.16/arch/i386/kernel/setup-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/setup-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/setup-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1892 @@
+/*
+ * linux/arch/i386/kernel/setup.c
+ * c-basic-offset:8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/smpalts.c tmp-linux-2.6-xen.patch/arch/i386/kernel/smpalts.c
---- ref-linux-2.6.16.9/arch/i386/kernel/smpalts.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/smpalts.c 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,85 @@
-+#include <linux/kernel.h>
-+#include <asm/system.h>
-+#include <asm/smp_alt.h>
-+#include <asm/processor.h>
-+#include <asm/string.h>
-+
-+struct smp_replacement_record {
-+ unsigned char targ_size;
-+ unsigned char smp1_size;
-+ unsigned char smp2_size;
-+ unsigned char up_size;
-+ unsigned char feature;
-+ unsigned char data[0];
-+};
-+
-+struct smp_alternative_record {
-+ void *targ_start;
-+ struct smp_replacement_record *repl;
-+};
-+
-+extern struct smp_alternative_record __start_smp_alternatives_table,
-+ __stop_smp_alternatives_table;
-+extern unsigned long __init_begin, __init_end;
-+
-+void prepare_for_smp(void)
-+{
-+ struct smp_alternative_record *r;
-+ printk(KERN_INFO "Enabling SMP...\n");
-+ for (r = &__start_smp_alternatives_table;
-+ r != &__stop_smp_alternatives_table;
-+ r++) {
-+ BUG_ON(r->repl->targ_size < r->repl->smp1_size);
-+ BUG_ON(r->repl->targ_size < r->repl->smp2_size);
-+ BUG_ON(r->repl->targ_size < r->repl->up_size);
-+ if (system_state == SYSTEM_RUNNING &&
-+ r->targ_start >= (void *)&__init_begin &&
-+ r->targ_start < (void *)&__init_end)
-+ continue;
-+ if (r->repl->feature != (unsigned char)-1 &&
-+ boot_cpu_has(r->repl->feature)) {
-+ memcpy(r->targ_start,
-+ r->repl->data + r->repl->smp1_size,
-+ r->repl->smp2_size);
-+ memset(r->targ_start + r->repl->smp2_size,
-+ 0x90,
-+ r->repl->targ_size - r->repl->smp2_size);
-+ } else {
-+ memcpy(r->targ_start,
-+ r->repl->data,
-+ r->repl->smp1_size);
-+ memset(r->targ_start + r->repl->smp1_size,
-+ 0x90,
-+ r->repl->targ_size - r->repl->smp1_size);
-+ }
-+ }
-+ /* Paranoia */
-+ asm volatile ("jmp 1f\n1:");
-+ mb();
-+}
-+
-+void unprepare_for_smp(void)
-+{
-+ struct smp_alternative_record *r;
-+ printk(KERN_INFO "Disabling SMP...\n");
-+ for (r = &__start_smp_alternatives_table;
-+ r != &__stop_smp_alternatives_table;
-+ r++) {
-+ BUG_ON(r->repl->targ_size < r->repl->smp1_size);
-+ BUG_ON(r->repl->targ_size < r->repl->smp2_size);
-+ BUG_ON(r->repl->targ_size < r->repl->up_size);
-+ if (system_state == SYSTEM_RUNNING &&
-+ r->targ_start >= (void *)&__init_begin &&
-+ r->targ_start < (void *)&__init_end)
-+ continue;
-+ memcpy(r->targ_start,
-+ r->repl->data + r->repl->smp1_size + r->repl->smp2_size,
-+ r->repl->up_size);
-+ memset(r->targ_start + r->repl->up_size,
-+ 0x90,
-+ r->repl->targ_size - r->repl->up_size);
-+ }
-+ /* Paranoia */
-+ asm volatile ("jmp 1f\n1:");
-+ mb();
-+}
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/smpboot.c tmp-linux-2.6-xen.patch/arch/i386/kernel/smpboot.c
---- ref-linux-2.6.16.9/arch/i386/kernel/smpboot.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/smpboot.c 2006-04-10 00:05:52.000000000 +0200
-@@ -1218,6 +1218,11 @@ static void __init smp_boot_cpus(unsigne
- if (max_cpus <= cpucount+1)
- continue;
-
-+#ifdef CONFIG_SMP_ALTERNATIVES
-+ if (kicked == 1)
-+ prepare_for_smp();
-+#endif
-+
- if (((cpu = alloc_cpu_id()) <= 0) || do_boot_cpu(apicid, cpu))
- printk("CPU #%d not responding - cannot use it.\n",
- apicid);
-@@ -1396,6 +1401,11 @@ int __devinit __cpu_up(unsigned int cpu)
- return -EIO;
- }
-
-+#ifdef CONFIG_SMP_ALTERNATIVES
-+ if (num_online_cpus() == 1)
-+ prepare_for_smp();
-+#endif
-+
- local_irq_enable();
- per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
- /* Unleash the CPU! */
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/smp-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/smp-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/smp-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/smp-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/smp-xen.c linux-2.6.16/arch/i386/kernel/smp-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/smp-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/smp-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,617 @@
+/*
+ * Intel SMP support routines.
+ return IRQ_HANDLED;
+}
+
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/swiotlb.c tmp-linux-2.6-xen.patch/arch/i386/kernel/swiotlb.c
---- ref-linux-2.6.16.9/arch/i386/kernel/swiotlb.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/swiotlb.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/smpalts.c linux-2.6.16/arch/i386/kernel/smpalts.c
+--- linux-2.6.16.orig/arch/i386/kernel/smpalts.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/smpalts.c 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,85 @@
++#include <linux/kernel.h>
++#include <asm/system.h>
++#include <asm/smp_alt.h>
++#include <asm/processor.h>
++#include <asm/string.h>
++
++struct smp_replacement_record {
++ unsigned char targ_size;
++ unsigned char smp1_size;
++ unsigned char smp2_size;
++ unsigned char up_size;
++ unsigned char feature;
++ unsigned char data[0];
++};
++
++struct smp_alternative_record {
++ void *targ_start;
++ struct smp_replacement_record *repl;
++};
++
++extern struct smp_alternative_record __start_smp_alternatives_table,
++ __stop_smp_alternatives_table;
++extern unsigned long __init_begin, __init_end;
++
++void prepare_for_smp(void)
++{
++ struct smp_alternative_record *r;
++ printk(KERN_INFO "Enabling SMP...\n");
++ for (r = &__start_smp_alternatives_table;
++ r != &__stop_smp_alternatives_table;
++ r++) {
++ BUG_ON(r->repl->targ_size < r->repl->smp1_size);
++ BUG_ON(r->repl->targ_size < r->repl->smp2_size);
++ BUG_ON(r->repl->targ_size < r->repl->up_size);
++ if (system_state == SYSTEM_RUNNING &&
++ r->targ_start >= (void *)&__init_begin &&
++ r->targ_start < (void *)&__init_end)
++ continue;
++ if (r->repl->feature != (unsigned char)-1 &&
++ boot_cpu_has(r->repl->feature)) {
++ memcpy(r->targ_start,
++ r->repl->data + r->repl->smp1_size,
++ r->repl->smp2_size);
++ memset(r->targ_start + r->repl->smp2_size,
++ 0x90,
++ r->repl->targ_size - r->repl->smp2_size);
++ } else {
++ memcpy(r->targ_start,
++ r->repl->data,
++ r->repl->smp1_size);
++ memset(r->targ_start + r->repl->smp1_size,
++ 0x90,
++ r->repl->targ_size - r->repl->smp1_size);
++ }
++ }
++ /* Paranoia */
++ asm volatile ("jmp 1f\n1:");
++ mb();
++}
++
++void unprepare_for_smp(void)
++{
++ struct smp_alternative_record *r;
++ printk(KERN_INFO "Disabling SMP...\n");
++ for (r = &__start_smp_alternatives_table;
++ r != &__stop_smp_alternatives_table;
++ r++) {
++ BUG_ON(r->repl->targ_size < r->repl->smp1_size);
++ BUG_ON(r->repl->targ_size < r->repl->smp2_size);
++ BUG_ON(r->repl->targ_size < r->repl->up_size);
++ if (system_state == SYSTEM_RUNNING &&
++ r->targ_start >= (void *)&__init_begin &&
++ r->targ_start < (void *)&__init_end)
++ continue;
++ memcpy(r->targ_start,
++ r->repl->data + r->repl->smp1_size + r->repl->smp2_size,
++ r->repl->up_size);
++ memset(r->targ_start + r->repl->up_size,
++ 0x90,
++ r->repl->targ_size - r->repl->up_size);
++ }
++ /* Paranoia */
++ asm volatile ("jmp 1f\n1:");
++ mb();
++}
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/smpboot.c linux-2.6.16/arch/i386/kernel/smpboot.c
+--- linux-2.6.16.orig/arch/i386/kernel/smpboot.c 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/smpboot.c 2006-06-26 09:51:32.000000000 +0200
+@@ -1218,6 +1218,11 @@
+ if (max_cpus <= cpucount+1)
+ continue;
+
++#ifdef CONFIG_SMP_ALTERNATIVES
++ if (kicked == 1)
++ prepare_for_smp();
++#endif
++
+ if (((cpu = alloc_cpu_id()) <= 0) || do_boot_cpu(apicid, cpu))
+ printk("CPU #%d not responding - cannot use it.\n",
+ apicid);
+@@ -1396,6 +1401,11 @@
+ return -EIO;
+ }
+
++#ifdef CONFIG_SMP_ALTERNATIVES
++ if (num_online_cpus() == 1)
++ prepare_for_smp();
++#endif
++
+ local_irq_enable();
+ per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
+ /* Unleash the CPU! */
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/swiotlb.c linux-2.6.16/arch/i386/kernel/swiotlb.c
+--- linux-2.6.16.orig/arch/i386/kernel/swiotlb.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/swiotlb.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,674 @@
+/*
+ * Dynamic DMA mapping support.
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/sysenter.c tmp-linux-2.6-xen.patch/arch/i386/kernel/sysenter.c
---- ref-linux-2.6.16.9/arch/i386/kernel/sysenter.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/sysenter.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/sysenter.c linux-2.6.16/arch/i386/kernel/sysenter.c
+--- linux-2.6.16.orig/arch/i386/kernel/sysenter.c 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/sysenter.c 2006-06-26 09:51:32.000000000 +0200
@@ -13,6 +13,7 @@
#include <linux/gfp.h>
#include <linux/string.h>
#include <asm/cpufeature.h>
#include <asm/msr.h>
-@@ -23,6 +24,7 @@ extern asmlinkage void sysenter_entry(vo
+@@ -23,6 +24,7 @@
void enable_sep_cpu(void)
{
int cpu = get_cpu();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
-@@ -37,6 +39,7 @@ void enable_sep_cpu(void)
+@@ -37,6 +39,7 @@
wrmsr(MSR_IA32_SYSENTER_ESP, tss->esp1, 0);
wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long) sysenter_entry, 0);
put_cpu();
}
/*
-@@ -45,23 +48,90 @@ void enable_sep_cpu(void)
+@@ -45,23 +48,90 @@
*/
extern const char vsyscall_int80_start, vsyscall_int80_end;
extern const char vsyscall_sysenter_start, vsyscall_sysenter_end;
int __init sysenter_setup(void)
{
- void *page = (void *)get_zeroed_page(GFP_ATOMIC);
+-
+- __set_fixmap(FIX_VSYSCALL, __pa(page), PAGE_READONLY_EXEC);
+ syscall_page = (void *)get_zeroed_page(GFP_ATOMIC);
-- __set_fixmap(FIX_VSYSCALL, __pa(page), PAGE_READONLY_EXEC);
--
- if (!boot_cpu_has(X86_FEATURE_SEP)) {
- memcpy(page,
- &vsyscall_int80_start,
+ memcpy(syscall_page,
+ &vsyscall_int80_start,
+ &vsyscall_int80_end - &vsyscall_int80_start);
-
- return 0;
- }
++
++ return 0;
++}
+
+static struct page*
+syscall_nopage(struct vm_area_struct *vma, unsigned long adr, int *type)
+ .close = syscall_vma_close,
+ .nopage = syscall_nopage,
+};
-+
+
+/* Setup a VMA at program startup for the vsyscall page */
+int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
+{
+
+int in_gate_area_no_task(unsigned long addr)
+{
-+ return 0;
-+}
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/time-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/time-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/time-xen.c 2006-04-10 00:05:52.000000000 +0200
+ return 0;
+ }
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/time-xen.c linux-2.6.16/arch/i386/kernel/time-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/time-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/time-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1097 @@
+/*
+ * linux/arch/i386/kernel/time.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/traps.c tmp-linux-2.6-xen.patch/arch/i386/kernel/traps.c
---- ref-linux-2.6.16.9/arch/i386/kernel/traps.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/traps.c 2006-04-10 00:05:52.000000000 +0200
-@@ -567,18 +567,11 @@ static void mem_parity_error(unsigned ch
-
- static void io_check_error(unsigned char reason, struct pt_regs * regs)
- {
-- unsigned long i;
--
- printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
- show_registers(regs);
-
- /* Re-enable the IOCK line, wait for a few seconds */
-- reason = (reason & 0xf) | 8;
-- outb(reason, 0x61);
-- i = 2000;
-- while (--i) udelay(1000);
-- reason &= ~8;
-- outb(reason, 0x61);
-+ clear_io_check_error(reason);
- }
-
- static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/traps-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/traps-xen.c
---- ref-linux-2.6.16.9/arch/i386/kernel/traps-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/traps-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/traps-xen.c linux-2.6.16/arch/i386/kernel/traps-xen.c
+--- linux-2.6.16.orig/arch/i386/kernel/traps-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/traps-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1094 @@
+/*
+ * linux/arch/i386/traps.c
+ return 0;
+}
+__setup("kstack=", kstack_setup);
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/vm86.c tmp-linux-2.6-xen.patch/arch/i386/kernel/vm86.c
---- ref-linux-2.6.16.9/arch/i386/kernel/vm86.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/vm86.c 2006-04-10 00:05:52.000000000 +0200
-@@ -97,7 +97,9 @@
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/traps.c linux-2.6.16/arch/i386/kernel/traps.c
+--- linux-2.6.16.orig/arch/i386/kernel/traps.c 2006-06-26 09:49:46.000000000 +0200
++++ linux-2.6.16/arch/i386/kernel/traps.c 2006-06-26 09:51:32.000000000 +0200
+@@ -573,18 +573,11 @@
+
+ static void io_check_error(unsigned char reason, struct pt_regs * regs)
+ {
+- unsigned long i;
+-
+ printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
+ show_registers(regs);
+
+ /* Re-enable the IOCK line, wait for a few seconds */
+- reason = (reason & 0xf) | 8;
+- outb(reason, 0x61);
+- i = 2000;
+- while (--i) udelay(1000);
+- reason &= ~8;
+- outb(reason, 0x61);
++ clear_io_check_error(reason);
+ }
+
+ static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/vm86.c linux-2.6.16/arch/i386/kernel/vm86.c
+--- linux-2.6.16.orig/arch/i386/kernel/vm86.c 2006-06-26 09:49:45.000000000 +0200
++++ linux-2.6.16/arch/i386/kernel/vm86.c 2006-06-26 09:53:15.000000000 +0200
+@@ -98,7 +98,9 @@
struct pt_regs * FASTCALL(save_v86_state(struct kernel_vm86_regs * regs));
struct pt_regs * fastcall save_v86_state(struct kernel_vm86_regs * regs)
{
struct pt_regs *ret;
unsigned long tmp;
-@@ -122,7 +124,9 @@ struct pt_regs * fastcall save_v86_state
+@@ -123,7 +125,9 @@
do_exit(SIGSEGV);
}
current->thread.esp0 = current->thread.saved_esp0;
current->thread.sysenter_cs = __KERNEL_CS;
load_esp0(tss, ¤t->thread);
-@@ -251,7 +255,9 @@ out:
+@@ -252,7 +256,9 @@
static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk)
{
+#ifndef CONFIG_X86_NO_TSS
struct tss_struct *tss;
+#endif
+ long eax;
/*
* make sure the vm86() system call doesn't try to do anything silly
- */
-@@ -295,7 +301,9 @@ static void do_sys_vm86(struct kernel_vm
+@@ -297,7 +303,9 @@
savesegment(fs, tsk->thread.saved_fs);
savesegment(gs, tsk->thread.saved_gs);
tsk->thread.esp0 = (unsigned long) &info->VM86_TSS_ESP0;
if (cpu_has_sep)
tsk->thread.sysenter_cs = 0;
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/vmlinux.lds.S tmp-linux-2.6-xen.patch/arch/i386/kernel/vmlinux.lds.S
---- ref-linux-2.6.16.9/arch/i386/kernel/vmlinux.lds.S 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/vmlinux.lds.S 2006-04-10 00:05:52.000000000 +0200
-@@ -34,6 +34,13 @@ SECTIONS
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/vmlinux.lds.S linux-2.6.16/arch/i386/kernel/vmlinux.lds.S
+--- linux-2.6.16.orig/arch/i386/kernel/vmlinux.lds.S 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/vmlinux.lds.S 2006-06-26 09:51:32.000000000 +0200
+@@ -34,6 +34,13 @@
__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) }
__stop___ex_table = .;
RODATA
/* writeable */
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/vsyscall-note-xen.S tmp-linux-2.6-xen.patch/arch/i386/kernel/vsyscall-note-xen.S
---- ref-linux-2.6.16.9/arch/i386/kernel/vsyscall-note-xen.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/vsyscall-note-xen.S 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/vsyscall-note-xen.S linux-2.6.16/arch/i386/kernel/vsyscall-note-xen.S
+--- linux-2.6.16.orig/arch/i386/kernel/vsyscall-note-xen.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/vsyscall-note-xen.S 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,32 @@
+/*
+ * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
+NOTE_KERNELCAP_BEGIN(1, 1)
+NOTE_KERNELCAP(1, "nosegneg") /* Change 1 back to 0 when glibc is fixed! */
+NOTE_KERNELCAP_END
-diff -Nurp ref-linux-2.6.16.9/arch/i386/kernel/vsyscall.S tmp-linux-2.6-xen.patch/arch/i386/kernel/vsyscall.S
---- ref-linux-2.6.16.9/arch/i386/kernel/vsyscall.S 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/vsyscall.S 2006-04-10 00:05:52.000000000 +0200
-@@ -7,9 +7,11 @@ vsyscall_int80_start:
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/kernel/vsyscall.S linux-2.6.16/arch/i386/kernel/vsyscall.S
+--- linux-2.6.16.orig/arch/i386/kernel/vsyscall.S 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/kernel/vsyscall.S 2006-06-26 09:51:32.000000000 +0200
+@@ -7,9 +7,11 @@
.incbin "arch/i386/kernel/vsyscall-int80.so"
vsyscall_int80_end:
+#endif
__FINIT
-diff -Nurp ref-linux-2.6.16.9/arch/i386/mach-xen/Makefile tmp-linux-2.6-xen.patch/arch/i386/mach-xen/Makefile
---- ref-linux-2.6.16.9/arch/i386/mach-xen/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/mach-xen/Makefile 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/mach-xen/Makefile linux-2.6.16/arch/i386/mach-xen/Makefile
+--- linux-2.6.16.orig/arch/i386/mach-xen/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/mach-xen/Makefile 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,5 @@
+#
+# Makefile for the linux kernel.
+#
+
+obj-y := setup.o
-diff -Nurp ref-linux-2.6.16.9/arch/i386/mach-xen/setup.c tmp-linux-2.6-xen.patch/arch/i386/mach-xen/setup.c
---- ref-linux-2.6.16.9/arch/i386/mach-xen/setup.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/mach-xen/setup.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/mach-xen/setup.c linux-2.6.16/arch/i386/mach-xen/setup.c
+--- linux-2.6.16.orig/arch/i386/mach-xen/setup.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/mach-xen/setup.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,37 @@
+/*
+ * Machine specific setup for generic
+}
+
+late_initcall(print_ipi_mode);
-diff -Nurp ref-linux-2.6.16.9/arch/i386/Makefile tmp-linux-2.6-xen.patch/arch/i386/Makefile
---- ref-linux-2.6.16.9/arch/i386/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -45,6 +45,11 @@ CFLAGS += $(shell if [ $(call cc-vers
-
- CFLAGS += $(cflags-y)
-
-+cppflags-$(CONFIG_XEN) += \
-+ -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION)
-+
-+CPPFLAGS += $(cppflags-y)
-+
- # Default subarch .c files
- mcore-y := mach-default
-
-@@ -68,6 +73,10 @@ mcore-$(CONFIG_X86_BIGSMP) := mach-defau
- mflags-$(CONFIG_X86_SUMMIT) := -Iinclude/asm-i386/mach-summit
- mcore-$(CONFIG_X86_SUMMIT) := mach-default
-
-+# Xen subarch support
-+mflags-$(CONFIG_X86_XEN) := -Iinclude/asm-i386/mach-xen
-+mcore-$(CONFIG_X86_XEN) := mach-xen
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/mm/Makefile linux-2.6.16/arch/i386/mm/Makefile
+--- linux-2.6.16.orig/arch/i386/mm/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/mm/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -8,3 +8,11 @@
+ obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
+ obj-$(CONFIG_HIGHMEM) += highmem.o
+ obj-$(CONFIG_BOOT_IOREMAP) += boot_ioremap.o
+
- # generic subarchitecture
- mflags-$(CONFIG_X86_GENERICARCH) := -Iinclude/asm-i386/mach-generic
- mcore-$(CONFIG_X86_GENERICARCH) := mach-default
-@@ -102,6 +111,19 @@ boot := arch/i386/boot
- .PHONY: zImage bzImage compressed zlilo bzlilo \
- zdisk bzdisk fdimage fdimage144 fdimage288 install
-
+ifdef CONFIG_XEN
-+CPPFLAGS := -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS)
-+head-y := arch/i386/kernel/head-xen.o arch/i386/kernel/init_task-xen.o
-+boot := arch/i386/boot-xen
-+.PHONY: vmlinuz
-+all: vmlinuz
++include $(srctree)/scripts/Makefile.xen
+
-+vmlinuz: vmlinux
-+ $(Q)$(MAKE) $(build)=$(boot) $@
++obj-y += hypervisor.o
+
-+install:
-+ $(Q)$(MAKE) $(build)=$(boot) XENGUEST=$(XENGUEST) $@
-+else
- all: bzImage
-
- # KBUILD_IMAGE specify target image being built
-@@ -124,6 +146,7 @@ fdimage fdimage144 fdimage288: vmlinux
-
- install:
- $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
++obj-y := $(call cherrypickxen, $(obj-y))
+endif
-
- archclean:
- $(Q)$(MAKE) $(clean)=arch/i386/boot
-diff -Nurp ref-linux-2.6.16.9/arch/i386/mm/fault-xen.c tmp-linux-2.6-xen.patch/arch/i386/mm/fault-xen.c
---- ref-linux-2.6.16.9/arch/i386/mm/fault-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/fault-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/mm/fault-xen.c linux-2.6.16/arch/i386/mm/fault-xen.c
+--- linux-2.6.16.orig/arch/i386/mm/fault-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/mm/fault-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,617 @@
+/*
+ * linux/arch/i386/mm/fault.c
+ return;
+ }
+}
-diff -Nurp ref-linux-2.6.16.9/arch/i386/mm/highmem-xen.c tmp-linux-2.6-xen.patch/arch/i386/mm/highmem-xen.c
---- ref-linux-2.6.16.9/arch/i386/mm/highmem-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/highmem-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/mm/highmem-xen.c linux-2.6.16/arch/i386/mm/highmem-xen.c
+--- linux-2.6.16.orig/arch/i386/mm/highmem-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/mm/highmem-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,123 @@
+#include <linux/highmem.h>
+#include <linux/module.h>
+EXPORT_SYMBOL(kmap_atomic);
+EXPORT_SYMBOL(kunmap_atomic);
+EXPORT_SYMBOL(kmap_atomic_to_page);
-diff -Nurp ref-linux-2.6.16.9/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.patch/arch/i386/mm/hypervisor.c
---- ref-linux-2.6.16.9/arch/i386/mm/hypervisor.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/hypervisor.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/mm/hypervisor.c linux-2.6.16/arch/i386/mm/hypervisor.c
+--- linux-2.6.16.orig/arch/i386/mm/hypervisor.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/mm/hypervisor.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,424 @@
+/******************************************************************************
+ * mm/hypervisor.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/arch/i386/mm/init-xen.c tmp-linux-2.6-xen.patch/arch/i386/mm/init-xen.c
---- ref-linux-2.6.16.9/arch/i386/mm/init-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/init-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/mm/init-xen.c linux-2.6.16/arch/i386/mm/init-xen.c
+--- linux-2.6.16.orig/arch/i386/mm/init-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/mm/init-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,854 @@
+/*
+ * linux/arch/i386/mm/init.c
+ }
+}
+#endif
-diff -Nurp ref-linux-2.6.16.9/arch/i386/mm/ioremap-xen.c tmp-linux-2.6-xen.patch/arch/i386/mm/ioremap-xen.c
---- ref-linux-2.6.16.9/arch/i386/mm/ioremap-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/ioremap-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/mm/ioremap-xen.c linux-2.6.16/arch/i386/mm/ioremap-xen.c
+--- linux-2.6.16.orig/arch/i386/mm/ioremap-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/mm/ioremap-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,464 @@
+/*
+ * arch/i386/mm/ioremap.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/arch/i386/mm/Makefile tmp-linux-2.6-xen.patch/arch/i386/mm/Makefile
---- ref-linux-2.6.16.9/arch/i386/mm/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -8,3 +8,11 @@ obj-$(CONFIG_NUMA) += discontig.o
- obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
- obj-$(CONFIG_HIGHMEM) += highmem.o
- obj-$(CONFIG_BOOT_IOREMAP) += boot_ioremap.o
-+
-+ifdef CONFIG_XEN
-+include $(srctree)/scripts/Makefile.xen
-+
-+obj-y += hypervisor.o
-+
-+obj-y := $(call cherrypickxen, $(obj-y))
-+endif
-diff -Nurp ref-linux-2.6.16.9/arch/i386/mm/pgtable.c tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable.c
---- ref-linux-2.6.16.9/arch/i386/mm/pgtable.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable.c 2006-04-10 00:05:52.000000000 +0200
-@@ -13,6 +13,7 @@
- #include <linux/slab.h>
- #include <linux/pagemap.h>
- #include <linux/spinlock.h>
-+#include <linux/module.h>
-
- #include <asm/system.h>
- #include <asm/pgtable.h>
-@@ -138,6 +139,10 @@ void set_pmd_pfn(unsigned long vaddr, un
- __flush_tlb_one(vaddr);
- }
-
-+static int nr_fixmaps = 0;
-+unsigned long __FIXADDR_TOP = 0xfffff000;
-+EXPORT_SYMBOL(__FIXADDR_TOP);
-+
- void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
- {
- unsigned long address = __fix_to_virt(idx);
-@@ -147,6 +152,13 @@ void __set_fixmap (enum fixed_addresses
- return;
- }
- set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
-+ nr_fixmaps++;
-+}
-+
-+void set_fixaddr_top(unsigned long top)
-+{
-+ BUG_ON(nr_fixmaps > 0);
-+ __FIXADDR_TOP = top - PAGE_SIZE;
- }
-
- pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
-diff -Nurp ref-linux-2.6.16.9/arch/i386/mm/pgtable-xen.c tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable-xen.c
---- ref-linux-2.6.16.9/arch/i386/mm/pgtable-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/mm/pgtable-xen.c linux-2.6.16/arch/i386/mm/pgtable-xen.c
+--- linux-2.6.16.orig/arch/i386/mm/pgtable-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/mm/pgtable-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,652 @@
+/*
+ * linux/arch/i386/mm/pgtable.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/arch/i386/pci/irq-xen.c tmp-linux-2.6-xen.patch/arch/i386/pci/irq-xen.c
---- ref-linux-2.6.16.9/arch/i386/pci/irq-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/pci/irq-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/mm/pgtable.c linux-2.6.16/arch/i386/mm/pgtable.c
+--- linux-2.6.16.orig/arch/i386/mm/pgtable.c 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/mm/pgtable.c 2006-06-26 09:51:32.000000000 +0200
+@@ -13,6 +13,7 @@
+ #include <linux/slab.h>
+ #include <linux/pagemap.h>
+ #include <linux/spinlock.h>
++#include <linux/module.h>
+
+ #include <asm/system.h>
+ #include <asm/pgtable.h>
+@@ -138,6 +139,10 @@
+ __flush_tlb_one(vaddr);
+ }
+
++static int nr_fixmaps = 0;
++unsigned long __FIXADDR_TOP = 0xfffff000;
++EXPORT_SYMBOL(__FIXADDR_TOP);
++
+ void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
+ {
+ unsigned long address = __fix_to_virt(idx);
+@@ -147,6 +152,13 @@
+ return;
+ }
+ set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
++ nr_fixmaps++;
++}
++
++void set_fixaddr_top(unsigned long top)
++{
++ BUG_ON(nr_fixmaps > 0);
++ __FIXADDR_TOP = top - PAGE_SIZE;
+ }
+
+ pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/pci/Makefile linux-2.6.16/arch/i386/pci/Makefile
+--- linux-2.6.16.orig/arch/i386/pci/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/i386/pci/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -4,6 +4,10 @@
+ obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o
+ obj-$(CONFIG_PCI_DIRECT) += direct.o
+
++# pcifront should be after pcbios.o, mmconfig.o, and direct.o as it should only
++# take over if direct access to the PCI bus is unavailable
++obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += pcifront.o
++
+ pci-y := fixup.o
+ pci-$(CONFIG_ACPI) += acpi.o
+ pci-y += legacy.o irq.o
+@@ -12,3 +16,8 @@
+ pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o
+
+ obj-y += $(pci-y) common.o
++
++ifdef CONFIG_XEN
++include $(srctree)/scripts/Makefile.xen
++obj-y := $(call cherrypickxen, $(obj-y))
++endif
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/pci/irq-xen.c linux-2.6.16/arch/i386/pci/irq-xen.c
+--- linux-2.6.16.orig/arch/i386/pci/irq-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/pci/irq-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1202 @@
+/*
+ * Low-Level PCI Support for PC -- Routing of Interrupts
+
+ return count;
+}
-diff -Nurp ref-linux-2.6.16.9/arch/i386/pci/Makefile tmp-linux-2.6-xen.patch/arch/i386/pci/Makefile
---- ref-linux-2.6.16.9/arch/i386/pci/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/pci/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -4,6 +4,10 @@ obj-$(CONFIG_PCI_BIOS) += pcbios.o
- obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o
- obj-$(CONFIG_PCI_DIRECT) += direct.o
-
-+# pcifront should be after pcbios.o, mmconfig.o, and direct.o as it should only
-+# take over if direct access to the PCI bus is unavailable
-+obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += pcifront.o
-+
- pci-y := fixup.o
- pci-$(CONFIG_ACPI) += acpi.o
- pci-y += legacy.o irq.o
-@@ -12,3 +16,8 @@ pci-$(CONFIG_X86_VISWS) := visws.o fixu
- pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o
-
- obj-y += $(pci-y) common.o
-+
-+ifdef CONFIG_XEN
-+include $(srctree)/scripts/Makefile.xen
-+obj-y := $(call cherrypickxen, $(obj-y))
-+endif
-diff -Nurp ref-linux-2.6.16.9/arch/i386/pci/pcifront.c tmp-linux-2.6-xen.patch/arch/i386/pci/pcifront.c
---- ref-linux-2.6.16.9/arch/i386/pci/pcifront.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/pci/pcifront.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/pci/pcifront.c linux-2.6.16/arch/i386/pci/pcifront.c
+--- linux-2.6.16.orig/arch/i386/pci/pcifront.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/i386/pci/pcifront.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,55 @@
+/*
+ * PCI Frontend Stub - puts some "dummy" functions in to the Linux x86 PCI core
+}
+
+arch_initcall(pcifront_x86_stub_init);
-diff -Nurp ref-linux-2.6.16.9/arch/i386/power/Makefile tmp-linux-2.6-xen.patch/arch/i386/power/Makefile
---- ref-linux-2.6.16.9/arch/i386/power/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/i386/power/Makefile 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/i386/power/Makefile linux-2.6.16/arch/i386/power/Makefile
+--- linux-2.6.16.orig/arch/i386/power/Makefile 2006-06-26 09:49:45.000000000 +0200
++++ linux-2.6.16/arch/i386/power/Makefile 2006-06-26 09:51:32.000000000 +0200
@@ -1,2 +1,4 @@
-obj-$(CONFIG_PM) += cpu.o
+obj-$(CONFIG_PM_LEGACY) += cpu.o
+obj-$(CONFIG_SOFTWARE_SUSPEND) += cpu.o
+obj-$(CONFIG_ACPI_SLEEP) += cpu.o
- obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/hp/sim/Makefile tmp-linux-2.6-xen.patch/arch/ia64/hp/sim/Makefile
---- ref-linux-2.6.16.9/arch/ia64/hp/sim/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/ia64/hp/sim/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -14,3 +14,5 @@ obj-$(CONFIG_HP_SIMETH) += simeth.o
- obj-$(CONFIG_HP_SIMSERIAL) += simserial.o
- obj-$(CONFIG_HP_SIMSERIAL_CONSOLE) += hpsim_console.o
- obj-$(CONFIG_HP_SIMSCSI) += simscsi.o
-+obj-$(CONFIG_XEN) += simserial.o
-+obj-$(CONFIG_XEN) += hpsim_console.o
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/Kconfig tmp-linux-2.6-xen.patch/arch/ia64/Kconfig
---- ref-linux-2.6.16.9/arch/ia64/Kconfig 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/ia64/Kconfig 2006-04-10 00:05:52.000000000 +0200
-@@ -50,6 +50,52 @@ config GENERIC_IOMAP
+ obj-$(CONFIG_SUSPEND_SHARED) += swsusp.o
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/Kconfig linux-2.6.16/arch/ia64/Kconfig
+--- linux-2.6.16.orig/arch/ia64/Kconfig 2006-06-26 09:49:46.000000000 +0200
++++ linux-2.6.16/arch/ia64/Kconfig 2006-06-26 09:51:32.000000000 +0200
+@@ -50,6 +50,52 @@
bool
default y
config SCHED_NO_NO_OMIT_FRAME_POINTER
bool
default y
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/kernel/entry.S tmp-linux-2.6-xen.patch/arch/ia64/kernel/entry.S
---- ref-linux-2.6.16.9/arch/ia64/kernel/entry.S 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/entry.S 2006-04-10 00:05:52.000000000 +0200
-@@ -181,7 +181,7 @@ END(sys_clone)
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/Makefile linux-2.6.16/arch/ia64/Makefile
+--- linux-2.6.16.orig/arch/ia64/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/ia64/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -42,6 +42,12 @@
+ endif
+
+ CFLAGS += $(cflags-y)
++
++cppflags-$(CONFIG_XEN) += \
++ -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION)
++
++CPPFLAGS += $(cppflags-y)
++
+ head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
+
+ libs-y += arch/ia64/lib/
+@@ -52,9 +58,15 @@
+ core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/
+ core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
+ core-$(CONFIG_IA64_SGI_SN2) += arch/ia64/sn/
++core-$(CONFIG_XEN) += arch/ia64/xen/
+
+ drivers-$(CONFIG_PCI) += arch/ia64/pci/
++ifneq ($(CONFIG_XEN),y)
+ drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/
++endif
++ifneq ($(CONFIG_IA64_GENERIC),y)
++drivers-$(CONFIG_XEN) += arch/ia64/hp/sim/
++endif
+ drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
+ drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
+ drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ arch/ia64/sn/
+@@ -68,6 +80,8 @@
+
+ compressed: vmlinux.gz
+
++vmlinuz: vmlinux.gz
++
+ vmlinux.gz: vmlinux
+ $(Q)$(MAKE) $(build)=$(boot) $@
+
+@@ -82,7 +96,7 @@
+ boot: lib/lib.a vmlinux
+ $(Q)$(MAKE) $(build)=$(boot) $@
+
+-install: vmlinux.gz
++install:
+ sh $(srctree)/arch/ia64/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
+
+ define archhelp
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/hp/sim/Makefile linux-2.6.16/arch/ia64/hp/sim/Makefile
+--- linux-2.6.16.orig/arch/ia64/hp/sim/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/ia64/hp/sim/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -14,3 +14,5 @@
+ obj-$(CONFIG_HP_SIMSERIAL) += simserial.o
+ obj-$(CONFIG_HP_SIMSERIAL_CONSOLE) += hpsim_console.o
+ obj-$(CONFIG_HP_SIMSCSI) += simscsi.o
++obj-$(CONFIG_XEN) += simserial.o
++obj-$(CONFIG_XEN) += hpsim_console.o
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/kernel/entry.S linux-2.6.16/arch/ia64/kernel/entry.S
+--- linux-2.6.16.orig/arch/ia64/kernel/entry.S 2006-06-26 09:49:46.000000000 +0200
++++ linux-2.6.16/arch/ia64/kernel/entry.S 2006-06-26 09:51:32.000000000 +0200
+@@ -181,7 +181,7 @@
* called. The code starting at .map relies on this. The rest of the code
* doesn't care about the interrupt masking status.
*/
.prologue
alloc r16=ar.pfs,1,0,0,0
DO_SAVE_SWITCH_STACK
-@@ -235,7 +235,7 @@ GLOBAL_ENTRY(ia64_switch_to)
+@@ -235,7 +235,7 @@
;;
srlz.d
br.cond.sptk .done
/*
* Note that interrupts are enabled during save_switch_stack and load_switch_stack. This
-@@ -376,7 +376,7 @@ END(save_switch_stack)
+@@ -376,7 +376,7 @@
* - b7 holds address to return to
* - must not touch r8-r11
*/
.prologue
.altrp b7
-@@ -511,7 +511,7 @@ END(clone)
+@@ -511,7 +511,7 @@
* because some system calls (such as ia64_execve) directly
* manipulate ar.pfs.
*/
PT_REGS_UNWIND_INFO(0)
/*
* We need to preserve the scratch registers f6-f11 in case the system
-@@ -583,7 +583,7 @@ strace_error:
+@@ -583,7 +583,7 @@
(p6) mov r10=-1
(p6) mov r8=r9
br.cond.sptk .strace_save_retval
/*
* When traced and returning from sigreturn, we invoke syscall_trace but then
-@@ -636,8 +636,11 @@ GLOBAL_ENTRY(ia64_ret_from_syscall)
+@@ -636,8 +636,11 @@
adds r2=PT(R8)+16,sp // r2 = &pt_regs.r8
mov r10=r0 // clear error indication in r10
(p7) br.cond.spnt handle_syscall_error // handle potential syscall failure
/*
* ia64_leave_syscall(): Same as ia64_leave_kernel, except that it doesn't
* need to switch to bank 0 and doesn't restore the scratch registers.
-@@ -682,7 +685,7 @@ END(ia64_ret_from_syscall)
+@@ -682,7 +685,7 @@
* ar.csd: cleared
* ar.ssd: cleared
*/
PT_REGS_UNWIND_INFO(0)
/*
* work.need_resched etc. mustn't get changed by this CPU before it returns to
-@@ -790,7 +793,7 @@ ENTRY(ia64_leave_syscall)
+@@ -790,7 +793,7 @@
mov.m ar.ssd=r0 // M2 clear ar.ssd
mov f11=f0 // F clear f11
br.cond.sptk.many rbs_switch // B
#ifdef CONFIG_IA32_SUPPORT
GLOBAL_ENTRY(ia64_ret_from_ia32_execve)
-@@ -802,10 +805,13 @@ GLOBAL_ENTRY(ia64_ret_from_ia32_execve)
+@@ -802,10 +805,13 @@
st8.spill [r2]=r8 // store return value in slot for r8 and set unat bit
.mem.offset 8,0
st8.spill [r3]=r0 // clear error indication in slot for r10 and set unat bit
PT_REGS_UNWIND_INFO(0)
/*
* work.need_resched etc. mustn't get changed by this CPU before it returns to
-@@ -1150,7 +1156,7 @@ skip_rbs_switch:
+@@ -1150,7 +1156,7 @@
ld8 r10=[r3]
br.cond.sptk.many .work_processed_syscall // re-check
ENTRY(handle_syscall_error)
/*
-@@ -1190,7 +1196,7 @@ END(ia64_invoke_schedule_tail)
+@@ -1190,7 +1196,7 @@
* be set up by the caller. We declare 8 input registers so the system call
* args get preserved, in case we need to restart a system call.
*/
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
alloc loc1=ar.pfs,8,2,3,0 // preserve all eight input regs in case of syscall restart!
mov r9=ar.unat
-@@ -1278,7 +1284,7 @@ ENTRY(sys_rt_sigreturn)
+@@ -1278,7 +1284,7 @@
adds sp=16,sp
;;
ld8 r9=[sp] // load new ar.unat
;;
mov ar.unat=r9
br.many b7
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/kernel/head.S tmp-linux-2.6-xen.patch/arch/ia64/kernel/head.S
---- ref-linux-2.6.16.9/arch/ia64/kernel/head.S 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/head.S 2006-04-10 00:05:52.000000000 +0200
-@@ -363,6 +363,12 @@ start_ap:
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/kernel/head.S linux-2.6.16/arch/ia64/kernel/head.S
+--- linux-2.6.16.orig/arch/ia64/kernel/head.S 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/ia64/kernel/head.S 2006-06-26 09:51:32.000000000 +0200
+@@ -363,6 +363,12 @@
;;
(isBP) st8 [r2]=r28 // save the address of the boot param area passed by the bootloader
#ifdef CONFIG_SMP
(isAP) br.call.sptk.many rp=start_secondary
.ret0:
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/kernel/pal.S tmp-linux-2.6-xen.patch/arch/ia64/kernel/pal.S
---- ref-linux-2.6.16.9/arch/ia64/kernel/pal.S 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/pal.S 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/kernel/pal.S linux-2.6.16/arch/ia64/kernel/pal.S
+--- linux-2.6.16.orig/arch/ia64/kernel/pal.S 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/ia64/kernel/pal.S 2006-06-26 09:51:32.000000000 +0200
@@ -16,6 +16,7 @@
#include <asm/processor.h>
pal_entry_point:
data8 ia64_pal_default_handler
.text
-@@ -53,7 +54,7 @@ END(ia64_pal_default_handler)
+@@ -53,7 +54,7 @@
* in4 1 ==> clear psr.ic, 0 ==> don't clear psr.ic
*
*/
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5)
alloc loc1 = ar.pfs,5,5,0,0
movl loc2 = pal_entry_point
-@@ -90,7 +91,7 @@ GLOBAL_ENTRY(ia64_pal_call_static)
+@@ -90,7 +91,7 @@
;;
srlz.d // seralize restoration of psr.l
br.ret.sptk.many b0
/*
* Make a PAL call using the stacked registers calling convention.
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/kernel/sal.c tmp-linux-2.6-xen.patch/arch/ia64/kernel/sal.c
---- ref-linux-2.6.16.9/arch/ia64/kernel/sal.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/sal.c 2006-04-10 00:05:52.000000000 +0200
-@@ -336,6 +336,9 @@ ia64_sal_init (struct ia64_sal_systab *s
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/kernel/sal.c linux-2.6.16/arch/ia64/kernel/sal.c
+--- linux-2.6.16.orig/arch/ia64/kernel/sal.c 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/ia64/kernel/sal.c 2006-06-26 09:51:32.000000000 +0200
+@@ -336,6 +336,9 @@
p += SAL_DESC_SIZE(*p);
}
check_sal_cache_flush();
}
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/kernel/setup.c tmp-linux-2.6-xen.patch/arch/ia64/kernel/setup.c
---- ref-linux-2.6.16.9/arch/ia64/kernel/setup.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/setup.c 2006-04-10 00:05:52.000000000 +0200
-@@ -61,6 +61,9 @@
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/kernel/setup.c linux-2.6.16/arch/ia64/kernel/setup.c
+--- linux-2.6.16.orig/arch/ia64/kernel/setup.c 2006-06-26 09:49:46.000000000 +0200
++++ linux-2.6.16/arch/ia64/kernel/setup.c 2006-06-26 09:51:32.000000000 +0200
+@@ -62,6 +62,9 @@
#include <asm/system.h>
#include <asm/unistd.h>
#include <asm/system.h>
#if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
# error "struct cpuinfo_ia64 too big!"
-@@ -243,6 +246,14 @@ reserve_memory (void)
+@@ -244,6 +247,14 @@
rsvd_region[n].end = (unsigned long) ia64_imva(_end);
n++;
#ifdef CONFIG_BLK_DEV_INITRD
if (ia64_boot_param->initrd_start) {
rsvd_region[n].start = (unsigned long)__va(ia64_boot_param->initrd_start);
-@@ -260,6 +271,7 @@ reserve_memory (void)
+@@ -261,6 +272,7 @@
n++;
num_rsvd_regions = n;
sort_regions(rsvd_region, num_rsvd_regions);
}
-@@ -333,6 +345,10 @@ early_console_setup (char *cmdline)
+@@ -334,6 +346,10 @@
{
int earlycons = 0;
#ifdef CONFIG_SERIAL_SGI_L1_CONSOLE
{
extern int sn_serial_console_early_setup(void);
-@@ -490,6 +506,22 @@ setup_arch (char **cmdline_p)
+@@ -491,6 +507,22 @@
conswitchp = &vga_con;
# endif
}
#endif
/* enable IA-64 Machine Check Abort Handling unless disabled */
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/Makefile tmp-linux-2.6-xen.patch/arch/ia64/Makefile
---- ref-linux-2.6.16.9/arch/ia64/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/ia64/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -42,6 +42,12 @@ ifeq ($(call cc-version),0304)
- endif
-
- CFLAGS += $(cflags-y)
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/Makefile linux-2.6.16/arch/ia64/xen/Makefile
+--- linux-2.6.16.orig/arch/ia64/xen/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,5 @@
++#
++# Makefile for Xen components
++#
+
-+cppflags-$(CONFIG_XEN) += \
-+ -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION)
++obj-y := hypercall.o xenivt.o xenentry.o xensetup.o xenpal.o xenhpski.o xenconsole.o xen_ksyms.o
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/drivers/Makefile linux-2.6.16/arch/ia64/xen/drivers/Makefile
+--- linux-2.6.16.orig/arch/ia64/xen/drivers/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/drivers/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,20 @@
+
-+CPPFLAGS += $(cppflags-y)
++obj-y += util.o
+
- head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
-
- libs-y += arch/ia64/lib/
-@@ -52,9 +58,15 @@ core-$(CONFIG_IA64_GENERIC) += arch/ia6
- core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/
- core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
- core-$(CONFIG_IA64_SGI_SN2) += arch/ia64/sn/
-+core-$(CONFIG_XEN) += arch/ia64/xen/
-
- drivers-$(CONFIG_PCI) += arch/ia64/pci/
-+ifneq ($(CONFIG_XEN),y)
- drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/
-+endif
-+ifneq ($(CONFIG_IA64_GENERIC),y)
-+drivers-$(CONFIG_XEN) += arch/ia64/hp/sim/
-+endif
- drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
- drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
- drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ arch/ia64/sn/
-@@ -68,6 +80,8 @@ all: compressed unwcheck
-
- compressed: vmlinux.gz
-
-+vmlinuz: vmlinux.gz
++obj-y += core/
++obj-y += console/
++obj-y += evtchn/
++#obj-y += balloon/
++obj-y += privcmd/
++obj-y += blkback/
++#obj-y += netback/
++obj-y += blkfront/
++obj-y += xenbus/
++#obj-y += netfront/
++#obj-$(CONFIG_XEN_PRIVILEGED_GUEST) += privcmd/
++#obj-$(CONFIG_XEN_BLKDEV_BACKEND) += blkback/
++#obj-$(CONFIG_XEN_NETDEV_BACKEND) += netback/
++#obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += blkfront/
++#obj-$(CONFIG_XEN_NETDEV_FRONTEND) += netfront/
++#obj-$(CONFIG_XEN_BLKDEV_TAP) += blktap/
+
- vmlinux.gz: vmlinux
- $(Q)$(MAKE) $(build)=$(boot) $@
-
-@@ -82,7 +96,7 @@ CLEAN_FILES += vmlinux.gz bootloader
- boot: lib/lib.a vmlinux
- $(Q)$(MAKE) $(build)=$(boot) $@
-
--install: vmlinux.gz
-+install:
- sh $(srctree)/arch/ia64/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
-
- define archhelp
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/drivers/coreMakefile tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/coreMakefile
---- ref-linux-2.6.16.9/arch/ia64/xen/drivers/coreMakefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/coreMakefile 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/drivers/README linux-2.6.16/arch/ia64/xen/drivers/README
+--- linux-2.6.16.orig/arch/ia64/xen/drivers/README 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/drivers/README 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,2 @@
++This is a temporary location for source/Makefiles that need to be
++patched/reworked in drivers/xen to work with xenlinux/ia64.
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/drivers/coreMakefile linux-2.6.16/arch/ia64/xen/drivers/coreMakefile
+--- linux-2.6.16.orig/arch/ia64/xen/drivers/coreMakefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/drivers/coreMakefile 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,26 @@
+#
+# Makefile for the linux kernel.
+endif
+obj-$(CONFIG_SYSFS) += hypervisor_sysfs.o
+obj-$(CONFIG_XEN_SYSFS) += xen_sysfs.o
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/drivers/evtchn_ia64.c tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/evtchn_ia64.c
---- ref-linux-2.6.16.9/arch/ia64/xen/drivers/evtchn_ia64.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/evtchn_ia64.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/drivers/evtchn_ia64.c linux-2.6.16/arch/ia64/xen/drivers/evtchn_ia64.c
+--- linux-2.6.16.orig/arch/ia64/xen/drivers/evtchn_ia64.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/drivers/evtchn_ia64.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,273 @@
+/* NOTE: This file split off from evtchn.c because there was
+ some discussion that the mechanism is sufficiently different.
+ spin_lock_init(&irq_mapping_update_lock);
+ memset(evtchns, 0, sizeof(evtchns));
+}
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/drivers/Makefile tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/Makefile
---- ref-linux-2.6.16.9/arch/ia64/xen/drivers/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,20 @@
-+
-+obj-y += util.o
-+
-+obj-y += core/
-+obj-y += console/
-+obj-y += evtchn/
-+#obj-y += balloon/
-+obj-y += privcmd/
-+obj-y += blkback/
-+#obj-y += netback/
-+obj-y += blkfront/
-+obj-y += xenbus/
-+#obj-y += netfront/
-+#obj-$(CONFIG_XEN_PRIVILEGED_GUEST) += privcmd/
-+#obj-$(CONFIG_XEN_BLKDEV_BACKEND) += blkback/
-+#obj-$(CONFIG_XEN_NETDEV_BACKEND) += netback/
-+#obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += blkfront/
-+#obj-$(CONFIG_XEN_NETDEV_FRONTEND) += netfront/
-+#obj-$(CONFIG_XEN_BLKDEV_TAP) += blktap/
-+
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/drivers/patches/blkback.c.patch tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/patches/blkback.c.patch
---- ref-linux-2.6.16.9/arch/ia64/xen/drivers/patches/blkback.c.patch 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/patches/blkback.c.patch 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/drivers/patches/blkback.c.patch linux-2.6.16/arch/ia64/xen/drivers/patches/blkback.c.patch
+--- linux-2.6.16.orig/arch/ia64/xen/drivers/patches/blkback.c.patch 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/drivers/patches/blkback.c.patch 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,57 @@
+diff -Naur xen/blkback/blkback.c xen.patched/blkback/blkback.c
+--- xen/blkback/blkback.c 2005-09-23 10:54:50.000000000 -0600
+
+ pending_cons = 0;
+ pending_prod = MAX_PENDING_REQS;
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/drivers/patches/console.c.patch tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/patches/console.c.patch
---- ref-linux-2.6.16.9/arch/ia64/xen/drivers/patches/console.c.patch 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/patches/console.c.patch 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/drivers/patches/console.c.patch linux-2.6.16/arch/ia64/xen/drivers/patches/console.c.patch
+--- linux-2.6.16.orig/arch/ia64/xen/drivers/patches/console.c.patch 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/drivers/patches/console.c.patch 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,18 @@
+--- xen/console/console.c 2005-11-02 14:13:07.000000000 +0100
++++ xen.patched/console/console.c 2005-11-02 14:21:20.000000000 +0100
+ } else {
+ xencons_ring_register_receiver(xencons_rx);
+ }
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/drivers/patches/devmem.c.patch tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/patches/devmem.c.patch
---- ref-linux-2.6.16.9/arch/ia64/xen/drivers/patches/devmem.c.patch 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/patches/devmem.c.patch 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/drivers/patches/devmem.c.patch linux-2.6.16/arch/ia64/xen/drivers/patches/devmem.c.patch
+--- linux-2.6.16.orig/arch/ia64/xen/drivers/patches/devmem.c.patch 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/drivers/patches/devmem.c.patch 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,3 @@
+diff -Naur xen/core/devmem.c xen.patched/core/devmem.c
+--- xen/core/devmem.c 2005-09-23 10:54:50.000000000 -0600
++++ xen.patched/core/devmem.c 2005-09-23 10:57:51.000000000 -0600
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/drivers/patches/gnttab.c.patch tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/patches/gnttab.c.patch
---- ref-linux-2.6.16.9/arch/ia64/xen/drivers/patches/gnttab.c.patch 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/patches/gnttab.c.patch 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/drivers/patches/gnttab.c.patch linux-2.6.16/arch/ia64/xen/drivers/patches/gnttab.c.patch
+--- linux-2.6.16.orig/arch/ia64/xen/drivers/patches/gnttab.c.patch 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/drivers/patches/gnttab.c.patch 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,46 @@
+diff -Naur xen/core/gnttab.c xen.patched/core/gnttab.c
+--- xen/core/gnttab.c 2005-09-23 10:54:50.000000000 -0600
+
+ for (i = NR_RESERVED_ENTRIES; i < NR_GRANT_ENTRIES; i++)
+ gnttab_list[i] = i + 1;
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/drivers/patches/privcmd.c.patch tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/patches/privcmd.c.patch
---- ref-linux-2.6.16.9/arch/ia64/xen/drivers/patches/privcmd.c.patch 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/patches/privcmd.c.patch 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/drivers/patches/privcmd.c.patch linux-2.6.16/arch/ia64/xen/drivers/patches/privcmd.c.patch
+--- linux-2.6.16.orig/arch/ia64/xen/drivers/patches/privcmd.c.patch 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/drivers/patches/privcmd.c.patch 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,43 @@
+diff -Naur xen/privcmd/privcmd.c xen.patched/privcmd/privcmd.c
+--- xen/privcmd/privcmd.c 2005-09-23 10:54:50.000000000 -0600
+
+ default:
+ ret = -EINVAL;
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/drivers/README tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/README
---- ref-linux-2.6.16.9/arch/ia64/xen/drivers/README 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/README 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,2 @@
-+This is a temporary location for source/Makefiles that need to be
-+patched/reworked in drivers/xen to work with xenlinux/ia64.
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/drivers/xenia64_init.c tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/xenia64_init.c
---- ref-linux-2.6.16.9/arch/ia64/xen/drivers/xenia64_init.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/drivers/xenia64_init.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/drivers/xenia64_init.c linux-2.6.16/arch/ia64/xen/drivers/xenia64_init.c
+--- linux-2.6.16.orig/arch/ia64/xen/drivers/xenia64_init.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/drivers/xenia64_init.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,55 @@
+#ifdef __ia64__
+#include <linux/config.h>
+unsigned long mfn_to_pfn(unsigned long mfn) { return mfn; }
+#endif
+#endif
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/hypercall.S tmp-linux-2.6-xen.patch/arch/ia64/xen/hypercall.S
---- ref-linux-2.6.16.9/arch/ia64/xen/hypercall.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/hypercall.S 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/hypercall.S linux-2.6.16/arch/ia64/xen/hypercall.S
+--- linux-2.6.16.orig/arch/ia64/xen/hypercall.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/hypercall.S 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,365 @@
+/*
+ * Support routines for Xen hypercalls
+ br.ret.sptk.many rp
+END(xen_set_eflag)
+#endif
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/Makefile tmp-linux-2.6-xen.patch/arch/ia64/xen/Makefile
---- ref-linux-2.6.16.9/arch/ia64/xen/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,5 @@
-+#
-+# Makefile for Xen components
-+#
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/xen_ksyms.c linux-2.6.16/arch/ia64/xen/xen_ksyms.c
+--- linux-2.6.16.orig/arch/ia64/xen/xen_ksyms.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/xen_ksyms.c 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,12 @@
++/*
++ * Architecture-specific kernel symbols
++ *
++ * Don't put any exports here unless it's defined in an assembler file.
++ * All other exports should be put directly after the definition.
++ */
+
-+obj-y := hypercall.o xenivt.o xenentry.o xensetup.o xenpal.o xenhpski.o xenconsole.o xen_ksyms.o
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/xenconsole.c tmp-linux-2.6-xen.patch/arch/ia64/xen/xenconsole.c
---- ref-linux-2.6.16.9/arch/ia64/xen/xenconsole.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenconsole.c 2006-04-10 00:05:52.000000000 +0200
++#include <linux/config.h>
++#include <linux/module.h>
++
++extern int is_running_on_xen(void);
++EXPORT_SYMBOL(is_running_on_xen);
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/xenconsole.c linux-2.6.16/arch/ia64/xen/xenconsole.c
+--- linux-2.6.16.orig/arch/ia64/xen/xenconsole.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/xenconsole.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,19 @@
+#include <linux/config.h>
+#include <linux/console.h>
+#endif
+ return -1;
+}
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/xenentry.S tmp-linux-2.6-xen.patch/arch/ia64/xen/xenentry.S
---- ref-linux-2.6.16.9/arch/ia64/xen/xenentry.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenentry.S 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/xenentry.S linux-2.6.16/arch/ia64/xen/xenentry.S
+--- linux-2.6.16.orig/arch/ia64/xen/xenentry.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/xenentry.S 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,850 @@
+/*
+ * ia64/xen/entry.S
+#else
+END(ia64_leave_kernel)
+#endif
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/xenhpski.c tmp-linux-2.6-xen.patch/arch/ia64/xen/xenhpski.c
---- ref-linux-2.6.16.9/arch/ia64/xen/xenhpski.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenhpski.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/xenhpski.c linux-2.6.16/arch/ia64/xen/xenhpski.c
+--- linux-2.6.16.orig/arch/ia64/xen/xenhpski.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/xenhpski.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,19 @@
+
+extern unsigned long xen_get_cpuid(int);
+ return 1;
+}
+
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/xenivt.S tmp-linux-2.6-xen.patch/arch/ia64/xen/xenivt.S
---- ref-linux-2.6.16.9/arch/ia64/xen/xenivt.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenivt.S 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/xenivt.S linux-2.6.16/arch/ia64/xen/xenivt.S
+--- linux-2.6.16.orig/arch/ia64/xen/xenivt.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/xenivt.S 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,2032 @@
+/*
+ * arch/ia64/xen/ivt.S
+END(dispatch_to_ia32_handler)
+
+#endif /* CONFIG_IA32_SUPPORT */
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/xen_ksyms.c tmp-linux-2.6-xen.patch/arch/ia64/xen/xen_ksyms.c
---- ref-linux-2.6.16.9/arch/ia64/xen/xen_ksyms.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xen_ksyms.c 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,12 @@
-+/*
-+ * Architecture-specific kernel symbols
-+ *
-+ * Don't put any exports here unless it's defined in an assembler file.
-+ * All other exports should be put directly after the definition.
-+ */
-+
-+#include <linux/config.h>
-+#include <linux/module.h>
-+
-+extern int is_running_on_xen(void);
-+EXPORT_SYMBOL(is_running_on_xen);
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/xenminstate.h tmp-linux-2.6-xen.patch/arch/ia64/xen/xenminstate.h
---- ref-linux-2.6.16.9/arch/ia64/xen/xenminstate.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenminstate.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/xenminstate.h linux-2.6.16/arch/ia64/xen/xenminstate.h
+--- linux-2.6.16.orig/arch/ia64/xen/xenminstate.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/xenminstate.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,367 @@
+#include <linux/config.h>
+
+#else
+#define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, )
+#endif
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/xenpal.S tmp-linux-2.6-xen.patch/arch/ia64/xen/xenpal.S
---- ref-linux-2.6.16.9/arch/ia64/xen/xenpal.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenpal.S 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/xenpal.S linux-2.6.16/arch/ia64/xen/xenpal.S
+--- linux-2.6.16.orig/arch/ia64/xen/xenpal.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/xenpal.S 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,73 @@
+/*
+ * ia64/xen/xenpal.S
+ srlz.d // seralize restoration of psr.l
+ br.ret.sptk.many b0
+END(xen_pal_call_static)
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen/xensetup.S tmp-linux-2.6-xen.patch/arch/ia64/xen/xensetup.S
---- ref-linux-2.6.16.9/arch/ia64/xen/xensetup.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xensetup.S 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen/xensetup.S linux-2.6.16/arch/ia64/xen/xensetup.S
+--- linux-2.6.16.orig/arch/ia64/xen/xensetup.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen/xensetup.S 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,35 @@
+/*
+ * Support routines for Xen
+ ld4 r8=[r9]
+ br.ret.sptk.many rp;;
+END(is_running_on_xen)
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen-mkbuildtree-post tmp-linux-2.6-xen.patch/arch/ia64/xen-mkbuildtree-post
---- ref-linux-2.6.16.9/arch/ia64/xen-mkbuildtree-post 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen-mkbuildtree-post 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen-mkbuildtree-post linux-2.6.16/arch/ia64/xen-mkbuildtree-post
+--- linux-2.6.16.orig/arch/ia64/xen-mkbuildtree-post 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen-mkbuildtree-post 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,2 @@
+#!/bin/bash
+echo 'NOTHING YET IN ' ${0}
-diff -Nurp ref-linux-2.6.16.9/arch/ia64/xen-mkbuildtree-pre tmp-linux-2.6-xen.patch/arch/ia64/xen-mkbuildtree-pre
---- ref-linux-2.6.16.9/arch/ia64/xen-mkbuildtree-pre 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen-mkbuildtree-pre 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/ia64/xen-mkbuildtree-pre linux-2.6.16/arch/ia64/xen-mkbuildtree-pre
+--- linux-2.6.16.orig/arch/ia64/xen-mkbuildtree-pre 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/ia64/xen-mkbuildtree-pre 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,50 @@
+#!/bin/bash
+# restructure directories to match future drivers/xen plan
+#fi
+#touch ia64.patch.semaphore
+#cd ../..
-diff -Nurp ref-linux-2.6.16.9/arch/um/kernel/physmem.c tmp-linux-2.6-xen.patch/arch/um/kernel/physmem.c
---- ref-linux-2.6.16.9/arch/um/kernel/physmem.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/um/kernel/physmem.c 2006-04-10 00:05:52.000000000 +0200
-@@ -225,7 +225,7 @@ EXPORT_SYMBOL(physmem_forget_descriptor)
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/um/kernel/physmem.c linux-2.6.16/arch/um/kernel/physmem.c
+--- linux-2.6.16.orig/arch/um/kernel/physmem.c 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/um/kernel/physmem.c 2006-06-26 09:51:32.000000000 +0200
+@@ -225,7 +225,7 @@
EXPORT_SYMBOL(physmem_remove_mapping);
EXPORT_SYMBOL(physmem_subst_mapping);
{
void *virt;
int i;
-@@ -234,6 +234,8 @@ void arch_free_page(struct page *page, i
+@@ -234,6 +234,8 @@
virt = __va(page_to_phys(page + i));
physmem_remove_mapping(virt);
}
}
int is_remapped(void *virt)
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-xen.patch/arch/x86_64/ia32/ia32entry-xen.S
---- ref-linux-2.6.16.9/arch/x86_64/ia32/ia32entry-xen.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/ia32entry-xen.S 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/Kconfig linux-2.6.16/arch/x86_64/Kconfig
+--- linux-2.6.16.orig/arch/x86_64/Kconfig 2006-06-26 09:49:46.000000000 +0200
++++ linux-2.6.16/arch/x86_64/Kconfig 2006-06-26 09:51:32.000000000 +0200
+@@ -119,6 +119,22 @@
+
+ endchoice
+
++config X86_64_XEN
++ bool "Enable Xen compatible kernel"
++ select SWIOTLB
++ help
++ This option will compile a kernel compatible with Xen hypervisor
++
++config X86_NO_TSS
++ bool
++ depends on X86_64_XEN
++ default y
++
++config X86_NO_IDT
++ bool
++ depends on X86_64_XEN
++ default y
++
+ #
+ # Define implied options from the CPU selection here
+ #
+@@ -134,6 +150,7 @@
+
+ config X86_TSC
+ bool
++ depends on !X86_64_XEN
+ default y
+
+ config X86_GOOD_APIC
+@@ -176,7 +193,7 @@
+
+ config X86_HT
+ bool
+- depends on SMP && !MK8
++ depends on SMP && !MK8 && !X86_64_XEN
+ default y
+
+ config MATH_EMULATION
+@@ -190,14 +207,22 @@
+
+ config X86_IO_APIC
+ bool
++ depends !XEN_UNPRIVILEGED_GUEST
+ default y
+
++config X86_XEN_GENAPIC
++ bool
++ depends X86_64_XEN
++ default XEN_PRIVILEGED_GUEST || SMP
++
+ config X86_LOCAL_APIC
+ bool
++ depends !XEN_UNPRIVILEGED_GUEST
+ default y
+
+ config MTRR
+ bool "MTRR (Memory Type Range Register) support"
++ depends on !XEN_UNPRIVILEGED_GUEST
+ ---help---
+ On Intel P6 family processors (Pentium Pro, Pentium II and later)
+ the Memory Type Range Registers (MTRRs) may be used to control
+@@ -238,7 +263,7 @@
+
+ config SCHED_SMT
+ bool "SMT (Hyperthreading) scheduler support"
+- depends on SMP
++ depends on SMP && !X86_64_XEN
+ default n
+ help
+ SMT scheduler support improves the CPU scheduler's decision making
+@@ -250,7 +275,7 @@
+
+ config NUMA
+ bool "Non Uniform Memory Access (NUMA) Support"
+- depends on SMP
++ depends on SMP && !X86_64_XEN
+ help
+ Enable NUMA (Non Uniform Memory Access) support. The kernel
+ will try to allocate memory used by a CPU on the local memory
+@@ -325,6 +350,7 @@
+ int "Maximum number of CPUs (2-256)"
+ range 2 256
+ depends on SMP
++ default "16" if X86_64_XEN
+ default "8"
+ help
+ This allows you to specify the maximum number of CPUs which this
+@@ -345,6 +371,7 @@
+
+ config HPET_TIMER
+ bool
++ depends on !X86_64_XEN
+ default y
+ help
+ Use the IA-PC HPET (High Precision Event Timer) to manage
+@@ -362,7 +389,7 @@
+ bool "K8 GART IOMMU support"
+ default y
+ select SWIOTLB
+- depends on PCI
++ depends on PCI && !X86_64_XEN
+ help
+ Support the IOMMU. Needed to run systems with more than 3GB of memory
+ properly with 32-bit PCI devices that do not support DAC (Double Address
+@@ -380,6 +407,7 @@
+
+ config X86_MCE
+ bool "Machine check support" if EMBEDDED
++ depends on !X86_64_XEN
+ default y
+ help
+ Include a machine check error handler to report hardware errors.
+@@ -405,7 +433,7 @@
+
+ config KEXEC
+ bool "kexec system call (EXPERIMENTAL)"
+- depends on EXPERIMENTAL
++ depends on EXPERIMENTAL && !X86_64_XEN
+ help
+ kexec is a system call that implements the ability to shutdown your
+ current kernel, and to start another kernel. It is like a reboot
+@@ -488,8 +516,11 @@
+ default y
+
+ menu "Power management options"
++ depends on !XEN_UNPRIVILEGED_GUEST
+
++if !X86_64_XEN
+ source kernel/power/Kconfig
++endif
+
+ source "drivers/acpi/Kconfig"
+
+@@ -512,6 +543,21 @@
+ bool "Support mmconfig PCI config space access"
+ depends on PCI && ACPI
+
++config XEN_PCIDEV_FRONTEND
++ bool "Xen PCI Frontend"
++ depends on PCI && X86_64_XEN
++ default y
++ help
++ The PCI device frontend driver allows the kernel to import arbitrary
++ PCI devices from a PCI backend to support PCI driver domains.
++
++config XEN_PCIDEV_FE_DEBUG
++ bool "Xen PCI Frontend Debugging"
++ depends on XEN_PCIDEV_FRONTEND
++ default n
++ help
++ Enables some debug statements within the PCI Frontend.
++
+ config UNORDERED_IO
+ bool "Unordered IO mapping access"
+ depends on EXPERIMENTAL
+@@ -522,6 +568,7 @@
+ from i386. Requires that the driver writer used memory barriers
+ properly.
+
++if !X86_64_XEN
+ source "drivers/pci/pcie/Kconfig"
+
+ source "drivers/pci/Kconfig"
+@@ -529,6 +576,7 @@
+ source "drivers/pcmcia/Kconfig"
+
+ source "drivers/pci/hotplug/Kconfig"
++endif
+
+ endmenu
+
+@@ -594,4 +642,6 @@
+
+ source "crypto/Kconfig"
+
++source "drivers/xen/Kconfig"
++
+ source "lib/Kconfig"
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/Makefile linux-2.6.16/arch/x86_64/Makefile
+--- linux-2.6.16.orig/arch/x86_64/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/x86_64/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -31,6 +31,10 @@
+ cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
+ CFLAGS += $(cflags-y)
+
++cppflags-$(CONFIG_XEN) += \
++ -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION)
++CPPFLAGS += $(cppflags-y)
++
+ CFLAGS += -m64
+ CFLAGS += -mno-red-zone
+ CFLAGS += -mcmodel=kernel
+@@ -70,6 +74,21 @@
+ .PHONY: bzImage bzlilo install archmrproper \
+ fdimage fdimage144 fdimage288 archclean
+
++ifdef CONFIG_XEN
++CPPFLAGS := -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS)
++head-y := arch/x86_64/kernel/head-xen.o arch/x86_64/kernel/head64-xen.o arch/x86_64/kernel/init_task.o
++LDFLAGS_vmlinux := -e _start
++boot := arch/i386/boot-xen
++.PHONY: vmlinuz
++#Default target when executing "make"
++all: vmlinuz
++
++vmlinuz: vmlinux
++ $(Q)$(MAKE) $(build)=$(boot) $@
++
++install:
++ $(Q)$(MAKE) $(build)=$(boot) XENGUEST=$(XENGUEST) $@
++else
+ #Default target when executing "make"
+ all: bzImage
+
+@@ -90,6 +109,7 @@
+
+ install:
+ $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
++endif
+
+ archclean:
+ $(Q)$(MAKE) $(clean)=$(boot)
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/ia32/Makefile linux-2.6.16/arch/x86_64/ia32/Makefile
+--- linux-2.6.16.orig/arch/x86_64/ia32/Makefile 2006-06-26 09:49:45.000000000 +0200
++++ linux-2.6.16/arch/x86_64/ia32/Makefile 2006-06-26 09:54:59.000000000 +0200
+@@ -23,9 +23,25 @@
+ -Wl,-soname=linux-gate.so.1 -o $@ \
+ -Wl,-T,$(filter-out FORCE,$^)
+
++$(obj)/vsyscall-int80.so \
+ $(obj)/vsyscall-sysenter.so $(obj)/vsyscall-syscall.so: \
+ $(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE
+ $(call if_changed,syscall)
+
+-AFLAGS_vsyscall-sysenter.o = -m32 -Wa,-32
+-AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32
++AFLAGS_vsyscall-sysenter.o = -m32 -Wa,-32 -Iarch/i386/kernel
++AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32 -Iarch/i386/kernel
++
++ifdef CONFIG_XEN
++AFLAGS_vsyscall-int80.o = -m32 -Iarch/i386/kernel
++CFLAGS_syscall32-xen.o += -DUSE_INT80
++AFLAGS_syscall32_syscall-xen.o += -DUSE_INT80
++
++$(obj)/syscall32_syscall-xen.o: \
++ $(foreach F,int80 sysenter syscall,$(obj)/vsyscall-$F.so)
++
++targets := $(foreach F,int80 sysenter syscall,vsyscall-$F.o vsyscall-$F.so)
++
++include $(srctree)/scripts/Makefile.xen
++
++obj-y := $(call cherrypickxen, $(obj-y))
++endif
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/ia32/ia32entry-xen.S linux-2.6.16/arch/x86_64/ia32/ia32entry-xen.S
+--- linux-2.6.16.orig/arch/x86_64/ia32/ia32entry-xen.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/ia32/ia32entry-xen.S 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,721 @@
+/*
+ * Compatibility mode system call entry point for x86-64.
+ .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8
+ .quad ni_syscall
+ .endr
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/ia32/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/ia32/Makefile
---- ref-linux-2.6.16.9/arch/x86_64/ia32/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -23,9 +23,25 @@ quiet_cmd_syscall = SYSCALL $@
- -Wl,-soname=linux-gate.so.1 -o $@ \
- -Wl,-T,$(filter-out FORCE,$^)
-
-+$(obj)/vsyscall-int80.so \
- $(obj)/vsyscall-sysenter.so $(obj)/vsyscall-syscall.so: \
- $(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE
- $(call if_changed,syscall)
-
--AFLAGS_vsyscall-sysenter.o = -m32
--AFLAGS_vsyscall-syscall.o = -m32
-+AFLAGS_vsyscall-sysenter.o = -m32 -Iarch/i386/kernel
-+AFLAGS_vsyscall-syscall.o = -m32 -Iarch/i386/kernel
-+
-+ifdef CONFIG_XEN
-+AFLAGS_vsyscall-int80.o = -m32 -Iarch/i386/kernel
-+CFLAGS_syscall32-xen.o += -DUSE_INT80
-+AFLAGS_syscall32_syscall-xen.o += -DUSE_INT80
-+
-+$(obj)/syscall32_syscall-xen.o: \
-+ $(foreach F,int80 sysenter syscall,$(obj)/vsyscall-$F.so)
-+
-+targets := $(foreach F,int80 sysenter syscall,vsyscall-$F.o vsyscall-$F.so)
-+
-+include $(srctree)/scripts/Makefile.xen
-+
-+obj-y := $(call cherrypickxen, $(obj-y))
-+endif
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/ia32/syscall32_syscall-xen.S tmp-linux-2.6-xen.patch/arch/x86_64/ia32/syscall32_syscall-xen.S
---- ref-linux-2.6.16.9/arch/x86_64/ia32/syscall32_syscall-xen.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/syscall32_syscall-xen.S 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,28 @@
-+/* 32bit VDSOs mapped into user space. */
-+
-+ .section ".init.data","aw"
-+
-+#ifdef USE_INT80
-+
-+ .globl syscall32_int80
-+ .globl syscall32_int80_end
-+
-+syscall32_int80:
-+ .incbin "arch/x86_64/ia32/vsyscall-int80.so"
-+syscall32_int80_end:
-+
-+#endif
-+
-+ .globl syscall32_syscall
-+ .globl syscall32_syscall_end
-+
-+syscall32_syscall:
-+ .incbin "arch/x86_64/ia32/vsyscall-syscall.so"
-+syscall32_syscall_end:
-+
-+ .globl syscall32_sysenter
-+ .globl syscall32_sysenter_end
-+
-+syscall32_sysenter:
-+ .incbin "arch/x86_64/ia32/vsyscall-sysenter.so"
-+syscall32_sysenter_end:
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/ia32/syscall32-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/ia32/syscall32-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/ia32/syscall32-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/syscall32-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/ia32/syscall32-xen.c linux-2.6.16/arch/x86_64/ia32/syscall32-xen.c
+--- linux-2.6.16.orig/arch/x86_64/ia32/syscall32-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/ia32/syscall32-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,128 @@
+/* Copyright 2002,2003 Andi Kleen, SuSE Labs */
+
+ wrmsrl(MSR_CSTAR, ia32_cstar_target);
+#endif
+}
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/ia32/vsyscall-int80.S tmp-linux-2.6-xen.patch/arch/x86_64/ia32/vsyscall-int80.S
---- ref-linux-2.6.16.9/arch/x86_64/ia32/vsyscall-int80.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/vsyscall-int80.S 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/ia32/syscall32_syscall-xen.S linux-2.6.16/arch/x86_64/ia32/syscall32_syscall-xen.S
+--- linux-2.6.16.orig/arch/x86_64/ia32/syscall32_syscall-xen.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/ia32/syscall32_syscall-xen.S 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,28 @@
++/* 32bit VDSOs mapped into user space. */
++
++ .section ".init.data","aw"
++
++#ifdef USE_INT80
++
++ .globl syscall32_int80
++ .globl syscall32_int80_end
++
++syscall32_int80:
++ .incbin "arch/x86_64/ia32/vsyscall-int80.so"
++syscall32_int80_end:
++
++#endif
++
++ .globl syscall32_syscall
++ .globl syscall32_syscall_end
++
++syscall32_syscall:
++ .incbin "arch/x86_64/ia32/vsyscall-syscall.so"
++syscall32_syscall_end:
++
++ .globl syscall32_sysenter
++ .globl syscall32_sysenter_end
++
++syscall32_sysenter:
++ .incbin "arch/x86_64/ia32/vsyscall-sysenter.so"
++syscall32_sysenter_end:
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/ia32/vsyscall-int80.S linux-2.6.16/arch/x86_64/ia32/vsyscall-int80.S
+--- linux-2.6.16.orig/arch/x86_64/ia32/vsyscall-int80.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/ia32/vsyscall-int80.S 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,58 @@
+/*
+ * Code for the vsyscall page. This version uses the old int $0x80 method.
+ */
+#define SYSCALL_ENTER_KERNEL int $0x80
+#include "vsyscall-sigreturn.S"
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/ia32/vsyscall-sigreturn.S tmp-linux-2.6-xen.patch/arch/x86_64/ia32/vsyscall-sigreturn.S
---- ref-linux-2.6.16.9/arch/x86_64/ia32/vsyscall-sigreturn.S 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/vsyscall-sigreturn.S 2006-04-10 00:05:52.000000000 +0200
-@@ -120,5 +120,5 @@ __kernel_rt_sigreturn:
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/ia32/vsyscall-sigreturn.S linux-2.6.16/arch/x86_64/ia32/vsyscall-sigreturn.S
+--- linux-2.6.16.orig/arch/x86_64/ia32/vsyscall-sigreturn.S 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/x86_64/ia32/vsyscall-sigreturn.S 2006-06-26 09:51:32.000000000 +0200
+@@ -120,5 +120,5 @@
.align 4
.LENDFDE3:
-#include "../../i386/kernel/vsyscall-note.S"
+#include <vsyscall-note.S>
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arch/x86_64/Kconfig
---- ref-linux-2.6.16.9/arch/x86_64/Kconfig 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/Kconfig 2006-04-10 00:05:52.000000000 +0200
-@@ -119,6 +119,22 @@ config GENERIC_CPU
-
- endchoice
-
-+config X86_64_XEN
-+ bool "Enable Xen compatible kernel"
-+ select SWIOTLB
-+ help
-+ This option will compile a kernel compatible with Xen hypervisor
-+
-+config X86_NO_TSS
-+ bool
-+ depends on X86_64_XEN
-+ default y
-+
-+config X86_NO_IDT
-+ bool
-+ depends on X86_64_XEN
-+ default y
-+
- #
- # Define implied options from the CPU selection here
- #
-@@ -134,6 +150,7 @@ config X86_L1_CACHE_SHIFT
-
- config X86_TSC
- bool
-+ depends on !X86_64_XEN
- default y
-
- config X86_GOOD_APIC
-@@ -176,7 +193,7 @@ config X86_CPUID
-
- config X86_HT
- bool
-- depends on SMP && !MK8
-+ depends on SMP && !MK8 && !X86_64_XEN
- default y
-
- config MATH_EMULATION
-@@ -190,14 +207,22 @@ config EISA
-
- config X86_IO_APIC
- bool
-+ depends !XEN_UNPRIVILEGED_GUEST
- default y
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/Makefile linux-2.6.16/arch/x86_64/kernel/Makefile
+--- linux-2.6.16.orig/arch/x86_64/kernel/Makefile 2006-06-26 09:49:45.000000000 +0200
++++ linux-2.6.16/arch/x86_64/kernel/Makefile 2006-06-26 09:56:01.000000000 +0200
+@@ -20,11 +20,13 @@
+ obj-$(CONFIG_X86_CPUID) += cpuid.o
+ obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o
+ obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o
++obj-$(CONFIG_X86_XEN_GENAPIC) += genapic.o genapic_xen.o
+ obj-$(CONFIG_X86_IO_APIC) += io_apic.o mpparse.o \
+ genapic.o genapic_cluster.o genapic_flat.o
+ obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o
+ obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
+-obj-$(CONFIG_PM) += suspend.o
++obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o
++obj-$(CONFIG_ACPI_SLEEP) += suspend.o
+ obj-$(CONFIG_SUSPEND_SHARED) += suspend_asm.o
+ obj-$(CONFIG_CPU_FREQ) += cpufreq/
+ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
+@@ -51,3 +53,17 @@
+ msr-$(subst m,y,$(CONFIG_X86_MSR)) += ../../i386/kernel/msr.o
+ dmi_scan-y += ../../i386/kernel/dmi_scan.o
-+config X86_XEN_GENAPIC
-+ bool
-+ depends X86_64_XEN
-+ default XEN_PRIVILEGED_GUEST || SMP
++ifdef CONFIG_XEN
++time-y += ../../i386/kernel/time-xen.o
++pci-dma-y += ../../i386/kernel/pci-dma-xen.o
++microcode-$(subst m,y,$(CONFIG_MICROCODE)) := ../../i386/kernel/microcode-xen.o
++quirks-y := ../../i386/kernel/quirks-xen.o
+
- config X86_LOCAL_APIC
- bool
-+ depends !XEN_UNPRIVILEGED_GUEST
- default y
-
- config MTRR
- bool "MTRR (Memory Type Range Register) support"
-+ depends on !XEN_UNPRIVILEGED_GUEST
- ---help---
- On Intel P6 family processors (Pentium Pro, Pentium II and later)
- the Memory Type Range Registers (MTRRs) may be used to control
-@@ -238,7 +263,7 @@ config SMP
-
- config SCHED_SMT
- bool "SMT (Hyperthreading) scheduler support"
-- depends on SMP
-+ depends on SMP && !X86_64_XEN
- default n
- help
- SMT scheduler support improves the CPU scheduler's decision making
-@@ -250,7 +275,7 @@ source "kernel/Kconfig.preempt"
-
- config NUMA
- bool "Non Uniform Memory Access (NUMA) Support"
-- depends on SMP
-+ depends on SMP && !X86_64_XEN
- help
- Enable NUMA (Non Uniform Memory Access) support. The kernel
- will try to allocate memory used by a CPU on the local memory
-@@ -325,6 +350,7 @@ config NR_CPUS
- int "Maximum number of CPUs (2-256)"
- range 2 256
- depends on SMP
-+ default "16" if X86_64_XEN
- default "8"
- help
- This allows you to specify the maximum number of CPUs which this
-@@ -345,6 +371,7 @@ config HOTPLUG_CPU
-
- config HPET_TIMER
- bool
-+ depends on !X86_64_XEN
- default y
- help
- Use the IA-PC HPET (High Precision Event Timer) to manage
-@@ -362,7 +389,7 @@ config GART_IOMMU
- bool "K8 GART IOMMU support"
- default y
- select SWIOTLB
-- depends on PCI
-+ depends on PCI && !X86_64_XEN
- help
- Support the IOMMU. Needed to run systems with more than 3GB of memory
- properly with 32-bit PCI devices that do not support DAC (Double Address
-@@ -380,6 +407,7 @@ config SWIOTLB
-
- config X86_MCE
- bool "Machine check support" if EMBEDDED
-+ depends on !X86_64_XEN
- default y
- help
- Include a machine check error handler to report hardware errors.
-@@ -405,7 +433,7 @@ config X86_MCE_AMD
-
- config KEXEC
- bool "kexec system call (EXPERIMENTAL)"
-- depends on EXPERIMENTAL
-+ depends on EXPERIMENTAL && !X86_64_XEN
- help
- kexec is a system call that implements the ability to shutdown your
- current kernel, and to start another kernel. It is like a reboot
-@@ -488,8 +516,11 @@ config GENERIC_PENDING_IRQ
- default y
-
- menu "Power management options"
-+ depends on !XEN_UNPRIVILEGED_GUEST
-
-+if !X86_64_XEN
- source kernel/power/Kconfig
-+endif
-
- source "drivers/acpi/Kconfig"
-
-@@ -512,6 +543,21 @@ config PCI_MMCONFIG
- bool "Support mmconfig PCI config space access"
- depends on PCI && ACPI
-
-+config XEN_PCIDEV_FRONTEND
-+ bool "Xen PCI Frontend"
-+ depends on PCI && X86_64_XEN
-+ default y
-+ help
-+ The PCI device frontend driver allows the kernel to import arbitrary
-+ PCI devices from a PCI backend to support PCI driver domains.
++n-obj-xen := i8259.o reboot.o i8237.o smpboot.o trampoline.o
+
-+config XEN_PCIDEV_FE_DEBUG
-+ bool "Xen PCI Frontend Debugging"
-+ depends on XEN_PCIDEV_FRONTEND
-+ default n
-+ help
-+ Enables some debug statements within the PCI Frontend.
++include $(srctree)/scripts/Makefile.xen
+
- config UNORDERED_IO
- bool "Unordered IO mapping access"
- depends on EXPERIMENTAL
-@@ -522,6 +568,7 @@ config UNORDERED_IO
- from i386. Requires that the driver writer used memory barriers
- properly.
-
-+if !X86_64_XEN
- source "drivers/pci/pcie/Kconfig"
-
- source "drivers/pci/Kconfig"
-@@ -529,6 +576,7 @@ source "drivers/pci/Kconfig"
- source "drivers/pcmcia/Kconfig"
-
- source "drivers/pci/hotplug/Kconfig"
++obj-y := $(call filterxen, $(obj-y), $(n-obj-xen))
++obj-y := $(call cherrypickxen, $(obj-y))
++extra-y := $(call cherrypickxen, $(extra-y))
+endif
-
- endmenu
-
-@@ -592,4 +640,6 @@ source "security/Kconfig"
-
- source "crypto/Kconfig"
-
-+source "drivers/xen/Kconfig"
-+
- source "lib/Kconfig"
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/acpi/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/kernel/acpi/Makefile
---- ref-linux-2.6.16.9/arch/x86_64/kernel/acpi/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/acpi/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -6,3 +6,4 @@ ifneq ($(CONFIG_ACPI_PROCESSOR),)
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/acpi/Makefile linux-2.6.16/arch/x86_64/kernel/acpi/Makefile
+--- linux-2.6.16.orig/arch/x86_64/kernel/acpi/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/acpi/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -6,3 +6,4 @@
obj-y += processor.o
endif
+boot-$(CONFIG_XEN) := ../../../i386/kernel/acpi/boot-xen.o
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/apic-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/apic-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/apic-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/apic-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/apic-xen.c linux-2.6.16/arch/x86_64/kernel/apic-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/apic-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/apic-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,198 @@
+/*
+ * Local APIC handling, local APIC timers
+
+ return 0;
+}
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/asm-offsets.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/asm-offsets.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/asm-offsets.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/asm-offsets.c 2006-04-10 00:05:52.000000000 +0200
-@@ -66,7 +66,9 @@ int main(void)
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/asm-offsets.c linux-2.6.16/arch/x86_64/kernel/asm-offsets.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/asm-offsets.c 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/asm-offsets.c 2006-06-26 09:51:32.000000000 +0200
+@@ -66,7 +66,9 @@
DEFINE(pbe_address, offsetof(struct pbe, address));
DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
DEFINE(pbe_next, offsetof(struct pbe, next));
+#endif
return 0;
}
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/e820-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/e820-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/e820-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/e820-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/e820-xen.c linux-2.6.16/arch/x86_64/kernel/e820-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/e820-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/e820-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,744 @@
+/*
+ * Handle the memory map.
+ pci_mem_start, gapstart, gapsize);
+#endif
+}
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/early_printk-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/early_printk-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/early_printk-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/early_printk-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/early_printk-xen.c linux-2.6.16/arch/x86_64/kernel/early_printk-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/early_printk-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/early_printk-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,306 @@
+#include <linux/config.h>
+#include <linux/console.h>
+}
+
+__setup("earlyprintk=", setup_early_printk);
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/entry-xen.S tmp-linux-2.6-xen.patch/arch/x86_64/kernel/entry-xen.S
---- ref-linux-2.6.16.9/arch/x86_64/kernel/entry-xen.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/entry-xen.S 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/entry-xen.S linux-2.6.16/arch/x86_64/kernel/entry-xen.S
+--- linux-2.6.16.orig/arch/x86_64/kernel/entry-xen.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/entry-xen.S 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1149 @@
+/*
+ * linux/arch/x86_64/entry.S
+ decl %gs:pda_irqcount
+ ret
+ CFI_ENDPROC
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/genapic_xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/genapic_xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/genapic_xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/genapic_xen.c 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,162 @@
-+/*
-+ * Copyright 2004 James Cleverdon, IBM.
-+ * Subject to the GNU Public License, v.2
-+ *
-+ * Xen APIC subarch code. Maximum 8 CPUs, logical delivery.
-+ *
-+ * Hacked for x86-64 by James Cleverdon from i386 architecture code by
-+ * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and
-+ * James Cleverdon.
-+ *
-+ * Hacked to pieces for Xen by Chris Wright.
-+ */
-+#include <linux/config.h>
-+#include <linux/threads.h>
-+#include <linux/cpumask.h>
-+#include <linux/string.h>
-+#include <linux/kernel.h>
-+#include <linux/ctype.h>
-+#include <linux/init.h>
-+#ifdef CONFIG_XEN_PRIVILEGED_GUEST
-+#include <asm/smp.h>
-+#include <asm/ipi.h>
-+#else
-+#include <asm/apic.h>
-+#include <asm/apicdef.h>
-+#include <asm/genapic.h>
-+#endif
-+#include <xen/evtchn.h>
-+
-+DECLARE_PER_CPU(int, ipi_to_irq[NR_IPIS]);
-+
-+static inline void __send_IPI_one(unsigned int cpu, int vector)
-+{
-+ int irq = per_cpu(ipi_to_irq, cpu)[vector];
-+ BUG_ON(irq < 0);
-+ notify_remote_via_irq(irq);
-+}
-+
-+void xen_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int dest)
-+{
-+ int cpu;
-+
-+ switch (shortcut) {
-+ case APIC_DEST_SELF:
-+ __send_IPI_one(smp_processor_id(), vector);
-+ break;
-+ case APIC_DEST_ALLBUT:
-+ for (cpu = 0; cpu < NR_CPUS; ++cpu) {
-+ if (cpu == smp_processor_id())
-+ continue;
-+ if (cpu_isset(cpu, cpu_online_map)) {
-+ __send_IPI_one(cpu, vector);
-+ }
-+ }
-+ break;
-+ case APIC_DEST_ALLINC:
-+ for (cpu = 0; cpu < NR_CPUS; ++cpu) {
-+ if (cpu_isset(cpu, cpu_online_map)) {
-+ __send_IPI_one(cpu, vector);
-+ }
-+ }
-+ break;
-+ default:
-+ printk("XXXXXX __send_IPI_shortcut %08x vector %d\n", shortcut,
-+ vector);
-+ break;
-+ }
-+}
-+
-+static cpumask_t xen_target_cpus(void)
-+{
-+ return cpu_online_map;
-+}
-+
-+/*
-+ * Set up the logical destination ID.
-+ * Do nothing, not called now.
-+ */
-+static void xen_init_apic_ldr(void)
-+{
-+ Dprintk("%s\n", __FUNCTION__);
-+ return;
-+}
-+
-+static void xen_send_IPI_allbutself(int vector)
-+{
-+ /*
-+ * if there are no other CPUs in the system then
-+ * we get an APIC send error if we try to broadcast.
-+ * thus we have to avoid sending IPIs in this case.
-+ */
-+ Dprintk("%s\n", __FUNCTION__);
-+ if (num_online_cpus() > 1)
-+ xen_send_IPI_shortcut(APIC_DEST_ALLBUT, vector, APIC_DEST_LOGICAL);
-+}
-+
-+static void xen_send_IPI_all(int vector)
-+{
-+ Dprintk("%s\n", __FUNCTION__);
-+ xen_send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL);
-+}
-+
-+static void xen_send_IPI_mask(cpumask_t cpumask, int vector)
-+{
-+ unsigned long mask = cpus_addr(cpumask)[0];
-+ unsigned int cpu;
-+ unsigned long flags;
-+
-+ Dprintk("%s\n", __FUNCTION__);
-+ local_irq_save(flags);
-+ WARN_ON(mask & ~cpus_addr(cpu_online_map)[0]);
-+
-+ for (cpu = 0; cpu < NR_CPUS; ++cpu) {
-+ if (cpu_isset(cpu, cpumask)) {
-+ __send_IPI_one(cpu, vector);
-+ }
-+ }
-+ local_irq_restore(flags);
-+}
-+
-+#ifdef CONFIG_XEN_PRIVILEGED_GUEST
-+static int xen_apic_id_registered(void)
-+{
-+ /* better be set */
-+ Dprintk("%s\n", __FUNCTION__);
-+ return physid_isset(smp_processor_id(), phys_cpu_present_map);
-+}
-+#endif
-+
-+static unsigned int xen_cpu_mask_to_apicid(cpumask_t cpumask)
-+{
-+ Dprintk("%s\n", __FUNCTION__);
-+ return cpus_addr(cpumask)[0] & APIC_ALL_CPUS;
-+}
-+
-+static unsigned int phys_pkg_id(int index_msb)
-+{
-+ u32 ebx;
-+
-+ Dprintk("%s\n", __FUNCTION__);
-+ ebx = cpuid_ebx(1);
-+ return ((ebx >> 24) & 0xFF) >> index_msb;
-+}
-+
-+struct genapic apic_xen = {
-+ .name = "xen",
-+#ifdef CONFIG_XEN_PRIVILEGED_GUEST
-+ .int_delivery_mode = dest_LowestPrio,
-+#endif
-+ .int_dest_mode = (APIC_DEST_LOGICAL != 0),
-+ .int_delivery_dest = APIC_DEST_LOGICAL | APIC_DM_LOWEST,
-+ .target_cpus = xen_target_cpus,
-+#ifdef CONFIG_XEN_PRIVILEGED_GUEST
-+ .apic_id_registered = xen_apic_id_registered,
-+#endif
-+ .init_apic_ldr = xen_init_apic_ldr,
-+ .send_IPI_all = xen_send_IPI_all,
-+ .send_IPI_allbutself = xen_send_IPI_allbutself,
-+ .send_IPI_mask = xen_send_IPI_mask,
-+ .cpu_mask_to_apicid = xen_cpu_mask_to_apicid,
-+ .phys_pkg_id = phys_pkg_id,
-+};
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/genapic-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/genapic-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/genapic-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/genapic-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/genapic-xen.c linux-2.6.16/arch/x86_64/kernel/genapic-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/genapic-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/genapic-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,144 @@
+/*
+ * Copyright 2004 James Cleverdon, IBM.
+ xen_send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL);
+#endif
+}
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/head64-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/head64-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/head64-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/head64-xen.c 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,140 @@
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/genapic_xen.c linux-2.6.16/arch/x86_64/kernel/genapic_xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/genapic_xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/genapic_xen.c 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,162 @@
+/*
-+ * linux/arch/x86_64/kernel/head64.c -- prepare to run common code
++ * Copyright 2004 James Cleverdon, IBM.
++ * Subject to the GNU Public License, v.2
+ *
-+ * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
++ * Xen APIC subarch code. Maximum 8 CPUs, logical delivery.
+ *
-+ * $Id$
++ * Hacked for x86-64 by James Cleverdon from i386 architecture code by
++ * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and
++ * James Cleverdon.
+ *
-+ * Jun Nakajima <jun.nakajima@intel.com>
-+ * Modified for Xen.
++ * Hacked to pieces for Xen by Chris Wright.
+ */
-+
-+#include <linux/init.h>
-+#include <linux/linkage.h>
-+#include <linux/types.h>
-+#include <linux/kernel.h>
++#include <linux/config.h>
++#include <linux/threads.h>
++#include <linux/cpumask.h>
+#include <linux/string.h>
-+#include <linux/percpu.h>
-+
-+#include <asm/processor.h>
-+#include <asm/proto.h>
++#include <linux/kernel.h>
++#include <linux/ctype.h>
++#include <linux/init.h>
++#ifdef CONFIG_XEN_PRIVILEGED_GUEST
+#include <asm/smp.h>
-+#include <asm/bootsetup.h>
-+#include <asm/setup.h>
-+#include <asm/desc.h>
-+#include <asm/pgtable.h>
-+#include <asm/sections.h>
++#include <asm/ipi.h>
++#else
++#include <asm/apic.h>
++#include <asm/apicdef.h>
++#include <asm/genapic.h>
++#endif
++#include <xen/evtchn.h>
+
-+unsigned long start_pfn;
++DECLARE_PER_CPU(int, ipi_to_irq[NR_IPIS]);
+
-+/* Don't add a printk in there. printk relies on the PDA which is not initialized
-+ yet. */
-+#if 0
-+static void __init clear_bss(void)
++static inline void __send_IPI_one(unsigned int cpu, int vector)
+{
-+ memset(__bss_start, 0,
-+ (unsigned long) __bss_stop - (unsigned long) __bss_start);
++ int irq = per_cpu(ipi_to_irq, cpu)[vector];
++ BUG_ON(irq < 0);
++ notify_remote_via_irq(irq);
+}
-+#endif
-+
-+#define NEW_CL_POINTER 0x228 /* Relative to real mode data */
-+#define OLD_CL_MAGIC_ADDR 0x90020
-+#define OLD_CL_MAGIC 0xA33F
-+#define OLD_CL_BASE_ADDR 0x90000
-+#define OLD_CL_OFFSET 0x90022
-+
-+extern char saved_command_line[];
+
-+static void __init copy_bootdata(char *real_mode_data)
++void xen_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int dest)
+{
-+#ifndef CONFIG_XEN
-+ int new_data;
-+ char * command_line;
++ int cpu;
+
-+ memcpy(x86_boot_params, real_mode_data, BOOT_PARAM_SIZE);
-+ new_data = *(int *) (x86_boot_params + NEW_CL_POINTER);
-+ if (!new_data) {
-+ if (OLD_CL_MAGIC != * (u16 *) OLD_CL_MAGIC_ADDR) {
-+ printk("so old bootloader that it does not support commandline?!\n");
-+ return;
++ switch (shortcut) {
++ case APIC_DEST_SELF:
++ __send_IPI_one(smp_processor_id(), vector);
++ break;
++ case APIC_DEST_ALLBUT:
++ for (cpu = 0; cpu < NR_CPUS; ++cpu) {
++ if (cpu == smp_processor_id())
++ continue;
++ if (cpu_isset(cpu, cpu_online_map)) {
++ __send_IPI_one(cpu, vector);
++ }
+ }
-+ new_data = OLD_CL_BASE_ADDR + * (u16 *) OLD_CL_OFFSET;
-+ printk("old bootloader convention, maybe loadlin?\n");
++ break;
++ case APIC_DEST_ALLINC:
++ for (cpu = 0; cpu < NR_CPUS; ++cpu) {
++ if (cpu_isset(cpu, cpu_online_map)) {
++ __send_IPI_one(cpu, vector);
++ }
++ }
++ break;
++ default:
++ printk("XXXXXX __send_IPI_shortcut %08x vector %d\n", shortcut,
++ vector);
++ break;
+ }
-+ command_line = (char *) ((u64)(new_data));
-+ memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
-+#else
-+ int max_cmdline;
-+
-+ if ((max_cmdline = MAX_GUEST_CMDLINE) > COMMAND_LINE_SIZE)
-+ max_cmdline = COMMAND_LINE_SIZE;
-+ memcpy(saved_command_line, xen_start_info->cmd_line, max_cmdline);
-+ saved_command_line[max_cmdline-1] = '\0';
-+#endif
-+ printk("Bootdata ok (command line is %s)\n", saved_command_line);
+}
+
-+static void __init setup_boot_cpu_data(void)
++static cpumask_t xen_target_cpus(void)
+{
-+ unsigned int dummy, eax;
++ return cpu_online_map;
++}
+
-+ /* get vendor info */
-+ cpuid(0, (unsigned int *)&boot_cpu_data.cpuid_level,
-+ (unsigned int *)&boot_cpu_data.x86_vendor_id[0],
-+ (unsigned int *)&boot_cpu_data.x86_vendor_id[8],
-+ (unsigned int *)&boot_cpu_data.x86_vendor_id[4]);
++/*
++ * Set up the logical destination ID.
++ * Do nothing, not called now.
++ */
++static void xen_init_apic_ldr(void)
++{
++ Dprintk("%s\n", __FUNCTION__);
++ return;
++}
+
-+ /* get cpu type */
-+ cpuid(1, &eax, &dummy, &dummy,
-+ (unsigned int *) &boot_cpu_data.x86_capability);
-+ boot_cpu_data.x86 = (eax >> 8) & 0xf;
-+ boot_cpu_data.x86_model = (eax >> 4) & 0xf;
-+ boot_cpu_data.x86_mask = eax & 0xf;
++static void xen_send_IPI_allbutself(int vector)
++{
++ /*
++ * if there are no other CPUs in the system then
++ * we get an APIC send error if we try to broadcast.
++ * thus we have to avoid sending IPIs in this case.
++ */
++ Dprintk("%s\n", __FUNCTION__);
++ if (num_online_cpus() > 1)
++ xen_send_IPI_shortcut(APIC_DEST_ALLBUT, vector, APIC_DEST_LOGICAL);
+}
+
-+void __init x86_64_start_kernel(char * real_mode_data)
++static void xen_send_IPI_all(int vector)
+{
-+ char *s;
-+ int i;
++ Dprintk("%s\n", __FUNCTION__);
++ xen_send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL);
++}
+
-+ xen_start_info = (struct start_info *)real_mode_data;
-+ if (!xen_feature(XENFEAT_auto_translated_physmap)) {
-+ phys_to_machine_mapping =
-+ (unsigned long *)xen_start_info->mfn_list;
-+ start_pfn = (__pa(xen_start_info->pt_base) >> PAGE_SHIFT) +
-+ xen_start_info->nr_pt_frames;
++static void xen_send_IPI_mask(cpumask_t cpumask, int vector)
++{
++ unsigned long mask = cpus_addr(cpumask)[0];
++ unsigned int cpu;
++ unsigned long flags;
++
++ Dprintk("%s\n", __FUNCTION__);
++ local_irq_save(flags);
++ WARN_ON(mask & ~cpus_addr(cpu_online_map)[0]);
++
++ for (cpu = 0; cpu < NR_CPUS; ++cpu) {
++ if (cpu_isset(cpu, cpumask)) {
++ __send_IPI_one(cpu, vector);
++ }
+ }
++ local_irq_restore(flags);
++}
+
-+#if 0
-+ for (i = 0; i < 256; i++)
-+ set_intr_gate(i, early_idt_handler);
-+ asm volatile("lidt %0" :: "m" (idt_descr));
++#ifdef CONFIG_XEN_PRIVILEGED_GUEST
++static int xen_apic_id_registered(void)
++{
++ /* better be set */
++ Dprintk("%s\n", __FUNCTION__);
++ return physid_isset(smp_processor_id(), phys_cpu_present_map);
++}
+#endif
+
-+ for (i = 0; i < NR_CPUS; i++)
-+ cpu_pda(i) = &boot_cpu_pda[i];
++static unsigned int xen_cpu_mask_to_apicid(cpumask_t cpumask)
++{
++ Dprintk("%s\n", __FUNCTION__);
++ return cpus_addr(cpumask)[0] & APIC_ALL_CPUS;
++}
+
-+ pda_init(0);
-+ copy_bootdata(real_mode_data);
-+#ifdef CONFIG_SMP
-+ cpu_set(0, cpu_online_map);
-+#endif
-+ s = strstr(saved_command_line, "earlyprintk=");
-+ if (s != NULL)
-+ setup_early_printk(strchr(s, '=') + 1);
-+#ifdef CONFIG_NUMA
-+ s = strstr(saved_command_line, "numa=");
-+ if (s != NULL)
-+ numa_setup(s+5);
-+#endif
-+#ifdef CONFIG_X86_IO_APIC
-+ if (strstr(saved_command_line, "disableapic"))
-+ disable_apic = 1;
-+#endif
-+ /* You need early console to see that */
-+ if (__pa_symbol(&_end) >= KERNEL_TEXT_SIZE)
-+ panic("Kernel too big for kernel mapping\n");
++static unsigned int phys_pkg_id(int index_msb)
++{
++ u32 ebx;
+
-+ setup_boot_cpu_data();
-+ start_kernel();
++ Dprintk("%s\n", __FUNCTION__);
++ ebx = cpuid_ebx(1);
++ return ((ebx >> 24) & 0xFF) >> index_msb;
+}
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/head-xen.S tmp-linux-2.6-xen.patch/arch/x86_64/kernel/head-xen.S
---- ref-linux-2.6.16.9/arch/x86_64/kernel/head-xen.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/head-xen.S 2006-04-10 00:05:52.000000000 +0200
++
++struct genapic apic_xen = {
++ .name = "xen",
++#ifdef CONFIG_XEN_PRIVILEGED_GUEST
++ .int_delivery_mode = dest_LowestPrio,
++#endif
++ .int_dest_mode = (APIC_DEST_LOGICAL != 0),
++ .int_delivery_dest = APIC_DEST_LOGICAL | APIC_DM_LOWEST,
++ .target_cpus = xen_target_cpus,
++#ifdef CONFIG_XEN_PRIVILEGED_GUEST
++ .apic_id_registered = xen_apic_id_registered,
++#endif
++ .init_apic_ldr = xen_init_apic_ldr,
++ .send_IPI_all = xen_send_IPI_all,
++ .send_IPI_allbutself = xen_send_IPI_allbutself,
++ .send_IPI_mask = xen_send_IPI_mask,
++ .cpu_mask_to_apicid = xen_cpu_mask_to_apicid,
++ .phys_pkg_id = phys_pkg_id,
++};
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/head-xen.S linux-2.6.16/arch/x86_64/kernel/head-xen.S
+--- linux-2.6.16.orig/arch/x86_64/kernel/head-xen.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/head-xen.S 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,156 @@
+/*
+ * linux/arch/x86_64/kernel/head.S -- start in 32bit and switch to 64bit
+ .ascii "|supervisor_mode_kernel"
+ .ascii ",LOADER=generic"
+ .byte 0
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/init_task.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/init_task.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/init_task.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/init_task.c 2006-04-10 00:05:52.000000000 +0200
-@@ -37,6 +37,8 @@ union thread_union init_thread_union
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/head64-xen.c linux-2.6.16/arch/x86_64/kernel/head64-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/head64-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/head64-xen.c 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,140 @@
++/*
++ * linux/arch/x86_64/kernel/head64.c -- prepare to run common code
++ *
++ * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
++ *
++ * $Id$
++ *
++ * Jun Nakajima <jun.nakajima@intel.com>
++ * Modified for Xen.
++ */
++
++#include <linux/init.h>
++#include <linux/linkage.h>
++#include <linux/types.h>
++#include <linux/kernel.h>
++#include <linux/string.h>
++#include <linux/percpu.h>
++
++#include <asm/processor.h>
++#include <asm/proto.h>
++#include <asm/smp.h>
++#include <asm/bootsetup.h>
++#include <asm/setup.h>
++#include <asm/desc.h>
++#include <asm/pgtable.h>
++#include <asm/sections.h>
++
++unsigned long start_pfn;
++
++/* Don't add a printk in there. printk relies on the PDA which is not initialized
++ yet. */
++#if 0
++static void __init clear_bss(void)
++{
++ memset(__bss_start, 0,
++ (unsigned long) __bss_stop - (unsigned long) __bss_start);
++}
++#endif
++
++#define NEW_CL_POINTER 0x228 /* Relative to real mode data */
++#define OLD_CL_MAGIC_ADDR 0x90020
++#define OLD_CL_MAGIC 0xA33F
++#define OLD_CL_BASE_ADDR 0x90000
++#define OLD_CL_OFFSET 0x90022
++
++extern char saved_command_line[];
++
++static void __init copy_bootdata(char *real_mode_data)
++{
++#ifndef CONFIG_XEN
++ int new_data;
++ char * command_line;
++
++ memcpy(x86_boot_params, real_mode_data, BOOT_PARAM_SIZE);
++ new_data = *(int *) (x86_boot_params + NEW_CL_POINTER);
++ if (!new_data) {
++ if (OLD_CL_MAGIC != * (u16 *) OLD_CL_MAGIC_ADDR) {
++ printk("so old bootloader that it does not support commandline?!\n");
++ return;
++ }
++ new_data = OLD_CL_BASE_ADDR + * (u16 *) OLD_CL_OFFSET;
++ printk("old bootloader convention, maybe loadlin?\n");
++ }
++ command_line = (char *) ((u64)(new_data));
++ memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
++#else
++ int max_cmdline;
++
++ if ((max_cmdline = MAX_GUEST_CMDLINE) > COMMAND_LINE_SIZE)
++ max_cmdline = COMMAND_LINE_SIZE;
++ memcpy(saved_command_line, xen_start_info->cmd_line, max_cmdline);
++ saved_command_line[max_cmdline-1] = '\0';
++#endif
++ printk("Bootdata ok (command line is %s)\n", saved_command_line);
++}
++
++static void __init setup_boot_cpu_data(void)
++{
++ unsigned int dummy, eax;
++
++ /* get vendor info */
++ cpuid(0, (unsigned int *)&boot_cpu_data.cpuid_level,
++ (unsigned int *)&boot_cpu_data.x86_vendor_id[0],
++ (unsigned int *)&boot_cpu_data.x86_vendor_id[8],
++ (unsigned int *)&boot_cpu_data.x86_vendor_id[4]);
++
++ /* get cpu type */
++ cpuid(1, &eax, &dummy, &dummy,
++ (unsigned int *) &boot_cpu_data.x86_capability);
++ boot_cpu_data.x86 = (eax >> 8) & 0xf;
++ boot_cpu_data.x86_model = (eax >> 4) & 0xf;
++ boot_cpu_data.x86_mask = eax & 0xf;
++}
++
++void __init x86_64_start_kernel(char * real_mode_data)
++{
++ char *s;
++ int i;
++
++ xen_start_info = (struct start_info *)real_mode_data;
++ if (!xen_feature(XENFEAT_auto_translated_physmap)) {
++ phys_to_machine_mapping =
++ (unsigned long *)xen_start_info->mfn_list;
++ start_pfn = (__pa(xen_start_info->pt_base) >> PAGE_SHIFT) +
++ xen_start_info->nr_pt_frames;
++ }
++
++#if 0
++ for (i = 0; i < 256; i++)
++ set_intr_gate(i, early_idt_handler);
++ asm volatile("lidt %0" :: "m" (idt_descr));
++#endif
++
++ for (i = 0; i < NR_CPUS; i++)
++ cpu_pda(i) = &boot_cpu_pda[i];
++
++ pda_init(0);
++ copy_bootdata(real_mode_data);
++#ifdef CONFIG_SMP
++ cpu_set(0, cpu_online_map);
++#endif
++ s = strstr(saved_command_line, "earlyprintk=");
++ if (s != NULL)
++ setup_early_printk(strchr(s, '=') + 1);
++#ifdef CONFIG_NUMA
++ s = strstr(saved_command_line, "numa=");
++ if (s != NULL)
++ numa_setup(s+5);
++#endif
++#ifdef CONFIG_X86_IO_APIC
++ if (strstr(saved_command_line, "disableapic"))
++ disable_apic = 1;
++#endif
++ /* You need early console to see that */
++ if (__pa_symbol(&_end) >= KERNEL_TEXT_SIZE)
++ panic("Kernel too big for kernel mapping\n");
++
++ setup_boot_cpu_data();
++ start_kernel();
++}
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/init_task.c linux-2.6.16/arch/x86_64/kernel/init_task.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/init_task.c 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/init_task.c 2006-06-26 09:51:32.000000000 +0200
+@@ -37,6 +37,8 @@
struct task_struct init_task = INIT_TASK(init_task);
EXPORT_SYMBOL(init_task);
/*
* per-CPU TSS segments. Threads are completely 'soft' on Linux,
* no more per-task TSS's. The TSS size is kept cacheline-aligned
-@@ -45,5 +47,6 @@ EXPORT_SYMBOL(init_task);
+@@ -45,5 +47,6 @@
* on exact cacheline boundaries, to eliminate cacheline ping-pong.
*/
DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_internodealigned_in_smp = INIT_TSS;
+#endif
#define ALIGN_TO_4K __attribute__((section(".data.init_task")))
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/io_apic-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/io_apic-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/io_apic-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/io_apic-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/io_apic-xen.c linux-2.6.16/arch/x86_64/kernel/io_apic-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/io_apic-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/io_apic-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,2231 @@
+/*
+ * Intel IO-APIC support for multi-Pentium hosts.
+}
+#endif
+#endif /* !CONFIG_XEN */
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/ioport-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/ioport-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/ioport-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/ioport-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/ioport-xen.c linux-2.6.16/arch/x86_64/kernel/ioport-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/ioport-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/ioport-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,58 @@
+/*
+ * linux/arch/x86_64/kernel/ioport.c
+{
+ return turn_on ? sys_iopl(3, NULL) : 0;
+}
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/irq-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/irq-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/irq-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/irq-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/irq-xen.c linux-2.6.16/arch/x86_64/kernel/irq-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/irq-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/irq-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,168 @@
+/*
+ * linux/arch/x86_64/kernel/irq.c
+ printk("unexpected IRQ trap at vector %02x\n", irq);
+}
+#endif
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/ldt-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/ldt-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/ldt-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/ldt-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/ldt-xen.c linux-2.6.16/arch/x86_64/kernel/ldt-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/ldt-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/ldt-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,282 @@
+/*
+ * linux/arch/x86_64/kernel/ldt.c
+ }
+ return ret;
+}
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/kernel/Makefile
---- ref-linux-2.6.16.9/arch/x86_64/kernel/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -20,11 +20,13 @@ obj-$(CONFIG_MICROCODE) += microcode.o
- obj-$(CONFIG_X86_CPUID) += cpuid.o
- obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o
- obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o
-+obj-$(CONFIG_X86_XEN_GENAPIC) += genapic.o genapic_xen.o
- obj-$(CONFIG_X86_IO_APIC) += io_apic.o mpparse.o \
- genapic.o genapic_cluster.o genapic_flat.o
- obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o
- obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
--obj-$(CONFIG_PM) += suspend.o
-+obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o
-+obj-$(CONFIG_ACPI_SLEEP) += suspend.o
- obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend_asm.o
- obj-$(CONFIG_CPU_FREQ) += cpufreq/
- obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-@@ -51,3 +53,17 @@ i8237-y += ../../i386/kernel/i8237.o
- msr-$(subst m,y,$(CONFIG_X86_MSR)) += ../../i386/kernel/msr.o
- dmi_scan-y += ../../i386/kernel/dmi_scan.o
-
-+ifdef CONFIG_XEN
-+time-y += ../../i386/kernel/time-xen.o
-+pci-dma-y += ../../i386/kernel/pci-dma-xen.o
-+microcode-$(subst m,y,$(CONFIG_MICROCODE)) := ../../i386/kernel/microcode-xen.o
-+quirks-y := ../../i386/kernel/quirks-xen.o
-+
-+n-obj-xen := i8259.o reboot.o i8237.o smpboot.o trampoline.o
-+
-+include $(srctree)/scripts/Makefile.xen
-+
-+obj-y := $(call filterxen, $(obj-y), $(n-obj-xen))
-+obj-y := $(call cherrypickxen, $(obj-y))
-+extra-y := $(call cherrypickxen, $(extra-y))
-+endif
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/mpparse-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/mpparse-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/mpparse-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/mpparse-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/mpparse-xen.c linux-2.6.16/arch/x86_64/kernel/mpparse-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/mpparse-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/mpparse-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1005 @@
+/*
+ * Intel Multiprocessor Specification 1.1 and 1.4
+
+#endif /*CONFIG_X86_IO_APIC*/
+#endif /*CONFIG_ACPI*/
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/pci-swiotlb-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/pci-swiotlb-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/pci-swiotlb-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/pci-swiotlb-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/pci-swiotlb-xen.c linux-2.6.16/arch/x86_64/kernel/pci-swiotlb-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/pci-swiotlb-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/pci-swiotlb-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,54 @@
+/* Glue code to lib/swiotlb.c */
+
+ }
+#endif
+}
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/process-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/process-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/process-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/process-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/process-xen.c linux-2.6.16/arch/x86_64/kernel/process-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/process-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/process-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,810 @@
+/*
+ * linux/arch/x86-64/kernel/process.c
+{
+}
+#endif
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/setup64-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup64-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/setup64-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup64-xen.c 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,360 @@
-+/*
-+ * X86-64 specific CPU setup.
-+ * Copyright (C) 1995 Linus Torvalds
-+ * Copyright 2001, 2002, 2003 SuSE Labs / Andi Kleen.
-+ * See setup.c for older changelog.
-+ * $Id$
-+ *
-+ * Jun Nakajima <jun.nakajima@intel.com>
-+ * Modified for Xen
-+ *
-+ */
-+#include <linux/config.h>
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/sched.h>
-+#include <linux/string.h>
-+#include <linux/bootmem.h>
-+#include <linux/bitops.h>
-+#include <linux/module.h>
-+#include <asm/bootsetup.h>
-+#include <asm/pda.h>
-+#include <asm/pgtable.h>
-+#include <asm/processor.h>
-+#include <asm/desc.h>
-+#include <asm/atomic.h>
-+#include <asm/mmu_context.h>
-+#include <asm/smp.h>
-+#include <asm/i387.h>
-+#include <asm/percpu.h>
-+#include <asm/proto.h>
-+#include <asm/sections.h>
-+#ifdef CONFIG_XEN
-+#include <asm/hypervisor.h>
-+#endif
-+
-+char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,};
-+
-+cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
-+
-+struct x8664_pda *_cpu_pda[NR_CPUS] __read_mostly;
-+struct x8664_pda boot_cpu_pda[NR_CPUS] __cacheline_aligned;
-+
-+#ifndef CONFIG_X86_NO_IDT
-+struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table };
-+#endif
-+
-+char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned")));
-+
-+unsigned long __supported_pte_mask __read_mostly = ~0UL;
-+static int do_not_nx __cpuinitdata = 0;
-+
-+/* noexec=on|off
-+Control non executable mappings for 64bit processes.
-+
-+on Enable(default)
-+off Disable
-+*/
-+int __init nonx_setup(char *str)
-+{
-+ if (!strncmp(str, "on", 2)) {
-+ __supported_pte_mask |= _PAGE_NX;
-+ do_not_nx = 0;
-+ } else if (!strncmp(str, "off", 3)) {
-+ do_not_nx = 1;
-+ __supported_pte_mask &= ~_PAGE_NX;
-+ }
-+ return 0;
-+}
-+__setup("noexec=", nonx_setup); /* parsed early actually */
-+
-+int force_personality32 = READ_IMPLIES_EXEC;
-+
-+/* noexec32=on|off
-+Control non executable heap for 32bit processes.
-+To control the stack too use noexec=off
-+
-+on PROT_READ does not imply PROT_EXEC for 32bit processes
-+off PROT_READ implies PROT_EXEC (default)
-+*/
-+static int __init nonx32_setup(char *str)
-+{
-+ if (!strcmp(str, "on"))
-+ force_personality32 &= ~READ_IMPLIES_EXEC;
-+ else if (!strcmp(str, "off"))
-+ force_personality32 |= READ_IMPLIES_EXEC;
-+ return 0;
-+}
-+__setup("noexec32=", nonx32_setup);
-+
-+/*
-+ * Great future plan:
-+ * Declare PDA itself and support (irqstack,tss,pgd) as per cpu data.
-+ * Always point %gs to its beginning
-+ */
-+void __init setup_per_cpu_areas(void)
-+{
-+ int i;
-+ unsigned long size;
-+
-+#ifdef CONFIG_HOTPLUG_CPU
-+ prefill_possible_map();
-+#endif
-+
-+ /* Copy section for each CPU (we discard the original) */
-+ size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES);
-+#ifdef CONFIG_MODULES
-+ if (size < PERCPU_ENOUGH_ROOM)
-+ size = PERCPU_ENOUGH_ROOM;
-+#endif
-+
-+ for_each_cpu_mask (i, cpu_possible_map) {
-+ char *ptr;
-+
-+ if (!NODE_DATA(cpu_to_node(i))) {
-+ printk("cpu with no node %d, num_online_nodes %d\n",
-+ i, num_online_nodes());
-+ ptr = alloc_bootmem(size);
-+ } else {
-+ ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size);
-+ }
-+ if (!ptr)
-+ panic("Cannot allocate cpu data for CPU %d\n", i);
-+ cpu_pda(i)->data_offset = ptr - __per_cpu_start;
-+ memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
-+ }
-+}
-+
-+#ifdef CONFIG_XEN
-+static void switch_pt(void)
-+{
-+ xen_pt_switch(__pa(init_level4_pgt));
-+ xen_new_user_pt(__pa(init_level4_user_pgt));
-+}
-+
-+void __cpuinit cpu_gdt_init(struct desc_ptr *gdt_descr)
-+{
-+ unsigned long frames[16];
-+ unsigned long va;
-+ int f;
-+
-+ for (va = gdt_descr->address, f = 0;
-+ va < gdt_descr->address + gdt_descr->size;
-+ va += PAGE_SIZE, f++) {
-+ frames[f] = virt_to_mfn(va);
-+ make_page_readonly(
-+ (void *)va, XENFEAT_writable_descriptor_tables);
-+ }
-+ if (HYPERVISOR_set_gdt(frames, gdt_descr->size /
-+ sizeof (struct desc_struct)))
-+ BUG();
-+}
-+#else
-+static void switch_pt(void)
-+{
-+ asm volatile("movq %0,%%cr3" :: "r" (__pa_symbol(&init_level4_pgt)));
-+}
-+
-+void __init cpu_gdt_init(struct desc_ptr *gdt_descr)
-+{
-+ asm volatile("lgdt %0" :: "m" (*gdt_descr));
-+ asm volatile("lidt %0" :: "m" (idt_descr));
-+}
-+#endif
-+
-+void pda_init(int cpu)
-+{
-+ struct x8664_pda *pda = cpu_pda(cpu);
-+
-+ /* Setup up data that may be needed in __get_free_pages early */
-+ asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0));
-+#ifndef CONFIG_XEN
-+ wrmsrl(MSR_GS_BASE, pda);
-+#else
-+ HYPERVISOR_set_segment_base(SEGBASE_GS_KERNEL, (unsigned long)pda);
-+#endif
-+ pda->cpunumber = cpu;
-+ pda->irqcount = -1;
-+ pda->kernelstack =
-+ (unsigned long)stack_thread_info() - PDA_STACKOFFSET + THREAD_SIZE;
-+ pda->active_mm = &init_mm;
-+ pda->mmu_state = 0;
-+
-+ if (cpu == 0) {
-+#ifdef CONFIG_XEN
-+ xen_init_pt();
-+#endif
-+ /* others are initialized in smpboot.c */
-+ pda->pcurrent = &init_task;
-+ pda->irqstackptr = boot_cpu_stack;
-+ } else {
-+ pda->irqstackptr = (char *)
-+ __get_free_pages(GFP_ATOMIC, IRQSTACK_ORDER);
-+ if (!pda->irqstackptr)
-+ panic("cannot allocate irqstack for cpu %d", cpu);
-+ }
-+
-+ switch_pt();
-+
-+ pda->irqstackptr += IRQSTACKSIZE-64;
-+}
-+
-+#ifndef CONFIG_X86_NO_TSS
-+char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]
-+__attribute__((section(".bss.page_aligned")));
-+#endif
-+
-+/* May not be marked __init: used by software suspend */
-+void syscall_init(void)
-+{
-+#ifndef CONFIG_XEN
-+ /*
-+ * LSTAR and STAR live in a bit strange symbiosis.
-+ * They both write to the same internal register. STAR allows to set CS/DS
-+ * but only a 32bit target. LSTAR sets the 64bit rip.
-+ */
-+ wrmsrl(MSR_STAR, ((u64)__USER32_CS)<<48 | ((u64)__KERNEL_CS)<<32);
-+ wrmsrl(MSR_LSTAR, system_call);
-+
-+ /* Flags to clear on syscall */
-+ wrmsrl(MSR_SYSCALL_MASK, EF_TF|EF_DF|EF_IE|0x3000);
-+#endif
-+#ifdef CONFIG_IA32_EMULATION
-+ syscall32_cpu_init ();
-+#endif
-+}
-+
-+void __cpuinit check_efer(void)
-+{
-+ unsigned long efer;
-+
-+ rdmsrl(MSR_EFER, efer);
-+ if (!(efer & EFER_NX) || do_not_nx) {
-+ __supported_pte_mask &= ~_PAGE_NX;
-+ }
-+}
-+
-+/*
-+ * cpu_init() initializes state that is per-CPU. Some data is already
-+ * initialized (naturally) in the bootstrap process, such as the GDT
-+ * and IDT. We reload them nevertheless, this function acts as a
-+ * 'CPU state barrier', nothing should get across.
-+ * A lot of state is already set up in PDA init.
-+ */
-+void __cpuinit cpu_init (void)
-+{
-+ int cpu = stack_smp_processor_id();
-+#ifndef CONFIG_X86_NO_TSS
-+ struct tss_struct *t = &per_cpu(init_tss, cpu);
-+ unsigned long v;
-+ char *estacks = NULL;
-+ unsigned i;
-+#endif
-+ struct task_struct *me;
-+
-+ /* CPU 0 is initialised in head64.c */
-+ if (cpu != 0) {
-+ pda_init(cpu);
-+ zap_low_mappings(cpu);
-+ }
-+#ifndef CONFIG_X86_NO_TSS
-+ else
-+ estacks = boot_exception_stacks;
-+#endif
-+
-+ me = current;
-+
-+ if (cpu_test_and_set(cpu, cpu_initialized))
-+ panic("CPU#%d already initialized!\n", cpu);
-+
-+ printk("Initializing CPU#%d\n", cpu);
-+
-+ clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE);
-+
-+ /*
-+ * Initialize the per-CPU GDT with the boot GDT,
-+ * and set up the GDT descriptor:
-+ */
-+#ifndef CONFIG_XEN
-+ if (cpu)
-+ memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE);
-+#endif
-+
-+ cpu_gdt_descr[cpu].size = GDT_SIZE;
-+ cpu_gdt_init(&cpu_gdt_descr[cpu]);
-+
-+ memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8);
-+ syscall_init();
-+
-+ wrmsrl(MSR_FS_BASE, 0);
-+ wrmsrl(MSR_KERNEL_GS_BASE, 0);
-+ barrier();
-+
-+ check_efer();
-+
-+#ifndef CONFIG_X86_NO_TSS
-+ /*
-+ * set up and load the per-CPU TSS
-+ */
-+ for (v = 0; v < N_EXCEPTION_STACKS; v++) {
-+ if (cpu) {
-+ static const unsigned int order[N_EXCEPTION_STACKS] = {
-+ [0 ... N_EXCEPTION_STACKS - 1] = EXCEPTION_STACK_ORDER,
-+ [DEBUG_STACK - 1] = DEBUG_STACK_ORDER
-+ };
-+
-+ estacks = (char *)__get_free_pages(GFP_ATOMIC, order[v]);
-+ if (!estacks)
-+ panic("Cannot allocate exception stack %ld %d\n",
-+ v, cpu);
-+ }
-+ switch (v + 1) {
-+#if DEBUG_STKSZ > EXCEPTION_STKSZ
-+ case DEBUG_STACK:
-+ cpu_pda[cpu].debugstack = (unsigned long)estacks;
-+ estacks += DEBUG_STKSZ;
-+ break;
-+#endif
-+ default:
-+ estacks += EXCEPTION_STKSZ;
-+ break;
-+ }
-+ t->ist[v] = (unsigned long)estacks;
-+ }
-+
-+ t->io_bitmap_base = offsetof(struct tss_struct, io_bitmap);
-+ /*
-+ * <= is required because the CPU will access up to
-+ * 8 bits beyond the end of the IO permission bitmap.
-+ */
-+ for (i = 0; i <= IO_BITMAP_LONGS; i++)
-+ t->io_bitmap[i] = ~0UL;
-+#endif
-+
-+ atomic_inc(&init_mm.mm_count);
-+ me->active_mm = &init_mm;
-+ if (me->mm)
-+ BUG();
-+ enter_lazy_tlb(&init_mm, me);
-+
-+#ifndef CONFIG_X86_NO_TSS
-+ set_tss_desc(cpu, t);
-+#endif
-+#ifndef CONFIG_XEN
-+ load_TR_desc();
-+#endif
-+ load_LDT(&init_mm.context);
-+
-+ /*
-+ * Clear all 6 debug registers:
-+ */
-+
-+ set_debug(0UL, 0);
-+ set_debug(0UL, 1);
-+ set_debug(0UL, 2);
-+ set_debug(0UL, 3);
-+ set_debug(0UL, 6);
-+ set_debug(0UL, 7);
-+
-+ fpu_init();
-+}
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/setup-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/setup-xen.c linux-2.6.16/arch/x86_64/kernel/setup-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/setup-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/setup-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1661 @@
+/*
+ * linux/arch/x86-64/kernel/setup.c
+}
+core_initcall(run_dmi_scan);
+
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/smp-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/smp-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/smp-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/smp-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/setup64-xen.c linux-2.6.16/arch/x86_64/kernel/setup64-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/setup64-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/setup64-xen.c 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,360 @@
++/*
++ * X86-64 specific CPU setup.
++ * Copyright (C) 1995 Linus Torvalds
++ * Copyright 2001, 2002, 2003 SuSE Labs / Andi Kleen.
++ * See setup.c for older changelog.
++ * $Id$
++ *
++ * Jun Nakajima <jun.nakajima@intel.com>
++ * Modified for Xen
++ *
++ */
++#include <linux/config.h>
++#include <linux/init.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/string.h>
++#include <linux/bootmem.h>
++#include <linux/bitops.h>
++#include <linux/module.h>
++#include <asm/bootsetup.h>
++#include <asm/pda.h>
++#include <asm/pgtable.h>
++#include <asm/processor.h>
++#include <asm/desc.h>
++#include <asm/atomic.h>
++#include <asm/mmu_context.h>
++#include <asm/smp.h>
++#include <asm/i387.h>
++#include <asm/percpu.h>
++#include <asm/proto.h>
++#include <asm/sections.h>
++#ifdef CONFIG_XEN
++#include <asm/hypervisor.h>
++#endif
++
++char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,};
++
++cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
++
++struct x8664_pda *_cpu_pda[NR_CPUS] __read_mostly;
++struct x8664_pda boot_cpu_pda[NR_CPUS] __cacheline_aligned;
++
++#ifndef CONFIG_X86_NO_IDT
++struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table };
++#endif
++
++char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned")));
++
++unsigned long __supported_pte_mask __read_mostly = ~0UL;
++static int do_not_nx __cpuinitdata = 0;
++
++/* noexec=on|off
++Control non executable mappings for 64bit processes.
++
++on Enable(default)
++off Disable
++*/
++int __init nonx_setup(char *str)
++{
++ if (!strncmp(str, "on", 2)) {
++ __supported_pte_mask |= _PAGE_NX;
++ do_not_nx = 0;
++ } else if (!strncmp(str, "off", 3)) {
++ do_not_nx = 1;
++ __supported_pte_mask &= ~_PAGE_NX;
++ }
++ return 0;
++}
++__setup("noexec=", nonx_setup); /* parsed early actually */
++
++int force_personality32 = READ_IMPLIES_EXEC;
++
++/* noexec32=on|off
++Control non executable heap for 32bit processes.
++To control the stack too use noexec=off
++
++on PROT_READ does not imply PROT_EXEC for 32bit processes
++off PROT_READ implies PROT_EXEC (default)
++*/
++static int __init nonx32_setup(char *str)
++{
++ if (!strcmp(str, "on"))
++ force_personality32 &= ~READ_IMPLIES_EXEC;
++ else if (!strcmp(str, "off"))
++ force_personality32 |= READ_IMPLIES_EXEC;
++ return 0;
++}
++__setup("noexec32=", nonx32_setup);
++
++/*
++ * Great future plan:
++ * Declare PDA itself and support (irqstack,tss,pgd) as per cpu data.
++ * Always point %gs to its beginning
++ */
++void __init setup_per_cpu_areas(void)
++{
++ int i;
++ unsigned long size;
++
++#ifdef CONFIG_HOTPLUG_CPU
++ prefill_possible_map();
++#endif
++
++ /* Copy section for each CPU (we discard the original) */
++ size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES);
++#ifdef CONFIG_MODULES
++ if (size < PERCPU_ENOUGH_ROOM)
++ size = PERCPU_ENOUGH_ROOM;
++#endif
++
++ for_each_cpu_mask (i, cpu_possible_map) {
++ char *ptr;
++
++ if (!NODE_DATA(cpu_to_node(i))) {
++ printk("cpu with no node %d, num_online_nodes %d\n",
++ i, num_online_nodes());
++ ptr = alloc_bootmem(size);
++ } else {
++ ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size);
++ }
++ if (!ptr)
++ panic("Cannot allocate cpu data for CPU %d\n", i);
++ cpu_pda(i)->data_offset = ptr - __per_cpu_start;
++ memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
++ }
++}
++
++#ifdef CONFIG_XEN
++static void switch_pt(void)
++{
++ xen_pt_switch(__pa(init_level4_pgt));
++ xen_new_user_pt(__pa(init_level4_user_pgt));
++}
++
++void __cpuinit cpu_gdt_init(struct desc_ptr *gdt_descr)
++{
++ unsigned long frames[16];
++ unsigned long va;
++ int f;
++
++ for (va = gdt_descr->address, f = 0;
++ va < gdt_descr->address + gdt_descr->size;
++ va += PAGE_SIZE, f++) {
++ frames[f] = virt_to_mfn(va);
++ make_page_readonly(
++ (void *)va, XENFEAT_writable_descriptor_tables);
++ }
++ if (HYPERVISOR_set_gdt(frames, gdt_descr->size /
++ sizeof (struct desc_struct)))
++ BUG();
++}
++#else
++static void switch_pt(void)
++{
++ asm volatile("movq %0,%%cr3" :: "r" (__pa_symbol(&init_level4_pgt)));
++}
++
++void __init cpu_gdt_init(struct desc_ptr *gdt_descr)
++{
++ asm volatile("lgdt %0" :: "m" (*gdt_descr));
++ asm volatile("lidt %0" :: "m" (idt_descr));
++}
++#endif
++
++void pda_init(int cpu)
++{
++ struct x8664_pda *pda = cpu_pda(cpu);
++
++ /* Setup up data that may be needed in __get_free_pages early */
++ asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0));
++#ifndef CONFIG_XEN
++ wrmsrl(MSR_GS_BASE, pda);
++#else
++ HYPERVISOR_set_segment_base(SEGBASE_GS_KERNEL, (unsigned long)pda);
++#endif
++ pda->cpunumber = cpu;
++ pda->irqcount = -1;
++ pda->kernelstack =
++ (unsigned long)stack_thread_info() - PDA_STACKOFFSET + THREAD_SIZE;
++ pda->active_mm = &init_mm;
++ pda->mmu_state = 0;
++
++ if (cpu == 0) {
++#ifdef CONFIG_XEN
++ xen_init_pt();
++#endif
++ /* others are initialized in smpboot.c */
++ pda->pcurrent = &init_task;
++ pda->irqstackptr = boot_cpu_stack;
++ } else {
++ pda->irqstackptr = (char *)
++ __get_free_pages(GFP_ATOMIC, IRQSTACK_ORDER);
++ if (!pda->irqstackptr)
++ panic("cannot allocate irqstack for cpu %d", cpu);
++ }
++
++ switch_pt();
++
++ pda->irqstackptr += IRQSTACKSIZE-64;
++}
++
++#ifndef CONFIG_X86_NO_TSS
++char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]
++__attribute__((section(".bss.page_aligned")));
++#endif
++
++/* May not be marked __init: used by software suspend */
++void syscall_init(void)
++{
++#ifndef CONFIG_XEN
++ /*
++ * LSTAR and STAR live in a bit strange symbiosis.
++ * They both write to the same internal register. STAR allows to set CS/DS
++ * but only a 32bit target. LSTAR sets the 64bit rip.
++ */
++ wrmsrl(MSR_STAR, ((u64)__USER32_CS)<<48 | ((u64)__KERNEL_CS)<<32);
++ wrmsrl(MSR_LSTAR, system_call);
++
++ /* Flags to clear on syscall */
++ wrmsrl(MSR_SYSCALL_MASK, EF_TF|EF_DF|EF_IE|0x3000);
++#endif
++#ifdef CONFIG_IA32_EMULATION
++ syscall32_cpu_init ();
++#endif
++}
++
++void __cpuinit check_efer(void)
++{
++ unsigned long efer;
++
++ rdmsrl(MSR_EFER, efer);
++ if (!(efer & EFER_NX) || do_not_nx) {
++ __supported_pte_mask &= ~_PAGE_NX;
++ }
++}
++
++/*
++ * cpu_init() initializes state that is per-CPU. Some data is already
++ * initialized (naturally) in the bootstrap process, such as the GDT
++ * and IDT. We reload them nevertheless, this function acts as a
++ * 'CPU state barrier', nothing should get across.
++ * A lot of state is already set up in PDA init.
++ */
++void __cpuinit cpu_init (void)
++{
++ int cpu = stack_smp_processor_id();
++#ifndef CONFIG_X86_NO_TSS
++ struct tss_struct *t = &per_cpu(init_tss, cpu);
++ unsigned long v;
++ char *estacks = NULL;
++ unsigned i;
++#endif
++ struct task_struct *me;
++
++ /* CPU 0 is initialised in head64.c */
++ if (cpu != 0) {
++ pda_init(cpu);
++ zap_low_mappings(cpu);
++ }
++#ifndef CONFIG_X86_NO_TSS
++ else
++ estacks = boot_exception_stacks;
++#endif
++
++ me = current;
++
++ if (cpu_test_and_set(cpu, cpu_initialized))
++ panic("CPU#%d already initialized!\n", cpu);
++
++ printk("Initializing CPU#%d\n", cpu);
++
++ clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE);
++
++ /*
++ * Initialize the per-CPU GDT with the boot GDT,
++ * and set up the GDT descriptor:
++ */
++#ifndef CONFIG_XEN
++ if (cpu)
++ memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE);
++#endif
++
++ cpu_gdt_descr[cpu].size = GDT_SIZE;
++ cpu_gdt_init(&cpu_gdt_descr[cpu]);
++
++ memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8);
++ syscall_init();
++
++ wrmsrl(MSR_FS_BASE, 0);
++ wrmsrl(MSR_KERNEL_GS_BASE, 0);
++ barrier();
++
++ check_efer();
++
++#ifndef CONFIG_X86_NO_TSS
++ /*
++ * set up and load the per-CPU TSS
++ */
++ for (v = 0; v < N_EXCEPTION_STACKS; v++) {
++ if (cpu) {
++ static const unsigned int order[N_EXCEPTION_STACKS] = {
++ [0 ... N_EXCEPTION_STACKS - 1] = EXCEPTION_STACK_ORDER,
++ [DEBUG_STACK - 1] = DEBUG_STACK_ORDER
++ };
++
++ estacks = (char *)__get_free_pages(GFP_ATOMIC, order[v]);
++ if (!estacks)
++ panic("Cannot allocate exception stack %ld %d\n",
++ v, cpu);
++ }
++ switch (v + 1) {
++#if DEBUG_STKSZ > EXCEPTION_STKSZ
++ case DEBUG_STACK:
++ cpu_pda[cpu].debugstack = (unsigned long)estacks;
++ estacks += DEBUG_STKSZ;
++ break;
++#endif
++ default:
++ estacks += EXCEPTION_STKSZ;
++ break;
++ }
++ t->ist[v] = (unsigned long)estacks;
++ }
++
++ t->io_bitmap_base = offsetof(struct tss_struct, io_bitmap);
++ /*
++ * <= is required because the CPU will access up to
++ * 8 bits beyond the end of the IO permission bitmap.
++ */
++ for (i = 0; i <= IO_BITMAP_LONGS; i++)
++ t->io_bitmap[i] = ~0UL;
++#endif
++
++ atomic_inc(&init_mm.mm_count);
++ me->active_mm = &init_mm;
++ if (me->mm)
++ BUG();
++ enter_lazy_tlb(&init_mm, me);
++
++#ifndef CONFIG_X86_NO_TSS
++ set_tss_desc(cpu, t);
++#endif
++#ifndef CONFIG_XEN
++ load_TR_desc();
++#endif
++ load_LDT(&init_mm.context);
++
++ /*
++ * Clear all 6 debug registers:
++ */
++
++ set_debug(0UL, 0);
++ set_debug(0UL, 1);
++ set_debug(0UL, 2);
++ set_debug(0UL, 3);
++ set_debug(0UL, 6);
++ set_debug(0UL, 7);
++
++ fpu_init();
++}
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/smp-xen.c linux-2.6.16/arch/x86_64/kernel/smp-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/smp-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/smp-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,596 @@
+/*
+ * Intel SMP support routines.
+ return 0; /* Should not happen */
+#endif
+}
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/traps-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/traps-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/traps-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/traps-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/traps-xen.c linux-2.6.16/arch/x86_64/kernel/traps-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/traps-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/traps-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1023 @@
+/*
+ * linux/arch/x86-64/traps.c
+}
+__setup("kstack=", kstack_setup);
+
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/vsyscall-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/vsyscall-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/vsyscall-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/vsyscall-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/vsyscall-xen.c linux-2.6.16/arch/x86_64/kernel/vsyscall-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/vsyscall-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/vsyscall-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,239 @@
+/*
+ * linux/arch/x86_64/kernel/vsyscall.c
+}
+
+__initcall(vsyscall_init);
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/x8664_ksyms-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/x8664_ksyms-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/kernel/x8664_ksyms-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/x8664_ksyms-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/x8664_ksyms-xen.c linux-2.6.16/arch/x86_64/kernel/x8664_ksyms-xen.c
+--- linux-2.6.16.orig/arch/x86_64/kernel/x8664_ksyms-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/x8664_ksyms-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,163 @@
+#include <linux/config.h>
+#include <linux/module.h>
+
+EXPORT_SYMBOL(load_gs_index);
+
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/kernel/xen_entry.S tmp-linux-2.6-xen.patch/arch/x86_64/kernel/xen_entry.S
---- ref-linux-2.6.16.9/arch/x86_64/kernel/xen_entry.S 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/xen_entry.S 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/kernel/xen_entry.S linux-2.6.16/arch/x86_64/kernel/xen_entry.S
+--- linux-2.6.16.orig/arch/x86_64/kernel/xen_entry.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/kernel/xen_entry.S 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,40 @@
+/*
+ * Copied from arch/xen/i386/kernel/entry.S
+VGCF_IN_SYSCALL = (1<<8)
+
+
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/Makefile
---- ref-linux-2.6.16.9/arch/x86_64/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -31,6 +31,10 @@ cflags-$(CONFIG_MK8) += $(call cc-option
- cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
- CFLAGS += $(cflags-y)
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/mm/Makefile linux-2.6.16/arch/x86_64/mm/Makefile
+--- linux-2.6.16.orig/arch/x86_64/mm/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/x86_64/mm/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -9,3 +9,13 @@
+ obj-$(CONFIG_ACPI_NUMA) += srat.o
-+cppflags-$(CONFIG_XEN) += \
-+ -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION)
-+CPPFLAGS += $(cppflags-y)
+ hugetlbpage-y = ../../i386/mm/hugetlbpage.o
+
- CFLAGS += -m64
- CFLAGS += -mno-red-zone
- CFLAGS += -mcmodel=kernel
-@@ -70,6 +74,21 @@ boot := arch/x86_64/boot
- .PHONY: bzImage bzlilo install archmrproper \
- fdimage fdimage144 fdimage288 archclean
-
+ifdef CONFIG_XEN
-+CPPFLAGS := -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS)
-+head-y := arch/x86_64/kernel/head-xen.o arch/x86_64/kernel/head64-xen.o arch/x86_64/kernel/init_task.o
-+LDFLAGS_vmlinux := -e _start
-+boot := arch/i386/boot-xen
-+.PHONY: vmlinuz
-+#Default target when executing "make"
-+all: vmlinuz
++include $(srctree)/scripts/Makefile.xen
+
-+vmlinuz: vmlinux
-+ $(Q)$(MAKE) $(build)=$(boot) $@
++ioremap-y += ../../i386/mm/ioremap-xen.o
++hypervisor-y += ../../i386/mm/hypervisor.o
++obj-y += hypervisor.o
+
-+install:
-+ $(Q)$(MAKE) $(build)=$(boot) XENGUEST=$(XENGUEST) $@
-+else
- #Default target when executing "make"
- all: bzImage
-
-@@ -90,6 +109,7 @@ fdimage fdimage144 fdimage288: vmlinux
-
- install:
- $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
++obj-y := $(call cherrypickxen, $(obj-y))
+endif
-
- archclean:
- $(Q)$(MAKE) $(clean)=$(boot)
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/mm/fault-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/mm/fault-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/mm/fault-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/mm/fault-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/mm/fault-xen.c linux-2.6.16/arch/x86_64/mm/fault-xen.c
+--- linux-2.6.16.orig/arch/x86_64/mm/fault-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/mm/fault-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,595 @@
+/*
+ * linux/arch/x86-64/mm/fault.c
+ return 0;
+}
+__setup("pagefaulttrace", enable_pagefaulttrace);
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/mm/init-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/mm/init-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/mm/init-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/mm/init-xen.c linux-2.6.16/arch/x86_64/mm/init-xen.c
+--- linux-2.6.16.orig/arch/x86_64/mm/init-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/mm/init-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1101 @@
+/*
+ * linux/arch/x86_64/mm/init.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/mm/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/mm/Makefile
---- ref-linux-2.6.16.9/arch/x86_64/mm/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/mm/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -9,3 +9,13 @@ obj-$(CONFIG_K8_NUMA) += k8topology.o
- obj-$(CONFIG_ACPI_NUMA) += srat.o
-
- hugetlbpage-y = ../../i386/mm/hugetlbpage.o
-+
-+ifdef CONFIG_XEN
-+include $(srctree)/scripts/Makefile.xen
-+
-+ioremap-y += ../../i386/mm/ioremap-xen.o
-+hypervisor-y += ../../i386/mm/hypervisor.o
-+obj-y += hypervisor.o
-+
-+obj-y := $(call cherrypickxen, $(obj-y))
-+endif
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/mm/pageattr-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/mm/pageattr-xen.c
---- ref-linux-2.6.16.9/arch/x86_64/mm/pageattr-xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/mm/pageattr-xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/mm/pageattr-xen.c linux-2.6.16/arch/x86_64/mm/pageattr-xen.c
+--- linux-2.6.16.orig/arch/x86_64/mm/pageattr-xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/arch/x86_64/mm/pageattr-xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,401 @@
+/*
+ * Copyright 2002 Andi Kleen, SuSE Labs.
+
+EXPORT_SYMBOL(change_page_attr);
+EXPORT_SYMBOL(global_flush_tlb);
-diff -Nurp ref-linux-2.6.16.9/arch/x86_64/pci/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/pci/Makefile
---- ref-linux-2.6.16.9/arch/x86_64/pci/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/pci/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -15,10 +15,22 @@ obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/arch/x86_64/pci/Makefile linux-2.6.16/arch/x86_64/pci/Makefile
+--- linux-2.6.16.orig/arch/x86_64/pci/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/arch/x86_64/pci/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -15,10 +15,22 @@
obj-$(CONFIG_NUMA) += k8-bus.o
+
+obj-y := $(call cherrypickxen, $(obj-y))
+endif
-diff -Nurp ref-linux-2.6.16.9/drivers/acpi/Kconfig tmp-linux-2.6-xen.patch/drivers/acpi/Kconfig
---- ref-linux-2.6.16.9/drivers/acpi/Kconfig 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/drivers/acpi/Kconfig 2006-04-10 00:05:52.000000000 +0200
-@@ -46,7 +46,7 @@ if ACPI
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/Makefile linux-2.6.16/drivers/Makefile
+--- linux-2.6.16.orig/drivers/Makefile 2006-06-26 09:49:45.000000000 +0200
++++ linux-2.6.16/drivers/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -33,6 +33,7 @@
+ obj-$(CONFIG_NUBUS) += nubus/
+ obj-$(CONFIG_ATM) += atm/
+ obj-$(CONFIG_PPC_PMAC) += macintosh/
++obj-$(CONFIG_XEN) += xen/
+ obj-$(CONFIG_IDE) += ide/
+ obj-$(CONFIG_FC4) += fc4/
+ obj-$(CONFIG_SCSI) += scsi/
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/acpi/Kconfig linux-2.6.16/drivers/acpi/Kconfig
+--- linux-2.6.16.orig/drivers/acpi/Kconfig 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/drivers/acpi/Kconfig 2006-06-26 09:51:32.000000000 +0200
+@@ -46,7 +46,7 @@
config ACPI_SLEEP
bool "Sleep States"
depends on PM
default y
---help---
-@@ -287,6 +287,7 @@ config ACPI_SYSTEM
+@@ -287,6 +287,7 @@
config X86_PM_TIMER
bool "Power Management Timer Support" if EMBEDDED
depends on X86
default y
help
The Power Management Timer is available on all ACPI-capable,
-diff -Nurp ref-linux-2.6.16.9/drivers/acpi/tables.c tmp-linux-2.6-xen.patch/drivers/acpi/tables.c
---- ref-linux-2.6.16.9/drivers/acpi/tables.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/drivers/acpi/tables.c 2006-04-10 00:05:52.000000000 +0200
-@@ -572,6 +572,11 @@ static int __init acpi_table_get_sdt(str
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/acpi/tables.c linux-2.6.16/drivers/acpi/tables.c
+--- linux-2.6.16.orig/drivers/acpi/tables.c 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/drivers/acpi/tables.c 2006-06-26 09:51:32.000000000 +0200
+@@ -572,6 +572,11 @@
*
* result: sdt_entry[] is initialized
*/
int __init acpi_table_init(void)
{
-@@ -587,7 +592,7 @@ int __init acpi_table_init(void)
+@@ -587,7 +592,7 @@
return -ENODEV;
}
if (!rsdp) {
printk(KERN_WARNING PREFIX "Unable to map RSDP\n");
return -ENODEV;
-diff -Nurp ref-linux-2.6.16.9/drivers/char/mem.c tmp-linux-2.6-xen.patch/drivers/char/mem.c
---- ref-linux-2.6.16.9/drivers/char/mem.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/drivers/char/mem.c 2006-04-10 00:05:52.000000000 +0200
-@@ -108,6 +108,7 @@ static inline int valid_mmap_phys_addr_r
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/char/mem.c linux-2.6.16/drivers/char/mem.c
+--- linux-2.6.16.orig/drivers/char/mem.c 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/drivers/char/mem.c 2006-06-26 09:51:32.000000000 +0200
+@@ -108,6 +108,7 @@
}
#endif
/*
* This funcion reads the *physical* memory. The f_pos points directly to the
* memory location.
-@@ -232,6 +233,7 @@ static ssize_t write_mem(struct file * f
+@@ -232,6 +233,7 @@
*ppos += written;
return written;
}
#ifndef __HAVE_PHYS_MEM_ACCESS_PROT
static pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
-@@ -773,6 +775,7 @@ static int open_port(struct inode * inod
+@@ -773,6 +775,7 @@
#define open_kmem open_mem
#define open_oldmem open_mem
static struct file_operations mem_fops = {
.llseek = memory_lseek,
.read = read_mem,
-@@ -780,6 +783,9 @@ static struct file_operations mem_fops =
+@@ -780,6 +783,9 @@
.mmap = mmap_mem,
.open = open_mem,
};
static struct file_operations kmem_fops = {
.llseek = memory_lseek,
-diff -Nurp ref-linux-2.6.16.9/drivers/char/tpm/Kconfig tmp-linux-2.6-xen.patch/drivers/char/tpm/Kconfig
---- ref-linux-2.6.16.9/drivers/char/tpm/Kconfig 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/drivers/char/tpm/Kconfig 2006-04-10 00:05:52.000000000 +0200
-@@ -22,7 +22,7 @@ config TCG_TPM
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/char/tpm/Kconfig linux-2.6.16/drivers/char/tpm/Kconfig
+--- linux-2.6.16.orig/drivers/char/tpm/Kconfig 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/drivers/char/tpm/Kconfig 2006-06-26 09:51:32.000000000 +0200
+@@ -22,7 +22,7 @@
config TCG_NSC
tristate "National Semiconductor TPM Interface"
---help---
If you have a TPM security chip from National Semicondutor
say Yes and it will be accessible from within Linux. To
-@@ -31,7 +31,7 @@ config TCG_NSC
+@@ -31,7 +31,7 @@
config TCG_ATMEL
tristate "Atmel TPM Interface"
---help---
If you have a TPM security chip from Atmel say Yes and it
will be accessible from within Linux. To compile this driver
-@@ -49,5 +49,15 @@ config TCG_INFINEON
+@@ -49,5 +49,15 @@
Further information on this driver and the supported hardware
can be found at http://www.prosec.rub.de/tpm
+
endmenu
-diff -Nurp ref-linux-2.6.16.9/drivers/char/tpm/Makefile tmp-linux-2.6-xen.patch/drivers/char/tpm/Makefile
---- ref-linux-2.6.16.9/drivers/char/tpm/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/drivers/char/tpm/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -8,3 +8,4 @@ endif
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/char/tpm/Makefile linux-2.6.16/drivers/char/tpm/Makefile
+--- linux-2.6.16.orig/drivers/char/tpm/Makefile 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/drivers/char/tpm/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -8,3 +8,4 @@
obj-$(CONFIG_TCG_NSC) += tpm_nsc.o
obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o
obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o
+obj-$(CONFIG_TCG_XEN) += tpm_xen.o
-diff -Nurp ref-linux-2.6.16.9/drivers/char/tpm/tpm.c tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm.c
---- ref-linux-2.6.16.9/drivers/char/tpm/tpm.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/char/tpm/tpm.c linux-2.6.16/drivers/char/tpm/tpm.c
+--- linux-2.6.16.orig/drivers/char/tpm/tpm.c 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/drivers/char/tpm/tpm.c 2006-06-26 09:51:32.000000000 +0200
@@ -30,7 +30,8 @@
enum tpm_const {
TPM_NUM_DEVICES = 256,
TPM_NUM_MASK_ENTRIES = TPM_NUM_DEVICES / (8 * sizeof(int))
};
-@@ -52,14 +53,14 @@ static void timeout_work(void * ptr)
+@@ -52,14 +53,14 @@
down(&chip->buffer_mutex);
atomic_set(&chip->data_pending, 0);
size_t bufsiz)
{
ssize_t rc;
-@@ -351,7 +352,7 @@ int tpm_open(struct inode *inode, struct
+@@ -351,7 +352,7 @@
spin_unlock(&driver_lock);
if (chip->data_buffer == NULL) {
chip->num_opens--;
put_device(chip->dev);
-@@ -399,8 +400,8 @@ ssize_t tpm_write(struct file *file, con
+@@ -399,8 +400,8 @@
down(&chip->buffer_mutex);
if (copy_from_user
(chip->data_buffer, (void __user *) buf, in_size)) {
-@@ -409,9 +410,11 @@ ssize_t tpm_write(struct file *file, con
+@@ -409,9 +410,11 @@
}
/* atomic tpm command send and result receive */
up(&chip->buffer_mutex);
/* Set a timeout by which the reader must come claim the result */
-@@ -427,20 +430,33 @@ ssize_t tpm_read(struct file * file, cha
+@@ -427,20 +430,33 @@
{
struct tpm_chip *chip = file->private_data;
int ret_size;
return ret_size;
}
-@@ -544,6 +560,12 @@ int tpm_register_hardware(struct device
+@@ -544,6 +560,12 @@
chip->user_read_timer.data = (unsigned long) chip;
chip->vendor = entry;
chip->dev_num = -1;
-diff -Nurp ref-linux-2.6.16.9/drivers/char/tpm/tpm.h tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm.h
---- ref-linux-2.6.16.9/drivers/char/tpm/tpm.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm.h 2006-04-10 00:05:52.000000000 +0200
-@@ -50,6 +50,7 @@ struct tpm_vendor_specific {
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/char/tpm/tpm.h linux-2.6.16/drivers/char/tpm/tpm.h
+--- linux-2.6.16.orig/drivers/char/tpm/tpm.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/drivers/char/tpm/tpm.h 2006-06-26 09:51:32.000000000 +0200
+@@ -50,6 +50,7 @@
u8 req_complete_mask;
u8 req_complete_val;
u8 req_canceled;
void __iomem *iobase; /* ioremapped address */
unsigned long base; /* TPM base address */
-@@ -74,6 +75,7 @@ struct tpm_chip {
+@@ -74,6 +75,7 @@
/* Data passed to and from the tpm via the read/write calls */
u8 *data_buffer;
atomic_t data_pending;
struct semaphore buffer_mutex;
struct timer_list user_read_timer; /* user needs to claim result */
-@@ -99,6 +101,11 @@ static inline void tpm_write_index(int b
+@@ -99,6 +101,11 @@
outb(value & 0xFF, base+1);
}
extern int tpm_register_hardware(struct device *,
struct tpm_vendor_specific *);
extern int tpm_open(struct inode *, struct file *);
-diff -Nurp ref-linux-2.6.16.9/drivers/char/tpm/tpm_xen.c tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm_xen.c
---- ref-linux-2.6.16.9/drivers/char/tpm/tpm_xen.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm_xen.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/char/tpm/tpm_xen.c linux-2.6.16/drivers/char/tpm/tpm_xen.c
+--- linux-2.6.16.orig/drivers/char/tpm/tpm_xen.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/char/tpm/tpm_xen.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,536 @@
+/*
+ * Copyright (C) 2004 IBM Corporation
+MODULE_DESCRIPTION("TPM Driver for XEN (shared memory)");
+MODULE_VERSION("1.0");
+MODULE_LICENSE("GPL");
-diff -Nurp ref-linux-2.6.16.9/drivers/char/tty_io.c tmp-linux-2.6-xen.patch/drivers/char/tty_io.c
---- ref-linux-2.6.16.9/drivers/char/tty_io.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/drivers/char/tty_io.c 2006-04-10 00:05:52.000000000 +0200
-@@ -132,6 +132,8 @@ LIST_HEAD(tty_drivers); /* linked list
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/char/tty_io.c linux-2.6.16/drivers/char/tty_io.c
+--- linux-2.6.16.orig/drivers/char/tty_io.c 2006-06-26 09:49:46.000000000 +0200
++++ linux-2.6.16/drivers/char/tty_io.c 2006-06-26 09:51:32.000000000 +0200
+@@ -133,6 +133,8 @@
vt.c for deeply disgusting hack reasons */
DECLARE_MUTEX(tty_sem);
#ifdef CONFIG_UNIX98_PTYS
extern struct tty_driver *ptm_driver; /* Unix98 pty masters; for /dev/ptmx */
extern int pty_limit; /* Config limit on Unix98 ptys */
-@@ -2054,7 +2056,7 @@ retry_open:
+@@ -2055,7 +2057,7 @@
goto got_driver;
}
#ifdef CONFIG_VT
extern struct tty_driver *console_driver;
driver = console_driver;
index = fg_console;
-@@ -3237,6 +3239,8 @@ static int __init tty_init(void)
+@@ -3247,6 +3249,8 @@
#endif
#ifdef CONFIG_VT
cdev_init(&vc0_cdev, &console_fops);
if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
-@@ -3245,6 +3249,7 @@ static int __init tty_init(void)
+@@ -3255,6 +3259,7 @@
class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
vty_init();
#endif
return 0;
}
-diff -Nurp ref-linux-2.6.16.9/drivers/firmware/Kconfig tmp-linux-2.6-xen.patch/drivers/firmware/Kconfig
---- ref-linux-2.6.16.9/drivers/firmware/Kconfig 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/drivers/firmware/Kconfig 2006-04-10 00:05:52.000000000 +0200
-@@ -8,7 +8,7 @@ menu "Firmware Drivers"
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/firmware/Kconfig linux-2.6.16/drivers/firmware/Kconfig
+--- linux-2.6.16.orig/drivers/firmware/Kconfig 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/drivers/firmware/Kconfig 2006-06-26 09:51:32.000000000 +0200
+@@ -8,7 +8,7 @@
config EDD
tristate "BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)"
depends on EXPERIMENTAL
help
Say Y or M here if you want to enable BIOS Enhanced Disk Drive
Services real mode BIOS calls to determine which disk
-diff -Nurp ref-linux-2.6.16.9/drivers/Makefile tmp-linux-2.6-xen.patch/drivers/Makefile
---- ref-linux-2.6.16.9/drivers/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/drivers/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -34,6 +34,7 @@ obj-y += base/ block/ misc/ mfd/ net/
- obj-$(CONFIG_NUBUS) += nubus/
- obj-$(CONFIG_ATM) += atm/
- obj-$(CONFIG_PPC_PMAC) += macintosh/
-+obj-$(CONFIG_XEN) += xen/
- obj-$(CONFIG_IDE) += ide/
- obj-$(CONFIG_FC4) += fc4/
- obj-$(CONFIG_SCSI) += scsi/
-diff -Nurp ref-linux-2.6.16.9/drivers/pci/Kconfig tmp-linux-2.6-xen.patch/drivers/pci/Kconfig
---- ref-linux-2.6.16.9/drivers/pci/Kconfig 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/drivers/pci/Kconfig 2006-04-10 00:05:52.000000000 +0200
-@@ -5,6 +5,7 @@ config PCI_MSI
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/pci/Kconfig linux-2.6.16/drivers/pci/Kconfig
+--- linux-2.6.16.orig/drivers/pci/Kconfig 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/drivers/pci/Kconfig 2006-06-26 09:51:32.000000000 +0200
+@@ -5,6 +5,7 @@
bool "Message Signaled Interrupts (MSI and MSI-X)"
depends on PCI
depends on (X86_LOCAL_APIC && X86_IO_APIC) || IA64
help
This allows device drivers to enable MSI (Message Signaled
Interrupts). Message Signaled Interrupts enable a device to
-diff -Nurp ref-linux-2.6.16.9/drivers/serial/Kconfig tmp-linux-2.6-xen.patch/drivers/serial/Kconfig
---- ref-linux-2.6.16.9/drivers/serial/Kconfig 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/drivers/serial/Kconfig 2006-04-10 00:05:52.000000000 +0200
-@@ -11,6 +11,7 @@ menu "Serial drivers"
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/serial/Kconfig linux-2.6.16/drivers/serial/Kconfig
+--- linux-2.6.16.orig/drivers/serial/Kconfig 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/drivers/serial/Kconfig 2006-06-26 09:51:32.000000000 +0200
+@@ -11,6 +11,7 @@
config SERIAL_8250
tristate "8250/16550 and compatible serial support"
depends on (BROKEN || !SPARC)
select SERIAL_CORE
---help---
This selects whether you want to include the driver for the standard
-diff -Nurp ref-linux-2.6.16.9/drivers/video/Kconfig tmp-linux-2.6-xen.patch/drivers/video/Kconfig
---- ref-linux-2.6.16.9/drivers/video/Kconfig 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/drivers/video/Kconfig 2006-04-10 00:05:52.000000000 +0200
-@@ -495,7 +495,7 @@ config FB_HGA_ACCEL
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/video/Kconfig linux-2.6.16/drivers/video/Kconfig
+--- linux-2.6.16.orig/drivers/video/Kconfig 2006-06-26 09:49:45.000000000 +0200
++++ linux-2.6.16/drivers/video/Kconfig 2006-06-26 09:51:32.000000000 +0200
+@@ -537,7 +537,7 @@
config VIDEO_SELECT
bool
default y
config FB_SGIVW
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen.patch/drivers/xen/balloon/balloon.c
---- ref-linux-2.6.16.9/drivers/xen/balloon/balloon.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/balloon/balloon.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/Kconfig linux-2.6.16/drivers/xen/Kconfig
+--- linux-2.6.16.orig/drivers/xen/Kconfig 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/Kconfig 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,212 @@
++#
++# This Kconfig describe xen options
++#
++
++mainmenu "Xen Configuration"
++
++config XEN
++ bool
++ default y if X86_XEN || X86_64_XEN
++ help
++ This is the Linux Xen port.
++
++if XEN
++config XEN_INTERFACE_VERSION
++ hex
++ default 0x00030101
++
++menu "XEN"
++
++config XEN_PRIVILEGED_GUEST
++ bool "Privileged Guest (domain 0)"
++ depends XEN
++ default n
++ help
++ Support for privileged operation (domain 0)
++
++config XEN_UNPRIVILEGED_GUEST
++ bool
++ default !XEN_PRIVILEGED_GUEST
++
++config XEN_PCIDEV_BACKEND
++ tristate "PCI device backend driver"
++ depends PCI
++ default XEN_PRIVILEGED_GUEST
++ help
++ The PCI device backend driver allows the kernel to export arbitrary
++ PCI devices to other guests. If you select this to be a module, you
++ will need to make sure no other driver has bound to the device(s)
++ you want to make visible to other guests.
++
++choice
++ prompt "PCI Backend Mode"
++ depends on XEN_PCIDEV_BACKEND
++ default XEN_PCIDEV_BACKEND_VPCI
++
++config XEN_PCIDEV_BACKEND_VPCI
++ bool "Virtual PCI"
++ ---help---
++ This PCI Backend hides the true PCI topology and makes the frontend
++ think there is a single PCI bus with only the exported devices on it.
++ For example, a device at 03:05.0 will be re-assigned to 00:00.0. A
++ second device at 02:1a.0 will be re-assigned to 00:01.0.
++
++config XEN_PCIDEV_BACKEND_PASS
++ bool "Passthrough"
++ ---help---
++ This PCI Backend provides a real view of the PCI topology to the
++ frontend (for example, a device at 06:01.b will still appear at
++ 06:01.b to the frontend). This is similar to how Xen 2.0.x exposed
++ PCI devices to its driver domains. This may be required for drivers
++ which depend on finding their hardward in certain bus/slot
++ locations.
++
++endchoice
++
++config XEN_PCIDEV_BE_DEBUG
++ bool "PCI Backend Debugging"
++ depends on XEN_PCIDEV_BACKEND
++ default n
++
++config XEN_BLKDEV_BACKEND
++ tristate "Block-device backend driver"
++ default y
++ help
++ The block-device backend driver allows the kernel to export its
++ block devices to other guests via a high-performance shared-memory
++ interface.
++
++config XEN_BLKDEV_TAP_BE
++ tristate "Block Tap support for backend driver (DANGEROUS)"
++ depends on XEN_BLKDEV_BACKEND
++ default n
++ help
++ If you intend to use the block tap driver, the backend domain will
++ not know the domain id of the real frontend, and so will not be able
++ to map its data pages. This modifies the backend to attempt to map
++ from both the tap domain and the real frontend. This presents a
++ security risk, and so should ONLY be used for development
++ with the blktap. This option will be removed as the block drivers are
++ modified to use grant tables.
++
++config XEN_NETDEV_BACKEND
++ tristate "Network-device backend driver"
++ default y
++ help
++ The network-device backend driver allows the kernel to export its
++ network devices to other guests via a high-performance shared-memory
++ interface.
++
++config XEN_NETDEV_PIPELINED_TRANSMITTER
++ bool "Pipelined transmitter (DANGEROUS)"
++ depends on XEN_NETDEV_BACKEND
++ default n
++ help
++ If the net backend is a dumb domain, such as a transparent Ethernet
++ bridge with no local IP interface, it is safe to say Y here to get
++ slightly lower network overhead.
++ If the backend has a local IP interface; or may be doing smart things
++ like reassembling packets to perform firewall filtering; or if you
++ are unsure; or if you experience network hangs when this option is
++ enabled; then you must say N here.
++
++config XEN_NETDEV_LOOPBACK
++ tristate "Network-device loopback driver"
++ depends on XEN_NETDEV_BACKEND
++ default y
++ help
++ A two-interface loopback device to emulate a local netfront-netback
++ connection.
++
++config XEN_TPMDEV_BACKEND
++ tristate "TPM-device backend driver"
++ default n
++ help
++ The TPM-device backend driver
++
++config XEN_TPMDEV_CLOSE_IF_VTPM_FAILS
++ bool "TPM backend closes upon vTPM failure"
++ depends on XEN_TPMDEV_BACKEND
++ default n
++ help
++ The TPM backend closes the channel if the vTPM in userspace indicates
++ a failure. The corresponding domain's channel will be closed.
++ Say Y if you want this feature.
++
++config XEN_BLKDEV_FRONTEND
++ tristate "Block-device frontend driver"
++ depends on XEN
++ default y
++ help
++ The block-device frontend driver allows the kernel to access block
++ devices mounted within another guest OS. Unless you are building a
++ dedicated device-driver domain, or your master control domain
++ (domain 0), then you almost certainly want to say Y here.
++
++config XEN_NETDEV_FRONTEND
++ tristate "Network-device frontend driver"
++ depends on XEN
++ default y
++ help
++ The network-device frontend driver allows the kernel to access
++ network interfaces within another guest OS. Unless you are building a
++ dedicated device-driver domain, or your master control domain
++ (domain 0), then you almost certainly want to say Y here.
++
++config XEN_BLKDEV_TAP
++ tristate "Block device tap driver"
++ default n
++ help
++ This driver allows a VM to interact on block device channels
++ to other VMs. Block messages may be passed through or redirected
++ to a character device, allowing device prototyping in application
++ space. Odds are that you want to say N here.
++
++config XEN_TPMDEV_FRONTEND
++ tristate "TPM-device frontend driver"
++ default n
++ select TCG_TPM
++ select TCG_XEN
++ help
++ The TPM-device frontend driver.
++
++config XEN_SCRUB_PAGES
++ bool "Scrub memory before freeing it to Xen"
++ default y
++ help
++ Erase memory contents before freeing it back to Xen's global
++ pool. This ensures that any secrets contained within that
++ memory (e.g., private keys) cannot be found by other guests that
++ may be running on the machine. Most people will want to say Y here.
++ If security is not a concern then you may increase performance by
++ saying N.
++
++config XEN_DISABLE_SERIAL
++ bool "Disable serial port drivers"
++ default y
++ help
++ Disable serial port drivers, allowing the Xen console driver
++ to provide a serial console at ttyS0.
++
++config XEN_SYSFS
++ tristate "Export Xen attributes in sysfs"
++ depends on SYSFS
++ default y
++ help
++ Xen hypervisor attributes will show up under /sys/hypervisor/.
++
++endmenu
++
++config HAVE_ARCH_ALLOC_SKB
++ bool
++ default y
++
++config HAVE_ARCH_DEV_ALLOC_SKB
++ bool
++ default y
++
++config NO_IDLE_HZ
++ bool
++ default y
++
++endif
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/Makefile linux-2.6.16/drivers/xen/Makefile
+--- linux-2.6.16.orig/drivers/xen/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,22 @@
++
++obj-y += net_driver_util.o
++obj-y += util.o
++
++obj-y += core/
++obj-y += char/
++obj-y += console/
++obj-y += evtchn/
++obj-y += balloon/
++obj-y += privcmd/
++obj-y += xenbus/
++
++obj-$(CONFIG_XEN_BLKDEV_BACKEND) += blkback/
++obj-$(CONFIG_XEN_NETDEV_BACKEND) += netback/
++obj-$(CONFIG_XEN_TPMDEV_BACKEND) += tpmback/
++obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += blkfront/
++obj-$(CONFIG_XEN_NETDEV_FRONTEND) += netfront/
++obj-$(CONFIG_XEN_BLKDEV_TAP) += blktap/
++obj-$(CONFIG_XEN_TPMDEV_FRONTEND) += tpmfront/
++obj-$(CONFIG_XEN_PCIDEV_BACKEND) += pciback/
++obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += pcifront/
++
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/balloon/Makefile linux-2.6.16/drivers/xen/balloon/Makefile
+--- linux-2.6.16.orig/drivers/xen/balloon/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/balloon/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,2 @@
++
++obj-y += balloon.o
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/balloon/balloon.c linux-2.6.16/drivers/xen/balloon/balloon.c
+--- linux-2.6.16.orig/drivers/xen/balloon/balloon.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/balloon/balloon.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,592 @@
+/******************************************************************************
+ * balloon.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/balloon/Makefile tmp-linux-2.6-xen.patch/drivers/xen/balloon/Makefile
---- ref-linux-2.6.16.9/drivers/xen/balloon/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/balloon/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,2 @@
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blkback/Makefile linux-2.6.16/drivers/xen/blkback/Makefile
+--- linux-2.6.16.orig/drivers/xen/blkback/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blkback/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,3 @@
++obj-$(CONFIG_XEN_BLKDEV_BACKEND) := blkbk.o
+
-+obj-y += balloon.o
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/blkback.c
---- ref-linux-2.6.16.9/drivers/xen/blkback/blkback.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/blkback.c 2006-04-10 00:05:52.000000000 +0200
++blkbk-y := blkback.o xenbus.o interface.o vbd.o
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blkback/blkback.c linux-2.6.16/drivers/xen/blkback/blkback.c
+--- linux-2.6.16.orig/drivers/xen/blkback/blkback.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blkback/blkback.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,604 @@
+/******************************************************************************
+ * arch/xen/drivers/blkif/backend/main.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blkback/common.h tmp-linux-2.6-xen.patch/drivers/xen/blkback/common.h
---- ref-linux-2.6.16.9/drivers/xen/blkback/common.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/common.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blkback/common.h linux-2.6.16/drivers/xen/blkback/common.h
+--- linux-2.6.16.orig/drivers/xen/blkback/common.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blkback/common.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,150 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blkback/interface.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/interface.c
---- ref-linux-2.6.16.9/drivers/xen/blkback/interface.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/interface.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blkback/interface.c linux-2.6.16/drivers/xen/blkback/interface.c
+--- linux-2.6.16.orig/drivers/xen/blkback/interface.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blkback/interface.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,188 @@
+/******************************************************************************
+ * arch/xen/drivers/blkif/backend/interface.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blkback/Makefile tmp-linux-2.6-xen.patch/drivers/xen/blkback/Makefile
---- ref-linux-2.6.16.9/drivers/xen/blkback/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,3 @@
-+obj-$(CONFIG_XEN_BLKDEV_BACKEND) := blkbk.o
-+
-+blkbk-y := blkback.o xenbus.o interface.o vbd.o
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blkback/vbd.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/vbd.c
---- ref-linux-2.6.16.9/drivers/xen/blkback/vbd.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/vbd.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blkback/vbd.c linux-2.6.16/drivers/xen/blkback/vbd.c
+--- linux-2.6.16.orig/drivers/xen/blkback/vbd.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blkback/vbd.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,126 @@
+/******************************************************************************
+ * blkback/vbd.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blkback/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/xenbus.c
---- ref-linux-2.6.16.9/drivers/xen/blkback/xenbus.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/xenbus.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blkback/xenbus.c linux-2.6.16/drivers/xen/blkback/xenbus.c
+--- linux-2.6.16.orig/drivers/xen/blkback/xenbus.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blkback/xenbus.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,430 @@
+/* Xenbus code for blkif backend
+ Copyright (C) 2005 Rusty Russell <rusty@rustcorp.com.au>
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-xen.patch/drivers/xen/blkfront/blkfront.c
---- ref-linux-2.6.16.9/drivers/xen/blkfront/blkfront.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/blkfront.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blkfront/Makefile linux-2.6.16/drivers/xen/blkfront/Makefile
+--- linux-2.6.16.orig/drivers/xen/blkfront/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blkfront/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,5 @@
++
++obj-$(CONFIG_XEN_BLKDEV_FRONTEND) := xenblk.o
++
++xenblk-objs := blkfront.o vbd.o
++
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blkfront/blkfront.c linux-2.6.16/drivers/xen/blkfront/blkfront.c
+--- linux-2.6.16.orig/drivers/xen/blkfront/blkfront.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blkfront/blkfront.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,819 @@
+/******************************************************************************
+ * blkfront.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blkfront/block.h tmp-linux-2.6-xen.patch/drivers/xen/blkfront/block.h
---- ref-linux-2.6.16.9/drivers/xen/blkfront/block.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/block.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blkfront/block.h linux-2.6.16/drivers/xen/blkfront/block.h
+--- linux-2.6.16.orig/drivers/xen/blkfront/block.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blkfront/block.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,165 @@
+/******************************************************************************
+ * block.h
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blkfront/Makefile tmp-linux-2.6-xen.patch/drivers/xen/blkfront/Makefile
---- ref-linux-2.6.16.9/drivers/xen/blkfront/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,5 @@
-+
-+obj-$(CONFIG_XEN_BLKDEV_FRONTEND) := xenblk.o
-+
-+xenblk-objs := blkfront.o vbd.o
-+
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blkfront/vbd.c tmp-linux-2.6-xen.patch/drivers/xen/blkfront/vbd.c
---- ref-linux-2.6.16.9/drivers/xen/blkfront/vbd.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/vbd.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blkfront/vbd.c linux-2.6.16/drivers/xen/blkfront/vbd.c
+--- linux-2.6.16.orig/drivers/xen/blkfront/vbd.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blkfront/vbd.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,327 @@
+/******************************************************************************
+ * vbd.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.patch/drivers/xen/blktap/blktap.c
---- ref-linux-2.6.16.9/drivers/xen/blktap/blktap.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/blktap.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blktap/Makefile linux-2.6.16/drivers/xen/blktap/Makefile
+--- linux-2.6.16.orig/drivers/xen/blktap/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blktap/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,3 @@
++
++obj-y := xenbus.o interface.o blktap.o
++
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blktap/blktap.c linux-2.6.16/drivers/xen/blktap/blktap.c
+--- linux-2.6.16.orig/drivers/xen/blktap/blktap.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blktap/blktap.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,910 @@
+/******************************************************************************
+ * arch/xen/drivers/blkif/blktap/blktap.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blktap/common.h tmp-linux-2.6-xen.patch/drivers/xen/blktap/common.h
---- ref-linux-2.6.16.9/drivers/xen/blktap/common.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/common.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blktap/common.h linux-2.6.16/drivers/xen/blktap/common.h
+--- linux-2.6.16.orig/drivers/xen/blktap/common.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blktap/common.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,110 @@
+
+#ifndef __BLKIF__BACKEND__COMMON_H__
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blktap/interface.c tmp-linux-2.6-xen.patch/drivers/xen/blktap/interface.c
---- ref-linux-2.6.16.9/drivers/xen/blktap/interface.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/interface.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blktap/interface.c linux-2.6.16/drivers/xen/blktap/interface.c
+--- linux-2.6.16.orig/drivers/xen/blktap/interface.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blktap/interface.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,146 @@
+/******************************************************************************
+ * arch/xen/drivers/blkif/backend/interface.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blktap/Makefile tmp-linux-2.6-xen.patch/drivers/xen/blktap/Makefile
---- ref-linux-2.6.16.9/drivers/xen/blktap/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,3 @@
-+
-+obj-y := xenbus.o interface.o blktap.o
-+
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/blktap/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/blktap/xenbus.c
---- ref-linux-2.6.16.9/drivers/xen/blktap/xenbus.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/xenbus.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/blktap/xenbus.c linux-2.6.16/drivers/xen/blktap/xenbus.c
+--- linux-2.6.16.orig/drivers/xen/blktap/xenbus.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/blktap/xenbus.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,233 @@
+/* Xenbus code for blkif tap
+
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/char/Makefile tmp-linux-2.6-xen.patch/drivers/xen/char/Makefile
---- ref-linux-2.6.16.9/drivers/xen/char/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/char/Makefile 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/char/Makefile linux-2.6.16/drivers/xen/char/Makefile
+--- linux-2.6.16.orig/drivers/xen/char/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/char/Makefile 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,2 @@
+
+obj-y := mem.o
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/char/mem.c tmp-linux-2.6-xen.patch/drivers/xen/char/mem.c
---- ref-linux-2.6.16.9/drivers/xen/char/mem.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/char/mem.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/char/mem.c linux-2.6.16/drivers/xen/char/mem.c
+--- linux-2.6.16.orig/drivers/xen/char/mem.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/char/mem.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,192 @@
+/*
+ * Originally from linux/drivers/char/mem.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/console/console.c tmp-linux-2.6-xen.patch/drivers/xen/console/console.c
---- ref-linux-2.6.16.9/drivers/xen/console/console.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/console/console.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/console/Makefile linux-2.6.16/drivers/xen/console/Makefile
+--- linux-2.6.16.orig/drivers/xen/console/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/console/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,2 @@
++
++obj-y := console.o xencons_ring.o
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/console/console.c linux-2.6.16/drivers/xen/console/console.c
+--- linux-2.6.16.orig/drivers/xen/console/console.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/console/console.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,648 @@
+/******************************************************************************
+ * console.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/console/Makefile tmp-linux-2.6-xen.patch/drivers/xen/console/Makefile
---- ref-linux-2.6.16.9/drivers/xen/console/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/console/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,2 @@
-+
-+obj-y := console.o xencons_ring.o
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/console/xencons_ring.c tmp-linux-2.6-xen.patch/drivers/xen/console/xencons_ring.c
---- ref-linux-2.6.16.9/drivers/xen/console/xencons_ring.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/console/xencons_ring.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/console/xencons_ring.c linux-2.6.16/drivers/xen/console/xencons_ring.c
+--- linux-2.6.16.orig/drivers/xen/console/xencons_ring.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/console/xencons_ring.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,151 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.patch/drivers/xen/core/evtchn.c
---- ref-linux-2.6.16.9/drivers/xen/core/evtchn.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/evtchn.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/core/Makefile linux-2.6.16/drivers/xen/core/Makefile
+--- linux-2.6.16.orig/drivers/xen/core/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/core/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,11 @@
++#
++# Makefile for the linux kernel.
++#
++
++obj-y := evtchn.o reboot.o gnttab.o features.o
++
++obj-$(CONFIG_PROC_FS) += xen_proc.o
++obj-$(CONFIG_NET) += skbuff.o
++obj-$(CONFIG_SMP) += smpboot.o
++obj-$(CONFIG_SYSFS) += hypervisor_sysfs.o
++obj-$(CONFIG_XEN_SYSFS) += xen_sysfs.o
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/core/evtchn.c linux-2.6.16/drivers/xen/core/evtchn.c
+--- linux-2.6.16.orig/drivers/xen/core/evtchn.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/core/evtchn.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,863 @@
+/******************************************************************************
+ * evtchn.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/core/features.c tmp-linux-2.6-xen.patch/drivers/xen/core/features.c
---- ref-linux-2.6.16.9/drivers/xen/core/features.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/features.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/core/features.c linux-2.6.16/drivers/xen/core/features.c
+--- linux-2.6.16.orig/drivers/xen/core/features.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/core/features.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,29 @@
+/******************************************************************************
+ * features.c
+ xen_features[i*32+j] = !!(fi.submap & 1<<j);
+ }
+}
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.patch/drivers/xen/core/gnttab.c
---- ref-linux-2.6.16.9/drivers/xen/core/gnttab.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/gnttab.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/core/gnttab.c linux-2.6.16/drivers/xen/core/gnttab.c
+--- linux-2.6.16.orig/drivers/xen/core/gnttab.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/core/gnttab.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,464 @@
+/******************************************************************************
+ * gnttab.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/core/hypervisor_sysfs.c tmp-linux-2.6-xen.patch/drivers/xen/core/hypervisor_sysfs.c
---- ref-linux-2.6.16.9/drivers/xen/core/hypervisor_sysfs.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/hypervisor_sysfs.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/core/hypervisor_sysfs.c linux-2.6.16/drivers/xen/core/hypervisor_sysfs.c
+--- linux-2.6.16.orig/drivers/xen/core/hypervisor_sysfs.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/core/hypervisor_sysfs.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,57 @@
+/*
+ * copyright (c) 2006 IBM Corporation
+
+device_initcall(hypervisor_subsys_init);
+EXPORT_SYMBOL_GPL(hypervisor_subsys);
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/core/Makefile tmp-linux-2.6-xen.patch/drivers/xen/core/Makefile
---- ref-linux-2.6.16.9/drivers/xen/core/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,11 @@
-+#
-+# Makefile for the linux kernel.
-+#
-+
-+obj-y := evtchn.o reboot.o gnttab.o features.o
-+
-+obj-$(CONFIG_PROC_FS) += xen_proc.o
-+obj-$(CONFIG_NET) += skbuff.o
-+obj-$(CONFIG_SMP) += smpboot.o
-+obj-$(CONFIG_SYSFS) += hypervisor_sysfs.o
-+obj-$(CONFIG_XEN_SYSFS) += xen_sysfs.o
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/core/reboot.c tmp-linux-2.6-xen.patch/drivers/xen/core/reboot.c
---- ref-linux-2.6.16.9/drivers/xen/core/reboot.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/reboot.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/core/reboot.c linux-2.6.16/drivers/xen/core/reboot.c
+--- linux-2.6.16.orig/drivers/xen/core/reboot.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/core/reboot.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,381 @@
+#define __KERNEL_SYSCALLS__
+#include <linux/version.h>
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/core/skbuff.c tmp-linux-2.6-xen.patch/drivers/xen/core/skbuff.c
---- ref-linux-2.6.16.9/drivers/xen/core/skbuff.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/skbuff.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/core/skbuff.c linux-2.6.16/drivers/xen/core/skbuff.c
+--- linux-2.6.16.orig/drivers/xen/core/skbuff.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/core/skbuff.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,144 @@
+
+#include <linux/config.h>
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.patch/drivers/xen/core/smpboot.c
---- ref-linux-2.6.16.9/drivers/xen/core/smpboot.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/smpboot.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/core/smpboot.c linux-2.6.16/drivers/xen/core/smpboot.c
+--- linux-2.6.16.orig/drivers/xen/core/smpboot.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/core/smpboot.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,581 @@
+/*
+ * Xen SMP booting functions
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/core/xen_proc.c tmp-linux-2.6-xen.patch/drivers/xen/core/xen_proc.c
---- ref-linux-2.6.16.9/drivers/xen/core/xen_proc.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/xen_proc.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/core/xen_proc.c linux-2.6.16/drivers/xen/core/xen_proc.c
+--- linux-2.6.16.orig/drivers/xen/core/xen_proc.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/core/xen_proc.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,29 @@
+
+#include <linux/config.h>
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/core/xen_sysfs.c tmp-linux-2.6-xen.patch/drivers/xen/core/xen_sysfs.c
---- ref-linux-2.6.16.9/drivers/xen/core/xen_sysfs.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/xen_sysfs.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/core/xen_sysfs.c linux-2.6.16/drivers/xen/core/xen_sysfs.c
+--- linux-2.6.16.orig/drivers/xen/core/xen_sysfs.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/core/xen_sysfs.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,311 @@
+/*
+ * copyright (c) 2006 IBM Corporation
+
+module_init(hyper_sysfs_init);
+module_exit(hyper_sysfs_exit);
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.patch/drivers/xen/evtchn/evtchn.c
---- ref-linux-2.6.16.9/drivers/xen/evtchn/evtchn.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/evtchn/evtchn.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/evtchn/Makefile linux-2.6.16/drivers/xen/evtchn/Makefile
+--- linux-2.6.16.orig/drivers/xen/evtchn/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/evtchn/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,2 @@
++
++obj-y := evtchn.o
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/evtchn/evtchn.c linux-2.6.16/drivers/xen/evtchn/evtchn.c
+--- linux-2.6.16.orig/drivers/xen/evtchn/evtchn.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/evtchn/evtchn.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,464 @@
+/******************************************************************************
+ * evtchn.c
+{
+ int i;
+ struct per_user_data *u = filp->private_data;
-+ evtchn_op_t op = { 0 };
-+
-+ spin_lock_irq(&port_user_lock);
-+
-+ free_page((unsigned long)u->ring);
-+
-+ for (i = 0; i < NR_EVENT_CHANNELS; i++) {
-+ int ret;
-+ if (port_user[i] != u)
-+ continue;
-+
-+ port_user[i] = NULL;
-+ mask_evtchn(i);
-+
-+ op.cmd = EVTCHNOP_close;
-+ op.u.close.port = i;
-+ ret = HYPERVISOR_event_channel_op(&op);
-+ BUG_ON(ret);
-+ }
-+
-+ spin_unlock_irq(&port_user_lock);
-+
-+ kfree(u);
-+
-+ return 0;
-+}
-+
-+static struct file_operations evtchn_fops = {
-+ .owner = THIS_MODULE,
-+ .read = evtchn_read,
-+ .write = evtchn_write,
-+ .ioctl = evtchn_ioctl,
-+ .poll = evtchn_poll,
-+ .fasync = evtchn_fasync,
-+ .open = evtchn_open,
-+ .release = evtchn_release,
-+};
-+
-+static struct miscdevice evtchn_miscdev = {
-+ .minor = EVTCHN_MINOR,
-+ .name = "evtchn",
-+ .fops = &evtchn_fops,
-+ .devfs_name = "misc/evtchn",
-+};
-+
-+static int __init evtchn_init(void)
-+{
-+ int err;
-+
-+ spin_lock_init(&port_user_lock);
-+ memset(port_user, 0, sizeof(port_user));
-+
-+ /* Create '/dev/misc/evtchn'. */
-+ err = misc_register(&evtchn_miscdev);
-+ if (err != 0) {
-+ printk(KERN_ALERT "Could not register /dev/misc/evtchn\n");
-+ return err;
-+ }
-+
-+ printk("Event-channel device installed.\n");
-+
-+ return 0;
-+}
-+
-+static void evtchn_cleanup(void)
-+{
-+ misc_deregister(&evtchn_miscdev);
-+}
-+
-+module_init(evtchn_init);
-+module_exit(evtchn_cleanup);
-+
-+MODULE_LICENSE("Dual BSD/GPL");
-+
-+/*
-+ * Local variables:
-+ * c-file-style: "linux"
-+ * indent-tabs-mode: t
-+ * c-indent-level: 8
-+ * c-basic-offset: 8
-+ * tab-width: 8
-+ * End:
-+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/evtchn/Makefile tmp-linux-2.6-xen.patch/drivers/xen/evtchn/Makefile
---- ref-linux-2.6.16.9/drivers/xen/evtchn/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/evtchn/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,2 @@
-+
-+obj-y := evtchn.o
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/drivers/xen/Kconfig
---- ref-linux-2.6.16.9/drivers/xen/Kconfig 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/Kconfig 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,212 @@
-+#
-+# This Kconfig describe xen options
-+#
-+
-+mainmenu "Xen Configuration"
-+
-+config XEN
-+ bool
-+ default y if X86_XEN || X86_64_XEN
-+ help
-+ This is the Linux Xen port.
-+
-+if XEN
-+config XEN_INTERFACE_VERSION
-+ hex
-+ default 0x00030101
-+
-+menu "XEN"
-+
-+config XEN_PRIVILEGED_GUEST
-+ bool "Privileged Guest (domain 0)"
-+ depends XEN
-+ default n
-+ help
-+ Support for privileged operation (domain 0)
-+
-+config XEN_UNPRIVILEGED_GUEST
-+ bool
-+ default !XEN_PRIVILEGED_GUEST
-+
-+config XEN_PCIDEV_BACKEND
-+ tristate "PCI device backend driver"
-+ depends PCI
-+ default XEN_PRIVILEGED_GUEST
-+ help
-+ The PCI device backend driver allows the kernel to export arbitrary
-+ PCI devices to other guests. If you select this to be a module, you
-+ will need to make sure no other driver has bound to the device(s)
-+ you want to make visible to other guests.
-+
-+choice
-+ prompt "PCI Backend Mode"
-+ depends on XEN_PCIDEV_BACKEND
-+ default XEN_PCIDEV_BACKEND_VPCI
-+
-+config XEN_PCIDEV_BACKEND_VPCI
-+ bool "Virtual PCI"
-+ ---help---
-+ This PCI Backend hides the true PCI topology and makes the frontend
-+ think there is a single PCI bus with only the exported devices on it.
-+ For example, a device at 03:05.0 will be re-assigned to 00:00.0. A
-+ second device at 02:1a.0 will be re-assigned to 00:01.0.
-+
-+config XEN_PCIDEV_BACKEND_PASS
-+ bool "Passthrough"
-+ ---help---
-+ This PCI Backend provides a real view of the PCI topology to the
-+ frontend (for example, a device at 06:01.b will still appear at
-+ 06:01.b to the frontend). This is similar to how Xen 2.0.x exposed
-+ PCI devices to its driver domains. This may be required for drivers
-+ which depend on finding their hardward in certain bus/slot
-+ locations.
-+
-+endchoice
-+
-+config XEN_PCIDEV_BE_DEBUG
-+ bool "PCI Backend Debugging"
-+ depends on XEN_PCIDEV_BACKEND
-+ default n
-+
-+config XEN_BLKDEV_BACKEND
-+ tristate "Block-device backend driver"
-+ default y
-+ help
-+ The block-device backend driver allows the kernel to export its
-+ block devices to other guests via a high-performance shared-memory
-+ interface.
-+
-+config XEN_BLKDEV_TAP_BE
-+ tristate "Block Tap support for backend driver (DANGEROUS)"
-+ depends on XEN_BLKDEV_BACKEND
-+ default n
-+ help
-+ If you intend to use the block tap driver, the backend domain will
-+ not know the domain id of the real frontend, and so will not be able
-+ to map its data pages. This modifies the backend to attempt to map
-+ from both the tap domain and the real frontend. This presents a
-+ security risk, and so should ONLY be used for development
-+ with the blktap. This option will be removed as the block drivers are
-+ modified to use grant tables.
++ evtchn_op_t op = { 0 };
+
-+config XEN_NETDEV_BACKEND
-+ tristate "Network-device backend driver"
-+ default y
-+ help
-+ The network-device backend driver allows the kernel to export its
-+ network devices to other guests via a high-performance shared-memory
-+ interface.
++ spin_lock_irq(&port_user_lock);
+
-+config XEN_NETDEV_PIPELINED_TRANSMITTER
-+ bool "Pipelined transmitter (DANGEROUS)"
-+ depends on XEN_NETDEV_BACKEND
-+ default n
-+ help
-+ If the net backend is a dumb domain, such as a transparent Ethernet
-+ bridge with no local IP interface, it is safe to say Y here to get
-+ slightly lower network overhead.
-+ If the backend has a local IP interface; or may be doing smart things
-+ like reassembling packets to perform firewall filtering; or if you
-+ are unsure; or if you experience network hangs when this option is
-+ enabled; then you must say N here.
++ free_page((unsigned long)u->ring);
+
-+config XEN_NETDEV_LOOPBACK
-+ tristate "Network-device loopback driver"
-+ depends on XEN_NETDEV_BACKEND
-+ default y
-+ help
-+ A two-interface loopback device to emulate a local netfront-netback
-+ connection.
++ for (i = 0; i < NR_EVENT_CHANNELS; i++) {
++ int ret;
++ if (port_user[i] != u)
++ continue;
+
-+config XEN_TPMDEV_BACKEND
-+ tristate "TPM-device backend driver"
-+ default n
-+ help
-+ The TPM-device backend driver
++ port_user[i] = NULL;
++ mask_evtchn(i);
+
-+config XEN_TPMDEV_CLOSE_IF_VTPM_FAILS
-+ bool "TPM backend closes upon vTPM failure"
-+ depends on XEN_TPMDEV_BACKEND
-+ default n
-+ help
-+ The TPM backend closes the channel if the vTPM in userspace indicates
-+ a failure. The corresponding domain's channel will be closed.
-+ Say Y if you want this feature.
++ op.cmd = EVTCHNOP_close;
++ op.u.close.port = i;
++ ret = HYPERVISOR_event_channel_op(&op);
++ BUG_ON(ret);
++ }
+
-+config XEN_BLKDEV_FRONTEND
-+ tristate "Block-device frontend driver"
-+ depends on XEN
-+ default y
-+ help
-+ The block-device frontend driver allows the kernel to access block
-+ devices mounted within another guest OS. Unless you are building a
-+ dedicated device-driver domain, or your master control domain
-+ (domain 0), then you almost certainly want to say Y here.
++ spin_unlock_irq(&port_user_lock);
+
-+config XEN_NETDEV_FRONTEND
-+ tristate "Network-device frontend driver"
-+ depends on XEN
-+ default y
-+ help
-+ The network-device frontend driver allows the kernel to access
-+ network interfaces within another guest OS. Unless you are building a
-+ dedicated device-driver domain, or your master control domain
-+ (domain 0), then you almost certainly want to say Y here.
++ kfree(u);
+
-+config XEN_BLKDEV_TAP
-+ tristate "Block device tap driver"
-+ default n
-+ help
-+ This driver allows a VM to interact on block device channels
-+ to other VMs. Block messages may be passed through or redirected
-+ to a character device, allowing device prototyping in application
-+ space. Odds are that you want to say N here.
++ return 0;
++}
+
-+config XEN_TPMDEV_FRONTEND
-+ tristate "TPM-device frontend driver"
-+ default n
-+ select TCG_TPM
-+ select TCG_XEN
-+ help
-+ The TPM-device frontend driver.
++static struct file_operations evtchn_fops = {
++ .owner = THIS_MODULE,
++ .read = evtchn_read,
++ .write = evtchn_write,
++ .ioctl = evtchn_ioctl,
++ .poll = evtchn_poll,
++ .fasync = evtchn_fasync,
++ .open = evtchn_open,
++ .release = evtchn_release,
++};
+
-+config XEN_SCRUB_PAGES
-+ bool "Scrub memory before freeing it to Xen"
-+ default y
-+ help
-+ Erase memory contents before freeing it back to Xen's global
-+ pool. This ensures that any secrets contained within that
-+ memory (e.g., private keys) cannot be found by other guests that
-+ may be running on the machine. Most people will want to say Y here.
-+ If security is not a concern then you may increase performance by
-+ saying N.
++static struct miscdevice evtchn_miscdev = {
++ .minor = EVTCHN_MINOR,
++ .name = "evtchn",
++ .fops = &evtchn_fops,
++ .devfs_name = "misc/evtchn",
++};
+
-+config XEN_DISABLE_SERIAL
-+ bool "Disable serial port drivers"
-+ default y
-+ help
-+ Disable serial port drivers, allowing the Xen console driver
-+ to provide a serial console at ttyS0.
++static int __init evtchn_init(void)
++{
++ int err;
+
-+config XEN_SYSFS
-+ tristate "Export Xen attributes in sysfs"
-+ depends on SYSFS
-+ default y
-+ help
-+ Xen hypervisor attributes will show up under /sys/hypervisor/.
++ spin_lock_init(&port_user_lock);
++ memset(port_user, 0, sizeof(port_user));
+
-+endmenu
++ /* Create '/dev/misc/evtchn'. */
++ err = misc_register(&evtchn_miscdev);
++ if (err != 0) {
++ printk(KERN_ALERT "Could not register /dev/misc/evtchn\n");
++ return err;
++ }
+
-+config HAVE_ARCH_ALLOC_SKB
-+ bool
-+ default y
++ printk("Event-channel device installed.\n");
+
-+config HAVE_ARCH_DEV_ALLOC_SKB
-+ bool
-+ default y
++ return 0;
++}
+
-+config NO_IDLE_HZ
-+ bool
-+ default y
++static void evtchn_cleanup(void)
++{
++ misc_deregister(&evtchn_miscdev);
++}
+
-+endif
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/Makefile tmp-linux-2.6-xen.patch/drivers/xen/Makefile
---- ref-linux-2.6.16.9/drivers/xen/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,22 @@
++module_init(evtchn_init);
++module_exit(evtchn_cleanup);
+
-+obj-y += net_driver_util.o
-+obj-y += util.o
++MODULE_LICENSE("Dual BSD/GPL");
+
-+obj-y += core/
-+obj-y += char/
-+obj-y += console/
-+obj-y += evtchn/
-+obj-y += balloon/
-+obj-y += privcmd/
-+obj-y += xenbus/
++/*
++ * Local variables:
++ * c-file-style: "linux"
++ * indent-tabs-mode: t
++ * c-indent-level: 8
++ * c-basic-offset: 8
++ * tab-width: 8
++ * End:
++ */
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/net_driver_util.c linux-2.6.16/drivers/xen/net_driver_util.c
+--- linux-2.6.16.orig/drivers/xen/net_driver_util.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/net_driver_util.c 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,68 @@
++/*****************************************************************************
++ *
++ * Utility functions for Xen network devices.
++ *
++ * Copyright (c) 2005 XenSource Ltd.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License version 2
++ * as published by the Free Software Foundation; or, when distributed
++ * separately from the Linux kernel or incorporated into other
++ * software packages, subject to the following license:
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this source file (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use, copy, modify,
++ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so, subject
++ * to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
+
-+obj-$(CONFIG_XEN_BLKDEV_BACKEND) += blkback/
-+obj-$(CONFIG_XEN_NETDEV_BACKEND) += netback/
-+obj-$(CONFIG_XEN_TPMDEV_BACKEND) += tpmback/
-+obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += blkfront/
-+obj-$(CONFIG_XEN_NETDEV_FRONTEND) += netfront/
-+obj-$(CONFIG_XEN_BLKDEV_TAP) += blktap/
-+obj-$(CONFIG_XEN_TPMDEV_FRONTEND) += tpmfront/
-+obj-$(CONFIG_XEN_PCIDEV_BACKEND) += pciback/
-+obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += pcifront/
++#include <linux/if_ether.h>
++#include <linux/err.h>
++#include <linux/module.h>
++#include <xen/net_driver_util.h>
++
++
++int xen_net_read_mac(struct xenbus_device *dev, u8 mac[])
++{
++ char *s;
++ int i;
++ char *e;
++ char *macstr = xenbus_read(XBT_NULL, dev->nodename, "mac", NULL);
++ if (IS_ERR(macstr))
++ return PTR_ERR(macstr);
++ s = macstr;
++ for (i = 0; i < ETH_ALEN; i++) {
++ mac[i] = simple_strtoul(s, &e, 16);
++ if (s == e || (e[0] != ':' && e[0] != 0)) {
++ kfree(macstr);
++ return -ENOENT;
++ }
++ s = &e[1];
++ }
++ kfree(macstr);
++ return 0;
++}
++EXPORT_SYMBOL_GPL(xen_net_read_mac);
++
++/*
++ * Local variables:
++ * c-file-style: "linux"
++ * indent-tabs-mode: t
++ * c-indent-level: 8
++ * c-basic-offset: 8
++ * tab-width: 8
++ * End:
++ */
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/netback/Makefile linux-2.6.16/drivers/xen/netback/Makefile
+--- linux-2.6.16.orig/drivers/xen/netback/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/netback/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,5 @@
++obj-$(CONFIG_XEN_NETDEV_BACKEND) := netbk.o
++obj-$(CONFIG_XEN_NETDEV_LOOPBACK) += netloop.o
+
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/netback/common.h tmp-linux-2.6-xen.patch/drivers/xen/netback/common.h
---- ref-linux-2.6.16.9/drivers/xen/netback/common.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netback/common.h 2006-04-10 00:05:52.000000000 +0200
++netbk-y := netback.o xenbus.o interface.o
++netloop-y := loopback.o
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/netback/common.h linux-2.6.16/drivers/xen/netback/common.h
+--- linux-2.6.16.orig/drivers/xen/netback/common.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/netback/common.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,133 @@
+/******************************************************************************
+ * arch/xen/drivers/netif/backend/common.h
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/netback/interface.c tmp-linux-2.6-xen.patch/drivers/xen/netback/interface.c
---- ref-linux-2.6.16.9/drivers/xen/netback/interface.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netback/interface.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/netback/interface.c linux-2.6.16/drivers/xen/netback/interface.c
+--- linux-2.6.16.orig/drivers/xen/netback/interface.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/netback/interface.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,334 @@
+/******************************************************************************
+ * arch/xen/drivers/netif/backend/interface.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/netback/loopback.c tmp-linux-2.6-xen.patch/drivers/xen/netback/loopback.c
---- ref-linux-2.6.16.9/drivers/xen/netback/loopback.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netback/loopback.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/netback/loopback.c linux-2.6.16/drivers/xen/netback/loopback.c
+--- linux-2.6.16.orig/drivers/xen/netback/loopback.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/netback/loopback.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,254 @@
+/******************************************************************************
+ * netback/loopback.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/netback/Makefile tmp-linux-2.6-xen.patch/drivers/xen/netback/Makefile
---- ref-linux-2.6.16.9/drivers/xen/netback/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netback/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,5 @@
-+obj-$(CONFIG_XEN_NETDEV_BACKEND) := netbk.o
-+obj-$(CONFIG_XEN_NETDEV_LOOPBACK) += netloop.o
-+
-+netbk-y := netback.o xenbus.o interface.o
-+netloop-y := loopback.o
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/netback/netback.c tmp-linux-2.6-xen.patch/drivers/xen/netback/netback.c
---- ref-linux-2.6.16.9/drivers/xen/netback/netback.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netback/netback.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/netback/netback.c linux-2.6.16/drivers/xen/netback/netback.c
+--- linux-2.6.16.orig/drivers/xen/netback/netback.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/netback/netback.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,868 @@
+/******************************************************************************
+ * drivers/xen/netback/netback.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/netback/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/netback/xenbus.c
---- ref-linux-2.6.16.9/drivers/xen/netback/xenbus.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netback/xenbus.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/netback/xenbus.c linux-2.6.16/drivers/xen/netback/xenbus.c
+--- linux-2.6.16.orig/drivers/xen/netback/xenbus.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/netback/xenbus.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,366 @@
+/* Xenbus code for netif backend
+ Copyright (C) 2005 Rusty Russell <rusty@rustcorp.com.au>
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/net_driver_util.c tmp-linux-2.6-xen.patch/drivers/xen/net_driver_util.c
---- ref-linux-2.6.16.9/drivers/xen/net_driver_util.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/net_driver_util.c 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,68 @@
-+/*****************************************************************************
-+ *
-+ * Utility functions for Xen network devices.
-+ *
-+ * Copyright (c) 2005 XenSource Ltd.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License version 2
-+ * as published by the Free Software Foundation; or, when distributed
-+ * separately from the Linux kernel or incorporated into other
-+ * software packages, subject to the following license:
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this source file (the "Software"), to deal in the Software without
-+ * restriction, including without limitation the rights to use, copy, modify,
-+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so, subject
-+ * to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-+ * DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#include <linux/if_ether.h>
-+#include <linux/err.h>
-+#include <linux/module.h>
-+#include <xen/net_driver_util.h>
-+
-+
-+int xen_net_read_mac(struct xenbus_device *dev, u8 mac[])
-+{
-+ char *s;
-+ int i;
-+ char *e;
-+ char *macstr = xenbus_read(XBT_NULL, dev->nodename, "mac", NULL);
-+ if (IS_ERR(macstr))
-+ return PTR_ERR(macstr);
-+ s = macstr;
-+ for (i = 0; i < ETH_ALEN; i++) {
-+ mac[i] = simple_strtoul(s, &e, 16);
-+ if (s == e || (e[0] != ':' && e[0] != 0)) {
-+ kfree(macstr);
-+ return -ENOENT;
-+ }
-+ s = &e[1];
-+ }
-+ kfree(macstr);
-+ return 0;
-+}
-+EXPORT_SYMBOL_GPL(xen_net_read_mac);
-+
-+/*
-+ * Local variables:
-+ * c-file-style: "linux"
-+ * indent-tabs-mode: t
-+ * c-indent-level: 8
-+ * c-basic-offset: 8
-+ * tab-width: 8
-+ * End:
-+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/netfront/Makefile tmp-linux-2.6-xen.patch/drivers/xen/netfront/Makefile
---- ref-linux-2.6.16.9/drivers/xen/netfront/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netfront/Makefile 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/netfront/Makefile linux-2.6.16/drivers/xen/netfront/Makefile
+--- linux-2.6.16.orig/drivers/xen/netfront/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/netfront/Makefile 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,4 @@
+
+obj-$(CONFIG_XEN_NETDEV_FRONTEND) := xennet.o
+
+xennet-objs := netfront.o
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/netfront/netfront.c tmp-linux-2.6-xen.patch/drivers/xen/netfront/netfront.c
---- ref-linux-2.6.16.9/drivers/xen/netfront/netfront.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netfront/netfront.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/netfront/netfront.c linux-2.6.16/drivers/xen/netfront/netfront.c
+--- linux-2.6.16.orig/drivers/xen/netfront/netfront.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/netfront/netfront.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1524 @@
+/******************************************************************************
+ * Virtual network driver for conversing with remote driver backends.
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pciback/conf_space.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space.c
---- ref-linux-2.6.16.9/drivers/xen/pciback/conf_space.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pciback/Makefile linux-2.6.16/drivers/xen/pciback/Makefile
+--- linux-2.6.16.orig/drivers/xen/pciback/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pciback/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,10 @@
++obj-$(CONFIG_XEN_PCIDEV_BACKEND) += pciback.o
++
++pciback-y := pci_stub.o pciback_ops.o xenbus.o
++pciback-y += conf_space.o conf_space_header.o
++pciback-$(CONFIG_XEN_PCIDEV_BACKEND_VPCI) += vpci.o
++pciback-$(CONFIG_XEN_PCIDEV_BACKEND_PASS) += passthrough.o
++
++ifeq ($(CONFIG_XEN_PCIDEV_BE_DEBUG),y)
++EXTRA_CFLAGS += -DDEBUG
++endif
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pciback/conf_space.c linux-2.6.16/drivers/xen/pciback/conf_space.c
+--- linux-2.6.16.orig/drivers/xen/pciback/conf_space.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pciback/conf_space.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,345 @@
+/*
+ * PCI Backend - Functions for creating a virtual configuration space for
+
+ return err;
+}
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pciback/conf_space.h tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space.h
---- ref-linux-2.6.16.9/drivers/xen/pciback/conf_space.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pciback/conf_space.h linux-2.6.16/drivers/xen/pciback/conf_space.h
+--- linux-2.6.16.orig/drivers/xen/pciback/conf_space.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pciback/conf_space.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,97 @@
+/*
+ * PCI Backend - Common data structures for overriding the configuration space
+ void *data);
+
+#endif /* __XEN_PCIBACK_CONF_SPACE_H__ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pciback/conf_space_header.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_header.c
---- ref-linux-2.6.16.9/drivers/xen/pciback/conf_space_header.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_header.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pciback/conf_space_header.c linux-2.6.16/drivers/xen/pciback/conf_space_header.c
+--- linux-2.6.16.orig/drivers/xen/pciback/conf_space_header.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pciback/conf_space_header.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,267 @@
+/*
+ * PCI Backend - Handles the virtual fields in the configuration space headers.
+ out:
+ return err;
+}
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pciback/Makefile tmp-linux-2.6-xen.patch/drivers/xen/pciback/Makefile
---- ref-linux-2.6.16.9/drivers/xen/pciback/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,10 @@
-+obj-$(CONFIG_XEN_PCIDEV_BACKEND) += pciback.o
-+
-+pciback-y := pci_stub.o pciback_ops.o xenbus.o
-+pciback-y += conf_space.o conf_space_header.o
-+pciback-$(CONFIG_XEN_PCIDEV_BACKEND_VPCI) += vpci.o
-+pciback-$(CONFIG_XEN_PCIDEV_BACKEND_PASS) += passthrough.o
-+
-+ifeq ($(CONFIG_XEN_PCIDEV_BE_DEBUG),y)
-+EXTRA_CFLAGS += -DDEBUG
-+endif
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pciback/passthrough.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/passthrough.c
---- ref-linux-2.6.16.9/drivers/xen/pciback/passthrough.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/passthrough.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pciback/passthrough.c linux-2.6.16/drivers/xen/pciback/passthrough.c
+--- linux-2.6.16.orig/drivers/xen/pciback/passthrough.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pciback/passthrough.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,157 @@
+/*
+ * PCI Backend - Provides restricted access to the real PCI bus topology
+ kfree(dev_data);
+ pdev->pci_dev_data = NULL;
+}
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pciback/pciback.h tmp-linux-2.6-xen.patch/drivers/xen/pciback/pciback.h
---- ref-linux-2.6.16.9/drivers/xen/pciback/pciback.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/pciback.h 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,78 @@
-+/*
-+ * PCI Backend Common Data Structures & Function Declarations
-+ *
-+ * Author: Ryan Wilson <hap9@epoch.ncsc.mil>
-+ */
-+#ifndef __XEN_PCIBACK_H__
-+#define __XEN_PCIBACK_H__
-+
-+#include <linux/pci.h>
-+#include <linux/interrupt.h>
-+#include <xen/xenbus.h>
-+#include <linux/list.h>
-+#include <linux/spinlock.h>
-+#include <xen/interface/io/pciif.h>
-+
-+struct pci_dev_entry {
-+ struct list_head list;
-+ struct pci_dev *dev;
-+};
-+
-+struct pciback_device {
-+ void *pci_dev_data;
-+ spinlock_t dev_lock;
-+
-+ struct xenbus_device *xdev;
-+
-+ struct xenbus_watch be_watch;
-+ u8 be_watching;
-+
-+ int evtchn_irq;
-+
-+ struct xen_pci_sharedinfo *sh_info;
-+};
-+
-+struct pciback_dev_data {
-+ struct list_head config_fields;
-+};
-+
-+/* Get/Put PCI Devices that are hidden from the PCI Backend Domain */
-+struct pci_dev *pcistub_get_pci_dev_by_slot(struct pciback_device *pdev,
-+ int domain, int bus,
-+ int slot, int func);
-+struct pci_dev *pcistub_get_pci_dev(struct pciback_device *pdev,
-+ struct pci_dev *dev);
-+void pcistub_put_pci_dev(struct pci_dev *dev);
-+
-+/* Ensure a device is turned off or reset */
-+void pciback_reset_device(struct pci_dev *pdev);
-+
-+/* Access a virtual configuration space for a PCI device */
-+int pciback_config_init(struct pci_dev *dev);
-+void pciback_config_reset(struct pci_dev *dev);
-+void pciback_config_free(struct pci_dev *dev);
-+int pciback_config_read(struct pci_dev *dev, int offset, int size,
-+ u32 * ret_val);
-+int pciback_config_write(struct pci_dev *dev, int offset, int size, u32 value);
-+
-+/* Handle requests for specific devices from the frontend */
-+typedef int (*publish_pci_root_cb) (struct pciback_device * pdev,
-+ unsigned int domain, unsigned int bus);
-+int pciback_add_pci_dev(struct pciback_device *pdev, struct pci_dev *dev);
-+void pciback_release_pci_dev(struct pciback_device *pdev, struct pci_dev *dev);
-+struct pci_dev *pciback_get_pci_dev(struct pciback_device *pdev,
-+ unsigned int domain, unsigned int bus,
-+ unsigned int devfn);
-+int pciback_init_devices(struct pciback_device *pdev);
-+int pciback_publish_pci_roots(struct pciback_device *pdev,
-+ publish_pci_root_cb cb);
-+void pciback_release_devices(struct pciback_device *pdev);
-+
-+/* Handles events from front-end */
-+irqreturn_t pciback_handle_event(int irq, void *dev_id, struct pt_regs *regs);
-+
-+int pciback_xenbus_register(void);
-+void pciback_xenbus_unregister(void);
-+
-+extern int verbose_request;
-+#endif
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pciback/pciback_ops.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/pciback_ops.c
---- ref-linux-2.6.16.9/drivers/xen/pciback/pciback_ops.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/pciback_ops.c 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,74 @@
-+/*
-+ * PCI Backend Operations - respond to PCI requests from Frontend
-+ *
-+ * Author: Ryan Wilson <hap9@epoch.ncsc.mil>
-+ */
-+#include <linux/module.h>
-+#include <asm/bitops.h>
-+#include <xen/evtchn.h>
-+#include "pciback.h"
-+
-+int verbose_request = 0;
-+module_param(verbose_request, int, 0644);
-+
-+/* Ensure a device is "turned off" and ready to be exported.
-+ * (Also see pciback_config_reset to ensure virtual configuration space is
-+ * ready to be re-exported)
-+ */
-+void pciback_reset_device(struct pci_dev *dev)
-+{
-+ u16 cmd;
-+
-+ /* Disable devices (but not bridges) */
-+ if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) {
-+ pci_disable_device(dev);
-+
-+ pci_write_config_word(dev, PCI_COMMAND, 0);
-+
-+ dev->is_enabled = 0;
-+ dev->is_busmaster = 0;
-+ } else {
-+ pci_read_config_word(dev, PCI_COMMAND, &cmd);
-+ if (cmd & (PCI_COMMAND_INVALIDATE)) {
-+ cmd &= ~(PCI_COMMAND_INVALIDATE);
-+ pci_write_config_word(dev, PCI_COMMAND, cmd);
-+
-+ dev->is_busmaster = 0;
-+ }
-+ }
-+
-+ pciback_config_reset(dev);
-+}
-+
-+irqreturn_t pciback_handle_event(int irq, void *dev_id, struct pt_regs *regs)
-+{
-+ struct pciback_device *pdev = dev_id;
-+ struct pci_dev *dev;
-+ struct xen_pci_op *op = &pdev->sh_info->op;
-+
-+ if (unlikely(!test_bit(_XEN_PCIF_active,
-+ (unsigned long *)&pdev->sh_info->flags))) {
-+ pr_debug("pciback: interrupt, but no active operation\n");
-+ goto out;
-+ }
-+
-+ dev = pciback_get_pci_dev(pdev, op->domain, op->bus, op->devfn);
-+
-+ if (dev == NULL)
-+ op->err = XEN_PCI_ERR_dev_not_found;
-+ else if (op->cmd == XEN_PCI_OP_conf_read)
-+ op->err = pciback_config_read(dev, op->offset, op->size,
-+ &op->value);
-+ else if (op->cmd == XEN_PCI_OP_conf_write)
-+ op->err = pciback_config_write(dev, op->offset, op->size,
-+ op->value);
-+ else
-+ op->err = XEN_PCI_ERR_not_implemented;
-+
-+ wmb();
-+ clear_bit(_XEN_PCIF_active, (unsigned long *)&pdev->sh_info->flags);
-+ notify_remote_via_irq(pdev->evtchn_irq);
-+
-+ out:
-+ return IRQ_HANDLED;
-+}
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pciback/pci_stub.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/pci_stub.c
---- ref-linux-2.6.16.9/drivers/xen/pciback/pci_stub.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/pci_stub.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pciback/pci_stub.c linux-2.6.16/drivers/xen/pciback/pci_stub.c
+--- linux-2.6.16.orig/drivers/xen/pciback/pci_stub.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pciback/pci_stub.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,695 @@
+/*
+ * PCI Stub Driver - Grabs devices in backend to be exported later
+module_exit(pciback_cleanup);
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pciback/vpci.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/vpci.c
---- ref-linux-2.6.16.9/drivers/xen/pciback/vpci.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/vpci.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pciback/pciback.h linux-2.6.16/drivers/xen/pciback/pciback.h
+--- linux-2.6.16.orig/drivers/xen/pciback/pciback.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pciback/pciback.h 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,78 @@
++/*
++ * PCI Backend Common Data Structures & Function Declarations
++ *
++ * Author: Ryan Wilson <hap9@epoch.ncsc.mil>
++ */
++#ifndef __XEN_PCIBACK_H__
++#define __XEN_PCIBACK_H__
++
++#include <linux/pci.h>
++#include <linux/interrupt.h>
++#include <xen/xenbus.h>
++#include <linux/list.h>
++#include <linux/spinlock.h>
++#include <xen/interface/io/pciif.h>
++
++struct pci_dev_entry {
++ struct list_head list;
++ struct pci_dev *dev;
++};
++
++struct pciback_device {
++ void *pci_dev_data;
++ spinlock_t dev_lock;
++
++ struct xenbus_device *xdev;
++
++ struct xenbus_watch be_watch;
++ u8 be_watching;
++
++ int evtchn_irq;
++
++ struct xen_pci_sharedinfo *sh_info;
++};
++
++struct pciback_dev_data {
++ struct list_head config_fields;
++};
++
++/* Get/Put PCI Devices that are hidden from the PCI Backend Domain */
++struct pci_dev *pcistub_get_pci_dev_by_slot(struct pciback_device *pdev,
++ int domain, int bus,
++ int slot, int func);
++struct pci_dev *pcistub_get_pci_dev(struct pciback_device *pdev,
++ struct pci_dev *dev);
++void pcistub_put_pci_dev(struct pci_dev *dev);
++
++/* Ensure a device is turned off or reset */
++void pciback_reset_device(struct pci_dev *pdev);
++
++/* Access a virtual configuration space for a PCI device */
++int pciback_config_init(struct pci_dev *dev);
++void pciback_config_reset(struct pci_dev *dev);
++void pciback_config_free(struct pci_dev *dev);
++int pciback_config_read(struct pci_dev *dev, int offset, int size,
++ u32 * ret_val);
++int pciback_config_write(struct pci_dev *dev, int offset, int size, u32 value);
++
++/* Handle requests for specific devices from the frontend */
++typedef int (*publish_pci_root_cb) (struct pciback_device * pdev,
++ unsigned int domain, unsigned int bus);
++int pciback_add_pci_dev(struct pciback_device *pdev, struct pci_dev *dev);
++void pciback_release_pci_dev(struct pciback_device *pdev, struct pci_dev *dev);
++struct pci_dev *pciback_get_pci_dev(struct pciback_device *pdev,
++ unsigned int domain, unsigned int bus,
++ unsigned int devfn);
++int pciback_init_devices(struct pciback_device *pdev);
++int pciback_publish_pci_roots(struct pciback_device *pdev,
++ publish_pci_root_cb cb);
++void pciback_release_devices(struct pciback_device *pdev);
++
++/* Handles events from front-end */
++irqreturn_t pciback_handle_event(int irq, void *dev_id, struct pt_regs *regs);
++
++int pciback_xenbus_register(void);
++void pciback_xenbus_unregister(void);
++
++extern int verbose_request;
++#endif
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pciback/pciback_ops.c linux-2.6.16/drivers/xen/pciback/pciback_ops.c
+--- linux-2.6.16.orig/drivers/xen/pciback/pciback_ops.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pciback/pciback_ops.c 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,74 @@
++/*
++ * PCI Backend Operations - respond to PCI requests from Frontend
++ *
++ * Author: Ryan Wilson <hap9@epoch.ncsc.mil>
++ */
++#include <linux/module.h>
++#include <asm/bitops.h>
++#include <xen/evtchn.h>
++#include "pciback.h"
++
++int verbose_request = 0;
++module_param(verbose_request, int, 0644);
++
++/* Ensure a device is "turned off" and ready to be exported.
++ * (Also see pciback_config_reset to ensure virtual configuration space is
++ * ready to be re-exported)
++ */
++void pciback_reset_device(struct pci_dev *dev)
++{
++ u16 cmd;
++
++ /* Disable devices (but not bridges) */
++ if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) {
++ pci_disable_device(dev);
++
++ pci_write_config_word(dev, PCI_COMMAND, 0);
++
++ dev->is_enabled = 0;
++ dev->is_busmaster = 0;
++ } else {
++ pci_read_config_word(dev, PCI_COMMAND, &cmd);
++ if (cmd & (PCI_COMMAND_INVALIDATE)) {
++ cmd &= ~(PCI_COMMAND_INVALIDATE);
++ pci_write_config_word(dev, PCI_COMMAND, cmd);
++
++ dev->is_busmaster = 0;
++ }
++ }
++
++ pciback_config_reset(dev);
++}
++
++irqreturn_t pciback_handle_event(int irq, void *dev_id, struct pt_regs *regs)
++{
++ struct pciback_device *pdev = dev_id;
++ struct pci_dev *dev;
++ struct xen_pci_op *op = &pdev->sh_info->op;
++
++ if (unlikely(!test_bit(_XEN_PCIF_active,
++ (unsigned long *)&pdev->sh_info->flags))) {
++ pr_debug("pciback: interrupt, but no active operation\n");
++ goto out;
++ }
++
++ dev = pciback_get_pci_dev(pdev, op->domain, op->bus, op->devfn);
++
++ if (dev == NULL)
++ op->err = XEN_PCI_ERR_dev_not_found;
++ else if (op->cmd == XEN_PCI_OP_conf_read)
++ op->err = pciback_config_read(dev, op->offset, op->size,
++ &op->value);
++ else if (op->cmd == XEN_PCI_OP_conf_write)
++ op->err = pciback_config_write(dev, op->offset, op->size,
++ op->value);
++ else
++ op->err = XEN_PCI_ERR_not_implemented;
++
++ wmb();
++ clear_bit(_XEN_PCIF_active, (unsigned long *)&pdev->sh_info->flags);
++ notify_remote_via_irq(pdev->evtchn_irq);
++
++ out:
++ return IRQ_HANDLED;
++}
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pciback/vpci.c linux-2.6.16/drivers/xen/pciback/vpci.c
+--- linux-2.6.16.orig/drivers/xen/pciback/vpci.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pciback/vpci.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,204 @@
+/*
+ * PCI Backend - Provides a Virtual PCI bus (with real devices)
+ kfree(vpci_dev);
+ pdev->pci_dev_data = NULL;
+}
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pciback/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/xenbus.c
---- ref-linux-2.6.16.9/drivers/xen/pciback/xenbus.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/xenbus.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pciback/xenbus.c linux-2.6.16/drivers/xen/pciback/xenbus.c
+--- linux-2.6.16.orig/drivers/xen/pciback/xenbus.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pciback/xenbus.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,441 @@
+/*
+ * PCI Backend Xenbus Setup - handles setup with frontend and xend
+{
+ xenbus_unregister_driver(&xenbus_pciback_driver);
+}
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pcifront/Makefile tmp-linux-2.6-xen.patch/drivers/xen/pcifront/Makefile
---- ref-linux-2.6.16.9/drivers/xen/pcifront/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/Makefile 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pcifront/Makefile linux-2.6.16/drivers/xen/pcifront/Makefile
+--- linux-2.6.16.orig/drivers/xen/pcifront/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pcifront/Makefile 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,7 @@
+obj-y += pcifront.o
+
+ifeq ($(CONFIG_XEN_PCIDEV_FE_DEBUG),y)
+EXTRA_CFLAGS += -DDEBUG
+endif
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pcifront/pci.c tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pci.c
---- ref-linux-2.6.16.9/drivers/xen/pcifront/pci.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pci.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pcifront/pci.c linux-2.6.16/drivers/xen/pcifront/pci.c
+--- linux-2.6.16.orig/drivers/xen/pcifront/pci.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pcifront/pci.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,46 @@
+/*
+ * PCI Frontend Operations - ensure only one PCI frontend runs at a time
+
+ spin_unlock(&pcifront_dev_lock);
+}
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pcifront/pcifront.h tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pcifront.h
---- ref-linux-2.6.16.9/drivers/xen/pcifront/pcifront.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pcifront.h 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,40 @@
-+/*
-+ * PCI Frontend - Common data structures & function declarations
-+ *
-+ * Author: Ryan Wilson <hap9@epoch.ncsc.mil>
-+ */
-+#ifndef __XEN_PCIFRONT_H__
-+#define __XEN_PCIFRONT_H__
-+
-+#include <linux/spinlock.h>
-+#include <linux/pci.h>
-+#include <xen/xenbus.h>
-+#include <xen/interface/io/pciif.h>
-+#include <xen/pcifront.h>
-+
-+struct pci_bus_entry {
-+ struct list_head list;
-+ struct pci_bus *bus;
-+};
-+
-+struct pcifront_device {
-+ struct xenbus_device *xdev;
-+ struct list_head root_buses;
-+ spinlock_t dev_lock;
-+
-+ int evtchn;
-+ int gnt_ref;
-+
-+ /* Lock this when doing any operations in sh_info */
-+ spinlock_t sh_info_lock;
-+ struct xen_pci_sharedinfo *sh_info;
-+};
-+
-+int pcifront_connect(struct pcifront_device *pdev);
-+void pcifront_disconnect(struct pcifront_device *pdev);
-+
-+int pcifront_scan_root(struct pcifront_device *pdev,
-+ unsigned int domain, unsigned int bus);
-+void pcifront_free_roots(struct pcifront_device *pdev);
-+
-+#endif /* __XEN_PCIFRONT_H__ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pcifront/pci_op.c tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pci_op.c
---- ref-linux-2.6.16.9/drivers/xen/pcifront/pci_op.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pci_op.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pcifront/pci_op.c linux-2.6.16/drivers/xen/pcifront/pci_op.c
+--- linux-2.6.16.orig/drivers/xen/pcifront/pci_op.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pcifront/pci_op.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,272 @@
+/*
+ * PCI Frontend Operations - Communicates with frontend
+ kfree(bus_entry);
+ }
+}
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/pcifront/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/pcifront/xenbus.c
---- ref-linux-2.6.16.9/drivers/xen/pcifront/xenbus.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/xenbus.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pcifront/pcifront.h linux-2.6.16/drivers/xen/pcifront/pcifront.h
+--- linux-2.6.16.orig/drivers/xen/pcifront/pcifront.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pcifront/pcifront.h 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,40 @@
++/*
++ * PCI Frontend - Common data structures & function declarations
++ *
++ * Author: Ryan Wilson <hap9@epoch.ncsc.mil>
++ */
++#ifndef __XEN_PCIFRONT_H__
++#define __XEN_PCIFRONT_H__
++
++#include <linux/spinlock.h>
++#include <linux/pci.h>
++#include <xen/xenbus.h>
++#include <xen/interface/io/pciif.h>
++#include <xen/pcifront.h>
++
++struct pci_bus_entry {
++ struct list_head list;
++ struct pci_bus *bus;
++};
++
++struct pcifront_device {
++ struct xenbus_device *xdev;
++ struct list_head root_buses;
++ spinlock_t dev_lock;
++
++ int evtchn;
++ int gnt_ref;
++
++ /* Lock this when doing any operations in sh_info */
++ spinlock_t sh_info_lock;
++ struct xen_pci_sharedinfo *sh_info;
++};
++
++int pcifront_connect(struct pcifront_device *pdev);
++void pcifront_disconnect(struct pcifront_device *pdev);
++
++int pcifront_scan_root(struct pcifront_device *pdev,
++ unsigned int domain, unsigned int bus);
++void pcifront_free_roots(struct pcifront_device *pdev);
++
++#endif /* __XEN_PCIFRONT_H__ */
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/pcifront/xenbus.c linux-2.6.16/drivers/xen/pcifront/xenbus.c
+--- linux-2.6.16.orig/drivers/xen/pcifront/xenbus.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/pcifront/xenbus.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,294 @@
+/*
+ * PCI Frontend Xenbus Setup - handles setup with backend (imports page/evtchn)
+
+/* Initialize after the Xen PCI Frontend Stub is initialized */
+subsys_initcall(pcifront_init);
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/privcmd/Makefile tmp-linux-2.6-xen.patch/drivers/xen/privcmd/Makefile
---- ref-linux-2.6.16.9/drivers/xen/privcmd/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/privcmd/Makefile 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/privcmd/Makefile linux-2.6.16/drivers/xen/privcmd/Makefile
+--- linux-2.6.16.orig/drivers/xen/privcmd/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/privcmd/Makefile 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,2 @@
+
+obj-y := privcmd.o
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen.patch/drivers/xen/privcmd/privcmd.c
---- ref-linux-2.6.16.9/drivers/xen/privcmd/privcmd.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/privcmd/privcmd.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/privcmd/privcmd.c linux-2.6.16/drivers/xen/privcmd/privcmd.c
+--- linux-2.6.16.orig/drivers/xen/privcmd/privcmd.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/privcmd/privcmd.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,302 @@
+/******************************************************************************
+ * privcmd.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/tpmback/common.h tmp-linux-2.6-xen.patch/drivers/xen/tpmback/common.h
---- ref-linux-2.6.16.9/drivers/xen/tpmback/common.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/common.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/tpmback/Makefile linux-2.6.16/drivers/xen/tpmback/Makefile
+--- linux-2.6.16.orig/drivers/xen/tpmback/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/tpmback/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,4 @@
++
++obj-$(CONFIG_XEN_TPMDEV_BACKEND) += tpmbk.o
++
++tpmbk-y += tpmback.o interface.o xenbus.o
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/tpmback/common.h linux-2.6.16/drivers/xen/tpmback/common.h
+--- linux-2.6.16.orig/drivers/xen/tpmback/common.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/tpmback/common.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * drivers/xen/tpmback/common.h
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/tpmback/interface.c tmp-linux-2.6-xen.patch/drivers/xen/tpmback/interface.c
---- ref-linux-2.6.16.9/drivers/xen/tpmback/interface.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/interface.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/tpmback/interface.c linux-2.6.16/drivers/xen/tpmback/interface.c
+--- linux-2.6.16.orig/drivers/xen/tpmback/interface.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/tpmback/interface.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,194 @@
+ /*****************************************************************************
+ * drivers/xen/tpmback/interface.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/tpmback/Makefile tmp-linux-2.6-xen.patch/drivers/xen/tpmback/Makefile
---- ref-linux-2.6.16.9/drivers/xen/tpmback/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,4 @@
-+
-+obj-$(CONFIG_XEN_TPMDEV_BACKEND) += tpmbk.o
-+
-+tpmbk-y += tpmback.o interface.o xenbus.o
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/tpmback/tpmback.c tmp-linux-2.6-xen.patch/drivers/xen/tpmback/tpmback.c
---- ref-linux-2.6.16.9/drivers/xen/tpmback/tpmback.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/tpmback.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/tpmback/tpmback.c linux-2.6.16/drivers/xen/tpmback/tpmback.c
+--- linux-2.6.16.orig/drivers/xen/tpmback/tpmback.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/tpmback/tpmback.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1060 @@
+/******************************************************************************
+ * drivers/xen/tpmback/tpmback.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/tpmback/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/tpmback/xenbus.c
---- ref-linux-2.6.16.9/drivers/xen/tpmback/xenbus.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/xenbus.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/tpmback/xenbus.c linux-2.6.16/drivers/xen/tpmback/xenbus.c
+--- linux-2.6.16.orig/drivers/xen/tpmback/xenbus.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/tpmback/xenbus.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,328 @@
+/* Xenbus code for tpmif backend
+ Copyright (C) 2005 IBM Corporation
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/tpmfront/Makefile tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/Makefile
---- ref-linux-2.6.16.9/drivers/xen/tpmfront/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/Makefile 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/tpmfront/Makefile linux-2.6.16/drivers/xen/tpmfront/Makefile
+--- linux-2.6.16.orig/drivers/xen/tpmfront/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/tpmfront/Makefile 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,2 @@
+
+obj-$(CONFIG_XEN_TPMDEV_FRONTEND) += tpmfront.o
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/tpmfront/tpmfront.c tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/tpmfront.c
---- ref-linux-2.6.16.9/drivers/xen/tpmfront/tpmfront.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/tpmfront.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/tpmfront/tpmfront.c linux-2.6.16/drivers/xen/tpmfront/tpmfront.c
+--- linux-2.6.16.orig/drivers/xen/tpmfront/tpmfront.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/tpmfront/tpmfront.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,731 @@
+/*
+ * Copyright (c) 2005, IBM Corporation
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/tpmfront/tpmfront.h tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/tpmfront.h
---- ref-linux-2.6.16.9/drivers/xen/tpmfront/tpmfront.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/tpmfront.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/tpmfront/tpmfront.h linux-2.6.16/drivers/xen/tpmfront/tpmfront.h
+--- linux-2.6.16.orig/drivers/xen/tpmfront/tpmfront.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/tpmfront/tpmfront.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,40 @@
+#ifndef TPM_FRONT_H
+#define TPM_FRONT_H
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/util.c tmp-linux-2.6-xen.patch/drivers/xen/util.c
---- ref-linux-2.6.16.9/drivers/xen/util.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/util.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/util.c linux-2.6.16/drivers/xen/util.c
+--- linux-2.6.16.orig/drivers/xen/util.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/util.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,80 @@
+#include <linux/config.h>
+#include <linux/mm.h>
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/xenbus/Makefile tmp-linux-2.6-xen.patch/drivers/xen/xenbus/Makefile
---- ref-linux-2.6.16.9/drivers/xen/xenbus/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/Makefile 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/xenbus/Makefile linux-2.6.16/drivers/xen/xenbus/Makefile
+--- linux-2.6.16.orig/drivers/xen/xenbus/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/xenbus/Makefile 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,8 @@
+obj-y += xenbus.o
+
+xenbus-objs += xenbus_xs.o
+xenbus-objs += xenbus_probe.o
+xenbus-objs += xenbus_dev.o
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/xenbus/xenbus_client.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_client.c
---- ref-linux-2.6.16.9/drivers/xen/xenbus/xenbus_client.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_client.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/xenbus/xenbus_client.c linux-2.6.16/drivers/xen/xenbus/xenbus_client.c
+--- linux-2.6.16.orig/drivers/xen/xenbus/xenbus_client.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/xenbus/xenbus_client.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,412 @@
+/******************************************************************************
+ * Client-facing interface for the Xenbus driver. In other words, the
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/xenbus/xenbus_comms.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.c
---- ref-linux-2.6.16.9/drivers/xen/xenbus/xenbus_comms.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/xenbus/xenbus_comms.c linux-2.6.16/drivers/xen/xenbus/xenbus_comms.c
+--- linux-2.6.16.orig/drivers/xen/xenbus/xenbus_comms.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/xenbus/xenbus_comms.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,218 @@
+/******************************************************************************
+ * xenbus_comms.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/xenbus/xenbus_comms.h tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.h
---- ref-linux-2.6.16.9/drivers/xen/xenbus/xenbus_comms.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/xenbus/xenbus_comms.h linux-2.6.16/drivers/xen/xenbus/xenbus_comms.h
+--- linux-2.6.16.orig/drivers/xen/xenbus/xenbus_comms.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/xenbus/xenbus_comms.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,53 @@
+/*
+ * Private include for xenbus communications.
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/xenbus/xenbus_dev.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_dev.c
---- ref-linux-2.6.16.9/drivers/xen/xenbus/xenbus_dev.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_dev.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/xenbus/xenbus_dev.c linux-2.6.16/drivers/xen/xenbus/xenbus_dev.c
+--- linux-2.6.16.orig/drivers/xen/xenbus/xenbus_dev.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/xenbus/xenbus_dev.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,252 @@
+/*
+ * xenbus_dev.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.c
---- ref-linux-2.6.16.9/drivers/xen/xenbus/xenbus_probe.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/xenbus/xenbus_probe.c linux-2.6.16/drivers/xen/xenbus/xenbus_probe.c
+--- linux-2.6.16.orig/drivers/xen/xenbus/xenbus_probe.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/xenbus/xenbus_probe.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,1083 @@
+/******************************************************************************
+ * Talks to Xen Store to figure out what devices we have.
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_xs.c
---- ref-linux-2.6.16.9/drivers/xen/xenbus/xenbus_xs.c 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_xs.c 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/drivers/xen/xenbus/xenbus_xs.c linux-2.6.16/drivers/xen/xenbus/xenbus_xs.c
+--- linux-2.6.16.orig/drivers/xen/xenbus/xenbus_xs.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/drivers/xen/xenbus/xenbus_xs.c 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,856 @@
+/******************************************************************************
+ * xenbus_xs.c
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/fs/Kconfig tmp-linux-2.6-xen.patch/fs/Kconfig
---- ref-linux-2.6.16.9/fs/Kconfig 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/fs/Kconfig 2006-04-10 00:05:52.000000000 +0200
-@@ -841,6 +841,7 @@ config TMPFS
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/fs/Kconfig linux-2.6.16/fs/Kconfig
+--- linux-2.6.16.orig/fs/Kconfig 2006-06-26 09:49:45.000000000 +0200
++++ linux-2.6.16/fs/Kconfig 2006-06-26 09:51:32.000000000 +0200
+@@ -843,6 +843,7 @@
config HUGETLBFS
bool "HugeTLB file system support"
depends X86 || IA64 || PPC64 || SPARC64 || SUPERH || BROKEN
config HUGETLB_PAGE
def_bool HUGETLBFS
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/a.out.h tmp-linux-2.6-xen.patch/include/asm-i386/a.out.h
---- ref-linux-2.6.16.9/include/asm-i386/a.out.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/a.out.h 2006-04-10 00:05:52.000000000 +0200
-@@ -19,7 +19,7 @@ struct exec
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/a.out.h linux-2.6.16/include/asm-i386/a.out.h
+--- linux-2.6.16.orig/include/asm-i386/a.out.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-i386/a.out.h 2006-06-26 09:51:32.000000000 +0200
+@@ -19,7 +19,7 @@
#ifdef __KERNEL__
#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/apic.h tmp-linux-2.6-xen.patch/include/asm-i386/apic.h
---- ref-linux-2.6.16.9/include/asm-i386/apic.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/apic.h 2006-04-10 00:05:52.000000000 +0200
-@@ -132,10 +132,12 @@ extern unsigned int nmi_watchdog;
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/apic.h linux-2.6.16/include/asm-i386/apic.h
+--- linux-2.6.16.orig/include/asm-i386/apic.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-i386/apic.h 2006-06-26 09:51:32.000000000 +0200
+@@ -132,10 +132,12 @@
extern int disable_timer_pin_1;
extern int timer_over_8254;
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/atomic.h tmp-linux-2.6-xen.patch/include/asm-i386/atomic.h
---- ref-linux-2.6.16.9/include/asm-i386/atomic.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/atomic.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/atomic.h linux-2.6.16/include/asm-i386/atomic.h
+--- linux-2.6.16.orig/include/asm-i386/atomic.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-i386/atomic.h 2006-06-26 09:51:32.000000000 +0200
@@ -4,18 +4,13 @@
#include <linux/config.h>
#include <linux/compiler.h>
/*
* Make sure gcc doesn't try to be clever and move things around
* on us. We need to use _exactly_ the address the user gave us,
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/bitops.h tmp-linux-2.6-xen.patch/include/asm-i386/bitops.h
---- ref-linux-2.6.16.9/include/asm-i386/bitops.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/bitops.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/bitops.h linux-2.6.16/include/asm-i386/bitops.h
+--- linux-2.6.16.orig/include/asm-i386/bitops.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-i386/bitops.h 2006-06-26 09:51:32.000000000 +0200
@@ -7,6 +7,7 @@
#include <linux/config.h>
"btsl %1,%0"
:"+m" (ADDR)
:"Ir" (nr));
-@@ -76,7 +71,7 @@ static inline void __set_bit(int nr, vol
+@@ -76,7 +71,7 @@
*/
static inline void clear_bit(int nr, volatile unsigned long * addr)
{
"btrl %1,%0"
:"+m" (ADDR)
:"Ir" (nr));
-@@ -121,7 +116,7 @@ static inline void __change_bit(int nr,
+@@ -121,7 +116,7 @@
*/
static inline void change_bit(int nr, volatile unsigned long * addr)
{
"btcl %1,%0"
:"+m" (ADDR)
:"Ir" (nr));
-@@ -140,7 +135,7 @@ static inline int test_and_set_bit(int n
+@@ -140,7 +135,7 @@
{
int oldbit;
"btsl %2,%1\n\tsbbl %0,%0"
:"=r" (oldbit),"+m" (ADDR)
:"Ir" (nr) : "memory");
-@@ -180,7 +175,7 @@ static inline int test_and_clear_bit(int
+@@ -180,7 +175,7 @@
{
int oldbit;
"btrl %2,%1\n\tsbbl %0,%0"
:"=r" (oldbit),"+m" (ADDR)
:"Ir" (nr) : "memory");
-@@ -231,7 +226,7 @@ static inline int test_and_change_bit(in
+@@ -231,7 +226,7 @@
{
int oldbit;
"btcl %2,%1\n\tsbbl %0,%0"
:"=r" (oldbit),"+m" (ADDR)
:"Ir" (nr) : "memory");
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/elf.h tmp-linux-2.6-xen.patch/include/asm-i386/elf.h
---- ref-linux-2.6.16.9/include/asm-i386/elf.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/elf.h 2006-04-10 00:05:52.000000000 +0200
-@@ -129,11 +129,16 @@ extern int dump_task_extended_fpu (struc
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/elf.h linux-2.6.16/include/asm-i386/elf.h
+--- linux-2.6.16.orig/include/asm-i386/elf.h 2006-06-26 09:49:46.000000000 +0200
++++ linux-2.6.16/include/asm-i386/elf.h 2006-06-26 09:51:32.000000000 +0200
+@@ -129,11 +129,16 @@
#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
#define ELF_CORE_COPY_XFPREGS(tsk, elf_xfpregs) dump_task_extended_fpu(tsk, elf_xfpregs)
#define ARCH_DLINFO \
do { \
NEW_AUX_ENT(AT_SYSINFO, VSYSCALL_ENTRY); \
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/fixmap.h tmp-linux-2.6-xen.patch/include/asm-i386/fixmap.h
---- ref-linux-2.6.16.9/include/asm-i386/fixmap.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/fixmap.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/fixmap.h linux-2.6.16/include/asm-i386/fixmap.h
+--- linux-2.6.16.orig/include/asm-i386/fixmap.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-i386/fixmap.h 2006-06-26 09:51:32.000000000 +0200
@@ -20,7 +20,7 @@
* Leave one empty page between vmalloc'ed areas and
* the start of the fixmap.
#ifdef CONFIG_X86_LOCAL_APIC
FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */
#endif
-@@ -95,6 +94,8 @@ enum fixed_addresses {
+@@ -95,6 +94,8 @@
extern void __set_fixmap (enum fixed_addresses idx,
unsigned long phys, pgprot_t flags);
#define set_fixmap(idx, phys) \
__set_fixmap(idx, phys, PAGE_KERNEL)
/*
-@@ -116,14 +117,6 @@ extern void __set_fixmap (enum fixed_add
+@@ -116,14 +117,6 @@
#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
#define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
extern void __this_fixmap_does_not_exist(void);
/*
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/futex.h tmp-linux-2.6-xen.patch/include/asm-i386/futex.h
---- ref-linux-2.6.16.9/include/asm-i386/futex.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/futex.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/futex.h linux-2.6.16/include/asm-i386/futex.h
+--- linux-2.6.16.orig/include/asm-i386/futex.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-i386/futex.h 2006-06-26 09:51:32.000000000 +0200
@@ -28,7 +28,7 @@
"1: movl %2, %0\n\
movl %0, %3\n" \
jnz 1b\n\
3: .section .fixup,\"ax\"\n\
4: mov %5, %1\n\
-@@ -68,7 +68,7 @@ futex_atomic_op_inuser (int encoded_op,
+@@ -68,7 +68,7 @@
#endif
switch (op) {
case FUTEX_OP_ADD:
oldval, uaddr, oparg);
break;
case FUTEX_OP_OR:
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-default/mach_traps.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-default/mach_traps.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-default/mach_traps.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-default/mach_traps.h 2006-04-10 00:05:52.000000000 +0200
-@@ -15,6 +15,18 @@ static inline void clear_mem_error(unsig
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-default/mach_traps.h linux-2.6.16/include/asm-i386/mach-default/mach_traps.h
+--- linux-2.6.16.orig/include/asm-i386/mach-default/mach_traps.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-default/mach_traps.h 2006-06-26 09:51:32.000000000 +0200
+@@ -15,6 +15,18 @@
outb(reason, 0x61);
}
static inline unsigned char get_nmi_reason(void)
{
return inb(0x61);
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/agp.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/agp.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/agp.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/agp.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/agp.h linux-2.6.16/include/asm-i386/mach-xen/asm/agp.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/agp.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/agp.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,37 @@
+#ifndef AGP_H
+#define AGP_H 1
+ dma_free_coherent(NULL,PAGE_SIZE<<(order),(table),virt_to_bus(table))
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/desc.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/desc.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/desc.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/desc.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/desc.h linux-2.6.16/include/asm-i386/mach-xen/asm/desc.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/desc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/desc.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,164 @@
+#ifndef __ARCH_DESC_H
+#define __ARCH_DESC_H
+#endif /* !__ASSEMBLY__ */
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/dma-mapping.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/dma-mapping.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/dma-mapping.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/dma-mapping.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/dma-mapping.h linux-2.6.16/include/asm-i386/mach-xen/asm/dma-mapping.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/dma-mapping.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/dma-mapping.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,156 @@
+#ifndef _ASM_I386_DMA_MAPPING_H
+#define _ASM_I386_DMA_MAPPING_H
+ dma_addr_t device_addr, size_t size);
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/fixmap.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/fixmap.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/fixmap.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/fixmap.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/fixmap.h linux-2.6.16/include/asm-i386/mach-xen/asm/fixmap.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/fixmap.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/fixmap.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,156 @@
+/*
+ * fixmap.h: compile-time virtual memory allocation
+
+#endif /* !__ASSEMBLY__ */
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/floppy.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/floppy.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/floppy.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/floppy.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/floppy.h linux-2.6.16/include/asm-i386/mach-xen/asm/floppy.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/floppy.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/floppy.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,147 @@
+/*
+ * Architecture specific parts of the Floppy driver
+#define EXTRA_FLOPPY_PARAMS
+
+#endif /* __ASM_XEN_I386_FLOPPY_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/highmem.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/highmem.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/highmem.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/highmem.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/highmem.h linux-2.6.16/include/asm-i386/mach-xen/asm/highmem.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/highmem.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/highmem.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,81 @@
+/*
+ * highmem.h: virtual kernel memory mappings for high memory
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_HIGHMEM_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/hw_irq.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hw_irq.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/hw_irq.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hw_irq.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/hw_irq.h linux-2.6.16/include/asm-i386/mach-xen/asm/hw_irq.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/hw_irq.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/hw_irq.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,73 @@
+#ifndef _ASM_HW_IRQ_H
+#define _ASM_HW_IRQ_H
+extern void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i);
+
+#endif /* _ASM_HW_IRQ_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/hypercall.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypercall.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/hypercall.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypercall.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/hypercall.h linux-2.6.16/include/asm-i386/mach-xen/asm/hypercall.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/hypercall.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/hypercall.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,342 @@
+/******************************************************************************
+ * hypercall.h
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/hypervisor.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypervisor.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/hypervisor.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypervisor.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/hypervisor.h linux-2.6.16/include/asm-i386/mach-xen/asm/hypervisor.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/hypervisor.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/hypervisor.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,224 @@
+/******************************************************************************
+ * hypervisor.h
+}
+
+#endif /* __HYPERVISOR_H__ */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/io.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/io.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/io.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/io.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/io.h linux-2.6.16/include/asm-i386/mach-xen/asm/io.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/io.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/io.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,401 @@
+#ifndef _ASM_IO_H
+#define _ASM_IO_H
+#define ARCH_HAS_DEV_MEM
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/kmap_types.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/kmap_types.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/kmap_types.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/kmap_types.h linux-2.6.16/include/asm-i386/mach-xen/asm/kmap_types.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/kmap_types.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,32 @@
+#ifndef _ASM_KMAP_TYPES_H
+#define _ASM_KMAP_TYPES_H
+#undef D
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/mmu_context.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/mmu_context.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/mmu_context.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/mmu_context.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/mmu.h linux-2.6.16/include/asm-i386/mach-xen/asm/mmu.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/mmu.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/mmu.h 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,21 @@
++#ifndef __i386_MMU_H
++#define __i386_MMU_H
++
++#include <asm/semaphore.h>
++/*
++ * The i386 doesn't have a mmu context, but
++ * we put the segment information here.
++ *
++ * cpu_vm_mask is used to optimize ldt flushing.
++ */
++typedef struct {
++ int size;
++ struct semaphore sem;
++ void *ldt;
++} mm_context_t;
++
++/* mm/memory.c:exit_mmap hook */
++extern void _arch_exit_mmap(struct mm_struct *mm);
++#define arch_exit_mmap(_mm) _arch_exit_mmap(_mm)
++
++#endif
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/mmu_context.h linux-2.6.16/include/asm-i386/mach-xen/asm/mmu_context.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/mmu_context.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/mmu_context.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,105 @@
+#ifndef __I386_SCHED_H
+#define __I386_SCHED_H
+ switch_mm((prev),(next),NULL)
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/mmu.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/mmu.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/mmu.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/mmu.h 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,21 @@
-+#ifndef __i386_MMU_H
-+#define __i386_MMU_H
-+
-+#include <asm/semaphore.h>
-+/*
-+ * The i386 doesn't have a mmu context, but
-+ * we put the segment information here.
-+ *
-+ * cpu_vm_mask is used to optimize ldt flushing.
-+ */
-+typedef struct {
-+ int size;
-+ struct semaphore sem;
-+ void *ldt;
-+} mm_context_t;
-+
-+/* mm/memory.c:exit_mmap hook */
-+extern void _arch_exit_mmap(struct mm_struct *mm);
-+#define arch_exit_mmap(_mm) _arch_exit_mmap(_mm)
-+
-+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/page.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/page.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/page.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/page.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/page.h linux-2.6.16/include/asm-i386/mach-xen/asm/page.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/page.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/page.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,327 @@
+#ifndef _I386_PAGE_H
+#define _I386_PAGE_H
+#include <asm-generic/page.h>
+
+#endif /* _I386_PAGE_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/param.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/param.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/param.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/param.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/param.h linux-2.6.16/include/asm-i386/mach-xen/asm/param.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/param.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/param.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,24 @@
+#ifndef _ASMi386_PARAM_H
+#define _ASMi386_PARAM_H
+#define COMMAND_LINE_SIZE 256
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pci.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pci.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pci.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pci.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pci.h linux-2.6.16/include/asm-i386/mach-xen/asm/pci.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pci.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/pci.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,154 @@
+#ifndef __i386_PCI_H
+#define __i386_PCI_H
+#define pcibios_scan_all_fns(a, b) 1
+
+#endif /* __i386_PCI_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pgalloc.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgalloc.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pgalloc.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgalloc.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pgalloc.h linux-2.6.16/include/asm-i386/mach-xen/asm/pgalloc.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pgalloc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/pgalloc.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,64 @@
+#ifndef _I386_PGALLOC_H
+#define _I386_PGALLOC_H
+#define check_pgt_cache() do { } while (0)
+
+#endif /* _I386_PGALLOC_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h linux-2.6.16/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,21 @@
+#ifndef _I386_PGTABLE_2LEVEL_DEFS_H
+#define _I386_PGTABLE_2LEVEL_DEFS_H
+#define PTRS_PER_PTE 1024
+
+#endif /* _I386_PGTABLE_2LEVEL_DEFS_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pgtable-2level.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-2level.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pgtable-2level.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-2level.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pgtable-2level.h linux-2.6.16/include/asm-i386/mach-xen/asm/pgtable-2level.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pgtable-2level.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/pgtable-2level.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,83 @@
+#ifndef _I386_PGTABLE_2LEVEL_H
+#define _I386_PGTABLE_2LEVEL_H
+#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
+
+#endif /* _I386_PGTABLE_2LEVEL_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h linux-2.6.16/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,25 @@
+#ifndef _I386_PGTABLE_3LEVEL_DEFS_H
+#define _I386_PGTABLE_3LEVEL_DEFS_H
+#define PTRS_PER_PTE 512
+
+#endif /* _I386_PGTABLE_3LEVEL_DEFS_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pgtable-3level.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-3level.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pgtable-3level.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-3level.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pgtable-3level.h linux-2.6.16/include/asm-i386/mach-xen/asm/pgtable-3level.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pgtable-3level.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/pgtable-3level.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,181 @@
+#ifndef _I386_PGTABLE_3LEVEL_H
+#define _I386_PGTABLE_3LEVEL_H
+#define __pmd_free_tlb(tlb, x) do { } while (0)
+
+#endif /* _I386_PGTABLE_3LEVEL_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pgtable.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/pgtable.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pgtable.h linux-2.6.16/include/asm-i386/mach-xen/asm/pgtable.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/pgtable.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/pgtable.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,521 @@
+#ifndef _I386_PGTABLE_H
+#define _I386_PGTABLE_H
+#include <asm-generic/pgtable.h>
+
+#endif /* _I386_PGTABLE_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/processor.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/processor.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/processor.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/processor.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/processor.h linux-2.6.16/include/asm-i386/mach-xen/asm/processor.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/processor.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/processor.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,753 @@
+/*
+ * include/asm-i386/processor.h
+#endif
+
+#endif /* __ASM_I386_PROCESSOR_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/ptrace.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/ptrace.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/ptrace.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/ptrace.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/ptrace.h linux-2.6.16/include/asm-i386/mach-xen/asm/ptrace.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/ptrace.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/ptrace.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,90 @@
+#ifndef _I386_PTRACE_H
+#define _I386_PTRACE_H
+#endif /* __KERNEL__ */
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/scatterlist.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/scatterlist.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/scatterlist.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/scatterlist.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/scatterlist.h linux-2.6.16/include/asm-i386/mach-xen/asm/scatterlist.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/scatterlist.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/scatterlist.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,22 @@
+#ifndef _I386_SCATTERLIST_H
+#define _I386_SCATTERLIST_H
+#define ISA_DMA_THRESHOLD (0x00ffffff)
+
+#endif /* !(_I386_SCATTERLIST_H) */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/segment.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/segment.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/segment.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/segment.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/segment.h linux-2.6.16/include/asm-i386/mach-xen/asm/segment.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/segment.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/segment.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,117 @@
+#ifndef _ASM_SEGMENT_H
+#define _ASM_SEGMENT_H
+#define IDT_ENTRIES 256
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/setup.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/setup.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/setup.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/setup.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/setup.h linux-2.6.16/include/asm-i386/mach-xen/asm/setup.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/setup.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/setup.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,66 @@
+/*
+ * Just a place holder. We don't want to have to test x86 before
+#endif /* __ASSEMBLY__ */
+
+#endif /* _i386_SETUP_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/smp.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/smp.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/smp.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/smp.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/smp.h linux-2.6.16/include/asm-i386/mach-xen/asm/smp.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/smp.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/smp.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,103 @@
+#ifndef __ASM_SMP_H
+#define __ASM_SMP_H
+
+#endif
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/spinlock.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/spinlock.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/spinlock.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/spinlock.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/spinlock.h linux-2.6.16/include/asm-i386/mach-xen/asm/spinlock.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/spinlock.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/spinlock.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,217 @@
+#ifndef __ASM_SPINLOCK_H
+#define __ASM_SPINLOCK_H
+}
+
+#endif /* __ASM_SPINLOCK_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/swiotlb.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/swiotlb.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/swiotlb.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/swiotlb.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/swiotlb.h linux-2.6.16/include/asm-i386/mach-xen/asm/swiotlb.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/swiotlb.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/swiotlb.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,43 @@
+#ifndef _ASM_SWIOTLB_H
+#define _ASM_SWIOTLB_H 1
+#endif
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/synch_bitops.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/synch_bitops.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/synch_bitops.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/synch_bitops.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/synch_bitops.h linux-2.6.16/include/asm-i386/mach-xen/asm/synch_bitops.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/synch_bitops.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/synch_bitops.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,141 @@
+#ifndef __XEN_SYNCH_BITOPS_H__
+#define __XEN_SYNCH_BITOPS_H__
+ synch_var_test_bit((nr),(addr)))
+
+#endif /* __XEN_SYNCH_BITOPS_H__ */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/system.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/system.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/system.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/system.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/system.h linux-2.6.16/include/asm-i386/mach-xen/asm/system.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/system.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/system.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,679 @@
+#ifndef __ASM_SYSTEM_H
+#define __ASM_SYSTEM_H
+extern unsigned long arch_align_stack(unsigned long sp);
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/tlbflush.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/tlbflush.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/tlbflush.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/tlbflush.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/tlbflush.h linux-2.6.16/include/asm-i386/mach-xen/asm/tlbflush.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/tlbflush.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/tlbflush.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,102 @@
+#ifndef _I386_TLBFLUSH_H
+#define _I386_TLBFLUSH_H
+}
+
+#endif /* _I386_TLBFLUSH_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/vga.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/vga.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/asm/vga.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/vga.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/asm/vga.h linux-2.6.16/include/asm-i386/mach-xen/asm/vga.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/asm/vga.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/asm/vga.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,20 @@
+/*
+ * Access to VGA videoram
+#define vga_writeb(x,y) (*(y) = (x))
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/irq_vectors.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/irq_vectors.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/irq_vectors.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/irq_vectors.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/irq_vectors.h linux-2.6.16/include/asm-i386/mach-xen/irq_vectors.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/irq_vectors.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/irq_vectors.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,125 @@
+/*
+ * This file should contain #defines for all of the interrupt vector
+#define irq_to_dynirq(_x) ((_x) - DYNIRQ_BASE)
+
+#endif /* _ASM_IRQ_VECTORS_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/mach_traps.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/mach_traps.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/mach_traps.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/mach_traps.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/mach_traps.h linux-2.6.16/include/asm-i386/mach-xen/mach_traps.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/mach_traps.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/mach_traps.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,33 @@
+/*
+ * include/asm-xen/asm-i386/mach-xen/mach_traps.h
+static inline void reassert_nmi(void) {}
+
+#endif /* !_MACH_TRAPS_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/setup_arch_post.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/setup_arch_post.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/setup_arch_post.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/setup_arch_post.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/setup_arch_post.h linux-2.6.16/include/asm-i386/mach-xen/setup_arch_post.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/setup_arch_post.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/setup_arch_post.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,45 @@
+/**
+ * machine_specific_memory_setup - Hook for machine specific memory setup.
+ &pp) == 0)
+ set_fixaddr_top(pp.virt_start - PAGE_SIZE);
+}
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/mach-xen/setup_arch_pre.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/setup_arch_pre.h
---- ref-linux-2.6.16.9/include/asm-i386/mach-xen/setup_arch_pre.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/setup_arch_pre.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/mach-xen/setup_arch_pre.h linux-2.6.16/include/asm-i386/mach-xen/setup_arch_pre.h
+--- linux-2.6.16.orig/include/asm-i386/mach-xen/setup_arch_pre.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/mach-xen/setup_arch_pre.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,5 @@
+/* Hook to call BIOS initialisation function */
+
+#define ARCH_SETUP machine_specific_arch_setup();
+
+static void __init machine_specific_arch_setup(void);
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/page.h tmp-linux-2.6-xen.patch/include/asm-i386/page.h
---- ref-linux-2.6.16.9/include/asm-i386/page.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/page.h 2006-04-10 00:05:52.000000000 +0200
-@@ -121,7 +121,7 @@ extern int page_is_ram(unsigned long pag
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/page.h linux-2.6.16/include/asm-i386/page.h
+--- linux-2.6.16.orig/include/asm-i386/page.h 2006-06-26 09:49:46.000000000 +0200
++++ linux-2.6.16/include/asm-i386/page.h 2006-06-26 09:56:49.000000000 +0200
+@@ -112,7 +112,7 @@
+ #define __PAGE_OFFSET CONFIG_PAGE_OFFSET
+ #define __PHYSICAL_START CONFIG_PHYSICAL_START
+ #define __KERNEL_START (__PAGE_OFFSET + __PHYSICAL_START)
+-#define __MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE)
++#define __MAXMEM (__FIXADDR_TOP-__PAGE_OFFSET-__VMALLOC_RESERVE)
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
- #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE)
--#define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE)
-+#define MAXMEM (__FIXADDR_TOP-__PAGE_OFFSET-__VMALLOC_RESERVE)
- #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
- #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
- #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
-@@ -139,6 +139,8 @@ extern int page_is_ram(unsigned long pag
+ #define PHYSICAL_START ((unsigned long)__PHYSICAL_START)
+@@ -135,6 +135,8 @@
((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */
#include <asm-generic/page.h>
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/rwsem.h tmp-linux-2.6-xen.patch/include/asm-i386/rwsem.h
---- ref-linux-2.6.16.9/include/asm-i386/rwsem.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/rwsem.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/rwsem.h linux-2.6.16/include/asm-i386/rwsem.h
+--- linux-2.6.16.orig/include/asm-i386/rwsem.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-i386/rwsem.h 2006-06-26 09:51:32.000000000 +0200
@@ -40,6 +40,7 @@
#include <linux/list.h>
struct rwsem_waiter;
-@@ -99,7 +100,7 @@ static inline void __down_read(struct rw
+@@ -99,7 +100,7 @@
{
__asm__ __volatile__(
"# beginning down_read\n\t"
" js 2f\n\t" /* jump if we weren't granted the lock */
"1:\n\t"
LOCK_SECTION_START("")
-@@ -130,7 +131,7 @@ static inline int __down_read_trylock(st
+@@ -130,7 +131,7 @@
" movl %1,%2\n\t"
" addl %3,%2\n\t"
" jle 2f\n\t"
" jnz 1b\n\t"
"2:\n\t"
"# ending __down_read_trylock\n\t"
-@@ -150,7 +151,7 @@ static inline void __down_write(struct r
+@@ -150,7 +151,7 @@
tmp = RWSEM_ACTIVE_WRITE_BIAS;
__asm__ __volatile__(
"# beginning down_write\n\t"
" testl %%edx,%%edx\n\t" /* was the count 0 before? */
" jnz 2f\n\t" /* jump if we weren't granted the lock */
"1:\n\t"
-@@ -188,7 +189,7 @@ static inline void __up_read(struct rw_s
+@@ -188,7 +189,7 @@
__s32 tmp = -RWSEM_ACTIVE_READ_BIAS;
__asm__ __volatile__(
"# beginning __up_read\n\t"
" js 2f\n\t" /* jump if the lock is being waited upon */
"1:\n\t"
LOCK_SECTION_START("")
-@@ -214,7 +215,7 @@ static inline void __up_write(struct rw_
+@@ -214,7 +215,7 @@
__asm__ __volatile__(
"# beginning __up_write\n\t"
" movl %2,%%edx\n\t"
" jnz 2f\n\t" /* jump if the lock is being waited upon */
"1:\n\t"
LOCK_SECTION_START("")
-@@ -239,7 +240,7 @@ static inline void __downgrade_write(str
+@@ -239,7 +240,7 @@
{
__asm__ __volatile__(
"# beginning __downgrade_write\n\t"
" js 2f\n\t" /* jump if the lock is being waited upon */
"1:\n\t"
LOCK_SECTION_START("")
-@@ -263,7 +264,7 @@ LOCK_PREFIX " addl %2,(%%eax)\n\t"
+@@ -263,7 +264,7 @@
static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem)
{
__asm__ __volatile__(
: "=m"(sem->count)
: "ir"(delta), "m"(sem->count));
}
-@@ -276,7 +277,7 @@ static inline int rwsem_atomic_update(in
+@@ -276,7 +277,7 @@
int tmp = delta;
__asm__ __volatile__(
: "+r"(tmp), "=m"(sem->count)
: "r"(sem), "m"(sem->count)
: "memory");
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/smp_alt.h tmp-linux-2.6-xen.patch/include/asm-i386/smp_alt.h
---- ref-linux-2.6.16.9/include/asm-i386/smp_alt.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/smp_alt.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/smp_alt.h linux-2.6.16/include/asm-i386/smp_alt.h
+--- linux-2.6.16.orig/include/asm-i386/smp_alt.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-i386/smp_alt.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,32 @@
+#ifndef __ASM_SMP_ALT_H__
+#define __ASM_SMP_ALT_H__
+#endif
+
+#endif /* __ASM_SMP_ALT_H__ */
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/spinlock.h tmp-linux-2.6-xen.patch/include/asm-i386/spinlock.h
---- ref-linux-2.6.16.9/include/asm-i386/spinlock.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/spinlock.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/spinlock.h linux-2.6.16/include/asm-i386/spinlock.h
+--- linux-2.6.16.orig/include/asm-i386/spinlock.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-i386/spinlock.h 2006-06-26 09:51:32.000000000 +0200
@@ -6,6 +6,7 @@
#include <asm/page.h>
#include <linux/config.h>
"jns 4f\n\t" \
"2:\t" \
"testl $0x200, %1\n\t" \
-@@ -65,10 +68,34 @@ static inline void __raw_spin_lock_flags
+@@ -65,10 +68,34 @@
static inline int __raw_spin_trylock(raw_spinlock_t *lock)
{
char oldval;
return oldval > 0;
}
-@@ -178,12 +205,12 @@ static inline int __raw_write_trylock(ra
+@@ -178,12 +205,12 @@
static inline void __raw_read_unlock(raw_rwlock_t *rw)
{
: "=m" (rw->lock) : : "memory");
}
-diff -Nurp ref-linux-2.6.16.9/include/asm-i386/system.h tmp-linux-2.6-xen.patch/include/asm-i386/system.h
---- ref-linux-2.6.16.9/include/asm-i386/system.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/system.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-i386/system.h linux-2.6.16/include/asm-i386/system.h
+--- linux-2.6.16.orig/include/asm-i386/system.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-i386/system.h 2006-06-26 09:51:32.000000000 +0200
@@ -5,7 +5,7 @@
#include <linux/kernel.h>
#include <asm/segment.h>
#ifdef __KERNEL__
-@@ -271,19 +271,19 @@ static inline unsigned long __cmpxchg(vo
+@@ -271,19 +271,19 @@
unsigned long prev;
switch (size) {
case 1:
: "=a"(prev)
: "r"(new), "m"(*__xg(ptr)), "0"(old)
: "memory");
-@@ -336,7 +336,7 @@ static inline unsigned long long __cmpxc
+@@ -336,7 +336,7 @@
unsigned long long new)
{
unsigned long long prev;
: "=A"(prev)
: "b"((unsigned long)new),
"c"((unsigned long)(new >> 32)),
-@@ -503,11 +503,55 @@ struct alt_instr {
+@@ -503,11 +503,55 @@
#endif
#ifdef CONFIG_SMP
#else
#define smp_mb() barrier()
#define smp_rmb() barrier()
-diff -Nurp ref-linux-2.6.16.9/include/asm-ia64/fixmap.h tmp-linux-2.6-xen.patch/include/asm-ia64/fixmap.h
---- ref-linux-2.6.16.9/include/asm-ia64/fixmap.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/fixmap.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-ia64/fixmap.h linux-2.6.16/include/asm-ia64/fixmap.h
+--- linux-2.6.16.orig/include/asm-ia64/fixmap.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-ia64/fixmap.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,2 @@
+#define clear_fixmap(x) do {} while (0)
+#define set_fixmap(x,y) do {} while (0)
-diff -Nurp ref-linux-2.6.16.9/include/asm-ia64/gcc_intrin.h tmp-linux-2.6-xen.patch/include/asm-ia64/gcc_intrin.h
---- ref-linux-2.6.16.9/include/asm-ia64/gcc_intrin.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/gcc_intrin.h 2006-04-10 00:05:52.000000000 +0200
-@@ -26,7 +26,7 @@ extern void ia64_bad_param_for_getreg (v
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-ia64/gcc_intrin.h linux-2.6.16/include/asm-ia64/gcc_intrin.h
+--- linux-2.6.16.orig/include/asm-ia64/gcc_intrin.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-ia64/gcc_intrin.h 2006-06-26 09:51:32.000000000 +0200
+@@ -26,7 +26,7 @@
register unsigned long ia64_r13 asm ("r13") __attribute_used__;
({ \
switch (regnum) { \
case _IA64_REG_PSR_L: \
-@@ -55,7 +55,7 @@ register unsigned long ia64_r13 asm ("r1
+@@ -55,7 +55,7 @@
} \
})
({ \
__u64 ia64_intri_res; \
\
-@@ -92,7 +92,7 @@ register unsigned long ia64_r13 asm ("r1
+@@ -92,7 +92,7 @@
#define ia64_hint_pause 0
({ \
switch (mode) { \
case ia64_hint_pause: \
-@@ -374,7 +374,7 @@ register unsigned long ia64_r13 asm ("r1
+@@ -374,7 +374,7 @@
#define ia64_invala() asm volatile ("invala" ::: "memory")
({ \
__u64 ia64_intri_res; \
asm volatile ("thash %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \
-@@ -394,18 +394,18 @@ register unsigned long ia64_r13 asm ("r1
+@@ -394,18 +394,18 @@
#define ia64_nop(x) asm volatile ("nop %0"::"i"(x));
({ \
__u64 ia64_pa; \
asm volatile ("tpa %0 = %1" : "=r"(ia64_pa) : "r"(addr) : "memory"); \
-@@ -415,22 +415,22 @@ register unsigned long ia64_r13 asm ("r1
+@@ -415,22 +415,22 @@
#define __ia64_set_dbr(index, val) \
asm volatile ("mov dbr[%0]=%1" :: "r"(index), "r"(val) : "memory")
({ \
__u64 ia64_intri_res; \
asm volatile ("mov %0=cpuid[%r1]" : "=r"(ia64_intri_res) : "rO"(index)); \
-@@ -444,21 +444,21 @@ register unsigned long ia64_r13 asm ("r1
+@@ -444,21 +444,21 @@
ia64_intri_res; \
})
({ \
__u64 ia64_intri_res; \
asm volatile ("mov %0=pmc[%1]" : "=r"(ia64_intri_res) : "r"(index)); \
-@@ -466,48 +466,48 @@ register unsigned long ia64_r13 asm ("r1
+@@ -466,48 +466,48 @@
})
asm volatile ("ptr.d %0,%1" :: "r"(addr), "r"(size) : "memory")
/* Values for lfhint in ia64_lfetch and ia64_lfetch_fault */
-@@ -589,7 +589,7 @@ do { \
+@@ -589,7 +589,7 @@
} \
})
do { \
asm volatile (";; cmp.ne p6,p7=%0,r0;;" \
"(p6) ssm psr.i;" \
-@@ -598,4 +598,6 @@ do { \
+@@ -598,4 +598,6 @@
:: "r"((x)) : "p6", "p7", "memory"); \
} while (0)
+#define __ia64_get_psr_i() (__ia64_getreg(_IA64_REG_PSR) & 0x4000UL)
+
#endif /* _ASM_IA64_GCC_INTRIN_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-ia64/hypercall.h tmp-linux-2.6-xen.patch/include/asm-ia64/hypercall.h
---- ref-linux-2.6.16.9/include/asm-ia64/hypercall.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/hypercall.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-ia64/hypercall.h linux-2.6.16/include/asm-ia64/hypercall.h
+--- linux-2.6.16.orig/include/asm-ia64/hypercall.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-ia64/hypercall.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,274 @@
+/******************************************************************************
+ * hypercall.h
+#define do_IRQ(irq, regs) __do_IRQ((irq), (regs))
+
+#endif /* __HYPERCALL_H__ */
-diff -Nurp ref-linux-2.6.16.9/include/asm-ia64/hypervisor.h tmp-linux-2.6-xen.patch/include/asm-ia64/hypervisor.h
---- ref-linux-2.6.16.9/include/asm-ia64/hypervisor.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/hypervisor.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-ia64/hypervisor.h linux-2.6.16/include/asm-ia64/hypervisor.h
+--- linux-2.6.16.orig/include/asm-ia64/hypervisor.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-ia64/hypervisor.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,138 @@
+/******************************************************************************
+ * hypervisor.h
+#define pfn_pte_ma(_x,_y) __pte_ma(0)
+
+#endif /* __HYPERVISOR_H__ */
-diff -Nurp ref-linux-2.6.16.9/include/asm-ia64/intel_intrin.h tmp-linux-2.6-xen.patch/include/asm-ia64/intel_intrin.h
---- ref-linux-2.6.16.9/include/asm-ia64/intel_intrin.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/intel_intrin.h 2006-04-10 00:05:52.000000000 +0200
-@@ -119,10 +119,10 @@ __s64 _m64_popcnt(__s64 a);
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-ia64/intel_intrin.h linux-2.6.16/include/asm-ia64/intel_intrin.h
+--- linux-2.6.16.orig/include/asm-ia64/intel_intrin.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-ia64/intel_intrin.h 2006-06-26 09:51:32.000000000 +0200
+@@ -119,10 +119,10 @@
* intrinsic
*/
#define ia64_mux1_brcst 0
#define ia64_mux1_mix 8
-@@ -135,16 +135,16 @@ __s64 _m64_popcnt(__s64 a);
+@@ -135,16 +135,16 @@
#define ia64_getf_exp __getf_exp
#define ia64_shrp _m64_shrp
#define ia64_ldfs __ldfs
#define ia64_ldfd __ldfd
-@@ -182,24 +182,24 @@ __s64 _m64_popcnt(__s64 a);
+@@ -182,24 +182,24 @@
#define __ia64_set_dbr(index, val) \
__setIndReg(_IA64_REG_INDR_DBR, index, val)
#define ia64_srlz_d __dsrlz
#define ia64_srlz_i __isrlz
-@@ -218,18 +218,18 @@ __s64 _m64_popcnt(__s64 a);
+@@ -218,18 +218,18 @@
#define ia64_ld8_acq __ld8_acq
#define ia64_sync_i __synci
#define ia64_dep_mi _m64_dep_mi
/* Values for lfhint in __lfetch and __lfetch_fault */
-@@ -244,14 +244,16 @@ __s64 _m64_popcnt(__s64 a);
+@@ -244,14 +244,16 @@
#define ia64_lfetch_fault __lfetch_fault
#define ia64_lfetch_fault_excl __lfetch_fault_excl
+#define __ia64_get_psr_i() (__ia64_getreg(_IA64_REG_PSR) & 0x4000UL)
+
#endif /* _ASM_IA64_INTEL_INTRIN_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-ia64/meminit.h tmp-linux-2.6-xen.patch/include/asm-ia64/meminit.h
---- ref-linux-2.6.16.9/include/asm-ia64/meminit.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/meminit.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-ia64/meminit.h linux-2.6.16/include/asm-ia64/meminit.h
+--- linux-2.6.16.orig/include/asm-ia64/meminit.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-ia64/meminit.h 2006-06-26 09:51:32.000000000 +0200
@@ -17,10 +17,15 @@
* - command line string
* - kernel code & data
struct rsvd_region {
unsigned long start; /* virtual address of beginning of element */
-diff -Nurp ref-linux-2.6.16.9/include/asm-ia64/pal.h tmp-linux-2.6-xen.patch/include/asm-ia64/pal.h
---- ref-linux-2.6.16.9/include/asm-ia64/pal.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/pal.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-ia64/pal.h linux-2.6.16/include/asm-ia64/pal.h
+--- linux-2.6.16.orig/include/asm-ia64/pal.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-ia64/pal.h 2006-06-26 09:51:32.000000000 +0200
@@ -81,6 +81,7 @@
#ifndef __ASSEMBLY__
#include <asm/fpu.h>
/*
-diff -Nurp ref-linux-2.6.16.9/include/asm-ia64/privop.h tmp-linux-2.6-xen.patch/include/asm-ia64/privop.h
---- ref-linux-2.6.16.9/include/asm-ia64/privop.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/privop.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-ia64/privop.h linux-2.6.16/include/asm-ia64/privop.h
+--- linux-2.6.16.orig/include/asm-ia64/privop.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-ia64/privop.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,59 @@
+#ifndef _ASM_IA64_PRIVOP_H
+#define _ASM_IA64_PRIVOP_H
+#endif /* !__ASSEMBLY */
+
+#endif /* _ASM_IA64_PRIVOP_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-ia64/processor.h tmp-linux-2.6-xen.patch/include/asm-ia64/processor.h
---- ref-linux-2.6.16.9/include/asm-ia64/processor.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/processor.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-ia64/processor.h linux-2.6.16/include/asm-ia64/processor.h
+--- linux-2.6.16.orig/include/asm-ia64/processor.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-ia64/processor.h 2006-06-26 09:51:32.000000000 +0200
@@ -19,6 +19,7 @@
#include <asm/kregs.h>
#include <asm/ptrace.h>
#define IA64_NUM_DBG_REGS 8
/*
-diff -Nurp ref-linux-2.6.16.9/include/asm-ia64/synch_bitops.h tmp-linux-2.6-xen.patch/include/asm-ia64/synch_bitops.h
---- ref-linux-2.6.16.9/include/asm-ia64/synch_bitops.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/synch_bitops.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-ia64/synch_bitops.h linux-2.6.16/include/asm-ia64/synch_bitops.h
+--- linux-2.6.16.orig/include/asm-ia64/synch_bitops.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-ia64/synch_bitops.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,61 @@
+#ifndef __XEN_SYNCH_BITOPS_H__
+#define __XEN_SYNCH_BITOPS_H__
+ synch_var_test_bit((nr),(addr)))
+
+#endif /* __XEN_SYNCH_BITOPS_H__ */
-diff -Nurp ref-linux-2.6.16.9/include/asm-ia64/system.h tmp-linux-2.6-xen.patch/include/asm-ia64/system.h
---- ref-linux-2.6.16.9/include/asm-ia64/system.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/system.h 2006-04-10 00:05:52.000000000 +0200
-@@ -125,7 +125,7 @@ extern struct ia64_boot_param {
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-ia64/system.h linux-2.6.16/include/asm-ia64/system.h
+--- linux-2.6.16.orig/include/asm-ia64/system.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-ia64/system.h 2006-06-26 09:51:32.000000000 +0200
+@@ -125,7 +125,7 @@
#define __local_irq_save(x) \
do { \
ia64_stop(); \
ia64_stop(); \
ia64_rsm(IA64_PSR_I); \
} while (0)
-@@ -173,7 +173,7 @@ do { \
+@@ -173,7 +173,7 @@
#endif /* !CONFIG_IA64_DEBUG_IRQ */
#define local_irq_enable() ({ ia64_stop(); ia64_ssm(IA64_PSR_I); ia64_srlz_d(); })
#define irqs_disabled() \
({ \
-diff -Nurp ref-linux-2.6.16.9/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen.patch/include/asm-ia64/xen/privop.h
---- ref-linux-2.6.16.9/include/asm-ia64/xen/privop.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/xen/privop.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-ia64/xen/privop.h linux-2.6.16/include/asm-ia64/xen/privop.h
+--- linux-2.6.16.orig/include/asm-ia64/xen/privop.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-ia64/xen/privop.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,277 @@
+#ifndef _ASM_IA64_XEN_PRIVOP_H
+#define _ASM_IA64_XEN_PRIVOP_H
+#define ia64_pal_call_static xen_pal_call_static
+
+#endif /* _ASM_IA64_XEN_PRIVOP_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-um/page.h tmp-linux-2.6-xen.patch/include/asm-um/page.h
---- ref-linux-2.6.16.9/include/asm-um/page.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-um/page.h 2006-04-10 00:05:52.000000000 +0200
-@@ -118,7 +118,7 @@ extern unsigned long uml_physmem;
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-um/page.h linux-2.6.16/include/asm-um/page.h
+--- linux-2.6.16.orig/include/asm-um/page.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-um/page.h 2006-06-26 09:51:32.000000000 +0200
+@@ -118,7 +118,7 @@
extern struct page *arch_validate(struct page *page, gfp_t mask, int order);
#define HAVE_ARCH_VALIDATE
#define HAVE_ARCH_FREE_PAGE
#include <asm-generic/page.h>
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/apic.h tmp-linux-2.6-xen.patch/include/asm-x86_64/apic.h
---- ref-linux-2.6.16.9/include/asm-x86_64/apic.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/apic.h 2006-04-10 00:05:52.000000000 +0200
-@@ -105,11 +105,13 @@ extern int disable_timer_pin_1;
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/apic.h linux-2.6.16/include/asm-x86_64/apic.h
+--- linux-2.6.16.orig/include/asm-x86_64/apic.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/apic.h 2006-06-26 09:51:32.000000000 +0200
+@@ -105,11 +105,13 @@
extern void setup_threshold_lvt(unsigned long lvt_off);
#endif /* CONFIG_X86_LOCAL_APIC */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/arch_hooks.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/arch_hooks.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/arch_hooks.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/arch_hooks.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/arch_hooks.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/arch_hooks.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/arch_hooks.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/arch_hooks.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,27 @@
+#ifndef _ASM_ARCH_HOOKS_H
+#define _ASM_ARCH_HOOKS_H
+extern void mca_nmi_hook(void);
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/bootsetup.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/bootsetup.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/bootsetup.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/bootsetup.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/bootsetup.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/bootsetup.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/bootsetup.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/bootsetup.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,42 @@
+
+#ifndef _X86_64_BOOTSETUP_H
+#define RAMDISK_LOAD_FLAG 0x4000
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/desc.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/desc.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/desc.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/desc.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/desc.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/desc.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/desc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/desc.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,263 @@
+/* Written 2000 by Andi Kleen */
+#ifndef __ARCH_DESC_H
+#endif /* !__ASSEMBLY__ */
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/dma-mapping.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/dma-mapping.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/dma-mapping.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/dma-mapping.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/dma-mapping.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/dma-mapping.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/dma-mapping.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/dma-mapping.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,191 @@
+#ifndef _X8664_DMA_MAPPING_H
+#define _X8664_DMA_MAPPING_H 1
+#endif /* _X8664_DMA_MAPPING_H */
+
+#include <asm-i386/mach-xen/asm/dma-mapping.h>
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/fixmap.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/fixmap.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/fixmap.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/fixmap.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/fixmap.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/fixmap.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/fixmap.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/fixmap.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,109 @@
+/*
+ * fixmap.h: compile-time virtual memory allocation
+}
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/floppy.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/floppy.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/floppy.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/floppy.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/floppy.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/floppy.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/floppy.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/floppy.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,206 @@
+/*
+ * Architecture specific parts of the Floppy driver
+#define EXTRA_FLOPPY_PARAMS
+
+#endif /* __ASM_XEN_X86_64_FLOPPY_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/hw_irq.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hw_irq.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/hw_irq.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hw_irq.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/hw_irq.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/hw_irq.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/hw_irq.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/hw_irq.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,141 @@
+#ifndef _ASM_HW_IRQ_H
+#define _ASM_HW_IRQ_H
+#endif
+
+#endif /* _ASM_HW_IRQ_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/hypercall.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypercall.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/hypercall.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypercall.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/hypercall.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/hypercall.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/hypercall.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/hypercall.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,343 @@
+/******************************************************************************
+ * hypercall.h
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/hypervisor.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypervisor.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/hypervisor.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypervisor.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/hypervisor.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/hypervisor.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/hypervisor.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/hypervisor.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,2 @@
+
+#include <asm-i386/mach-xen/asm/hypervisor.h>
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/io.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/io.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/io.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/io.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/io.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/io.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/io.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/io.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,359 @@
+#ifndef _ASM_IO_H
+#define _ASM_IO_H
+#define ARCH_HAS_DEV_MEM
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/irq.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/irq.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/irq.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/irq.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/irq.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/irq.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/irq.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/irq.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,39 @@
+#ifndef _ASM_IRQ_H
+#define _ASM_IRQ_H
+#define __ARCH_HAS_DO_SOFTIRQ 1
+
+#endif /* _ASM_IRQ_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/mmu_context.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/mmu_context.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/mmu_context.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/mmu_context.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/mmu.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/mmu.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/mmu.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/mmu.h 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,33 @@
++#ifndef __x86_64_MMU_H
++#define __x86_64_MMU_H
++
++#include <linux/spinlock.h>
++#include <asm/semaphore.h>
++
++/*
++ * The x86_64 doesn't have a mmu context, but
++ * we put the segment information here.
++ *
++ * cpu_vm_mask is used to optimize ldt flushing.
++ */
++typedef struct {
++ void *ldt;
++ rwlock_t ldtlock;
++ int size;
++ struct semaphore sem;
++#ifdef CONFIG_XEN
++ unsigned pinned:1;
++ struct list_head unpinned;
++#endif
++} mm_context_t;
++
++#ifdef CONFIG_XEN
++extern struct list_head mm_unpinned;
++extern spinlock_t mm_unpinned_lock;
++
++/* mm/memory.c:exit_mmap hook */
++extern void _arch_exit_mmap(struct mm_struct *mm);
++#define arch_exit_mmap(_mm) _arch_exit_mmap(_mm)
++#endif
++
++#endif
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/mmu_context.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/mmu_context.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/mmu_context.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/mmu_context.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,134 @@
+#ifndef __X86_64_MMU_CONTEXT_H
+#define __X86_64_MMU_CONTEXT_H
+} while (0)
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/mmu.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/mmu.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/mmu.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/mmu.h 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,33 @@
-+#ifndef __x86_64_MMU_H
-+#define __x86_64_MMU_H
-+
-+#include <linux/spinlock.h>
-+#include <asm/semaphore.h>
-+
-+/*
-+ * The x86_64 doesn't have a mmu context, but
-+ * we put the segment information here.
-+ *
-+ * cpu_vm_mask is used to optimize ldt flushing.
-+ */
-+typedef struct {
-+ void *ldt;
-+ rwlock_t ldtlock;
-+ int size;
-+ struct semaphore sem;
-+#ifdef CONFIG_XEN
-+ unsigned pinned:1;
-+ struct list_head unpinned;
-+#endif
-+} mm_context_t;
-+
-+#ifdef CONFIG_XEN
-+extern struct list_head mm_unpinned;
-+extern spinlock_t mm_unpinned_lock;
-+
-+/* mm/memory.c:exit_mmap hook */
-+extern void _arch_exit_mmap(struct mm_struct *mm);
-+#define arch_exit_mmap(_mm) _arch_exit_mmap(_mm)
-+#endif
-+
-+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/msr.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/msr.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/msr.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/msr.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/msr.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/msr.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/msr.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/msr.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,399 @@
+#ifndef X86_64_MSR_H
+#define X86_64_MSR_H 1
+#define MSR_P4_U2L_ESCR1 0x3b1
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/nmi.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/nmi.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/nmi.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/nmi.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/nmi.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/nmi.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/nmi.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/nmi.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,75 @@
+/*
+ * linux/include/asm-i386/nmi.h
+extern int check_nmi_watchdog(void);
+
+#endif /* ASM_NMI_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/page.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/page.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/page.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/page.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/page.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/page.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/page.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/page.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,318 @@
+#ifndef _X86_64_PAGE_H
+#define _X86_64_PAGE_H
+#include <asm-generic/page.h>
+
+#endif /* _X86_64_PAGE_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/pci.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pci.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/pci.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pci.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/pci.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/pci.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/pci.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/pci.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,174 @@
+#ifndef __x8664_PCI_H
+#define __x8664_PCI_H
+#define pcibios_scan_all_fns(a, b) 1
+
+#endif /* __x8664_PCI_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/pgalloc.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pgalloc.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/pgalloc.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pgalloc.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/pgalloc.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/pgalloc.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/pgalloc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/pgalloc.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,198 @@
+#ifndef _X86_64_PGALLOC_H
+#define _X86_64_PGALLOC_H
+#define __pud_free_tlb(tlb,x) pud_free((x))
+
+#endif /* _X86_64_PGALLOC_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pgtable.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/pgtable.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pgtable.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/pgtable.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/pgtable.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/pgtable.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/pgtable.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,560 @@
+#ifndef _X86_64_PGTABLE_H
+#define _X86_64_PGTABLE_H
+#include <asm-generic/pgtable.h>
+
+#endif /* _X86_64_PGTABLE_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/processor.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/processor.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/processor.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/processor.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/processor.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/processor.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/processor.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/processor.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,493 @@
+/*
+ * include/asm-x86_64/processor.h
+#define HAVE_ARCH_PICK_MMAP_LAYOUT 1
+
+#endif /* __ASM_X86_64_PROCESSOR_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/ptrace.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/ptrace.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/ptrace.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/ptrace.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/ptrace.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/ptrace.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/ptrace.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/ptrace.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,125 @@
+#ifndef _X86_64_PTRACE_H
+#define _X86_64_PTRACE_H
+#endif
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/smp.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/smp.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/smp.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/smp.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/smp.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/smp.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/smp.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/smp.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,152 @@
+#ifndef __ASM_SMP_H
+#define __ASM_SMP_H
+
+#endif
+
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/synch_bitops.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/synch_bitops.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/synch_bitops.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/synch_bitops.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/synch_bitops.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/synch_bitops.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/synch_bitops.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/synch_bitops.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,2 @@
+
+#include <asm-i386/mach-xen/asm/synch_bitops.h>
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/system.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/system.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/system.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/system.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/system.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/system.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/system.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/system.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,434 @@
+#ifndef __ASM_SYSTEM_H
+#define __ASM_SYSTEM_H
+extern unsigned long arch_align_stack(unsigned long sp);
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/timer.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/timer.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/timer.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/timer.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/timer.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/timer.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/timer.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/timer.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,67 @@
+#ifndef _ASMi386_TIMER_H
+#define _ASMi386_TIMER_H
+extern struct init_timer_opts timer_pmtmr_init;
+#endif
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/tlbflush.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/tlbflush.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/tlbflush.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/tlbflush.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/tlbflush.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/tlbflush.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/tlbflush.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/tlbflush.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,104 @@
+#ifndef _X8664_TLBFLUSH_H
+#define _X8664_TLBFLUSH_H
+}
+
+#endif /* _X8664_TLBFLUSH_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/vga.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/vga.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/vga.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/vga.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/vga.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/vga.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/vga.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/vga.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,20 @@
+/*
+ * Access to VGA videoram
+#define vga_writeb(x,y) (*(y) = (x))
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/xor.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/xor.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/asm/xor.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/xor.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/xor.h linux-2.6.16/include/asm-x86_64/mach-xen/asm/xor.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/asm/xor.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/asm/xor.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,328 @@
+/*
+ * x86-64 changes / gcc fixes from Andi Kleen.
+ We may also be able to load into the L1 only depending on how the cpu
+ deals with a load to a line that is being prefetched. */
+#define XOR_SELECT_TEMPLATE(FASTEST) (&xor_block_sse)
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/irq_vectors.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/irq_vectors.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/irq_vectors.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/irq_vectors.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/irq_vectors.h linux-2.6.16/include/asm-x86_64/mach-xen/irq_vectors.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/irq_vectors.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/irq_vectors.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,123 @@
+/*
+ * This file should contain #defines for all of the interrupt vector
+#define irq_to_dynirq(_x) ((_x) - DYNIRQ_BASE)
+
+#endif /* _ASM_IRQ_VECTORS_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/mach_time.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/mach_time.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/mach_time.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/mach_time.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/mach_time.h linux-2.6.16/include/asm-x86_64/mach-xen/mach_time.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/mach_time.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/mach_time.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,122 @@
+/*
+ * include/asm-i386/mach-default/mach_time.h
+}
+
+#endif /* !_MACH_TIME_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/mach_timer.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/mach_timer.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/mach_timer.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/mach_timer.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/mach_timer.h linux-2.6.16/include/asm-x86_64/mach-xen/mach_timer.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/mach_timer.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/mach_timer.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,48 @@
+/*
+ * include/asm-i386/mach-default/mach_timer.h
+}
+
+#endif /* !_MACH_TIMER_H */
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/setup_arch_post.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/setup_arch_post.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/setup_arch_post.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/setup_arch_post.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/setup_arch_post.h linux-2.6.16/include/asm-x86_64/mach-xen/setup_arch_post.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/setup_arch_post.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/setup_arch_post.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,28 @@
+/**
+ * machine_specific_* - Hooks for machine specific setup.
+ HYPERVISOR_nmi_op(XENNMI_register_callback, &cb);
+#endif
+}
-diff -Nurp ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/setup_arch_pre.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/setup_arch_pre.h
---- ref-linux-2.6.16.9/include/asm-x86_64/mach-xen/setup_arch_pre.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/setup_arch_pre.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/asm-x86_64/mach-xen/setup_arch_pre.h linux-2.6.16/include/asm-x86_64/mach-xen/setup_arch_pre.h
+--- linux-2.6.16.orig/include/asm-x86_64/mach-xen/setup_arch_pre.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/asm-x86_64/mach-xen/setup_arch_pre.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,5 @@
+/* Hook to call BIOS initialisation function */
+
+#define ARCH_SETUP machine_specific_arch_setup();
+
+static void __init machine_specific_arch_setup(void);
-diff -Nurp ref-linux-2.6.16.9/include/linux/gfp.h tmp-linux-2.6-xen.patch/include/linux/gfp.h
---- ref-linux-2.6.16.9/include/linux/gfp.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/linux/gfp.h 2006-04-10 00:05:52.000000000 +0200
-@@ -98,7 +98,11 @@ static inline int gfp_zone(gfp_t gfp)
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/linux/gfp.h linux-2.6.16/include/linux/gfp.h
+--- linux-2.6.16.orig/include/linux/gfp.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/linux/gfp.h 2006-06-26 09:51:32.000000000 +0200
+@@ -98,7 +98,11 @@
*/
#ifndef HAVE_ARCH_FREE_PAGE
#endif
extern struct page *
-diff -Nurp ref-linux-2.6.16.9/include/linux/highmem.h tmp-linux-2.6-xen.patch/include/linux/highmem.h
---- ref-linux-2.6.16.9/include/linux/highmem.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/linux/highmem.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/linux/highmem.h linux-2.6.16/include/linux/highmem.h
+--- linux-2.6.16.orig/include/linux/highmem.h 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/include/linux/highmem.h 2006-06-26 09:51:32.000000000 +0200
@@ -13,10 +13,16 @@
/* declarations for linux/mm/highmem.c */
static inline void *kmap(struct page *page)
{
-diff -Nurp ref-linux-2.6.16.9/include/linux/mm.h tmp-linux-2.6-xen.patch/include/linux/mm.h
---- ref-linux-2.6.16.9/include/linux/mm.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/linux/mm.h 2006-04-10 00:05:52.000000000 +0200
-@@ -166,6 +166,9 @@ extern unsigned int kobjsize(const void
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/linux/mm.h linux-2.6.16/include/linux/mm.h
+--- linux-2.6.16.orig/include/linux/mm.h 2006-06-26 09:49:45.000000000 +0200
++++ linux-2.6.16/include/linux/mm.h 2006-06-26 09:51:32.000000000 +0200
+@@ -166,6 +166,9 @@
#define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */
#define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */
#define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */
#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */
#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
-@@ -229,9 +232,10 @@ struct page {
+@@ -229,9 +232,10 @@
unsigned long private; /* Mapping-private opaque data:
* usually used for buffer_heads
* if PagePrivate set; used for
*/
struct address_space *mapping; /* If low bit clear, points to
* inode address_space, or NULL.
-@@ -244,6 +248,9 @@ struct page {
+@@ -244,6 +248,9 @@
#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
spinlock_t ptl;
#endif
};
pgoff_t index; /* Our offset within mapping. */
struct list_head lru; /* Pageout list, eg. active_list
-@@ -1012,6 +1019,13 @@ struct page *follow_page(struct vm_area_
+@@ -1012,6 +1019,13 @@
#define FOLL_GET 0x04 /* do get_page on page */
#define FOLL_ANON 0x08 /* give ZERO_PAGE if no pgtable */
#ifdef CONFIG_PROC_FS
void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
#else
-diff -Nurp ref-linux-2.6.16.9/include/linux/skbuff.h tmp-linux-2.6-xen.patch/include/linux/skbuff.h
---- ref-linux-2.6.16.9/include/linux/skbuff.h 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/include/linux/skbuff.h 2006-04-10 00:05:52.000000000 +0200
-@@ -189,6 +189,8 @@ enum {
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/linux/skbuff.h linux-2.6.16/include/linux/skbuff.h
+--- linux-2.6.16.orig/include/linux/skbuff.h 2006-06-26 09:49:46.000000000 +0200
++++ linux-2.6.16/include/linux/skbuff.h 2006-06-26 09:51:32.000000000 +0200
+@@ -189,6 +189,8 @@
* @local_df: allow local fragmentation
* @cloned: Head may be cloned (check refcnt to be sure)
* @nohdr: Payload reference only, must not modify header
* @pkt_type: Packet class
* @fclone: skbuff clone status
* @ip_summed: Driver fed us an IP checksum
-@@ -265,7 +267,13 @@ struct sk_buff {
+@@ -265,7 +267,13 @@
nfctinfo:3;
__u8 pkt_type:3,
fclone:2,
__be16 protocol;
void (*destructor)(struct sk_buff *skb);
-@@ -321,7 +329,8 @@ static inline struct sk_buff *alloc_skb_
+@@ -325,7 +333,8 @@
extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
unsigned int size,
extern void kfree_skbmem(struct sk_buff *skb);
extern struct sk_buff *skb_clone(struct sk_buff *skb,
gfp_t priority);
-@@ -1051,7 +1060,7 @@ static inline struct sk_buff *__dev_allo
+@@ -1055,7 +1064,7 @@
return skb;
}
#else
#endif
/**
-diff -Nurp ref-linux-2.6.16.9/include/xen/balloon.h tmp-linux-2.6-xen.patch/include/xen/balloon.h
---- ref-linux-2.6.16.9/include/xen/balloon.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/balloon.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/balloon.h linux-2.6.16/include/xen/balloon.h
+--- linux-2.6.16.orig/include/xen/balloon.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/balloon.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,73 @@
+/******************************************************************************
+ * balloon.h
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/driver_util.h tmp-linux-2.6-xen.patch/include/xen/driver_util.h
---- ref-linux-2.6.16.9/include/xen/driver_util.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/driver_util.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/driver_util.h linux-2.6.16/include/xen/driver_util.h
+--- linux-2.6.16.orig/include/xen/driver_util.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/driver_util.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,26 @@
+
+#ifndef __ASM_XEN_DRIVER_UTIL_H__
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/evtchn.h tmp-linux-2.6-xen.patch/include/xen/evtchn.h
---- ref-linux-2.6.16.9/include/xen/evtchn.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/evtchn.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/evtchn.h linux-2.6.16/include/xen/evtchn.h
+--- linux-2.6.16.orig/include/xen/evtchn.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/evtchn.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,126 @@
+/******************************************************************************
+ * evtchn.h
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/features.h tmp-linux-2.6-xen.patch/include/xen/features.h
---- ref-linux-2.6.16.9/include/xen/features.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/features.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/features.h linux-2.6.16/include/xen/features.h
+--- linux-2.6.16.orig/include/xen/features.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/features.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,20 @@
+/******************************************************************************
+ * features.h
+#define xen_feature(flag) (xen_features[flag])
+
+#endif /* __ASM_XEN_FEATURES_H__ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/foreign_page.h tmp-linux-2.6-xen.patch/include/xen/foreign_page.h
---- ref-linux-2.6.16.9/include/xen/foreign_page.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/foreign_page.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/foreign_page.h linux-2.6.16/include/xen/foreign_page.h
+--- linux-2.6.16.orig/include/xen/foreign_page.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/foreign_page.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * foreign_page.h
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/gnttab.h tmp-linux-2.6-xen.patch/include/xen/gnttab.h
---- ref-linux-2.6.16.9/include/xen/gnttab.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/gnttab.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/gnttab.h linux-2.6.16/include/xen/gnttab.h
+--- linux-2.6.16.orig/include/xen/gnttab.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/gnttab.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,126 @@
+/******************************************************************************
+ * gnttab.h
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/hypervisor_sysfs.h tmp-linux-2.6-xen.patch/include/xen/hypervisor_sysfs.h
---- ref-linux-2.6.16.9/include/xen/hypervisor_sysfs.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/hypervisor_sysfs.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/hypervisor_sysfs.h linux-2.6.16/include/xen/hypervisor_sysfs.h
+--- linux-2.6.16.orig/include/xen/hypervisor_sysfs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/hypervisor_sysfs.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,32 @@
+/*
+ * copyright (c) 2006 IBM Corporation
+};
+
+#endif /* _HYP_SYSFS_H_ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/acm.h tmp-linux-2.6-xen.patch/include/xen/interface/acm.h
---- ref-linux-2.6.16.9/include/xen/interface/acm.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/acm.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/COPYING linux-2.6.16/include/xen/interface/COPYING
+--- linux-2.6.16.orig/include/xen/interface/COPYING 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/COPYING 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,28 @@
++XEN NOTICE
++==========
++
++This copyright applies to all files within this subdirectory. All
++other files in the Xen source distribution are covered by version 2 of
++the GNU General Public License.
++
++ -- Keir Fraser (on behalf of the Xen team)
++
++=====================================================================
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to
++deal in the Software without restriction, including without limitation the
++rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
++sell copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/acm.h linux-2.6.16/include/xen/interface/acm.h
+--- linux-2.6.16.orig/include/xen/interface/acm.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/acm.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,181 @@
+/*
+ * acm.h: Xen access control module interface defintions
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/acm_ops.h tmp-linux-2.6-xen.patch/include/xen/interface/acm_ops.h
---- ref-linux-2.6.16.9/include/xen/interface/acm_ops.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/acm_ops.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/acm_ops.h linux-2.6.16/include/xen/interface/acm_ops.h
+--- linux-2.6.16.orig/include/xen/interface/acm_ops.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/acm_ops.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,98 @@
+/*
+ * acm_ops.h: Xen access control module hypervisor commands
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/arch-ia64.h tmp-linux-2.6-xen.patch/include/xen/interface/arch-ia64.h
---- ref-linux-2.6.16.9/include/xen/interface/arch-ia64.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-ia64.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/arch-ia64.h linux-2.6.16/include/xen/interface/arch-ia64.h
+--- linux-2.6.16.orig/include/xen/interface/arch-ia64.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/arch-ia64.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,337 @@
+/******************************************************************************
+ * arch-ia64/hypervisor-if.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/arch-x86_32.h tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86_32.h
---- ref-linux-2.6.16.9/include/xen/interface/arch-x86_32.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86_32.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/arch-x86_32.h linux-2.6.16/include/xen/interface/arch-x86_32.h
+--- linux-2.6.16.orig/include/xen/interface/arch-x86_32.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/arch-x86_32.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,195 @@
+/******************************************************************************
+ * arch-x86_32.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/arch-x86_64.h tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86_64.h
---- ref-linux-2.6.16.9/include/xen/interface/arch-x86_64.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86_64.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/arch-x86_64.h linux-2.6.16/include/xen/interface/arch-x86_64.h
+--- linux-2.6.16.orig/include/xen/interface/arch-x86_64.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/arch-x86_64.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,271 @@
+/******************************************************************************
+ * arch-x86_64.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/COPYING tmp-linux-2.6-xen.patch/include/xen/interface/COPYING
---- ref-linux-2.6.16.9/include/xen/interface/COPYING 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/COPYING 2006-04-10 00:05:57.000000000 +0200
-@@ -0,0 +1,28 @@
-+XEN NOTICE
-+==========
-+
-+This copyright applies to all files within this subdirectory. All
-+other files in the Xen source distribution are covered by version 2 of
-+the GNU General Public License.
-+
-+ -- Keir Fraser (on behalf of the Xen team)
-+
-+=====================================================================
-+
-+Permission is hereby granted, free of charge, to any person obtaining a copy
-+of this software and associated documentation files (the "Software"), to
-+deal in the Software without restriction, including without limitation the
-+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-+sell copies of the Software, and to permit persons to whom the Software is
-+furnished to do so, subject to the following conditions:
-+
-+The above copyright notice and this permission notice shall be included in
-+all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-+DEALINGS IN THE SOFTWARE.
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/dom0_ops.h tmp-linux-2.6-xen.patch/include/xen/interface/dom0_ops.h
---- ref-linux-2.6.16.9/include/xen/interface/dom0_ops.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/dom0_ops.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/dom0_ops.h linux-2.6.16/include/xen/interface/dom0_ops.h
+--- linux-2.6.16.orig/include/xen/interface/dom0_ops.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/dom0_ops.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,531 @@
+/******************************************************************************
+ * dom0_ops.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/event_channel.h tmp-linux-2.6-xen.patch/include/xen/interface/event_channel.h
---- ref-linux-2.6.16.9/include/xen/interface/event_channel.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/event_channel.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/event_channel.h linux-2.6.16/include/xen/interface/event_channel.h
+--- linux-2.6.16.orig/include/xen/interface/event_channel.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/event_channel.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,205 @@
+/******************************************************************************
+ * event_channel.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/features.h tmp-linux-2.6-xen.patch/include/xen/interface/features.h
---- ref-linux-2.6.16.9/include/xen/interface/features.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/features.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/features.h linux-2.6.16/include/xen/interface/features.h
+--- linux-2.6.16.orig/include/xen/interface/features.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/features.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * features.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/grant_table.h tmp-linux-2.6-xen.patch/include/xen/interface/grant_table.h
---- ref-linux-2.6.16.9/include/xen/interface/grant_table.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/grant_table.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/grant_table.h linux-2.6.16/include/xen/interface/grant_table.h
+--- linux-2.6.16.orig/include/xen/interface/grant_table.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/grant_table.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,311 @@
+/******************************************************************************
+ * grant_table.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/hvm/hvm_info_table.h tmp-linux-2.6-xen.patch/include/xen/interface/hvm/hvm_info_table.h
---- ref-linux-2.6.16.9/include/xen/interface/hvm/hvm_info_table.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/hvm_info_table.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/hvm/hvm_info_table.h linux-2.6.16/include/xen/interface/hvm/hvm_info_table.h
+--- linux-2.6.16.orig/include/xen/interface/hvm/hvm_info_table.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/hvm/hvm_info_table.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,24 @@
+/******************************************************************************
+ * hvm/hvm_info_table.h
+};
+
+#endif /* __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/hvm/ioreq.h tmp-linux-2.6-xen.patch/include/xen/interface/hvm/ioreq.h
---- ref-linux-2.6.16.9/include/xen/interface/hvm/ioreq.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/ioreq.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/hvm/ioreq.h linux-2.6.16/include/xen/interface/hvm/ioreq.h
+--- linux-2.6.16.orig/include/xen/interface/hvm/ioreq.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/hvm/ioreq.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,94 @@
+/*
+ * ioreq.h: I/O request definitions for device models
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/hvm/vmx_assist.h tmp-linux-2.6-xen.patch/include/xen/interface/hvm/vmx_assist.h
---- ref-linux-2.6.16.9/include/xen/interface/hvm/vmx_assist.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/vmx_assist.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/hvm/vmx_assist.h linux-2.6.16/include/xen/interface/hvm/vmx_assist.h
+--- linux-2.6.16.orig/include/xen/interface/hvm/vmx_assist.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/hvm/vmx_assist.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,97 @@
+/*
+ * vmx_assist.h: Context definitions for the VMXASSIST world switch.
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/io/blkif.h tmp-linux-2.6-xen.patch/include/xen/interface/io/blkif.h
---- ref-linux-2.6.16.9/include/xen/interface/io/blkif.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/blkif.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/io/blkif.h linux-2.6.16/include/xen/interface/io/blkif.h
+--- linux-2.6.16.orig/include/xen/interface/io/blkif.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/io/blkif.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,85 @@
+/******************************************************************************
+ * blkif.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/io/console.h tmp-linux-2.6-xen.patch/include/xen/interface/io/console.h
---- ref-linux-2.6.16.9/include/xen/interface/io/console.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/console.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/io/console.h linux-2.6.16/include/xen/interface/io/console.h
+--- linux-2.6.16.orig/include/xen/interface/io/console.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/io/console.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * console.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/io/netif.h tmp-linux-2.6-xen.patch/include/xen/interface/io/netif.h
---- ref-linux-2.6.16.9/include/xen/interface/io/netif.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/netif.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/io/netif.h linux-2.6.16/include/xen/interface/io/netif.h
+--- linux-2.6.16.orig/include/xen/interface/io/netif.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/io/netif.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,84 @@
+/******************************************************************************
+ * netif.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/io/pciif.h tmp-linux-2.6-xen.patch/include/xen/interface/io/pciif.h
---- ref-linux-2.6.16.9/include/xen/interface/io/pciif.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/pciif.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/io/pciif.h linux-2.6.16/include/xen/interface/io/pciif.h
+--- linux-2.6.16.orig/include/xen/interface/io/pciif.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/io/pciif.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,55 @@
+/*
+ * PCI Backend/Frontend Common Data Structures & Macros
+};
+
+#endif /* __XEN_PCI_COMMON_H__ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/io/ring.h tmp-linux-2.6-xen.patch/include/xen/interface/io/ring.h
---- ref-linux-2.6.16.9/include/xen/interface/io/ring.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/ring.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/io/ring.h linux-2.6.16/include/xen/interface/io/ring.h
+--- linux-2.6.16.orig/include/xen/interface/io/ring.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/io/ring.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,265 @@
+/******************************************************************************
+ * ring.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/io/tpmif.h tmp-linux-2.6-xen.patch/include/xen/interface/io/tpmif.h
---- ref-linux-2.6.16.9/include/xen/interface/io/tpmif.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/tpmif.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/io/tpmif.h linux-2.6.16/include/xen/interface/io/tpmif.h
+--- linux-2.6.16.orig/include/xen/interface/io/tpmif.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/io/tpmif.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,56 @@
+/******************************************************************************
+ * tpmif.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/io/xenbus.h tmp-linux-2.6-xen.patch/include/xen/interface/io/xenbus.h
---- ref-linux-2.6.16.9/include/xen/interface/io/xenbus.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/xenbus.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/io/xenbus.h linux-2.6.16/include/xen/interface/io/xenbus.h
+--- linux-2.6.16.orig/include/xen/interface/io/xenbus.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/io/xenbus.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * xenbus.h
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/io/xs_wire.h tmp-linux-2.6-xen.patch/include/xen/interface/io/xs_wire.h
---- ref-linux-2.6.16.9/include/xen/interface/io/xs_wire.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/xs_wire.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/io/xs_wire.h linux-2.6.16/include/xen/interface/io/xs_wire.h
+--- linux-2.6.16.orig/include/xen/interface/io/xs_wire.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/io/xs_wire.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,97 @@
+/*
+ * Details of the "wire" protocol between Xen Store Daemon and client
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/memory.h tmp-linux-2.6-xen.patch/include/xen/interface/memory.h
---- ref-linux-2.6.16.9/include/xen/interface/memory.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/memory.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/memory.h linux-2.6.16/include/xen/interface/memory.h
+--- linux-2.6.16.orig/include/xen/interface/memory.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/memory.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,155 @@
+/******************************************************************************
+ * memory.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/nmi.h tmp-linux-2.6-xen.patch/include/xen/interface/nmi.h
---- ref-linux-2.6.16.9/include/xen/interface/nmi.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/nmi.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/nmi.h linux-2.6.16/include/xen/interface/nmi.h
+--- linux-2.6.16.orig/include/xen/interface/nmi.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/nmi.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * nmi.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/physdev.h tmp-linux-2.6-xen.patch/include/xen/interface/physdev.h
---- ref-linux-2.6.16.9/include/xen/interface/physdev.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/physdev.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/physdev.h linux-2.6.16/include/xen/interface/physdev.h
+--- linux-2.6.16.orig/include/xen/interface/physdev.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/physdev.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,71 @@
+
+#ifndef __XEN_PUBLIC_PHYSDEV_H__
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/sched_ctl.h tmp-linux-2.6-xen.patch/include/xen/interface/sched_ctl.h
---- ref-linux-2.6.16.9/include/xen/interface/sched_ctl.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/sched_ctl.h 2006-04-10 00:05:57.000000000 +0200
-@@ -0,0 +1,64 @@
-+/******************************************************************************
-+ * Generic scheduler control interface.
-+ *
-+ * Mark Williamson, (C) 2004 Intel Research Cambridge
-+ */
-+
-+#ifndef __XEN_PUBLIC_SCHED_CTL_H__
-+#define __XEN_PUBLIC_SCHED_CTL_H__
-+
-+/* Scheduler types. */
-+#define SCHED_BVT 0
-+#define SCHED_SEDF 4
-+
-+/* Set or get info? */
-+#define SCHED_INFO_PUT 0
-+#define SCHED_INFO_GET 1
-+
-+/*
-+ * Generic scheduler control command - used to adjust system-wide scheduler
-+ * parameters
-+ */
-+struct sched_ctl_cmd {
-+ uint32_t sched_id;
-+ uint32_t direction;
-+ union {
-+ struct bvt_ctl {
-+ uint32_t ctx_allow;
-+ } bvt;
-+ } u;
-+};
-+
-+struct sched_adjdom_cmd {
-+ uint32_t sched_id;
-+ uint32_t direction;
-+ domid_t domain;
-+ union {
-+ struct bvt_adjdom {
-+ uint32_t mcu_adv; /* mcu advance: inverse of weight */
-+ uint32_t warpback; /* warp? */
-+ int32_t warpvalue; /* warp value */
-+ int64_t warpl; /* warp limit */
-+ int64_t warpu; /* unwarp time requirement */
-+ } bvt;
-+ struct sedf_adjdom {
-+ uint64_t period;
-+ uint64_t slice;
-+ uint64_t latency;
-+ uint32_t extratime;
-+ uint32_t weight;
-+ } sedf;
-+ } u;
-+};
-+
-+#endif /* __XEN_PUBLIC_SCHED_CTL_H__ */
-+
-+/*
-+ * Local variables:
-+ * mode: C
-+ * c-set-style: "BSD"
-+ * c-basic-offset: 4
-+ * tab-width: 4
-+ * indent-tabs-mode: nil
-+ * End:
-+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/sched.h tmp-linux-2.6-xen.patch/include/xen/interface/sched.h
---- ref-linux-2.6.16.9/include/xen/interface/sched.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/sched.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/sched.h linux-2.6.16/include/xen/interface/sched.h
+--- linux-2.6.16.orig/include/xen/interface/sched.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/sched.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,87 @@
+/******************************************************************************
+ * sched.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/trace.h tmp-linux-2.6-xen.patch/include/xen/interface/trace.h
---- ref-linux-2.6.16.9/include/xen/interface/trace.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/trace.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/sched_ctl.h linux-2.6.16/include/xen/interface/sched_ctl.h
+--- linux-2.6.16.orig/include/xen/interface/sched_ctl.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/sched_ctl.h 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,64 @@
++/******************************************************************************
++ * Generic scheduler control interface.
++ *
++ * Mark Williamson, (C) 2004 Intel Research Cambridge
++ */
++
++#ifndef __XEN_PUBLIC_SCHED_CTL_H__
++#define __XEN_PUBLIC_SCHED_CTL_H__
++
++/* Scheduler types. */
++#define SCHED_BVT 0
++#define SCHED_SEDF 4
++
++/* Set or get info? */
++#define SCHED_INFO_PUT 0
++#define SCHED_INFO_GET 1
++
++/*
++ * Generic scheduler control command - used to adjust system-wide scheduler
++ * parameters
++ */
++struct sched_ctl_cmd {
++ uint32_t sched_id;
++ uint32_t direction;
++ union {
++ struct bvt_ctl {
++ uint32_t ctx_allow;
++ } bvt;
++ } u;
++};
++
++struct sched_adjdom_cmd {
++ uint32_t sched_id;
++ uint32_t direction;
++ domid_t domain;
++ union {
++ struct bvt_adjdom {
++ uint32_t mcu_adv; /* mcu advance: inverse of weight */
++ uint32_t warpback; /* warp? */
++ int32_t warpvalue; /* warp value */
++ int64_t warpl; /* warp limit */
++ int64_t warpu; /* unwarp time requirement */
++ } bvt;
++ struct sedf_adjdom {
++ uint64_t period;
++ uint64_t slice;
++ uint64_t latency;
++ uint32_t extratime;
++ uint32_t weight;
++ } sedf;
++ } u;
++};
++
++#endif /* __XEN_PUBLIC_SCHED_CTL_H__ */
++
++/*
++ * Local variables:
++ * mode: C
++ * c-set-style: "BSD"
++ * c-basic-offset: 4
++ * tab-width: 4
++ * indent-tabs-mode: nil
++ * End:
++ */
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/trace.h linux-2.6.16/include/xen/interface/trace.h
+--- linux-2.6.16.orig/include/xen/interface/trace.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/trace.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * include/public/trace.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/vcpu.h tmp-linux-2.6-xen.patch/include/xen/interface/vcpu.h
---- ref-linux-2.6.16.9/include/xen/interface/vcpu.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/vcpu.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/vcpu.h linux-2.6.16/include/xen/interface/vcpu.h
+--- linux-2.6.16.orig/include/xen/interface/vcpu.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/vcpu.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,119 @@
+/******************************************************************************
+ * vcpu.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/version.h tmp-linux-2.6-xen.patch/include/xen/interface/version.h
---- ref-linux-2.6.16.9/include/xen/interface/version.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/version.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/version.h linux-2.6.16/include/xen/interface/version.h
+--- linux-2.6.16.orig/include/xen/interface/version.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/version.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * version.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/xen-compat.h tmp-linux-2.6-xen.patch/include/xen/interface/xen-compat.h
---- ref-linux-2.6.16.9/include/xen/interface/xen-compat.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/xen-compat.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/xen-compat.h linux-2.6.16/include/xen/interface/xen-compat.h
+--- linux-2.6.16.orig/include/xen/interface/xen-compat.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/xen-compat.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * xen-compat.h
+#endif
+
+#endif /* __XEN_PUBLIC_XEN_COMPAT_H__ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/interface/xen.h tmp-linux-2.6-xen.patch/include/xen/interface/xen.h
---- ref-linux-2.6.16.9/include/xen/interface/xen.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/xen.h 2006-04-10 00:05:57.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/interface/xen.h linux-2.6.16/include/xen/interface/xen.h
+--- linux-2.6.16.orig/include/xen/interface/xen.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/interface/xen.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,451 @@
+/******************************************************************************
+ * xen.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/net_driver_util.h tmp-linux-2.6-xen.patch/include/xen/net_driver_util.h
---- ref-linux-2.6.16.9/include/xen/net_driver_util.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/net_driver_util.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/net_driver_util.h linux-2.6.16/include/xen/net_driver_util.h
+--- linux-2.6.16.orig/include/xen/net_driver_util.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/net_driver_util.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ *
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/pcifront.h tmp-linux-2.6-xen.patch/include/xen/pcifront.h
---- ref-linux-2.6.16.9/include/xen/pcifront.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/pcifront.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/pcifront.h linux-2.6.16/include/xen/pcifront.h
+--- linux-2.6.16.orig/include/xen/pcifront.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/pcifront.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,39 @@
+/*
+ * PCI Frontend - arch-dependendent declarations
+#endif /* __KERNEL__ */
+
+#endif /* __XEN_ASM_PCIFRONT_H__ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/public/evtchn.h tmp-linux-2.6-xen.patch/include/xen/public/evtchn.h
---- ref-linux-2.6.16.9/include/xen/public/evtchn.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/public/evtchn.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/public/evtchn.h linux-2.6.16/include/xen/public/evtchn.h
+--- linux-2.6.16.orig/include/xen/public/evtchn.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/public/evtchn.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,101 @@
+/******************************************************************************
+ * evtchn.h
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/public/privcmd.h tmp-linux-2.6-xen.patch/include/xen/public/privcmd.h
---- ref-linux-2.6.16.9/include/xen/public/privcmd.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/public/privcmd.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/public/privcmd.h linux-2.6.16/include/xen/public/privcmd.h
+--- linux-2.6.16.orig/include/xen/public/privcmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/public/privcmd.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,94 @@
+/******************************************************************************
+ * privcmd.h
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/tpmfe.h tmp-linux-2.6-xen.patch/include/xen/tpmfe.h
---- ref-linux-2.6.16.9/include/xen/tpmfe.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/tpmfe.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/tpmfe.h linux-2.6.16/include/xen/tpmfe.h
+--- linux-2.6.16.orig/include/xen/tpmfe.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/tpmfe.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,40 @@
+#ifndef TPM_FE_H
+#define TPM_FE_H
+void tpm_fe_unregister_receiver(void);
+
+#endif
-diff -Nurp ref-linux-2.6.16.9/include/xen/xenbus.h tmp-linux-2.6-xen.patch/include/xen/xenbus.h
---- ref-linux-2.6.16.9/include/xen/xenbus.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/xenbus.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/xen_proc.h linux-2.6.16/include/xen/xen_proc.h
+--- linux-2.6.16.orig/include/xen/xen_proc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/xen_proc.h 2006-06-26 09:51:32.000000000 +0200
+@@ -0,0 +1,23 @@
++
++#ifndef __ASM_XEN_PROC_H__
++#define __ASM_XEN_PROC_H__
++
++#include <linux/config.h>
++#include <linux/proc_fs.h>
++
++extern struct proc_dir_entry *create_xen_proc_entry(
++ const char *name, mode_t mode);
++extern void remove_xen_proc_entry(
++ const char *name);
++
++#endif /* __ASM_XEN_PROC_H__ */
++
++/*
++ * Local variables:
++ * c-file-style: "linux"
++ * indent-tabs-mode: t
++ * c-indent-level: 8
++ * c-basic-offset: 8
++ * tab-width: 8
++ * End:
++ */
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/xenbus.h linux-2.6.16/include/xen/xenbus.h
+--- linux-2.6.16.orig/include/xen/xenbus.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/xenbus.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,306 @@
+/******************************************************************************
+ * xenbus.h
+ * tab-width: 8
+ * End:
+ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/xencons.h tmp-linux-2.6-xen.patch/include/xen/xencons.h
---- ref-linux-2.6.16.9/include/xen/xencons.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/xencons.h 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/include/xen/xencons.h linux-2.6.16/include/xen/xencons.h
+--- linux-2.6.16.orig/include/xen/xencons.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/include/xen/xencons.h 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,14 @@
+#ifndef __ASM_XENCONS_H__
+#define __ASM_XENCONS_H__
+int xencons_ring_send(const char *data, unsigned len);
+
+#endif /* __ASM_XENCONS_H__ */
-diff -Nurp ref-linux-2.6.16.9/include/xen/xen_proc.h tmp-linux-2.6-xen.patch/include/xen/xen_proc.h
---- ref-linux-2.6.16.9/include/xen/xen_proc.h 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/xen_proc.h 2006-04-10 00:05:52.000000000 +0200
-@@ -0,0 +1,23 @@
-+
-+#ifndef __ASM_XEN_PROC_H__
-+#define __ASM_XEN_PROC_H__
-+
-+#include <linux/config.h>
-+#include <linux/proc_fs.h>
-+
-+extern struct proc_dir_entry *create_xen_proc_entry(
-+ const char *name, mode_t mode);
-+extern void remove_xen_proc_entry(
-+ const char *name);
-+
-+#endif /* __ASM_XEN_PROC_H__ */
-+
-+/*
-+ * Local variables:
-+ * c-file-style: "linux"
-+ * indent-tabs-mode: t
-+ * c-indent-level: 8
-+ * c-basic-offset: 8
-+ * tab-width: 8
-+ * End:
-+ */
-diff -Nurp ref-linux-2.6.16.9/kernel/Kconfig.preempt tmp-linux-2.6-xen.patch/kernel/Kconfig.preempt
---- ref-linux-2.6.16.9/kernel/Kconfig.preempt 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/kernel/Kconfig.preempt 2006-04-10 00:05:52.000000000 +0200
-@@ -35,6 +35,7 @@ config PREEMPT_VOLUNTARY
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/kernel/Kconfig.preempt linux-2.6.16/kernel/Kconfig.preempt
+--- linux-2.6.16.orig/kernel/Kconfig.preempt 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/kernel/Kconfig.preempt 2006-06-26 09:51:32.000000000 +0200
+@@ -35,6 +35,7 @@
config PREEMPT
bool "Preemptible Kernel (Low-Latency Desktop)"
help
This option reduces the latency of the kernel by making
all kernel code (that is not executing in a critical section)
-diff -Nurp ref-linux-2.6.16.9/lib/Makefile tmp-linux-2.6-xen.patch/lib/Makefile
---- ref-linux-2.6.16.9/lib/Makefile 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/lib/Makefile 2006-04-10 00:05:52.000000000 +0200
-@@ -45,6 +45,9 @@ obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/lib/Makefile linux-2.6.16/lib/Makefile
+--- linux-2.6.16.orig/lib/Makefile 2006-06-26 09:49:45.000000000 +0200
++++ linux-2.6.16/lib/Makefile 2006-06-26 09:51:32.000000000 +0200
+@@ -47,6 +47,9 @@
obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o
obj-$(CONFIG_SWIOTLB) += swiotlb.o
hostprogs-y := gen_crc32table
clean-files := crc32table.h
-diff -Nurp ref-linux-2.6.16.9/mm/highmem.c tmp-linux-2.6-xen.patch/mm/highmem.c
---- ref-linux-2.6.16.9/mm/highmem.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/mm/highmem.c 2006-04-10 00:05:52.000000000 +0200
-@@ -152,6 +152,17 @@ start:
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/mm/Kconfig linux-2.6.16/mm/Kconfig
+--- linux-2.6.16.orig/mm/Kconfig 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/mm/Kconfig 2006-06-26 09:51:32.000000000 +0200
+@@ -126,11 +126,14 @@
+ # Default to 4 for wider testing, though 8 might be more appropriate.
+ # ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock.
+ # PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes.
++# XEN uses the mapping field on pagetable pages to store a pointer to
++# the destructor.
+ #
+ config SPLIT_PTLOCK_CPUS
+ int
+ default "4096" if ARM && !CPU_CACHE_VIPT
+ default "4096" if PARISC && !PA20
++ default "4096" if XEN
+ default "4"
+
+ #
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/mm/highmem.c linux-2.6.16/mm/highmem.c
+--- linux-2.6.16.orig/mm/highmem.c 2006-03-20 06:53:29.000000000 +0100
++++ linux-2.6.16/mm/highmem.c 2006-06-26 09:51:32.000000000 +0200
+@@ -152,6 +152,17 @@
return vaddr;
}
void fastcall *kmap_high(struct page *page)
{
unsigned long vaddr;
-diff -Nurp ref-linux-2.6.16.9/mm/Kconfig tmp-linux-2.6-xen.patch/mm/Kconfig
---- ref-linux-2.6.16.9/mm/Kconfig 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/mm/Kconfig 2006-04-10 00:05:52.000000000 +0200
-@@ -126,11 +126,14 @@ comment "Memory hotplug is currently inc
- # Default to 4 for wider testing, though 8 might be more appropriate.
- # ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock.
- # PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes.
-+# XEN uses the mapping field on pagetable pages to store a pointer to
-+# the destructor.
- #
- config SPLIT_PTLOCK_CPUS
- int
- default "4096" if ARM && !CPU_CACHE_VIPT
- default "4096" if PARISC && !PA20
-+ default "4096" if XEN
- default "4"
-
- #
-diff -Nurp ref-linux-2.6.16.9/mm/memory.c tmp-linux-2.6-xen.patch/mm/memory.c
---- ref-linux-2.6.16.9/mm/memory.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/mm/memory.c 2006-04-10 00:05:52.000000000 +0200
-@@ -405,7 +405,8 @@ struct page *vm_normal_page(struct vm_ar
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/mm/memory.c linux-2.6.16/mm/memory.c
+--- linux-2.6.16.orig/mm/memory.c 2006-06-26 09:49:47.000000000 +0200
++++ linux-2.6.16/mm/memory.c 2006-06-26 09:51:32.000000000 +0200
+@@ -405,7 +405,8 @@
* Remove this test eventually!
*/
if (unlikely(!pfn_valid(pfn))) {
return NULL;
}
-@@ -1020,6 +1021,23 @@ int get_user_pages(struct task_struct *t
+@@ -1029,6 +1030,23 @@
continue;
}
if (!vma || (vma->vm_flags & (VM_IO | VM_PFNMAP))
|| !(vm_flags & vma->vm_flags))
return i ? : -EFAULT;
-@@ -1359,6 +1377,102 @@ int remap_pfn_range(struct vm_area_struc
+@@ -1369,6 +1387,102 @@
}
EXPORT_SYMBOL(remap_pfn_range);
/*
* handle_pte_fault chooses page fault handler according to an entry
* which was read non-atomically. Before making any commitment, on
-diff -Nurp ref-linux-2.6.16.9/mm/mmap.c tmp-linux-2.6-xen.patch/mm/mmap.c
---- ref-linux-2.6.16.9/mm/mmap.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/mm/mmap.c 2006-04-10 00:05:52.000000000 +0200
-@@ -1937,6 +1937,10 @@ void exit_mmap(struct mm_struct *mm)
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/mm/mmap.c linux-2.6.16/mm/mmap.c
+--- linux-2.6.16.orig/mm/mmap.c 2006-06-26 09:49:48.000000000 +0200
++++ linux-2.6.16/mm/mmap.c 2006-06-26 09:51:32.000000000 +0200
+@@ -1940,6 +1940,10 @@
unsigned long nr_accounted = 0;
unsigned long end;
lru_add_drain();
flush_cache_mm(mm);
tlb = tlb_gather_mmu(mm, 1);
-diff -Nurp ref-linux-2.6.16.9/mm/page_alloc.c tmp-linux-2.6-xen.patch/mm/page_alloc.c
---- ref-linux-2.6.16.9/mm/page_alloc.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/mm/page_alloc.c 2006-04-10 00:05:52.000000000 +0200
-@@ -153,8 +153,7 @@ static void bad_page(struct page *page)
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/mm/page_alloc.c linux-2.6.16/mm/page_alloc.c
+--- linux-2.6.16.orig/mm/page_alloc.c 2006-06-26 09:49:48.000000000 +0200
++++ linux-2.6.16/mm/page_alloc.c 2006-06-26 09:51:32.000000000 +0200
+@@ -156,8 +156,7 @@
1 << PG_reclaim |
1 << PG_slab |
1 << PG_swapcache |
set_page_count(page, 0);
reset_page_mapcount(page);
page->mapping = NULL;
-@@ -225,12 +224,12 @@ static inline unsigned long page_order(s
+@@ -228,12 +227,12 @@
static inline void set_page_order(struct page *page, int order) {
set_page_private(page, order);
set_page_private(page, 0);
}
-@@ -269,13 +268,11 @@ __find_combined_index(unsigned long page
+@@ -272,13 +271,11 @@
* This function checks whether a page is free && is the buddy
* we can do coalesce a page and its buddy if
* (a) the buddy is not in a hole &&
*/
static inline int page_is_buddy(struct page *page, int order)
{
-@@ -284,10 +281,10 @@ static inline int page_is_buddy(struct p
+@@ -287,10 +284,10 @@
return 0;
#endif
return 0;
}
-@@ -304,7 +301,7 @@ static inline int page_is_buddy(struct p
+@@ -307,7 +304,7 @@
* as necessary, plus some accounting needed to play nicely with other
* parts of the VM system.
* At each level, we keep a list of pages, which are heads of continuous
* order is recorded in page_private(page) field.
* So when we are allocating or freeing one, we can derive the state of the
* other. That is, if we allocate a small block, and both were
-@@ -367,8 +364,7 @@ static inline int free_pages_check(struc
+@@ -370,8 +367,7 @@
1 << PG_slab |
1 << PG_swapcache |
1 << PG_writeback |
bad_page(page);
if (PageDirty(page))
__ClearPageDirty(page);
-@@ -422,7 +418,8 @@ static void __free_pages_ok(struct page
+@@ -425,7 +421,8 @@
int i;
int reserved = 0;
if (!PageHighMem(page))
mutex_debug_check_no_locks_freed(page_address(page),
PAGE_SIZE<<order);
-@@ -526,8 +523,7 @@ static int prep_new_page(struct page *pa
+@@ -531,8 +528,7 @@
1 << PG_slab |
1 << PG_swapcache |
1 << PG_writeback |
bad_page(page);
/*
-@@ -716,7 +712,8 @@ static void fastcall free_hot_cold_page(
+@@ -721,7 +717,8 @@
struct per_cpu_pages *pcp;
unsigned long flags;
if (PageAnon(page))
page->mapping = NULL;
-diff -Nurp ref-linux-2.6.16.9/net/core/dev.c tmp-linux-2.6-xen.patch/net/core/dev.c
---- ref-linux-2.6.16.9/net/core/dev.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/net/core/dev.c 2006-04-10 00:05:52.000000000 +0200
-@@ -116,6 +116,12 @@
- #endif /* CONFIG_NET_RADIO */
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/net/core/dev.c linux-2.6.16/net/core/dev.c
+--- linux-2.6.16.orig/net/core/dev.c 2006-06-26 09:49:48.000000000 +0200
++++ linux-2.6.16/net/core/dev.c 2006-06-26 09:51:32.000000000 +0200
+@@ -117,6 +117,12 @@
+ #include <linux/vs_network.h>
#include <asm/current.h>
+#ifdef CONFIG_XEN
/*
* The list of packet types we will receive (as opposed to discard)
* and the routines to invoke.
-@@ -1260,6 +1266,37 @@ int dev_queue_xmit(struct sk_buff *skb)
+@@ -1261,6 +1267,37 @@
__skb_linearize(skb, GFP_ATOMIC))
goto out_kfree_skb;
/* If packet is not checksummed and device does not support
* checksumming for this protocol, complete checksumming here.
*/
-@@ -1609,6 +1646,19 @@ int netif_receive_skb(struct sk_buff *sk
+@@ -1610,6 +1647,19 @@
}
#endif
list_for_each_entry_rcu(ptype, &ptype_all, list) {
if (!ptype->dev || ptype->dev == skb->dev) {
if (pt_prev)
-diff -Nurp ref-linux-2.6.16.9/net/core/skbuff.c tmp-linux-2.6-xen.patch/net/core/skbuff.c
---- ref-linux-2.6.16.9/net/core/skbuff.c 2006-04-19 08:10:14.000000000 +0200
-+++ tmp-linux-2.6-xen.patch/net/core/skbuff.c 2006-04-10 00:05:52.000000000 +0200
-@@ -132,6 +132,7 @@ void skb_under_panic(struct sk_buff *skb
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/net/core/skbuff.c linux-2.6.16/net/core/skbuff.c
+--- linux-2.6.16.orig/net/core/skbuff.c 2006-06-26 09:49:46.000000000 +0200
++++ linux-2.6.16/net/core/skbuff.c 2006-06-26 09:51:32.000000000 +0200
+@@ -132,6 +132,7 @@
* Buffers may only be allocated from interrupts using a @gfp_mask of
* %GFP_ATOMIC.
*/
struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
int fclone)
{
-@@ -186,6 +187,7 @@ nodata:
+@@ -186,6 +187,7 @@
skb = NULL;
goto out;
}
/**
* alloc_skb_from_cache - allocate a network buffer
-@@ -203,14 +205,18 @@ nodata:
+@@ -203,14 +205,18 @@
*/
struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
unsigned int size,
if (!skb)
goto out;
-@@ -227,16 +233,29 @@ struct sk_buff *alloc_skb_from_cache(kme
+@@ -227,16 +233,29 @@
skb->data = data;
skb->tail = data;
skb->end = data + size;
skb = NULL;
goto out;
}
-@@ -408,6 +427,10 @@ struct sk_buff *skb_clone(struct sk_buff
+@@ -408,6 +427,10 @@
C(local_df);
n->cloned = 1;
n->nohdr = 0;
C(pkt_type);
C(ip_summed);
C(priority);
-diff -Nurp ref-linux-2.6.16.9/scripts/Makefile.xen tmp-linux-2.6-xen.patch/scripts/Makefile.xen
---- ref-linux-2.6.16.9/scripts/Makefile.xen 1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/scripts/Makefile.xen 2006-04-10 00:05:52.000000000 +0200
+diff -durN -x '*~' -x '*.orig' -x '*.rej' linux-2.6.16.orig/scripts/Makefile.xen linux-2.6.16/scripts/Makefile.xen
+--- linux-2.6.16.orig/scripts/Makefile.xen 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16/scripts/Makefile.xen 2006-06-26 09:51:32.000000000 +0200
@@ -0,0 +1,14 @@
+
+# cherrypickxen($1 = allobj)