summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trunk/2.6.18/00000_README9
-rw-r--r--trunk/2.6.18/10001_xen-3.1.1.patch (renamed from trunk/2.6.18/10001_xen-3.1.0.patch)3155
-rw-r--r--trunk/2.6.18/30037_amd64-zero-extend-32bit-ptrace-xen.patch50
3 files changed, 2234 insertions, 980 deletions
diff --git a/trunk/2.6.18/00000_README b/trunk/2.6.18/00000_README
index 6c84c68..2f9cf30 100644
--- a/trunk/2.6.18/00000_README
+++ b/trunk/2.6.18/00000_README
@@ -19,8 +19,8 @@ Numbering
Patches
-------
-10001_xen-3.1.0.patch
- Upstream 3.1.0 patch
+10001_xen-3.1.1.patch
+ Upstream 3.1.1 patch
30001_nfnetlink_log-null-deref.patch
[SECURITY] Fix remotely exploitable NULL pointer dereference in
@@ -180,11 +180,6 @@ Patches
prevent incorrect permissions upon remount.
See CVE-2007-4849
-30037_amd64-zero-extend-32bit-ptrace-xen.patch
- [SECURITY] Zero extend all registers after ptrace in 32-bit entry path
- (Xen).
- See CVE-2007-4573
-
30038_don-t-leak-nt-bit-into-next-task-xen.patch
[SECURITY] Don't leak NT bit into next task (Xen).
See CVE-2006-5755
diff --git a/trunk/2.6.18/10001_xen-3.1.0.patch b/trunk/2.6.18/10001_xen-3.1.1.patch
index be12463..527bc7a 100644
--- a/trunk/2.6.18/10001_xen-3.1.0.patch
+++ b/trunk/2.6.18/10001_xen-3.1.1.patch
@@ -1,6 +1,6 @@
diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/i386/Kconfig
--- pristine-linux-2.6.18/arch/i386/Kconfig 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/Kconfig 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/Kconfig 2007-10-11 00:15:26.000000000 -0700
@@ -16,6 +16,7 @@ config X86_32
config GENERIC_TIME
@@ -274,7 +274,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
default y
diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig.cpu tmp-linux-2.6-xen.patch/arch/i386/Kconfig.cpu
--- pristine-linux-2.6.18/arch/i386/Kconfig.cpu 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/Kconfig.cpu 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/Kconfig.cpu 2007-10-11 00:15:26.000000000 -0700
@@ -251,7 +251,7 @@ config X86_PPRO_FENCE
config X86_F00F_BUG
@@ -293,7 +293,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig.cpu tmp-linux-2.6-xen.patch/a
default y
diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig.debug tmp-linux-2.6-xen.patch/arch/i386/Kconfig.debug
--- pristine-linux-2.6.18/arch/i386/Kconfig.debug 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/Kconfig.debug 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/Kconfig.debug 2007-10-11 00:15:26.000000000 -0700
@@ -79,6 +79,7 @@ config X86_MPPARSE
config DOUBLEFAULT
default y
@@ -304,7 +304,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig.debug tmp-linux-2.6-xen.patch
would otherwise cause a system to silently reboot. Disabling this
diff -Nurp pristine-linux-2.6.18/arch/i386/Makefile tmp-linux-2.6-xen.patch/arch/i386/Makefile
--- pristine-linux-2.6.18/arch/i386/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -48,6 +48,11 @@ CFLAGS += $(shell if [ $(call cc-vers
CFLAGS += $(cflags-y)
@@ -363,7 +363,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Makefile tmp-linux-2.6-xen.patch/arch
+CLEAN_FILES += vmlinuz vmlinux-stripped
diff -Nurp pristine-linux-2.6.18/arch/i386/boot-xen/Makefile tmp-linux-2.6-xen.patch/arch/i386/boot-xen/Makefile
--- pristine-linux-2.6.18/arch/i386/boot-xen/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/boot-xen/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/boot-xen/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,21 @@
+
+OBJCOPYFLAGS := -g --strip-unneeded
@@ -388,7 +388,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/boot-xen/Makefile tmp-linux-2.6-xen.p
+ ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/Makefile tmp-linux-2.6-xen.patch/arch/i386/kernel/Makefile
--- pristine-linux-2.6.18/arch/i386/kernel/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -44,6 +44,12 @@ EXTRA_AFLAGS := -traditional
obj-$(CONFIG_SCx200) += scx200.o
@@ -435,7 +435,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/Makefile tmp-linux-2.6-xen.pat
+endif
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/acpi/Makefile tmp-linux-2.6-xen.patch/arch/i386/kernel/acpi/Makefile
--- pristine-linux-2.6.18/arch/i386/kernel/acpi/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/acpi/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/acpi/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -6,3 +6,7 @@ ifneq ($(CONFIG_ACPI_PROCESSOR),)
obj-y += cstate.o processor.o
endif
@@ -446,7 +446,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/acpi/Makefile tmp-linux-2.6-xe
+endif
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/acpi/boot-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/acpi/boot-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/acpi/boot-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/acpi/boot-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/acpi/boot-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,1168 @@
+/*
+ * boot.c - Architecture-Specific Low-Level ACPI Boot Support
@@ -1618,7 +1618,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/acpi/boot-xen.c tmp-linux-2.6-
+}
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/apic-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/apic-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/apic-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/apic-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/apic-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,155 @@
+/*
+ * Local APIC handling, local APIC timers
@@ -1777,7 +1777,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/apic-xen.c tmp-linux-2.6-xen.p
+}
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/asm-offsets.c tmp-linux-2.6-xen.patch/arch/i386/kernel/asm-offsets.c
--- pristine-linux-2.6.18/arch/i386/kernel/asm-offsets.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/asm-offsets.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/asm-offsets.c 2007-10-11 00:15:26.000000000 -0700
@@ -66,9 +66,14 @@ void foo(void)
OFFSET(pbe_orig_address, pbe, orig_address);
OFFSET(pbe_next, pbe, next);
@@ -1796,7 +1796,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/asm-offsets.c tmp-linux-2.6-xe
DEFINE(VDSO_PRELINK, VDSO_PRELINK);
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/cpu/Makefile tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/Makefile
--- pristine-linux-2.6.18/arch/i386/kernel/cpu/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -17,3 +17,8 @@ obj-$(CONFIG_X86_MCE) += mcheck/
obj-$(CONFIG_MTRR) += mtrr/
@@ -1808,7 +1808,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/cpu/Makefile tmp-linux-2.6-xen
+endif
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/cpu/common-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/common-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/cpu/common-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/common-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/common-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,743 @@
+#include <linux/init.h>
+#include <linux/string.h>
@@ -2555,7 +2555,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/cpu/common-xen.c tmp-linux-2.6
+#endif
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/cpu/mtrr/Makefile tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/mtrr/Makefile
--- pristine-linux-2.6.18/arch/i386/kernel/cpu/mtrr/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/mtrr/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/mtrr/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -3,3 +3,10 @@ obj-y += amd.o
obj-y += cyrix.o
obj-y += centaur.o
@@ -2569,7 +2569,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/cpu/mtrr/Makefile tmp-linux-2.
+endif
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/cpu/mtrr/main-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/mtrr/main-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/cpu/mtrr/main-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/mtrr/main-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/cpu/mtrr/main-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,197 @@
+#include <linux/init.h>
+#include <linux/proc_fs.h>
@@ -2770,7 +2770,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/cpu/mtrr/main-xen.c tmp-linux-
+subsys_initcall(mtrr_init);
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/crash.c tmp-linux-2.6-xen.patch/arch/i386/kernel/crash.c
--- pristine-linux-2.6.18/arch/i386/kernel/crash.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/crash.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/crash.c 2007-10-11 00:15:26.000000000 -0700
@@ -90,6 +90,7 @@ static void crash_save_self(struct pt_re
crash_save_this_cpu(regs, cpu);
}
@@ -2802,13 +2802,13 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/crash.c tmp-linux-2.6-xen.patc
}
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/early_printk-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/early_printk-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/early_printk-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/early_printk-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/early_printk-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,2 @@
+
+#include "../../x86_64/kernel/early_printk-xen.c"
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/entry-xen.S tmp-linux-2.6-xen.patch/arch/i386/kernel/entry-xen.S
--- pristine-linux-2.6.18/arch/i386/kernel/entry-xen.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/entry-xen.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/entry-xen.S 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,1216 @@
+/*
+ * linux/arch/i386/entry.S
@@ -4028,7 +4028,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/entry-xen.S tmp-linux-2.6-xen.
+syscall_table_size=(.-sys_call_table)
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/entry.S tmp-linux-2.6-xen.patch/arch/i386/kernel/entry.S
--- pristine-linux-2.6.18/arch/i386/kernel/entry.S 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/entry.S 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/entry.S 2007-10-15 11:42:06.000000000 -0700
@@ -269,7 +269,7 @@ ENTRY(sysenter_entry)
CFI_STARTPROC simple
CFI_DEF_CFA esp, 0
@@ -4058,7 +4058,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/entry.S tmp-linux-2.6-xen.patc
pushl $sysenter_past_esp
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/fixup.c tmp-linux-2.6-xen.patch/arch/i386/kernel/fixup.c
--- pristine-linux-2.6.18/arch/i386/kernel/fixup.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/fixup.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/fixup.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,88 @@
+/******************************************************************************
+ * fixup.c
@@ -4150,7 +4150,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/fixup.c tmp-linux-2.6-xen.patc
+__initcall(fixup_init);
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/head-xen.S tmp-linux-2.6-xen.patch/arch/i386/kernel/head-xen.S
--- pristine-linux-2.6.18/arch/i386/kernel/head-xen.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/head-xen.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/head-xen.S 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,207 @@
+
+
@@ -4361,7 +4361,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/head-xen.S tmp-linux-2.6-xen.p
+ ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long, 1)
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/init_task-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/init_task-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/init_task-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/init_task-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/init_task-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,51 @@
+#include <linux/mm.h>
+#include <linux/module.h>
@@ -4416,7 +4416,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/init_task-xen.c tmp-linux-2.6-
+
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/io_apic-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/io_apic-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/io_apic-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/io_apic-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/io_apic-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,2777 @@
+/*
+ * Intel IO-APIC support for multi-Pentium hosts.
@@ -7197,7 +7197,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/io_apic-xen.c tmp-linux-2.6-xe
+#endif /* CONFIG_ACPI */
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/ioport-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/ioport-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/ioport-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/ioport-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/ioport-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,122 @@
+/*
+ * linux/arch/i386/kernel/ioport.c
@@ -7323,7 +7323,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/ioport-xen.c tmp-linux-2.6-xen
+}
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/irq-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/irq-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/irq-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/irq-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/irq-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,324 @@
+/*
+ * linux/arch/i386/kernel/irq.c
@@ -7651,7 +7651,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/irq-xen.c tmp-linux-2.6-xen.pa
+
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/ldt-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/ldt-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/ldt-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/ldt-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/ldt-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,270 @@
+/*
+ * linux/kernel/ldt.c
@@ -7925,7 +7925,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/ldt-xen.c tmp-linux-2.6-xen.pa
+}
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/machine_kexec.c tmp-linux-2.6-xen.patch/arch/i386/kernel/machine_kexec.c
--- pristine-linux-2.6.18/arch/i386/kernel/machine_kexec.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/machine_kexec.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/machine_kexec.c 2007-10-11 00:15:26.000000000 -0700
@@ -19,123 +19,52 @@
#include <asm/desc.h>
#include <asm/system.h>
@@ -8158,7 +8158,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/machine_kexec.c tmp-linux-2.6-
+#endif
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/microcode-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/microcode-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/microcode-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/microcode-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/microcode-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,144 @@
+/*
+ * Intel CPU Microcode Update Driver for Linux
@@ -8306,7 +8306,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/microcode-xen.c tmp-linux-2.6-
+MODULE_ALIAS_MISCDEV(MICROCODE_MINOR);
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/mpparse-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/mpparse-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/mpparse-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/mpparse-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/mpparse-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,1185 @@
+/*
+ * Intel Multiprocessor Specification 1.1 and 1.4
@@ -9495,8 +9495,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/mpparse-xen.c tmp-linux-2.6-xe
+#endif /* CONFIG_ACPI */
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/pci-dma-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/pci-dma-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/pci-dma-xen.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,366 @@
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/pci-dma-xen.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,369 @@
+/*
+ * Dynamic DMA mapping support.
+ *
@@ -9594,6 +9594,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xe
+ BUG_ON(!sg[i].page);
+ IOMMU_BUG_ON(address_needs_mapping(
+ hwdev, sg[i].dma_address));
++ IOMMU_BUG_ON(range_straddles_page_boundary(
++ page_to_pseudophys(sg[i].page) + sg[i].offset,
++ sg[i].length));
+ }
+ rc = nents;
+ }
@@ -9826,7 +9829,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xe
+ dma = swiotlb_map_single(dev, ptr, size, direction);
+ } else {
+ dma = virt_to_bus(ptr);
-+ IOMMU_BUG_ON(range_straddles_page_boundary(ptr, size));
++ IOMMU_BUG_ON(range_straddles_page_boundary(__pa(ptr), size));
+ IOMMU_BUG_ON(address_needs_mapping(dev, dma));
+ }
+
@@ -9865,7 +9868,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xe
+EXPORT_SYMBOL(dma_sync_single_for_device);
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/process-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/process-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/process-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/process-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/process-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,853 @@
+/*
+ * linux/arch/i386/kernel/process.c
@@ -10722,7 +10725,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/process-xen.c tmp-linux-2.6-xe
+}
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/quirks-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/quirks-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/quirks-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/quirks-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/quirks-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,47 @@
+/*
+ * This file contains work-arounds for x86 and x86_64 platform bugs.
@@ -10773,7 +10776,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/quirks-xen.c tmp-linux-2.6-xen
+#endif
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/relocate_kernel.S tmp-linux-2.6-xen.patch/arch/i386/kernel/relocate_kernel.S
--- pristine-linux-2.6.18/arch/i386/kernel/relocate_kernel.S 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/relocate_kernel.S 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/relocate_kernel.S 2007-10-15 11:42:06.000000000 -0700
@@ -7,16 +7,138 @@
*/
@@ -11008,8 +11011,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/relocate_kernel.S tmp-linux-2.
+ .long 0 /* base */
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/setup-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/setup-xen.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,1871 @@
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/setup-xen.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,1898 @@
+/*
+ * linux/arch/i386/kernel/setup.c
+ *
@@ -12595,6 +12598,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+ int i, j, k, fpp;
+ struct physdev_set_iopl set_iopl;
+ unsigned long max_low_pfn;
++ unsigned long p2m_pages;
+
+ /* Force a quick death if the kernel panics (not domain 0). */
+ extern int panic_timeout;
@@ -12737,6 +12741,32 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+ find_smp_config();
+#endif
+
++ p2m_pages = max_pfn;
++ if (xen_start_info->nr_pages > max_pfn) {
++ /*
++ * the max_pfn was shrunk (probably by mem= or highmem=
++ * kernel parameter); shrink reservation with the HV
++ */
++ struct xen_memory_reservation reservation = {
++ .address_bits = 0,
++ .extent_order = 0,
++ .domid = DOMID_SELF
++ };
++ unsigned int difference;
++ int ret;
++
++ difference = xen_start_info->nr_pages - max_pfn;
++
++ set_xen_guest_handle(reservation.extent_start,
++ ((unsigned long *)xen_start_info->mfn_list) + max_pfn);
++ reservation.nr_extents = difference;
++ ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation,
++ &reservation);
++ BUG_ON (ret != difference);
++ }
++ else if (max_pfn > xen_start_info->nr_pages)
++ p2m_pages = xen_start_info->nr_pages;
++
+ /* Make sure we have a correctly sized P->M table. */
+ if (!xen_feature(XENFEAT_auto_translated_physmap)) {
+ phys_to_machine_mapping = alloc_bootmem_low_pages(
@@ -12745,7 +12775,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+ max_pfn * sizeof(unsigned long));
+ memcpy(phys_to_machine_mapping,
+ (unsigned long *)xen_start_info->mfn_list,
-+ xen_start_info->nr_pages * sizeof(unsigned long));
++ p2m_pages * sizeof(unsigned long));
+ free_bootmem(
+ __pa(xen_start_info->mfn_list),
+ PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
@@ -12883,7 +12913,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+ */
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/smp-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/smp-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/smp-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/smp-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/smp-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,624 @@
+/*
+ * Intel SMP support routines.
@@ -13511,8 +13541,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/smp-xen.c tmp-linux-2.6-xen.pa
+
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/swiotlb.c tmp-linux-2.6-xen.patch/arch/i386/kernel/swiotlb.c
--- pristine-linux-2.6.18/arch/i386/kernel/swiotlb.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/swiotlb.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,716 @@
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/swiotlb.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,734 @@
+/*
+ * Dynamic DMA mapping support.
+ *
@@ -13819,6 +13849,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/swiotlb.c tmp-linux-2.6-xen.pa
+ unsigned long flags;
+ char *dma_addr;
+ unsigned int nslots, stride, index, wrap;
++ struct phys_addr slot_buf;
+ int i;
+
+ /*
@@ -13890,13 +13921,29 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/swiotlb.c tmp-linux-2.6-xen.pa
+ * This is needed when we sync the memory. Then we sync the buffer if
+ * needed.
+ */
-+ io_tlb_orig_addr[index] = buffer;
++ slot_buf = buffer;
++ for (i = 0; i < nslots; i++) {
++ slot_buf.page += slot_buf.offset >> PAGE_SHIFT;
++ slot_buf.offset &= PAGE_SIZE - 1;
++ io_tlb_orig_addr[index+i] = slot_buf;
++ slot_buf.offset += 1 << IO_TLB_SHIFT;
++ }
+ if ((dir == DMA_TO_DEVICE) || (dir == DMA_BIDIRECTIONAL))
+ __sync_single(buffer, dma_addr, size, DMA_TO_DEVICE);
+
+ return dma_addr;
+}
+
++static struct phys_addr dma_addr_to_phys_addr(char *dma_addr)
++{
++ int index = (dma_addr - iotlb_virt_start) >> IO_TLB_SHIFT;
++ struct phys_addr buffer = io_tlb_orig_addr[index];
++ buffer.offset += (long)dma_addr & ((1 << IO_TLB_SHIFT) - 1);
++ buffer.page += buffer.offset >> PAGE_SHIFT;
++ buffer.offset &= PAGE_SIZE - 1;
++ return buffer;
++}
++
+/*
+ * dma_addr is the kernel virtual address of the bounce buffer to unmap.
+ */
@@ -13906,7 +13953,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/swiotlb.c tmp-linux-2.6-xen.pa
+ unsigned long flags;
+ int i, count, nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
+ int index = (dma_addr - iotlb_virt_start) >> IO_TLB_SHIFT;
-+ struct phys_addr buffer = io_tlb_orig_addr[index];
++ struct phys_addr buffer = dma_addr_to_phys_addr(dma_addr);
+
+ /*
+ * First, sync the memory before unmapping the entry
@@ -13946,8 +13993,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/swiotlb.c tmp-linux-2.6-xen.pa
+static void
+sync_single(struct device *hwdev, char *dma_addr, size_t size, int dir)
+{
-+ int index = (dma_addr - iotlb_virt_start) >> IO_TLB_SHIFT;
-+ struct phys_addr buffer = io_tlb_orig_addr[index];
++ struct phys_addr buffer = dma_addr_to_phys_addr(dma_addr);
+ BUG_ON((dir != DMA_FROM_DEVICE) && (dir != DMA_TO_DEVICE));
+ __sync_single(buffer, dma_addr, size, dir);
+}
@@ -13994,7 +14040,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/swiotlb.c tmp-linux-2.6-xen.pa
+ * we can safely return the device addr and not worry about bounce
+ * buffering it.
+ */
-+ if (!range_straddles_page_boundary(ptr, size) &&
++ if (!range_straddles_page_boundary(__pa(ptr), size) &&
+ !address_needs_mapping(hwdev, dev_addr))
+ return dev_addr;
+
@@ -14087,7 +14133,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/swiotlb.c tmp-linux-2.6-xen.pa
+
+ for (i = 0; i < nelems; i++, sg++) {
+ dev_addr = SG_ENT_PHYS_ADDRESS(sg);
-+ if (address_needs_mapping(hwdev, dev_addr)) {
++ if (range_straddles_page_boundary(page_to_pseudophys(sg->page)
++ + sg->offset, sg->length)
++ || address_needs_mapping(hwdev, dev_addr)) {
+ buffer.page = sg->page;
+ buffer.offset = sg->offset;
+ map = map_single(hwdev, buffer, sg->length, dir);
@@ -14231,7 +14279,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/swiotlb.c tmp-linux-2.6-xen.pa
+EXPORT_SYMBOL(swiotlb_dma_supported);
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/sysenter.c tmp-linux-2.6-xen.patch/arch/i386/kernel/sysenter.c
--- pristine-linux-2.6.18/arch/i386/kernel/sysenter.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/sysenter.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/sysenter.c 2007-10-11 00:15:26.000000000 -0700
@@ -23,6 +23,10 @@
#include <asm/pgtable.h>
#include <asm/unistd.h>
@@ -14280,8 +14328,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/sysenter.c tmp-linux-2.6-xen.p
printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO));
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/time-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/time-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/time-xen.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,1141 @@
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/time-xen.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,1159 @@
+/*
+ * linux/arch/i386/kernel/time.c
+ *
@@ -14397,6 +14445,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+static struct timespec shadow_tv;
+static u32 shadow_tv_version;
+
++static struct timeval monotonic_tv;
++static spinlock_t monotonic_lock = SPIN_LOCK_UNLOCKED;
++
+/* Keep track of last time we did processing/updating of jiffies and xtime. */
+static u64 processed_system_time; /* System time (ns) at last processing. */
+static DEFINE_PER_CPU(u64, processed_system_time);
@@ -14411,6 +14462,12 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+/* Must be signed, as it's compared with s64 quantities which can be -ve. */
+#define NS_PER_TICK (1000000000LL/HZ)
+
++static void __clock_was_set(void *unused)
++{
++ clock_was_set();
++}
++static DECLARE_WORK(clock_was_set_work, __clock_was_set, NULL);
++
+static inline void __normalize_time(time_t *sec, s64 *nsec)
+{
+ while (*nsec >= NSEC_PER_SEC) {
@@ -14646,7 +14703,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+{
+ unsigned long seq;
+ unsigned long usec, sec;
-+ unsigned long max_ntp_tick;
++ unsigned long flags;
+ s64 nsec;
+ unsigned int cpu;
+ struct shadow_time_info *shadow;
@@ -14664,19 +14721,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ usec = get_usec_offset(shadow);
+ lost = jiffies - wall_jiffies;
+
-+ /*
-+ * If time_adjust is negative then NTP is slowing the clock
-+ * so make sure not to go into next possible interval.
-+ * Better to lose some accuracy than have time go backwards..
-+ */
-+ if (unlikely(time_adjust < 0)) {
-+ max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj;
-+ usec = min(usec, max_ntp_tick);
-+
-+ if (lost)
-+ usec += lost * max_ntp_tick;
-+ }
-+ else if (unlikely(lost))
++ if (unlikely(lost))
+ usec += lost * (USEC_PER_SEC / HZ);
+
+ sec = xtime.tv_sec;
@@ -14707,6 +14752,18 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ sec++;
+ }
+
++ spin_lock_irqsave(&monotonic_lock, flags);
++ if ((sec > monotonic_tv.tv_sec) ||
++ ((sec == monotonic_tv.tv_sec) && (usec > monotonic_tv.tv_usec)))
++ {
++ monotonic_tv.tv_sec = sec;
++ monotonic_tv.tv_usec = usec;
++ } else {
++ sec = monotonic_tv.tv_sec;
++ usec = monotonic_tv.tv_usec;
++ }
++ spin_unlock_irqrestore(&monotonic_lock, flags);
++
+ tv->tv_sec = sec;
+ tv->tv_usec = usec;
+}
@@ -14756,6 +14813,12 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ __update_wallclock(sec, nsec);
+ }
+
++ /* Reset monotonic gettimeofday() timeval. */
++ spin_lock(&monotonic_lock);
++ monotonic_tv.tv_sec = 0;
++ monotonic_tv.tv_usec = 0;
++ spin_unlock(&monotonic_lock);
++
+ write_sequnlock_irq(&xtime_lock);
+
+ put_cpu();
@@ -14951,7 +15014,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+
+ if (shadow_tv_version != HYPERVISOR_shared_info->wc_version) {
+ update_wallclock();
-+ clock_was_set();
++ if (keventd_up())
++ schedule_work(&clock_was_set_work);
+ }
+
+ write_sequnlock(&xtime_lock);
@@ -15016,11 +15080,13 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+{
+ struct vcpu_register_runstate_memory_area area;
+ struct vcpu_runstate_info *runstate = &per_cpu(runstate, cpu);
++ int rc;
+
+ memset(runstate, 0, sizeof(*runstate));
+
+ area.addr.v = runstate;
-+ HYPERVISOR_vcpu_op(VCPUOP_register_runstate_memory_area, cpu, &area);
++ rc = HYPERVISOR_vcpu_op(VCPUOP_register_runstate_memory_area, cpu, &area);
++ WARN_ON(rc && rc != -ENOSYS);
+
+ per_cpu(processed_blocked_time, cpu) =
+ runstate->time[RUNSTATE_blocked];
@@ -15425,7 +15491,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+__initcall(xen_sysctl_init);
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/traps-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/traps-xen.c
--- pristine-linux-2.6.18/arch/i386/kernel/traps-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/traps-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/traps-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,1186 @@
+/*
+ * linux/arch/i386/traps.c
@@ -16615,7 +16681,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/traps-xen.c tmp-linux-2.6-xen.
+#endif
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/traps.c tmp-linux-2.6-xen.patch/arch/i386/kernel/traps.c
--- pristine-linux-2.6.18/arch/i386/kernel/traps.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/traps.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/traps.c 2007-10-15 11:42:06.000000000 -0700
@@ -642,18 +642,11 @@ static void mem_parity_error(unsigned ch
static void io_check_error(unsigned char reason, struct pt_regs * regs)
@@ -16638,7 +16704,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/traps.c tmp-linux-2.6-xen.patc
static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/vm86.c tmp-linux-2.6-xen.patch/arch/i386/kernel/vm86.c
--- pristine-linux-2.6.18/arch/i386/kernel/vm86.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/vm86.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/vm86.c 2007-10-11 00:15:26.000000000 -0700
@@ -97,7 +97,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)
@@ -16695,7 +16761,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/vm86.c tmp-linux-2.6-xen.patch
if (info->flags & VM86_SCREEN_BITMAP)
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/vmlinux.lds.S tmp-linux-2.6-xen.patch/arch/i386/kernel/vmlinux.lds.S
--- pristine-linux-2.6.18/arch/i386/kernel/vmlinux.lds.S 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/vmlinux.lds.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/vmlinux.lds.S 2007-10-11 00:15:26.000000000 -0700
@@ -13,6 +13,12 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386"
OUTPUT_ARCH(i386)
ENTRY(phys_startup_32)
@@ -16740,7 +16806,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/vmlinux.lds.S tmp-linux-2.6-xe
}
diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/vsyscall-note-xen.S tmp-linux-2.6-xen.patch/arch/i386/kernel/vsyscall-note-xen.S
--- pristine-linux-2.6.18/arch/i386/kernel/vsyscall-note-xen.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/vsyscall-note-xen.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/vsyscall-note-xen.S 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,32 @@
+/*
+ * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
@@ -16776,7 +16842,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/vsyscall-note-xen.S tmp-linux-
+NOTE_KERNELCAP_END
diff -Nurp pristine-linux-2.6.18/arch/i386/mach-xen/Makefile tmp-linux-2.6-xen.patch/arch/i386/mach-xen/Makefile
--- pristine-linux-2.6.18/arch/i386/mach-xen/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/mach-xen/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/mach-xen/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,5 @@
+#
+# Makefile for the linux kernel.
@@ -16785,7 +16851,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mach-xen/Makefile tmp-linux-2.6-xen.p
+obj-y := setup.o
diff -Nurp pristine-linux-2.6.18/arch/i386/mach-xen/setup.c tmp-linux-2.6-xen.patch/arch/i386/mach-xen/setup.c
--- pristine-linux-2.6.18/arch/i386/mach-xen/setup.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/mach-xen/setup.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/mach-xen/setup.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,147 @@
+/*
+ * Machine specific setup for generic
@@ -16936,7 +17002,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mach-xen/setup.c tmp-linux-2.6-xen.pa
+}
diff -Nurp pristine-linux-2.6.18/arch/i386/mm/Makefile tmp-linux-2.6-xen.patch/arch/i386/mm/Makefile
--- pristine-linux-2.6.18/arch/i386/mm/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -8,3 +8,11 @@ obj-$(CONFIG_NUMA) += discontig.o
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
obj-$(CONFIG_HIGHMEM) += highmem.o
@@ -16951,8 +17017,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/Makefile tmp-linux-2.6-xen.patch/a
+endif
diff -Nurp pristine-linux-2.6.18/arch/i386/mm/fault-xen.c tmp-linux-2.6-xen.patch/arch/i386/mm/fault-xen.c
--- pristine-linux-2.6.18/arch/i386/mm/fault-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/fault-xen.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,769 @@
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/fault-xen.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,782 @@
+/*
+ * linux/arch/i386/mm/fault.c
+ *
@@ -17694,18 +17760,31 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/fault-xen.c tmp-linux-2.6-xen.patc
+ * problematic: insync can only get set bits added, and updates to
+ * start are only improving performance (without affecting correctness
+ * if undone).
++ * XEN: To work on PAE, we need to iterate over PMDs rather than PGDs.
++ * This change works just fine with 2-level paging too.
+ */
-+ static DECLARE_BITMAP(insync, PTRS_PER_PGD);
++#define sync_index(a) ((a) >> PMD_SHIFT)
++ static DECLARE_BITMAP(insync, PTRS_PER_PGD*PTRS_PER_PMD);
+ static unsigned long start = TASK_SIZE;
+ unsigned long address;
+
+ BUILD_BUG_ON(TASK_SIZE & ~PGDIR_MASK);
-+ for (address = start; address >= TASK_SIZE; address += PGDIR_SIZE) {
-+ if (!test_bit(pgd_index(address), insync)) {
++ for (address = start;
++ address >= TASK_SIZE && address < hypervisor_virt_start;
++ address += 1UL << PMD_SHIFT) {
++ if (!test_bit(sync_index(address), insync)) {
+ unsigned long flags;
+ struct page *page;
+
+ spin_lock_irqsave(&pgd_lock, flags);
++ /*
++ * XEN: vmalloc_sync_one() failure path logic assumes
++ * pgd_list is non-empty.
++ */
++ if (unlikely(!pgd_list)) {
++ spin_unlock_irqrestore(&pgd_lock, flags);
++ return;
++ }
+ for (page = pgd_list; page; page =
+ (struct page *)page->index)
+ if (!vmalloc_sync_one(page_address(page),
@@ -17715,16 +17794,16 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/fault-xen.c tmp-linux-2.6-xen.patc
+ }
+ spin_unlock_irqrestore(&pgd_lock, flags);
+ if (!page)
-+ set_bit(pgd_index(address), insync);
++ set_bit(sync_index(address), insync);
+ }
-+ if (address == start && test_bit(pgd_index(address), insync))
-+ start = address + PGDIR_SIZE;
++ if (address == start && test_bit(sync_index(address), insync))
++ start = address + (1UL << PMD_SHIFT);
+ }
+}
+#endif
diff -Nurp pristine-linux-2.6.18/arch/i386/mm/highmem-xen.c tmp-linux-2.6-xen.patch/arch/i386/mm/highmem-xen.c
--- pristine-linux-2.6.18/arch/i386/mm/highmem-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/highmem-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/highmem-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,136 @@
+#include <linux/highmem.h>
+#include <linux/module.h>
@@ -17864,8 +17943,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/highmem-xen.c tmp-linux-2.6-xen.pa
+EXPORT_SYMBOL(kmap_atomic_to_page);
diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.patch/arch/i386/mm/hypervisor.c
--- pristine-linux-2.6.18/arch/i386/mm/hypervisor.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/hypervisor.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,451 @@
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/hypervisor.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,543 @@
+/******************************************************************************
+ * mm/hypervisor.c
+ *
@@ -17910,23 +17989,13 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+#include <linux/module.h>
+#include <linux/percpu.h>
+#include <asm/tlbflush.h>
-+
-+#ifdef CONFIG_X86_64
-+#define pmd_val_ma(v) (v).pmd
-+#else
-+#ifdef CONFIG_X86_PAE
-+# define pmd_val_ma(v) ((v).pmd)
-+# define pud_val_ma(v) ((v).pgd.pgd)
-+#else
-+# define pmd_val_ma(v) ((v).pud.pgd.pgd)
-+#endif
-+#endif
++#include <linux/highmem.h>
+
+void xen_l1_entry_update(pte_t *ptr, pte_t val)
+{
+ mmu_update_t u;
+ u.ptr = virt_to_machine(ptr);
-+ u.val = pte_val_ma(val);
++ u.val = __pte_val(val);
+ BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
+}
+
@@ -17934,34 +18003,26 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+{
+ mmu_update_t u;
+ u.ptr = virt_to_machine(ptr);
-+ u.val = pmd_val_ma(val);
++ u.val = __pmd_val(val);
+ BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
+}
+
-+#ifdef CONFIG_X86_PAE
++#if defined(CONFIG_X86_PAE) || defined(CONFIG_X86_64)
+void xen_l3_entry_update(pud_t *ptr, pud_t val)
+{
+ mmu_update_t u;
+ u.ptr = virt_to_machine(ptr);
-+ u.val = pud_val_ma(val);
++ u.val = __pud_val(val);
+ BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
+}
+#endif
+
+#ifdef CONFIG_X86_64
-+void xen_l3_entry_update(pud_t *ptr, pud_t val)
-+{
-+ mmu_update_t u;
-+ u.ptr = virt_to_machine(ptr);
-+ u.val = val.pud;
-+ BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
-+}
-+
+void xen_l4_entry_update(pgd_t *ptr, pgd_t val)
+{
+ mmu_update_t u;
+ u.ptr = virt_to_machine(ptr);
-+ u.val = val.pgd;
++ u.val = __pgd_val(val);
+ BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
+}
+#endif /* CONFIG_X86_64 */
@@ -18121,6 +18182,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+/* Protected by balloon_lock. */
+#define MAX_CONTIG_ORDER 9 /* 2MB */
+static unsigned long discontig_frames[1<<MAX_CONTIG_ORDER];
++static unsigned long limited_frames[1<<MAX_CONTIG_ORDER];
+static multicall_entry_t cr_mcl[1<<MAX_CONTIG_ORDER];
+
+/* Ensure multi-page extents are contiguous in machine memory. */
@@ -18308,6 +18370,115 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+}
+EXPORT_SYMBOL_GPL(xen_destroy_contiguous_region);
+
++int xen_limit_pages_to_max_mfn(
++ struct page *pages, unsigned int order, unsigned int address_bits)
++{
++ unsigned long flags, frame;
++ unsigned long *in_frames = discontig_frames, *out_frames = limited_frames;
++ void *v;
++ struct page *page;
++ int i, nr_mcl, rc, success;
++
++ struct xen_memory_exchange exchange = {
++ .in = {
++ .nr_extents = 1UL << order,
++ .extent_order = 0,
++ .domid = DOMID_SELF
++ },
++ .out = {
++ .nr_extents = 1UL << order,
++ .extent_order = 0,
++ .address_bits = address_bits,
++ .domid = DOMID_SELF
++ }
++ };
++
++ if (xen_feature(XENFEAT_auto_translated_physmap))
++ return 0;
++
++ if (unlikely(order > MAX_CONTIG_ORDER))
++ return -ENOMEM;
++
++ set_xen_guest_handle(exchange.in.extent_start, in_frames);
++ set_xen_guest_handle(exchange.out.extent_start, out_frames);
++
++ /* 0. Scrub the pages. */
++ for ( i = 0 ; i < 1UL<<order ; i++ ) {
++ page = &pages[i];
++
++ if (!PageHighMem(page)) {
++ v = page_address(page);
++ scrub_pages(v, 1);
++ } else {
++ v = kmap(page);
++ scrub_pages(v, 1);
++ kunmap(page);
++ }
++ }
++
++ kmap_flush_unused();
++
++ balloon_lock(flags);
++
++ /* 1. Zap current PTEs (if any), remembering MFNs. */
++ for (i = 0, nr_mcl = 0; i < (1UL<<order); i++) {
++ page = &pages[i];
++
++ out_frames[i] = page_to_pfn(page);
++ in_frames[i] = pfn_to_mfn(out_frames[i]);
++
++ if (!PageHighMem(page))
++ MULTI_update_va_mapping(cr_mcl + nr_mcl++,
++ (unsigned long)page_address(page),
++ __pte_ma(0), 0);
++
++ set_phys_to_machine(out_frames[i], INVALID_P2M_ENTRY);
++ }
++ if (HYPERVISOR_multicall_check(cr_mcl, nr_mcl, NULL))
++ BUG();
++
++ /* 2. Get new memory below the required limit. */
++ rc = HYPERVISOR_memory_op(XENMEM_exchange, &exchange);
++ success = (exchange.nr_exchanged == (1UL << order));
++ BUG_ON(!success && ((exchange.nr_exchanged != 0) || (rc == 0)));
++ BUG_ON(success && (rc != 0));
++#if CONFIG_XEN_COMPAT <= 0x030002
++ if (unlikely(rc == -ENOSYS)) {
++ /* Compatibility when XENMEM_exchange is unsupported. */
++ if (HYPERVISOR_memory_op(XENMEM_decrease_reservation,
++ &exchange.in) != (1UL << order))
++ BUG();
++ success = (HYPERVISOR_memory_op(XENMEM_populate_physmap,
++ &exchange.out) != (1UL <<order));
++ }
++#endif
++
++ /* 3. Map the new pages in place of old pages. */
++ for (i = 0, nr_mcl = 0; i < (1UL<<order); i++) {
++ page = &pages[i];
++ unsigned long pfn = page_to_pfn(page);
++
++ frame = success ? out_frames[i] : in_frames[i];
++
++ if (!PageHighMem(page))
++ MULTI_update_va_mapping(cr_mcl + nr_mcl++,
++ (unsigned long)page_address(page),
++ pfn_pte_ma(frame, PAGE_KERNEL), 0);
++
++ set_phys_to_machine(pfn, frame);
++ }
++ cr_mcl[nr_mcl - 1].args[MULTI_UVMFLAGS_INDEX] = order
++ ? UVMF_TLB_FLUSH|UVMF_ALL
++ : UVMF_INVLPG|UVMF_ALL;
++ if (HYPERVISOR_multicall_check(cr_mcl, nr_mcl, NULL))
++ BUG();
++
++ balloon_unlock(flags);
++
++ return success ? 0 : -ENOMEM;
++}
++EXPORT_SYMBOL_GPL(xen_limit_pages_to_max_mfn);
++
+#ifdef __i386__
+int write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 entry_b)
+{
@@ -18319,7 +18490,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+#endif
diff -Nurp pristine-linux-2.6.18/arch/i386/mm/init-xen.c tmp-linux-2.6-xen.patch/arch/i386/mm/init-xen.c
--- pristine-linux-2.6.18/arch/i386/mm/init-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/init-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/init-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,850 @@
+/*
+ * linux/arch/i386/mm/init.c
@@ -19173,7 +19344,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/init-xen.c tmp-linux-2.6-xen.patch
+
diff -Nurp pristine-linux-2.6.18/arch/i386/mm/ioremap-xen.c tmp-linux-2.6-xen.patch/arch/i386/mm/ioremap-xen.c
--- pristine-linux-2.6.18/arch/i386/mm/ioremap-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/ioremap-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/ioremap-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,443 @@
+/*
+ * arch/i386/mm/ioremap.c
@@ -19251,9 +19422,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/ioremap-xen.c tmp-linux-2.6-xen.pa
+
+ /*
+ * Fill in the machine address: PTE ptr is done later by
-+ * __direct_remap_area_pages().
++ * apply_to_page_range().
+ */
-+ v->val = pte_val_ma(pfn_pte_ma(mfn, prot));
++ v->val = __pte_val(pfn_pte_ma(mfn, prot));
+
+ mfn++;
+ address += PAGE_SIZE;
@@ -19620,7 +19791,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/ioremap-xen.c tmp-linux-2.6-xen.pa
+}
diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pageattr.c tmp-linux-2.6-xen.patch/arch/i386/mm/pageattr.c
--- pristine-linux-2.6.18/arch/i386/mm/pageattr.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/pageattr.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/pageattr.c 2007-10-15 11:42:06.000000000 -0700
@@ -84,7 +84,7 @@ static void set_pmd_pte(pte_t *kpte, uns
unsigned long flags;
@@ -19632,7 +19803,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pageattr.c tmp-linux-2.6-xen.patch
spin_lock_irqsave(&pgd_lock, flags);
diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pgtable-xen.c tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable-xen.c
--- pristine-linux-2.6.18/arch/i386/mm/pgtable-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,727 @@
+/*
+ * linux/arch/i386/mm/pgtable.c
@@ -20363,7 +20534,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pgtable-xen.c tmp-linux-2.6-xen.pa
+}
diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pgtable.c tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable.c
--- pristine-linux-2.6.18/arch/i386/mm/pgtable.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable.c 2007-10-15 11:42:06.000000000 -0700
@@ -12,6 +12,7 @@
#include <linux/slab.h>
#include <linux/pagemap.h>
@@ -20471,7 +20642,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pgtable.c tmp-linux-2.6-xen.patch/
}
diff -Nurp pristine-linux-2.6.18/arch/i386/oprofile/Makefile tmp-linux-2.6-xen.patch/arch/i386/oprofile/Makefile
--- pristine-linux-2.6.18/arch/i386/oprofile/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/oprofile/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/oprofile/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -6,7 +6,14 @@ DRIVER_OBJS = $(addprefix ../../../drive
oprofilefs.o oprofile_stats.o \
timer_int.o )
@@ -20489,7 +20660,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/oprofile/Makefile tmp-linux-2.6-xen.p
+endif
diff -Nurp pristine-linux-2.6.18/arch/i386/oprofile/xenoprof.c tmp-linux-2.6-xen.patch/arch/i386/oprofile/xenoprof.c
--- pristine-linux-2.6.18/arch/i386/oprofile/xenoprof.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/oprofile/xenoprof.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/oprofile/xenoprof.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,179 @@
+/**
+ * @file xenoprof.c
@@ -20672,7 +20843,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/oprofile/xenoprof.c tmp-linux-2.6-xen
+}
diff -Nurp pristine-linux-2.6.18/arch/i386/pci/Makefile tmp-linux-2.6-xen.patch/arch/i386/pci/Makefile
--- pristine-linux-2.6.18/arch/i386/pci/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/pci/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/pci/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -4,6 +4,10 @@ obj-$(CONFIG_PCI_BIOS) += pcbios.o
obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o
obj-$(CONFIG_PCI_DIRECT) += direct.o
@@ -20695,7 +20866,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/pci/Makefile tmp-linux-2.6-xen.patch/
+endif
diff -Nurp pristine-linux-2.6.18/arch/i386/pci/irq-xen.c tmp-linux-2.6-xen.patch/arch/i386/pci/irq-xen.c
--- pristine-linux-2.6.18/arch/i386/pci/irq-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/pci/irq-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/pci/irq-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,1205 @@
+/*
+ * Low-Level PCI Support for PC -- Routing of Interrupts
@@ -21904,7 +22075,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/pci/irq-xen.c tmp-linux-2.6-xen.patch
+}
diff -Nurp pristine-linux-2.6.18/arch/i386/pci/pcifront.c tmp-linux-2.6-xen.patch/arch/i386/pci/pcifront.c
--- pristine-linux-2.6.18/arch/i386/pci/pcifront.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/i386/pci/pcifront.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/pci/pcifront.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,55 @@
+/*
+ * PCI Frontend Stub - puts some "dummy" functions in to the Linux x86 PCI core
@@ -21963,7 +22134,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/pci/pcifront.c tmp-linux-2.6-xen.patc
+arch_initcall(pcifront_x86_stub_init);
diff -Nurp pristine-linux-2.6.18/arch/i386/power/Makefile tmp-linux-2.6-xen.patch/arch/i386/power/Makefile
--- pristine-linux-2.6.18/arch/i386/power/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/i386/power/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/i386/power/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -1,2 +1,4 @@
-obj-$(CONFIG_PM) += cpu.o
+obj-$(CONFIG_PM_LEGACY) += cpu.o
@@ -21972,7 +22143,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/power/Makefile tmp-linux-2.6-xen.patc
obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
diff -Nurp pristine-linux-2.6.18/arch/ia64/Kconfig tmp-linux-2.6-xen.patch/arch/ia64/Kconfig
--- pristine-linux-2.6.18/arch/ia64/Kconfig 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/Kconfig 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/Kconfig 2007-10-11 00:15:26.000000000 -0700
@@ -58,6 +58,34 @@ config GENERIC_IOMAP
bool
default y
@@ -22046,7 +22217,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/Kconfig tmp-linux-2.6-xen.patch/arch/
+source "drivers/xen/Kconfig"
diff -Nurp pristine-linux-2.6.18/arch/ia64/Makefile tmp-linux-2.6-xen.patch/arch/ia64/Makefile
--- pristine-linux-2.6.18/arch/ia64/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -45,6 +45,12 @@ ifeq ($(call cc-version),0304)
endif
@@ -22089,7 +22260,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/Makefile tmp-linux-2.6-xen.patch/arch
echo '* compressed - Build compressed kernel image'
diff -Nurp pristine-linux-2.6.18/arch/ia64/dig/setup.c tmp-linux-2.6-xen.patch/arch/ia64/dig/setup.c
--- pristine-linux-2.6.18/arch/ia64/dig/setup.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/dig/setup.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/dig/setup.c 2007-10-11 00:15:26.000000000 -0700
@@ -24,6 +24,8 @@
#include <asm/machvec.h>
#include <asm/system.h>
@@ -22121,7 +22292,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/dig/setup.c tmp-linux-2.6-xen.patch/a
}
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/asm-offsets.c tmp-linux-2.6-xen.patch/arch/ia64/kernel/asm-offsets.c
--- pristine-linux-2.6.18/arch/ia64/kernel/asm-offsets.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/asm-offsets.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/asm-offsets.c 2007-10-11 00:15:26.000000000 -0700
@@ -268,4 +268,29 @@ void foo(void)
DEFINE(IA64_TIME_SOURCE_MMIO64, TIME_SOURCE_MMIO64);
DEFINE(IA64_TIME_SOURCE_MMIO32, TIME_SOURCE_MMIO32);
@@ -22154,7 +22325,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/asm-offsets.c tmp-linux-2.6-xe
}
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/entry.S tmp-linux-2.6-xen.patch/arch/ia64/kernel/entry.S
--- pristine-linux-2.6.18/arch/ia64/kernel/entry.S 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/entry.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/entry.S 2007-10-11 00:15:26.000000000 -0700
@@ -180,7 +180,7 @@ END(sys_clone)
* called. The code starting at .map relies on this. The rest of the code
* doesn't care about the interrupt masking status.
@@ -22294,7 +22465,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/entry.S tmp-linux-2.6-xen.patc
br.many b7
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/fsys.S tmp-linux-2.6-xen.patch/arch/ia64/kernel/fsys.S
--- pristine-linux-2.6.18/arch/ia64/kernel/fsys.S 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/fsys.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/fsys.S 2007-10-11 00:15:26.000000000 -0700
@@ -516,11 +516,34 @@ ENTRY(fsys_fallback_syscall)
adds r17=-1024,r15
movl r14=sys_call_table
@@ -22358,7 +22529,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/fsys.S tmp-linux-2.6-xen.patch
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/gate.S tmp-linux-2.6-xen.patch/arch/ia64/kernel/gate.S
--- pristine-linux-2.6.18/arch/ia64/kernel/gate.S 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/gate.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/gate.S 2007-10-11 00:15:26.000000000 -0700
@@ -13,6 +13,9 @@
#include <asm/sigcontext.h>
#include <asm/system.h>
@@ -22514,7 +22685,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/gate.S tmp-linux-2.6-xen.patch
END(__kernel_syscall_via_epc)
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/gate.lds.S tmp-linux-2.6-xen.patch/arch/ia64/kernel/gate.lds.S
--- pristine-linux-2.6.18/arch/ia64/kernel/gate.lds.S 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/gate.lds.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/gate.lds.S 2007-10-11 00:15:26.000000000 -0700
@@ -43,6 +43,20 @@ SECTIONS
__start_gate_brl_fsys_bubble_down_patchlist = .;
*(.data.patch.brl_fsys_bubble_down)
@@ -22538,7 +22709,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/gate.lds.S tmp-linux-2.6-xen.p
.IA_64.unwind : { *(.IA_64.unwind*) } :readable :unwind
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/head.S tmp-linux-2.6-xen.patch/arch/ia64/kernel/head.S
--- pristine-linux-2.6.18/arch/ia64/kernel/head.S 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/head.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/head.S 2007-10-11 00:15:26.000000000 -0700
@@ -367,6 +367,12 @@ start_ap:
;;
(isBP) st8 [r2]=r28 // save the address of the boot param area passed by the bootloader
@@ -22554,7 +22725,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/head.S tmp-linux-2.6-xen.patch
.ret0:
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/iosapic.c tmp-linux-2.6-xen.patch/arch/ia64/kernel/iosapic.c
--- pristine-linux-2.6.18/arch/ia64/kernel/iosapic.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/iosapic.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/iosapic.c 2007-10-11 00:15:26.000000000 -0700
@@ -159,6 +159,75 @@ static unsigned char pcat_compat __devin
static int iosapic_kmalloc_ok;
static LIST_HEAD(free_rte_list);
@@ -22653,7 +22824,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/iosapic.c tmp-linux-2.6-xen.pa
* Disable the compatibility mode interrupts (8259 style),
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/irq_ia64.c tmp-linux-2.6-xen.patch/arch/ia64/kernel/irq_ia64.c
--- pristine-linux-2.6.18/arch/ia64/kernel/irq_ia64.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/irq_ia64.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/irq_ia64.c 2007-10-11 00:15:26.000000000 -0700
@@ -30,6 +30,9 @@
#include <linux/smp_lock.h>
#include <linux/threads.h>
@@ -22692,7 +22863,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/irq_ia64.c tmp-linux-2.6-xen.p
pos = vector - IA64_FIRST_DEVICE_VECTOR;
if (!test_and_clear_bit(pos, ia64_vector_mask))
printk(KERN_WARNING "%s: double free!\n", __FUNCTION__);
-@@ -240,12 +257,268 @@ static struct irqaction ipi_irqaction =
+@@ -240,12 +257,277 @@ static struct irqaction ipi_irqaction =
};
#endif
@@ -22758,9 +22929,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/irq_ia64.c tmp-linux-2.6-xen.p
+ * required.
+ */
+static void
-+xen_register_percpu_irq (unsigned int vec, struct irqaction *action, int save)
++xen_register_percpu_irq(unsigned int cpu, unsigned int vec,
++ struct irqaction *action, int save)
+{
-+ unsigned int cpu = smp_processor_id();
+ irq_desc_t *desc;
+ int irq = 0;
+
@@ -22862,7 +23033,8 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/irq_ia64.c tmp-linux-2.6-xen.p
+ * BSP will face with such step shortly
+ */
+ for (i = 0; i < late_irq_cnt; i++)
-+ xen_register_percpu_irq(saved_percpu_irqs[i].irq,
++ xen_register_percpu_irq(smp_processor_id(),
++ saved_percpu_irqs[i].irq,
+ saved_percpu_irqs[i].action, 0);
+}
+
@@ -22918,11 +23090,21 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/irq_ia64.c tmp-linux-2.6-xen.p
+#endif
+
+DECLARE_PER_CPU(int, ipi_to_irq[NR_IPIS]);
++void xen_smp_intr_init_early(unsigned int cpu)
++{
++#ifdef CONFIG_SMP
++ unsigned int i;
++
++ for (i = 0; i < saved_irq_cnt; i++)
++ xen_register_percpu_irq(cpu, saved_percpu_irqs[i].irq,
++ saved_percpu_irqs[i].action, 0);
++#endif
++}
++
+void xen_smp_intr_init(void)
+{
+#ifdef CONFIG_SMP
+ unsigned int cpu = smp_processor_id();
-+ unsigned int i = 0;
+ struct callback_register event = {
+ .type = CALLBACKTYPE_event,
+ .address = (unsigned long)&xen_event_callback,
@@ -22939,12 +23121,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/irq_ia64.c tmp-linux-2.6-xen.p
+
+ /* This should be piggyback when setup vcpu guest context */
+ BUG_ON(HYPERVISOR_callback_op(CALLBACKOP_register, &event));
-+
-+ for (i = 0; i < saved_irq_cnt; i++)
-+ xen_register_percpu_irq(saved_percpu_irqs[i].irq,
-+ saved_percpu_irqs[i].action, 0);
+#endif /* CONFIG_SMP */
+}
++
+#endif /* CONFIG_XEN */
+
void
@@ -22955,13 +23134,14 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/irq_ia64.c tmp-linux-2.6-xen.p
+#ifdef CONFIG_XEN
+ if (is_running_on_xen())
-+ return xen_register_percpu_irq(vec, action, 1);
++ return xen_register_percpu_irq(smp_processor_id(),
++ vec, action, 1);
+#endif
+
for (irq = 0; irq < NR_IRQS; ++irq)
if (irq_to_vector(irq) == vec) {
desc = irq_desc + irq;
-@@ -259,6 +532,21 @@ register_percpu_irq (ia64_vector vec, st
+@@ -259,6 +541,21 @@ register_percpu_irq (ia64_vector vec, st
void __init
init_IRQ (void)
{
@@ -22983,7 +23163,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/irq_ia64.c tmp-linux-2.6-xen.p
register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL);
#ifdef CONFIG_SMP
register_percpu_irq(IA64_IPI_VECTOR, &ipi_irqaction);
-@@ -276,6 +564,46 @@ ia64_send_ipi (int cpu, int vector, int
+@@ -276,6 +573,54 @@ ia64_send_ipi (int cpu, int vector, int
unsigned long ipi_data;
unsigned long phys_cpu_id;
@@ -22995,6 +23175,14 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/irq_ia64.c tmp-linux-2.6-xen.p
+ /* TODO: we need to call vcpu_up here */
+ if (unlikely(vector == ap_wakeup_vector)) {
+ extern void xen_send_ipi (int cpu, int vec);
++
++ /* XXX
++ * This should be in __cpu_up(cpu) in ia64 smpboot.c
++ * like x86. But don't want to modify it,
++ * keep it untouched.
++ */
++ xen_smp_intr_init_early(cpu);
++
+ xen_send_ipi (cpu, vector);
+ //vcpu_prepare_and_up(cpu);
+ return;
@@ -23032,7 +23220,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/irq_ia64.c tmp-linux-2.6-xen.p
#else
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/pal.S tmp-linux-2.6-xen.patch/arch/ia64/kernel/pal.S
--- pristine-linux-2.6.18/arch/ia64/kernel/pal.S 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/pal.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/pal.S 2007-10-11 00:15:26.000000000 -0700
@@ -16,6 +16,7 @@
#include <asm/processor.h>
@@ -23061,7 +23249,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/pal.S tmp-linux-2.6-xen.patch/
* Make a PAL call using the stacked registers calling convention.
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/patch.c tmp-linux-2.6-xen.patch/arch/ia64/kernel/patch.c
--- pristine-linux-2.6.18/arch/ia64/kernel/patch.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/patch.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/patch.c 2007-10-11 00:15:26.000000000 -0700
@@ -184,6 +184,69 @@ patch_brl_fsys_bubble_down (unsigned lon
ia64_srlz_i();
}
@@ -23145,7 +23333,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/patch.c tmp-linux-2.6-xen.patc
}
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.patch/arch/ia64/kernel/perfmon.c
--- pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/perfmon.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/perfmon.c 2007-10-11 00:15:26.000000000 -0700
@@ -52,6 +52,28 @@
#include <asm/delay.h>
@@ -23342,7 +23530,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
prev_state = ctx->ctx_state;
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/setup.c tmp-linux-2.6-xen.patch/arch/ia64/kernel/setup.c
--- pristine-linux-2.6.18/arch/ia64/kernel/setup.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/setup.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/setup.c 2007-10-11 00:15:26.000000000 -0700
@@ -60,6 +60,12 @@
#include <asm/system.h>
#include <asm/unistd.h>
@@ -23524,7 +23712,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/setup.c tmp-linux-2.6-xen.patc
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/smp.c tmp-linux-2.6-xen.patch/arch/ia64/kernel/smp.c
--- pristine-linux-2.6.18/arch/ia64/kernel/smp.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/smp.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/smp.c 2007-10-15 11:42:06.000000000 -0700
@@ -328,10 +328,14 @@ int
smp_call_function (void (*func) (void *info), void *info, int nonatomic, int wait)
{
@@ -23553,7 +23741,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/smp.c tmp-linux-2.6-xen.patch/
send_IPI_allbutself(IPI_CALL_FUNC);
diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/time.c tmp-linux-2.6-xen.patch/arch/ia64/kernel/time.c
--- pristine-linux-2.6.18/arch/ia64/kernel/time.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/time.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/kernel/time.c 2007-10-11 00:15:26.000000000 -0700
@@ -29,6 +29,13 @@
#include <asm/sections.h>
#include <asm/system.h>
@@ -23701,7 +23889,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/time.c tmp-linux-2.6-xen.patch
do {
/*
* If we're too close to the next clock tick for
-@@ -142,6 +251,25 @@ static int __init nojitter_setup(char *s
+@@ -142,6 +251,85 @@ static int __init nojitter_setup(char *s
__setup("nojitter", nojitter_setup);
@@ -23711,35 +23899,98 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/time.c tmp-linux-2.6-xen.patch
+{
+ struct vcpu_register_runstate_memory_area area;
+ struct vcpu_runstate_info *runstate = &per_cpu(runstate, cpu);
++ int rc;
+
+ memset(runstate, 0, sizeof(*runstate));
+
+ area.addr.v = runstate;
-+ HYPERVISOR_vcpu_op(VCPUOP_register_runstate_memory_area, cpu, &area);
++ rc = HYPERVISOR_vcpu_op(VCPUOP_register_runstate_memory_area, cpu, &area);
++ WARN_ON(rc && rc != -ENOSYS);
+
+ per_cpu(processed_blocked_time, cpu) = runstate->time[RUNSTATE_blocked];
+ per_cpu(processed_stolen_time, cpu) = runstate->time[RUNSTATE_runnable]
+ + runstate->time[RUNSTATE_offline];
+}
++
++static int xen_ia64_settimefoday_after_resume;
++
++static int __init __xen_ia64_settimeofday_after_resume(char *str)
++{
++ xen_ia64_settimefoday_after_resume = 1;
++ return 1;
++}
++
++__setup("xen_ia64_settimefoday_after_resume",
++ __xen_ia64_settimeofday_after_resume);
++
++/* Called after suspend, to resume time. */
++void
++time_resume(void)
++{
++ unsigned int cpu;
++
++ /* Just trigger a tick. */
++ ia64_cpu_local_tick();
++
++ if (xen_ia64_settimefoday_after_resume) {
++ /* do_settimeofday() resets timer interplator */
++ struct timespec xen_time;
++ int ret;
++ efi_gettimeofday(&xen_time);
++
++ ret = do_settimeofday(&xen_time);
++ WARN_ON(ret);
++ } else {
++#if 0
++ /* adjust EFI time */
++ struct timespec my_time = CURRENT_TIME;
++ struct timespec xen_time;
++ static timespec diff;
++ struct xen_domctl domctl;
++ int ret;
++
++ efi_gettimeofday(&xen_time);
++ diff = timespec_sub(&xen_time, &my_time);
++ domctl.cmd = XEN_DOMCTL_settimeoffset;
++ domctl.domain = DOMID_SELF;
++ domctl.u.settimeoffset.timeoffset_seconds = diff.tv_sec;
++ ret = HYPERVISOR_domctl_op(&domctl);
++ WARN_ON(ret);
++#endif
++ /* Time interpolator remembers the last timer status.
++ Forget it */
++ write_seqlock_irq(&xtime_lock);
++ time_interpolator_reset();
++ write_sequnlock_irq(&xtime_lock);
++ }
++
++ for_each_online_cpu(cpu)
++ init_missing_ticks_accounting(cpu);
++
++ touch_softlockup_watchdog();
++}
+#else
+#define init_missing_ticks_accounting(cpu) do {} while (0)
+#endif
void __devinit
ia64_init_itm (void)
-@@ -225,6 +353,9 @@ ia64_init_itm (void)
+@@ -225,6 +413,12 @@ ia64_init_itm (void)
register_time_interpolator(&itc_interpolator);
}
+ if (is_running_on_xen())
+ init_missing_ticks_accounting(smp_processor_id());
+
++ /* avoid softlock up message when cpu is unplug and plugged again. */
++ touch_softlockup_watchdog();
++
/* Setup the CPU local timer tick */
ia64_cpu_local_tick();
}
diff -Nurp pristine-linux-2.6.18/arch/ia64/mm/ioremap.c tmp-linux-2.6-xen.patch/arch/ia64/mm/ioremap.c
--- pristine-linux-2.6.18/arch/ia64/mm/ioremap.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/mm/ioremap.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/mm/ioremap.c 2007-10-11 00:15:26.000000000 -0700
@@ -16,6 +16,9 @@
static inline void __iomem *
__ioremap (unsigned long offset, unsigned long size)
@@ -23752,7 +24003,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/mm/ioremap.c tmp-linux-2.6-xen.patch/
diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/Makefile tmp-linux-2.6-xen.patch/arch/ia64/oprofile/Makefile
--- pristine-linux-2.6.18/arch/ia64/oprofile/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/oprofile/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/oprofile/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -8,3 +8,7 @@ DRIVER_OBJS := $(addprefix ../../../driv
oprofile-y := $(DRIVER_OBJS) init.o backtrace.o
@@ -23763,7 +24014,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/Makefile tmp-linux-2.6-xen.p
+endif
diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/init.c tmp-linux-2.6-xen.patch/arch/ia64/oprofile/init.c
--- pristine-linux-2.6.18/arch/ia64/oprofile/init.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/oprofile/init.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/oprofile/init.c 2007-10-11 00:15:26.000000000 -0700
@@ -11,6 +11,7 @@
#include <linux/oprofile.h>
#include <linux/init.h>
@@ -23801,7 +24052,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/init.c tmp-linux-2.6-xen.pat
#endif
diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/oprofile_perfmon.h tmp-linux-2.6-xen.patch/arch/ia64/oprofile/oprofile_perfmon.h
--- pristine-linux-2.6.18/arch/ia64/oprofile/oprofile_perfmon.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/oprofile/oprofile_perfmon.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/oprofile/oprofile_perfmon.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,28 @@
+#ifndef OPROFILE_PERFMON_H
+#define OPROFILE_PERFMON_H
@@ -23833,7 +24084,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/oprofile_perfmon.h tmp-linux
+#endif /* OPROFILE_PERFMON_H */
diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/perfmon.c tmp-linux-2.6-xen.patch/arch/ia64/oprofile/perfmon.c
--- pristine-linux-2.6.18/arch/ia64/oprofile/perfmon.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/oprofile/perfmon.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/oprofile/perfmon.c 2007-10-11 00:15:26.000000000 -0700
@@ -13,6 +13,7 @@
#include <asm/perfmon.h>
#include <asm/ptrace.h>
@@ -23911,7 +24162,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/perfmon.c tmp-linux-2.6-xen.
}
diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/xenoprof.c tmp-linux-2.6-xen.patch/arch/ia64/oprofile/xenoprof.c
--- pristine-linux-2.6.18/arch/ia64/oprofile/xenoprof.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/oprofile/xenoprof.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/oprofile/xenoprof.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,142 @@
+/******************************************************************************
+ * xenoprof ia64 specific part
@@ -24057,8 +24308,20 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/xenoprof.c tmp-linux-2.6-xen
+}
diff -Nurp pristine-linux-2.6.18/arch/ia64/pci/pci.c tmp-linux-2.6-xen.patch/arch/ia64/pci/pci.c
--- pristine-linux-2.6.18/arch/ia64/pci/pci.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/ia64/pci/pci.c 2007-05-18 07:45:21.000000000 -0700
-@@ -607,6 +607,14 @@ pci_mmap_page_range (struct pci_dev *dev
++++ tmp-linux-2.6-xen.patch/arch/ia64/pci/pci.c 2007-10-11 00:15:26.000000000 -0700
+@@ -165,6 +165,11 @@ new_space (u64 phys_base, int sparse)
+ io_space[i].mmio_base = mmio_base;
+ io_space[i].sparse = sparse;
+
++#ifdef CONFIG_XEN
++ if (is_initial_xendomain())
++ HYPERVISOR_add_io_space(phys_base, sparse, i);
++#endif
++
+ return i;
+ }
+
+@@ -607,6 +612,14 @@ pci_mmap_page_range (struct pci_dev *dev
else
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
@@ -24073,7 +24336,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/pci/pci.c tmp-linux-2.6-xen.patch/arc
if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
vma->vm_end - vma->vm_start, vma->vm_page_prot))
return -EAGAIN;
-@@ -664,6 +672,14 @@ pci_mmap_legacy_page_range(struct pci_bu
+@@ -664,6 +677,14 @@ pci_mmap_legacy_page_range(struct pci_bu
vma->vm_pgoff += (unsigned long)addr >> PAGE_SHIFT;
vma->vm_page_prot = prot;
@@ -24088,9 +24351,41 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/pci/pci.c tmp-linux-2.6-xen.patch/arc
if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
size, vma->vm_page_prot))
return -EAGAIN;
+@@ -818,3 +839,31 @@ int pci_vector_resources(int last, int n
+
+ return count;
+ }
++
++#ifdef CONFIG_XEN
++void __devinit xen_add_resource(struct pci_controller *controller,
++ unsigned int domain, unsigned int bus,
++ struct acpi_resource *resource)
++{
++ struct pci_root_info info;
++ char *name;
++
++ name = kmalloc(16, GFP_KERNEL);
++ if (!name)
++ return;
++
++ sprintf(name, "PCI Bus %04x:%02x", domain, bus);
++ info.controller = controller;
++ info.name = name;
++
++ add_window(resource, &info);
++}
++EXPORT_SYMBOL(xen_add_resource);
++
++void __devinit xen_pcibios_setup_root_windows(struct pci_bus *bus,
++ struct pci_controller *controller)
++{
++ pcibios_setup_root_windows(bus, controller);
++}
++EXPORT_SYMBOL(xen_pcibios_setup_root_windows);
++#endif
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/Makefile tmp-linux-2.6-xen.patch/arch/ia64/xen/Makefile
--- pristine-linux-2.6.18/arch/ia64/xen/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,9 @@
+#
+# Makefile for Xen components
@@ -24103,7 +24398,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/Makefile tmp-linux-2.6-xen.patch/
+pci-dma-xen-y := ../../i386/kernel/pci-dma-xen.o
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypercall.S tmp-linux-2.6-xen.patch/arch/ia64/xen/hypercall.S
--- pristine-linux-2.6.18/arch/ia64/xen/hypercall.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/hypercall.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/hypercall.S 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,170 @@
+/*
+ * Support routines for Xen hypercalls
@@ -24277,8 +24572,8 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypercall.S tmp-linux-2.6-xen.pat
+#endif
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.patch/arch/ia64/xen/hypervisor.c
--- pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/hypervisor.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,1183 @@
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/hypervisor.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,1234 @@
+/******************************************************************************
+ * include/asm-ia64/shadow.h
+ *
@@ -24328,6 +24623,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+static int p2m_expose_init(void);
+#else
+#define p2m_expose_init() (-ENOSYS)
++#define p2m_expose_resume() ((void)0)
+#endif
+
+EXPORT_SYMBOL(__hypercall);
@@ -25125,19 +25421,6 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+}
+
+
-+/* Called after suspend, to resume time. */
-+void
-+time_resume(void)
-+{
-+ extern void ia64_cpu_local_tick(void);
-+
-+ /* Just trigger a tick. */
-+ ia64_cpu_local_tick();
-+
-+ /* Time interpolator remembers the last timer status. Forget it */
-+ time_interpolator_reset();
-+}
-+
+///////////////////////////////////////////////////////////////////////////
+// expose p2m table
+#ifdef CONFIG_XEN_IA64_EXPOSE_P2M
@@ -25157,6 +25440,8 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+};
+static unsigned long p2m_assign_start_pfn __read_mostly;
+static unsigned long p2m_assign_end_pfn __read_mostly;
++static unsigned long p2m_expose_size; // this is referenced only when resume.
++ // so __read_mostly doesn't make sense.
+volatile const pte_t* p2m_pte __read_mostly;
+
+#define GRNULE_PFN PTRS_PER_PTE
@@ -25217,8 +25502,15 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ unsigned int cpu = (unsigned int)(long)ptr;
+ if (event != CPU_ONLINE)
+ return 0;
-+ if (!(p2m_initialized && xen_ia64_p2m_expose_use_dtr))
-+ smp_call_function_single(cpu, &p2m_itr, &p2m_itr_arg, 1, 1);
++ if (p2m_initialized && xen_ia64_p2m_expose_use_dtr) {
++ unsigned int me = get_cpu();
++ if (cpu == me)
++ p2m_itr(&p2m_itr_arg);
++ else
++ smp_call_function_single(cpu, &p2m_itr, &p2m_itr_arg,
++ 1, 1);
++ put_cpu();
++ }
+ return 0;
+}
+
@@ -25233,7 +25525,6 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+p2m_expose_init(void)
+{
+ unsigned long num_pfn;
-+ unsigned long size = 0;
+ unsigned long p2m_size = 0;
+ unsigned long align = ~0UL;
+ int error = 0;
@@ -25285,7 +25576,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ p2m_convert_max_pfn = ROUNDUP(p2m_max_low_pfn,
+ granule_pfn);
+ num_pfn = p2m_convert_max_pfn - p2m_convert_min_pfn;
-+ size = num_pfn << PAGE_SHIFT;
++ p2m_expose_size = num_pfn << PAGE_SHIFT;
+ p2m_size = num_pfn / PTRS_PER_PTE;
+ p2m_size = ROUNDUP(p2m_size, granule_pfn << PAGE_SHIFT);
+ if (p2m_size == page_size)
@@ -25305,7 +25596,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ p2m_granule_pfn);
+ p2m_convert_max_pfn = ROUNDUP(p2m_max_low_pfn, p2m_granule_pfn);
+ num_pfn = p2m_convert_max_pfn - p2m_convert_min_pfn;
-+ size = num_pfn << PAGE_SHIFT;
++ p2m_expose_size = num_pfn << PAGE_SHIFT;
+ p2m_size = num_pfn / PTRS_PER_PTE;
+ p2m_size = ROUNDUP(p2m_size, p2m_granule_pfn << PAGE_SHIFT);
+ align = max(privcmd_resource_align,
@@ -25329,14 +25620,14 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+
+ error = HYPERVISOR_expose_p2m(p2m_convert_min_pfn,
+ p2m_assign_start_pfn,
-+ size, p2m_granule_pfn);
++ p2m_expose_size, p2m_granule_pfn);
+ if (error) {
+ printk(KERN_ERR P2M_PREFIX "failed expose p2m hypercall %d\n",
+ error);
+ printk(KERN_ERR P2M_PREFIX "conv 0x%016lx assign 0x%016lx "
-+ "size 0x%016lx granule 0x%016lx\n",
++ "expose_size 0x%016lx granule 0x%016lx\n",
+ p2m_convert_min_pfn, p2m_assign_start_pfn,
-+ size, p2m_granule_pfn);;
++ p2m_expose_size, p2m_granule_pfn);;
+ release_resource(&p2m_resource);
+ goto out;
+ }
@@ -25379,6 +25670,49 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+}
+#endif
+
++static void
++p2m_expose_resume(void)
++{
++ int error;
++
++ if (!xen_ia64_p2m_expose || !p2m_initialized)
++ return;
++
++ /*
++ * We can't call {lock, unlock}_cpu_hotplug() because
++ * they require process context.
++ * We don't need them because we're the only one cpu and
++ * interrupts are masked when resume.
++ */
++ error = HYPERVISOR_expose_p2m(p2m_convert_min_pfn,
++ p2m_assign_start_pfn,
++ p2m_expose_size, p2m_granule_pfn);
++ if (error) {
++ printk(KERN_ERR P2M_PREFIX "failed expose p2m hypercall %d\n",
++ error);
++ printk(KERN_ERR P2M_PREFIX "conv 0x%016lx assign 0x%016lx "
++ "expose_size 0x%016lx granule 0x%016lx\n",
++ p2m_convert_min_pfn, p2m_assign_start_pfn,
++ p2m_expose_size, p2m_granule_pfn);;
++ p2m_initialized = 0;
++ smp_mb();
++ ia64_ptr(0x2, p2m_itr_arg.vaddr, p2m_itr_arg.log_page_size);
++
++ /*
++ * We can't call those clean up functions because they
++ * require process context.
++ */
++#if 0
++#ifdef CONFIG_XEN_IA64_EXPOSE_P2M_USE_DTR
++ if (xen_ia64_p2m_expose_use_dtr)
++ unregister_cpu_notifier(
++ &p2m_expose_dtr_hotplug_notifier);
++#endif
++ release_resource(&p2m_resource);
++#endif
++ }
++}
++
+//XXX inlinize?
+unsigned long
+p2m_phystomach(unsigned long gpfn)
@@ -25462,9 +25796,21 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ xen_ia64_release_resource(res);
+}
+EXPORT_SYMBOL_GPL(xen_ia64_unmap_resource);
++
++///////////////////////////////////////////////////////////////////////////
++// suspend/resume
++void
++xen_post_suspend(int suspend_cancelled)
++{
++ if (suspend_cancelled)
++ return;
++
++ p2m_expose_resume();
++ /* add more if necessary */
++}
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/mem.c tmp-linux-2.6-xen.patch/arch/ia64/xen/mem.c
--- pristine-linux-2.6.18/arch/ia64/xen/mem.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/mem.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/mem.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,75 @@
+/*
+ * Originally from linux/drivers/char/mem.c
@@ -25543,7 +25889,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/mem.c tmp-linux-2.6-xen.patch/arc
+}
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/util.c tmp-linux-2.6-xen.patch/arch/ia64/xen/util.c
--- pristine-linux-2.6.18/arch/ia64/xen/util.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/util.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/util.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,105 @@
+/******************************************************************************
+ * arch/ia64/xen/util.c
@@ -25652,7 +25998,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/util.c tmp-linux-2.6-xen.patch/ar
+ */
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_hcall.c tmp-linux-2.6-xen.patch/arch/ia64/xen/xcom_hcall.c
--- pristine-linux-2.6.18/arch/ia64/xen/xcom_hcall.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xcom_hcall.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xcom_hcall.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,383 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
@@ -26039,7 +26385,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_hcall.c tmp-linux-2.6-xen.pa
+}
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_mini.c tmp-linux-2.6-xen.patch/arch/ia64/xen/xcom_mini.c
--- pristine-linux-2.6.18/arch/ia64/xen/xcom_mini.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xcom_mini.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xcom_mini.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,456 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
@@ -26499,8 +26845,8 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_mini.c tmp-linux-2.6-xen.pat
+EXPORT_SYMBOL_GPL(xencomm_mini_hypercall_sched_op);
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.patch/arch/ia64/xen/xcom_privcmd.c
--- pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xcom_privcmd.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,664 @@
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xcom_privcmd.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,663 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
@@ -26832,40 +27178,39 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+static int
+xencomm_privcmd_acm_op(privcmd_hypercall_t *hypercall)
+{
-+ int cmd = hypercall->arg[0];
-+ void __user *arg = (void __user *)hypercall->arg[1];
++ void __user *arg = (void __user *)hypercall->arg[0];
++ xen_acmctl_t kern_arg;
+ struct xencomm_handle *op_desc;
+ struct xencomm_handle *desc = NULL;
+ int ret;
+
-+ switch (cmd) {
-+ case ACMOP_getssid:
-+ {
-+ struct acm_getssid kern_arg;
-+
-+ if (copy_from_user(&kern_arg, arg, sizeof (kern_arg)))
-+ return -EFAULT;
-+
++ if (copy_from_user(&kern_arg, arg, sizeof(kern_arg)))
++ return -EFAULT;
++ if (kern_arg.interface_version != ACM_INTERFACE_VERSION)
++ return -ENOSYS;
++
++ switch (kern_arg.cmd) {
++ case ACMOP_getssid: {
+ op_desc = xencomm_create_inline(&kern_arg);
+
-+ ret = xencomm_create(xen_guest_handle(kern_arg.ssidbuf),
-+ kern_arg.ssidbuf_size, &desc, GFP_KERNEL);
++ ret = xencomm_create(
++ xen_guest_handle(kern_arg.u.getssid.ssidbuf),
++ kern_arg.u.getssid.ssidbuf_size, &desc, GFP_KERNEL);
+ if (ret)
+ return ret;
+
-+ set_xen_guest_handle(kern_arg.ssidbuf, (void *)desc);
++ set_xen_guest_handle(kern_arg.u.getssid.ssidbuf, (void *)desc);
+
-+ ret = xencomm_arch_hypercall_acm_op(cmd, op_desc);
++ ret = xencomm_arch_hypercall_acm_op(op_desc);
+
+ xencomm_free(desc);
+
-+ if (copy_to_user(arg, &kern_arg, sizeof (kern_arg)))
++ if (copy_to_user(arg, &kern_arg, sizeof(kern_arg)))
+ return -EFAULT;
-+
+ return ret;
+ }
+ default:
-+ printk("%s: unknown acm_op cmd %d\n", __func__, cmd);
++ printk("%s: unknown acm_op cmd %d\n", __func__, kern_arg.cmd);
+ return -ENOSYS;
+ }
+
@@ -27167,7 +27512,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xencomm.c tmp-linux-2.6-xen.patch/arch/ia64/xen/xencomm.c
--- pristine-linux-2.6.18/arch/ia64/xen/xencomm.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xencomm.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xencomm.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,263 @@
+/*
+ * Copyright (C) 2006 Hollis Blanchard <hollisb@us.ibm.com>, IBM Corporation
@@ -27434,7 +27779,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xencomm.c tmp-linux-2.6-xen.patch
+}
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenentry.S tmp-linux-2.6-xen.patch/arch/ia64/xen/xenentry.S
--- pristine-linux-2.6.18/arch/ia64/xen/xenentry.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenentry.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenentry.S 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,931 @@
+/*
+ * ia64/xen/entry.S
@@ -28369,7 +28714,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenentry.S tmp-linux-2.6-xen.patc
+#endif
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenhpski.c tmp-linux-2.6-xen.patch/arch/ia64/xen/xenhpski.c
--- pristine-linux-2.6.18/arch/ia64/xen/xenhpski.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenhpski.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenhpski.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,19 @@
+
+extern unsigned long xen_get_cpuid(int);
@@ -28392,7 +28737,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenhpski.c tmp-linux-2.6-xen.patc
+
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenivt.S tmp-linux-2.6-xen.patch/arch/ia64/xen/xenivt.S
--- pristine-linux-2.6.18/arch/ia64/xen/xenivt.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenivt.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenivt.S 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,2177 @@
+/*
+ * arch/ia64/xen/ivt.S
@@ -30573,7 +30918,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenivt.S tmp-linux-2.6-xen.patch/
+#endif
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenminstate.h tmp-linux-2.6-xen.patch/arch/ia64/xen/xenminstate.h
--- pristine-linux-2.6.18/arch/ia64/xen/xenminstate.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenminstate.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenminstate.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,358 @@
+#include <asm/cache.h>
+
@@ -30935,7 +31280,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenminstate.h tmp-linux-2.6-xen.p
+#endif
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenpal.S tmp-linux-2.6-xen.patch/arch/ia64/xen/xenpal.S
--- pristine-linux-2.6.18/arch/ia64/xen/xenpal.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenpal.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xenpal.S 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,85 @@
+/*
+ * ia64/xen/xenpal.S
@@ -31024,7 +31369,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenpal.S tmp-linux-2.6-xen.patch/
+END(xen_pal_call_static)
diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xensetup.S tmp-linux-2.6-xen.patch/arch/ia64/xen/xensetup.S
--- pristine-linux-2.6.18/arch/ia64/xen/xensetup.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xensetup.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/ia64/xen/xensetup.S 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,52 @@
+/*
+ * Support routines for Xen
@@ -31080,7 +31425,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xensetup.S tmp-linux-2.6-xen.patc
+END(xencomm_arch_hypercall_suspend)
diff -Nurp pristine-linux-2.6.18/arch/um/kernel/physmem.c tmp-linux-2.6-xen.patch/arch/um/kernel/physmem.c
--- pristine-linux-2.6.18/arch/um/kernel/physmem.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/um/kernel/physmem.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/um/kernel/physmem.c 2007-10-11 00:15:26.000000000 -0700
@@ -226,7 +226,7 @@ EXPORT_SYMBOL(physmem_forget_descriptor)
EXPORT_SYMBOL(physmem_remove_mapping);
EXPORT_SYMBOL(physmem_subst_mapping);
@@ -31101,7 +31446,7 @@ diff -Nurp pristine-linux-2.6.18/arch/um/kernel/physmem.c tmp-linux-2.6-xen.patc
int is_remapped(void *virt)
diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arch/x86_64/Kconfig
--- pristine-linux-2.6.18/arch/x86_64/Kconfig 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/Kconfig 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/Kconfig 2007-10-11 00:15:26.000000000 -0700
@@ -135,6 +135,22 @@ config GENERIC_CPU
endchoice
@@ -31295,7 +31640,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
source "lib/Kconfig"
diff -Nurp pristine-linux-2.6.18/arch/x86_64/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/Makefile
--- pristine-linux-2.6.18/arch/x86_64/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -32,6 +32,10 @@ cflags-$(CONFIG_MK8) += $(call cc-option
cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
@@ -31339,7 +31684,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Makefile tmp-linux-2.6-xen.patch/ar
$(Q)$(MAKE) $(clean)=$(boot)
diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/ia32/Makefile
--- pristine-linux-2.6.18/arch/x86_64/ia32/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -27,9 +27,25 @@ quiet_cmd_syscall = SYSCALL $@
-Wl,-soname=linux-gate.so.1 -o $@ \
-Wl,-T,$(filter-out FORCE,$^)
@@ -31370,8 +31715,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/Makefile tmp-linux-2.6-xen.pat
+endif
diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-xen.patch/arch/x86_64/ia32/ia32entry-xen.S
--- pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/ia32entry-xen.S 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,743 @@
++++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/ia32entry-xen.S 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,755 @@
+/*
+ * Compatibility mode system call entry point for x86-64.
+ *
@@ -31414,6 +31759,18 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ movq %rax,R8(%rsp)
+ .endm
+
++ .macro LOAD_ARGS32 offset
++ movl \offset(%rsp),%r11d
++ movl \offset+8(%rsp),%r10d
++ movl \offset+16(%rsp),%r9d
++ movl \offset+24(%rsp),%r8d
++ movl \offset+40(%rsp),%ecx
++ movl \offset+48(%rsp),%edx
++ movl \offset+56(%rsp),%esi
++ movl \offset+64(%rsp),%edi
++ movl \offset+72(%rsp),%eax
++ .endm
++
+#if defined (__XEN_X86_64)
+#include "../kernel/xen_entry.S"
+
@@ -31545,7 +31902,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ movq $-ENOSYS,RAX(%rsp) /* really needed? */
+ movq %rsp,%rdi /* &pt_regs -> arg1 */
+ call syscall_trace_enter
-+ LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
++ LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
+ RESTORE_REST
+ movl %ebp, %ebp
+ /* no need to do an access_ok check here because rbp has been
@@ -31649,7 +32006,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ movq $-ENOSYS,RAX(%rsp) /* really needed? */
+ movq %rsp,%rdi /* &pt_regs -> arg1 */
+ call syscall_trace_enter
-+ LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
++ LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
+ RESTORE_REST
+ movl RSP-ARGOFFSET(%rsp), %r8d
+ /* no need to do an access_ok check here because r8 has been
@@ -31731,7 +32088,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ movq $-ENOSYS,RAX(%rsp) /* really needed? */
+ movq %rsp,%rdi /* &pt_regs -> arg1 */
+ call syscall_trace_enter
-+ LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
++ LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
+ RESTORE_REST
+ jmp ia32_do_syscall
+END(ia32_syscall)
@@ -32117,7 +32474,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ia32_syscall_end:
diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/syscall32-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/ia32/syscall32-xen.c
--- pristine-linux-2.6.18/arch/x86_64/ia32/syscall32-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/syscall32-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/syscall32-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,128 @@
+/* Copyright 2002,2003 Andi Kleen, SuSE Labs */
+
@@ -32249,7 +32606,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/syscall32-xen.c tmp-linux-2.6-
+}
diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/syscall32_syscall-xen.S tmp-linux-2.6-xen.patch/arch/x86_64/ia32/syscall32_syscall-xen.S
--- pristine-linux-2.6.18/arch/x86_64/ia32/syscall32_syscall-xen.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/syscall32_syscall-xen.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/syscall32_syscall-xen.S 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,28 @@
+/* 32bit VDSOs mapped into user space. */
+
@@ -32281,7 +32638,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/syscall32_syscall-xen.S tmp-li
+syscall32_sysenter_end:
diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/vsyscall-int80.S tmp-linux-2.6-xen.patch/arch/x86_64/ia32/vsyscall-int80.S
--- pristine-linux-2.6.18/arch/x86_64/ia32/vsyscall-int80.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/vsyscall-int80.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/vsyscall-int80.S 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,58 @@
+/*
+ * Code for the vsyscall page. This version uses the old int $0x80 method.
@@ -32343,7 +32700,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/vsyscall-int80.S tmp-linux-2.6
+#include "vsyscall-sigreturn.S"
diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/vsyscall-sigreturn.S tmp-linux-2.6-xen.patch/arch/x86_64/ia32/vsyscall-sigreturn.S
--- pristine-linux-2.6.18/arch/x86_64/ia32/vsyscall-sigreturn.S 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/vsyscall-sigreturn.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/vsyscall-sigreturn.S 2007-10-11 00:15:26.000000000 -0700
@@ -139,5 +139,5 @@ __kernel_rt_sigreturn:
.align 4
.LENDFDE3:
@@ -32353,7 +32710,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/vsyscall-sigreturn.S tmp-linux
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/kernel/Makefile
--- pristine-linux-2.6.18/arch/x86_64/kernel/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -21,11 +21,13 @@ obj-$(CONFIG_MICROCODE) += microcode.o
obj-$(CONFIG_X86_CPUID) += cpuid.o
obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o
@@ -32390,7 +32747,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/Makefile tmp-linux-2.6-xen.p
+endif
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/acpi/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/kernel/acpi/Makefile
--- pristine-linux-2.6.18/arch/x86_64/kernel/acpi/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/acpi/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/acpi/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -7,3 +7,4 @@ obj-y += processor.o
processor-y := ../../../i386/kernel/acpi/processor.o ../../../i386/kernel/acpi/cstate.o
endif
@@ -32398,7 +32755,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/acpi/Makefile tmp-linux-2.6-
+boot-$(CONFIG_XEN) := ../../../i386/kernel/acpi/boot-xen.o
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/apic-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/apic-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/apic-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/apic-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/apic-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,197 @@
+/*
+ * Local APIC handling, local APIC timers
@@ -32599,7 +32956,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/apic-xen.c tmp-linux-2.6-xen
+}
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/asm-offsets.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/asm-offsets.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/asm-offsets.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/asm-offsets.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/asm-offsets.c 2007-10-11 00:15:26.000000000 -0700
@@ -67,8 +67,10 @@ int main(void)
DEFINE(pbe_address, offsetof(struct pbe, address));
DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
@@ -32613,7 +32970,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/asm-offsets.c tmp-linux-2.6-
return 0;
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/crash.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/crash.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/crash.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/crash.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/crash.c 2007-10-11 00:15:26.000000000 -0700
@@ -92,6 +92,7 @@ static void crash_save_self(struct pt_re
crash_save_this_cpu(regs, cpu);
}
@@ -32649,7 +33006,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/crash.c tmp-linux-2.6-xen.pa
}
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/e820-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/e820-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/e820-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/e820-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/e820-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,774 @@
+/*
+ * Handle the memory map.
@@ -33427,7 +33784,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/e820-xen.c tmp-linux-2.6-xen
+}
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/early_printk-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/early_printk-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/early_printk-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/early_printk-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/early_printk-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,302 @@
+#include <linux/console.h>
+#include <linux/kernel.h>
@@ -33733,7 +34090,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/early_printk-xen.c tmp-linux
+__setup("earlyprintk=", setup_early_printk);
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/entry-xen.S tmp-linux-2.6-xen.patch/arch/x86_64/kernel/entry-xen.S
--- pristine-linux-2.6.18/arch/x86_64/kernel/entry-xen.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/entry-xen.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/entry-xen.S 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,1325 @@
+/*
+ * linux/arch/x86_64/entry.S
@@ -35062,7 +35419,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/entry-xen.S tmp-linux-2.6-xe
+#endif
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/genapic-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/genapic-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/genapic-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/genapic-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/genapic-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2004 James Cleverdon, IBM.
@@ -35209,7 +35566,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/genapic-xen.c tmp-linux-2.6-
+}
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/genapic_xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/genapic_xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/genapic_xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/genapic_xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/genapic_xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,161 @@
+/*
+ * Copyright 2004 James Cleverdon, IBM.
@@ -35374,7 +35731,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/genapic_xen.c tmp-linux-2.6-
+};
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/head-xen.S tmp-linux-2.6-xen.patch/arch/x86_64/kernel/head-xen.S
--- pristine-linux-2.6.18/arch/x86_64/kernel/head-xen.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/head-xen.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/head-xen.S 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,203 @@
+/*
+ * linux/arch/x86_64/kernel/head.S -- start in 32bit and switch to 64bit
@@ -35581,7 +35938,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/head-xen.S tmp-linux-2.6-xen
+ ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long, 1)
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/head64-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/head64-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/head64-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/head64-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/head64-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,162 @@
+/*
+ * linux/arch/x86_64/kernel/head64.c -- prepare to run common code
@@ -35747,7 +36104,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/head64-xen.c tmp-linux-2.6-x
+}
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/init_task.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/init_task.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/init_task.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/init_task.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/init_task.c 2007-10-11 00:15:26.000000000 -0700
@@ -37,6 +37,8 @@ union thread_union init_thread_union
struct task_struct init_task = INIT_TASK(init_task);
@@ -35766,7 +36123,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/init_task.c tmp-linux-2.6-xe
#define ALIGN_TO_4K __attribute__((section(".data.init_task")))
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/io_apic-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/io_apic-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/io_apic-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/io_apic-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/io_apic-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,2269 @@
+/*
+ * Intel IO-APIC support for multi-Pentium hosts.
@@ -38039,7 +38396,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/io_apic-xen.c tmp-linux-2.6-
+#endif /* !CONFIG_XEN */
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/ioport-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/ioport-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/ioport-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/ioport-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/ioport-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,99 @@
+/*
+ * linux/arch/x86_64/kernel/ioport.c
@@ -38142,7 +38499,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/ioport-xen.c tmp-linux-2.6-x
+}
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/irq-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/irq-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/irq-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/irq-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/irq-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,197 @@
+/*
+ * linux/arch/x86_64/kernel/irq.c
@@ -38343,7 +38700,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/irq-xen.c tmp-linux-2.6-xen.
+#endif
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/ldt-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/ldt-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/ldt-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/ldt-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/ldt-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,282 @@
+/*
+ * linux/arch/x86_64/kernel/ldt.c
@@ -38629,7 +38986,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/ldt-xen.c tmp-linux-2.6-xen.
+}
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/machine_kexec.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/machine_kexec.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/machine_kexec.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/machine_kexec.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/machine_kexec.c 2007-10-11 00:15:26.000000000 -0700
@@ -15,6 +15,113 @@
#include <asm/mmu_context.h>
#include <asm/io.h>
@@ -38950,7 +39307,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/machine_kexec.c tmp-linux-2.
+#endif
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/mpparse-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/mpparse-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/mpparse-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/mpparse-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/mpparse-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,1011 @@
+/*
+ * Intel Multiprocessor Specification 1.1 and 1.4
@@ -39965,7 +40322,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/mpparse-xen.c tmp-linux-2.6-
+#endif /*CONFIG_ACPI*/
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/pci-swiotlb-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/pci-swiotlb-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/pci-swiotlb-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/pci-swiotlb-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/pci-swiotlb-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,55 @@
+/* Glue code to lib/swiotlb.c */
+
@@ -40024,7 +40381,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/pci-swiotlb-xen.c tmp-linux-
+}
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/process-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/process-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/process-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/process-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/process-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,829 @@
+/*
+ * linux/arch/x86-64/kernel/process.c
@@ -40857,7 +41214,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/process-xen.c tmp-linux-2.6-
+#endif
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/relocate_kernel.S tmp-linux-2.6-xen.patch/arch/x86_64/kernel/relocate_kernel.S
--- pristine-linux-2.6.18/arch/x86_64/kernel/relocate_kernel.S 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/relocate_kernel.S 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/relocate_kernel.S 2007-10-15 11:42:06.000000000 -0700
@@ -7,31 +7,195 @@
*/
@@ -41096,8 +41453,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/relocate_kernel.S tmp-linux-
+ .quad 0 /* base */
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup-xen.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,1650 @@
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup-xen.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,1677 @@
+/*
+ * linux/arch/x86-64/kernel/setup.c
+ *
@@ -41892,6 +42249,33 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xe
+#ifdef CONFIG_XEN
+ {
+ int i, j, k, fpp;
++ unsigned long p2m_pages;
++
++ p2m_pages = end_pfn;
++ if (xen_start_info->nr_pages > end_pfn) {
++ /*
++ * the end_pfn was shrunk (probably by mem= or highmem=
++ * kernel parameter); shrink reservation with the HV
++ */
++ struct xen_memory_reservation reservation = {
++ .address_bits = 0,
++ .extent_order = 0,
++ .domid = DOMID_SELF
++ };
++ unsigned int difference;
++ int ret;
++
++ difference = xen_start_info->nr_pages - end_pfn;
++
++ set_xen_guest_handle(reservation.extent_start,
++ ((unsigned long *)xen_start_info->mfn_list) + end_pfn);
++ reservation.nr_extents = difference;
++ ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation,
++ &reservation);
++ BUG_ON (ret != difference);
++ }
++ else if (end_pfn > xen_start_info->nr_pages)
++ p2m_pages = xen_start_info->nr_pages;
+
+ if (!xen_feature(XENFEAT_auto_translated_physmap)) {
+ /* Make sure we have a large enough P->M table. */
@@ -41901,7 +42285,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xe
+ end_pfn * sizeof(unsigned long));
+ memcpy(phys_to_machine_mapping,
+ (unsigned long *)xen_start_info->mfn_list,
-+ xen_start_info->nr_pages * sizeof(unsigned long));
++ p2m_pages * sizeof(unsigned long));
+ free_bootmem(
+ __pa(xen_start_info->mfn_list),
+ PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
@@ -42750,7 +43134,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xe
+#endif
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup64-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup64-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/setup64-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup64-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup64-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,361 @@
+/*
+ * X86-64 specific CPU setup.
@@ -43115,7 +43499,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup64-xen.c tmp-linux-2.6-
+}
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/smp-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/smp-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/smp-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/smp-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/smp-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,600 @@
+/*
+ * Intel SMP support routines.
@@ -43719,7 +44103,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/smp-xen.c tmp-linux-2.6-xen.
+}
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/traps-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/traps-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/traps-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/traps-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/traps-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,1175 @@
+/*
+ * linux/arch/x86-64/traps.c
@@ -44898,7 +45282,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/traps-xen.c tmp-linux-2.6-xe
+#endif
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/vmlinux.lds.S tmp-linux-2.6-xen.patch/arch/x86_64/kernel/vmlinux.lds.S
--- pristine-linux-2.6.18/arch/x86_64/kernel/vmlinux.lds.S 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/vmlinux.lds.S 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/vmlinux.lds.S 2007-10-15 11:42:06.000000000 -0700
@@ -13,6 +13,13 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86
OUTPUT_ARCH(i386:x86-64)
ENTRY(phys_startup_64)
@@ -44983,7 +45367,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/vmlinux.lds.S tmp-linux-2.6-
}
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/vsyscall-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/vsyscall-xen.c
--- pristine-linux-2.6.18/arch/x86_64/kernel/vsyscall-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/vsyscall-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/vsyscall-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,239 @@
+/*
+ * linux/arch/x86_64/kernel/vsyscall.c
@@ -45226,7 +45610,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/vsyscall-xen.c tmp-linux-2.6
+__initcall(vsyscall_init);
diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/xen_entry.S tmp-linux-2.6-xen.patch/arch/x86_64/kernel/xen_entry.S
--- pristine-linux-2.6.18/arch/x86_64/kernel/xen_entry.S 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/xen_entry.S 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/xen_entry.S 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,40 @@
+/*
+ * Copied from arch/xen/i386/kernel/entry.S
@@ -45270,7 +45654,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/xen_entry.S tmp-linux-2.6-xe
+
diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/mm/Makefile
--- pristine-linux-2.6.18/arch/x86_64/mm/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/mm/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/mm/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -9,3 +9,13 @@ obj-$(CONFIG_K8_NUMA) += k8topology.o
obj-$(CONFIG_ACPI_NUMA) += srat.o
@@ -45287,7 +45671,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/Makefile tmp-linux-2.6-xen.patch
+endif
diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/fault-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/mm/fault-xen.c
--- pristine-linux-2.6.18/arch/x86_64/mm/fault-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/mm/fault-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/mm/fault-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,724 @@
+/*
+ * linux/arch/x86-64/mm/fault.c
@@ -46015,8 +46399,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/fault-xen.c tmp-linux-2.6-xen.pa
+__setup("pagefaulttrace", enable_pagefaulttrace);
diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/mm/init-xen.c
--- pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/mm/init-xen.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,1241 @@
++++ tmp-linux-2.6-xen.patch/arch/x86_64/mm/init-xen.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,1238 @@
+/*
+ * linux/arch/x86_64/mm/init.c
+ *
@@ -46498,18 +46882,15 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+ pte = alloc_static_page(&pte_phys);
+ pte_save = pte;
+ for (k = 0; k < PTRS_PER_PTE; pte++, k++, address += PTE_SIZE) {
++ unsigned long pteval = address | _PAGE_NX | _KERNPG_TABLE;
++
+ if ((address >= end) ||
+ ((address >> PAGE_SHIFT) >=
-+ xen_start_info->nr_pages)) {
-+ __set_pte(pte, __pte(0));
-+ continue;
-+ }
-+ if (make_readonly(address)) {
-+ __set_pte(pte,
-+ __pte(address | (_KERNPG_TABLE & ~_PAGE_RW)));
-+ continue;
-+ }
-+ __set_pte(pte, __pte(address | _KERNPG_TABLE));
++ xen_start_info->nr_pages))
++ pteval = 0;
++ else if (make_readonly(address))
++ pteval &= ~_PAGE_RW;
++ __set_pte(pte, __pte(pteval & __supported_pte_mask));
+ }
+ pte = pte_save;
+ early_make_page_readonly(pte, XENFEAT_writable_page_tables);
@@ -46599,7 +46980,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+
+ /* Construct mapping of initial pte page in our own directories. */
+ init_level4_pgt[pgd_index(__START_KERNEL_map)] =
-+ mk_kernel_pgd(__pa_symbol(level3_kernel_pgt));
++ __pgd(__pa_symbol(level3_kernel_pgt) | _PAGE_TABLE);
+ level3_kernel_pgt[pud_index(__START_KERNEL_map)] =
+ __pud(__pa_symbol(level2_kernel_pgt) |
+ _KERNPG_TABLE);
@@ -47260,7 +47641,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+}
diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/pageattr-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/mm/pageattr-xen.c
--- pristine-linux-2.6.18/arch/x86_64/mm/pageattr-xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/mm/pageattr-xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/mm/pageattr-xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,433 @@
+/*
+ * Copyright 2002 Andi Kleen, SuSE Labs.
@@ -47697,7 +48078,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/pageattr-xen.c tmp-linux-2.6-xen
+EXPORT_SYMBOL(global_flush_tlb);
diff -Nurp pristine-linux-2.6.18/arch/x86_64/oprofile/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/oprofile/Makefile
--- pristine-linux-2.6.18/arch/x86_64/oprofile/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/oprofile/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/oprofile/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -11,9 +11,15 @@ DRIVER_OBJS = $(addprefix ../../../drive
oprofilefs.o oprofile_stats.o \
timer_int.o )
@@ -47718,7 +48099,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/oprofile/Makefile tmp-linux-2.6-xen
+ $(addprefix ../../i386/oprofile/, $(OPROFILE-y))
diff -Nurp pristine-linux-2.6.18/arch/x86_64/pci/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/pci/Makefile
--- pristine-linux-2.6.18/arch/x86_64/pci/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/pci/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/arch/x86_64/pci/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -15,11 +15,23 @@ obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o
obj-$(CONFIG_NUMA) += k8-bus.o
@@ -47745,7 +48126,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/pci/Makefile tmp-linux-2.6-xen.patc
+endif
diff -Nurp pristine-linux-2.6.18/drivers/Makefile tmp-linux-2.6-xen.patch/drivers/Makefile
--- pristine-linux-2.6.18/drivers/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -31,6 +31,7 @@ obj-y += base/ block/ misc/ mfd/ net/
obj-$(CONFIG_NUBUS) += nubus/
obj-$(CONFIG_ATM) += atm/
@@ -47756,7 +48137,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/Makefile tmp-linux-2.6-xen.patch/driver
obj-$(CONFIG_SCSI) += scsi/
diff -Nurp pristine-linux-2.6.18/drivers/acpi/Kconfig tmp-linux-2.6-xen.patch/drivers/acpi/Kconfig
--- pristine-linux-2.6.18/drivers/acpi/Kconfig 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/acpi/Kconfig 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/acpi/Kconfig 2007-10-11 00:15:26.000000000 -0700
@@ -45,7 +45,7 @@ if ACPI
config ACPI_SLEEP
@@ -47776,7 +48157,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/acpi/Kconfig tmp-linux-2.6-xen.patch/dr
The Power Management Timer is available on all ACPI-capable,
diff -Nurp pristine-linux-2.6.18/drivers/char/mem.c tmp-linux-2.6-xen.patch/drivers/char/mem.c
--- pristine-linux-2.6.18/drivers/char/mem.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/char/mem.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/char/mem.c 2007-10-11 00:15:26.000000000 -0700
@@ -101,6 +101,7 @@ static inline int valid_mmap_phys_addr_r
}
#endif
@@ -47813,7 +48194,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/mem.c tmp-linux-2.6-xen.patch/driv
.llseek = memory_lseek,
diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/Kconfig tmp-linux-2.6-xen.patch/drivers/char/tpm/Kconfig
--- pristine-linux-2.6.18/drivers/char/tpm/Kconfig 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/char/tpm/Kconfig 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/char/tpm/Kconfig 2007-10-11 00:15:26.000000000 -0700
@@ -58,5 +58,13 @@ config TCG_INFINEON
Further information on this driver and the supported hardware
can be found at http://www.prosec.rub.de/tpm
@@ -47831,7 +48212,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/Kconfig tmp-linux-2.6-xen.patc
+endmenu
diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/Makefile tmp-linux-2.6-xen.patch/drivers/char/tpm/Makefile
--- pristine-linux-2.6.18/drivers/char/tpm/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/char/tpm/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/char/tpm/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -9,3 +9,5 @@ obj-$(CONFIG_TCG_TIS) += tpm_tis.o
obj-$(CONFIG_TCG_NSC) += tpm_nsc.o
obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o
@@ -47840,7 +48221,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/Makefile tmp-linux-2.6-xen.pat
+tpm_xenu-y = tpm_xen.o tpm_vtpm.o
diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/tpm.h tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm.h
--- pristine-linux-2.6.18/drivers/char/tpm/tpm.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm.h 2007-10-11 00:15:26.000000000 -0700
@@ -105,6 +105,9 @@ struct tpm_chip {
struct dentry **bios_dir;
@@ -47872,7 +48253,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/tpm.h tmp-linux-2.6-xen.patch/
extern void tpm_continue_selftest(struct tpm_chip *);
diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/tpm_vtpm.c tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm_vtpm.c
--- pristine-linux-2.6.18/drivers/char/tpm/tpm_vtpm.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm_vtpm.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm_vtpm.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,542 @@
+/*
+ * Copyright (C) 2006 IBM Corporation
@@ -48418,7 +48799,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/tpm_vtpm.c tmp-linux-2.6-xen.p
+}
diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/tpm_vtpm.h tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm_vtpm.h
--- pristine-linux-2.6.18/drivers/char/tpm/tpm_vtpm.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm_vtpm.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm_vtpm.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,55 @@
+#ifndef TPM_VTPM_H
+#define TPM_VTPM_H
@@ -48477,7 +48858,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/tpm_vtpm.h tmp-linux-2.6-xen.p
+#endif
diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/tpm_xen.c tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm_xen.c
--- pristine-linux-2.6.18/drivers/char/tpm/tpm_xen.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm_xen.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/char/tpm/tpm_xen.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,720 @@
+/*
+ * Copyright (c) 2005, IBM Corporation
@@ -49201,7 +49582,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/tpm_xen.c tmp-linux-2.6-xen.pa
+MODULE_LICENSE("Dual BSD/GPL");
diff -Nurp pristine-linux-2.6.18/drivers/char/tty_io.c tmp-linux-2.6-xen.patch/drivers/char/tty_io.c
--- pristine-linux-2.6.18/drivers/char/tty_io.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/char/tty_io.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/char/tty_io.c 2007-10-11 00:15:26.000000000 -0700
@@ -130,6 +130,8 @@ LIST_HEAD(tty_drivers); /* linked list
vt.c for deeply disgusting hack reasons */
DEFINE_MUTEX(tty_mutex);
@@ -49239,7 +49620,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tty_io.c tmp-linux-2.6-xen.patch/d
}
diff -Nurp pristine-linux-2.6.18/drivers/firmware/Kconfig tmp-linux-2.6-xen.patch/drivers/firmware/Kconfig
--- pristine-linux-2.6.18/drivers/firmware/Kconfig 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/firmware/Kconfig 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/firmware/Kconfig 2007-10-11 00:15:26.000000000 -0700
@@ -8,6 +8,7 @@ menu "Firmware Drivers"
config EDD
tristate "BIOS Enhanced Disk Drive calls determine boot disk"
@@ -49250,7 +49631,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/firmware/Kconfig tmp-linux-2.6-xen.patc
Services real mode BIOS calls to determine which disk
diff -Nurp pristine-linux-2.6.18/drivers/ide/ide-lib.c tmp-linux-2.6-xen.patch/drivers/ide/ide-lib.c
--- pristine-linux-2.6.18/drivers/ide/ide-lib.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/ide/ide-lib.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/ide/ide-lib.c 2007-10-15 11:42:06.000000000 -0700
@@ -408,10 +408,10 @@ void ide_toggle_bounce(ide_drive_t *driv
{
u64 addr = BLK_BOUNCE_HIGH; /* dma64_addr_t */
@@ -49268,7 +49649,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/ide/ide-lib.c tmp-linux-2.6-xen.patch/d
diff -Nurp pristine-linux-2.6.18/drivers/oprofile/buffer_sync.c tmp-linux-2.6-xen.patch/drivers/oprofile/buffer_sync.c
--- pristine-linux-2.6.18/drivers/oprofile/buffer_sync.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/oprofile/buffer_sync.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/oprofile/buffer_sync.c 2007-10-15 11:42:06.000000000 -0700
@@ -6,6 +6,10 @@
*
* @author John Levon <levon@movementarian.org>
@@ -49438,7 +49819,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/buffer_sync.c tmp-linux-2.6-xe
mutex_unlock(&buffer_mutex);
diff -Nurp pristine-linux-2.6.18/drivers/oprofile/cpu_buffer.c tmp-linux-2.6-xen.patch/drivers/oprofile/cpu_buffer.c
--- pristine-linux-2.6.18/drivers/oprofile/cpu_buffer.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/oprofile/cpu_buffer.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/oprofile/cpu_buffer.c 2007-10-15 11:42:06.000000000 -0700
@@ -6,6 +6,10 @@
*
* @author John Levon <levon@movementarian.org>
@@ -49549,7 +49930,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/cpu_buffer.c tmp-linux-2.6-xen
* the task mortuary progresses
diff -Nurp pristine-linux-2.6.18/drivers/oprofile/cpu_buffer.h tmp-linux-2.6-xen.patch/drivers/oprofile/cpu_buffer.h
--- pristine-linux-2.6.18/drivers/oprofile/cpu_buffer.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/oprofile/cpu_buffer.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/oprofile/cpu_buffer.h 2007-10-15 11:42:06.000000000 -0700
@@ -36,7 +36,7 @@ struct oprofile_cpu_buffer {
volatile unsigned long tail_pos;
unsigned long buffer_size;
@@ -49574,7 +49955,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/cpu_buffer.h tmp-linux-2.6-xen
#endif /* OPROFILE_CPU_BUFFER_H */
diff -Nurp pristine-linux-2.6.18/drivers/oprofile/event_buffer.h tmp-linux-2.6-xen.patch/drivers/oprofile/event_buffer.h
--- pristine-linux-2.6.18/drivers/oprofile/event_buffer.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/oprofile/event_buffer.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/oprofile/event_buffer.h 2007-10-15 11:42:06.000000000 -0700
@@ -29,15 +29,20 @@ void wake_up_buffer_waiter(void);
#define CPU_SWITCH_CODE 2
#define COOKIE_SWITCH_CODE 3
@@ -49599,7 +49980,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/event_buffer.h tmp-linux-2.6-x
diff -Nurp pristine-linux-2.6.18/drivers/oprofile/oprof.c tmp-linux-2.6-xen.patch/drivers/oprofile/oprof.c
--- pristine-linux-2.6.18/drivers/oprofile/oprof.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/oprofile/oprof.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/oprofile/oprof.c 2007-10-15 11:42:06.000000000 -0700
@@ -5,6 +5,10 @@
* @remark Read the file COPYING
*
@@ -49655,7 +50036,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/oprof.c tmp-linux-2.6-xen.patc
int err;
diff -Nurp pristine-linux-2.6.18/drivers/oprofile/oprof.h tmp-linux-2.6-xen.patch/drivers/oprofile/oprof.h
--- pristine-linux-2.6.18/drivers/oprofile/oprof.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/oprofile/oprof.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/oprofile/oprof.h 2007-10-15 11:42:06.000000000 -0700
@@ -35,5 +35,8 @@ void oprofile_create_files(struct super_
void oprofile_timer_init(struct oprofile_operations * ops);
@@ -49667,7 +50048,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/oprof.h tmp-linux-2.6-xen.patc
#endif /* OPROF_H */
diff -Nurp pristine-linux-2.6.18/drivers/oprofile/oprofile_files.c tmp-linux-2.6-xen.patch/drivers/oprofile/oprofile_files.c
--- pristine-linux-2.6.18/drivers/oprofile/oprofile_files.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/oprofile/oprofile_files.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/oprofile/oprofile_files.c 2007-10-15 11:42:06.000000000 -0700
@@ -5,15 +5,21 @@
* @remark Read the file COPYING
*
@@ -49897,7 +50278,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/oprofile_files.c tmp-linux-2.6
oprofilefs_create_ulong(sb, root, "buffer_watershed", &fs_buffer_watershed);
diff -Nurp pristine-linux-2.6.18/drivers/pci/Kconfig tmp-linux-2.6-xen.patch/drivers/pci/Kconfig
--- pristine-linux-2.6.18/drivers/pci/Kconfig 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/pci/Kconfig 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/pci/Kconfig 2007-10-11 00:15:26.000000000 -0700
@@ -5,6 +5,7 @@ config PCI_MSI
bool "Message Signaled Interrupts (MSI and MSI-X)"
depends on PCI
@@ -49908,7 +50289,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/pci/Kconfig tmp-linux-2.6-xen.patch/dri
Interrupts). Message Signaled Interrupts enable a device to
diff -Nurp pristine-linux-2.6.18/drivers/serial/Kconfig tmp-linux-2.6-xen.patch/drivers/serial/Kconfig
--- pristine-linux-2.6.18/drivers/serial/Kconfig 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/serial/Kconfig 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/serial/Kconfig 2007-10-11 00:15:26.000000000 -0700
@@ -11,6 +11,7 @@ menu "Serial drivers"
config SERIAL_8250
tristate "8250/16550 and compatible serial support"
@@ -49919,7 +50300,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/serial/Kconfig tmp-linux-2.6-xen.patch/
This selects whether you want to include the driver for the standard
diff -Nurp pristine-linux-2.6.18/drivers/video/console/Kconfig tmp-linux-2.6-xen.patch/drivers/video/console/Kconfig
--- pristine-linux-2.6.18/drivers/video/console/Kconfig 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/drivers/video/console/Kconfig 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/video/console/Kconfig 2007-10-11 00:15:26.000000000 -0700
@@ -53,6 +53,7 @@ config VGACON_SOFT_SCROLLBACK_SIZE
config VIDEO_SELECT
bool "Video mode selection support"
@@ -49930,8 +50311,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/video/console/Kconfig tmp-linux-2.6-xen
you want to take advantage of some high-resolution text mode your
diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/drivers/xen/Kconfig
--- pristine-linux-2.6.18/drivers/xen/Kconfig 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/Kconfig 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,260 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/Kconfig 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,277 @@
+#
+# This Kconfig describe xen options
+#
@@ -50043,7 +50424,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+choice
+ prompt "PCI Backend Mode"
+ depends on XEN_PCIDEV_BACKEND
-+ default XEN_PCIDEV_BACKEND_VPCI
++ default XEN_PCIDEV_BACKEND_VPCI if !IA64
++ default XEN_PCIDEV_BACKEND_CONTROLLER if IA64
+
+config XEN_PCIDEV_BACKEND_VPCI
+ bool "Virtual PCI"
@@ -50072,6 +50454,21 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+ For example, a device at 03:05.2 will be re-assigned to 00:00.0. A
+ second device at 02:1a.1 will be re-assigned to 00:01.0.
+
++config XEN_PCIDEV_BACKEND_CONTROLLER
++ bool "Controller"
++ depends on IA64
++ ---help---
++ This PCI backend virtualizes the PCI bus topology by providing a
++ virtual bus per PCI root device. Devices which are physically under
++ the same root bus will appear on the same virtual bus. For systems
++ with complex I/O addressing, this is the only backend which supports
++ extended I/O port spaces and MMIO translation offsets. This backend
++ also supports slot virtualization. For example, a device at
++ 0000:01:02.1 will be re-assigned to 0000:00:00.0. A second device
++ at 0000:02:05.0 (behind a P2P bridge on bus 0000:01) will be
++ re-assigned to 0000:00:01.0. A third device at 0000:16:05.0 (under
++ a different PCI root bus) will be re-assigned to 0000:01:00.0.
++
+endchoice
+
+config XEN_PCIDEV_BE_DEBUG
@@ -50150,6 +50547,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+config XEN_SYSFS
+ tristate "Export Xen attributes in sysfs"
+ depends on SYSFS
++ select SYS_HYPERVISOR
+ default y
+ help
+ Xen hypervisor attributes will show up under /sys/hypervisor/.
@@ -50194,7 +50592,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+endif
diff -Nurp pristine-linux-2.6.18/drivers/xen/Makefile tmp-linux-2.6-xen.patch/drivers/xen/Makefile
--- pristine-linux-2.6.18/drivers/xen/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,20 @@
+obj-y += core/
+obj-y += console/
@@ -50218,13 +50616,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Makefile tmp-linux-2.6-xen.patch/dr
+obj-$(CONFIG_XEN_KEYBOARD) += fbfront/
diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/Makefile tmp-linux-2.6-xen.patch/drivers/xen/balloon/Makefile
--- pristine-linux-2.6.18/drivers/xen/balloon/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/balloon/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/balloon/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,2 @@
+
+obj-y := balloon.o sysfs.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen.patch/drivers/xen/balloon/balloon.c
--- pristine-linux-2.6.18/drivers/xen/balloon/balloon.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/balloon/balloon.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/balloon/balloon.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,663 @@
+/******************************************************************************
+ * balloon.c
@@ -50891,7 +51289,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen
+MODULE_LICENSE("Dual BSD/GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/common.h tmp-linux-2.6-xen.patch/drivers/xen/balloon/common.h
--- pristine-linux-2.6.18/drivers/xen/balloon/common.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/balloon/common.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/balloon/common.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * balloon/common.h
@@ -50953,7 +51351,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/common.h tmp-linux-2.6-xen.
+#endif /* __XEN_BALLOON_COMMON_H__ */
diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/sysfs.c tmp-linux-2.6-xen.patch/drivers/xen/balloon/sysfs.c
--- pristine-linux-2.6.18/drivers/xen/balloon/sysfs.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/balloon/sysfs.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/balloon/sysfs.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,170 @@
+/******************************************************************************
+ * balloon/sysfs.c
@@ -51127,15 +51525,15 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/sysfs.c tmp-linux-2.6-xen.p
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/Makefile tmp-linux-2.6-xen.patch/drivers/xen/blkback/Makefile
--- pristine-linux-2.6.18/drivers/xen/blkback/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,3 @@
+obj-$(CONFIG_XEN_BLKDEV_BACKEND) := blkbk.o
+
+blkbk-y := blkback.o xenbus.o interface.o vbd.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/blkback.c
--- pristine-linux-2.6.18/drivers/xen/blkback/blkback.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/blkback.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,614 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/blkback.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,617 @@
+/******************************************************************************
+ * arch/xen/drivers/blkif/backend/main.c
+ *
@@ -51346,6 +51744,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen
+ printk(KERN_DEBUG "%s: started\n", current->comm);
+
+ while (!kthread_should_stop()) {
++ if (try_to_freeze())
++ continue;
++
+ wait_event_interruptible(
+ blkif->wq,
+ blkif->waiting_reqs || kthread_should_stop());
@@ -51752,7 +52153,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen
+MODULE_LICENSE("Dual BSD/GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/common.h tmp-linux-2.6-xen.patch/drivers/xen/blkback/common.h
--- pristine-linux-2.6.18/drivers/xen/blkback/common.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/common.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/common.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,139 @@
+/*
+ * This program is free software; you can redistribute it and/or
@@ -51895,7 +52296,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/common.h tmp-linux-2.6-xen.
+#endif /* __BLKIF__BACKEND__COMMON_H__ */
diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/interface.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/interface.c
--- pristine-linux-2.6.18/drivers/xen/blkback/interface.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/interface.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/interface.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,181 @@
+/******************************************************************************
+ * arch/xen/drivers/blkif/backend/interface.c
@@ -52080,7 +52481,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/interface.c tmp-linux-2.6-x
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/vbd.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/vbd.c
--- pristine-linux-2.6.18/drivers/xen/blkback/vbd.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/vbd.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/vbd.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,118 @@
+/******************************************************************************
+ * blkback/vbd.c
@@ -52202,7 +52603,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/vbd.c tmp-linux-2.6-xen.pat
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/xenbus.c
--- pristine-linux-2.6.18/drivers/xen/blkback/xenbus.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/xenbus.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/xenbus.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,533 @@
+/* Xenbus code for blkif backend
+ Copyright (C) 2005 Rusty Russell <rusty@rustcorp.com.au>
@@ -52315,7 +52716,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/xenbus.c tmp-linux-2.6-xen.
+ \
+ return sprintf(buf, format, ##args); \
+ } \
-+ DEVICE_ATTR(name, S_IRUGO, show_##name, NULL)
++ static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL)
+
+VBD_SHOW(oo_req, "%d\n", be->blkif->st_oo_req);
+VBD_SHOW(rd_req, "%d\n", be->blkif->st_rd_req);
@@ -52379,6 +52780,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/xenbus.c tmp-linux-2.6-xen.
+
+ DPRINTK("");
+
++ if (be->major || be->minor)
++ xenvbd_sysfs_delif(dev);
++
+ if (be->backend_watch.node) {
+ unregister_xenbus_watch(&be->backend_watch);
+ kfree(be->backend_watch.node);
@@ -52392,9 +52796,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/xenbus.c tmp-linux-2.6-xen.
+ be->blkif = NULL;
+ }
+
-+ if (be->major || be->minor)
-+ xenvbd_sysfs_delif(dev);
-+
+ kfree(be);
+ dev->dev.driver_data = NULL;
+ return 0;
@@ -52739,7 +53140,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/xenbus.c tmp-linux-2.6-xen.
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/Makefile tmp-linux-2.6-xen.patch/drivers/xen/blkfront/Makefile
--- pristine-linux-2.6.18/drivers/xen/blkfront/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,5 @@
+
+obj-$(CONFIG_XEN_BLKDEV_FRONTEND) := xenblk.o
@@ -52748,8 +53149,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/Makefile tmp-linux-2.6-xen
+
diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-xen.patch/drivers/xen/blkfront/blkfront.c
--- pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/blkfront.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,902 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/blkfront.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,912 @@
+/******************************************************************************
+ * blkfront.c
+ *
@@ -53106,6 +53507,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-x
+ spin_unlock_irq(&blkif_io_lock);
+
+ add_disk(info->gd);
++
++ info->is_ready = 1;
+}
+
+/**
@@ -53614,6 +54017,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-x
+ spin_unlock_irq(&blkif_io_lock);
+}
+
++int blkfront_is_ready(struct xenbus_device *dev)
++{
++ struct blkfront_info *info = dev->dev.driver_data;
++
++ return info->is_ready;
++}
++
+
+/* ** Driver Registration ** */
+
@@ -53622,7 +54032,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-x
+ { "vbd" },
+ { "" }
+};
-+
++MODULE_ALIAS("xen:vbd");
+
+static struct xenbus_driver blkfront = {
+ .name = "vbd",
@@ -53632,6 +54042,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-x
+ .remove = blkfront_remove,
+ .resume = blkfront_resume,
+ .otherend_changed = backend_changed,
++ .is_ready = blkfront_is_ready,
+};
+
+
@@ -53654,8 +54065,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-x
+MODULE_LICENSE("Dual BSD/GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/block.h tmp-linux-2.6-xen.patch/drivers/xen/blkfront/block.h
--- pristine-linux-2.6.18/drivers/xen/blkfront/block.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/block.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,142 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/block.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,143 @@
+/******************************************************************************
+ * block.h
+ *
@@ -53769,6 +54180,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/block.h tmp-linux-2.6-xen.
+ struct blk_shadow shadow[BLK_RING_SIZE];
+ unsigned long shadow_free;
+ int feature_barrier;
++ int is_ready;
+
+ /**
+ * The number of people holding this device open. We won't allow a
@@ -53800,8 +54212,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/block.h tmp-linux-2.6-xen.
+#endif /* __XEN_DRIVERS_BLOCK_H__ */
diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/vbd.c tmp-linux-2.6-xen.patch/drivers/xen/blkfront/vbd.c
--- pristine-linux-2.6.18/drivers/xen/blkfront/vbd.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/vbd.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,372 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/vbd.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,375 @@
+/******************************************************************************
+ * vbd.c
+ *
@@ -54017,6 +54429,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/vbd.c tmp-linux-2.6-xen.pa
+ /* Make sure buffer addresses are sector-aligned. */
+ blk_queue_dma_alignment(rq, 511);
+
++ /* Make sure we don't use bounce buffers. */
++ blk_queue_bounce_limit(rq, BLK_BOUNCE_ANY);
++
+ gd->queue = rq;
+
+ return 0;
@@ -54176,7 +54591,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/vbd.c tmp-linux-2.6-xen.pa
+#endif
diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/Makefile tmp-linux-2.6-xen.patch/drivers/xen/blktap/Makefile
--- pristine-linux-2.6.18/drivers/xen/blktap/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,5 @@
+LINUXINCLUDE += -I../xen/include/public/io
+
@@ -54185,8 +54600,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/Makefile tmp-linux-2.6-xen.p
+xenblktap-y := xenbus.o interface.o blktap.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.patch/drivers/xen/blktap/blktap.c
--- pristine-linux-2.6.18/drivers/xen/blktap/blktap.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/blktap.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,1528 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/blktap.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,1632 @@
+/******************************************************************************
+ * drivers/xen/blktap/blktap.c
+ *
@@ -54458,6 +54873,16 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ return INVALID_REQ;
+}
+
++static inline int OFFSET_TO_USR_IDX(int offset)
++{
++ return offset / BLKIF_MAX_SEGMENTS_PER_REQUEST;
++}
++
++static inline int OFFSET_TO_SEG(int offset)
++{
++ return offset % BLKIF_MAX_SEGMENTS_PER_REQUEST;
++}
++
+
+#define BLKTAP_INVALID_HANDLE(_g) \
+ (((_g->kernel) == INVALID_GRANT_HANDLE) && \
@@ -54484,8 +54909,91 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ return NOPAGE_SIGBUS;
+}
+
++static pte_t blktap_clear_pte(struct vm_area_struct *vma,
++ unsigned long uvaddr,
++ pte_t *ptep, int is_fullmm)
++{
++ pte_t copy;
++ tap_blkif_t *info;
++ int offset, seg, usr_idx, pending_idx, mmap_idx;
++ unsigned long uvstart = vma->vm_start + (RING_PAGES << PAGE_SHIFT);
++ unsigned long kvaddr;
++ struct page **map;
++ struct page *pg;
++ struct grant_handle_pair *khandle;
++ struct gnttab_unmap_grant_ref unmap[2];
++ int count = 0;
++
++ /*
++ * If the address is before the start of the grant mapped region or
++ * if vm_file is NULL (meaning mmap failed and we have nothing to do)
++ */
++ if (uvaddr < uvstart || vma->vm_file == NULL)
++ return ptep_get_and_clear_full(vma->vm_mm, uvaddr,
++ ptep, is_fullmm);
++
++ info = vma->vm_file->private_data;
++ map = vma->vm_private_data;
++
++ /* TODO Should these be changed to if statements? */
++ BUG_ON(!info);
++ BUG_ON(!info->idx_map);
++ BUG_ON(!map);
++
++ offset = (int) ((uvaddr - uvstart) >> PAGE_SHIFT);
++ usr_idx = OFFSET_TO_USR_IDX(offset);
++ seg = OFFSET_TO_SEG(offset);
++
++ pending_idx = MASK_PEND_IDX(ID_TO_IDX(info->idx_map[usr_idx]));
++ mmap_idx = ID_TO_MIDX(info->idx_map[usr_idx]);
++
++ kvaddr = idx_to_kaddr(mmap_idx, pending_idx, seg);
++ pg = pfn_to_page(__pa(kvaddr) >> PAGE_SHIFT);
++ ClearPageReserved(pg);
++ map[offset + RING_PAGES] = NULL;
++
++ khandle = &pending_handle(mmap_idx, pending_idx, seg);
++
++ if (khandle->kernel != INVALID_GRANT_HANDLE) {
++ gnttab_set_unmap_op(&unmap[count], kvaddr,
++ GNTMAP_host_map, khandle->kernel);
++ count++;
++
++ set_phys_to_machine(__pa(kvaddr) >> PAGE_SHIFT,
++ INVALID_P2M_ENTRY);
++ }
++
++ if (khandle->user != INVALID_GRANT_HANDLE) {
++ BUG_ON(xen_feature(XENFEAT_auto_translated_physmap));
++
++ copy = *ptep;
++ gnttab_set_unmap_op(&unmap[count], virt_to_machine(ptep),
++ GNTMAP_host_map
++ | GNTMAP_application_map
++ | GNTMAP_contains_pte,
++ khandle->user);
++ count++;
++ } else {
++ BUG_ON(!xen_feature(XENFEAT_auto_translated_physmap));
++
++ /* USING SHADOW PAGE TABLES. */
++ copy = ptep_get_and_clear_full(vma->vm_mm, uvaddr, ptep,
++ is_fullmm);
++ }
++
++ if (count) {
++ BLKTAP_INVALIDATE_HANDLE(khandle);
++ if (HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref,
++ unmap, count))
++ BUG();
++ }
++
++ return copy;
++}
++
+struct vm_operations_struct blktap_vm_ops = {
+ nopage: blktap_nopage,
++ zap_pte: blktap_clear_pte,
+};
+
+/******************************************************************
@@ -54666,6 +55174,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ info->idx_map = kmalloc(sizeof(unsigned long) * MAX_PENDING_REQS,
+ GFP_KERNEL);
+
++ if (info->idx_map == NULL)
++ goto fail_nomem;
++
+ if (idx > 0) {
+ init_waitqueue_head(&info->wait);
+ for (i = 0; i < MAX_PENDING_REQS; i++)
@@ -54699,16 +55210,25 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ zap_page_range(
+ info->vma, info->vma->vm_start,
+ info->vma->vm_end - info->vma->vm_start, NULL);
++
++ kfree(info->vma->vm_private_data);
++
+ info->vma = NULL;
+ }
-+
++
++ if (info->idx_map) {
++ kfree(info->idx_map);
++ info->idx_map = NULL;
++ }
++
+ if ( (info->status != CLEANSHUTDOWN) && (info->blkif != NULL) ) {
+ if (info->blkif->xenblkd != NULL) {
+ kthread_stop(info->blkif->xenblkd);
+ info->blkif->xenblkd = NULL;
+ }
+ info->status = CLEANSHUTDOWN;
-+ }
++ }
++
+ return 0;
+}
+
@@ -54779,6 +55299,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+
+ vma->vm_private_data = map;
+ vma->vm_flags |= VM_FOREIGN;
++ vma->vm_flags |= VM_DONTCOPY;
++
++#ifdef CONFIG_X86
++ vma->vm_mm->context.has_foreign_mappings = 1;
++#endif
+
+ info->vma = vma;
+ info->ring_ok = 1;
@@ -55059,6 +55584,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ MMAP_VADDR(info->user_vstart, u_idx, 0),
+ req->nr_pages << PAGE_SHIFT, NULL);
+ up_write(&info->vma->vm_mm->mmap_sem);
++ return;
+ }
+
+ mmap_idx = req->mem_idx;
@@ -55074,6 +55600,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ idx_to_kaddr(mmap_idx, k_idx, i),
+ GNTMAP_host_map, khandle->kernel);
+ invcount++;
++
++ set_phys_to_machine(
++ __pa(idx_to_kaddr(mmap_idx, k_idx, i))
++ >> PAGE_SHIFT, INVALID_P2M_ENTRY);
+ }
+
+ if (khandle->user != INVALID_GRANT_HANDLE) {
@@ -55131,6 +55661,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ printk(KERN_DEBUG "%s: started\n", current->comm);
+
+ while (!kthread_should_stop()) {
++ if (try_to_freeze())
++ continue;
++
+ wait_event_interruptible(
+ blkif->wq,
+ blkif->waiting_reqs || kthread_should_stop());
@@ -55365,7 +55898,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ unsigned int nseg;
+ int ret, i, nr_sects = 0;
+ tap_blkif_t *info;
-+ uint64_t sector;
+ blkif_request_t *target;
+ int pending_idx = RTN_PEND_IDX(pending_req,pending_req->mem_idx);
+ int usr_idx;
@@ -55422,19 +55954,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ uvaddr = MMAP_VADDR(info->user_vstart, usr_idx, i);
+ kvaddr = idx_to_kaddr(mmap_idx, pending_idx, i);
+
-+ sector = req->sector_number + ((PAGE_SIZE / 512) * i);
-+ if( (blkif->sectors > 0) && (sector >= blkif->sectors) ) {
-+ WPRINTK("BLKTAP: Sector request greater"
-+ "than size\n");
-+ WPRINTK("BLKTAP: %s request sector"
-+ "[%llu,%llu], Total [%llu]\n",
-+ (req->operation ==
-+ BLKIF_OP_WRITE ? "WRITE" : "READ"),
-+ (long long unsigned) sector,
-+ (long long unsigned) sector>>9,
-+ (long long unsigned) blkif->sectors);
-+ }
-+
+ flags = GNTMAP_host_map;
+ if (operation == WRITE)
+ flags |= GNTMAP_readonly;
@@ -55717,7 +56236,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+MODULE_LICENSE("Dual BSD/GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/common.h tmp-linux-2.6-xen.patch/drivers/xen/blktap/common.h
--- pristine-linux-2.6.18/drivers/xen/blktap/common.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/common.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/common.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,121 @@
+/*
+ * This program is free software; you can redistribute it and/or
@@ -55842,7 +56361,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/common.h tmp-linux-2.6-xen.p
+#endif /* __BLKIF__BACKEND__COMMON_H__ */
diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/interface.c tmp-linux-2.6-xen.patch/drivers/xen/blktap/interface.c
--- pristine-linux-2.6.18/drivers/xen/blktap/interface.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/interface.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/interface.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,174 @@
+/******************************************************************************
+ * drivers/xen/blktap/interface.c
@@ -56020,8 +56539,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/interface.c tmp-linux-2.6-xe
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/blktap/xenbus.c
--- pristine-linux-2.6.18/drivers/xen/blktap/xenbus.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/xenbus.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,473 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/xenbus.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,477 @@
+/* drivers/xen/blktap/xenbus.c
+ *
+ * Xenbus code for blktap
@@ -56138,7 +56657,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/xenbus.c tmp-linux-2.6-xen.p
+}
+
+/****************************************************************
-+ * sysfs interface for VBD I/O requests
++ * sysfs interface for I/O requests of blktap device
+ */
+
+#define VBD_SHOW(name, format, args...) \
@@ -56151,20 +56670,20 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/xenbus.c tmp-linux-2.6-xen.p
+ \
+ return sprintf(buf, format, ##args); \
+ } \
-+ DEVICE_ATTR(name, S_IRUGO, show_##name, NULL)
++ static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL)
+
-+VBD_SHOW(tap_oo_req, "%d\n", be->blkif->st_oo_req);
-+VBD_SHOW(tap_rd_req, "%d\n", be->blkif->st_rd_req);
-+VBD_SHOW(tap_wr_req, "%d\n", be->blkif->st_wr_req);
-+VBD_SHOW(tap_rd_sect, "%d\n", be->blkif->st_rd_sect);
-+VBD_SHOW(tap_wr_sect, "%d\n", be->blkif->st_wr_sect);
++VBD_SHOW(oo_req, "%d\n", be->blkif->st_oo_req);
++VBD_SHOW(rd_req, "%d\n", be->blkif->st_rd_req);
++VBD_SHOW(wr_req, "%d\n", be->blkif->st_wr_req);
++VBD_SHOW(rd_sect, "%d\n", be->blkif->st_rd_sect);
++VBD_SHOW(wr_sect, "%d\n", be->blkif->st_wr_sect);
+
+static struct attribute *tapstat_attrs[] = {
-+ &dev_attr_tap_oo_req.attr,
-+ &dev_attr_tap_rd_req.attr,
-+ &dev_attr_tap_wr_req.attr,
-+ &dev_attr_tap_rd_sect.attr,
-+ &dev_attr_tap_wr_sect.attr,
++ &dev_attr_oo_req.attr,
++ &dev_attr_rd_req.attr,
++ &dev_attr_wr_req.attr,
++ &dev_attr_rd_sect.attr,
++ &dev_attr_wr_sect.attr,
+ NULL
+};
+
@@ -56185,13 +56704,17 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/xenbus.c tmp-linux-2.6-xen.p
+
+void xentap_sysfs_delif(struct xenbus_device *dev)
+{
++ struct backend_info *be = dev->dev.driver_data;
+ sysfs_remove_group(&dev->dev.kobj, &tapstat_group);
++ be->group_added = 0;
+}
+
+static int blktap_remove(struct xenbus_device *dev)
+{
+ struct backend_info *be = dev->dev.driver_data;
+
++ if (be->group_added)
++ xentap_sysfs_delif(be->dev);
+ if (be->backend_watch.node) {
+ unregister_xenbus_watch(&be->backend_watch);
+ kfree(be->backend_watch.node);
@@ -56204,8 +56727,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/xenbus.c tmp-linux-2.6-xen.p
+ tap_blkif_free(be->blkif);
+ be->blkif = NULL;
+ }
-+ if (be->group_added)
-+ xentap_sysfs_delif(be->dev);
+ kfree(be);
+ dev->dev.driver_data = NULL;
+ return 0;
@@ -56236,11 +56757,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/xenbus.c tmp-linux-2.6-xen.p
+ return;
+ }
+
-+ err = xentap_sysfs_addif(blkif->be->dev);
-+ if (err) {
-+ xenbus_dev_fatal(blkif->be->dev, err,
-+ "creating sysfs entries");
-+ return;
++ if (!blkif->be->group_added) {
++ err = xentap_sysfs_addif(blkif->be->dev);
++ if (err) {
++ xenbus_dev_fatal(blkif->be->dev, err,
++ "creating sysfs entries");
++ return;
++ }
+ }
+
+ blkif->xenblkd = kthread_run(tap_blkif_schedule, blkif, name);
@@ -56497,13 +57020,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/xenbus.c tmp-linux-2.6-xen.p
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/char/Makefile tmp-linux-2.6-xen.patch/drivers/xen/char/Makefile
--- pristine-linux-2.6.18/drivers/xen/char/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/char/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/char/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,2 @@
+
+obj-y := mem.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/char/mem.c tmp-linux-2.6-xen.patch/drivers/xen/char/mem.c
--- pristine-linux-2.6.18/drivers/xen/char/mem.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/char/mem.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/char/mem.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,203 @@
+/*
+ * Originally from linux/drivers/char/mem.c
@@ -56710,13 +57233,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/char/mem.c tmp-linux-2.6-xen.patch/
+};
diff -Nurp pristine-linux-2.6.18/drivers/xen/console/Makefile tmp-linux-2.6-xen.patch/drivers/xen/console/Makefile
--- pristine-linux-2.6.18/drivers/xen/console/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/console/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/console/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,2 @@
+
+obj-y := console.o xencons_ring.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/console/console.c tmp-linux-2.6-xen.patch/drivers/xen/console/console.c
--- pristine-linux-2.6.18/drivers/xen/console/console.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/console/console.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/console/console.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,721 @@
+/******************************************************************************
+ * console.c
@@ -57441,7 +57964,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/console/console.c tmp-linux-2.6-xen
+MODULE_LICENSE("Dual BSD/GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/console/xencons_ring.c tmp-linux-2.6-xen.patch/drivers/xen/console/xencons_ring.c
--- pristine-linux-2.6.18/drivers/xen/console/xencons_ring.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/console/xencons_ring.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/console/xencons_ring.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,143 @@
+/*
+ * This program is free software; you can redistribute it and/or
@@ -57588,7 +58111,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/console/xencons_ring.c tmp-linux-2.
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/core/Makefile tmp-linux-2.6-xen.patch/drivers/xen/core/Makefile
--- pristine-linux-2.6.18/drivers/xen/core/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,12 @@
+#
+# Makefile for the linux kernel.
@@ -57597,14 +58120,14 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/Makefile tmp-linux-2.6-xen.pat
+obj-y := evtchn.o gnttab.o features.o reboot.o machine_reboot.o
+
+obj-$(CONFIG_PROC_FS) += xen_proc.o
-+obj-$(CONFIG_SYSFS) += hypervisor_sysfs.o
++obj-$(CONFIG_SYS_HYPERVISOR) += hypervisor_sysfs.o
+obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o
+obj-$(CONFIG_XEN_SYSFS) += xen_sysfs.o
+obj-$(CONFIG_XEN_SMPBOOT) += smpboot.o
+obj-$(CONFIG_KEXEC) += machine_kexec.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/core/cpu_hotplug.c tmp-linux-2.6-xen.patch/drivers/xen/core/cpu_hotplug.c
--- pristine-linux-2.6.18/drivers/xen/core/cpu_hotplug.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/cpu_hotplug.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/cpu_hotplug.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,172 @@
+#include <linux/init.h>
+#include <linux/kernel.h>
@@ -57780,7 +58303,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/cpu_hotplug.c tmp-linux-2.6-xe
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.patch/drivers/xen/core/evtchn.c
--- pristine-linux-2.6.18/drivers/xen/core/evtchn.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/evtchn.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/evtchn.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,1015 @@
+/******************************************************************************
+ * evtchn.c
@@ -58799,7 +59322,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/core/features.c tmp-linux-2.6-xen.patch/drivers/xen/core/features.c
--- pristine-linux-2.6.18/drivers/xen/core/features.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/features.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/features.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,34 @@
+/******************************************************************************
+ * features.c
@@ -58837,7 +59360,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/features.c tmp-linux-2.6-xen.p
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.patch/drivers/xen/core/gnttab.c
--- pristine-linux-2.6.18/drivers/xen/core/gnttab.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/gnttab.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/gnttab.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,631 @@
+/******************************************************************************
+ * gnttab.c
@@ -59023,7 +59546,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+ nflags = shared[ref].flags;
+ do {
+ if ((flags = nflags) & (GTF_reading|GTF_writing)) {
-+ printk(KERN_ALERT "WARNING: g.e. still in use!\n");
++ printk(KERN_DEBUG "WARNING: g.e. still in use!\n");
+ return 0;
+ }
+ } while ((nflags = synch_cmpxchg_subword(&shared[ref].flags, flags, 0)) !=
@@ -59043,7 +59566,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+ } else {
+ /* XXX This needs to be fixed so that the ref and page are
+ placed on a list to be freed up later. */
-+ printk(KERN_WARNING
++ printk(KERN_DEBUG
+ "WARNING: leaking g.e. and page still in use!\n");
+ }
+}
@@ -59472,8 +59995,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+#endif
diff -Nurp pristine-linux-2.6.18/drivers/xen/core/hypervisor_sysfs.c tmp-linux-2.6-xen.patch/drivers/xen/core/hypervisor_sysfs.c
--- pristine-linux-2.6.18/drivers/xen/core/hypervisor_sysfs.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/hypervisor_sysfs.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,59 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/hypervisor_sysfs.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,56 @@
+/*
+ * copyright (c) 2006 IBM Corporation
+ * Authored by: Mike D. Day <ncmike@us.ibm.com>
@@ -59488,8 +60011,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/hypervisor_sysfs.c tmp-linux-2
+#include <linux/kobject.h>
+#include <xen/hypervisor_sysfs.h>
+
-+decl_subsys(hypervisor, NULL, NULL);
-+
+static ssize_t hyp_sysfs_show(struct kobject *kobj,
+ struct attribute *attr,
+ char *buffer)
@@ -59513,7 +60034,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/hypervisor_sysfs.c tmp-linux-2
+ return 0;
+}
+
-+struct sysfs_ops hyp_sysfs_ops = {
++static struct sysfs_ops hyp_sysfs_ops = {
+ .show = hyp_sysfs_show,
+ .store = hyp_sysfs_store,
+};
@@ -59528,14 +60049,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/hypervisor_sysfs.c tmp-linux-2
+ return -ENODEV;
+
+ hypervisor_subsys.kset.kobj.ktype = &hyp_sysfs_kobj_type;
-+ return subsystem_register(&hypervisor_subsys);
++ return 0;
+}
+
+device_initcall(hypervisor_subsys_init);
-+EXPORT_SYMBOL_GPL(hypervisor_subsys);
diff -Nurp pristine-linux-2.6.18/drivers/xen/core/machine_kexec.c tmp-linux-2.6-xen.patch/drivers/xen/core/machine_kexec.c
--- pristine-linux-2.6.18/drivers/xen/core/machine_kexec.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/machine_kexec.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/machine_kexec.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,189 @@
+/*
+ * drivers/xen/core/machine_kexec.c
@@ -59550,11 +60070,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/machine_kexec.c tmp-linux-2.6-
+extern void machine_kexec_setup_load_arg(xen_kexec_image_t *xki,
+ struct kimage *image);
+
-+int xen_max_nr_phys_cpus;
-+struct resource xen_hypervisor_res;
-+struct resource *xen_phys_cpus;
++static int __initdata xen_max_nr_phys_cpus;
++static struct resource xen_hypervisor_res;
++static struct resource *xen_phys_cpus;
+
-+void xen_machine_kexec_setup_resources(void)
++void __init xen_machine_kexec_setup_resources(void)
+{
+ xen_kexec_range_t range;
+ struct resource *res;
@@ -59643,7 +60163,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/machine_kexec.c tmp-linux-2.6-
+ return;
+}
+
-+void xen_machine_kexec_register_resources(struct resource *res)
++void __init xen_machine_kexec_register_resources(struct resource *res)
+{
+ int k;
+
@@ -59728,7 +60248,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/machine_kexec.c tmp-linux-2.6-
+ */
diff -Nurp pristine-linux-2.6.18/drivers/xen/core/machine_reboot.c tmp-linux-2.6-xen.patch/drivers/xen/core/machine_reboot.c
--- pristine-linux-2.6.18/drivers/xen/core/machine_reboot.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/machine_reboot.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/machine_reboot.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,241 @@
+#include <linux/version.h>
+#include <linux/kernel.h>
@@ -59973,8 +60493,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/machine_reboot.c tmp-linux-2.6
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/core/reboot.c tmp-linux-2.6-xen.patch/drivers/xen/core/reboot.c
--- pristine-linux-2.6.18/drivers/xen/core/reboot.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/reboot.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,249 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/reboot.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,243 @@
+#define __KERNEL_SYSCALLS__
+#include <linux/version.h>
+#include <linux/kernel.h>
@@ -59984,7 +60504,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/reboot.c tmp-linux-2.6-xen.pat
+#include <linux/sysrq.h>
+#include <asm/hypervisor.h>
+#include <xen/xenbus.h>
-+#include <linux/kthread.h>
+
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
+#include <xen/platform-compat.h>
@@ -60042,24 +60561,21 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/reboot.c tmp-linux-2.6-xen.pat
+
+static int xen_suspend(void *__unused)
+{
-+ int err = __xen_suspend(fast_suspend);
++ int err;
++
++ daemonize("suspend");
++ err = set_cpus_allowed(current, cpumask_of_cpu(0));
++ if (err) {
++ printk(KERN_ERR "Xen suspend can't run on CPU0 (%d)\n", err);
++ goto out;
++ }
++
++ err = __xen_suspend(fast_suspend);
+ if (err)
+ printk(KERN_ERR "Xen suspend failed (%d)\n", err);
-+ shutting_down = SHUTDOWN_INVALID;
-+ return 0;
-+}
+
-+static int kthread_create_on_cpu(int (*f)(void *arg),
-+ void *arg,
-+ const char *name,
-+ int cpu)
-+{
-+ struct task_struct *p;
-+ p = kthread_create(f, arg, name);
-+ if (IS_ERR(p))
-+ return PTR_ERR(p);
-+ kthread_bind(p, cpu);
-+ wake_up_process(p);
++ out:
++ shutting_down = SHUTDOWN_INVALID;
+ return 0;
+}
+
@@ -60067,11 +60583,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/reboot.c tmp-linux-2.6-xen.pat
+{
+ int err;
+
-+ if (shutting_down != SHUTDOWN_SUSPEND)
-+ err = kernel_thread(shutdown_process, NULL,
-+ CLONE_FS | CLONE_FILES);
-+ else
-+ err = kthread_create_on_cpu(xen_suspend, NULL, "suspend", 0);
++ err = kernel_thread((shutting_down == SHUTDOWN_SUSPEND) ?
++ xen_suspend : shutdown_process,
++ NULL, CLONE_FS | CLONE_FILES);
+
+ if (err < 0) {
+ printk(KERN_WARNING "Error creating shutdown process (%d): "
@@ -60226,7 +60740,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/reboot.c tmp-linux-2.6-xen.pat
+#endif /* !defined(CONFIG_XEN) */
diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.patch/drivers/xen/core/smpboot.c
--- pristine-linux-2.6.18/drivers/xen/core/smpboot.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/smpboot.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/smpboot.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,452 @@
+/*
+ * Xen SMP booting functions
@@ -60682,7 +61196,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.pa
+#endif
diff -Nurp pristine-linux-2.6.18/drivers/xen/core/xen_proc.c tmp-linux-2.6-xen.patch/drivers/xen/core/xen_proc.c
--- pristine-linux-2.6.18/drivers/xen/core/xen_proc.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/xen_proc.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/xen_proc.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,23 @@
+
+#include <linux/module.h>
@@ -60709,7 +61223,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/xen_proc.c tmp-linux-2.6-xen.p
+EXPORT_SYMBOL_GPL(remove_xen_proc_entry);
diff -Nurp pristine-linux-2.6.18/drivers/xen/core/xen_sysfs.c tmp-linux-2.6-xen.patch/drivers/xen/core/xen_sysfs.c
--- pristine-linux-2.6.18/drivers/xen/core/xen_sysfs.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/xen_sysfs.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/xen_sysfs.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,378 @@
+/*
+ * copyright (c) 2006 IBM Corporation
@@ -61091,13 +61605,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/xen_sysfs.c tmp-linux-2.6-xen.
+module_exit(hyper_sysfs_exit);
diff -Nurp pristine-linux-2.6.18/drivers/xen/evtchn/Makefile tmp-linux-2.6-xen.patch/drivers/xen/evtchn/Makefile
--- pristine-linux-2.6.18/drivers/xen/evtchn/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/evtchn/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/evtchn/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,2 @@
+
+obj-y := evtchn.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.patch/drivers/xen/evtchn/evtchn.c
--- pristine-linux-2.6.18/drivers/xen/evtchn/evtchn.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/evtchn/evtchn.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/evtchn/evtchn.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,469 @@
+/******************************************************************************
+ * evtchn.c
@@ -61309,8 +61823,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.p
+ spin_unlock_irq(&port_user_lock);
+}
+
-+static int evtchn_ioctl(struct inode *inode, struct file *file,
-+ unsigned int cmd, unsigned long arg)
++static long evtchn_ioctl(struct file *file,
++ unsigned int cmd, unsigned long arg)
+{
+ int rc;
+ struct per_user_data *u = file->private_data;
@@ -61524,7 +62038,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.p
+ .owner = THIS_MODULE,
+ .read = evtchn_read,
+ .write = evtchn_write,
-+ .ioctl = evtchn_ioctl,
++ .unlocked_ioctl = evtchn_ioctl,
+ .poll = evtchn_poll,
+ .fasync = evtchn_fasync,
+ .open = evtchn_open,
@@ -61570,14 +62084,14 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.p
+MODULE_LICENSE("Dual BSD/GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/Makefile tmp-linux-2.6-xen.patch/drivers/xen/fbfront/Makefile
--- pristine-linux-2.6.18/drivers/xen/fbfront/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/fbfront/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/fbfront/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,2 @@
+obj-$(CONFIG_XEN_FRAMEBUFFER) := xenfb.o
+obj-$(CONFIG_XEN_KEYBOARD) += xenkbd.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenfb.c tmp-linux-2.6-xen.patch/drivers/xen/fbfront/xenfb.c
--- pristine-linux-2.6.18/drivers/xen/fbfront/xenfb.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/fbfront/xenfb.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,752 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/fbfront/xenfb.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,753 @@
+/*
+ * linux/drivers/video/xenfb.c -- Xen para-virtual frame buffer device
+ *
@@ -62298,6 +62812,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenfb.c tmp-linux-2.6-xen.p
+ { "vfb" },
+ { "" }
+};
++MODULE_ALIAS("xen:vfb");
+
+static struct xenbus_driver xenfb = {
+ .name = "vfb",
@@ -62332,8 +62847,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenfb.c tmp-linux-2.6-xen.p
+MODULE_LICENSE("GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenkbd.c tmp-linux-2.6-xen.patch/drivers/xen/fbfront/xenkbd.c
--- pristine-linux-2.6.18/drivers/xen/fbfront/xenkbd.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/fbfront/xenkbd.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,333 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/fbfront/xenkbd.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,334 @@
+/*
+ * linux/drivers/input/keyboard/xenkbd.c -- Xen para-virtual input device
+ *
@@ -62635,6 +63150,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenkbd.c tmp-linux-2.6-xen.
+ { "vkbd" },
+ { "" }
+};
++MODULE_ALIAS("xen:vkbd");
+
+static struct xenbus_driver xenkbd = {
+ .name = "vkbd",
@@ -62669,12 +63185,12 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenkbd.c tmp-linux-2.6-xen.
+MODULE_LICENSE("GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/gntdev/Makefile tmp-linux-2.6-xen.patch/drivers/xen/gntdev/Makefile
--- pristine-linux-2.6.18/drivers/xen/gntdev/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/gntdev/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/gntdev/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1 @@
+obj-y := gntdev.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/gntdev/gntdev.c tmp-linux-2.6-xen.patch/drivers/xen/gntdev/gntdev.c
--- pristine-linux-2.6.18/drivers/xen/gntdev/gntdev.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/gntdev/gntdev.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/gntdev/gntdev.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,973 @@
+/******************************************************************************
+ * gntdev.c
@@ -62811,7 +63327,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/gntdev/gntdev.c tmp-linux-2.6-xen.p
+static int gntdev_open(struct inode *inode, struct file *flip);
+static int gntdev_release(struct inode *inode, struct file *flip);
+static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma);
-+static int gntdev_ioctl (struct inode *inode, struct file *flip,
++static long gntdev_ioctl(struct file *flip,
+ unsigned int cmd, unsigned long arg);
+
+static struct file_operations gntdev_fops = {
@@ -62819,7 +63335,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/gntdev/gntdev.c tmp-linux-2.6-xen.p
+ .open = gntdev_open,
+ .release = gntdev_release,
+ .mmap = gntdev_mmap,
-+ .ioctl = gntdev_ioctl
++ .unlocked_ioctl = gntdev_ioctl
+};
+
+/* VM operations. */
@@ -63452,8 +63968,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/gntdev/gntdev.c tmp-linux-2.6-xen.p
+
+/* Called when an ioctl is made on the device.
+ */
-+static int gntdev_ioctl(struct inode *inode, struct file *flip,
-+ unsigned int cmd, unsigned long arg)
++static long gntdev_ioctl(struct file *flip,
++ unsigned int cmd, unsigned long arg)
+{
+ int rc = 0;
+ gntdev_file_private_data_t *private_data =
@@ -63651,7 +64167,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/gntdev/gntdev.c tmp-linux-2.6-xen.p
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/Makefile tmp-linux-2.6-xen.patch/drivers/xen/netback/Makefile
--- pristine-linux-2.6.18/drivers/xen/netback/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netback/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/netback/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,5 @@
+obj-$(CONFIG_XEN_NETDEV_BACKEND) := netbk.o
+obj-$(CONFIG_XEN_NETDEV_LOOPBACK) += netloop.o
@@ -63660,7 +64176,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/Makefile tmp-linux-2.6-xen.
+netloop-y := loopback.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/common.h tmp-linux-2.6-xen.patch/drivers/xen/netback/common.h
--- pristine-linux-2.6.18/drivers/xen/netback/common.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netback/common.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/netback/common.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,157 @@
+/******************************************************************************
+ * arch/xen/drivers/netif/backend/common.h
@@ -63742,8 +64258,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/common.h tmp-linux-2.6-xen.
+ int features;
+
+ /* Internal feature information. */
-+ int can_queue:1; /* can queue packets for receiver? */
-+ int copying_receiver:1; /* copy packets to receiver? */
++ u8 can_queue:1; /* can queue packets for receiver? */
++ u8 copying_receiver:1; /* copy packets to receiver? */
+
+ /* Allow netif_be_start_xmit() to peek ahead in the rx request ring. */
+ RING_IDX rx_req_cons_peek;
@@ -63821,7 +64337,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/common.h tmp-linux-2.6-xen.
+#endif /* __NETIF__BACKEND__COMMON_H__ */
diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/interface.c tmp-linux-2.6-xen.patch/drivers/xen/netback/interface.c
--- pristine-linux-2.6.18/drivers/xen/netback/interface.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netback/interface.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/netback/interface.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,336 @@
+/******************************************************************************
+ * arch/xen/drivers/netif/backend/interface.c
@@ -64161,8 +64677,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/interface.c tmp-linux-2.6-x
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/loopback.c tmp-linux-2.6-xen.patch/drivers/xen/netback/loopback.c
--- pristine-linux-2.6.18/drivers/xen/netback/loopback.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netback/loopback.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,320 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/netback/loopback.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,324 @@
+/******************************************************************************
+ * netback/loopback.c
+ *
@@ -64264,6 +64780,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/loopback.c tmp-linux-2.6-xe
+
+ BUG_ON(skb_shinfo(skb)->frag_list);
+
++ if (skb_cloned(skb) &&
++ unlikely(pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
++ return 0;
++
+ for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
+ pfn = page_to_pfn(skb_shinfo(skb)->frags[i].page);
+ if (!is_foreign(pfn))
@@ -64485,7 +65005,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/loopback.c tmp-linux-2.6-xe
+MODULE_LICENSE("Dual BSD/GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen.patch/drivers/xen/netback/netback.c
--- pristine-linux-2.6.18/drivers/xen/netback/netback.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netback/netback.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/netback/netback.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,1496 @@
+/******************************************************************************
+ * drivers/xen/netback/netback.c
@@ -64535,7 +65055,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+struct netbk_rx_meta {
+ skb_frag_t frag;
+ int id;
-+ int copy:1;
++ u8 copy:1;
+};
+
+static void netif_idx_release(u16 pending_idx);
@@ -65985,7 +66505,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+MODULE_LICENSE("Dual BSD/GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/netback/xenbus.c
--- pristine-linux-2.6.18/drivers/xen/netback/xenbus.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netback/xenbus.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/netback/xenbus.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,448 @@
+/* Xenbus code for netif backend
+ Copyright (C) 2005 Rusty Russell <rusty@rustcorp.com.au>
@@ -66437,7 +66957,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/xenbus.c tmp-linux-2.6-xen.
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/Makefile tmp-linux-2.6-xen.patch/drivers/xen/netfront/Makefile
--- pristine-linux-2.6.18/drivers/xen/netfront/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netfront/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/netfront/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,4 @@
+
+obj-$(CONFIG_XEN_NETDEV_FRONTEND) := xennet.o
@@ -66445,8 +66965,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/Makefile tmp-linux-2.6-xen
+xennet-objs := netfront.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-xen.patch/drivers/xen/netfront/netfront.c
--- pristine-linux-2.6.18/drivers/xen/netfront/netfront.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/netfront/netfront.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,2133 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/netfront/netfront.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,2172 @@
+/******************************************************************************
+ * Virtual network driver for conversing with remote driver backends.
+ *
@@ -67464,6 +67984,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ if (notify)
+ notify_remote_via_irq(np->irq);
+
++ np->stats.tx_bytes += skb->len;
++ np->stats.tx_packets++;
++
++ /* Note: It is not safe to access skb after network_tx_buf_gc()! */
+ network_tx_buf_gc(dev);
+
+ if (!netfront_tx_slot_available(np))
@@ -67471,9 +67995,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+
+ spin_unlock_irq(&np->tx_lock);
+
-+ np->stats.tx_bytes += skb->len;
-+ np->stats.tx_packets++;
-+
+ return 0;
+
+ drop:
@@ -67959,7 +68480,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ }
+}
+
-+static void netif_release_rx_bufs(struct netfront_info *np)
++static void netif_release_rx_bufs_flip(struct netfront_info *np)
+{
+ struct mmu_update *mmu = np->rx_mmu;
+ struct multicall_entry *mcl = np->rx_mcl;
@@ -67969,11 +68490,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ int xfer = 0, noxfer = 0, unused = 0;
+ int id, ref, rc;
+
-+ if (np->copying_receiver) {
-+ WPRINTK("%s: fix me for copying receiver.\n", __FUNCTION__);
-+ return;
-+ }
-+
+ skb_queue_head_init(&free_list);
+
+ spin_lock_bh(&np->rx_lock);
@@ -68020,7 +68536,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ xfer++;
+ }
+
-+ IPRINTK("%s: %d xfer, %d noxfer, %d unused\n",
++ DPRINTK("%s: %d xfer, %d noxfer, %d unused\n",
+ __FUNCTION__, xfer, noxfer, unused);
+
+ if (xfer) {
@@ -68047,6 +68563,45 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ spin_unlock_bh(&np->rx_lock);
+}
+
++static void netif_release_rx_bufs_copy(struct netfront_info *np)
++{
++ struct sk_buff *skb;
++ int i, ref;
++ int busy = 0, inuse = 0;
++
++ spin_lock_bh(&np->rx_lock);
++
++ for (i = 0; i < NET_RX_RING_SIZE; i++) {
++ ref = np->grant_rx_ref[i];
++
++ if (ref == GRANT_INVALID_REF)
++ continue;
++
++ inuse++;
++
++ skb = np->rx_skbs[i];
++
++ if (!gnttab_end_foreign_access_ref(ref, 0))
++ {
++ busy++;
++ continue;
++ }
++
++ gnttab_release_grant_reference(&np->gref_rx_head, ref);
++ np->grant_rx_ref[i] = GRANT_INVALID_REF;
++ add_id_to_freelist(np->rx_skbs, i);
++
++ skb_shinfo(skb)->nr_frags = 0;
++ dev_kfree_skb(skb);
++ }
++
++ if (busy)
++ DPRINTK("%s: Unable to release %d of %d inuse grant references out of %ld total.\n",
++ __FUNCTION__, busy, inuse, NET_RX_RING_SIZE);
++
++ spin_unlock_bh(&np->rx_lock);
++}
++
+static int network_close(struct net_device *dev)
+{
+ struct netfront_info *np = netdev_priv(dev);
@@ -68161,7 +68716,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+
+ xennet_set_features(dev);
+
-+ IPRINTK("device %s has %sing receive path.\n",
++ DPRINTK("device %s has %sing receive path.\n",
+ dev->name, np->copying_receiver ? "copy" : "flipp");
+
+ spin_lock_bh(&np->rx_lock);
@@ -68227,7 +68782,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+{
+ struct netfront_info *np = netdev_priv(dev);
+ netif_release_tx_bufs(np);
-+ netif_release_rx_bufs(np);
++ if (np->copying_receiver)
++ netif_release_rx_bufs_copy(np);
++ else
++ netif_release_rx_bufs_flip(np);
+ gnttab_free_grant_references(np->gref_tx_head);
+ gnttab_free_grant_references(np->gref_rx_head);
+}
@@ -68522,6 +69080,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ { "vif" },
+ { "" }
+};
++MODULE_ALIAS("xen:vif");
+
+
+static struct xenbus_driver netfront = {
@@ -68582,8 +69141,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+MODULE_LICENSE("Dual BSD/GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/Makefile tmp-linux-2.6-xen.patch/drivers/xen/pciback/Makefile
--- pristine-linux-2.6.18/drivers/xen/pciback/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/Makefile 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,15 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/Makefile 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,16 @@
+obj-$(CONFIG_XEN_PCIDEV_BACKEND) += pciback.o
+
+pciback-y := pci_stub.o pciback_ops.o xenbus.o
@@ -68595,13 +69154,14 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/Makefile tmp-linux-2.6-xen.
+pciback-$(CONFIG_XEN_PCIDEV_BACKEND_VPCI) += vpci.o
+pciback-$(CONFIG_XEN_PCIDEV_BACKEND_SLOT) += slot.o
+pciback-$(CONFIG_XEN_PCIDEV_BACKEND_PASS) += passthrough.o
++pciback-$(CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER) += controller.o
+
+ifeq ($(CONFIG_XEN_PCIDEV_BE_DEBUG),y)
+EXTRA_CFLAGS += -DDEBUG
+endif
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space.c
--- pristine-linux-2.6.18/drivers/xen/pciback/conf_space.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,426 @@
+/*
+ * PCI Backend - Functions for creating a virtual configuration space for
@@ -69031,7 +69591,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space.c tmp-linux-2.6-
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space.h tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space.h
--- pristine-linux-2.6.18/drivers/xen/pciback/conf_space.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,126 @@
+/*
+ * PCI Backend - Common data structures for overriding the configuration space
@@ -69161,7 +69721,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space.h tmp-linux-2.6-
+#endif /* __XEN_PCIBACK_CONF_SPACE_H__ */
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_capability.c
--- pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_capability.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_capability.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,71 @@
+/*
+ * PCI Backend - Handles the virtual fields found on the capability lists
@@ -69236,7 +69796,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability.c tmp
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability.h tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_capability.h
--- pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_capability.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_capability.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,23 @@
+/*
+ * PCI Backend - Data structures for special overlays for structures on
@@ -69263,7 +69823,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability.h tmp
+#endif
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability_pm.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_capability_pm.c
--- pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability_pm.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_capability_pm.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_capability_pm.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,128 @@
+/*
+ * PCI Backend - Configuration space overlay for power management
@@ -69395,7 +69955,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability_pm.c
+};
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability_vpd.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_capability_vpd.c
--- pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability_vpd.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_capability_vpd.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_capability_vpd.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,42 @@
+/*
+ * PCI Backend - Configuration space overlay for Vital Product Data
@@ -69441,8 +70001,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability_vpd.c
+};
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_header.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_header.c
--- pristine-linux-2.6.18/drivers/xen/pciback/conf_space_header.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_header.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,309 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_header.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,323 @@
+/*
+ * PCI Backend - Handles the virtual fields in the configuration space headers.
+ *
@@ -69520,8 +70080,15 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_header.c tmp-lin
+ */
+ if (value == ~PCI_ROM_ADDRESS_ENABLE)
+ bar->which = 1;
-+ else
++ else {
++ u32 tmpval;
++ pci_read_config_dword(dev, offset, &tmpval);
++ if (tmpval != bar->val && value == bar->val) {
++ /* Allow restoration of bar value. */
++ pci_write_config_dword(dev, offset, bar->val);
++ }
+ bar->which = 0;
++ }
+
+ /* Do we need to support enabling/disabling the rom address here? */
+
@@ -69547,8 +70114,15 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_header.c tmp-lin
+ */
+ if (value == ~0)
+ bar->which = 1;
-+ else
++ else {
++ u32 tmpval;
++ pci_read_config_dword(dev, offset, &tmpval);
++ if (tmpval != bar->val && value == bar->val) {
++ /* Allow restoration of bar value. */
++ pci_write_config_dword(dev, offset, bar->val);
++ }
+ bar->which = 0;
++ }
+
+ return 0;
+}
@@ -69754,7 +70328,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_header.c tmp-lin
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_quirks.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_quirks.c
--- pristine-linux-2.6.18/drivers/xen/pciback/conf_space_quirks.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_quirks.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_quirks.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,126 @@
+/*
+ * PCI Backend - Handle special overlays for broken devices.
@@ -69884,7 +70458,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_quirks.c tmp-lin
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_quirks.h tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_quirks.h
--- pristine-linux-2.6.18/drivers/xen/pciback/conf_space_quirks.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_quirks.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/conf_space_quirks.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,35 @@
+/*
+ * PCI Backend - Data structures for special overlays for broken devices.
@@ -69921,9 +70495,417 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_quirks.h tmp-lin
+int pciback_field_is_dup(struct pci_dev *dev, unsigned int reg);
+
+#endif
+diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/controller.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/controller.c
+--- pristine-linux-2.6.18/drivers/xen/pciback/controller.c 1969-12-31 16:00:00.000000000 -0800
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/controller.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,404 @@
++/*
++ * Copyright (C) 2007 Hewlett-Packard Development Company, L.P.
++ * Alex Williamson <alex.williamson@hp.com>
++ *
++ * PCI "Controller" Backend - virtualize PCI bus topology based on PCI
++ * controllers. Devices under the same PCI controller are exposed on the
++ * same virtual domain:bus. Within a bus, device slots are virtualized
++ * to compact the bus.
++ *
++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++ */
++
++#include <linux/acpi.h>
++#include <linux/list.h>
++#include <linux/pci.h>
++#include <linux/spinlock.h>
++#include "pciback.h"
++
++#define PCI_MAX_BUSSES 255
++#define PCI_MAX_SLOTS 32
++
++struct controller_dev_entry {
++ struct list_head list;
++ struct pci_dev *dev;
++ unsigned int devfn;
++};
++
++struct controller_list_entry {
++ struct list_head list;
++ struct pci_controller *controller;
++ unsigned int domain;
++ unsigned int bus;
++ unsigned int next_devfn;
++ struct list_head dev_list;
++};
++
++struct controller_dev_data {
++ struct list_head list;
++ unsigned int next_domain;
++ unsigned int next_bus;
++ spinlock_t lock;
++};
++
++struct walk_info {
++ struct pciback_device *pdev;
++ int resource_count;
++ int root_num;
++};
++
++struct pci_dev *pciback_get_pci_dev(struct pciback_device *pdev,
++ unsigned int domain, unsigned int bus,
++ unsigned int devfn)
++{
++ struct controller_dev_data *dev_data = pdev->pci_dev_data;
++ struct controller_dev_entry *dev_entry;
++ struct controller_list_entry *cntrl_entry;
++ struct pci_dev *dev = NULL;
++ unsigned long flags;
++
++ spin_lock_irqsave(&dev_data->lock, flags);
++
++ list_for_each_entry(cntrl_entry, &dev_data->list, list) {
++ if (cntrl_entry->domain != domain ||
++ cntrl_entry->bus != bus)
++ continue;
++
++ list_for_each_entry(dev_entry, &cntrl_entry->dev_list, list) {
++ if (devfn == dev_entry->devfn) {
++ dev = dev_entry->dev;
++ goto found;
++ }
++ }
++ }
++found:
++ spin_unlock_irqrestore(&dev_data->lock, flags);
++
++ return dev;
++}
++
++int pciback_add_pci_dev(struct pciback_device *pdev, struct pci_dev *dev)
++{
++ struct controller_dev_data *dev_data = pdev->pci_dev_data;
++ struct controller_dev_entry *dev_entry;
++ struct controller_list_entry *cntrl_entry;
++ struct pci_controller *dev_controller = PCI_CONTROLLER(dev);
++ unsigned long flags;
++ int ret = 0, found = 0;
++
++ spin_lock_irqsave(&dev_data->lock, flags);
++
++ /* Look to see if we already have a domain:bus for this controller */
++ list_for_each_entry(cntrl_entry, &dev_data->list, list) {
++ if (cntrl_entry->controller == dev_controller) {
++ found = 1;
++ break;
++ }
++ }
++
++ if (!found) {
++ cntrl_entry = kmalloc(sizeof(*cntrl_entry), GFP_ATOMIC);
++ if (!cntrl_entry) {
++ ret = -ENOMEM;
++ goto out;
++ }
++
++ cntrl_entry->controller = dev_controller;
++ cntrl_entry->next_devfn = PCI_DEVFN(0, 0);
++
++ cntrl_entry->domain = dev_data->next_domain;
++ cntrl_entry->bus = dev_data->next_bus++;
++ if (dev_data->next_bus > PCI_MAX_BUSSES) {
++ dev_data->next_domain++;
++ dev_data->next_bus = 0;
++ }
++
++ INIT_LIST_HEAD(&cntrl_entry->dev_list);
++
++ list_add_tail(&cntrl_entry->list, &dev_data->list);
++ }
++
++ if (PCI_SLOT(cntrl_entry->next_devfn) > PCI_MAX_SLOTS) {
++ /*
++ * While it seems unlikely, this can actually happen if
++ * a controller has P2P bridges under it.
++ */
++ xenbus_dev_fatal(pdev->xdev, -ENOSPC, "Virtual bus %04x:%02x "
++ "is full, no room to export %04x:%02x:%02x.%x",
++ cntrl_entry->domain, cntrl_entry->bus,
++ pci_domain_nr(dev->bus), dev->bus->number,
++ PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
++ ret = -ENOSPC;
++ goto out;
++ }
++
++ dev_entry = kmalloc(sizeof(*dev_entry), GFP_ATOMIC);
++ if (!dev_entry) {
++ if (list_empty(&cntrl_entry->dev_list)) {
++ list_del(&cntrl_entry->list);
++ kfree(cntrl_entry);
++ }
++ ret = -ENOMEM;
++ goto out;
++ }
++
++ dev_entry->dev = dev;
++ dev_entry->devfn = cntrl_entry->next_devfn;
++
++ list_add_tail(&dev_entry->list, &cntrl_entry->dev_list);
++
++ cntrl_entry->next_devfn += PCI_DEVFN(1, 0);
++
++out:
++ spin_unlock_irqrestore(&dev_data->lock, flags);
++ return ret;
++}
++
++void pciback_release_pci_dev(struct pciback_device *pdev, struct pci_dev *dev)
++{
++ struct controller_dev_data *dev_data = pdev->pci_dev_data;
++ struct controller_list_entry *cntrl_entry;
++ struct controller_dev_entry *dev_entry = NULL;
++ struct pci_dev *found_dev = NULL;
++ unsigned long flags;
++
++ spin_lock_irqsave(&dev_data->lock, flags);
++
++ list_for_each_entry(cntrl_entry, &dev_data->list, list) {
++ if (cntrl_entry->controller != PCI_CONTROLLER(dev))
++ continue;
++
++ list_for_each_entry(dev_entry, &cntrl_entry->dev_list, list) {
++ if (dev_entry->dev == dev) {
++ found_dev = dev_entry->dev;
++ break;
++ }
++ }
++ }
++
++ if (!found_dev) {
++ spin_unlock_irqrestore(&dev_data->lock, flags);
++ return;
++ }
++
++ list_del(&dev_entry->list);
++ kfree(dev_entry);
++
++ if (list_empty(&cntrl_entry->dev_list)) {
++ list_del(&cntrl_entry->list);
++ kfree(cntrl_entry);
++ }
++
++ spin_unlock_irqrestore(&dev_data->lock, flags);
++ pcistub_put_pci_dev(found_dev);
++}
++
++int pciback_init_devices(struct pciback_device *pdev)
++{
++ struct controller_dev_data *dev_data;
++
++ dev_data = kmalloc(sizeof(*dev_data), GFP_KERNEL);
++ if (!dev_data)
++ return -ENOMEM;
++
++ spin_lock_init(&dev_data->lock);
++
++ INIT_LIST_HEAD(&dev_data->list);
++
++ /* Starting domain:bus numbers */
++ dev_data->next_domain = 0;
++ dev_data->next_bus = 0;
++
++ pdev->pci_dev_data = dev_data;
++
++ return 0;
++}
++
++static acpi_status write_xenbus_resource(struct acpi_resource *res, void *data)
++{
++ struct walk_info *info = data;
++ struct acpi_resource_address64 addr;
++ acpi_status status;
++ int i, len, err;
++ char str[32], tmp[3];
++ unsigned char *ptr, *buf;
++
++ status = acpi_resource_to_address64(res, &addr);
++
++ /* Do we care about this range? Let's check. */
++ if (!ACPI_SUCCESS(status) ||
++ !(addr.resource_type == ACPI_MEMORY_RANGE ||
++ addr.resource_type == ACPI_IO_RANGE) ||
++ !addr.address_length || addr.producer_consumer != ACPI_PRODUCER)
++ return AE_OK;
++
++ /*
++ * Furthermore, we really only care to tell the guest about
++ * address ranges that require address translation of some sort.
++ */
++ if (!(addr.resource_type == ACPI_MEMORY_RANGE &&
++ addr.info.mem.translation) &&
++ !(addr.resource_type == ACPI_IO_RANGE &&
++ addr.info.io.translation))
++ return AE_OK;
++
++ /* Store the resource in xenbus for the guest */
++ len = snprintf(str, sizeof(str), "root-%d-resource-%d",
++ info->root_num, info->resource_count);
++ if (unlikely(len >= (sizeof(str) - 1)))
++ return AE_OK;
++
++ buf = kzalloc((sizeof(*res) * 2) + 1, GFP_KERNEL);
++ if (!buf)
++ return AE_OK;
++
++ /* Clean out resource_source */
++ res->data.address64.resource_source.index = 0xFF;
++ res->data.address64.resource_source.string_length = 0;
++ res->data.address64.resource_source.string_ptr = NULL;
++
++ ptr = (unsigned char *)res;
++
++ /* Turn the acpi_resource into an ASCII byte stream */
++ for (i = 0; i < sizeof(*res); i++) {
++ snprintf(tmp, sizeof(tmp), "%02x", ptr[i]);
++ strncat(buf, tmp, 2);
++ }
++
++ err = xenbus_printf(XBT_NIL, info->pdev->xdev->nodename,
++ str, "%s", buf);
++
++ if (!err)
++ info->resource_count++;
++
++ kfree(buf);
++
++ return AE_OK;
++}
++
++int pciback_publish_pci_roots(struct pciback_device *pdev,
++ publish_pci_root_cb publish_root_cb)
++{
++ struct controller_dev_data *dev_data = pdev->pci_dev_data;
++ struct controller_list_entry *cntrl_entry;
++ int i, root_num, len, err = 0;
++ unsigned int domain, bus;
++ char str[64];
++ struct walk_info info;
++
++ spin_lock(&dev_data->lock);
++
++ list_for_each_entry(cntrl_entry, &dev_data->list, list) {
++ /* First publish all the domain:bus info */
++ err = publish_root_cb(pdev, cntrl_entry->domain,
++ cntrl_entry->bus);
++ if (err)
++ goto out;
++
++ /*
++ * Now figure out which root-%d this belongs to
++ * so we can associate resources with it.
++ */
++ err = xenbus_scanf(XBT_NIL, pdev->xdev->nodename,
++ "root_num", "%d", &root_num);
++
++ if (err != 1)
++ goto out;
++
++ for (i = 0; i < root_num; i++) {
++ len = snprintf(str, sizeof(str), "root-%d", i);
++ if (unlikely(len >= (sizeof(str) - 1))) {
++ err = -ENOMEM;
++ goto out;
++ }
++
++ err = xenbus_scanf(XBT_NIL, pdev->xdev->nodename,
++ str, "%x:%x", &domain, &bus);
++ if (err != 2)
++ goto out;
++
++ /* Is this the one we just published? */
++ if (domain == cntrl_entry->domain &&
++ bus == cntrl_entry->bus)
++ break;
++ }
++
++ if (i == root_num)
++ goto out;
++
++ info.pdev = pdev;
++ info.resource_count = 0;
++ info.root_num = i;
++
++ /* Let ACPI do the heavy lifting on decoding resources */
++ acpi_walk_resources(cntrl_entry->controller->acpi_handle,
++ METHOD_NAME__CRS, write_xenbus_resource,
++ &info);
++
++ /* No resouces. OK. On to the next one */
++ if (!info.resource_count)
++ continue;
++
++ /* Store the number of resources we wrote for this root-%d */
++ len = snprintf(str, sizeof(str), "root-%d-resources", i);
++ if (unlikely(len >= (sizeof(str) - 1))) {
++ err = -ENOMEM;
++ goto out;
++ }
++
++ err = xenbus_printf(XBT_NIL, pdev->xdev->nodename, str,
++ "%d", info.resource_count);
++ if (err)
++ goto out;
++ }
++
++ /* Finally, write some magic to synchronize with the guest. */
++ len = snprintf(str, sizeof(str), "root-resource-magic");
++ if (unlikely(len >= (sizeof(str) - 1))) {
++ err = -ENOMEM;
++ goto out;
++ }
++
++ err = xenbus_printf(XBT_NIL, pdev->xdev->nodename, str,
++ "%lx", (sizeof(struct acpi_resource) * 2) + 1);
++
++out:
++ spin_unlock(&dev_data->lock);
++
++ return err;
++}
++
++void pciback_release_devices(struct pciback_device *pdev)
++{
++ struct controller_dev_data *dev_data = pdev->pci_dev_data;
++ struct controller_list_entry *cntrl_entry, *c;
++ struct controller_dev_entry *dev_entry, *d;
++
++ list_for_each_entry_safe(cntrl_entry, c, &dev_data->list, list) {
++ list_for_each_entry_safe(dev_entry, d,
++ &cntrl_entry->dev_list, list) {
++ list_del(&dev_entry->list);
++ pcistub_put_pci_dev(dev_entry->dev);
++ kfree(dev_entry);
++ }
++ list_del(&cntrl_entry->list);
++ kfree(cntrl_entry);
++ }
++
++ kfree(dev_data);
++ pdev->pci_dev_data = NULL;
++}
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/passthrough.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/passthrough.c
--- pristine-linux-2.6.18/drivers/xen/pciback/passthrough.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/passthrough.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/passthrough.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,157 @@
+/*
+ * PCI Backend - Provides restricted access to the real PCI bus topology
@@ -70084,7 +71066,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/passthrough.c tmp-linux-2.6
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/pci_stub.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/pci_stub.c
--- pristine-linux-2.6.18/drivers/xen/pciback/pci_stub.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/pci_stub.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/pci_stub.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,929 @@
+/*
+ * PCI Stub Driver - Grabs devices in backend to be exported later
@@ -71017,7 +71999,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/pci_stub.c tmp-linux-2.6-xe
+MODULE_LICENSE("Dual BSD/GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/pciback.h tmp-linux-2.6-xen.patch/drivers/xen/pciback/pciback.h
--- pristine-linux-2.6.18/drivers/xen/pciback/pciback.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/pciback.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/pciback.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,93 @@
+/*
+ * PCI Backend Common Data Structures & Function Declarations
@@ -71114,7 +72096,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/pciback.h tmp-linux-2.6-xen
+#endif
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/pciback_ops.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/pciback_ops.c
--- pristine-linux-2.6.18/drivers/xen/pciback/pciback_ops.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/pciback_ops.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/pciback_ops.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,95 @@
+/*
+ * PCI Backend Operations - respond to PCI requests from Frontend
@@ -71213,7 +72195,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/pciback_ops.c tmp-linux-2.6
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/slot.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/slot.c
--- pristine-linux-2.6.18/drivers/xen/pciback/slot.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/slot.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/slot.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,151 @@
+/*
+ * PCI Backend - Provides a Virtual PCI bus (with real devices)
@@ -71368,7 +72350,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/slot.c tmp-linux-2.6-xen.pa
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/vpci.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/vpci.c
--- pristine-linux-2.6.18/drivers/xen/pciback/vpci.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/vpci.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/vpci.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,204 @@
+/*
+ * PCI Backend - Provides a Virtual PCI bus (with real devices)
@@ -71576,7 +72558,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/vpci.c tmp-linux-2.6-xen.pa
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/xenbus.c
--- pristine-linux-2.6.18/drivers/xen/pciback/xenbus.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/xenbus.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/xenbus.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,454 @@
+/*
+ * PCI Backend Xenbus Setup - handles setup with frontend and xend
@@ -72034,7 +73016,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/xenbus.c tmp-linux-2.6-xen.
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/Makefile tmp-linux-2.6-xen.patch/drivers/xen/pcifront/Makefile
--- pristine-linux-2.6.18/drivers/xen/pcifront/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,7 @@
+obj-y += pcifront.o
+
@@ -72045,7 +73027,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/Makefile tmp-linux-2.6-xen
+endif
diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/pci.c tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pci.c
--- pristine-linux-2.6.18/drivers/xen/pcifront/pci.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pci.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pci.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,46 @@
+/*
+ * PCI Frontend Operations - ensure only one PCI frontend runs at a time
@@ -72095,8 +73077,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/pci.c tmp-linux-2.6-xen.pa
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/pci_op.c tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pci_op.c
--- pristine-linux-2.6.18/drivers/xen/pcifront/pci_op.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pci_op.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,268 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pci_op.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,386 @@
+/*
+ * PCI Frontend Operations - Communicates with frontend
+ *
@@ -72114,6 +73096,122 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/pci_op.c tmp-linux-2.6-xen
+static int verbose_request = 0;
+module_param(verbose_request, int, 0644);
+
++#ifdef __ia64__
++static void pcifront_init_sd(struct pcifront_sd *sd,
++ unsigned int domain, unsigned int bus,
++ struct pcifront_device *pdev)
++{
++ int err, i, j, k, len, root_num, res_count;
++ struct acpi_resource res;
++ unsigned int d, b, byte;
++ unsigned long magic;
++ char str[64], tmp[3];
++ unsigned char *buf, *bufp;
++ u8 *ptr;
++
++ memset(sd, 0, sizeof(*sd));
++
++ sd->segment = domain;
++ sd->node = -1; /* Revisit for NUMA */
++ sd->platform_data = pdev;
++
++ /* Look for resources for this controller in xenbus. */
++ err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, "root_num",
++ "%d", &root_num);
++ if (err != 1)
++ return;
++
++ for (i = 0; i < root_num; i++) {
++ len = snprintf(str, sizeof(str), "root-%d", i);
++ if (unlikely(len >= (sizeof(str) - 1)))
++ return;
++
++ err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend,
++ str, "%x:%x", &d, &b);
++ if (err != 2)
++ return;
++
++ if (d == domain && b == bus)
++ break;
++ }
++
++ if (i == root_num)
++ return;
++
++ len = snprintf(str, sizeof(str), "root-resource-magic");
++
++ err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend,
++ str, "%lx", &magic);
++
++ if (err != 1)
++ return; /* No resources, nothing to do */
++
++ if (magic != (sizeof(res) * 2) + 1) {
++ printk(KERN_WARNING "pcifront: resource magic mismatch\n");
++ return;
++ }
++
++ len = snprintf(str, sizeof(str), "root-%d-resources", i);
++ if (unlikely(len >= (sizeof(str) - 1)))
++ return;
++
++ err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend,
++ str, "%d", &res_count);
++
++ if (err != 1)
++ return; /* No resources, nothing to do */
++
++ sd->window = kzalloc(sizeof(*sd->window) * res_count, GFP_KERNEL);
++ if (!sd->window)
++ return;
++
++ /* magic is also the size of the byte stream in xenbus */
++ buf = kmalloc(magic, GFP_KERNEL);
++ if (!buf) {
++ kfree(sd->window);
++ sd->window = NULL;
++ return;
++ }
++
++ /* Read the resources out of xenbus */
++ for (j = 0; j < res_count; j++) {
++ memset(&res, 0, sizeof(res));
++ memset(buf, 0, magic);
++
++ len = snprintf(str, sizeof(str), "root-%d-resource-%d", i, j);
++ if (unlikely(len >= (sizeof(str) - 1)))
++ return;
++
++ err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, str,
++ "%s", buf);
++ if (err != 1) {
++ printk(KERN_WARNING "pcifront: error reading "
++ "resource %d on bus %04x:%02x\n",
++ j, domain, bus);
++ continue;
++ }
++
++ bufp = buf;
++ ptr = (u8 *)&res;
++ memset(tmp, 0, sizeof(tmp));
++
++ /* Copy ASCII byte stream into structure */
++ for (k = 0; k < magic - 1; k += 2) {
++ memcpy(tmp, bufp, 2);
++ bufp += 2;
++
++ sscanf(tmp, "%02x", &byte);
++ *ptr = byte;
++ ptr++;
++ }
++
++ xen_add_resource(sd, domain, bus, &res);
++ sd->windows++;
++ }
++ kfree(buf);
++}
++#endif
++
+static int errno_to_pcibios_err(int errno)
+{
+ switch (errno) {
@@ -72306,7 +73404,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/pci_op.c tmp-linux-2.6-xen
+ err = -ENOMEM;
+ goto err_out;
+ }
-+ pcifront_init_sd(sd, domain, pdev);
++ pcifront_init_sd(sd, domain, bus, pdev);
+
+ b = pci_scan_bus_parented(&pdev->xdev->dev, bus,
+ &pcifront_bus_ops, sd);
@@ -72316,6 +73414,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/pci_op.c tmp-linux-2.6-xen
+ err = -ENOMEM;
+ goto err_out;
+ }
++
++ pcifront_setup_root_resources(b, sd);
+ bus_entry->bus = b;
+
+ list_add(&bus_entry->list, &pdev->root_buses);
@@ -72367,7 +73467,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/pci_op.c tmp-linux-2.6-xen
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/pcifront.h tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pcifront.h
--- pristine-linux-2.6.18/drivers/xen/pcifront/pcifront.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pcifront.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/pcifront.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,40 @@
+/*
+ * PCI Frontend - Common data structures & function declarations
@@ -72411,8 +73511,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/pcifront.h tmp-linux-2.6-x
+#endif /* __XEN_PCIFRONT_H__ */
diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/pcifront/xenbus.c
--- pristine-linux-2.6.18/drivers/xen/pcifront/xenbus.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/xenbus.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,295 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/pcifront/xenbus.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,296 @@
+/*
+ * PCI Frontend Xenbus Setup - handles setup with backend (imports page/evtchn)
+ *
@@ -72688,6 +73788,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/xenbus.c tmp-linux-2.6-xen
+ {"pci"},
+ {{0}},
+};
++MODULE_ALIAS("xen:pci");
+
+static struct xenbus_driver xenbus_pcifront_driver = {
+ .name = "pcifront",
@@ -72710,14 +73811,14 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/xenbus.c tmp-linux-2.6-xen
+subsys_initcall(pcifront_init);
diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/Makefile tmp-linux-2.6-xen.patch/drivers/xen/privcmd/Makefile
--- pristine-linux-2.6.18/drivers/xen/privcmd/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/privcmd/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/privcmd/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,2 @@
+
+obj-$(CONFIG_XEN_PRIVCMD) := privcmd.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen.patch/drivers/xen/privcmd/privcmd.c
--- pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/privcmd/privcmd.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,284 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/privcmd/privcmd.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,286 @@
+/******************************************************************************
+ * privcmd.c
+ *
@@ -72757,8 +73858,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen
+static int privcmd_enforce_singleshot_mapping(struct vm_area_struct *vma);
+#endif
+
-+static int privcmd_ioctl(struct inode *inode, struct file *file,
-+ unsigned int cmd, unsigned long data)
++static long privcmd_ioctl(struct file *file,
++ unsigned int cmd, unsigned long data)
+{
+ int ret = -ENOSYS;
+ void __user *udata = (void __user *) data;
@@ -72949,9 +74050,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen
+
+static int privcmd_mmap(struct file * file, struct vm_area_struct * vma)
+{
++#ifndef __powerpc__ /* PowerPC has a trick to safely do this. */
+ /* Unsupported for auto-translate guests. */
+ if (xen_feature(XENFEAT_auto_translated_physmap))
+ return -ENOSYS;
++#endif
+
+ /* DONTCOPY is essential for Xen as copy_page_range is broken. */
+ vma->vm_flags |= VM_RESERVED | VM_IO | VM_DONTCOPY;
@@ -72968,8 +74071,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen
+#endif
+
+static const struct file_operations privcmd_file_ops = {
-+ .ioctl = privcmd_ioctl,
-+ .mmap = privcmd_mmap,
++ .unlocked_ioctl = privcmd_ioctl,
++ .mmap = privcmd_mmap,
+};
+
+static int capabilities_read(char *page, char **start, off_t off,
@@ -73004,7 +74107,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen
+__initcall(privcmd_init);
diff -Nurp pristine-linux-2.6.18/drivers/xen/tpmback/Makefile tmp-linux-2.6-xen.patch/drivers/xen/tpmback/Makefile
--- pristine-linux-2.6.18/drivers/xen/tpmback/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,4 @@
+
+obj-$(CONFIG_XEN_TPMDEV_BACKEND) += tpmbk.o
@@ -73012,7 +74115,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/tpmback/Makefile tmp-linux-2.6-xen.
+tpmbk-y += tpmback.o interface.o xenbus.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/tpmback/common.h tmp-linux-2.6-xen.patch/drivers/xen/tpmback/common.h
--- pristine-linux-2.6.18/drivers/xen/tpmback/common.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/common.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/common.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,85 @@
+/******************************************************************************
+ * drivers/xen/tpmback/common.h
@@ -73101,7 +74204,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/tpmback/common.h tmp-linux-2.6-xen.
+#endif /* __TPMIF__BACKEND__COMMON_H__ */
diff -Nurp pristine-linux-2.6.18/drivers/xen/tpmback/interface.c tmp-linux-2.6-xen.patch/drivers/xen/tpmback/interface.c
--- pristine-linux-2.6.18/drivers/xen/tpmback/interface.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/interface.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/interface.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,167 @@
+ /*****************************************************************************
+ * drivers/xen/tpmback/interface.c
@@ -73272,7 +74375,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/tpmback/interface.c tmp-linux-2.6-x
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/tpmback/tpmback.c tmp-linux-2.6-xen.patch/drivers/xen/tpmback/tpmback.c
--- pristine-linux-2.6.18/drivers/xen/tpmback/tpmback.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/tpmback.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/tpmback.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,944 @@
+/******************************************************************************
+ * drivers/xen/tpmback/tpmback.c
@@ -74220,7 +75323,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/tpmback/tpmback.c tmp-linux-2.6-xen
+MODULE_LICENSE("Dual BSD/GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/tpmback/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/tpmback/xenbus.c
--- pristine-linux-2.6.18/drivers/xen/tpmback/xenbus.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/xenbus.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/xenbus.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,289 @@
+/* Xenbus code for tpmif backend
+ Copyright (C) 2005 IBM Corporation
@@ -74513,7 +75616,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/tpmback/xenbus.c tmp-linux-2.6-xen.
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/util.c tmp-linux-2.6-xen.patch/drivers/xen/util.c
--- pristine-linux-2.6.18/drivers/xen/util.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/util.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/util.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,70 @@
+#include <linux/mm.h>
+#include <linux/module.h>
@@ -74587,7 +75690,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/util.c tmp-linux-2.6-xen.patch/driv
+#endif /* !__ia64__ */
diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/Makefile tmp-linux-2.6-xen.patch/drivers/xen/xenbus/Makefile
--- pristine-linux-2.6.18/drivers/xen/xenbus/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,9 @@
+obj-y += xenbus_client.o xenbus_comms.o xenbus_xs.o xenbus_probe.o
+obj-$(CONFIG_XEN_BACKEND) += xenbus_be.o
@@ -74600,7 +75703,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/Makefile tmp-linux-2.6-xen.p
+obj-$(CONFIG_XEN_XENBUS_DEV) += xenbus_dev.o
diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_backend_client.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_backend_client.c
--- pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_backend_client.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_backend_client.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_backend_client.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,147 @@
+/******************************************************************************
+ * Backend-client-facing interface for the Xenbus driver. In other words, the
@@ -74751,7 +75854,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_backend_client.c tmp-
+MODULE_LICENSE("Dual BSD/GPL");
diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_client.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_client.c
--- pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_client.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_client.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_client.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,283 @@
+/******************************************************************************
+ * Client-facing interface for the Xenbus driver. In other words, the
@@ -75038,7 +76141,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_client.c tmp-linux-2.
+EXPORT_SYMBOL_GPL(xenbus_read_driver_state);
diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_comms.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.c
--- pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_comms.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,232 @@
+/******************************************************************************
+ * xenbus_comms.c
@@ -75274,7 +76377,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_comms.c tmp-linux-2.6
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_comms.h tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.h
--- pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_comms.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,46 @@
+/*
+ * Private include for xenbus communications.
@@ -75324,7 +76427,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_comms.h tmp-linux-2.6
+#endif /* _XENBUS_COMMS_H */
diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_dev.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_dev.c
--- pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_dev.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_dev.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_dev.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,404 @@
+/*
+ * xenbus_dev.c
@@ -75732,8 +76835,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_dev.c tmp-linux-2.6-x
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.c
--- pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,1086 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,1132 @@
+/******************************************************************************
+ * Talks to Xen Store to figure out what devices we have.
+ *
@@ -75901,6 +77004,30 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+ return read_otherend_details(xendev, "backend-id", "backend");
+}
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
++static int xenbus_uevent_frontend(struct device *dev, char **envp,
++ int num_envp, char *buffer, int buffer_size)
++{
++ struct xenbus_device *xdev;
++ int length = 0, i = 0;
++
++ if (dev == NULL)
++ return -ENODEV;
++ xdev = to_xenbus_device(dev);
++ if (xdev == NULL)
++ return -ENODEV;
++
++ /* stuff we want to pass to /sbin/hotplug */
++ add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
++ "XENBUS_TYPE=%s", xdev->devicetype);
++ add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
++ "XENBUS_PATH=%s", xdev->nodename);
++ add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
++ "MODALIAS=xen:%s", xdev->devicetype);
++
++ return 0;
++}
++#endif
+
+/* Bus type for frontend drivers. */
+static struct xen_bus_type xenbus_frontend = {
@@ -75908,6 +77035,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+ .levels = 2, /* device/type/<id> */
+ .get_bus_id = frontend_bus_id,
+ .probe = xenbus_probe_frontend,
++ .error = -ENODEV,
+ .bus = {
+ .name = "xen",
+ .match = xenbus_match,
@@ -75915,6 +77043,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+ .probe = xenbus_dev_probe,
+ .remove = xenbus_dev_remove,
+ .shutdown = xenbus_dev_shutdown,
++ .uevent = xenbus_uevent_frontend,
+#endif
+ },
+ .dev = {
@@ -75944,6 +77073,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+ DPRINTK("state is %d (%s), %s, %s", state, xenbus_strstate(state),
+ dev->otherend_watch.node, vec[XS_WATCH_PATH]);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ /*
+ * Ignore xenbus transitions during shutdown. This prevents us doing
+ * work that can fail e.g., when the rootfs is gone.
@@ -75957,6 +77087,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+ xenbus_frontend_closed(dev);
+ return;
+ }
++#endif
+
+ if (drv->otherend_changed)
+ drv->otherend_changed(dev, state);
@@ -76728,6 +77859,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+{
+ struct xenbus_device *xendev = to_xenbus_device(dev);
+ struct device_driver *drv = data;
++ struct xenbus_driver *xendrv;
+
+ /*
+ * A device with no driver will never connect. We care only about
@@ -76740,7 +77872,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+ if (drv && (dev->driver != drv))
+ return 0;
+
-+ return (xendev->state != XenbusStateConnected);
++ xendrv = to_xenbus_driver(dev->driver);
++ return (xendev->state < XenbusStateConnected ||
++ (xendrv->is_ready && !xendrv->is_ready(xendev)));
+}
+
+static int exists_disconnected_device(struct device_driver *drv)
@@ -76764,10 +77898,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+ /* Information only: is this too noisy? */
+ printk(KERN_INFO "XENBUS: Device with no driver: %s\n",
+ xendev->nodename);
-+ } else if (xendev->state != XenbusStateConnected) {
++ } else if (xendev->state < XenbusStateConnected) {
++ enum xenbus_state rstate = XenbusStateUnknown;
++ if (xendev->otherend)
++ rstate = xenbus_read_driver_state(xendev->otherend);
+ printk(KERN_WARNING "XENBUS: Timeout connecting "
-+ "to device: %s (state %d)\n",
-+ xendev->nodename, xendev->state);
++ "to device: %s (local state %d, remote state %d)\n",
++ xendev->nodename, xendev->state, rstate);
+ }
+
+ return 0;
@@ -76777,7 +77914,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+static int ready_to_wait_for_devices;
+
+/*
-+ * On a 10 second timeout, wait for all devices currently configured. We need
++ * On a 5-minute timeout, wait for all devices currently configured. We need
+ * to do this to guarantee that the filesystems and / or network devices
+ * needed for boot are available, before we can allow the boot to proceed.
+ *
@@ -76792,18 +77929,30 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+ */
+static void wait_for_devices(struct xenbus_driver *xendrv)
+{
-+ unsigned long timeout = jiffies + 10*HZ;
++ unsigned long start = jiffies;
+ struct device_driver *drv = xendrv ? &xendrv->driver : NULL;
++ unsigned int seconds_waited = 0;
+
+ if (!ready_to_wait_for_devices || !is_running_on_xen())
+ return;
+
+ while (exists_disconnected_device(drv)) {
-+ if (time_after(jiffies, timeout))
-+ break;
++ if (time_after(jiffies, start + (seconds_waited+5)*HZ)) {
++ if (!seconds_waited)
++ printk(KERN_WARNING "XENBUS: Waiting for "
++ "devices to initialise: ");
++ seconds_waited += 5;
++ printk("%us...", 300 - seconds_waited);
++ if (seconds_waited == 300)
++ break;
++ }
++
+ schedule_timeout_interruptible(HZ/10);
+ }
+
++ if (seconds_waited)
++ printk("\n");
++
+ bus_for_each_dev(&xenbus_frontend.bus, NULL, drv,
+ print_device_status);
+}
@@ -76822,7 +77971,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+#endif
diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.h tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.h
--- pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,75 @@
+/******************************************************************************
+ * xenbus_probe.h
@@ -76901,8 +78050,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.h tmp-linux-2.6
+
diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe_backend.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe_backend.c
--- pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe_backend.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe_backend.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,286 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe_backend.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,287 @@
+/******************************************************************************
+ * Talks to Xen Store to figure out what devices we have (backend half).
+ *
@@ -77020,6 +78169,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe_backend.c tmp-l
+ .levels = 3, /* backend/type/<frontend>/<id> */
+ .get_bus_id = backend_bus_id,
+ .probe = xenbus_probe_backend,
++ .error = -ENODEV,
+ .bus = {
+ .name = "xen-backend",
+ .match = xenbus_match,
@@ -77191,8 +78341,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe_backend.c tmp-l
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_xs.c
--- pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_xs.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_xs.c 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,880 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_xs.c 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,886 @@
+/******************************************************************************
+ * xenbus_xs.c
+ *
@@ -77246,6 +78396,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xe
+#include <xen/platform-compat.h>
+#endif
+
++#ifndef PF_NOFREEZE /* Old kernel (pre-2.6.6). */
++#define PF_NOFREEZE 0
++#endif
++
+struct xs_stored_msg {
+ struct list_head list;
+
@@ -77913,6 +79067,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xe
+ struct list_head *ent;
+ struct xs_stored_msg *msg;
+
++ current->flags |= PF_NOFREEZE;
+ for (;;) {
+ wait_event_interruptible(watch_events_waitq,
+ !list_empty(&watch_events));
@@ -77996,8 +79151,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xe
+ msg->u.watch.vec = split(body, msg->hdr.len,
+ &msg->u.watch.vec_size);
+ if (IS_ERR(msg->u.watch.vec)) {
-+ kfree(msg);
+ err = PTR_ERR(msg->u.watch.vec);
++ kfree(msg);
+ goto out;
+ }
+
@@ -78031,6 +79186,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xe
+{
+ int err;
+
++ current->flags |= PF_NOFREEZE;
+ for (;;) {
+ err = process_msg();
+ if (err)
@@ -78075,7 +79231,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xe
+}
diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.6-xen.patch/drivers/xen/xenoprof/xenoprofile.c
--- pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenoprof/xenoprofile.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenoprof/xenoprofile.c 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,500 @@
+/**
+ * @file xenoprofile.c
@@ -78579,7 +79735,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+}
diff -Nurp pristine-linux-2.6.18/fs/Kconfig tmp-linux-2.6-xen.patch/fs/Kconfig
--- pristine-linux-2.6.18/fs/Kconfig 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/fs/Kconfig 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/fs/Kconfig 2007-10-11 00:15:26.000000000 -0700
@@ -865,6 +865,7 @@ config TMPFS
config HUGETLBFS
bool "HugeTLB file system support"
@@ -78590,7 +79746,7 @@ diff -Nurp pristine-linux-2.6.18/fs/Kconfig tmp-linux-2.6-xen.patch/fs/Kconfig
ramfs. For architectures that support it, say Y here and read
diff -Nurp pristine-linux-2.6.18/fs/aio.c tmp-linux-2.6-xen.patch/fs/aio.c
--- pristine-linux-2.6.18/fs/aio.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/fs/aio.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/fs/aio.c 2007-10-15 11:42:06.000000000 -0700
@@ -34,6 +34,11 @@
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
@@ -78776,7 +79932,7 @@ diff -Nurp pristine-linux-2.6.18/fs/aio.c tmp-linux-2.6-xen.patch/fs/aio.c
io_destroy(ioctx);
diff -Nurp pristine-linux-2.6.18/fs/eventpoll.c tmp-linux-2.6-xen.patch/fs/eventpoll.c
--- pristine-linux-2.6.18/fs/eventpoll.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/fs/eventpoll.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/fs/eventpoll.c 2007-10-15 11:42:06.000000000 -0700
@@ -236,8 +236,6 @@ struct ep_pqueue {
static void ep_poll_safewake_init(struct poll_safewake *psw);
@@ -78853,7 +80009,7 @@ diff -Nurp pristine-linux-2.6.18/fs/eventpoll.c tmp-linux-2.6-xen.patch/fs/event
* Mark the inode dirty from the very beginning,
diff -Nurp pristine-linux-2.6.18/fs/proc/proc_misc.c tmp-linux-2.6-xen.patch/fs/proc/proc_misc.c
--- pristine-linux-2.6.18/fs/proc/proc_misc.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/fs/proc/proc_misc.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/fs/proc/proc_misc.c 2007-10-15 11:42:06.000000000 -0700
@@ -471,7 +471,7 @@ static int show_stat(struct seq_file *p,
(unsigned long long)cputime64_to_clock_t(irq),
(unsigned long long)cputime64_to_clock_t(softirq),
@@ -78865,7 +80021,7 @@ diff -Nurp pristine-linux-2.6.18/fs/proc/proc_misc.c tmp-linux-2.6-xen.patch/fs/
user = kstat_cpu(i).cpustat.user;
diff -Nurp pristine-linux-2.6.18/fs/proc/vmcore.c tmp-linux-2.6-xen.patch/fs/proc/vmcore.c
--- pristine-linux-2.6.18/fs/proc/vmcore.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/fs/proc/vmcore.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/fs/proc/vmcore.c 2007-10-15 11:42:06.000000000 -0700
@@ -514,7 +514,7 @@ static int __init parse_crash_elf64_head
/* Do some basic Verification. */
if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 ||
@@ -78875,9 +80031,22 @@ diff -Nurp pristine-linux-2.6.18/fs/proc/vmcore.c tmp-linux-2.6-xen.patch/fs/pro
ehdr.e_ident[EI_CLASS] != ELFCLASS64 ||
ehdr.e_ident[EI_VERSION] != EV_CURRENT ||
ehdr.e_version != EV_CURRENT ||
+diff -Nurp pristine-linux-2.6.18/include/asm-generic/pci.h tmp-linux-2.6-xen.patch/include/asm-generic/pci.h
+--- pristine-linux-2.6.18/include/asm-generic/pci.h 2006-09-19 20:42:06.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-generic/pci.h 2007-10-11 00:15:26.000000000 -0700
+@@ -43,7 +43,9 @@ pcibios_select_root(struct pci_dev *pdev
+ return root;
+ }
+
++#ifndef pcibios_scan_all_fns
+ #define pcibios_scan_all_fns(a, b) 0
++#endif
+
+ #ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
+ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
diff -Nurp pristine-linux-2.6.18/include/asm-generic/vmlinux.lds.h tmp-linux-2.6-xen.patch/include/asm-generic/vmlinux.lds.h
--- pristine-linux-2.6.18/include/asm-generic/vmlinux.lds.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-generic/vmlinux.lds.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-generic/vmlinux.lds.h 2007-10-15 11:42:06.000000000 -0700
@@ -194,3 +194,6 @@
.stab.index 0 : { *(.stab.index) } \
.stab.indexstr 0 : { *(.stab.indexstr) } \
@@ -78887,7 +80056,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-generic/vmlinux.lds.h tmp-linux-2.6
+ .notes : { *(.note.*) } :note
diff -Nurp pristine-linux-2.6.18/include/asm-i386/apic.h tmp-linux-2.6-xen.patch/include/asm-i386/apic.h
--- pristine-linux-2.6.18/include/asm-i386/apic.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/apic.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/apic.h 2007-10-11 00:15:26.000000000 -0700
@@ -119,10 +119,12 @@ extern void enable_NMI_through_LVT0 (voi
extern int disable_timer_pin_1;
@@ -78903,7 +80072,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/apic.h tmp-linux-2.6-xen.patch
diff -Nurp pristine-linux-2.6.18/include/asm-i386/fixmap.h tmp-linux-2.6-xen.patch/include/asm-i386/fixmap.h
--- pristine-linux-2.6.18/include/asm-i386/fixmap.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/fixmap.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/fixmap.h 2007-10-15 11:42:06.000000000 -0700
@@ -19,7 +19,7 @@
* Leave one empty page between vmalloc'ed areas and
* the start of the fixmap.
@@ -78924,7 +80093,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/fixmap.h tmp-linux-2.6-xen.pat
/*
diff -Nurp pristine-linux-2.6.18/include/asm-i386/kexec.h tmp-linux-2.6-xen.patch/include/asm-i386/kexec.h
--- pristine-linux-2.6.18/include/asm-i386/kexec.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/kexec.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/kexec.h 2007-10-11 00:15:26.000000000 -0700
@@ -1,6 +1,26 @@
#ifndef _I386_KEXEC_H
#define _I386_KEXEC_H
@@ -78991,7 +80160,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/kexec.h tmp-linux-2.6-xen.patc
#endif /* _I386_KEXEC_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-default/mach_traps.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-default/mach_traps.h
--- pristine-linux-2.6.18/include/asm-i386/mach-default/mach_traps.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-default/mach_traps.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-default/mach_traps.h 2007-10-11 00:15:26.000000000 -0700
@@ -15,6 +15,18 @@ static inline void clear_mem_error(unsig
outb(reason, 0x61);
}
@@ -79013,7 +80182,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-default/mach_traps.h tmp-
return inb(0x61);
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/agp.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/agp.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/agp.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/agp.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/agp.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,37 @@
+#ifndef AGP_H
+#define AGP_H 1
@@ -79054,7 +80223,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/agp.h tmp-linux-2
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/desc.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/desc.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/desc.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/desc.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/desc.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,164 @@
+#ifndef __ARCH_DESC_H
+#define __ARCH_DESC_H
@@ -79222,7 +80391,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/desc.h tmp-linux-
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/dma-mapping.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/dma-mapping.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/dma-mapping.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/dma-mapping.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/dma-mapping.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,157 @@
+#ifndef _ASM_I386_DMA_MAPPING_H
+#define _ASM_I386_DMA_MAPPING_H
@@ -79249,11 +80418,11 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/dma-mapping.h tmp
+}
+
+static inline int
-+range_straddles_page_boundary(void *p, size_t size)
++range_straddles_page_boundary(paddr_t p, size_t size)
+{
+ extern unsigned long *contiguous_bitmap;
-+ return (((((unsigned long)p & ~PAGE_MASK) + size) > PAGE_SIZE) &&
-+ !test_bit(__pa(p) >> PAGE_SHIFT, contiguous_bitmap));
++ return ((((p & ~PAGE_MASK) + size) > PAGE_SIZE) &&
++ !test_bit(p >> PAGE_SHIFT, contiguous_bitmap));
+}
+
+#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
@@ -79383,7 +80552,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/dma-mapping.h tmp
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/fixmap.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/fixmap.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/fixmap.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/fixmap.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/fixmap.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,155 @@
+/*
+ * fixmap.h: compile-time virtual memory allocation
@@ -79542,7 +80711,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/fixmap.h tmp-linu
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/floppy.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/floppy.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/floppy.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/floppy.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/floppy.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,147 @@
+/*
+ * Architecture specific parts of the Floppy driver
@@ -79693,7 +80862,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/floppy.h tmp-linu
+#endif /* __ASM_XEN_I386_FLOPPY_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/highmem.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/highmem.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/highmem.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/highmem.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/highmem.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,80 @@
+/*
+ * highmem.h: virtual kernel memory mappings for high memory
@@ -79777,7 +80946,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/highmem.h tmp-lin
+#endif /* _ASM_HIGHMEM_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hw_irq.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hw_irq.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hw_irq.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hw_irq.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hw_irq.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,72 @@
+#ifndef _ASM_HW_IRQ_H
+#define _ASM_HW_IRQ_H
@@ -79853,7 +81022,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hw_irq.h tmp-linu
+#endif /* _ASM_HW_IRQ_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypercall.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypercall.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypercall.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,407 @@
+/******************************************************************************
+ * hypercall.h
@@ -80264,8 +81433,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-l
+#endif /* __HYPERCALL_H__ */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypervisor.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypervisor.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypervisor.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypervisor.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,258 @@
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypervisor.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,265 @@
+/******************************************************************************
+ * hypervisor.h
+ *
@@ -80319,6 +81488,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypervisor.h tmp-
+# else
+# include <asm-generic/pgtable-nopmd.h>
+# endif
++#elif defined(__x86_64__) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
++# include <asm-generic/pgtable-nopud.h>
+#endif
+
+extern shared_info_t *HYPERVISOR_shared_info;
@@ -80387,6 +81558,11 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypervisor.h tmp-
+void xen_destroy_contiguous_region(
+ unsigned long vstart, unsigned int order);
+
++struct page;
++
++int xen_limit_pages_to_max_mfn(
++ struct page *pages, unsigned int order, unsigned int address_bits);
++
+/* Turn jiffies into Xen system time. */
+u64 jiffies_to_st(unsigned long jiffies);
+
@@ -80526,7 +81702,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypervisor.h tmp-
+#endif /* __HYPERVISOR_H__ */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/io.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/io.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/io.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/io.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/io.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,390 @@
+#ifndef _ASM_IO_H
+#define _ASM_IO_H
@@ -80920,7 +82096,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/io.h tmp-linux-2.
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/irqflags.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/irqflags.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/irqflags.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/irqflags.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/irqflags.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,127 @@
+/*
+ * include/asm-i386/irqflags.h
@@ -81051,7 +82227,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/irqflags.h tmp-li
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/maddr.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/maddr.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/maddr.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/maddr.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/maddr.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,193 @@
+#ifndef _I386_MADDR_H
+#define _I386_MADDR_H
@@ -81248,7 +82424,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/maddr.h tmp-linux
+#endif /* _I386_MADDR_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/mmu.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/mmu.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/mmu.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/mmu.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/mmu.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,29 @@
+#ifndef __i386_MMU_H
+#define __i386_MMU_H
@@ -81281,7 +82457,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/mmu.h tmp-linux-2
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/mmu_context.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/mmu_context.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/mmu_context.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/mmu_context.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/mmu_context.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,108 @@
+#ifndef __I386_SCHED_H
+#define __I386_SCHED_H
@@ -81393,8 +82569,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/mmu_context.h tmp
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/page.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/page.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/page.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/page.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,229 @@
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/page.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,235 @@
+#ifndef _I386_PAGE_H
+#define _I386_PAGE_H
+
@@ -81486,19 +82662,20 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/page.h tmp-linux-
+ (pgd_t) {((_x) & _PAGE_PRESENT) ? pte_phys_to_machine(_x) : (_x)}; })
+#define __pmd(x) ({ unsigned long long _x = (x); \
+ (pmd_t) {((_x) & _PAGE_PRESENT) ? pte_phys_to_machine(_x) : (_x)}; })
-+static inline unsigned long long pte_val_ma(pte_t x)
++static inline unsigned long long __pte_val(pte_t x)
+{
+ return ((unsigned long long)x.pte_high << 32) | x.pte_low;
+}
+static inline unsigned long long pte_val(pte_t x)
+{
-+ unsigned long long ret = pte_val_ma(x);
++ unsigned long long ret = __pte_val(x);
+ if (x.pte_low & _PAGE_PRESENT) ret = pte_machine_to_phys(ret);
+ return ret;
+}
++#define __pmd_val(x) ((x).pmd)
+static inline unsigned long long pmd_val(pmd_t x)
+{
-+ unsigned long long ret = x.pmd;
++ unsigned long long ret = __pmd_val(x);
+#if CONFIG_XEN_COMPAT <= 0x030002
+ if (ret) ret = pte_machine_to_phys(ret) | _PAGE_PRESENT;
+#else
@@ -81506,9 +82683,11 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/page.h tmp-linux-
+#endif
+ return ret;
+}
++#define __pud_val(x) __pgd_val((x).pgd)
++#define __pgd_val(x) ((x).pgd)
+static inline unsigned long long pgd_val(pgd_t x)
+{
-+ unsigned long long ret = x.pgd;
++ unsigned long long ret = __pgd_val(x);
+ if (ret & _PAGE_PRESENT) ret = pte_machine_to_phys(ret);
+ return ret;
+}
@@ -81520,17 +82699,20 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/page.h tmp-linux-
+#define pgprot_val(x) ((x).pgprot)
+#include <asm/maddr.h>
+#define boot_pte_t pte_t /* or would you rather have a typedef */
-+#define pte_val(x) (((x).pte_low & _PAGE_PRESENT) ? \
-+ machine_to_phys((x).pte_low) : \
-+ (x).pte_low)
-+#define pte_val_ma(x) ((x).pte_low)
++#define __pte_val(x) ((x).pte_low)
++#define pte_val(x) (__pte_val(x) & _PAGE_PRESENT ? \
++ machine_to_phys(__pte_val(x)) : \
++ __pte_val(x))
+#define __pte(x) ({ unsigned long _x = (x); \
+ (pte_t) {((_x) & _PAGE_PRESENT) ? phys_to_machine(_x) : (_x)}; })
++#define __pmd_val(x) __pud_val((x).pud)
++#define __pud_val(x) __pgd_val((x).pgd)
+#define __pgd(x) ({ unsigned long _x = (x); \
+ (pgd_t) {((_x) & _PAGE_PRESENT) ? phys_to_machine(_x) : (_x)}; })
++#define __pgd_val(x) ((x).pgd)
+static inline unsigned long pgd_val(pgd_t x)
+{
-+ unsigned long ret = x.pgd;
++ unsigned long ret = __pgd_val(x);
+#if CONFIG_XEN_COMPAT <= 0x030002
+ if (ret) ret = machine_to_phys(ret) | _PAGE_PRESENT;
+#else
@@ -81626,7 +82808,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/page.h tmp-linux-
+#endif /* _I386_PAGE_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/param.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/param.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/param.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/param.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/param.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,23 @@
+#ifndef _ASMi386_PARAM_H
+#define _ASMi386_PARAM_H
@@ -81653,8 +82835,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/param.h tmp-linux
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pci.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pci.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pci.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pci.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,146 @@
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pci.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,148 @@
+#ifndef __i386_PCI_H
+#define __i386_PCI_H
+
@@ -81671,7 +82853,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pci.h tmp-linux-2
+#else
+#define pcibios_assign_all_busses() 0
+#endif
-+#define pcibios_scan_all_fns(a, b) 0
++
++#include <asm/hypervisor.h>
++#define pcibios_scan_all_fns(a, b) (!is_initial_xendomain())
+
+extern unsigned long pci_mem_start;
+#define PCIBIOS_MIN_IO 0x1000
@@ -81803,7 +82987,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pci.h tmp-linux-2
+#endif /* __i386_PCI_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgalloc.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgalloc.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgalloc.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgalloc.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgalloc.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,59 @@
+#ifndef _I386_PGALLOC_H
+#define _I386_PGALLOC_H
@@ -81866,7 +83050,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgalloc.h tmp-lin
+#endif /* _I386_PGALLOC_H */
diff -Nurp pristine-linux-2.6.18/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
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,20 @@
+#ifndef _I386_PGTABLE_2LEVEL_DEFS_H
+#define _I386_PGTABLE_2LEVEL_DEFS_H
@@ -81890,17 +83074,19 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-2level-de
+#endif /* _I386_PGTABLE_2LEVEL_DEFS_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-2level.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-2level.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-2level.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-2level.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,118 @@
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-2level.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,120 @@
+#ifndef _I386_PGTABLE_2LEVEL_H
+#define _I386_PGTABLE_2LEVEL_H
+
+#include <asm-generic/pgtable-nopmd.h>
+
+#define pte_ERROR(e) \
-+ printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte_low)
++ printk("%s:%d: bad pte %08lx (pfn %05lx).\n", __FILE__, __LINE__, \
++ __pte_val(e), pte_pfn(e))
+#define pgd_ERROR(e) \
-+ printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
++ printk("%s:%d: bad pgd %08lx (pfn %05lx).\n", __FILE__, __LINE__, \
++ __pgd_val(e), pgd_val(e) >> PAGE_SHIFT)
+
+/*
+ * Certain architectures need to do special things when PTEs
@@ -82012,7 +83198,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-2level.h
+#endif /* _I386_PGTABLE_2LEVEL_H */
diff -Nurp pristine-linux-2.6.18/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
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,24 @@
+#ifndef _I386_PGTABLE_3LEVEL_DEFS_H
+#define _I386_PGTABLE_3LEVEL_DEFS_H
@@ -82040,8 +83226,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-3level-de
+#endif /* _I386_PGTABLE_3LEVEL_DEFS_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-3level.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-3level.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-3level.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-3level.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,206 @@
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-3level.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,209 @@
+#ifndef _I386_PGTABLE_3LEVEL_H
+#define _I386_PGTABLE_3LEVEL_H
+
@@ -82055,11 +83241,14 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-3level.h
+ */
+
+#define pte_ERROR(e) \
-+ printk("%s:%d: bad pte %p(%08lx%08lx).\n", __FILE__, __LINE__, &(e), (e).pte_high, (e).pte_low)
++ printk("%s:%d: bad pte %p(%016Lx pfn %08lx).\n", __FILE__, __LINE__, \
++ &(e), __pte_val(e), pte_pfn(e))
+#define pmd_ERROR(e) \
-+ printk("%s:%d: bad pmd %p(%016Lx).\n", __FILE__, __LINE__, &(e), pmd_val(e))
++ printk("%s:%d: bad pmd %p(%016Lx pfn %08Lx).\n", __FILE__, __LINE__, \
++ &(e), __pmd_val(e), (pmd_val(e) & PTE_MASK) >> PAGE_SHIFT)
+#define pgd_ERROR(e) \
-+ printk("%s:%d: bad pgd %p(%016Lx).\n", __FILE__, __LINE__, &(e), pgd_val(e))
++ printk("%s:%d: bad pgd %p(%016Lx pfn %08Lx).\n", __FILE__, __LINE__, \
++ &(e), __pgd_val(e), (pgd_val(e) & PTE_MASK) >> PAGE_SHIFT)
+
+#define pud_none(pud) 0
+#define pud_bad(pud) 0
@@ -82070,7 +83259,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-3level.h
+ */
+static inline int pte_x(pte_t pte)
+{
-+ return !(pte_val(pte) & _PAGE_NX);
++ return !(__pte_val(pte) & _PAGE_NX);
+}
+
+/*
@@ -82103,7 +83292,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-3level.h
+ ptep->pte_low = pte.pte_low;
+}
+#define set_pte_atomic(pteptr,pteval) \
-+ set_64bit((unsigned long long *)(pteptr),pte_val_ma(pteval))
++ set_64bit((unsigned long long *)(pteptr),__pte_val(pteval))
+
+#define set_pte_at(_mm,addr,ptep,pteval) do { \
+ if (((_mm) != current->mm && (_mm) != &init_mm) || \
@@ -82170,7 +83359,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-3level.h
+ pte_t pte = *ptep;
+ if (!pte_none(pte)) {
+ if (mm != &init_mm) {
-+ uint64_t val = pte_val_ma(pte);
++ uint64_t val = __pte_val(pte);
+ if (__cmpxchg64(ptep, val, 0) != val) {
+ /* xchg acts as a barrier before the setting of the high bits */
+ pte.pte_low = xchg(&ptep->pte_low, 0);
@@ -82250,8 +83439,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-3level.h
+#endif /* _I386_PGTABLE_3LEVEL_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,530 @@
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,531 @@
+#ifndef _I386_PGTABLE_H
+#define _I386_PGTABLE_H
+
@@ -82463,15 +83652,16 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable.h tmp-lin
+#define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE))
+
+/* To avoid harmful races, pmd_none(x) should check only the lower when PAE */
-+#define pmd_none(x) (!(unsigned long)pmd_val(x))
++#define pmd_none(x) (!(unsigned long)__pmd_val(x))
+#if CONFIG_XEN_COMPAT <= 0x030002
+/* pmd_present doesn't just test the _PAGE_PRESENT bit since wr.p.t.
+ can temporarily clear it. */
-+#define pmd_present(x) (pmd_val(x))
++#define pmd_present(x) (__pmd_val(x))
++#define pmd_bad(x) ((__pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER & ~_PAGE_PRESENT)) != (_KERNPG_TABLE & ~_PAGE_PRESENT))
+#else
-+#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
++#define pmd_present(x) (__pmd_val(x) & _PAGE_PRESENT)
++#define pmd_bad(x) ((__pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
+#endif
-+#define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER & ~_PAGE_PRESENT)) != (_KERNPG_TABLE & ~_PAGE_PRESENT))
+
+
+#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
@@ -82600,7 +83790,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable.h tmp-lin
+}
+
+#define pmd_large(pmd) \
-+((pmd_val(pmd) & (_PAGE_PSE|_PAGE_PRESENT)) == (_PAGE_PSE|_PAGE_PRESENT))
++((__pmd_val(pmd) & (_PAGE_PSE|_PAGE_PRESENT)) == (_PAGE_PSE|_PAGE_PRESENT))
+
+/*
+ * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD]
@@ -82784,7 +83974,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable.h tmp-lin
+#endif /* _I386_PGTABLE_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/processor.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/processor.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/processor.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/processor.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/processor.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,741 @@
+/*
+ * include/asm-i386/processor.h
@@ -83529,7 +84719,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/processor.h tmp-l
+#endif /* __ASM_I386_PROCESSOR_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/ptrace.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/ptrace.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/ptrace.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/ptrace.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/ptrace.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,90 @@
+#ifndef _I386_PTRACE_H
+#define _I386_PTRACE_H
@@ -83623,7 +84813,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/ptrace.h tmp-linu
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/scatterlist.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/scatterlist.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/scatterlist.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/scatterlist.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/scatterlist.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,22 @@
+#ifndef _I386_SCATTERLIST_H
+#define _I386_SCATTERLIST_H
@@ -83649,7 +84839,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/scatterlist.h tmp
+#endif /* !(_I386_SCATTERLIST_H) */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/segment.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/segment.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/segment.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/segment.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/segment.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,117 @@
+#ifndef _ASM_SEGMENT_H
+#define _ASM_SEGMENT_H
@@ -83770,7 +84960,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/segment.h tmp-lin
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/setup.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/setup.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/setup.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/setup.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/setup.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,81 @@
+/*
+ * Just a place holder. We don't want to have to test x86 before
@@ -83855,7 +85045,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/setup.h tmp-linux
+#endif /* _i386_SETUP_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/smp.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/smp.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/smp.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/smp.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/smp.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,103 @@
+#ifndef __ASM_SMP_H
+#define __ASM_SMP_H
@@ -83962,7 +85152,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/smp.h tmp-linux-2
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/spinlock.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/spinlock.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/spinlock.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/spinlock.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/spinlock.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,202 @@
+#ifndef __ASM_SPINLOCK_H
+#define __ASM_SPINLOCK_H
@@ -84168,7 +85358,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/spinlock.h tmp-li
+#endif /* __ASM_SPINLOCK_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/swiotlb.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/swiotlb.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/swiotlb.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/swiotlb.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/swiotlb.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,43 @@
+#ifndef _ASM_SWIOTLB_H
+#define _ASM_SWIOTLB_H 1
@@ -84215,7 +85405,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/swiotlb.h tmp-lin
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/synch_bitops.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/synch_bitops.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/synch_bitops.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/synch_bitops.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/synch_bitops.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,145 @@
+#ifndef __XEN_SYNCH_BITOPS_H__
+#define __XEN_SYNCH_BITOPS_H__
@@ -84364,7 +85554,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/synch_bitops.h tm
+#endif /* __XEN_SYNCH_BITOPS_H__ */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/system.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/system.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/system.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/system.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/system.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,488 @@
+#ifndef __ASM_SYSTEM_H
+#define __ASM_SYSTEM_H
@@ -84856,7 +86046,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/system.h tmp-linu
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/tlbflush.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/tlbflush.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/tlbflush.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/tlbflush.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/tlbflush.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,101 @@
+#ifndef _I386_TLBFLUSH_H
+#define _I386_TLBFLUSH_H
@@ -84961,7 +86151,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/tlbflush.h tmp-li
+#endif /* _I386_TLBFLUSH_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/vga.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/vga.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/vga.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/vga.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/vga.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,20 @@
+/*
+ * Access to VGA videoram
@@ -84985,7 +86175,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/vga.h tmp-linux-2
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/xenoprof.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/xenoprof.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/xenoprof.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/xenoprof.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/xenoprof.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * asm-i386/mach-xen/asm/xenoprof.h
@@ -85037,7 +86227,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/xenoprof.h tmp-li
+#endif /* __ASM_XENOPROF_H__ */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/irq_vectors.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/irq_vectors.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/irq_vectors.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/irq_vectors.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/irq_vectors.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,125 @@
+/*
+ * This file should contain #defines for all of the interrupt vector
@@ -85166,7 +86356,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/irq_vectors.h tmp-lin
+#endif /* _ASM_IRQ_VECTORS_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/mach_traps.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/mach_traps.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/mach_traps.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/mach_traps.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/mach_traps.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,33 @@
+/*
+ * include/asm-xen/asm-i386/mach-xen/mach_traps.h
@@ -85203,7 +86393,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/mach_traps.h tmp-linu
+#endif /* !_MACH_TRAPS_H */
diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/setup_arch.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/setup_arch.h
--- pristine-linux-2.6.18/include/asm-i386/mach-xen/setup_arch.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/setup_arch.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/setup_arch.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,5 @@
+/* Hook to call BIOS initialisation function */
+
@@ -85212,7 +86402,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/setup_arch.h tmp-linu
+void __init machine_specific_arch_setup(void);
diff -Nurp pristine-linux-2.6.18/include/asm-i386/page.h tmp-linux-2.6-xen.patch/include/asm-i386/page.h
--- pristine-linux-2.6.18/include/asm-i386/page.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/page.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/page.h 2007-10-15 11:42:06.000000000 -0700
@@ -122,7 +122,7 @@ extern int page_is_ram(unsigned long pag
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
@@ -85224,7 +86414,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/page.h tmp-linux-2.6-xen.patch
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
diff -Nurp pristine-linux-2.6.18/include/asm-i386/pgtable-2level-defs.h tmp-linux-2.6-xen.patch/include/asm-i386/pgtable-2level-defs.h
--- pristine-linux-2.6.18/include/asm-i386/pgtable-2level-defs.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/pgtable-2level-defs.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/pgtable-2level-defs.h 2007-10-15 11:42:06.000000000 -0700
@@ -1,6 +1,8 @@
#ifndef _I386_PGTABLE_2LEVEL_DEFS_H
#define _I386_PGTABLE_2LEVEL_DEFS_H
@@ -85236,7 +86426,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/pgtable-2level-defs.h tmp-linu
*/
diff -Nurp pristine-linux-2.6.18/include/asm-i386/pgtable-3level-defs.h tmp-linux-2.6-xen.patch/include/asm-i386/pgtable-3level-defs.h
--- pristine-linux-2.6.18/include/asm-i386/pgtable-3level-defs.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/pgtable-3level-defs.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-i386/pgtable-3level-defs.h 2007-10-15 11:42:06.000000000 -0700
@@ -1,6 +1,8 @@
#ifndef _I386_PGTABLE_3LEVEL_DEFS_H
#define _I386_PGTABLE_3LEVEL_DEFS_H
@@ -85248,7 +86438,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/pgtable-3level-defs.h tmp-linu
*/
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/agp.h tmp-linux-2.6-xen.patch/include/asm-ia64/agp.h
--- pristine-linux-2.6.18/include/asm-ia64/agp.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/agp.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/agp.h 2007-10-11 00:15:26.000000000 -0700
@@ -19,13 +19,44 @@
#define flush_agp_cache() mb()
@@ -85296,7 +86486,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/agp.h tmp-linux-2.6-xen.patch/
#endif /* _ASM_IA64_AGP_H */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/dma-mapping.h tmp-linux-2.6-xen.patch/include/asm-ia64/dma-mapping.h
--- pristine-linux-2.6.18/include/asm-ia64/dma-mapping.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/dma-mapping.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/dma-mapping.h 2007-10-11 00:15:26.000000000 -0700
@@ -6,7 +6,14 @@
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
@@ -85399,13 +86589,13 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/dma-mapping.h tmp-linux-2.6-xe
#endif /* _ASM_IA64_DMA_MAPPING_H */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/fixmap.h tmp-linux-2.6-xen.patch/include/asm-ia64/fixmap.h
--- pristine-linux-2.6.18/include/asm-ia64/fixmap.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/fixmap.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/fixmap.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,2 @@
+#define clear_fixmap(x) do {} while (0)
+#define set_fixmap(x,y) do {} while (0)
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/gcc_intrin.h tmp-linux-2.6-xen.patch/include/asm-ia64/gcc_intrin.h
--- pristine-linux-2.6.18/include/asm-ia64/gcc_intrin.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/gcc_intrin.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/gcc_intrin.h 2007-10-11 00:15:26.000000000 -0700
@@ -26,7 +26,7 @@ extern void ia64_bad_param_for_getreg (v
register unsigned long ia64_r13 asm ("r13") __attribute_used__;
@@ -85597,7 +86787,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/gcc_intrin.h tmp-linux-2.6-xen
#endif /* _ASM_IA64_GCC_INTRIN_H */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hw_irq.h tmp-linux-2.6-xen.patch/include/asm-ia64/hw_irq.h
--- pristine-linux-2.6.18/include/asm-ia64/hw_irq.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/hw_irq.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/hw_irq.h 2007-10-11 00:15:26.000000000 -0700
@@ -15,7 +15,11 @@
#include <asm/ptrace.h>
#include <asm/smp.h>
@@ -85625,8 +86815,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hw_irq.h tmp-linux-2.6-xen.pat
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypercall.h tmp-linux-2.6-xen.patch/include/asm-ia64/hypercall.h
--- pristine-linux-2.6.18/include/asm-ia64/hypercall.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/hypercall.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,416 @@
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/hypercall.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,425 @@
+/******************************************************************************
+ * hypercall.h
+ *
@@ -85786,9 +86976,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypercall.h tmp-linux-2.6-xen.
+}
+
+static inline int
-+xencomm_arch_hypercall_acm_op(unsigned int cmd, struct xencomm_handle *arg)
++xencomm_arch_hypercall_acm_op(struct xencomm_handle *arg)
+{
-+ return _hypercall2(int, acm_op, cmd, arg);
++ return _hypercall1(int, acm_op, arg);
+}
+
+static inline int
@@ -86011,6 +87201,15 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypercall.h tmp-linux-2.6-xen.
+ IA64_DOM0VP_perfmon, cmd, arg, count);
+}
+
++static inline int
++HYPERVISOR_add_io_space(unsigned long phys_base,
++ unsigned long sparse,
++ unsigned long space_number)
++{
++ return _hypercall4(int, ia64_dom0vp_op, IA64_DOM0VP_add_io_space,
++ phys_base, sparse, space_number);
++}
++
+// for balloon driver
+#define HYPERVISOR_update_va_mapping(va, new_val, flags) (0)
+
@@ -86045,8 +87244,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypercall.h tmp-linux-2.6-xen.
+#endif /* __HYPERCALL_H__ */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypervisor.h tmp-linux-2.6-xen.patch/include/asm-ia64/hypervisor.h
--- pristine-linux-2.6.18/include/asm-ia64/hypervisor.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/hypervisor.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,223 @@
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/hypervisor.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,226 @@
+/******************************************************************************
+ * hypervisor.h
+ *
@@ -86215,6 +87414,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypervisor.h tmp-linux-2.6-xen
+ __xen_destroy_contiguous_region(vstart, order);
+}
+
++/* For drivers/xen/core/machine_reboot.c */
++#define HAVE_XEN_POST_SUSPEND
++void xen_post_suspend(int suspend_cancelled);
+#endif /* !CONFIG_VMX_GUEST */
+
+// for netfront.c, netback.c
@@ -86272,7 +87474,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypervisor.h tmp-linux-2.6-xen
+#endif /* __HYPERVISOR_H__ */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/intel_intrin.h tmp-linux-2.6-xen.patch/include/asm-ia64/intel_intrin.h
--- pristine-linux-2.6.18/include/asm-ia64/intel_intrin.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/intel_intrin.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/intel_intrin.h 2007-10-11 00:15:26.000000000 -0700
@@ -16,8 +16,8 @@
* intrinsic
*/
@@ -86396,7 +87598,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/intel_intrin.h tmp-linux-2.6-x
#endif /* _ASM_IA64_INTEL_INTRIN_H */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/io.h tmp-linux-2.6-xen.patch/include/asm-ia64/io.h
--- pristine-linux-2.6.18/include/asm-ia64/io.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/io.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/io.h 2007-10-11 00:15:26.000000000 -0700
@@ -66,9 +66,11 @@ extern unsigned int num_io_spaces;
#define PIO_RESERVED __IA64_UNCACHED_OFFSET
#define HAVE_ARCH_PIO_SIZE
@@ -86456,7 +87658,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/io.h tmp-linux-2.6-xen.patch/i
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/iosapic.h tmp-linux-2.6-xen.patch/include/asm-ia64/iosapic.h
--- pristine-linux-2.6.18/include/asm-ia64/iosapic.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/iosapic.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/iosapic.h 2007-10-11 00:15:26.000000000 -0700
@@ -53,6 +53,7 @@
#define NR_IOSAPICS 256
@@ -86475,7 +87677,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/iosapic.h tmp-linux-2.6-xen.pa
{
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/irq.h tmp-linux-2.6-xen.patch/include/asm-ia64/irq.h
--- pristine-linux-2.6.18/include/asm-ia64/irq.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/irq.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/irq.h 2007-10-11 00:15:26.000000000 -0700
@@ -11,8 +11,41 @@
* 02/29/00 D.Mosberger moved most things into hw_irq.h
*/
@@ -86520,7 +87722,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/irq.h tmp-linux-2.6-xen.patch/
irq_canonicalize (int irq)
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/machvec_dig.h tmp-linux-2.6-xen.patch/include/asm-ia64/machvec_dig.h
--- pristine-linux-2.6.18/include/asm-ia64/machvec_dig.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/machvec_dig.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/machvec_dig.h 2007-10-11 00:15:26.000000000 -0700
@@ -13,4 +13,19 @@ extern ia64_mv_setup_t dig_setup;
#define platform_name "dig"
#define platform_setup dig_setup
@@ -86543,7 +87745,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/machvec_dig.h tmp-linux-2.6-xe
#endif /* _ASM_IA64_MACHVEC_DIG_h */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/maddr.h tmp-linux-2.6-xen.patch/include/asm-ia64/maddr.h
--- pristine-linux-2.6.18/include/asm-ia64/maddr.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/maddr.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/maddr.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,98 @@
+#ifndef _ASM_IA64_MADDR_H
+#define _ASM_IA64_MADDR_H
@@ -86645,7 +87847,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/maddr.h tmp-linux-2.6-xen.patc
+#endif /* _ASM_IA64_MADDR_H */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/meminit.h tmp-linux-2.6-xen.patch/include/asm-ia64/meminit.h
--- pristine-linux-2.6.18/include/asm-ia64/meminit.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/meminit.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/meminit.h 2007-10-11 00:15:26.000000000 -0700
@@ -16,10 +16,15 @@
* - command line string
* - kernel code & data
@@ -86664,7 +87866,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/meminit.h tmp-linux-2.6-xen.pa
unsigned long start; /* virtual address of beginning of element */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/page.h tmp-linux-2.6-xen.patch/include/asm-ia64/page.h
--- pristine-linux-2.6.18/include/asm-ia64/page.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/page.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/page.h 2007-10-11 00:15:26.000000000 -0700
@@ -119,6 +119,7 @@ extern struct page *vmem_map;
#endif
@@ -86711,7 +87913,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/page.h tmp-linux-2.6-xen.patch
#endif /* _ASM_IA64_PAGE_H */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/pal.h tmp-linux-2.6-xen.patch/include/asm-ia64/pal.h
--- pristine-linux-2.6.18/include/asm-ia64/pal.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/pal.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/pal.h 2007-10-11 00:15:26.000000000 -0700
@@ -82,6 +82,7 @@
#ifndef __ASSEMBLY__
@@ -86722,7 +87924,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/pal.h tmp-linux-2.6-xen.patch/
/*
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/pgalloc.h tmp-linux-2.6-xen.patch/include/asm-ia64/pgalloc.h
--- pristine-linux-2.6.18/include/asm-ia64/pgalloc.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/pgalloc.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/pgalloc.h 2007-10-11 00:15:26.000000000 -0700
@@ -125,7 +125,11 @@ static inline void pmd_free(pmd_t * pmd)
static inline void
pmd_populate(struct mm_struct *mm, pmd_t * pmd_entry, struct page *pte)
@@ -86737,7 +87939,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/pgalloc.h tmp-linux-2.6-xen.pa
static inline void
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/privop.h tmp-linux-2.6-xen.patch/include/asm-ia64/privop.h
--- pristine-linux-2.6.18/include/asm-ia64/privop.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/privop.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/privop.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,60 @@
+#ifndef _ASM_IA64_PRIVOP_H
+#define _ASM_IA64_PRIVOP_H
@@ -86801,7 +88003,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/privop.h tmp-linux-2.6-xen.pat
+#endif /* _ASM_IA64_PRIVOP_H */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/processor.h tmp-linux-2.6-xen.patch/include/asm-ia64/processor.h
--- pristine-linux-2.6.18/include/asm-ia64/processor.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/processor.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/processor.h 2007-10-11 00:15:26.000000000 -0700
@@ -18,6 +18,7 @@
#include <asm/kregs.h>
#include <asm/ptrace.h>
@@ -86812,7 +88014,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/processor.h tmp-linux-2.6-xen.
/*
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/sal.h tmp-linux-2.6-xen.patch/include/asm-ia64/sal.h
--- pristine-linux-2.6.18/include/asm-ia64/sal.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/sal.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/sal.h 2007-10-11 00:15:26.000000000 -0700
@@ -42,6 +42,9 @@
#include <asm/pal.h>
#include <asm/system.h>
@@ -86841,7 +88043,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/sal.h tmp-linux-2.6-xen.patch/
+
+ if (xencomm_create(sal_info,
+ ia64_sal_get_state_info_size(sal_info_type),
-+ &desc, GFP_KERNEL))
++ &desc, GFP_ATOMIC))
+ return 0;
+
+ SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
@@ -86854,7 +88056,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/sal.h tmp-linux-2.6-xen.patch/
if (isrv.status)
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/swiotlb.h tmp-linux-2.6-xen.patch/include/asm-ia64/swiotlb.h
--- pristine-linux-2.6.18/include/asm-ia64/swiotlb.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/swiotlb.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/swiotlb.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,41 @@
+#ifndef _ASM_SWIOTLB_H
+#define _ASM_SWIOTLB_H 1
@@ -86899,7 +88101,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/swiotlb.h tmp-linux-2.6-xen.pa
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/synch_bitops.h tmp-linux-2.6-xen.patch/include/asm-ia64/synch_bitops.h
--- pristine-linux-2.6.18/include/asm-ia64/synch_bitops.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/synch_bitops.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/synch_bitops.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,61 @@
+#ifndef __XEN_SYNCH_BITOPS_H__
+#define __XEN_SYNCH_BITOPS_H__
@@ -86964,7 +88166,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/synch_bitops.h tmp-linux-2.6-x
+#endif /* __XEN_SYNCH_BITOPS_H__ */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/system.h tmp-linux-2.6-xen.patch/include/asm-ia64/system.h
--- pristine-linux-2.6.18/include/asm-ia64/system.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/system.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/system.h 2007-10-11 00:15:26.000000000 -0700
@@ -123,7 +123,7 @@ extern struct ia64_boot_param {
#define __local_irq_save(x) \
do { \
@@ -86985,7 +88187,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/system.h tmp-linux-2.6-xen.pat
({ \
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/uaccess.h tmp-linux-2.6-xen.patch/include/asm-ia64/uaccess.h
--- pristine-linux-2.6.18/include/asm-ia64/uaccess.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/uaccess.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/uaccess.h 2007-10-11 00:15:26.000000000 -0700
@@ -365,6 +365,7 @@ ia64_done_with_exception (struct pt_regs
}
@@ -87022,7 +88224,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/uaccess.h tmp-linux-2.6-xen.pa
* Convert a virtual cached kernel memory pointer to an uncached pointer
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen.patch/include/asm-ia64/xen/privop.h
--- pristine-linux-2.6.18/include/asm-ia64/xen/privop.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/xen/privop.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/xen/privop.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,310 @@
+#ifndef _ASM_IA64_XEN_PRIVOP_H
+#define _ASM_IA64_XEN_PRIVOP_H
@@ -87336,7 +88538,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+#endif /* _ASM_IA64_XEN_PRIVOP_H */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/xcom_hcall.h tmp-linux-2.6-xen.patch/include/asm-ia64/xen/xcom_hcall.h
--- pristine-linux-2.6.18/include/asm-ia64/xen/xcom_hcall.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/xen/xcom_hcall.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/xen/xcom_hcall.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2006 Tristan Gingold <tristan.gingold@bull.net>, Bull SAS
@@ -87428,7 +88630,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/xcom_hcall.h tmp-linux-2.6
+#endif /* _LINUX_XENCOMM_HCALL_H_ */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/xencomm.h tmp-linux-2.6-xen.patch/include/asm-ia64/xen/xencomm.h
--- pristine-linux-2.6.18/include/asm-ia64/xen/xencomm.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/xen/xencomm.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/xen/xencomm.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2006 Hollis Blanchard <hollisb@us.ibm.com>, IBM Corporation
@@ -87492,7 +88694,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/xencomm.h tmp-linux-2.6-xe
+#endif /* _LINUX_XENCOMM_H_ */
diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xenoprof.h tmp-linux-2.6-xen.patch/include/asm-ia64/xenoprof.h
--- pristine-linux-2.6.18/include/asm-ia64/xenoprof.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-ia64/xenoprof.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-ia64/xenoprof.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * asm-ia64/xenoprof.h
@@ -87544,7 +88746,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xenoprof.h tmp-linux-2.6-xen.p
+#endif /* __ASM_XENOPROF_H__ */
diff -Nurp pristine-linux-2.6.18/include/asm-um/page.h tmp-linux-2.6-xen.patch/include/asm-um/page.h
--- pristine-linux-2.6.18/include/asm-um/page.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-um/page.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-um/page.h 2007-10-11 00:15:26.000000000 -0700
@@ -114,7 +114,7 @@ extern unsigned long uml_physmem;
extern struct page *arch_validate(struct page *page, gfp_t mask, int order);
#define HAVE_ARCH_VALIDATE
@@ -87556,7 +88758,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-um/page.h tmp-linux-2.6-xen.patch/i
#include <asm-generic/memory_model.h>
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/apic.h tmp-linux-2.6-xen.patch/include/asm-x86_64/apic.h
--- pristine-linux-2.6.18/include/asm-x86_64/apic.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/apic.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/apic.h 2007-10-11 00:15:26.000000000 -0700
@@ -98,11 +98,13 @@ extern void setup_APIC_extened_lvt(unsig
extern int disable_timer_pin_1;
@@ -87573,7 +88775,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/apic.h tmp-linux-2.6-xen.pat
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/kexec.h tmp-linux-2.6-xen.patch/include/asm-x86_64/kexec.h
--- pristine-linux-2.6.18/include/asm-x86_64/kexec.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/kexec.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/kexec.h 2007-10-11 00:15:26.000000000 -0700
@@ -1,6 +1,27 @@
#ifndef _X86_64_KEXEC_H
#define _X86_64_KEXEC_H
@@ -87630,7 +88832,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/kexec.h tmp-linux-2.6-xen.pa
#endif /* _X86_64_KEXEC_H */
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/agp.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/agp.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/agp.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/agp.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/agp.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,35 @@
+#ifndef AGP_H
+#define AGP_H 1
@@ -87669,7 +88871,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/agp.h tmp-linux
+#endif
diff -Nurp pristine-linux-2.6.18/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
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/arch_hooks.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/arch_hooks.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/arch_hooks.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,27 @@
+#ifndef _ASM_ARCH_HOOKS_H
+#define _ASM_ARCH_HOOKS_H
@@ -87700,7 +88902,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/arch_hooks.h tm
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/bootsetup.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/bootsetup.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/bootsetup.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/bootsetup.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/bootsetup.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,42 @@
+
+#ifndef _X86_64_BOOTSETUP_H
@@ -87746,7 +88948,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/bootsetup.h tmp
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/desc.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/desc.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/desc.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/desc.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/desc.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,263 @@
+/* Written 2000 by Andi Kleen */
+#ifndef __ARCH_DESC_H
@@ -88013,7 +89215,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/desc.h tmp-linu
+#endif
diff -Nurp pristine-linux-2.6.18/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
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/dma-mapping.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/dma-mapping.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/dma-mapping.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,207 @@
+#ifndef _X8664_DMA_MAPPING_H
+#define _X8664_DMA_MAPPING_H 1
@@ -88224,7 +89426,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/dma-mapping.h t
+#include <asm-i386/mach-xen/asm/dma-mapping.h>
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/e820.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/e820.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/e820.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/e820.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/e820.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,66 @@
+/*
+ * structures and definitions for the int 15, ax=e820 memory map
@@ -88294,7 +89496,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/e820.h tmp-linu
+#endif/*__E820_HEADER*/
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/fixmap.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/fixmap.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/fixmap.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/fixmap.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/fixmap.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,112 @@
+/*
+ * fixmap.h: compile-time virtual memory allocation
@@ -88410,7 +89612,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/fixmap.h tmp-li
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/floppy.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/floppy.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/floppy.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/floppy.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/floppy.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,206 @@
+/*
+ * Architecture specific parts of the Floppy driver
@@ -88620,7 +89822,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/floppy.h tmp-li
+#endif /* __ASM_XEN_X86_64_FLOPPY_H */
diff -Nurp pristine-linux-2.6.18/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
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hw_irq.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hw_irq.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hw_irq.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,136 @@
+#ifndef _ASM_HW_IRQ_H
+#define _ASM_HW_IRQ_H
@@ -88760,7 +89962,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hw_irq.h tmp-li
+#endif /* _ASM_HW_IRQ_H */
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hypercall.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypercall.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hypercall.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypercall.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypercall.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,406 @@
+/******************************************************************************
+ * hypercall.h
@@ -89170,13 +90372,13 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hypercall.h tmp
+#endif /* __HYPERCALL_H__ */
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hypervisor.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypervisor.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hypervisor.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypervisor.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypervisor.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,2 @@
+
+#include <asm-i386/mach-xen/asm/hypervisor.h>
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/io.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/io.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/io.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/io.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/io.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,330 @@
+#ifndef _ASM_IO_H
+#define _ASM_IO_H
@@ -89510,7 +90712,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/io.h tmp-linux-
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/irq.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/irq.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/irq.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/irq.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/irq.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,38 @@
+#ifndef _ASM_IRQ_H
+#define _ASM_IRQ_H
@@ -89552,7 +90754,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/irq.h tmp-linux
+#endif /* _ASM_IRQ_H */
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/irqflags.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/irqflags.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/irqflags.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/irqflags.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/irqflags.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,139 @@
+/*
+ * include/asm-x86_64/irqflags.h
@@ -89695,7 +90897,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/irqflags.h tmp-
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/maddr.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/maddr.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/maddr.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/maddr.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/maddr.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,161 @@
+#ifndef _X86_64_MADDR_H
+#define _X86_64_MADDR_H
@@ -89860,7 +91062,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/maddr.h tmp-lin
+
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/mmu.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/mmu.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/mmu.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/mmu.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/mmu.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,38 @@
+#ifndef __x86_64_MMU_H
+#define __x86_64_MMU_H
@@ -89902,7 +91104,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/mmu.h tmp-linux
+#endif
diff -Nurp pristine-linux-2.6.18/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
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/mmu_context.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/mmu_context.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/mmu_context.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,136 @@
+#ifndef __X86_64_MMU_CONTEXT_H
+#define __X86_64_MMU_CONTEXT_H
@@ -90042,7 +91244,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/mmu_context.h t
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/msr.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/msr.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/msr.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/msr.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/msr.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,399 @@
+#ifndef X86_64_MSR_H
+#define X86_64_MSR_H 1
@@ -90445,7 +91647,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/msr.h tmp-linux
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/nmi.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/nmi.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/nmi.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/nmi.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/nmi.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,93 @@
+/*
+ * linux/include/asm-i386/nmi.h
@@ -90542,8 +91744,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/nmi.h tmp-linux
+#endif /* ASM_NMI_H */
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/page.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/page.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/page.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/page.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,214 @@
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/page.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,217 @@
+#ifndef _X86_64_PAGE_H
+#define _X86_64_PAGE_H
+
@@ -90642,14 +91844,15 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/page.h tmp-linu
+
+typedef struct { unsigned long pgprot; } pgprot_t;
+
-+#define pte_val(x) (((x).pte & _PAGE_PRESENT) ? \
-+ pte_machine_to_phys((x).pte) : \
-+ (x).pte)
-+#define pte_val_ma(x) ((x).pte)
++#define __pte_val(x) ((x).pte)
++#define pte_val(x) ((__pte_val(x) & _PAGE_PRESENT) ? \
++ pte_machine_to_phys(__pte_val(x)) : \
++ __pte_val(x))
+
++#define __pmd_val(x) ((x).pmd)
+static inline unsigned long pmd_val(pmd_t x)
+{
-+ unsigned long ret = x.pmd;
++ unsigned long ret = __pmd_val(x);
+#if CONFIG_XEN_COMPAT <= 0x030002
+ if (ret) ret = pte_machine_to_phys(ret) | _PAGE_PRESENT;
+#else
@@ -90658,16 +91861,18 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/page.h tmp-linu
+ return ret;
+}
+
++#define __pud_val(x) ((x).pud)
+static inline unsigned long pud_val(pud_t x)
+{
-+ unsigned long ret = x.pud;
++ unsigned long ret = __pud_val(x);
+ if (ret & _PAGE_PRESENT) ret = pte_machine_to_phys(ret);
+ return ret;
+}
+
++#define __pgd_val(x) ((x).pgd)
+static inline unsigned long pgd_val(pgd_t x)
+{
-+ unsigned long ret = x.pgd;
++ unsigned long ret = __pgd_val(x);
+ if (ret & _PAGE_PRESENT) ret = pte_machine_to_phys(ret);
+ return ret;
+}
@@ -90760,8 +91965,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/page.h tmp-linu
+#endif /* _X86_64_PAGE_H */
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pci.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pci.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pci.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pci.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,166 @@
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pci.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,168 @@
+#ifndef __x8664_PCI_H
+#define __x8664_PCI_H
+
@@ -90780,7 +91985,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pci.h tmp-linux
+#else
+#define pcibios_assign_all_busses() 0
+#endif
-+#define pcibios_scan_all_fns(a, b) 0
++
++#include <asm/hypervisor.h>
++#define pcibios_scan_all_fns(a, b) (!is_initial_xendomain())
+
+extern unsigned long pci_mem_start;
+#define PCIBIOS_MIN_IO 0x1000
@@ -90930,7 +92137,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pci.h tmp-linux
+#endif /* __x8664_PCI_H */
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgalloc.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pgalloc.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgalloc.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pgalloc.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pgalloc.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,204 @@
+#ifndef _X86_64_PGALLOC_H
+#define _X86_64_PGALLOC_H
@@ -91080,8 +92287,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgalloc.h tmp-l
+ /*
+ * Set level3_user_pgt for vsyscall area
+ */
-+ set_pgd(__user_pgd(pgd) + pgd_index(VSYSCALL_START),
-+ mk_kernel_pgd(__pa_symbol(level3_user_pgt)));
++ set_pgd(__user_pgd(pgd) + pgd_index(VSYSCALL_START),
++ __pgd(__pa_symbol(level3_user_pgt) | _PAGE_TABLE));
+ return pgd;
+}
+
@@ -91138,8 +92345,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgalloc.h tmp-l
+#endif /* _X86_64_PGALLOC_H */
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pgtable.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pgtable.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,573 @@
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/pgtable.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,575 @@
+#ifndef _X86_64_PGTABLE_H
+#define _X86_64_PGTABLE_H
+
@@ -91224,16 +92431,20 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+#define PTRS_PER_PTE 512
+
+#define pte_ERROR(e) \
-+ printk("%s:%d: bad pte %p(%016lx).\n", __FILE__, __LINE__, &(e), pte_val(e))
++ printk("%s:%d: bad pte %p(%016lx pfn %010lx).\n", __FILE__, __LINE__, \
++ &(e), __pte_val(e), pte_pfn(e))
+#define pmd_ERROR(e) \
-+ printk("%s:%d: bad pmd %p(%016lx).\n", __FILE__, __LINE__, &(e), pmd_val(e))
++ printk("%s:%d: bad pmd %p(%016lx pfn %010lx).\n", __FILE__, __LINE__, \
++ &(e), __pmd_val(e), pmd_pfn(e))
+#define pud_ERROR(e) \
-+ printk("%s:%d: bad pud %p(%016lx).\n", __FILE__, __LINE__, &(e), pud_val(e))
++ printk("%s:%d: bad pud %p(%016lx pfn %010lx).\n", __FILE__, __LINE__, \
++ &(e), __pud_val(e), (pud_val(e) & __PHYSICAL_MASK) >> PAGE_SHIFT)
+#define pgd_ERROR(e) \
-+ printk("%s:%d: bad pgd %p(%016lx).\n", __FILE__, __LINE__, &(e), pgd_val(e))
++ printk("%s:%d: bad pgd %p(%016lx pfn %010lx).\n", __FILE__, __LINE__, \
++ &(e), __pgd_val(e), (pgd_val(e) & __PHYSICAL_MASK) >> PAGE_SHIFT)
+
-+#define pgd_none(x) (!pgd_val(x))
-+#define pud_none(x) (!pud_val(x))
++#define pgd_none(x) (!__pgd_val(x))
++#define pud_none(x) (!__pud_val(x))
+
+static inline void set_pte(pte_t *dst, pte_t val)
+{
@@ -91378,7 +92589,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+
+static inline unsigned long pgd_bad(pgd_t pgd)
+{
-+ unsigned long val = pgd_val(pgd);
++ unsigned long val = __pgd_val(pgd);
+ val &= ~PTE_MASK;
+ val &= ~(_PAGE_USER | _PAGE_DIRTY);
+ return val & ~(_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED);
@@ -91386,7 +92597,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+
+static inline unsigned long pud_bad(pud_t pud)
+{
-+ unsigned long val = pud_val(pud);
++ unsigned long val = __pud_val(pud);
+ val &= ~PTE_MASK;
+ val &= ~(_PAGE_USER | _PAGE_DIRTY);
+ return val & ~(_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED);
@@ -91464,8 +92675,6 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+ * The following only work if pte_present() is true.
+ * Undefined behaviour if not..
+ */
-+#define __pte_val(x) ((x).pte)
-+
+#define __LARGE_PTE (_PAGE_PSE|_PAGE_PRESENT)
+static inline int pte_user(pte_t pte) { return __pte_val(pte) & _PAGE_USER; }
+static inline int pte_read(pte_t pte) { return __pte_val(pte) & _PAGE_USER; }
@@ -91519,7 +92728,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+#define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) | _PAGE_PCD | _PAGE_PWT))
+
+static inline int pmd_large(pmd_t pte) {
-+ return (pmd_val(pte) & __LARGE_PTE) == __LARGE_PTE;
++ return (__pmd_val(pte) & __LARGE_PTE) == __LARGE_PTE;
+}
+
+
@@ -91536,14 +92745,14 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
+#define pgd_offset(mm, addr) ((mm)->pgd + pgd_index(addr))
+#define pgd_offset_k(address) (pgd_t *)(init_level4_pgt + pgd_index(address))
-+#define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT)
++#define pgd_present(pgd) (__pgd_val(pgd) & _PAGE_PRESENT)
+#define mk_kernel_pgd(address) __pgd((address) | _KERNPG_TABLE)
+
+/* PUD - Level3 access */
+/* to find an entry in a page-table-directory. */
+#define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1))
+#define pud_offset(pgd, address) ((pud_t *) pgd_page(*(pgd)) + pud_index(address))
-+#define pud_present(pud) (pud_val(pud) & _PAGE_PRESENT)
++#define pud_present(pud) (__pud_val(pud) & _PAGE_PRESENT)
+
+/* PMD - Level 2 access */
+#define pmd_page_kernel(pmd) ((unsigned long) __va(pmd_val(pmd) & PTE_MASK))
@@ -91552,21 +92761,21 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+#define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
+#define pmd_offset(dir, address) ((pmd_t *) pud_page(*(dir)) + \
+ pmd_index(address))
-+#define pmd_none(x) (!pmd_val(x))
++#define pmd_none(x) (!__pmd_val(x))
+#if CONFIG_XEN_COMPAT <= 0x030002
+/* pmd_present doesn't just test the _PAGE_PRESENT bit since wr.p.t.
+ can temporarily clear it. */
-+#define pmd_present(x) (pmd_val(x))
++#define pmd_present(x) (__pmd_val(x))
+#else
-+#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
++#define pmd_present(x) (__pmd_val(x) & _PAGE_PRESENT)
+#endif
+#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
-+#define pmd_bad(x) ((pmd_val(x) & ~(PTE_MASK | _PAGE_USER | _PAGE_PRESENT)) \
++#define pmd_bad(x) ((__pmd_val(x) & ~(PTE_MASK | _PAGE_USER | _PAGE_PRESENT)) \
+ != (_KERNPG_TABLE & ~(_PAGE_USER | _PAGE_PRESENT)))
+#define pfn_pmd(nr,prot) (__pmd(((nr) << PAGE_SHIFT) | pgprot_val(prot)))
+#define pmd_pfn(x) ((pmd_val(x) & __PHYSICAL_MASK) >> PAGE_SHIFT)
+
-+#define pte_to_pgoff(pte) ((pte_val(pte) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT)
++#define pte_to_pgoff(pte) ((__pte_val(pte) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT)
+#define pgoff_to_pte(off) ((pte_t) { ((off) << PAGE_SHIFT) | _PAGE_FILE })
+#define PTE_FILE_MAX_BITS __PHYSICAL_MASK_SHIFT
+
@@ -91574,7 +92783,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+
+/* page, protection -> pte */
+#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))
-+#define mk_pte_huge(entry) (pte_val(entry) |= _PAGE_PRESENT | _PAGE_PSE)
++#define mk_pte_huge(entry) (__pte_val(entry) |= _PAGE_PRESENT | _PAGE_PSE)
+
+/* physical address -> PTE */
+static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
@@ -91715,7 +92924,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+#endif /* _X86_64_PGTABLE_H */
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/processor.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/processor.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/processor.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/processor.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/processor.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,506 @@
+/*
+ * include/asm-x86_64/processor.h
@@ -92225,7 +93434,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/processor.h tmp
+#endif /* __ASM_X86_64_PROCESSOR_H */
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/ptrace.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/ptrace.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/ptrace.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/ptrace.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/ptrace.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,127 @@
+#ifndef _X86_64_PTRACE_H
+#define _X86_64_PTRACE_H
@@ -92356,7 +93565,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/ptrace.h tmp-li
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/smp.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/smp.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/smp.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/smp.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/smp.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,150 @@
+#ifndef __ASM_SMP_H
+#define __ASM_SMP_H
@@ -92510,13 +93719,13 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/smp.h tmp-linux
+
diff -Nurp pristine-linux-2.6.18/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
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/synch_bitops.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/synch_bitops.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/synch_bitops.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,2 @@
+
+#include <asm-i386/mach-xen/asm/synch_bitops.h>
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/system.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/system.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/system.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/system.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/system.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,262 @@
+#ifndef __ASM_SYSTEM_H
+#define __ASM_SYSTEM_H
@@ -92782,7 +93991,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/system.h tmp-li
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/timer.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/timer.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/timer.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/timer.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/timer.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,67 @@
+#ifndef _ASMi386_TIMER_H
+#define _ASMi386_TIMER_H
@@ -92853,7 +94062,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/timer.h tmp-lin
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/tlbflush.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/tlbflush.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/tlbflush.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/tlbflush.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/tlbflush.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,103 @@
+#ifndef _X8664_TLBFLUSH_H
+#define _X8664_TLBFLUSH_H
@@ -92960,7 +94169,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/tlbflush.h tmp-
+#endif /* _X8664_TLBFLUSH_H */
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/vga.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/vga.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/vga.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/vga.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/vga.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,20 @@
+/*
+ * Access to VGA videoram
@@ -92984,12 +94193,12 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/vga.h tmp-linux
+#endif
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/xenoprof.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/xenoprof.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/xenoprof.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/xenoprof.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/xenoprof.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1 @@
+#include <asm-i386/mach-xen/asm/xenoprof.h>
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/xor.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/xor.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/xor.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/xor.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/xor.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,328 @@
+/*
+ * x86-64 changes / gcc fixes from Andi Kleen.
@@ -93321,7 +94530,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/xor.h tmp-linux
+#define XOR_SELECT_TEMPLATE(FASTEST) (&xor_block_sse)
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/irq_vectors.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/irq_vectors.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/irq_vectors.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/irq_vectors.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/irq_vectors.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,123 @@
+/*
+ * This file should contain #defines for all of the interrupt vector
@@ -93448,7 +94657,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/irq_vectors.h tmp-l
+#endif /* _ASM_IRQ_VECTORS_H */
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/mach_time.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/mach_time.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/mach_time.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/mach_time.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/mach_time.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,111 @@
+/*
+ * include/asm-i386/mach-default/mach_time.h
@@ -93563,7 +94772,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/mach_time.h tmp-lin
+#endif /* !_MACH_TIME_H */
diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/mach_timer.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/mach_timer.h
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/mach_timer.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/mach_timer.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/mach_timer.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,50 @@
+/*
+ * include/asm-i386/mach-default/mach_timer.h
@@ -93617,7 +94826,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/mach_timer.h tmp-li
+#endif /* !_MACH_TIMER_H */
diff -Nurp pristine-linux-2.6.18/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
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/setup_arch_post.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/setup_arch_post.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/setup_arch_post.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,63 @@
+/**
+ * machine_specific_* - Hooks for machine specific setup.
@@ -93684,7 +94893,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/setup_arch_post.h t
+}
diff -Nurp pristine-linux-2.6.18/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
--- pristine-linux-2.6.18/include/asm-x86_64/mach-xen/setup_arch_pre.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/setup_arch_pre.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/setup_arch_pre.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,5 @@
+/* Hook to call BIOS initialisation function */
+
@@ -93693,7 +94902,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/setup_arch_pre.h tm
+static void __init machine_specific_arch_setup(void);
diff -Nurp pristine-linux-2.6.18/include/linux/aio.h tmp-linux-2.6-xen.patch/include/linux/aio.h
--- pristine-linux-2.6.18/include/linux/aio.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/linux/aio.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/linux/aio.h 2007-10-15 11:42:06.000000000 -0700
@@ -191,6 +191,11 @@ struct kioctx {
struct aio_ring_info ring_info;
@@ -93708,7 +94917,7 @@ diff -Nurp pristine-linux-2.6.18/include/linux/aio.h tmp-linux-2.6-xen.patch/inc
/* prototypes */
diff -Nurp pristine-linux-2.6.18/include/linux/crash_dump.h tmp-linux-2.6-xen.patch/include/linux/crash_dump.h
--- pristine-linux-2.6.18/include/linux/crash_dump.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/linux/crash_dump.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/linux/crash_dump.h 2007-10-15 11:42:06.000000000 -0700
@@ -14,5 +14,13 @@ extern ssize_t copy_oldmem_page(unsigned
extern const struct file_operations proc_vmcore_operations;
extern struct proc_dir_entry *proc_vmcore;
@@ -93725,7 +94934,7 @@ diff -Nurp pristine-linux-2.6.18/include/linux/crash_dump.h tmp-linux-2.6-xen.pa
#endif /* LINUX_CRASHDUMP_H */
diff -Nurp pristine-linux-2.6.18/include/linux/elfnote.h tmp-linux-2.6-xen.patch/include/linux/elfnote.h
--- pristine-linux-2.6.18/include/linux/elfnote.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/linux/elfnote.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/linux/elfnote.h 2007-10-15 11:42:06.000000000 -0700
@@ -0,0 +1,104 @@
+#ifndef _LINUX_ELFNOTE_H
+#define _LINUX_ELFNOTE_H
@@ -93833,7 +95042,7 @@ diff -Nurp pristine-linux-2.6.18/include/linux/elfnote.h tmp-linux-2.6-xen.patch
+#endif /* _LINUX_ELFNOTE_H */
diff -Nurp pristine-linux-2.6.18/include/linux/eventpoll.h tmp-linux-2.6-xen.patch/include/linux/eventpoll.h
--- pristine-linux-2.6.18/include/linux/eventpoll.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/linux/eventpoll.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/linux/eventpoll.h 2007-10-15 11:42:06.000000000 -0700
@@ -90,6 +90,12 @@ static inline void eventpoll_release(str
eventpoll_release_file(file);
}
@@ -93849,7 +95058,7 @@ diff -Nurp pristine-linux-2.6.18/include/linux/eventpoll.h tmp-linux-2.6-xen.pat
static inline void eventpoll_init_file(struct file *file) {}
diff -Nurp pristine-linux-2.6.18/include/linux/gfp.h tmp-linux-2.6-xen.patch/include/linux/gfp.h
--- pristine-linux-2.6.18/include/linux/gfp.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/linux/gfp.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/linux/gfp.h 2007-10-11 00:15:26.000000000 -0700
@@ -99,7 +99,11 @@ static inline int gfp_zone(gfp_t gfp)
*/
@@ -93865,7 +95074,7 @@ diff -Nurp pristine-linux-2.6.18/include/linux/gfp.h tmp-linux-2.6-xen.patch/inc
extern struct page *
diff -Nurp pristine-linux-2.6.18/include/linux/highmem.h tmp-linux-2.6-xen.patch/include/linux/highmem.h
--- pristine-linux-2.6.18/include/linux/highmem.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/linux/highmem.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/linux/highmem.h 2007-10-11 00:15:26.000000000 -0700
@@ -24,10 +24,16 @@ static inline void flush_kernel_dcache_p
/* declarations for linux/mm/highmem.c */
@@ -93885,7 +95094,7 @@ diff -Nurp pristine-linux-2.6.18/include/linux/highmem.h tmp-linux-2.6-xen.patch
{
diff -Nurp pristine-linux-2.6.18/include/linux/interrupt.h tmp-linux-2.6-xen.patch/include/linux/interrupt.h
--- pristine-linux-2.6.18/include/linux/interrupt.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/linux/interrupt.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/linux/interrupt.h 2007-10-11 00:15:26.000000000 -0700
@@ -166,6 +166,12 @@ static inline int disable_irq_wake(unsig
#endif /* CONFIG_GENERIC_HARDIRQS */
@@ -93901,7 +95110,7 @@ diff -Nurp pristine-linux-2.6.18/include/linux/interrupt.h tmp-linux-2.6-xen.pat
#define or_softirq_pending(x) (local_softirq_pending() |= (x))
diff -Nurp pristine-linux-2.6.18/include/linux/kexec.h tmp-linux-2.6-xen.patch/include/linux/kexec.h
--- pristine-linux-2.6.18/include/linux/kexec.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/linux/kexec.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/linux/kexec.h 2007-10-11 00:15:26.000000000 -0700
@@ -31,6 +31,13 @@
#error KEXEC_ARCH not defined
#endif
@@ -93931,7 +95140,7 @@ diff -Nurp pristine-linux-2.6.18/include/linux/kexec.h tmp-linux-2.6-xen.patch/i
struct kexec_segment __user *segments,
diff -Nurp pristine-linux-2.6.18/include/linux/mm.h tmp-linux-2.6-xen.patch/include/linux/mm.h
--- pristine-linux-2.6.18/include/linux/mm.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/linux/mm.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/linux/mm.h 2007-10-11 00:15:26.000000000 -0700
@@ -164,6 +164,9 @@ extern unsigned int kobjsize(const void
#define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */
#define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */
@@ -93969,7 +95178,7 @@ diff -Nurp pristine-linux-2.6.18/include/linux/mm.h tmp-linux-2.6-xen.patch/incl
#else
diff -Nurp pristine-linux-2.6.18/include/linux/oprofile.h tmp-linux-2.6-xen.patch/include/linux/oprofile.h
--- pristine-linux-2.6.18/include/linux/oprofile.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/linux/oprofile.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/linux/oprofile.h 2007-10-15 11:42:06.000000000 -0700
@@ -16,6 +16,8 @@
#include <linux/types.h>
#include <linux/spinlock.h>
@@ -94002,7 +95211,7 @@ diff -Nurp pristine-linux-2.6.18/include/linux/oprofile.h tmp-linux-2.6-xen.patc
* Create a file of the given name as a child of the given root, with
diff -Nurp pristine-linux-2.6.18/include/linux/page-flags.h tmp-linux-2.6-xen.patch/include/linux/page-flags.h
--- pristine-linux-2.6.18/include/linux/page-flags.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/linux/page-flags.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/linux/page-flags.h 2007-10-11 00:15:26.000000000 -0700
@@ -98,6 +98,8 @@
#define PG_uncached 31 /* Page has been mapped as uncached */
#endif
@@ -94033,7 +95242,7 @@ diff -Nurp pristine-linux-2.6.18/include/linux/page-flags.h tmp-linux-2.6-xen.pa
int test_clear_page_dirty(struct page *page);
diff -Nurp pristine-linux-2.6.18/include/linux/sched.h tmp-linux-2.6-xen.patch/include/linux/sched.h
--- pristine-linux-2.6.18/include/linux/sched.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/linux/sched.h 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/linux/sched.h 2007-10-15 11:42:06.000000000 -0700
@@ -211,10 +211,15 @@ extern void update_process_times(int use
extern void scheduler_tick(void);
@@ -94052,7 +95261,7 @@ diff -Nurp pristine-linux-2.6.18/include/linux/sched.h tmp-linux-2.6-xen.patch/i
}
diff -Nurp pristine-linux-2.6.18/include/linux/skbuff.h tmp-linux-2.6-xen.patch/include/linux/skbuff.h
--- pristine-linux-2.6.18/include/linux/skbuff.h 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/include/linux/skbuff.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/linux/skbuff.h 2007-10-11 00:15:26.000000000 -0700
@@ -203,6 +203,8 @@ enum {
* @local_df: allow local fragmentation
* @cloned: Head may be cloned (check refcnt to be sure)
@@ -94078,7 +95287,7 @@ diff -Nurp pristine-linux-2.6.18/include/linux/skbuff.h tmp-linux-2.6-xen.patch/
void (*destructor)(struct sk_buff *skb);
diff -Nurp pristine-linux-2.6.18/include/xen/balloon.h tmp-linux-2.6-xen.patch/include/xen/balloon.h
--- pristine-linux-2.6.18/include/xen/balloon.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/balloon.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/balloon.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * balloon.h
@@ -94139,7 +95348,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/balloon.h tmp-linux-2.6-xen.patch/i
+#endif /* __ASM_BALLOON_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/blkif.h tmp-linux-2.6-xen.patch/include/xen/blkif.h
--- pristine-linux-2.6.18/include/xen/blkif.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/blkif.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/blkif.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,97 @@
+#ifndef __XEN_BLKIF_H__
+#define __XEN_BLKIF_H__
@@ -94240,8 +95449,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/blkif.h tmp-linux-2.6-xen.patch/inc
+#endif /* __XEN_BLKIF_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/cpu_hotplug.h tmp-linux-2.6-xen.patch/include/xen/cpu_hotplug.h
--- pristine-linux-2.6.18/include/xen/cpu_hotplug.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/cpu_hotplug.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,44 @@
++++ tmp-linux-2.6-xen.patch/include/xen/cpu_hotplug.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,41 @@
+#ifndef __XEN_CPU_HOTPLUG_H__
+#define __XEN_CPU_HOTPLUG_H__
+
@@ -94250,9 +95459,6 @@ diff -Nurp pristine-linux-2.6.18/include/xen/cpu_hotplug.h tmp-linux-2.6-xen.pat
+
+#if defined(CONFIG_X86) && defined(CONFIG_SMP)
+extern cpumask_t cpu_initialized_map;
-+#define cpu_set_initialized(cpu) cpu_set(cpu, cpu_initialized_map)
-+#else
-+#define cpu_set_initialized(cpu) ((void)0)
+#endif
+
+#if defined(CONFIG_HOTPLUG_CPU)
@@ -94288,7 +95494,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/cpu_hotplug.h tmp-linux-2.6-xen.pat
+#endif /* __XEN_CPU_HOTPLUG_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/driver_util.h tmp-linux-2.6-xen.patch/include/xen/driver_util.h
--- pristine-linux-2.6.18/include/xen/driver_util.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/driver_util.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/driver_util.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,14 @@
+
+#ifndef __ASM_XEN_DRIVER_UTIL_H__
@@ -94306,7 +95512,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/driver_util.h tmp-linux-2.6-xen.pat
+#endif /* __ASM_XEN_DRIVER_UTIL_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/evtchn.h tmp-linux-2.6-xen.patch/include/xen/evtchn.h
--- pristine-linux-2.6.18/include/xen/evtchn.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/evtchn.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/evtchn.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,126 @@
+/******************************************************************************
+ * evtchn.h
@@ -94436,7 +95642,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/evtchn.h tmp-linux-2.6-xen.patch/in
+#endif /* __ASM_EVTCHN_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/features.h tmp-linux-2.6-xen.patch/include/xen/features.h
--- pristine-linux-2.6.18/include/xen/features.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/features.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/features.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,20 @@
+/******************************************************************************
+ * features.h
@@ -94460,7 +95666,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/features.h tmp-linux-2.6-xen.patch/
+#endif /* __ASM_XEN_FEATURES_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/gnttab.h tmp-linux-2.6-xen.patch/include/xen/gnttab.h
--- pristine-linux-2.6.18/include/xen/gnttab.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/gnttab.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/gnttab.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,138 @@
+/******************************************************************************
+ * gnttab.h
@@ -94602,7 +95808,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/gnttab.h tmp-linux-2.6-xen.patch/in
+#endif /* __ASM_GNTTAB_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/hvm.h tmp-linux-2.6-xen.patch/include/xen/hvm.h
--- pristine-linux-2.6.18/include/xen/hvm.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/hvm.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/hvm.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,23 @@
+/* Simple wrappers around HVM functions */
+#ifndef XEN_HVM_H__
@@ -94629,7 +95835,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/hvm.h tmp-linux-2.6-xen.patch/inclu
+#endif /* XEN_HVM_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/hypercall.h tmp-linux-2.6-xen.patch/include/xen/hypercall.h
--- pristine-linux-2.6.18/include/xen/hypercall.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/hypercall.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/hypercall.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,24 @@
+#ifndef __XEN_HYPERCALL_H__
+#define __XEN_HYPERCALL_H__
@@ -94657,8 +95863,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/hypercall.h tmp-linux-2.6-xen.patch
+#endif /* __XEN_HYPERCALL_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/hypervisor_sysfs.h tmp-linux-2.6-xen.patch/include/xen/hypervisor_sysfs.h
--- pristine-linux-2.6.18/include/xen/hypervisor_sysfs.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/hypervisor_sysfs.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,32 @@
++++ tmp-linux-2.6-xen.patch/include/xen/hypervisor_sysfs.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,30 @@
+/*
+ * copyright (c) 2006 IBM Corporation
+ * Authored by: Mike D. Day <ncmike@us.ibm.com>
@@ -94681,8 +95887,6 @@ diff -Nurp pristine-linux-2.6.18/include/xen/hypervisor_sysfs.h tmp-linux-2.6-xe
+static struct hyp_sysfs_attr _name##_attr = \
+ __ATTR(_name, 0644, _name##_show, _name##_store)
+
-+extern struct subsystem hypervisor_subsys;
-+
+struct hyp_sysfs_attr {
+ struct attribute attr;
+ ssize_t (*show)(struct hyp_sysfs_attr *, char *);
@@ -94693,7 +95897,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/hypervisor_sysfs.h tmp-linux-2.6-xe
+#endif /* _HYP_SYSFS_H_ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/COPYING tmp-linux-2.6-xen.patch/include/xen/interface/COPYING
--- pristine-linux-2.6.18/include/xen/interface/COPYING 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/COPYING 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/COPYING 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,38 @@
+XEN NOTICE
+==========
@@ -94735,7 +95939,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/COPYING tmp-linux-2.6-xen
+DEALINGS IN THE SOFTWARE.
diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm.h tmp-linux-2.6-xen.patch/include/xen/interface/acm.h
--- pristine-linux-2.6.18/include/xen/interface/acm.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/acm.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/acm.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,228 @@
+/*
+ * acm.h: Xen access control module interface defintions
@@ -94967,8 +96171,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm.h tmp-linux-2.6-xen.p
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm_ops.h tmp-linux-2.6-xen.patch/include/xen/interface/acm_ops.h
--- pristine-linux-2.6.18/include/xen/interface/acm_ops.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/acm_ops.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,166 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/acm_ops.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,159 @@
+/*
+ * acm_ops.h: Xen access control module hypervisor commands
+ *
@@ -95005,7 +96209,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm_ops.h tmp-linux-2.6-x
+ * This makes sure that old versions of acm tools will stop working in a
+ * well-defined way (rather than crashing the machine, for instance).
+ */
-+#define ACM_INTERFACE_VERSION 0xAAAA0009
++#define ACM_INTERFACE_VERSION 0xAAAA000A
+
+/************************************************************************/
+
@@ -95020,7 +96224,6 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm_ops.h tmp-linux-2.6-x
+#define ACMOP_setpolicy 1
+struct acm_setpolicy {
+ /* IN */
-+ uint32_t interface_version;
+ XEN_GUEST_HANDLE_64(void) pushcache;
+ uint32_t pushcache_size;
+};
@@ -95029,7 +96232,6 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm_ops.h tmp-linux-2.6-x
+#define ACMOP_getpolicy 2
+struct acm_getpolicy {
+ /* IN */
-+ uint32_t interface_version;
+ XEN_GUEST_HANDLE_64(void) pullcache;
+ uint32_t pullcache_size;
+};
@@ -95038,7 +96240,6 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm_ops.h tmp-linux-2.6-x
+#define ACMOP_dumpstats 3
+struct acm_dumpstats {
+ /* IN */
-+ uint32_t interface_version;
+ XEN_GUEST_HANDLE_64(void) pullcache;
+ uint32_t pullcache_size;
+};
@@ -95049,7 +96250,6 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm_ops.h tmp-linux-2.6-x
+#define ACM_GETBY_domainid 2
+struct acm_getssid {
+ /* IN */
-+ uint32_t interface_version;
+ uint32_t get_ssid_by; /* ACM_GETBY_* */
+ union {
+ domaintype_t domainid;
@@ -95062,7 +96262,6 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm_ops.h tmp-linux-2.6-x
+#define ACMOP_getdecision 5
+struct acm_getdecision {
+ /* IN */
-+ uint32_t interface_version;
+ uint32_t get_decision_by1; /* ACM_GETBY_* */
+ uint32_t get_decision_by2; /* ACM_GETBY_* */
+ union {
@@ -95082,7 +96281,6 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm_ops.h tmp-linux-2.6-x
+#define ACMOP_chgpolicy 6
+struct acm_change_policy {
+ /* IN */
-+ uint32_t interface_version;
+ XEN_GUEST_HANDLE_64(void) policy_pushcache;
+ uint32_t policy_pushcache_size;
+ XEN_GUEST_HANDLE_64(void) del_array;
@@ -95098,7 +96296,6 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm_ops.h tmp-linux-2.6-x
+#define ACMOP_relabeldoms 7
+struct acm_relabel_doms {
+ /* IN */
-+ uint32_t interface_version;
+ XEN_GUEST_HANDLE_64(void) relabel_map;
+ uint32_t relabel_map_size;
+ /* OUT */
@@ -95137,8 +96334,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm_ops.h tmp-linux-2.6-x
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6-xen.patch/include/xen/interface/arch-ia64.h
--- pristine-linux-2.6.18/include/xen/interface/arch-ia64.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-ia64.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,508 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-ia64.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,522 @@
+/******************************************************************************
+ * arch-ia64/hypervisor-if.h
+ *
@@ -95218,6 +96415,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+
+#define MEM_G (1UL << 30)
+#define MEM_M (1UL << 20)
++#define MEM_K (1UL << 10)
+
+#define MMIO_START (3 * MEM_G)
+#define MMIO_SIZE (512 * MEM_M)
@@ -95249,6 +96447,16 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+#define GFW_START (4*MEM_G -16*MEM_M)
+#define GFW_SIZE (16*MEM_M)
+
++/* Nvram belongs to GFW memory space */
++#define NVRAM_SIZE (MEM_K * 64)
++#define NVRAM_START (GFW_START + 10 * MEM_M)
++
++#define NVRAM_VALID_SIG 0x4650494e45584948 // "HIXENIPF"
++struct nvram_save_addr {
++ unsigned long addr;
++ unsigned long signature;
++};
++
+struct pt_fpreg {
+ union {
+ unsigned long bits[2];
@@ -95530,6 +96738,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+/* gmfn version of IA64_DOM0VP_add_physmap */
+#define IA64_DOM0VP_add_physmap_with_gmfn 9
+
++/* Add an I/O port space range */
++#define IA64_DOM0VP_add_io_space 11
++
+// flags for page assignement to pseudo physical address space
+#define _ASSIGN_readonly 0
+#define ASSIGN_readonly (1UL << _ASSIGN_readonly)
@@ -95649,7 +96860,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-powerpc.h tmp-linux-2.6-xen.patch/include/xen/interface/arch-powerpc.h
--- pristine-linux-2.6.18/include/xen/interface/arch-powerpc.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-powerpc.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-powerpc.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,125 @@
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -95778,8 +96989,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-powerpc.h tmp-linux-
+#endif
diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen-x86_32.h tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86/xen-x86_32.h
--- pristine-linux-2.6.18/include/xen/interface/arch-x86/xen-x86_32.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86/xen-x86_32.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,168 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86/xen-x86_32.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,184 @@
+/******************************************************************************
+ * xen-x86_32.h
+ *
@@ -95846,18 +97057,34 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen-x86_32.h tmp
+#define FLAT_USER_DS FLAT_RING3_DS
+#define FLAT_USER_SS FLAT_RING3_SS
+
-+/*
-+ * Virtual addresses beyond this are not modifiable by guest OSes. The
-+ * machine->physical mapping table starts at this address, read-only.
-+ */
++#define __HYPERVISOR_VIRT_START_PAE 0xF5800000
++#define __MACH2PHYS_VIRT_START_PAE 0xF5800000
++#define __MACH2PHYS_VIRT_END_PAE 0xF6800000
++#define HYPERVISOR_VIRT_START_PAE \
++ mk_unsigned_long(__HYPERVISOR_VIRT_START_PAE)
++#define MACH2PHYS_VIRT_START_PAE \
++ mk_unsigned_long(__MACH2PHYS_VIRT_START_PAE)
++#define MACH2PHYS_VIRT_END_PAE \
++ mk_unsigned_long(__MACH2PHYS_VIRT_END_PAE)
++
++#define __HYPERVISOR_VIRT_START_NONPAE 0xFC000000
++#define __MACH2PHYS_VIRT_START_NONPAE 0xFC000000
++#define __MACH2PHYS_VIRT_END_NONPAE 0xFC400000
++#define HYPERVISOR_VIRT_START_NONPAE \
++ mk_unsigned_long(__HYPERVISOR_VIRT_START_NONPAE)
++#define MACH2PHYS_VIRT_START_NONPAE \
++ mk_unsigned_long(__MACH2PHYS_VIRT_START_NONPAE)
++#define MACH2PHYS_VIRT_END_NONPAE \
++ mk_unsigned_long(__MACH2PHYS_VIRT_END_NONPAE)
++
+#ifdef CONFIG_X86_PAE
-+#define __HYPERVISOR_VIRT_START 0xF5800000
-+#define __MACH2PHYS_VIRT_START 0xF5800000
-+#define __MACH2PHYS_VIRT_END 0xF6800000
++#define __HYPERVISOR_VIRT_START __HYPERVISOR_VIRT_START_PAE
++#define __MACH2PHYS_VIRT_START __MACH2PHYS_VIRT_START_PAE
++#define __MACH2PHYS_VIRT_END __MACH2PHYS_VIRT_END_PAE
+#else
-+#define __HYPERVISOR_VIRT_START 0xFC000000
-+#define __MACH2PHYS_VIRT_START 0xFC000000
-+#define __MACH2PHYS_VIRT_END 0xFC400000
++#define __HYPERVISOR_VIRT_START __HYPERVISOR_VIRT_START_NONPAE
++#define __MACH2PHYS_VIRT_START __MACH2PHYS_VIRT_START_NONPAE
++#define __MACH2PHYS_VIRT_END __MACH2PHYS_VIRT_END_NONPAE
+#endif
+
+#ifndef HYPERVISOR_VIRT_START
@@ -95950,7 +97177,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen-x86_32.h tmp
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen-x86_64.h tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86/xen-x86_64.h
--- pristine-linux-2.6.18/include/xen/interface/arch-x86/xen-x86_64.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86/xen-x86_64.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86/xen-x86_64.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,211 @@
+/******************************************************************************
+ * xen-x86_64.h
@@ -96165,8 +97392,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen-x86_64.h tmp
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen.h tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86/xen.h
--- pristine-linux-2.6.18/include/xen/interface/arch-x86/xen.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86/xen.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,204 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86/xen.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,205 @@
+/******************************************************************************
+ * arch-x86/xen.h
+ *
@@ -96206,7 +97433,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen.h tmp-linux-
+#endif
+
+#define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
-+#define XEN_GUEST_HANDLE(name) __guest_handle_ ## name
++#define __XEN_GUEST_HANDLE(name) __guest_handle_ ## name
++#define XEN_GUEST_HANDLE(name) __XEN_GUEST_HANDLE(name)
+#define set_xen_guest_handle(hnd, val) do { (hnd).p = val; } while (0)
+#ifdef __XEN_TOOLS__
+#define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0)
@@ -96373,7 +97601,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen.h tmp-linux-
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86_32.h tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86_32.h
--- pristine-linux-2.6.18/include/xen/interface/arch-x86_32.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86_32.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86_32.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,27 @@
+/******************************************************************************
+ * arch-x86_32.h
@@ -96404,7 +97632,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86_32.h tmp-linux-2
+#include "arch-x86/xen.h"
diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86_64.h tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86_64.h
--- pristine-linux-2.6.18/include/xen/interface/arch-x86_64.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86_64.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/arch-x86_64.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,27 @@
+/******************************************************************************
+ * arch-x86_64.h
@@ -96435,7 +97663,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86_64.h tmp-linux-2
+#include "arch-x86/xen.h"
diff -Nurp pristine-linux-2.6.18/include/xen/interface/callback.h tmp-linux-2.6-xen.patch/include/xen/interface/callback.h
--- pristine-linux-2.6.18/include/xen/interface/callback.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/callback.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/callback.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * callback.h
@@ -96531,7 +97759,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/callback.h tmp-linux-2.6-
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/dom0_ops.h tmp-linux-2.6-xen.patch/include/xen/interface/dom0_ops.h
--- pristine-linux-2.6.18/include/xen/interface/dom0_ops.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/dom0_ops.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/dom0_ops.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,120 @@
+/******************************************************************************
+ * dom0_ops.h
@@ -96655,8 +97883,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/dom0_ops.h tmp-linux-2.6-
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/domctl.h tmp-linux-2.6-xen.patch/include/xen/interface/domctl.h
--- pristine-linux-2.6.18/include/xen/interface/domctl.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/domctl.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,478 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/domctl.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,481 @@
+/******************************************************************************
+ * domctl.h
+ *
@@ -96744,6 +97972,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/domctl.h tmp-linux-2.6-xe
+ /* Domain is currently running. */
+#define _XEN_DOMINF_running 5
+#define XEN_DOMINF_running (1U<<_XEN_DOMINF_running)
++ /* Being debugged. */
++#define _XEN_DOMINF_debugged 6
++#define XEN_DOMINF_debugged (1U<<_XEN_DOMINF_debugged)
+ /* CPU to which this domain is bound. */
+#define XEN_DOMINF_cpumask 255
+#define XEN_DOMINF_cpushift 8
@@ -97137,7 +98368,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/domctl.h tmp-linux-2.6-xe
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/elfnote.h tmp-linux-2.6-xen.patch/include/xen/interface/elfnote.h
--- pristine-linux-2.6.18/include/xen/interface/elfnote.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/elfnote.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/elfnote.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,233 @@
+/******************************************************************************
+ * elfnote.h
@@ -97374,7 +98605,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/elfnote.h tmp-linux-2.6-x
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/elfstructs.h tmp-linux-2.6-xen.patch/include/xen/interface/elfstructs.h
--- pristine-linux-2.6.18/include/xen/interface/elfstructs.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/elfstructs.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/elfstructs.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,527 @@
+#ifndef __XEN_PUBLIC_ELFSTRUCTS_H__
+#define __XEN_PUBLIC_ELFSTRUCTS_H__ 1
@@ -97905,7 +99136,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/elfstructs.h tmp-linux-2.
+#endif /* __XEN_PUBLIC_ELFSTRUCTS_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/event_channel.h tmp-linux-2.6-xen.patch/include/xen/interface/event_channel.h
--- pristine-linux-2.6.18/include/xen/interface/event_channel.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/event_channel.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/event_channel.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,264 @@
+/******************************************************************************
+ * event_channel.h
@@ -98173,7 +99404,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/event_channel.h tmp-linux
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/features.h tmp-linux-2.6-xen.patch/include/xen/interface/features.h
--- pristine-linux-2.6.18/include/xen/interface/features.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/features.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/features.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * features.h
@@ -98248,7 +99479,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/features.h tmp-linux-2.6-
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/Makefile tmp-linux-2.6-xen.patch/include/xen/interface/foreign/Makefile
--- pristine-linux-2.6.18/include/xen/interface/foreign/Makefile 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/foreign/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/foreign/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,37 @@
+XEN_ROOT=../../../..
+include $(XEN_ROOT)/Config.mk
@@ -98289,7 +99520,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/Makefile tmp-linu
+ python mkchecker.py $(XEN_TARGET_ARCH) $@ $(architectures)
diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/mkchecker.py tmp-linux-2.6-xen.patch/include/xen/interface/foreign/mkchecker.py
--- pristine-linux-2.6.18/include/xen/interface/foreign/mkchecker.py 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/foreign/mkchecker.py 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/foreign/mkchecker.py 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,58 @@
+#!/usr/bin/python
+
@@ -98351,7 +99582,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/mkchecker.py tmp-
+
diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/mkheader.py tmp-linux-2.6-xen.patch/include/xen/interface/foreign/mkheader.py
--- pristine-linux-2.6.18/include/xen/interface/foreign/mkheader.py 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/foreign/mkheader.py 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/foreign/mkheader.py 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,153 @@
+#!/usr/bin/python
+
@@ -98508,7 +99739,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/mkheader.py tmp-l
+
diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/reference.size tmp-linux-2.6-xen.patch/include/xen/interface/foreign/reference.size
--- pristine-linux-2.6.18/include/xen/interface/foreign/reference.size 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/foreign/reference.size 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/foreign/reference.size 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,17 @@
+
+structs | x86_32 x86_64 ia64
@@ -98529,7 +99760,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/reference.size tm
+
diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/structs.py tmp-linux-2.6-xen.patch/include/xen/interface/foreign/structs.py
--- pristine-linux-2.6.18/include/xen/interface/foreign/structs.py 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/foreign/structs.py 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/foreign/structs.py 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,54 @@
+# configuration: what needs translation
+
@@ -98587,7 +99818,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/structs.py tmp-li
+
diff -Nurp pristine-linux-2.6.18/include/xen/interface/grant_table.h tmp-linux-2.6-xen.patch/include/xen/interface/grant_table.h
--- pristine-linux-2.6.18/include/xen/interface/grant_table.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/grant_table.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/grant_table.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,399 @@
+/******************************************************************************
+ * grant_table.h
@@ -98990,8 +100221,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/grant_table.h tmp-linux-2
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/e820.h tmp-linux-2.6-xen.patch/include/xen/interface/hvm/e820.h
--- pristine-linux-2.6.18/include/xen/interface/hvm/e820.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/e820.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,47 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/e820.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,34 @@
+
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -99016,32 +100247,19 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/e820.h tmp-linux-2.6-
+#ifndef __XEN_PUBLIC_HVM_E820_H__
+#define __XEN_PUBLIC_HVM_E820_H__
+
-+/* PC BIOS standard E820 types. */
-+#define E820_RAM 1
-+#define E820_RESERVED 2
-+#define E820_ACPI 3
-+#define E820_NVS 4
-+
+/* E820 location in HVM virtual address space. */
-+#define E820_MAP_PAGE 0x00090000
-+#define E820_MAP_NR_OFFSET 0x000001E8
-+#define E820_MAP_OFFSET 0x000002D0
-+
-+struct e820entry {
-+ uint64_t addr;
-+ uint64_t size;
-+ uint32_t type;
-+} __attribute__((packed));
++#define HVM_E820_PAGE 0x00090000
++#define HVM_E820_NR_OFFSET 0x000001E8
++#define HVM_E820_OFFSET 0x000002D0
+
+#define HVM_BELOW_4G_RAM_END 0xF0000000
-+
+#define HVM_BELOW_4G_MMIO_START HVM_BELOW_4G_RAM_END
+#define HVM_BELOW_4G_MMIO_LENGTH ((1ULL << 32) - HVM_BELOW_4G_MMIO_START)
+
+#endif /* __XEN_PUBLIC_HVM_E820_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/hvm_info_table.h tmp-linux-2.6-xen.patch/include/xen/interface/hvm/hvm_info_table.h
--- pristine-linux-2.6.18/include/xen/interface/hvm/hvm_info_table.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/hvm_info_table.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/hvm_info_table.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * hvm/hvm_info_table.h
@@ -99086,8 +100304,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/hvm_info_table.h tmp-
+#endif /* __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/hvm_op.h tmp-linux-2.6-xen.patch/include/xen/interface/hvm/hvm_op.h
--- pristine-linux-2.6.18/include/xen/interface/hvm/hvm_op.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/hvm_op.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,73 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/hvm_op.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,76 @@
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
@@ -99160,10 +100378,13 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/hvm_op.h tmp-linux-2.
+typedef struct xen_hvm_set_pci_link_route xen_hvm_set_pci_link_route_t;
+DEFINE_XEN_GUEST_HANDLE(xen_hvm_set_pci_link_route_t);
+
++/* Flushes all VCPU TLBs: @arg must be NULL. */
++#define HVMOP_flush_tlbs 5
++
+#endif /* __XEN_PUBLIC_HVM_HVM_OP_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/ioreq.h tmp-linux-2.6-xen.patch/include/xen/interface/hvm/ioreq.h
--- pristine-linux-2.6.18/include/xen/interface/hvm/ioreq.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/ioreq.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/ioreq.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,122 @@
+/*
+ * ioreq.h: I/O request definitions for device models
@@ -99289,8 +100510,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/ioreq.h tmp-linux-2.6
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/params.h tmp-linux-2.6-xen.patch/include/xen/interface/hvm/params.h
--- pristine-linux-2.6.18/include/xen/interface/hvm/params.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/params.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,55 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/params.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,60 @@
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
@@ -99343,12 +100564,17 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/params.h tmp-linux-2.
+
+#define HVM_PARAM_BUFIOREQ_PFN 6
+
++#ifdef __ia64__
++#define HVM_PARAM_NVRAM_FD 7
++#define HVM_NR_PARAMS 8
++#else
+#define HVM_NR_PARAMS 7
++#endif
+
+#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/save.h tmp-linux-2.6-xen.patch/include/xen/interface/hvm/save.h
--- pristine-linux-2.6.18/include/xen/interface/hvm/save.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/save.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/save.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,462 @@
+/*
+ * hvm/save.h
@@ -99814,8 +101040,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/save.h tmp-linux-2.6-
+#endif /* __XEN_PUBLIC_HVM_SAVE_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/vmx_assist.h tmp-linux-2.6-xen.patch/include/xen/interface/hvm/vmx_assist.h
--- pristine-linux-2.6.18/include/xen/interface/hvm/vmx_assist.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/vmx_assist.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,116 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/hvm/vmx_assist.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,122 @@
+/*
+ * vmx_assist.h: Context definitions for the VMXASSIST world switch.
+ *
@@ -99853,6 +101079,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/vmx_assist.h tmp-linu
+
+#ifndef __ASSEMBLY__
+
++#define NR_EXCEPTION_HANDLER 32
++#define NR_INTERRUPT_HANDLERS 16
++#define NR_TRAPS (NR_EXCEPTION_HANDLER+NR_INTERRUPT_HANDLERS)
++
+union vmcs_arbytes {
+ struct arbyte_fields {
+ unsigned int seg_type : 4,
@@ -99916,6 +101146,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/vmx_assist.h tmp-linu
+ uint32_t ldtr_limit;
+ uint32_t ldtr_base;
+ union vmcs_arbytes ldtr_arbytes;
++
++ unsigned char rm_irqbase[2];
+};
+typedef struct vmx_assist_context vmx_assist_context_t;
+
@@ -99934,7 +101166,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/vmx_assist.h tmp-linu
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/blkif.h tmp-linux-2.6-xen.patch/include/xen/interface/io/blkif.h
--- pristine-linux-2.6.18/include/xen/interface/io/blkif.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/blkif.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/io/blkif.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,128 @@
+/******************************************************************************
+ * blkif.h
@@ -100066,7 +101298,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/blkif.h tmp-linux-2.6-
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/console.h tmp-linux-2.6-xen.patch/include/xen/interface/io/console.h
--- pristine-linux-2.6.18/include/xen/interface/io/console.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/console.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/io/console.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * console.h
@@ -100121,7 +101353,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/console.h tmp-linux-2.
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/fbif.h tmp-linux-2.6-xen.patch/include/xen/interface/io/fbif.h
--- pristine-linux-2.6.18/include/xen/interface/io/fbif.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/fbif.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/io/fbif.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,138 @@
+/*
+ * fbif.h -- Xen virtual frame buffer device
@@ -100263,7 +101495,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/fbif.h tmp-linux-2.6-x
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/kbdif.h tmp-linux-2.6-xen.patch/include/xen/interface/io/kbdif.h
--- pristine-linux-2.6.18/include/xen/interface/io/kbdif.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/kbdif.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/io/kbdif.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,130 @@
+/*
+ * kbdif.h -- Xen virtual keyboard/mouse
@@ -100397,7 +101629,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/kbdif.h tmp-linux-2.6-
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/netif.h tmp-linux-2.6-xen.patch/include/xen/interface/io/netif.h
--- pristine-linux-2.6.18/include/xen/interface/io/netif.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/netif.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/io/netif.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,184 @@
+/******************************************************************************
+ * netif.h
@@ -100585,7 +101817,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/netif.h tmp-linux-2.6-
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/pciif.h tmp-linux-2.6-xen.patch/include/xen/interface/io/pciif.h
--- pristine-linux-2.6.18/include/xen/interface/io/pciif.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/pciif.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/io/pciif.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,83 @@
+/*
+ * PCI Backend/Frontend Common Data Structures & Macros
@@ -100672,7 +101904,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/pciif.h tmp-linux-2.6-
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/protocols.h tmp-linux-2.6-xen.patch/include/xen/interface/io/protocols.h
--- pristine-linux-2.6.18/include/xen/interface/io/protocols.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/protocols.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/io/protocols.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,21 @@
+#ifndef __XEN_PROTOCOLS_H__
+#define __XEN_PROTOCOLS_H__
@@ -100697,7 +101929,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/protocols.h tmp-linux-
+#endif
diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/ring.h tmp-linux-2.6-xen.patch/include/xen/interface/io/ring.h
--- pristine-linux-2.6.18/include/xen/interface/io/ring.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/ring.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/io/ring.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,299 @@
+/******************************************************************************
+ * ring.h
@@ -100834,7 +102066,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/ring.h tmp-linux-2.6-x
+#define SHARED_RING_INIT(_s) do { \
+ (_s)->req_prod = (_s)->rsp_prod = 0; \
+ (_s)->req_event = (_s)->rsp_event = 1; \
-+ memset((_s)->pad, 0, sizeof((_s)->pad)); \
++ (void)memset((_s)->pad, 0, sizeof((_s)->pad)); \
+} while(0)
+
+#define FRONT_RING_INIT(_r, _s, __size) do { \
@@ -101000,7 +102232,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/ring.h tmp-linux-2.6-x
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/tpmif.h tmp-linux-2.6-xen.patch/include/xen/interface/io/tpmif.h
--- pristine-linux-2.6.18/include/xen/interface/io/tpmif.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/tpmif.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/io/tpmif.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * tpmif.h
@@ -101081,7 +102313,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/tpmif.h tmp-linux-2.6-
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/xenbus.h tmp-linux-2.6-xen.patch/include/xen/interface/io/xenbus.h
--- pristine-linux-2.6.18/include/xen/interface/io/xenbus.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/xenbus.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/io/xenbus.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * xenbus.h
@@ -101158,8 +102390,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/xenbus.h tmp-linux-2.6
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/xs_wire.h tmp-linux-2.6-xen.patch/include/xen/interface/io/xs_wire.h
--- pristine-linux-2.6.18/include/xen/interface/io/xs_wire.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/io/xs_wire.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,117 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/io/xs_wire.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,121 @@
+/*
+ * Details of the "wire" protocol between Xen Store Daemon and client
+ * library or guest kernel.
@@ -101222,7 +102454,11 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/xs_wire.h tmp-linux-2.
+ const char *errstring;
+};
+#define XSD_ERROR(x) { x, #x }
-+static struct xsd_errors xsd_errors[] __attribute__((unused)) = {
++static struct xsd_errors xsd_errors[]
++#if defined(__GNUC__)
++__attribute__((unused))
++#endif
++ = {
+ XSD_ERROR(EINVAL),
+ XSD_ERROR(EACCES),
+ XSD_ERROR(EEXIST),
@@ -101279,7 +102515,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/xs_wire.h tmp-linux-2.
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/kexec.h tmp-linux-2.6-xen.patch/include/xen/interface/kexec.h
--- pristine-linux-2.6.18/include/xen/interface/kexec.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/kexec.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/kexec.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,137 @@
+/******************************************************************************
+ * kexec.h - Public portion
@@ -101420,7 +102656,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/kexec.h tmp-linux-2.6-xen
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/libelf.h tmp-linux-2.6-xen.patch/include/xen/interface/libelf.h
--- pristine-linux-2.6.18/include/xen/interface/libelf.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/libelf.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/libelf.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,241 @@
+#ifndef __XC_LIBELF__
+#define __XC_LIBELF__ 1
@@ -101665,7 +102901,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/libelf.h tmp-linux-2.6-xe
+#endif /* __XC_LIBELF__ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/memory.h tmp-linux-2.6-xen.patch/include/xen/interface/memory.h
--- pristine-linux-2.6.18/include/xen/interface/memory.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/memory.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/memory.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,281 @@
+/******************************************************************************
+ * memory.h
@@ -101950,7 +103186,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/memory.h tmp-linux-2.6-xe
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/nmi.h tmp-linux-2.6-xen.patch/include/xen/interface/nmi.h
--- pristine-linux-2.6.18/include/xen/interface/nmi.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/nmi.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/nmi.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,78 @@
+/******************************************************************************
+ * nmi.h
@@ -102032,7 +103268,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/nmi.h tmp-linux-2.6-xen.p
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/physdev.h tmp-linux-2.6-xen.patch/include/xen/interface/physdev.h
--- pristine-linux-2.6.18/include/xen/interface/physdev.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/physdev.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/physdev.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,169 @@
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -102205,8 +103441,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/physdev.h tmp-linux-2.6-x
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/platform.h tmp-linux-2.6-xen.patch/include/xen/interface/platform.h
--- pristine-linux-2.6.18/include/xen/interface/platform.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/platform.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,143 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/platform.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,183 @@
+/******************************************************************************
+ * platform.h
+ *
@@ -102323,6 +103559,45 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/platform.h tmp-linux-2.6-
+typedef struct xenpf_platform_quirk xenpf_platform_quirk_t;
+DEFINE_XEN_GUEST_HANDLE(xenpf_platform_quirk_t);
+
++#define XENPF_firmware_info 50
++#define XEN_FW_DISK_INFO 1 /* from int 13 AH=08/41/48 */
++#define XEN_FW_DISK_MBR_SIGNATURE 2 /* from MBR offset 0x1b8 */
++#define XEN_FW_VBEDDC_INFO 3 /* from int 10 AX=4f15 */
++struct xenpf_firmware_info {
++ /* IN variables. */
++ uint32_t type;
++ uint32_t index;
++ /* OUT variables. */
++ union {
++ struct {
++ /* Int13, Fn48: Check Extensions Present. */
++ uint8_t device; /* %dl: bios device number */
++ uint8_t version; /* %ah: major version */
++ uint16_t interface_support; /* %cx: support bitmap */
++ /* Int13, Fn08: Legacy Get Device Parameters. */
++ uint16_t legacy_max_cylinder; /* %cl[7:6]:%ch: max cyl # */
++ uint8_t legacy_max_head; /* %dh: max head # */
++ uint8_t legacy_sectors_per_track; /* %cl[5:0]: max sector # */
++ /* Int13, Fn41: Get Device Parameters (as filled into %ds:%esi). */
++ /* NB. First uint16_t of buffer must be set to buffer size. */
++ XEN_GUEST_HANDLE(void) edd_params;
++ } disk_info; /* XEN_FW_DISK_INFO */
++ struct {
++ uint8_t device; /* bios device number */
++ uint32_t mbr_signature; /* offset 0x1b8 in mbr */
++ } disk_mbr_signature; /* XEN_FW_DISK_MBR_SIGNATURE */
++ struct {
++ /* Int10, AX=4F15: Get EDID info. */
++ uint8_t capabilities;
++ uint8_t edid_transfer_time;
++ /* must refer to 128-byte buffer */
++ XEN_GUEST_HANDLE(uint8_t) edid;
++ } vbeddc_info; /* XEN_FW_VBEDDC_INFO */
++ } u;
++};
++typedef struct xenpf_firmware_info xenpf_firmware_info_t;
++DEFINE_XEN_GUEST_HANDLE(xenpf_firmware_info_t);
++
+struct xen_platform_op {
+ uint32_t cmd;
+ uint32_t interface_version; /* XENPF_INTERFACE_VERSION */
@@ -102333,6 +103608,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/platform.h tmp-linux-2.6-
+ struct xenpf_read_memtype read_memtype;
+ struct xenpf_microcode_update microcode;
+ struct xenpf_platform_quirk platform_quirk;
++ struct xenpf_firmware_info firmware_info;
+ uint8_t pad[128];
+ } u;
+};
@@ -102352,7 +103628,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/platform.h tmp-linux-2.6-
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/sched.h tmp-linux-2.6-xen.patch/include/xen/interface/sched.h
--- pristine-linux-2.6.18/include/xen/interface/sched.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/sched.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/sched.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,121 @@
+/******************************************************************************
+ * sched.h
@@ -102477,8 +103753,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/sched.h tmp-linux-2.6-xen
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/sysctl.h tmp-linux-2.6-xen.patch/include/xen/interface/sysctl.h
--- pristine-linux-2.6.18/include/xen/interface/sysctl.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/sysctl.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,182 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/sysctl.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,198 @@
+/******************************************************************************
+ * sysctl.h
+ *
@@ -102621,9 +103897,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/sysctl.h tmp-linux-2.6-xe
+typedef struct xen_sysctl_getdomaininfolist xen_sysctl_getdomaininfolist_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_getdomaininfolist_t);
+
-+/*
-+ * Inject debug keys into Xen.
-+ */
++/* Inject debug keys into Xen. */
+#define XEN_SYSCTL_debug_keys 7
+struct xen_sysctl_debug_keys {
+ /* IN variables. */
@@ -102633,6 +103907,23 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/sysctl.h tmp-linux-2.6-xe
+typedef struct xen_sysctl_debug_keys xen_sysctl_debug_keys_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_debug_keys_t);
+
++/* Get physical CPU information. */
++#define XEN_SYSCTL_getcpuinfo 8
++struct xen_sysctl_cpuinfo {
++ uint64_t idletime;
++};
++typedef struct xen_sysctl_cpuinfo xen_sysctl_cpuinfo_t;
++DEFINE_XEN_GUEST_HANDLE(xen_sysctl_cpuinfo_t);
++struct xen_sysctl_getcpuinfo {
++ /* IN variables. */
++ uint32_t max_cpus;
++ XEN_GUEST_HANDLE_64(xen_sysctl_cpuinfo_t) info;
++ /* OUT variables. */
++ uint32_t nr_cpus;
++};
++typedef struct xen_sysctl_getcpuinfo xen_sysctl_getcpuinfo_t;
++DEFINE_XEN_GUEST_HANDLE(xen_sysctl_getcpuinfo_t);
++
+struct xen_sysctl {
+ uint32_t cmd;
+ uint32_t interface_version; /* XEN_SYSCTL_INTERFACE_VERSION */
@@ -102644,6 +103935,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/sysctl.h tmp-linux-2.6-xe
+ struct xen_sysctl_perfc_op perfc_op;
+ struct xen_sysctl_getdomaininfolist getdomaininfolist;
+ struct xen_sysctl_debug_keys debug_keys;
++ struct xen_sysctl_getcpuinfo getcpuinfo;
+ uint8_t pad[128];
+ } u;
+};
@@ -102663,8 +103955,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/sysctl.h tmp-linux-2.6-xe
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/trace.h tmp-linux-2.6-xen.patch/include/xen/interface/trace.h
--- pristine-linux-2.6.18/include/xen/interface/trace.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/trace.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,119 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/trace.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,120 @@
+/******************************************************************************
+ * include/public/trace.h
+ *
@@ -102755,6 +104047,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/trace.h tmp-linux-2.6-xen
+#define TRC_HVM_VMMCALL (TRC_HVM_HANDLER + 0x12)
+#define TRC_HVM_HLT (TRC_HVM_HANDLER + 0x13)
+#define TRC_HVM_INVLPG (TRC_HVM_HANDLER + 0x14)
++#define TRC_HVM_MCE (TRC_HVM_HANDLER + 0x15)
+
+/* This structure represents a single trace buffer record. */
+struct t_rec {
@@ -102786,7 +104079,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/trace.h tmp-linux-2.6-xen
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/vcpu.h tmp-linux-2.6-xen.patch/include/xen/interface/vcpu.h
--- pristine-linux-2.6.18/include/xen/interface/vcpu.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/vcpu.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/vcpu.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,192 @@
+/******************************************************************************
+ * vcpu.h
@@ -102958,13 +104251,13 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/vcpu.h tmp-linux-2.6-xen.
+ * The pointer need not be page aligned, but the structure must not
+ * cross a page boundary.
+ *
-+ * If the specified mfn is INVALID_MFN, then it reverts to using the
-+ * vcpu_info structure in the shared_info page.
++ * This may be called only once per vcpu.
+ */
+#define VCPUOP_register_vcpu_info 10 /* arg == struct vcpu_info */
+struct vcpu_register_vcpu_info {
-+ xen_pfn_t mfn; /* mfn of page to place vcpu_info */
-+ uint32_t offset; /* offset within page */
++ uint64_t mfn; /* mfn of page to place vcpu_info */
++ uint32_t offset; /* offset within page */
++ uint32_t rsvd; /* unused */
+};
+typedef struct vcpu_register_vcpu_info vcpu_register_vcpu_info_t;
+DEFINE_XEN_GUEST_HANDLE(vcpu_register_vcpu_info_t);
@@ -102982,7 +104275,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/vcpu.h tmp-linux-2.6-xen.
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/version.h tmp-linux-2.6-xen.patch/include/xen/interface/version.h
--- pristine-linux-2.6.18/include/xen/interface/version.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/version.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/version.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * version.h
@@ -103077,7 +104370,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/version.h tmp-linux-2.6-x
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/xen-compat.h tmp-linux-2.6-xen.patch/include/xen/interface/xen-compat.h
--- pristine-linux-2.6.18/include/xen/interface/xen-compat.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/xen-compat.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/xen-compat.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * xen-compat.h
@@ -103132,8 +104425,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xen-compat.h tmp-linux-2.
+#endif /* __XEN_PUBLIC_XEN_COMPAT_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/xen.h tmp-linux-2.6-xen.patch/include/xen/interface/xen.h
--- pristine-linux-2.6.18/include/xen/interface/xen.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/xen.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,610 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/xen.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,612 @@
+/******************************************************************************
+ * xen.h
+ *
@@ -103704,6 +104997,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xen.h tmp-linux-2.6-xen.p
+ } vesa_lfb;
+ } u;
+} dom0_vga_console_info_t;
++#define xen_vga_console_info dom0_vga_console_info
++#define xen_vga_console_info_t dom0_vga_console_info_t
+
+typedef uint8_t xen_domain_handle_t[16];
+
@@ -103746,7 +105041,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xen.h tmp-linux-2.6-xen.p
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/xencomm.h tmp-linux-2.6-xen.patch/include/xen/interface/xencomm.h
--- pristine-linux-2.6.18/include/xen/interface/xencomm.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/xencomm.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/interface/xencomm.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,41 @@
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -103791,8 +105086,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xencomm.h tmp-linux-2.6-x
+#endif /* _XEN_XENCOMM_H_ */
diff -Nurp pristine-linux-2.6.18/include/xen/interface/xenoprof.h tmp-linux-2.6-xen.patch/include/xen/interface/xenoprof.h
--- pristine-linux-2.6.18/include/xen/interface/xenoprof.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/xenoprof.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,132 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/xenoprof.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,138 @@
+/******************************************************************************
+ * xenoprof.h
+ *
@@ -103844,7 +105139,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xenoprof.h tmp-linux-2.6-
+#define XENOPROF_release_counters 12
+#define XENOPROF_shutdown 13
+#define XENOPROF_get_buffer 14
-+#define XENOPROF_last_op 14
++#define XENOPROF_set_backtrace 15
++#define XENOPROF_last_op 15
+
+#define MAX_OPROF_EVENTS 32
+#define MAX_OPROF_DOMAINS 25
@@ -103857,6 +105153,11 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xenoprof.h tmp-linux-2.6-
+ uint8_t event;
+};
+
++/* PC value that indicates a special code */
++#define XENOPROF_ESCAPE_CODE ~0UL
++/* Transient events for the xenoprof->oprofile cpu buf */
++#define XENOPROF_TRACE_BEGIN 1
++
+/* Xenoprof buffer shared between Xen and domain - 1 per VCPU */
+struct xenoprof_buf {
+ uint32_t event_head;
@@ -103927,8 +105228,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xenoprof.h tmp-linux-2.6-
+ */
diff -Nurp pristine-linux-2.6.18/include/xen/pcifront.h tmp-linux-2.6-xen.patch/include/xen/pcifront.h
--- pristine-linux-2.6.18/include/xen/pcifront.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/pcifront.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,76 @@
++++ tmp-linux-2.6-xen.patch/include/xen/pcifront.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,83 @@
+/*
+ * PCI Frontend - arch-dependendent declarations
+ *
@@ -103957,7 +105258,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/pcifront.h tmp-linux-2.6-xen.patch/
+ return sd->pdev;
+}
+
-+static inline void pcifront_init_sd(struct pcifront_sd *sd, int domain,
++static inline void pcifront_init_sd(struct pcifront_sd *sd,
++ unsigned int domain, unsigned int bus,
+ struct pcifront_device *pdev)
+{
+ sd->domain = domain;
@@ -103976,26 +105278,32 @@ diff -Nurp pristine-linux-2.6.18/include/xen/pcifront.h tmp-linux-2.6-xen.patch/
+}
+#endif /* CONFIG_PCI_DOMAINS */
+
++static inline void pcifront_setup_root_resources(struct pci_bus *bus,
++ struct pcifront_sd *sd)
++{
++}
++
+#else /* __ia64__ */
+
++#include <linux/acpi.h>
+#include <asm/pci.h>
+#define pcifront_sd pci_controller
+
++extern void xen_add_resource(struct pci_controller *, unsigned int,
++ unsigned int, struct acpi_resource *);
++extern void xen_pcibios_setup_root_windows(struct pci_bus *,
++ struct pci_controller *);
++
+static inline struct pcifront_device *
+pcifront_get_pdev(struct pcifront_sd *sd)
+{
+ return (struct pcifront_device *)sd->platform_data;
+}
+
-+static inline void pcifront_init_sd(struct pcifront_sd *sd, int domain,
-+ struct pcifront_device *pdev)
++static inline void pcifront_setup_root_resources(struct pci_bus *bus,
++ struct pcifront_sd *sd)
+{
-+ sd->segment = domain;
-+ sd->acpi_handle = NULL;
-+ sd->iommu = NULL;
-+ sd->windows = 0;
-+ sd->window = NULL;
-+ sd->platform_data = pdev;
++ xen_pcibios_setup_root_windows(bus, sd);
+}
+
+#endif /* __ia64__ */
@@ -104007,7 +105315,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/pcifront.h tmp-linux-2.6-xen.patch/
+#endif /* __XEN_ASM_PCIFRONT_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/public/evtchn.h tmp-linux-2.6-xen.patch/include/xen/public/evtchn.h
--- pristine-linux-2.6.18/include/xen/public/evtchn.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/public/evtchn.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/public/evtchn.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,88 @@
+/******************************************************************************
+ * evtchn.h
@@ -104099,7 +105407,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/public/evtchn.h tmp-linux-2.6-xen.p
+#endif /* __LINUX_PUBLIC_EVTCHN_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/public/gntdev.h tmp-linux-2.6-xen.patch/include/xen/public/gntdev.h
--- pristine-linux-2.6.18/include/xen/public/gntdev.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/public/gntdev.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/public/gntdev.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,105 @@
+/******************************************************************************
+ * gntdev.h
@@ -104208,7 +105516,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/public/gntdev.h tmp-linux-2.6-xen.p
+#endif /* __LINUX_PUBLIC_GNTDEV_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/public/privcmd.h tmp-linux-2.6-xen.patch/include/xen/public/privcmd.h
--- pristine-linux-2.6.18/include/xen/public/privcmd.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/public/privcmd.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/public/privcmd.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * privcmd.h
@@ -104291,7 +105599,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/public/privcmd.h tmp-linux-2.6-xen.
+#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/xen_proc.h tmp-linux-2.6-xen.patch/include/xen/xen_proc.h
--- pristine-linux-2.6.18/include/xen/xen_proc.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/xen_proc.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/xen_proc.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,12 @@
+
+#ifndef __ASM_XEN_PROC_H__
@@ -104307,8 +105615,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/xen_proc.h tmp-linux-2.6-xen.patch/
+#endif /* __ASM_XEN_PROC_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/xenbus.h tmp-linux-2.6-xen.patch/include/xen/xenbus.h
--- pristine-linux-2.6.18/include/xen/xenbus.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/xenbus.h 2007-05-18 07:45:21.000000000 -0700
-@@ -0,0 +1,302 @@
++++ tmp-linux-2.6-xen.patch/include/xen/xenbus.h 2007-10-11 00:15:26.000000000 -0700
+@@ -0,0 +1,304 @@
+/******************************************************************************
+ * xenbus.h
+ *
@@ -104350,6 +105658,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/xenbus.h tmp-linux-2.6-xen.patch/in
+#include <linux/mutex.h>
+#include <linux/completion.h>
+#include <linux/init.h>
++#include <linux/err.h>
+#include <xen/interface/xen.h>
+#include <xen/interface/grant_table.h>
+#include <xen/interface/io/xenbus.h>
@@ -104417,6 +105726,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/xenbus.h tmp-linux-2.6-xen.patch/in
+ int (*uevent)(struct xenbus_device *, char **, int, char *, int);
+ struct device_driver driver;
+ int (*read_otherend_details)(struct xenbus_device *dev);
++ int (*is_ready)(struct xenbus_device *dev);
+};
+
+static inline struct xenbus_driver *to_xenbus_driver(struct device_driver *drv)
@@ -104613,7 +105923,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/xenbus.h tmp-linux-2.6-xen.patch/in
+#endif /* _XEN_XENBUS_H */
diff -Nurp pristine-linux-2.6.18/include/xen/xencons.h tmp-linux-2.6-xen.patch/include/xen/xencons.h
--- pristine-linux-2.6.18/include/xen/xencons.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/xencons.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/xencons.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,19 @@
+#ifndef __ASM_XENCONS_H__
+#define __ASM_XENCONS_H__
@@ -104636,7 +105946,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/xencons.h tmp-linux-2.6-xen.patch/i
+#endif /* __ASM_XENCONS_H__ */
diff -Nurp pristine-linux-2.6.18/include/xen/xenoprof.h tmp-linux-2.6-xen.patch/include/xen/xenoprof.h
--- pristine-linux-2.6.18/include/xen/xenoprof.h 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/include/xen/xenoprof.h 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/include/xen/xenoprof.h 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * xen/xenoprof.h
@@ -104682,7 +105992,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/xenoprof.h tmp-linux-2.6-xen.patch/
+#endif /* __XEN_XENOPROF_H__ */
diff -Nurp pristine-linux-2.6.18/kernel/Kconfig.preempt tmp-linux-2.6-xen.patch/kernel/Kconfig.preempt
--- pristine-linux-2.6.18/kernel/Kconfig.preempt 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/kernel/Kconfig.preempt 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/kernel/Kconfig.preempt 2007-10-11 00:15:26.000000000 -0700
@@ -35,6 +35,7 @@ config PREEMPT_VOLUNTARY
config PREEMPT
@@ -104693,7 +106003,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/Kconfig.preempt tmp-linux-2.6-xen.patch/
all kernel code (that is not executing in a critical section)
diff -Nurp pristine-linux-2.6.18/kernel/fork.c tmp-linux-2.6-xen.patch/kernel/fork.c
--- pristine-linux-2.6.18/kernel/fork.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/kernel/fork.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/kernel/fork.c 2007-10-11 00:15:26.000000000 -0700
@@ -276,6 +276,9 @@ static inline int dup_mmap(struct mm_str
if (retval)
goto out;
@@ -104706,7 +106016,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/fork.c tmp-linux-2.6-xen.patch/kernel/fo
up_write(&mm->mmap_sem);
diff -Nurp pristine-linux-2.6.18/kernel/irq/spurious.c tmp-linux-2.6-xen.patch/kernel/irq/spurious.c
--- pristine-linux-2.6.18/kernel/irq/spurious.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/kernel/irq/spurious.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/kernel/irq/spurious.c 2007-10-11 00:15:26.000000000 -0700
@@ -139,7 +139,8 @@ void note_interrupt(unsigned int irq, st
irqreturn_t action_ret, struct pt_regs *regs)
{
@@ -104719,8 +106029,8 @@ diff -Nurp pristine-linux-2.6.18/kernel/irq/spurious.c tmp-linux-2.6-xen.patch/k
}
diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/kexec.c
--- pristine-linux-2.6.18/kernel/kexec.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/kernel/kexec.c 2007-05-18 07:45:21.000000000 -0700
-@@ -330,13 +330,27 @@ static int kimage_is_destination_range(s
++++ tmp-linux-2.6-xen.patch/kernel/kexec.c 2007-10-11 00:15:26.000000000 -0700
+@@ -330,13 +330,26 @@ static int kimage_is_destination_range(s
return 0;
}
@@ -104740,8 +106050,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
+ else
+ address_bits = long_log2(limit);
+
-+ if (xen_create_contiguous_region((unsigned long)page_address(pages),
-+ order, address_bits) < 0) {
++ if (xen_limit_pages_to_max_mfn(pages, order, address_bits) < 0) {
+ __free_pages(pages, order);
+ return NULL;
+ }
@@ -104749,7 +106058,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
pages->mapping = NULL;
set_page_private(pages, order);
count = 1 << order;
-@@ -355,6 +369,9 @@ static void kimage_free_pages(struct pag
+@@ -355,6 +368,9 @@ static void kimage_free_pages(struct pag
count = 1 << order;
for (i = 0; i < count; i++)
ClearPageReserved(page + i);
@@ -104759,7 +106068,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
__free_pages(page, order);
}
-@@ -400,10 +417,10 @@ static struct page *kimage_alloc_normal_
+@@ -400,10 +416,10 @@ static struct page *kimage_alloc_normal_
do {
unsigned long pfn, epfn, addr, eaddr;
@@ -104772,7 +106081,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
epfn = pfn + count;
addr = pfn << PAGE_SHIFT;
eaddr = epfn << PAGE_SHIFT;
-@@ -437,6 +454,7 @@ static struct page *kimage_alloc_normal_
+@@ -437,6 +453,7 @@ static struct page *kimage_alloc_normal_
return pages;
}
@@ -104780,7 +106089,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
static struct page *kimage_alloc_crash_control_pages(struct kimage *image,
unsigned int order)
{
-@@ -490,7 +508,7 @@ static struct page *kimage_alloc_crash_c
+@@ -490,7 +507,7 @@ static struct page *kimage_alloc_crash_c
}
/* If I don't overlap any segments I have found my hole! */
if (i == image->nr_segments) {
@@ -104789,7 +106098,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
break;
}
}
-@@ -517,6 +535,13 @@ struct page *kimage_alloc_control_pages(
+@@ -517,6 +534,13 @@ struct page *kimage_alloc_control_pages(
return pages;
}
@@ -104803,7 +106112,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
static int kimage_add_entry(struct kimage *image, kimage_entry_t entry)
{
-@@ -532,7 +557,7 @@ static int kimage_add_entry(struct kimag
+@@ -532,7 +556,7 @@ static int kimage_add_entry(struct kimag
return -ENOMEM;
ind_page = page_address(page);
@@ -104812,7 +106121,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
image->entry = ind_page;
image->last_entry = ind_page +
((PAGE_SIZE/sizeof(kimage_entry_t)) - 1);
-@@ -593,13 +618,13 @@ static int kimage_terminate(struct kimag
+@@ -593,13 +617,13 @@ static int kimage_terminate(struct kimag
#define for_each_kimage_entry(image, ptr, entry) \
for (ptr = &image->head; (entry = *ptr) && !(entry & IND_DONE); \
ptr = (entry & IND_INDIRECTION)? \
@@ -104828,7 +106137,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
kimage_free_pages(page);
}
-@@ -611,6 +636,10 @@ static void kimage_free(struct kimage *i
+@@ -611,6 +635,10 @@ static void kimage_free(struct kimage *i
if (!image)
return;
@@ -104839,7 +106148,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
kimage_free_extra_pages(image);
for_each_kimage_entry(image, ptr, entry) {
if (entry & IND_INDIRECTION) {
-@@ -686,7 +715,7 @@ static struct page *kimage_alloc_page(st
+@@ -686,7 +714,7 @@ static struct page *kimage_alloc_page(st
* have a match.
*/
list_for_each_entry(page, &image->dest_pages, lru) {
@@ -104848,7 +106157,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
if (addr == destination) {
list_del(&page->lru);
return page;
-@@ -697,16 +726,16 @@ static struct page *kimage_alloc_page(st
+@@ -697,16 +725,16 @@ static struct page *kimage_alloc_page(st
kimage_entry_t *old;
/* Allocate a page, if we run out of memory give up */
@@ -104868,7 +106177,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
/* If it is the destination page we want use it */
if (addr == destination)
-@@ -729,7 +758,7 @@ static struct page *kimage_alloc_page(st
+@@ -729,7 +757,7 @@ static struct page *kimage_alloc_page(st
struct page *old_page;
old_addr = *old & PAGE_MASK;
@@ -104877,7 +106186,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
copy_highpage(page, old_page);
*old = addr | (*old & ~PAGE_MASK);
-@@ -779,7 +808,7 @@ static int kimage_load_normal_segment(st
+@@ -779,7 +807,7 @@ static int kimage_load_normal_segment(st
result = -ENOMEM;
goto out;
}
@@ -104886,7 +106195,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
<< PAGE_SHIFT);
if (result < 0)
goto out;
-@@ -811,6 +840,7 @@ out:
+@@ -811,6 +839,7 @@ out:
return result;
}
@@ -104894,7 +106203,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
static int kimage_load_crash_segment(struct kimage *image,
struct kexec_segment *segment)
{
-@@ -833,7 +863,7 @@ static int kimage_load_crash_segment(str
+@@ -833,7 +862,7 @@ static int kimage_load_crash_segment(str
char *ptr;
size_t uchunk, mchunk;
@@ -104903,7 +106212,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
if (page == 0) {
result = -ENOMEM;
goto out;
-@@ -881,6 +911,13 @@ static int kimage_load_segment(struct ki
+@@ -881,6 +910,13 @@ static int kimage_load_segment(struct ki
return result;
}
@@ -104917,7 +106226,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
/*
* Exec Kernel system call: for obvious reasons only root may call it.
-@@ -991,6 +1028,13 @@ asmlinkage long sys_kexec_load(unsigned
+@@ -991,6 +1027,13 @@ asmlinkage long sys_kexec_load(unsigned
if (result)
goto out;
}
@@ -104931,7 +106240,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
/* Install the new kernel, and Uninstall the old */
image = xchg(dest_image, image);
-@@ -1044,7 +1088,6 @@ void crash_kexec(struct pt_regs *regs)
+@@ -1044,7 +1087,6 @@ void crash_kexec(struct pt_regs *regs)
{
int locked;
@@ -104941,7 +106250,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
* we are using after a panic on a different cpu.
diff -Nurp pristine-linux-2.6.18/kernel/softlockup.c tmp-linux-2.6-xen.patch/kernel/softlockup.c
--- pristine-linux-2.6.18/kernel/softlockup.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/kernel/softlockup.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/kernel/softlockup.c 2007-10-15 11:42:06.000000000 -0700
@@ -40,6 +40,19 @@ void touch_softlockup_watchdog(void)
}
EXPORT_SYMBOL(touch_softlockup_watchdog);
@@ -104964,7 +106273,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/softlockup.c tmp-linux-2.6-xen.patch/ker
* whether the watchdog thread has hung or not:
diff -Nurp pristine-linux-2.6.18/kernel/timer.c tmp-linux-2.6-xen.patch/kernel/timer.c
--- pristine-linux-2.6.18/kernel/timer.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/kernel/timer.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/kernel/timer.c 2007-10-15 11:42:06.000000000 -0700
@@ -485,7 +485,9 @@ unsigned long next_timer_interrupt(void)
if (hr_expires < 3)
return hr_expires + jiffies;
@@ -104978,7 +106287,7 @@ diff -Nurp pristine-linux-2.6.18/kernel/timer.c tmp-linux-2.6-xen.patch/kernel/t
spin_lock(&base->lock);
diff -Nurp pristine-linux-2.6.18/lib/Makefile tmp-linux-2.6-xen.patch/lib/Makefile
--- pristine-linux-2.6.18/lib/Makefile 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/lib/Makefile 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/lib/Makefile 2007-10-11 00:15:26.000000000 -0700
@@ -52,6 +52,7 @@ obj-$(CONFIG_SMP) += percpu_counter.o
obj-$(CONFIG_AUDIT_GENERIC) += audit.o
@@ -104989,7 +106298,7 @@ diff -Nurp pristine-linux-2.6.18/lib/Makefile tmp-linux-2.6-xen.patch/lib/Makefi
clean-files := crc32table.h
diff -Nurp pristine-linux-2.6.18/mm/Kconfig tmp-linux-2.6-xen.patch/mm/Kconfig
--- pristine-linux-2.6.18/mm/Kconfig 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/mm/Kconfig 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/mm/Kconfig 2007-10-11 00:15:26.000000000 -0700
@@ -127,11 +127,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.
@@ -105007,7 +106316,7 @@ diff -Nurp pristine-linux-2.6.18/mm/Kconfig tmp-linux-2.6-xen.patch/mm/Kconfig
#
diff -Nurp pristine-linux-2.6.18/mm/highmem.c tmp-linux-2.6-xen.patch/mm/highmem.c
--- pristine-linux-2.6.18/mm/highmem.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/mm/highmem.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/mm/highmem.c 2007-10-11 00:15:26.000000000 -0700
@@ -142,6 +142,17 @@ start:
return vaddr;
}
@@ -105028,7 +106337,7 @@ diff -Nurp pristine-linux-2.6.18/mm/highmem.c tmp-linux-2.6-xen.patch/mm/highmem
unsigned long vaddr;
diff -Nurp pristine-linux-2.6.18/mm/memory.c tmp-linux-2.6-xen.patch/mm/memory.c
--- pristine-linux-2.6.18/mm/memory.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/mm/memory.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/mm/memory.c 2007-10-11 00:15:26.000000000 -0700
@@ -403,7 +403,8 @@ struct page *vm_normal_page(struct vm_ar
* and that the resulting page looks ok.
*/
@@ -105202,7 +106511,7 @@ diff -Nurp pristine-linux-2.6.18/mm/memory.c tmp-linux-2.6-xen.patch/mm/memory.c
* which was read non-atomically. Before making any commitment, on
diff -Nurp pristine-linux-2.6.18/mm/mmap.c tmp-linux-2.6-xen.patch/mm/mmap.c
--- pristine-linux-2.6.18/mm/mmap.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/mm/mmap.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/mm/mmap.c 2007-10-11 00:15:26.000000000 -0700
@@ -1963,6 +1963,10 @@ void exit_mmap(struct mm_struct *mm)
unsigned long nr_accounted = 0;
unsigned long end;
@@ -105216,7 +106525,7 @@ diff -Nurp pristine-linux-2.6.18/mm/mmap.c tmp-linux-2.6-xen.patch/mm/mmap.c
tlb = tlb_gather_mmu(mm, 1);
diff -Nurp pristine-linux-2.6.18/mm/page_alloc.c tmp-linux-2.6-xen.patch/mm/page_alloc.c
--- pristine-linux-2.6.18/mm/page_alloc.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/mm/page_alloc.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/mm/page_alloc.c 2007-10-11 00:15:26.000000000 -0700
@@ -154,7 +154,11 @@ static void bad_page(struct page *page)
1 << PG_slab |
1 << PG_swapcache |
@@ -105278,7 +106587,7 @@ diff -Nurp pristine-linux-2.6.18/mm/page_alloc.c tmp-linux-2.6-xen.patch/mm/page
page->mapping = NULL;
diff -Nurp pristine-linux-2.6.18/net/core/dev.c tmp-linux-2.6-xen.patch/net/core/dev.c
--- pristine-linux-2.6.18/net/core/dev.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/net/core/dev.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/net/core/dev.c 2007-10-11 00:15:26.000000000 -0700
@@ -113,11 +113,18 @@
#include <linux/wireless.h>
#include <net/iw_handler.h>
@@ -105394,7 +106703,7 @@ diff -Nurp pristine-linux-2.6.18/net/core/dev.c tmp-linux-2.6-xen.patch/net/core
EXPORT_SYMBOL(br_handle_frame_hook);
diff -Nurp pristine-linux-2.6.18/net/core/skbuff.c tmp-linux-2.6-xen.patch/net/core/skbuff.c
--- pristine-linux-2.6.18/net/core/skbuff.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/net/core/skbuff.c 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/net/core/skbuff.c 2007-10-11 00:15:26.000000000 -0700
@@ -240,6 +240,7 @@ struct sk_buff *alloc_skb_from_cache(kme
skb_shinfo(skb)->gso_size = 0;
skb_shinfo(skb)->gso_segs = 0;
@@ -105416,7 +106725,7 @@ diff -Nurp pristine-linux-2.6.18/net/core/skbuff.c tmp-linux-2.6-xen.patch/net/c
C(priority);
diff -Nurp pristine-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_tcp.c tmp-linux-2.6-xen.patch/net/ipv4/netfilter/ip_nat_proto_tcp.c
--- pristine-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_tcp.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/net/ipv4/netfilter/ip_nat_proto_tcp.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/net/ipv4/netfilter/ip_nat_proto_tcp.c 2007-10-15 11:42:06.000000000 -0700
@@ -129,7 +129,12 @@ tcp_manip_pkt(struct sk_buff **pskb,
if (hdrsize < sizeof(*hdr))
return 1;
@@ -105433,7 +106742,7 @@ diff -Nurp pristine-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_tcp.c tmp-linux
hdr->check));
diff -Nurp pristine-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_udp.c tmp-linux-2.6-xen.patch/net/ipv4/netfilter/ip_nat_proto_udp.c
--- pristine-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_udp.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/net/ipv4/netfilter/ip_nat_proto_udp.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/net/ipv4/netfilter/ip_nat_proto_udp.c 2007-10-15 11:42:06.000000000 -0700
@@ -113,11 +113,17 @@ udp_manip_pkt(struct sk_buff **pskb,
newport = tuple->dst.u.udp.port;
portptr = &hdr->dest;
@@ -105456,7 +106765,7 @@ diff -Nurp pristine-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_udp.c tmp-linux
}
diff -Nurp pristine-linux-2.6.18/net/ipv4/tcp_input.c tmp-linux-2.6-xen.patch/net/ipv4/tcp_input.c
--- pristine-linux-2.6.18/net/ipv4/tcp_input.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/net/ipv4/tcp_input.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/net/ipv4/tcp_input.c 2007-10-15 11:42:06.000000000 -0700
@@ -127,7 +127,7 @@ static void tcp_measure_rcv_mss(struct s
/* skb->len may jitter because of SACKs, even if peer
* sends good full-sized frames.
@@ -105468,7 +106777,7 @@ diff -Nurp pristine-linux-2.6.18/net/ipv4/tcp_input.c tmp-linux-2.6-xen.patch/ne
} else {
diff -Nurp pristine-linux-2.6.18/net/ipv4/xfrm4_output.c tmp-linux-2.6-xen.patch/net/ipv4/xfrm4_output.c
--- pristine-linux-2.6.18/net/ipv4/xfrm4_output.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/net/ipv4/xfrm4_output.c 2007-06-14 10:41:41.000000000 -0700
++++ tmp-linux-2.6-xen.patch/net/ipv4/xfrm4_output.c 2007-10-15 11:42:06.000000000 -0700
@@ -18,6 +18,8 @@
#include <net/xfrm.h>
#include <net/icmp.h>
@@ -105491,7 +106800,7 @@ diff -Nurp pristine-linux-2.6.18/net/ipv4/xfrm4_output.c tmp-linux-2.6-xen.patch
if (err)
diff -Nurp pristine-linux-2.6.18/scripts/Makefile.xen tmp-linux-2.6-xen.patch/scripts/Makefile.xen
--- pristine-linux-2.6.18/scripts/Makefile.xen 1969-12-31 16:00:00.000000000 -0800
-+++ tmp-linux-2.6-xen.patch/scripts/Makefile.xen 2007-05-18 07:45:21.000000000 -0700
++++ tmp-linux-2.6-xen.patch/scripts/Makefile.xen 2007-10-11 00:15:26.000000000 -0700
@@ -0,0 +1,14 @@
+
+# cherrypickxen($1 = allobj)
diff --git a/trunk/2.6.18/30037_amd64-zero-extend-32bit-ptrace-xen.patch b/trunk/2.6.18/30037_amd64-zero-extend-32bit-ptrace-xen.patch
deleted file mode 100644
index 25e56d3..0000000
--- a/trunk/2.6.18/30037_amd64-zero-extend-32bit-ptrace-xen.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Adjusted to apply to Debian's 2.6.18 Xen
-
---- linux-source-2.6.18.orig/arch/x86_64/ia32/ia32entry-xen.S 2006-09-19 21:42:06.000000000 -0600
-+++ linux-source-2.6.18/arch/x86_64/ia32/ia32entry-xen.S 2007-09-25 00:10:16.089100799 -0600
-@@ -38,6 +38,18 @@
- #define __sti sti
- #endif
-
-+ .macro LOAD_ARGS32 offset
-+ movl \offset(%rsp),%r11d
-+ movl \offset+8(%rsp),%r10d
-+ movl \offset+16(%rsp),%r9d
-+ movl \offset+24(%rsp),%r8d
-+ movl \offset+40(%rsp),%ecx
-+ movl \offset+48(%rsp),%edx
-+ movl \offset+56(%rsp),%esi
-+ movl \offset+64(%rsp),%edi
-+ movl \offset+72(%rsp),%eax
-+ .endm
-+
- .macro CFI_STARTPROC32 simple
- CFI_STARTPROC \simple
- CFI_UNDEFINED r8
-@@ -151,7 +163,7 @@ sysenter_tracesys:
- movq $-ENOSYS,RAX(%rsp) /* really needed? */
- movq %rsp,%rdi /* &pt_regs -> arg1 */
- call syscall_trace_enter
-- LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
-+ LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
- RESTORE_REST
- movl %ebp, %ebp
- /* no need to do an access_ok check here because rbp has been
-@@ -253,7 +265,7 @@ cstar_tracesys:
- movq $-ENOSYS,RAX(%rsp) /* really needed? */
- movq %rsp,%rdi /* &pt_regs -> arg1 */
- call syscall_trace_enter
-- LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
-+ LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
- RESTORE_REST
- movl RSP-ARGOFFSET(%rsp), %r8d
- /* no need to do an access_ok check here because r8 has been
-@@ -330,7 +342,7 @@ ia32_tracesys:
- movq $-ENOSYS,RAX(%rsp) /* really needed? */
- movq %rsp,%rdi /* &pt_regs -> arg1 */
- call syscall_trace_enter
-- LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
-+ LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
- RESTORE_REST
- jmp ia32_do_syscall
- END(ia32_syscall)