summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Marineau <marineam@gentoo.org>2008-02-16 01:09:22 +0000
committerMichael Marineau <marineam@gentoo.org>2008-02-16 01:09:22 +0000
commit8980e5200f5cc42d8dc769a7ef12080822104b92 (patch)
treebdbb38d650ac91351e006f2d64cd4e3c30a4320c
parentTesting 2.6.22 release (diff)
downloadxen-8980e5200f5cc42d8dc769a7ef12080822104b92.tar.gz
xen-8980e5200f5cc42d8dc769a7ef12080822104b92.tar.bz2
xen-8980e5200f5cc42d8dc769a7ef12080822104b92.zip
Bump the 2.6.18 patches to xen 3.2.0
svn path=/patches/; revision=65
-rw-r--r--trunk/2.6.18/00000_README20
-rw-r--r--trunk/2.6.18/10001_xen-3.2.0.patch (renamed from trunk/2.6.18/10001_xen-3.1.2.patch)46939
-rw-r--r--trunk/2.6.18/10002_i386-fix-xen_l1_entry_update-for-highptes.patch24
-rw-r--r--trunk/2.6.18/30038_don-t-leak-nt-bit-into-next-task-xen.patch32
-rw-r--r--trunk/2.6.18/50001_make-install.patch52
-rw-r--r--trunk/2.6.18/50002_always-enable-xen-genapic.patch12
6 files changed, 40021 insertions, 7058 deletions
diff --git a/trunk/2.6.18/00000_README b/trunk/2.6.18/00000_README
index ca16f8b..3eae5d1 100644
--- a/trunk/2.6.18/00000_README
+++ b/trunk/2.6.18/00000_README
@@ -19,12 +19,8 @@ Numbering
Patches
-------
-10001_xen-3.1.2.patch
- Upstream 3.1.2 patch
-
-10002_i386-fix-xen_l1_entry_update-for-highptes.patch
- Fix for kernels compiled with CONFIG_HIGHPTE.
- Pulled from linux-2.6.18-xen.hg, changeset e79729740288.
+10001_xen-3.2.0.patch
+ Upstream 3.2.0 patch
30001_nfnetlink_log-null-deref.patch
[SECURITY] Fix remotely exploitable NULL pointer dereference in
@@ -184,10 +180,6 @@ Patches
prevent incorrect permissions upon remount.
See CVE-2007-4849
-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
-
30039_hugetlb-prio_tree-unit-fix.patch
[SECURITY] Fix misconversion of hugetlb_vmtruncate_list to prio_tree
which could be used to trigger a BUG_ON() call in exit_mmap.
@@ -208,13 +200,5 @@ Patches
Update fix for CVE-2007-3848 with the patch accepted upstream
(formerly 30013_reset-pdeathsig-on-suid.patch)
-50001_make-install.patch
- Handle make install in a semi-sane way that plays nice with
- split domU/dom0 kernels.
-
-50002_always-enable-xen-genapic.patch
- Compile fix for non-SMP (UP) kernels. Since UP support is broken in
- upstream Xen I'm not sure if I trust it or not. :-P
-
50009_gentooify-tls-warning.patch
Change tls warning instructions to apply directly to Gentoo.
diff --git a/trunk/2.6.18/10001_xen-3.1.2.patch b/trunk/2.6.18/10001_xen-3.2.0.patch
index 099033d..d3d6c2b 100644
--- a/trunk/2.6.18/10001_xen-3.1.2.patch
+++ b/trunk/2.6.18/10001_xen-3.2.0.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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/Kconfig linux-2.6.18-xen-3.2.0/arch/i386/Kconfig
+--- linux-2.6.18.8/arch/i386/Kconfig 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/Kconfig 2008-02-15 16:21:49.000000000 -0800
@@ -16,6 +16,7 @@ config X86_32
config GENERIC_TIME
@@ -9,12 +9,13 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
default y
config LOCKDEP_SUPPORT
-@@ -103,6 +104,15 @@ config X86_PC
+@@ -103,6 +104,16 @@ config X86_PC
help
Choose this option if your computer is a standard PC or compatible.
+config X86_XEN
+ bool "Xen-compatible"
++ select XEN
+ select X86_UP_APIC if !SMP && XEN_PRIVILEGED_GUEST
+ select X86_UP_IOAPIC if !SMP && XEN_PRIVILEGED_GUEST
+ select SWIOTLB
@@ -25,7 +26,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
config X86_ELAN
bool "AMD Elan"
help
-@@ -213,6 +223,7 @@ source "arch/i386/Kconfig.cpu"
+@@ -213,6 +224,7 @@ source "arch/i386/Kconfig.cpu"
config HPET_TIMER
bool "HPET Timer Support"
@@ -33,7 +34,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
help
This enables the use of the HPET for the kernel's internal timer.
HPET is the next generation timer replacing legacy 8254s.
-@@ -263,7 +274,7 @@ source "kernel/Kconfig.preempt"
+@@ -263,7 +275,7 @@ source "kernel/Kconfig.preempt"
config X86_UP_APIC
bool "Local APIC support on uniprocessors"
@@ -42,7 +43,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
help
A local APIC (Advanced Programmable Interrupt Controller) is an
integrated interrupt controller in the CPU. If you have a single-CPU
-@@ -288,12 +299,12 @@ config X86_UP_IOAPIC
+@@ -288,12 +300,12 @@ config X86_UP_IOAPIC
config X86_LOCAL_APIC
bool
@@ -57,7 +58,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
default y
config X86_VISWS_APIC
-@@ -303,7 +314,7 @@ config X86_VISWS_APIC
+@@ -303,7 +315,7 @@ config X86_VISWS_APIC
config X86_MCE
bool "Machine Check Exception"
@@ -66,7 +67,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
---help---
Machine Check Exception support allows the processor to notify the
kernel if it detects a problem (e.g. overheating, component failure).
-@@ -402,6 +413,7 @@ config X86_REBOOTFIXUPS
+@@ -402,6 +414,7 @@ config X86_REBOOTFIXUPS
config MICROCODE
tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support"
@@ -74,14 +75,6 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
---help---
If you say Y here and also to "/dev file system support" in the
'File systems' section, you will be able to update the microcode on
-@@ -419,6 +431,7 @@ config MICROCODE
-
- config X86_MSR
- tristate "/dev/cpu/*/msr - Model-specific register support"
-+ depends on !X86_XEN
- help
- This device gives privileged processes access to the x86
- Model-Specific Registers (MSRs). It is a character device with
@@ -434,6 +447,10 @@ config X86_CPUID
with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
/dev/cpu/31/cpuid.
@@ -145,16 +138,15 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
default y
help
Map the VDSO to the predictable old-style address too.
-@@ -810,18 +831,20 @@ config ARCH_ENABLE_MEMORY_HOTPLUG
+@@ -810,18 +831,18 @@ config ARCH_ENABLE_MEMORY_HOTPLUG
depends on HIGHMEM
menu "Power management options (ACPI, APM)"
- depends on !X86_VOYAGER
+ depends on !(X86_VOYAGER || XEN_UNPRIVILEGED_GUEST)
-+if !X86_XEN
- source kernel/power/Kconfig
-+endif
+-source kernel/power/Kconfig
++source "kernel/power/Kconfig"
source "drivers/acpi/Kconfig"
@@ -169,7 +161,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
---help---
APM is a BIOS specification for saving power using several different
techniques. This is mostly useful for battery powered laptops with
-@@ -1006,6 +1029,7 @@ choice
+@@ -1006,6 +1027,7 @@ choice
config PCI_GOBIOS
bool "BIOS"
@@ -177,7 +169,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
config PCI_GOMMCONFIG
bool "MMConfig"
-@@ -1013,6 +1037,13 @@ config PCI_GOMMCONFIG
+@@ -1013,6 +1035,13 @@ config PCI_GOMMCONFIG
config PCI_GODIRECT
bool "Direct"
@@ -191,7 +183,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
config PCI_GOANY
bool "Any"
-@@ -1020,7 +1051,7 @@ endchoice
+@@ -1020,7 +1049,7 @@ endchoice
config PCI_BIOS
bool
@@ -200,7 +192,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
default y
config PCI_DIRECT
-@@ -1033,6 +1064,18 @@ config PCI_MMCONFIG
+@@ -1033,6 +1062,18 @@ config PCI_MMCONFIG
depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY)
default y
@@ -219,7 +211,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
source "drivers/pci/pcie/Kconfig"
source "drivers/pci/Kconfig"
-@@ -1043,7 +1086,7 @@ config ISA_DMA_API
+@@ -1043,7 +1084,7 @@ config ISA_DMA_API
config ISA
bool "ISA support"
@@ -228,7 +220,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
help
Find out whether you have ISA slots on your motherboard. ISA is the
name of a bus system, i.e. the way the CPU talks to the other stuff
-@@ -1070,7 +1113,7 @@ config EISA
+@@ -1070,7 +1111,7 @@ config EISA
source "drivers/eisa/Kconfig"
config MCA
@@ -237,7 +229,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
default y if X86_VOYAGER
help
MicroChannel Architecture is found in some IBM PS/2 machines and
-@@ -1146,6 +1189,8 @@ source "security/Kconfig"
+@@ -1146,6 +1187,8 @@ source "security/Kconfig"
source "crypto/Kconfig"
@@ -246,7 +238,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
source "lib/Kconfig"
#
-@@ -1171,7 +1216,7 @@ config X86_SMP
+@@ -1171,7 +1214,7 @@ config X86_SMP
config X86_HT
bool
@@ -255,7 +247,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
default y
config X86_BIOS_REBOOT
-@@ -1184,6 +1229,16 @@ config X86_TRAMPOLINE
+@@ -1184,6 +1227,16 @@ config X86_TRAMPOLINE
depends on X86_SMP || (X86_VOYAGER && SMP)
default y
@@ -272,10 +264,10 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/
config KTIME_SCALAR
bool
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-11-14 15:35:27.000000000 -0800
-@@ -251,7 +251,7 @@ config X86_PPRO_FENCE
+diff -rpuN linux-2.6.18.8/arch/i386/Kconfig.cpu linux-2.6.18-xen-3.2.0/arch/i386/Kconfig.cpu
+--- linux-2.6.18.8/arch/i386/Kconfig.cpu 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/Kconfig.cpu 2008-02-15 16:21:49.000000000 -0800
+@@ -252,7 +252,7 @@ config X86_PPRO_FENCE
config X86_F00F_BUG
bool
@@ -284,16 +276,16 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig.cpu tmp-linux-2.6-xen.patch/a
default y
config X86_WP_WORKS_OK
-@@ -311,5 +311,5 @@ config X86_OOSTORE
+@@ -312,5 +312,5 @@ config X86_OOSTORE
config X86_TSC
bool
- depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1 || MGEODE_LX) && !X86_NUMAQ
+ depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1 || MGEODE_LX) && !X86_NUMAQ && !X86_XEN
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/Kconfig.debug linux-2.6.18-xen-3.2.0/arch/i386/Kconfig.debug
+--- linux-2.6.18.8/arch/i386/Kconfig.debug 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/Kconfig.debug 2008-02-15 16:21:49.000000000 -0800
@@ -79,6 +79,7 @@ config X86_MPPARSE
config DOUBLEFAULT
default y
@@ -302,22 +294,10 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Kconfig.debug tmp-linux-2.6-xen.patch
help
This option allows trapping of rare doublefault exceptions that
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-11-14 15:35:27.000000000 -0800
-@@ -48,6 +48,11 @@ CFLAGS += $(shell if [ $(call cc-vers
-
- CFLAGS += $(cflags-y)
-
-+cppflags-$(CONFIG_XEN) += \
-+ -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION)
-+
-+CPPFLAGS += $(cppflags-y)
-+
- # Default subarch .c files
- mcore-y := mach-default
-
-@@ -71,6 +76,10 @@ mcore-$(CONFIG_X86_BIGSMP) := mach-defau
+diff -rpuN linux-2.6.18.8/arch/i386/Makefile linux-2.6.18-xen-3.2.0/arch/i386/Makefile
+--- linux-2.6.18.8/arch/i386/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/Makefile 2008-02-15 16:21:49.000000000 -0800
+@@ -71,6 +71,10 @@ mcore-$(CONFIG_X86_BIGSMP) := mach-defau
mflags-$(CONFIG_X86_SUMMIT) := -Iinclude/asm-i386/mach-summit
mcore-$(CONFIG_X86_SUMMIT) := mach-default
@@ -328,125 +308,93 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/Makefile tmp-linux-2.6-xen.patch/arch
# generic subarchitecture
mflags-$(CONFIG_X86_GENERICARCH) := -Iinclude/asm-i386/mach-generic
mcore-$(CONFIG_X86_GENERICARCH) := mach-default
-@@ -105,6 +114,19 @@ boot := arch/i386/boot
- PHONY += zImage bzImage compressed zlilo bzlilo \
+@@ -102,9 +106,20 @@ AFLAGS += $(mflags-y)
+
+ boot := arch/i386/boot
+
+-PHONY += zImage bzImage compressed zlilo bzlilo \
++PHONY += zImage bzImage vmlinuz compressed zlilo bzlilo \
zdisk bzdisk fdimage fdimage144 fdimage288 isoimage install
+ifdef CONFIG_XEN
-+CPPFLAGS := -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS)
-+head-y := arch/i386/kernel/head-xen.o arch/i386/kernel/init_task-xen.o
-+boot := arch/i386/boot-xen
-+.PHONY: vmlinuz
++CPPFLAGS := -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION) \
++ -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS)
+all: vmlinuz
+
-+vmlinuz: vmlinux
-+ $(Q)$(MAKE) $(build)=$(boot) $@
++# KBUILD_IMAGE specifies the target image being built
++KBUILD_IMAGE := $(boot)/vmlinuz
+
-+install:
-+ $(Q)$(MAKE) $(build)=$(boot) XENGUEST=$(XENGUEST) $@
++vmlinuz: vmlinux
++ $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
+else
all: bzImage
# KBUILD_IMAGE specify target image being built
-@@ -127,6 +149,7 @@ fdimage fdimage144 fdimage288 isoimage:
+@@ -124,6 +139,7 @@ zdisk bzdisk: vmlinux
- install:
- $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
+ fdimage fdimage144 fdimage288 isoimage: vmlinux
+ $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
+endif
- archclean:
- $(Q)$(MAKE) $(clean)=arch/i386/boot
-@@ -145,3 +168,4 @@ endef
- CLEAN_FILES += arch/$(ARCH)/boot/fdimage \
- arch/$(ARCH)/boot/image.iso \
- arch/$(ARCH)/boot/mtools.conf
-+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,21 @@
-+
-+OBJCOPYFLAGS := -g --strip-unneeded
-+
-+vmlinuz: vmlinux-stripped FORCE
+ install:
+ $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
+diff -rpuN linux-2.6.18.8/arch/i386/boot/Makefile linux-2.6.18-xen-3.2.0/arch/i386/boot/Makefile
+--- linux-2.6.18.8/arch/i386/boot/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/boot/Makefile 2008-02-15 16:21:49.000000000 -0800
+@@ -26,7 +26,7 @@ SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
+ #RAMDISK := -DRAMDISK=512
+
+ targets := vmlinux.bin bootsect bootsect.o \
+- setup setup.o zImage bzImage
++ setup setup.o zImage bzImage vmlinuz vmlinux-stripped
+ subdir- := compressed
+
+ hostprogs-y := tools/build
+@@ -133,5 +133,13 @@ zlilo: $(BOOTIMAGE)
+ cp System.map $(INSTALL_PATH)/
+ if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
+
++$(obj)/vmlinuz: $(obj)/vmlinux-stripped FORCE
+ $(call if_changed,gzip)
++ @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
+
-+vmlinux-stripped: vmlinux FORCE
++$(obj)/vmlinux-stripped: OBJCOPYFLAGS := -g --strip-unneeded
++$(obj)/vmlinux-stripped: vmlinux FORCE
+ $(call if_changed,objcopy)
+
-+INSTALL_ROOT := $(patsubst %/boot,%,$(INSTALL_PATH))
-+
-+XINSTALL_NAME ?= $(KERNELRELEASE)
-+install:
-+ mkdir -p $(INSTALL_ROOT)/boot
-+ ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
-+ rm -f $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-+ install -m0644 vmlinuz $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-+ install -m0644 vmlinux $(INSTALL_ROOT)/boot/vmlinux-syms-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-+ install -m0664 .config $(INSTALL_ROOT)/boot/config-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-+ install -m0664 System.map $(INSTALL_ROOT)/boot/System.map-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-+ ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
-diff -Nurp 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-11-14 15:35:27.000000000 -0800
-@@ -44,6 +44,12 @@ EXTRA_AFLAGS := -traditional
+ install:
+ sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/Makefile linux-2.6.18-xen-3.2.0/arch/i386/kernel/Makefile
+--- linux-2.6.18.8/arch/i386/kernel/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/Makefile 2008-02-15 16:21:49.000000000 -0800
+@@ -43,6 +43,7 @@ obj-$(CONFIG_K8_NB) += k8.o
+ EXTRA_AFLAGS := -traditional
obj-$(CONFIG_SCx200) += scx200.o
++obj-$(CONFIG_XEN) += fixup.o
-+ifdef CONFIG_XEN
-+vsyscall_note := vsyscall-note-xen.o
-+else
-+vsyscall_note := vsyscall-note.o
-+endif
-+
# vsyscall.o contains the vsyscall DSO images as __initdata.
# We must build both images before we can assemble it.
- # Note: kbuild does not track this dependency due to usage of .incbin
-@@ -65,7 +71,7 @@ SYSCFLAGS_vsyscall-int80.so = $(vsyscall
-
- $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so: \
- $(obj)/vsyscall-%.so: $(src)/vsyscall.lds \
-- $(obj)/vsyscall-%.o $(obj)/vsyscall-note.o FORCE
-+ $(obj)/vsyscall-%.o $(obj)/$(vsyscall_note) FORCE
- $(call if_changed,syscall)
-
- # We also create a special relocatable object that should mirror the symbol
-@@ -77,8 +83,20 @@ $(obj)/built-in.o: ld_flags += -R $(obj)
-
- SYSCFLAGS_vsyscall-syms.o = -r
- $(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \
-- $(obj)/vsyscall-sysenter.o $(obj)/vsyscall-note.o FORCE
-+ $(obj)/vsyscall-sysenter.o $(obj)/$(vsyscall_note) FORCE
+@@ -80,5 +81,8 @@ $(obj)/vsyscall-syms.o: $(src)/vsyscall.
+ $(obj)/vsyscall-sysenter.o $(obj)/vsyscall-note.o FORCE
$(call if_changed,syscall)
++early_printk-y += ../../x86_64/kernel/early_printk.o
k8-y += ../../x86_64/kernel/k8.o
-+ifdef CONFIG_XEN
-+include $(srctree)/scripts/Makefile.xen
-+
-+obj-y += fixup.o
-+microcode-$(subst m,y,$(CONFIG_MICROCODE)) := microcode-xen.o
-+n-obj-xen := i8259.o timers/ reboot.o smpboot.o trampoline.o
-+
-+obj-y := $(call filterxen, $(obj-y), $(n-obj-xen))
-+obj-y := $(call cherrypickxen, $(obj-y))
-+extra-y := $(call cherrypickxen, $(extra-y))
-+%/head-xen.o %/head-xen.s: EXTRA_AFLAGS :=
-+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-11-14 15:35:27.000000000 -0800
-@@ -6,3 +6,7 @@ ifneq ($(CONFIG_ACPI_PROCESSOR),)
++disabled-obj-$(CONFIG_XEN) := i8259.o reboot.o smpboot.o trampoline.o
++%/head.o %/head.s: $(if $(CONFIG_XEN),EXTRA_AFLAGS,dummy) :=
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/acpi/Makefile linux-2.6.18-xen-3.2.0/arch/i386/kernel/acpi/Makefile
+--- linux-2.6.18.8/arch/i386/kernel/acpi/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/acpi/Makefile 2008-02-15 16:21:49.000000000 -0800
+@@ -6,3 +6,4 @@ ifneq ($(CONFIG_ACPI_PROCESSOR),)
obj-y += cstate.o processor.o
endif
-+ifdef CONFIG_XEN
-+include $(srctree)/scripts/Makefile.xen
-+obj-y := $(call cherrypickxen, $(obj-y), $(src))
-+endif
-diff -Nurp 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-11-14 15:35:27.000000000 -0800
++disabled-obj-$(CONFIG_XEN) := cstate.o wakeup.o
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/acpi/boot-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/acpi/boot-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/acpi/boot-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/acpi/boot-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,1168 @@
+/*
+ * boot.c - Architecture-Specific Low-Level ACPI Boot Support
@@ -1616,9 +1564,147 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/acpi/boot-xen.c tmp-linux-2.6-
+
+ return 0;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/acpi/sleep-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/acpi/sleep-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/acpi/sleep-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/acpi/sleep-xen.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,134 @@
++/*
++ * sleep.c - x86-specific ACPI sleep support.
++ *
++ * Copyright (C) 2001-2003 Patrick Mochel
++ * Copyright (C) 2001-2003 Pavel Machek <pavel@suse.cz>
++ */
++
++#include <linux/acpi.h>
++#include <linux/bootmem.h>
++#include <linux/dmi.h>
++#include <linux/cpumask.h>
++
++#include <asm/smp.h>
++
++#ifndef CONFIG_ACPI_PV_SLEEP
++/* address in low memory of the wakeup routine. */
++unsigned long acpi_wakeup_address = 0;
++unsigned long acpi_video_flags;
++extern char wakeup_start, wakeup_end;
++
++extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
++#endif
++
++/**
++ * acpi_save_state_mem - save kernel state
++ *
++ * Create an identity mapped page table and copy the wakeup routine to
++ * low memory.
++ */
++int acpi_save_state_mem(void)
++{
++#ifndef CONFIG_ACPI_PV_SLEEP
++ if (!acpi_wakeup_address)
++ return 1;
++ memcpy((void *)acpi_wakeup_address, &wakeup_start,
++ &wakeup_end - &wakeup_start);
++ acpi_copy_wakeup_routine(acpi_wakeup_address);
++#endif
++ return 0;
++}
++
++/*
++ * acpi_restore_state - undo effects of acpi_save_state_mem
++ */
++void acpi_restore_state_mem(void)
++{
++}
++
++/**
++ * acpi_reserve_bootmem - do _very_ early ACPI initialisation
++ *
++ * We allocate a page from the first 1MB of memory for the wakeup
++ * routine for when we come back from a sleep state. The
++ * runtime allocator allows specification of <16MB pages, but not
++ * <1MB pages.
++ */
++void __init acpi_reserve_bootmem(void)
++{
++#ifndef CONFIG_ACPI_PV_SLEEP
++ if ((&wakeup_end - &wakeup_start) > PAGE_SIZE) {
++ printk(KERN_ERR
++ "ACPI: Wakeup code way too big, S3 disabled.\n");
++ return;
++ }
++
++ acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE);
++ if (!acpi_wakeup_address)
++ printk(KERN_ERR "ACPI: Cannot allocate lowmem, S3 disabled.\n");
++#endif
++}
++
++#ifndef CONFIG_ACPI_PV_SLEEP
++static int __init acpi_sleep_setup(char *str)
++{
++ while ((str != NULL) && (*str != '\0')) {
++ if (strncmp(str, "s3_bios", 7) == 0)
++ acpi_video_flags = 1;
++ if (strncmp(str, "s3_mode", 7) == 0)
++ acpi_video_flags |= 2;
++ str = strchr(str, ',');
++ if (str != NULL)
++ str += strspn(str, ", \t");
++ }
++ return 1;
++}
++
++__setup("acpi_sleep=", acpi_sleep_setup);
++
++static __init int reset_videomode_after_s3(struct dmi_system_id *d)
++{
++ acpi_video_flags |= 2;
++ return 0;
++}
++
++static __initdata struct dmi_system_id acpisleep_dmi_table[] = {
++ { /* Reset video mode after returning from ACPI S3 sleep */
++ .callback = reset_videomode_after_s3,
++ .ident = "Toshiba Satellite 4030cdt",
++ .matches = {
++ DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
++ },
++ },
++ {}
++};
++
++static int __init acpisleep_dmi_init(void)
++{
++ dmi_check_system(acpisleep_dmi_table);
++ return 0;
++}
++
++core_initcall(acpisleep_dmi_init);
++
++#else /* CONFIG_ACPI_PV_SLEEP */
++#include <asm/hypervisor.h>
++#include <xen/interface/platform.h>
++int acpi_notify_hypervisor_state(u8 sleep_state,
++ u32 pm1a_cnt, u32 pm1b_cnt)
++{
++ struct xen_platform_op op = {
++ .cmd = XENPF_enter_acpi_sleep,
++ .interface_version = XENPF_INTERFACE_VERSION,
++ .u = {
++ .enter_acpi_sleep = {
++ .pm1a_cnt_val = (u16)pm1a_cnt,
++ .pm1b_cnt_val = (u16)pm1b_cnt,
++ .sleep_state = sleep_state,
++ },
++ },
++ };
++
++ return HYPERVISOR_platform_op(&op);
++}
++#endif /* CONFIG_ACPI_PV_SLEEP */
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/apic-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/apic-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/apic-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/apic-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,155 @@
+/*
+ * Local APIC handling, local APIC timers
@@ -1775,9 +1861,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/apic-xen.c tmp-linux-2.6-xen.p
+
+ return 0;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/asm-offsets.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/asm-offsets.c
+--- linux-2.6.18.8/arch/i386/kernel/asm-offsets.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/asm-offsets.c 2008-02-15 16:21:49.000000000 -0800
@@ -66,9 +66,14 @@ void foo(void)
OFFSET(pbe_orig_address, pbe, orig_address);
OFFSET(pbe_next, pbe, next);
@@ -1794,21 +1880,17 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/asm-offsets.c tmp-linux-2.6-xe
DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
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-11-14 15:35:27.000000000 -0800
-@@ -17,3 +17,8 @@ obj-$(CONFIG_X86_MCE) += mcheck/
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/cpu/Makefile linux-2.6.18-xen-3.2.0/arch/i386/kernel/cpu/Makefile
+--- linux-2.6.18.8/arch/i386/kernel/cpu/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/cpu/Makefile 2008-02-15 16:21:49.000000000 -0800
+@@ -17,3 +17,4 @@ obj-$(CONFIG_X86_MCE) += mcheck/
obj-$(CONFIG_MTRR) += mtrr/
obj-$(CONFIG_CPU_FREQ) += cpufreq/
+
-+ifdef CONFIG_XEN
-+include $(srctree)/scripts/Makefile.xen
-+obj-y := $(call cherrypickxen, $(obj-y), $(src))
-+endif
-diff -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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/cpu/common-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/cpu/common-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/cpu/common-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/cpu/common-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,743 @@
+#include <linux/init.h>
+#include <linux/string.h>
@@ -2402,7 +2484,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/cpu/common-xen.c tmp-linux-2.6
+#endif
+}
+
-+void __cpuinit cpu_gdt_init(struct Xgt_desc_struct *gdt_descr)
++static void __cpuinit cpu_gdt_init(const struct Xgt_desc_struct *gdt_descr)
+{
+ unsigned long frames[16];
+ unsigned long va;
@@ -2415,7 +2497,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/cpu/common-xen.c tmp-linux-2.6
+ make_lowmem_page_readonly(
+ (void *)va, XENFEAT_writable_descriptor_tables);
+ }
-+ if (HYPERVISOR_set_gdt(frames, gdt_descr->size / 8))
++ if (HYPERVISOR_set_gdt(frames, (gdt_descr->size + 1) / 8))
+ BUG();
+}
+
@@ -2553,24 +2635,530 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/cpu/common-xen.c tmp-linux-2.6
+ per_cpu(cpu_tlbstate, cpu).active_mm = &init_mm;
+}
+#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-11-14 15:35:27.000000000 -0800
-@@ -3,3 +3,10 @@ obj-y += amd.o
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/cpu/cpufreq/powernow-k8.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+--- linux-2.6.18.8/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 2008-02-15 16:21:49.000000000 -0800
+@@ -46,7 +46,7 @@
+
+ #define PFX "powernow-k8: "
+ #define BFX PFX "BIOS error: "
+-#define VERSION "version 2.00.00"
++#define VERSION "version 2.20.00"
+ #include "powernow-k8.h"
+
+ /* serialize freq changes */
+@@ -66,36 +66,15 @@ static u32 find_freq_from_fid(u32 fid)
+ return 800 + (fid * 100);
+ }
+
+-
+ /* Return a frequency in KHz, given an input fid */
+ static u32 find_khz_freq_from_fid(u32 fid)
+ {
+ return 1000 * find_freq_from_fid(fid);
+ }
+
+-/* Return a frequency in MHz, given an input fid and did */
+-static u32 find_freq_from_fiddid(u32 fid, u32 did)
+-{
+- return 100 * (fid + 0x10) >> did;
+-}
+-
+-static u32 find_khz_freq_from_fiddid(u32 fid, u32 did)
+-{
+- return 1000 * find_freq_from_fiddid(fid, did);
+-}
+-
+-static u32 find_fid_from_pstate(u32 pstate)
+-{
+- u32 hi, lo;
+- rdmsr(MSR_PSTATE_DEF_BASE + pstate, lo, hi);
+- return lo & HW_PSTATE_FID_MASK;
+-}
+-
+-static u32 find_did_from_pstate(u32 pstate)
++static u32 find_khz_freq_from_pstate(struct cpufreq_frequency_table *data, u32 pstate)
+ {
+- u32 hi, lo;
+- rdmsr(MSR_PSTATE_DEF_BASE + pstate, lo, hi);
+- return (lo & HW_PSTATE_DID_MASK) >> HW_PSTATE_DID_SHIFT;
++ return data[pstate].frequency;
+ }
+
+ /* Return the vco fid for an input fid
+@@ -139,9 +118,7 @@ static int query_current_values_with_pen
+ if (cpu_family == CPU_HW_PSTATE) {
+ rdmsr(MSR_PSTATE_STATUS, lo, hi);
+ i = lo & HW_PSTATE_MASK;
+- rdmsr(MSR_PSTATE_DEF_BASE + i, lo, hi);
+- data->currfid = lo & HW_PSTATE_FID_MASK;
+- data->currdid = (lo & HW_PSTATE_DID_MASK) >> HW_PSTATE_DID_SHIFT;
++ data->currpstate = i;
+ return 0;
+ }
+ do {
+@@ -292,7 +269,7 @@ static int decrease_vid_code_by_step(str
+ static int transition_pstate(struct powernow_k8_data *data, u32 pstate)
+ {
+ wrmsr(MSR_PSTATE_CTRL, pstate, 0);
+- data->currfid = find_fid_from_pstate(pstate);
++ data->currpstate = pstate;
+ return 0;
+ }
+
+@@ -738,6 +715,7 @@ static int find_psb_table(struct powerno
+
+ data->numps = psb->numps;
+ dprintk("numpstates: 0x%x\n", data->numps);
++ data->starting_core_affinity = cpumask_of_cpu(0);
+ return fill_powernow_table(data, (struct pst_s *)(psb+1), maxvid);
+ }
+ /*
+@@ -758,15 +736,43 @@ static int find_psb_table(struct powerno
+ #ifdef CONFIG_X86_POWERNOW_K8_ACPI
+ static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index)
+ {
+- if (!data->acpi_data.state_count || (cpu_family == CPU_HW_PSTATE))
++ if (!data->acpi_data->state_count || (cpu_family == CPU_HW_PSTATE))
+ return;
+
+- data->irt = (data->acpi_data.states[index].control >> IRT_SHIFT) & IRT_MASK;
+- data->rvo = (data->acpi_data.states[index].control >> RVO_SHIFT) & RVO_MASK;
+- data->exttype = (data->acpi_data.states[index].control >> EXT_TYPE_SHIFT) & EXT_TYPE_MASK;
+- data->plllock = (data->acpi_data.states[index].control >> PLL_L_SHIFT) & PLL_L_MASK;
+- data->vidmvs = 1 << ((data->acpi_data.states[index].control >> MVS_SHIFT) & MVS_MASK);
+- data->vstable = (data->acpi_data.states[index].control >> VST_SHIFT) & VST_MASK;
++ data->irt = (data->acpi_data->states[index].control >> IRT_SHIFT) & IRT_MASK;
++ data->rvo = (data->acpi_data->states[index].control >> RVO_SHIFT) & RVO_MASK;
++ data->exttype = (data->acpi_data->states[index].control >> EXT_TYPE_SHIFT) & EXT_TYPE_MASK;
++ data->plllock = (data->acpi_data->states[index].control >> PLL_L_SHIFT) & PLL_L_MASK;
++ data->vidmvs = 1 << ((data->acpi_data->states[index].control >> MVS_SHIFT) & MVS_MASK);
++ data->vstable = (data->acpi_data->states[index].control >> VST_SHIFT) & VST_MASK;
++}
++
++static struct acpi_processor_performance *acpi_perf_data[NR_CPUS];
++static int preregister_valid = 0;
++
++static int powernow_k8_cpu_preinit_acpi()
++{
++ int i;
++ struct acpi_processor_performance *data;
++ for_each_possible_cpu(i) {
++ data = kzalloc(sizeof(struct acpi_processor_performance),
++ GFP_KERNEL);
++ if (!data) {
++ int j;
++ for_each_possible_cpu(j) {
++ kfree(acpi_perf_data[j]);
++ acpi_perf_data[j] = NULL;
++ }
++ return -ENODEV;
++ }
++ acpi_perf_data[i] = data;
++ }
++
++ if (acpi_processor_preregister_performance(acpi_perf_data))
++ return -ENODEV;
++ else
++ preregister_valid = 1;
++ return 0;
+ }
+
+ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
+@@ -774,28 +780,29 @@ static int powernow_k8_cpu_init_acpi(str
+ struct cpufreq_frequency_table *powernow_table;
+ int ret_val;
+
+- if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) {
++ data->acpi_data = acpi_perf_data[data->cpu];
++ if (acpi_processor_register_performance(data->acpi_data, data->cpu)) {
+ dprintk("register performance failed: bad ACPI data\n");
+ return -EIO;
+ }
+
+ /* verify the data contained in the ACPI structures */
+- if (data->acpi_data.state_count <= 1) {
++ if (data->acpi_data->state_count <= 1) {
+ dprintk("No ACPI P-States\n");
+ goto err_out;
+ }
+
+- if ((data->acpi_data.control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) ||
+- (data->acpi_data.status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) {
++ if ((data->acpi_data->control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) ||
++ (data->acpi_data->status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) {
+ dprintk("Invalid control/status registers (%x - %x)\n",
+- data->acpi_data.control_register.space_id,
+- data->acpi_data.status_register.space_id);
++ data->acpi_data->control_register.space_id,
++ data->acpi_data->status_register.space_id);
+ goto err_out;
+ }
+
+ /* fill in data->powernow_table */
+ powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table)
+- * (data->acpi_data.state_count + 1)), GFP_KERNEL);
++ * (data->acpi_data->state_count + 1)), GFP_KERNEL);
+ if (!powernow_table) {
+ dprintk("powernow_table memory alloc failure\n");
+ goto err_out;
+@@ -808,28 +815,43 @@ static int powernow_k8_cpu_init_acpi(str
+ if (ret_val)
+ goto err_out_mem;
+
+- powernow_table[data->acpi_data.state_count].frequency = CPUFREQ_TABLE_END;
+- powernow_table[data->acpi_data.state_count].index = 0;
++ powernow_table[data->acpi_data->state_count].frequency = CPUFREQ_TABLE_END;
++ powernow_table[data->acpi_data->state_count].index = 0;
+ data->powernow_table = powernow_table;
+
+ /* fill in data */
+- data->numps = data->acpi_data.state_count;
++ data->numps = data->acpi_data->state_count;
+ print_basics(data);
+ powernow_k8_acpi_pst_values(data, 0);
+
+ /* notify BIOS that we exist */
+ acpi_processor_notify_smm(THIS_MODULE);
+
++ /* determine affinity, from ACPI if available */
++ if (preregister_valid) {
++ if ((data->acpi_data->shared_type == CPUFREQ_SHARED_TYPE_ALL) ||
++ (data->acpi_data->shared_type == CPUFREQ_SHARED_TYPE_ANY))
++ data->starting_core_affinity = data->acpi_data->shared_cpu_map;
++ else
++ data->starting_core_affinity = cpumask_of_cpu(data->cpu);
++ } else {
++ /* best guess from family if not */
++ if (cpu_family == CPU_HW_PSTATE)
++ data->starting_core_affinity = cpumask_of_cpu(data->cpu);
++ else
++ data->starting_core_affinity = cpu_core_map[data->cpu];
++ }
++
+ return 0;
+
+ err_out_mem:
+ kfree(powernow_table);
+
+ err_out:
+- acpi_processor_unregister_performance(&data->acpi_data, data->cpu);
++ acpi_processor_unregister_performance(data->acpi_data, data->cpu);
+
+- /* data->acpi_data.state_count informs us at ->exit() whether ACPI was used */
+- data->acpi_data.state_count = 0;
++ /* data->acpi_data->state_count informs us at ->exit() whether ACPI was used */
++ data->acpi_data->state_count = 0;
+
+ return -ENODEV;
+ }
+@@ -837,41 +859,23 @@ err_out:
+ static int fill_powernow_table_pstate(struct powernow_k8_data *data, struct cpufreq_frequency_table *powernow_table)
+ {
+ int i;
++ u32 hi = 0, lo = 0;
++ rdmsr(MSR_PSTATE_CUR_LIMIT, hi, lo);
++ data->max_hw_pstate = (hi & HW_PSTATE_MAX_MASK) >> HW_PSTATE_MAX_SHIFT;
+
+- for (i = 0; i < data->acpi_data.state_count; i++) {
++ for (i = 0; i < data->acpi_data->state_count; i++) {
+ u32 index;
+- u32 hi = 0, lo = 0;
+- u32 fid;
+- u32 did;
+
+- index = data->acpi_data.states[i].control & HW_PSTATE_MASK;
+- if (index > MAX_HW_PSTATE) {
++ index = data->acpi_data->states[i].control & HW_PSTATE_MASK;
++ if (index > data->max_hw_pstate) {
+ printk(KERN_ERR PFX "invalid pstate %d - bad value %d.\n", i, index);
+ printk(KERN_ERR PFX "Please report to BIOS manufacturer\n");
+- }
+- rdmsr(MSR_PSTATE_DEF_BASE + index, lo, hi);
+- if (!(hi & HW_PSTATE_VALID_MASK)) {
+- dprintk("invalid pstate %d, ignoring\n", index);
+- powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID;
+ continue;
+ }
+
+- fid = lo & HW_PSTATE_FID_MASK;
+- did = (lo & HW_PSTATE_DID_MASK) >> HW_PSTATE_DID_SHIFT;
+-
+- dprintk(" %d : fid 0x%x, did 0x%x\n", index, fid, did);
++ powernow_table[i].index = index;
++ powernow_table[i].frequency = data->acpi_data->states[i].core_frequency * 1000;
+
+- powernow_table[i].index = index | (fid << HW_FID_INDEX_SHIFT) | (did << HW_DID_INDEX_SHIFT);
+-
+- powernow_table[i].frequency = find_khz_freq_from_fiddid(fid, did);
+-
+- if (powernow_table[i].frequency != (data->acpi_data.states[i].core_frequency * 1000)) {
+- printk(KERN_INFO PFX "invalid freq entries %u kHz vs. %u kHz\n",
+- powernow_table[i].frequency,
+- (unsigned int) (data->acpi_data.states[i].core_frequency * 1000));
+- powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID;
+- continue;
+- }
+ }
+ return 0;
+ }
+@@ -880,16 +884,16 @@ static int fill_powernow_table_fidvid(st
+ {
+ int i;
+ int cntlofreq = 0;
+- for (i = 0; i < data->acpi_data.state_count; i++) {
++ for (i = 0; i < data->acpi_data->state_count; i++) {
+ u32 fid;
+ u32 vid;
+
+ if (data->exttype) {
+- fid = data->acpi_data.states[i].status & EXT_FID_MASK;
+- vid = (data->acpi_data.states[i].status >> VID_SHIFT) & EXT_VID_MASK;
++ fid = data->acpi_data->states[i].status & EXT_FID_MASK;
++ vid = (data->acpi_data->states[i].status >> VID_SHIFT) & EXT_VID_MASK;
+ } else {
+- fid = data->acpi_data.states[i].control & FID_MASK;
+- vid = (data->acpi_data.states[i].control >> VID_SHIFT) & VID_MASK;
++ fid = data->acpi_data->states[i].control & FID_MASK;
++ vid = (data->acpi_data->states[i].control >> VID_SHIFT) & VID_MASK;
+ }
+
+ dprintk(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid);
+@@ -930,10 +934,10 @@ static int fill_powernow_table_fidvid(st
+ cntlofreq = i;
+ }
+
+- if (powernow_table[i].frequency != (data->acpi_data.states[i].core_frequency * 1000)) {
++ if (powernow_table[i].frequency != (data->acpi_data->states[i].core_frequency * 1000)) {
+ printk(KERN_INFO PFX "invalid freq entries %u kHz vs. %u kHz\n",
+ powernow_table[i].frequency,
+- (unsigned int) (data->acpi_data.states[i].core_frequency * 1000));
++ (unsigned int) (data->acpi_data->states[i].core_frequency * 1000));
+ powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID;
+ continue;
+ }
+@@ -943,14 +947,15 @@ static int fill_powernow_table_fidvid(st
+
+ static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data)
+ {
+- if (data->acpi_data.state_count)
+- acpi_processor_unregister_performance(&data->acpi_data, data->cpu);
++ if (data->acpi_data->state_count)
++ acpi_processor_unregister_performance(data->acpi_data, data->cpu);
+ }
+
+ #else
+ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) { return -ENODEV; }
+ static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) { return; }
+ static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) { return; }
++static int powernow_k8_cpu_preinit_acpi() { return -ENODEV; }
+ #endif /* CONFIG_X86_POWERNOW_K8_ACPI */
+
+ /* Take a frequency, and issue the fid/vid transition command */
+@@ -1012,22 +1017,18 @@ static int transition_frequency_fidvid(s
+ /* Take a frequency, and issue the hardware pstate transition command */
+ static int transition_frequency_pstate(struct powernow_k8_data *data, unsigned int index)
+ {
+- u32 fid = 0;
+- u32 did = 0;
+ u32 pstate = 0;
+ int res, i;
+ struct cpufreq_freqs freqs;
+
+ dprintk("cpu %d transition to index %u\n", smp_processor_id(), index);
+
+- /* get fid did for hardware pstate transition */
++ /* get MSR index for hardware pstate transition */
+ pstate = index & HW_PSTATE_MASK;
+- if (pstate > MAX_HW_PSTATE)
++ if (pstate > data->max_hw_pstate)
+ return 0;
+- fid = (index & HW_FID_INDEX_MASK) >> HW_FID_INDEX_SHIFT;
+- did = (index & HW_DID_INDEX_MASK) >> HW_DID_INDEX_SHIFT;
+- freqs.old = find_khz_freq_from_fiddid(data->currfid, data->currdid);
+- freqs.new = find_khz_freq_from_fiddid(fid, did);
++ freqs.old = find_khz_freq_from_pstate(data->powernow_table, data->currpstate);
++ freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate);
+
+ for_each_cpu_mask(i, *(data->available_cores)) {
+ freqs.cpu = i;
+@@ -1035,9 +1036,7 @@ static int transition_frequency_pstate(s
+ }
+
+ res = transition_pstate(data, pstate);
+- data->currfid = find_fid_from_pstate(pstate);
+- data->currdid = find_did_from_pstate(pstate);
+- freqs.new = find_khz_freq_from_fiddid(data->currfid, data->currdid);
++ freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate);
+
+ for_each_cpu_mask(i, *(data->available_cores)) {
+ freqs.cpu = i;
+@@ -1082,10 +1081,7 @@ static int powernowk8_target(struct cpuf
+ if (query_current_values_with_pending_wait(data))
+ goto err_out;
+
+- if (cpu_family == CPU_HW_PSTATE)
+- dprintk("targ: curr fid 0x%x, did 0x%x\n",
+- data->currfid, data->currvid);
+- else {
++ if (cpu_family != CPU_HW_PSTATE) {
+ dprintk("targ: curr fid 0x%x, vid 0x%x\n",
+ data->currfid, data->currvid);
+
+@@ -1116,7 +1112,7 @@ static int powernowk8_target(struct cpuf
+ mutex_unlock(&fidvid_mutex);
+
+ if (cpu_family == CPU_HW_PSTATE)
+- pol->cur = find_khz_freq_from_fiddid(data->currfid, data->currdid);
++ pol->cur = find_khz_freq_from_pstate(data->powernow_table, newstate);
+ else
+ pol->cur = find_khz_freq_from_fid(data->currfid);
+ ret = 0;
+@@ -1164,7 +1160,7 @@ static int __cpuinit powernowk8_cpu_init
+ * an UP version, and is deprecated by AMD.
+ */
+ if (num_online_cpus() != 1) {
+- printk(KERN_ERR PFX "MP systems not supported by PSB BIOS structure\n");
++ printk(KERN_ERR PFX "Your BIOS does not provide _PSS objects. PowerNow! does not work on SMP systems without _PSS objects. Complain to your BIOS vendor.\n");
+ kfree(data);
+ return -ENODEV;
+ }
+@@ -1204,10 +1200,7 @@ static int __cpuinit powernowk8_cpu_init
+ set_cpus_allowed(current, oldmask);
+
+ pol->governor = CPUFREQ_DEFAULT_GOVERNOR;
+- if (cpu_family == CPU_HW_PSTATE)
+- pol->cpus = cpumask_of_cpu(pol->cpu);
+- else
+- pol->cpus = cpu_core_map[pol->cpu];
++ pol->cpus = data->starting_core_affinity;
+ data->available_cores = &(pol->cpus);
+
+ /* Take a crude guess here.
+@@ -1216,7 +1209,7 @@ static int __cpuinit powernowk8_cpu_init
+ + (3 * (1 << data->irt) * 10)) * 1000;
+
+ if (cpu_family == CPU_HW_PSTATE)
+- pol->cur = find_khz_freq_from_fiddid(data->currfid, data->currdid);
++ pol->cur = find_khz_freq_from_pstate(data->powernow_table, data->currpstate);
+ else
+ pol->cur = find_khz_freq_from_fid(data->currfid);
+ dprintk("policy current frequency %d kHz\n", pol->cur);
+@@ -1233,8 +1226,7 @@ static int __cpuinit powernowk8_cpu_init
+ cpufreq_frequency_table_get_attr(data->powernow_table, pol->cpu);
+
+ if (cpu_family == CPU_HW_PSTATE)
+- dprintk("cpu_init done, current fid 0x%x, did 0x%x\n",
+- data->currfid, data->currdid);
++ dprintk("cpu_init done, current pstate 0x%x\n", data->currpstate);
+ else
+ dprintk("cpu_init done, current fid 0x%x, vid 0x%x\n",
+ data->currfid, data->currvid);
+@@ -1289,7 +1281,10 @@ static unsigned int powernowk8_get (unsi
+ if (query_current_values_with_pending_wait(data))
+ goto out;
+
+- khz = find_khz_freq_from_fid(data->currfid);
++ if (cpu_family == CPU_HW_PSTATE)
++ khz = find_khz_freq_from_pstate(data->powernow_table, data->currpstate);
++ else
++ khz = find_khz_freq_from_fid(data->currfid);
+
+ out:
+ set_cpus_allowed(current, oldmask);
+@@ -1323,6 +1318,7 @@ static int __cpuinit powernowk8_init(voi
+ }
+
+ if (supported_cpus == num_online_cpus()) {
++ powernow_k8_cpu_preinit_acpi();
+ printk(KERN_INFO PFX "Found %d %s "
+ "processors (" VERSION ")\n", supported_cpus,
+ boot_cpu_data.x86_model_id);
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/cpu/cpufreq/powernow-k8.h linux-2.6.18-xen-3.2.0/arch/i386/kernel/cpu/cpufreq/powernow-k8.h
+--- linux-2.6.18.8/arch/i386/kernel/cpu/cpufreq/powernow-k8.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/cpu/cpufreq/powernow-k8.h 2008-02-15 16:21:49.000000000 -0800
+@@ -1,5 +1,5 @@
+ /*
+- * (c) 2003-2006 Advanced Micro Devices, Inc.
++#* (c) 2003-2006 Advanced Micro Devices, Inc.
+ * Your use of this code is subject to the terms and conditions of the
+ * GNU general public license version 2. See "COPYING" or
+ * http://www.gnu.org/licenses/gpl.html
+@@ -10,6 +10,7 @@ struct powernow_k8_data {
+
+ u32 numps; /* number of p-states */
+ u32 batps; /* number of p-states supported on battery */
++ u32 max_hw_pstate; /* maximum legal hardware pstate */
+
+ /* these values are constant when the PSB is used to determine
+ * vid/fid pairings, but are modified during the ->target() call
+@@ -21,8 +22,8 @@ struct powernow_k8_data {
+ u32 plllock; /* pll lock time, units 1 us */
+ u32 exttype; /* extended interface = 1 */
+
+- /* keep track of the current fid / vid or did */
+- u32 currvid, currfid, currdid;
++ /* keep track of the current fid / vid or pstate */
++ u32 currvid, currfid, currpstate;
+
+ /* the powernow_table includes all frequency and vid/fid pairings:
+ * fid are the lower 8 bits of the index, vid are the upper 8 bits.
+@@ -32,12 +33,13 @@ struct powernow_k8_data {
+ #ifdef CONFIG_X86_POWERNOW_K8_ACPI
+ /* the acpi table needs to be kept. it's only available if ACPI was
+ * used to determine valid frequency/vid/fid states */
+- struct acpi_processor_performance acpi_data;
++ struct acpi_processor_performance *acpi_data;
+ #endif
+ /* we need to keep track of associated cores, but let cpufreq
+ * handle hotplug events - so just point at cpufreq pol->cpus
+ * structure */
+ cpumask_t *available_cores;
++ cpumask_t starting_core_affinity;
+ };
+
+
+@@ -87,23 +89,14 @@ struct powernow_k8_data {
+
+ /* Hardware Pstate _PSS and MSR definitions */
+ #define USE_HW_PSTATE 0x00000080
+-#define HW_PSTATE_FID_MASK 0x0000003f
+-#define HW_PSTATE_DID_MASK 0x000001c0
+-#define HW_PSTATE_DID_SHIFT 6
+-#define HW_PSTATE_MASK 0x00000007
+-#define HW_PSTATE_VALID_MASK 0x80000000
+-#define HW_FID_INDEX_SHIFT 8
+-#define HW_FID_INDEX_MASK 0x0000ff00
+-#define HW_DID_INDEX_SHIFT 16
+-#define HW_DID_INDEX_MASK 0x00ff0000
+-#define HW_WATTS_MASK 0xff
+-#define HW_PWR_DVR_MASK 0x300
+-#define HW_PWR_DVR_SHIFT 8
+-#define HW_PWR_MAX_MULT 3
+-#define MAX_HW_PSTATE 8 /* hw pstate supports up to 8 */
++#define HW_PSTATE_MASK 0x00000007
++#define HW_PSTATE_VALID_MASK 0x80000000
++#define HW_PSTATE_MAX_MASK 0x000000f0
++#define HW_PSTATE_MAX_SHIFT 4
+ #define MSR_PSTATE_DEF_BASE 0xc0010064 /* base of Pstate MSRs */
+ #define MSR_PSTATE_STATUS 0xc0010063 /* Pstate Status MSR */
+ #define MSR_PSTATE_CTRL 0xc0010062 /* Pstate control MSR */
++#define MSR_PSTATE_CUR_LIMIT 0xc0010061 /* pstate current limit MSR */
+
+ /* define the two driver architectures */
+ #define CPU_OPTERON 0
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/cpu/mtrr/Makefile linux-2.6.18-xen-3.2.0/arch/i386/kernel/cpu/mtrr/Makefile
+--- linux-2.6.18.8/arch/i386/kernel/cpu/mtrr/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/cpu/mtrr/Makefile 2008-02-15 16:21:49.000000000 -0800
+@@ -3,3 +3,4 @@ obj-y += amd.o
obj-y += cyrix.o
obj-y += centaur.o
-+ifdef CONFIG_XEN
-+include $(srctree)/scripts/Makefile.xen
-+n-obj-xen := generic.o state.o amd.o cyrix.o centaur.o
-+
-+obj-y := $(call filterxen, $(obj-y), $(n-obj-xen))
-+obj-y := $(call cherrypickxen, $(obj-y))
-+endif
-diff -Nurp 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,197 @@
++obj-$(CONFIG_XEN) := main.o if.o
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/cpu/mtrr/main-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/cpu/mtrr/main-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/cpu/mtrr/main-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/cpu/mtrr/main-xen.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,198 @@
+#include <linux/init.h>
+#include <linux/proc_fs.h>
+#include <linux/ctype.h>
@@ -2591,7 +3179,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/cpu/mtrr/main-xen.c tmp-linux-
+
+ op.cmd = XENPF_read_memtype;
+ op.u.read_memtype.reg = reg;
-+ (void)HYPERVISOR_platform_op(&op);
++ if (unlikely(HYPERVISOR_platform_op(&op)))
++ memset(&op.u.read_memtype, 0, sizeof(op.u.read_memtype));
+
+ *size = op.u.read_memtype.nr_mfns;
+ *base = op.u.read_memtype.mfn;
@@ -2768,9 +3357,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/crash.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/crash.c
+--- linux-2.6.18.8/arch/i386/kernel/crash.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/crash.c 2008-02-15 16:21:49.000000000 -0800
@@ -90,6 +90,7 @@ static void crash_save_self(struct pt_re
crash_save_this_cpu(regs, cpu);
}
@@ -2800,16 +3389,16 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/crash.c tmp-linux-2.6-xen.patc
+#endif /* CONFIG_XEN */
crash_save_self(regs);
}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/early_printk-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/early_printk-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/early_printk-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/early_printk-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,1216 @@
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/entry-xen.S linux-2.6.18-xen-3.2.0/arch/i386/kernel/entry-xen.S
+--- linux-2.6.18.8/arch/i386/kernel/entry-xen.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/entry-xen.S 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,1238 @@
+/*
+ * linux/arch/i386/entry.S
+ *
@@ -3193,6 +3782,29 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/entry-xen.S tmp-linux-2.6-xen.
+#endif /* !CONFIG_XEN */
+ CFI_ENDPROC
+
++ # pv sysenter call handler stub
++ENTRY(sysenter_entry_pv)
++ RING0_INT_FRAME
++ movl $__USER_DS,16(%esp)
++ movl %ebp,12(%esp)
++ movl $__USER_CS,4(%esp)
++ addl $4,%esp
++ /* +5*4 is SS:ESP,EFLAGS,CS:EIP. +8 is esp0 setting. */
++ pushl (TI_sysenter_return-THREAD_SIZE+8+4*4)(%esp)
++/*
++ * Load the potential sixth argument from user stack.
++ * Careful about security.
++ */
++ cmpl $__PAGE_OFFSET-3,%ebp
++ jae syscall_fault
++1: movl (%ebp),%ebp
++.section __ex_table,"a"
++ .align 4
++ .long 1b,syscall_fault
++.previous
++ /* fall through */
++ CFI_ENDPROC
++ENDPROC(sysenter_entry_pv)
+
+ # system call handler stub
+ENTRY(system_call)
@@ -4022,13 +4634,12 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/entry-xen.S tmp-linux-2.6-xen.
+ CFI_ENDPROC
+
+.section .rodata,"a"
-+.align 4
+#include "syscall_table.S"
+
+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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/entry.S linux-2.6.18-xen-3.2.0/arch/i386/kernel/entry.S
+--- linux-2.6.18.8/arch/i386/kernel/entry.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/entry.S 2008-02-15 16:21:49.000000000 -0800
@@ -269,7 +269,7 @@ ENTRY(sysenter_entry)
CFI_STARTPROC simple
CFI_DEF_CFA esp, 0
@@ -4056,9 +4667,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/entry.S tmp-linux-2.6-xen.patc
pushfl; \
pushl $__KERNEL_CS; \
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/fixup.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/fixup.c
+--- linux-2.6.18.8/arch/i386/kernel/fixup.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/fixup.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,88 @@
+/******************************************************************************
+ * fixup.c
@@ -4108,8 +4719,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/fixup.c tmp-linux-2.6-xen.patc
+ if (current->tgid == 1)
+ return;
+
-+ HYPERVISOR_vm_assist(
-+ VMASST_CMD_disable, VMASST_TYPE_4gb_segments_notify);
++ VOID(HYPERVISOR_vm_assist(VMASST_CMD_disable,
++ VMASST_TYPE_4gb_segments_notify));
+
+ if (test_and_set_bit(0, &printed))
+ return;
@@ -4143,14 +4754,14 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/fixup.c tmp-linux-2.6-xen.patc
+
+static int __init fixup_init(void)
+{
-+ HYPERVISOR_vm_assist(
-+ VMASST_CMD_enable, VMASST_TYPE_4gb_segments_notify);
++ WARN_ON(HYPERVISOR_vm_assist(VMASST_CMD_enable,
++ VMASST_TYPE_4gb_segments_notify));
+ return 0;
+}
+__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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/head-xen.S linux-2.6.18-xen-3.2.0/arch/i386/kernel/head-xen.S
+--- linux-2.6.18.8/arch/i386/kernel/head-xen.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/head-xen.S 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,207 @@
+
+
@@ -4359,9 +4970,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/head-xen.S tmp-linux-2.6-xen.p
+#endif
+ ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz, "generic")
+ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/init_task-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/init_task-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/init_task-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/init_task-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,51 @@
+#include <linux/mm.h>
+#include <linux/module.h>
@@ -4414,10 +5025,10 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/init_task-xen.c tmp-linux-2.6-
+DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_internodealigned_in_smp = INIT_TSS;
+#endif
+
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,2777 @@
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/io_apic-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/io_apic-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/io_apic-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/io_apic-xen.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,2770 @@
+/*
+ * Intel IO-APIC support for multi-Pentium hosts.
+ *
@@ -4495,7 +5106,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/io_apic-xen.c tmp-linux-2.6-xe
+ apic_op.apic_physbase = mp_ioapics[apic].mpc_apicaddr;
+ apic_op.reg = reg;
+ apic_op.value = value;
-+ HYPERVISOR_physdev_op(PHYSDEVOP_apic_write, &apic_op);
++ WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_apic_write, &apic_op));
+}
+
+#define io_apic_read(a,r) xen_io_apic_read(a,r)
@@ -5958,8 +6569,6 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/io_apic-xen.c tmp-linux-2.6-xe
+ return;
+}
+
-+#if 0
-+
+static void print_APIC_bitfield (int base)
+{
+ unsigned int v;
@@ -6100,11 +6709,6 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/io_apic-xen.c tmp-linux-2.6-xe
+ v = inb(0x4d1) << 8 | inb(0x4d0);
+ printk(KERN_DEBUG "... PIC ELCR: %04x\n", v);
+}
-+
-+#endif /* 0 */
-+
-+#else
-+void __init print_IO_APIC(void) { }
+#endif /* !CONFIG_XEN */
+
+static void __init enable_IO_APIC(void)
@@ -6933,7 +7537,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/io_apic-xen.c tmp-linux-2.6-xe
+ struct xen_platform_op op = { .cmd = XENPF_platform_quirk };
+ op.u.platform_quirk.quirk_id = sis_apic_bug ?
+ QUIRK_IOAPIC_BAD_REGSEL : QUIRK_IOAPIC_GOOD_REGSEL;
-+ HYPERVISOR_platform_op(&op);
++ VOID(HYPERVISOR_platform_op(&op));
+ }
+ return 0;
+}
@@ -7195,10 +7799,10 @@ 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,122 @@
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/ioport-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/ioport-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/ioport-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/ioport-xen.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,123 @@
+/*
+ * linux/arch/i386/kernel/ioport.c
+ *
@@ -7284,7 +7888,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/ioport-xen.c tmp-linux-2.6-xen
+
+ set_xen_guest_handle(set_iobitmap.bitmap, (char *)bitmap);
+ set_iobitmap.nr_ports = IO_BITMAP_BITS;
-+ HYPERVISOR_physdev_op(PHYSDEVOP_set_iobitmap, &set_iobitmap);
++ WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_set_iobitmap,
++ &set_iobitmap));
+ }
+
+ set_bitmap(t->io_bitmap_ptr, from, num, !turn_on);
@@ -7321,9 +7926,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/ioport-xen.c tmp-linux-2.6-xen
+ set_iopl_mask(t->iopl);
+ return 0;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/irq-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/irq-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/irq-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/irq-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,324 @@
+/*
+ * linux/arch/i386/kernel/irq.c
@@ -7649,9 +8254,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/irq-xen.c tmp-linux-2.6-xen.pa
+}
+#endif
+
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/ldt-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/ldt-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/ldt-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/ldt-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,270 @@
+/*
+ * linux/kernel/ldt.c
@@ -7923,9 +8528,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/ldt-xen.c tmp-linux-2.6-xen.pa
+ }
+ return ret;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/machine_kexec.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/machine_kexec.c
+--- linux-2.6.18.8/arch/i386/kernel/machine_kexec.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/machine_kexec.c 2008-02-15 16:21:49.000000000 -0800
@@ -19,123 +19,52 @@
#include <asm/desc.h>
#include <asm/system.h>
@@ -8156,9 +8761,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/machine_kexec.c tmp-linux-2.6-
+ image->start, cpu_has_pae);
}
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/microcode-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/microcode-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/microcode-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/microcode-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,144 @@
+/*
+ * Intel CPU Microcode Update Driver for Linux
@@ -8304,9 +8909,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/microcode-xen.c tmp-linux-2.6-
+module_init(microcode_init)
+module_exit(microcode_exit)
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/mpparse-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/mpparse-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/mpparse-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/mpparse-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,1185 @@
+/*
+ * Intel Multiprocessor Specification 1.1 and 1.4
@@ -9493,10 +10098,10 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/mpparse-xen.c tmp-linux-2.6-xe
+
+#endif /* CONFIG_X86_IO_APIC */
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,369 @@
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/pci-dma-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/pci-dma-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/pci-dma-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/pci-dma-xen.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,382 @@
+/*
+ * Dynamic DMA mapping support.
+ *
@@ -9514,9 +10119,11 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xe
+#include <linux/version.h>
+#include <asm/io.h>
+#include <xen/balloon.h>
++#include <xen/gnttab.h>
+#include <asm/swiotlb.h>
+#include <asm/tlbflush.h>
+#include <asm-i386/mach-xen/asm/swiotlb.h>
++#include <asm-i386/mach-xen/asm/gnttab_dma.h>
+#include <asm/bug.h>
+
+#ifdef __x86_64__
@@ -9588,10 +10195,10 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xe
+ rc = swiotlb_map_sg(hwdev, sg, nents, direction);
+ } else {
+ for (i = 0; i < nents; i++ ) {
++ BUG_ON(!sg[i].page);
+ sg[i].dma_address =
-+ page_to_bus(sg[i].page) + sg[i].offset;
++ gnttab_dma_map_page(sg[i].page) + sg[i].offset;
+ sg[i].dma_length = sg[i].length;
-+ BUG_ON(!sg[i].page);
+ IOMMU_BUG_ON(address_needs_mapping(
+ hwdev, sg[i].dma_address));
+ IOMMU_BUG_ON(range_straddles_page_boundary(
@@ -9610,9 +10217,15 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xe
+dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
+ enum dma_data_direction direction)
+{
++ int i;
++
+ BUG_ON(direction == DMA_NONE);
+ if (swiotlb)
+ swiotlb_unmap_sg(hwdev, sg, nents, direction);
++ else {
++ for (i = 0; i < nents; i++ )
++ gnttab_dma_unmap_page(sg[i].dma_address);
++ }
+}
+EXPORT_SYMBOL(dma_unmap_sg);
+
@@ -9629,7 +10242,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xe
+ dma_addr = swiotlb_map_page(
+ dev, page, offset, size, direction);
+ } else {
-+ dma_addr = page_to_bus(page) + offset;
++ dma_addr = gnttab_dma_map_page(page) + offset;
+ IOMMU_BUG_ON(address_needs_mapping(dev, dma_addr));
+ }
+
@@ -9644,6 +10257,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xe
+ BUG_ON(direction == DMA_NONE);
+ if (swiotlb)
+ swiotlb_unmap_page(dev, dma_address, size, direction);
++ else
++ gnttab_dma_unmap_page(dma_address);
+}
+EXPORT_SYMBOL(dma_unmap_page);
+#endif /* CONFIG_HIGHMEM */
@@ -9828,7 +10443,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xe
+ if (swiotlb) {
+ dma = swiotlb_map_single(dev, ptr, size, direction);
+ } else {
-+ dma = virt_to_bus(ptr);
++ dma = gnttab_dma_map_page(virt_to_page(ptr)) +
++ offset_in_page(ptr);
+ IOMMU_BUG_ON(range_straddles_page_boundary(__pa(ptr), size));
+ IOMMU_BUG_ON(address_needs_mapping(dev, dma));
+ }
@@ -9846,6 +10462,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xe
+ BUG();
+ if (swiotlb)
+ swiotlb_unmap_single(dev, dma_addr, size, direction);
++ else
++ gnttab_dma_unmap_page(dma_addr);
+}
+EXPORT_SYMBOL(dma_unmap_single);
+
@@ -9866,10 +10484,10 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xe
+ swiotlb_sync_single_for_device(dev, dma_handle, size, direction);
+}
+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,853 @@
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/process-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/process-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/process-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/process-xen.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,856 @@
+/*
+ * linux/arch/i386/kernel/process.c
+ *
@@ -10010,7 +10628,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/process-xen.c tmp-linux-2.6-xe
+ local_irq_disable();
+ cpu_clear(smp_processor_id(), cpu_initialized);
+ preempt_enable_no_resched();
-+ HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL);
++ VOID(HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL));
+ cpu_bringup();
+}
+#else
@@ -10181,7 +10799,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/process-xen.c tmp-linux-2.6-xe
+ struct thread_struct *t = &tsk->thread;
+ struct physdev_set_iobitmap set_iobitmap;
+ memset(&set_iobitmap, 0, sizeof(set_iobitmap));
-+ HYPERVISOR_physdev_op(PHYSDEVOP_set_iobitmap, &set_iobitmap);
++ WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_set_iobitmap,
++ &set_iobitmap));
+ kfree(t->io_bitmap_ptr);
+ t->io_bitmap_ptr = NULL;
+ clear_thread_flag(TIF_IO_BITMAP);
@@ -10488,7 +11107,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/process-xen.c tmp-linux-2.6-xe
+ mcl++;
+ }
+
-+ (void)HYPERVISOR_multicall(_mcl, mcl - _mcl);
++ BUG_ON(mcl > _mcl + ARRAY_SIZE(_mcl));
++ if (unlikely(HYPERVISOR_multicall_check(_mcl, mcl - _mcl, NULL)))
++ BUG();
+
+ /*
+ * Restore %fs and %gs if needed.
@@ -10723,9 +11344,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/process-xen.c tmp-linux-2.6-xe
+ sp -= get_random_int() % 8192;
+ return sp & ~0xf;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/quirks-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/quirks-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/quirks-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/quirks-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,47 @@
+/*
+ * This file contains work-arounds for x86 and x86_64 platform bugs.
@@ -10763,7 +11384,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/quirks-xen.c tmp-linux-2.6-xen
+ printk(KERN_INFO "Disabling irq balancing and affinity\n");
+ op.cmd = XENPF_platform_quirk;
+ op.u.platform_quirk.quirk_id = QUIRK_NOIRQBALANCING;
-+ (void)HYPERVISOR_platform_op(&op);
++ WARN_ON(HYPERVISOR_platform_op(&op));
+ }
+
+ /* put back the original value for config space*/
@@ -10774,9 +11395,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/quirks-xen.c tmp-linux-2.6-xen
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_intel_irqbalance);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, quirk_intel_irqbalance);
+#endif
-diff -Nurp 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-11-16 16:18:11.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/relocate_kernel.S linux-2.6.18-xen-3.2.0/arch/i386/kernel/relocate_kernel.S
+--- linux-2.6.18.8/arch/i386/kernel/relocate_kernel.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/relocate_kernel.S 2008-02-15 16:21:49.000000000 -0800
@@ -7,16 +7,138 @@
*/
@@ -11009,10 +11630,10 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/relocate_kernel.S tmp-linux-2.
+idt_48:
+ .word 0 /* limit */
+ .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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,1898 @@
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/setup-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/setup-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/setup-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/setup-xen.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,1919 @@
+/*
+ * linux/arch/i386/kernel/setup.c
+ *
@@ -11081,6 +11702,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+#include <xen/interface/physdev.h>
+#include <xen/interface/memory.h>
+#include <xen/features.h>
++#include <xen/firmware.h>
+#include <xen/xencons.h>
+#include <setup_arch.h>
+#include <bios_ebda.h>
@@ -11170,6 +11792,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+};
+struct edid_info edid_info;
+EXPORT_SYMBOL_GPL(edid_info);
++#ifndef CONFIG_XEN
++#define copy_edid() (edid_info = EDID_INFO)
++#endif
+struct ist_info ist_info;
+#if defined(CONFIG_X86_SPEEDSTEP_SMI) || \
+ defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
@@ -11755,6 +12380,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+#ifdef CONFIG_EDD_MODULE
+EXPORT_SYMBOL(edd);
+#endif
++#ifndef CONFIG_XEN
+/**
+ * copy_edd() - Copy the BIOS EDD information
+ * from boot_params into a safe place.
@@ -11767,6 +12393,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+ edd.mbr_signature_nr = EDD_MBR_SIG_NR;
+ edd.edd_info_nr = EDD_NR;
+}
++#endif
+#else
+static inline void copy_edd(void)
+{
@@ -12037,6 +12664,35 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+ return 0;
+}
+
++/*
++ * This function checks if any part of the range <start,end> is mapped
++ * with type.
++ */
++int
++e820_any_mapped(u64 start, u64 end, unsigned type)
++{
++ int i;
++
++#ifndef CONFIG_XEN
++ for (i = 0; i < e820.nr_map; i++) {
++ const struct e820entry *ei = &e820.map[i];
++#else
++ if (!is_initial_xendomain())
++ return 0;
++ for (i = 0; i < machine_e820.nr_map; ++i) {
++ const struct e820entry *ei = &machine_e820.map[i];
++#endif
++
++ if (type && ei->type != type)
++ continue;
++ if (ei->addr >= end || ei->addr + ei->size <= start)
++ continue;
++ return 1;
++ }
++ return 0;
++}
++EXPORT_SYMBOL_GPL(e820_any_mapped);
++
+ /*
+ * This function checks if the entire range <start,end> is mapped with type.
+ *
@@ -12285,14 +12941,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+ unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
+ unsigned int max_dma, low;
+
-+ /*
-+ * XEN: Our notion of "DMA memory" is fake when running over Xen.
-+ * We simply put all RAM in the DMA zone so that those drivers which
-+ * needlessly specify GFP_DMA do not get starved of RAM unnecessarily.
-+ * Those drivers that *do* require lowmem are screwed anyway when
-+ * running over Xen!
-+ */
-+ max_dma = max_low_pfn;
++ max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
+ low = max_low_pfn;
+
+ if (low < max_dma)
@@ -12608,9 +13257,10 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+ /* Register a call for panic conditions. */
+ atomic_notifier_chain_register(&panic_notifier_list, &xen_panic_block);
+
-+ HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
-+ HYPERVISOR_vm_assist(VMASST_CMD_enable,
-+ VMASST_TYPE_writable_pagetables);
++ WARN_ON(HYPERVISOR_vm_assist(VMASST_CMD_enable,
++ VMASST_TYPE_4gb_segments));
++ WARN_ON(HYPERVISOR_vm_assist(VMASST_CMD_enable,
++ VMASST_TYPE_writable_pagetables));
+
+ memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
+ early_cpu_init();
@@ -12636,7 +13286,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+ ROOT_DEV = MKDEV(UNNAMED_MAJOR,0);
+ drive_info = DRIVE_INFO;
+ screen_info = SCREEN_INFO;
-+ edid_info = EDID_INFO;
++ copy_edid();
+ apm_info.bios = APM_BIOS_INFO;
+ ist_info = IST_INFO;
+ saved_videomode = VIDEO_MODE;
@@ -12649,23 +13299,12 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+ bootloader_type = LOADER_TYPE;
+
+ if (is_initial_xendomain()) {
-+ /* This is drawn from a dump from vgacon:startup in
-+ * standard Linux. */
-+ screen_info.orig_video_mode = 3;
-+ screen_info.orig_video_isVGA = 1;
-+ screen_info.orig_video_lines = 25;
-+ screen_info.orig_video_cols = 80;
-+ screen_info.orig_video_ega_bx = 3;
-+ screen_info.orig_video_points = 16;
-+ screen_info.orig_y = screen_info.orig_video_lines - 1;
-+ if (xen_start_info->console.dom0.info_size >=
-+ sizeof(struct dom0_vga_console_info)) {
-+ const struct dom0_vga_console_info *info =
-+ (struct dom0_vga_console_info *)(
-+ (char *)xen_start_info +
-+ xen_start_info->console.dom0.info_off);
-+ dom0_init_screen_info(info);
-+ }
++ const struct dom0_vga_console_info *info =
++ (void *)((char *)xen_start_info +
++ xen_start_info->console.dom0.info_off);
++
++ dom0_init_screen_info(info,
++ xen_start_info->console.dom0.info_size);
+ xen_start_info->console.domU.mfn = 0;
+ xen_start_info->console.domU.evtchn = 0;
+ } else
@@ -12806,6 +13445,11 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+ virt_to_mfn(pfn_to_mfn_frame_list_list);
+ }
+
++ /* Mark all ISA DMA channels in-use - using them wouldn't work. */
++ for (i = 0; i < MAX_DMA_CHANNELS; ++i)
++ if (i != 4 && request_dma(i, "xen") != 0)
++ BUG();
++
+ /*
+ * NOTE: at this point the bootmem allocator is fully available.
+ */
@@ -12820,7 +13464,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+ efi_map_memmap();
+
+ set_iopl.iopl = 1;
-+ HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
++ WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl));
+
+#ifdef CONFIG_ACPI
+ if (!is_initial_xendomain()) {
@@ -12872,8 +13516,6 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+#endif
+ }
+ tsc_init();
-+
-+ xencons_early_setup();
+}
+
+static int
@@ -12911,10 +13553,42 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/setup-xen.c tmp-linux-2.6-xen.
+ * c-basic-offset:8
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,624 @@
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/setup.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/setup.c
+--- linux-2.6.18.8/arch/i386/kernel/setup.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/setup.c 2008-02-15 16:21:49.000000000 -0800
+@@ -956,6 +956,28 @@ efi_memory_present_wrapper(unsigned long
+ return 0;
+ }
+
++/*
++ * This function checks if any part of the range <start,end> is mapped
++ * with type.
++ */
++int
++e820_any_mapped(u64 start, u64 end, unsigned type)
++{
++ int i;
++
++ for (i = 0; i < e820.nr_map; i++) {
++ const struct e820entry *ei = &e820.map[i];
++
++ if (type && ei->type != type)
++ continue;
++ if (ei->addr >= end || ei->addr + ei->size <= start)
++ continue;
++ return 1;
++ }
++ return 0;
++}
++EXPORT_SYMBOL_GPL(e820_any_mapped);
++
+ /*
+ * This function checks if the entire range <start,end> is mapped with type.
+ *
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/smp-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/smp-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/smp-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/smp-xen.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,605 @@
+/*
+ * Intel SMP support routines.
+ *
@@ -13358,21 +14032,6 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/smp-xen.c tmp-linux-2.6-xen.pa
+ on_each_cpu(do_flush_tlb_all, NULL, 1, 1);
+}
+
-+#else
-+
-+irqreturn_t smp_invalidate_interrupt(int irq, void *dev_id,
-+ struct pt_regs *regs)
-+{ return 0; }
-+void flush_tlb_current_task(void)
-+{ xen_tlb_flush_mask(&current->mm->cpu_vm_mask); }
-+void flush_tlb_mm(struct mm_struct * mm)
-+{ xen_tlb_flush_mask(&mm->cpu_vm_mask); }
-+void flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
-+{ xen_invlpg_mask(&vma->vm_mm->cpu_vm_mask, va); }
-+EXPORT_SYMBOL(flush_tlb_page);
-+void flush_tlb_all(void)
-+{ xen_tlb_flush_all(); }
-+
+#endif /* XEN */
+
+/*
@@ -13457,11 +14116,11 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/smp-xen.c tmp-linux-2.6-xen.pa
+
+ /* Wait for response */
+ while (atomic_read(&data.started) != cpus)
-+ barrier();
++ cpu_relax();
+
+ if (wait)
+ while (atomic_read(&data.finished) != cpus)
-+ barrier();
++ cpu_relax();
+ spin_unlock(&call_lock);
+
+ return 0;
@@ -13475,9 +14134,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/smp-xen.c tmp-linux-2.6-xen.pa
+ */
+ cpu_clear(smp_processor_id(), cpu_online_map);
+ local_irq_disable();
-+#if 0
-+ disable_local_APIC();
-+#endif
++ disable_all_local_evtchn();
+ if (cpu_data[smp_processor_id()].hlt_works_ok)
+ for(;;) halt();
+ for (;;);
@@ -13492,9 +14149,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/smp-xen.c tmp-linux-2.6-xen.pa
+ smp_call_function(stop_this_cpu, NULL, 1, 0);
+
+ local_irq_disable();
-+#if 0
-+ disable_local_APIC();
-+#endif
++ disable_all_local_evtchn();
+ local_irq_enable();
+}
+
@@ -13539,747 +14194,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/smp-xen.c tmp-linux-2.6-xen.pa
+ return IRQ_HANDLED;
+}
+
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,734 @@
-+/*
-+ * Dynamic DMA mapping support.
-+ *
-+ * This implementation is a fallback for platforms that do not support
-+ * I/O TLBs (aka DMA address translation hardware).
-+ * Copyright (C) 2000 Asit Mallick <Asit.K.Mallick@intel.com>
-+ * Copyright (C) 2000 Goutham Rao <goutham.rao@intel.com>
-+ * Copyright (C) 2000, 2003 Hewlett-Packard Co
-+ * David Mosberger-Tang <davidm@hpl.hp.com>
-+ * Copyright (C) 2005 Keir Fraser <keir@xensource.com>
-+ */
-+
-+#include <linux/cache.h>
-+#include <linux/mm.h>
-+#include <linux/module.h>
-+#include <linux/pci.h>
-+#include <linux/spinlock.h>
-+#include <linux/string.h>
-+#include <linux/types.h>
-+#include <linux/ctype.h>
-+#include <linux/init.h>
-+#include <linux/bootmem.h>
-+#include <linux/highmem.h>
-+#include <asm/io.h>
-+#include <asm/pci.h>
-+#include <asm/dma.h>
-+#include <asm/uaccess.h>
-+#include <xen/interface/memory.h>
-+
-+int swiotlb;
-+EXPORT_SYMBOL(swiotlb);
-+
-+#define OFFSET(val,align) ((unsigned long)((val) & ( (align) - 1)))
-+
-+#define SG_ENT_PHYS_ADDRESS(sg) (page_to_bus((sg)->page) + (sg)->offset)
-+
-+/*
-+ * Maximum allowable number of contiguous slabs to map,
-+ * must be a power of 2. What is the appropriate value ?
-+ * The complexity of {map,unmap}_single is linearly dependent on this value.
-+ */
-+#define IO_TLB_SEGSIZE 128
-+
-+/*
-+ * log of the size of each IO TLB slab. The number of slabs is command line
-+ * controllable.
-+ */
-+#define IO_TLB_SHIFT 11
-+
-+int swiotlb_force;
-+
-+static char *iotlb_virt_start;
-+static unsigned long iotlb_nslabs;
-+
-+/*
-+ * Used to do a quick range check in swiotlb_unmap_single and
-+ * swiotlb_sync_single_*, to see if the memory was in fact allocated by this
-+ * API.
-+ */
-+static unsigned long iotlb_pfn_start, iotlb_pfn_end;
-+
-+/* Does the given dma address reside within the swiotlb aperture? */
-+static inline int in_swiotlb_aperture(dma_addr_t dev_addr)
-+{
-+ unsigned long pfn = mfn_to_local_pfn(dev_addr >> PAGE_SHIFT);
-+ return (pfn_valid(pfn)
-+ && (pfn >= iotlb_pfn_start)
-+ && (pfn < iotlb_pfn_end));
-+}
-+
-+/*
-+ * When the IOMMU overflows we return a fallback buffer. This sets the size.
-+ */
-+static unsigned long io_tlb_overflow = 32*1024;
-+
-+void *io_tlb_overflow_buffer;
-+
-+/*
-+ * This is a free list describing the number of free entries available from
-+ * each index
-+ */
-+static unsigned int *io_tlb_list;
-+static unsigned int io_tlb_index;
-+
-+/*
-+ * We need to save away the original address corresponding to a mapped entry
-+ * for the sync operations.
-+ */
-+static struct phys_addr {
-+ struct page *page;
-+ unsigned int offset;
-+} *io_tlb_orig_addr;
-+
-+/*
-+ * Protect the above data structures in the map and unmap calls
-+ */
-+static DEFINE_SPINLOCK(io_tlb_lock);
-+
-+static unsigned int dma_bits;
-+static unsigned int __initdata max_dma_bits = 32;
-+static int __init
-+setup_dma_bits(char *str)
-+{
-+ max_dma_bits = simple_strtoul(str, NULL, 0);
-+ return 0;
-+}
-+__setup("dma_bits=", setup_dma_bits);
-+
-+static int __init
-+setup_io_tlb_npages(char *str)
-+{
-+ /* Unlike ia64, the size is aperture in megabytes, not 'slabs'! */
-+ if (isdigit(*str)) {
-+ iotlb_nslabs = simple_strtoul(str, &str, 0) <<
-+ (20 - IO_TLB_SHIFT);
-+ iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE);
-+ /* Round up to power of two (xen_create_contiguous_region). */
-+ while (iotlb_nslabs & (iotlb_nslabs-1))
-+ iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1);
-+ }
-+ if (*str == ',')
-+ ++str;
-+ /*
-+ * NB. 'force' enables the swiotlb, but doesn't force its use for
-+ * every DMA like it does on native Linux. 'off' forcibly disables
-+ * use of the swiotlb.
-+ */
-+ if (!strcmp(str, "force"))
-+ swiotlb_force = 1;
-+ else if (!strcmp(str, "off"))
-+ swiotlb_force = -1;
-+ return 1;
-+}
-+__setup("swiotlb=", setup_io_tlb_npages);
-+/* make io_tlb_overflow tunable too? */
-+
-+/*
-+ * Statically reserve bounce buffer space and initialize bounce buffer data
-+ * structures for the software IO TLB used to implement the PCI DMA API.
-+ */
-+void
-+swiotlb_init_with_default_size (size_t default_size)
-+{
-+ unsigned long i, bytes;
-+ int rc;
-+
-+ if (!iotlb_nslabs) {
-+ iotlb_nslabs = (default_size >> IO_TLB_SHIFT);
-+ iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE);
-+ /* Round up to power of two (xen_create_contiguous_region). */
-+ while (iotlb_nslabs & (iotlb_nslabs-1))
-+ iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1);
-+ }
-+
-+ bytes = iotlb_nslabs * (1UL << IO_TLB_SHIFT);
-+
-+ /*
-+ * Get IO TLB memory from the low pages
-+ */
-+ iotlb_virt_start = alloc_bootmem_low_pages(bytes);
-+ if (!iotlb_virt_start)
-+ panic("Cannot allocate SWIOTLB buffer!\n");
-+
-+ dma_bits = get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT) + PAGE_SHIFT;
-+ for (i = 0; i < iotlb_nslabs; i += IO_TLB_SEGSIZE) {
-+ do {
-+ rc = xen_create_contiguous_region(
-+ (unsigned long)iotlb_virt_start + (i << IO_TLB_SHIFT),
-+ get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT),
-+ dma_bits);
-+ } while (rc && dma_bits++ < max_dma_bits);
-+ if (rc) {
-+ if (i == 0)
-+ panic("No suitable physical memory available for SWIOTLB buffer!\n"
-+ "Use dom0_mem Xen boot parameter to reserve\n"
-+ "some DMA memory (e.g., dom0_mem=-128M).\n");
-+ iotlb_nslabs = i;
-+ i <<= IO_TLB_SHIFT;
-+ free_bootmem(__pa(iotlb_virt_start + i), bytes - i);
-+ bytes = i;
-+ for (dma_bits = 0; i > 0; i -= IO_TLB_SEGSIZE << IO_TLB_SHIFT) {
-+ unsigned int bits = fls64(virt_to_bus(iotlb_virt_start + i - 1));
-+
-+ if (bits > dma_bits)
-+ dma_bits = bits;
-+ }
-+ break;
-+ }
-+ }
-+
-+ /*
-+ * Allocate and initialize the free list array. This array is used
-+ * to find contiguous free memory regions of size up to IO_TLB_SEGSIZE.
-+ */
-+ io_tlb_list = alloc_bootmem(iotlb_nslabs * sizeof(int));
-+ for (i = 0; i < iotlb_nslabs; i++)
-+ io_tlb_list[i] = IO_TLB_SEGSIZE - OFFSET(i, IO_TLB_SEGSIZE);
-+ io_tlb_index = 0;
-+ io_tlb_orig_addr = alloc_bootmem(
-+ iotlb_nslabs * sizeof(*io_tlb_orig_addr));
-+
-+ /*
-+ * Get the overflow emergency buffer
-+ */
-+ io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow);
-+ if (!io_tlb_overflow_buffer)
-+ panic("Cannot allocate SWIOTLB overflow buffer!\n");
-+
-+ do {
-+ rc = xen_create_contiguous_region(
-+ (unsigned long)io_tlb_overflow_buffer,
-+ get_order(io_tlb_overflow),
-+ dma_bits);
-+ } while (rc && dma_bits++ < max_dma_bits);
-+ if (rc)
-+ panic("No suitable physical memory available for SWIOTLB overflow buffer!\n");
-+
-+ iotlb_pfn_start = __pa(iotlb_virt_start) >> PAGE_SHIFT;
-+ iotlb_pfn_end = iotlb_pfn_start + (bytes >> PAGE_SHIFT);
-+
-+ printk(KERN_INFO "Software IO TLB enabled: \n"
-+ " Aperture: %lu megabytes\n"
-+ " Kernel range: %p - %p\n"
-+ " Address size: %u bits\n",
-+ bytes >> 20,
-+ iotlb_virt_start, iotlb_virt_start + bytes,
-+ dma_bits);
-+}
-+
-+void
-+swiotlb_init(void)
-+{
-+ long ram_end;
-+ size_t defsz = 64 * (1 << 20); /* 64MB default size */
-+
-+ if (swiotlb_force == 1) {
-+ swiotlb = 1;
-+ } else if ((swiotlb_force != -1) &&
-+ is_running_on_xen() &&
-+ is_initial_xendomain()) {
-+ /* Domain 0 always has a swiotlb. */
-+ ram_end = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL);
-+ if (ram_end <= 0x7ffff)
-+ defsz = 2 * (1 << 20); /* 2MB on <2GB on systems. */
-+ swiotlb = 1;
-+ }
-+
-+ if (swiotlb)
-+ swiotlb_init_with_default_size(defsz);
-+ else
-+ printk(KERN_INFO "Software IO TLB disabled\n");
-+}
-+
-+/*
-+ * We use __copy_to_user_inatomic to transfer to the host buffer because the
-+ * buffer may be mapped read-only (e.g, in blkback driver) but lower-level
-+ * drivers map the buffer for DMA_BIDIRECTIONAL access. This causes an
-+ * unnecessary copy from the aperture to the host buffer, and a page fault.
-+ */
-+static void
-+__sync_single(struct phys_addr buffer, char *dma_addr, size_t size, int dir)
-+{
-+ if (PageHighMem(buffer.page)) {
-+ size_t len, bytes;
-+ char *dev, *host, *kmp;
-+ len = size;
-+ while (len != 0) {
-+ unsigned long flags;
-+
-+ if (((bytes = len) + buffer.offset) > PAGE_SIZE)
-+ bytes = PAGE_SIZE - buffer.offset;
-+ local_irq_save(flags); /* protects KM_BOUNCE_READ */
-+ kmp = kmap_atomic(buffer.page, KM_BOUNCE_READ);
-+ dev = dma_addr + size - len;
-+ host = kmp + buffer.offset;
-+ if (dir == DMA_FROM_DEVICE) {
-+ if (__copy_to_user_inatomic(host, dev, bytes))
-+ /* inaccessible */;
-+ } else
-+ memcpy(dev, host, bytes);
-+ kunmap_atomic(kmp, KM_BOUNCE_READ);
-+ local_irq_restore(flags);
-+ len -= bytes;
-+ buffer.page++;
-+ buffer.offset = 0;
-+ }
-+ } else {
-+ char *host = (char *)phys_to_virt(
-+ page_to_pseudophys(buffer.page)) + buffer.offset;
-+ if (dir == DMA_FROM_DEVICE) {
-+ if (__copy_to_user_inatomic(host, dma_addr, size))
-+ /* inaccessible */;
-+ } else if (dir == DMA_TO_DEVICE)
-+ memcpy(dma_addr, host, size);
-+ }
-+}
-+
-+/*
-+ * Allocates bounce buffer and returns its kernel virtual address.
-+ */
-+static void *
-+map_single(struct device *hwdev, struct phys_addr buffer, size_t size, int dir)
-+{
-+ unsigned long flags;
-+ char *dma_addr;
-+ unsigned int nslots, stride, index, wrap;
-+ struct phys_addr slot_buf;
-+ int i;
-+
-+ /*
-+ * For mappings greater than a page, we limit the stride (and
-+ * hence alignment) to a page size.
-+ */
-+ nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
-+ if (size > PAGE_SIZE)
-+ stride = (1 << (PAGE_SHIFT - IO_TLB_SHIFT));
-+ else
-+ stride = 1;
-+
-+ BUG_ON(!nslots);
-+
-+ /*
-+ * Find suitable number of IO TLB entries size that will fit this
-+ * request and allocate a buffer from that IO TLB pool.
-+ */
-+ spin_lock_irqsave(&io_tlb_lock, flags);
-+ {
-+ wrap = index = ALIGN(io_tlb_index, stride);
-+
-+ if (index >= iotlb_nslabs)
-+ wrap = index = 0;
-+
-+ do {
-+ /*
-+ * If we find a slot that indicates we have 'nslots'
-+ * number of contiguous buffers, we allocate the
-+ * buffers from that slot and mark the entries as '0'
-+ * indicating unavailable.
-+ */
-+ if (io_tlb_list[index] >= nslots) {
-+ int count = 0;
-+
-+ for (i = index; i < (int)(index + nslots); i++)
-+ io_tlb_list[i] = 0;
-+ for (i = index - 1;
-+ (OFFSET(i, IO_TLB_SEGSIZE) !=
-+ IO_TLB_SEGSIZE -1) && io_tlb_list[i];
-+ i--)
-+ io_tlb_list[i] = ++count;
-+ dma_addr = iotlb_virt_start +
-+ (index << IO_TLB_SHIFT);
-+
-+ /*
-+ * Update the indices to avoid searching in
-+ * the next round.
-+ */
-+ io_tlb_index =
-+ ((index + nslots) < iotlb_nslabs
-+ ? (index + nslots) : 0);
-+
-+ goto found;
-+ }
-+ index += stride;
-+ if (index >= iotlb_nslabs)
-+ index = 0;
-+ } while (index != wrap);
-+
-+ spin_unlock_irqrestore(&io_tlb_lock, flags);
-+ return NULL;
-+ }
-+ found:
-+ spin_unlock_irqrestore(&io_tlb_lock, flags);
-+
-+ /*
-+ * Save away the mapping from the original address to the DMA address.
-+ * This is needed when we sync the memory. Then we sync the buffer if
-+ * needed.
-+ */
-+ 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.
-+ */
-+static void
-+unmap_single(struct device *hwdev, char *dma_addr, size_t size, int dir)
-+{
-+ 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 = dma_addr_to_phys_addr(dma_addr);
-+
-+ /*
-+ * First, sync the memory before unmapping the entry
-+ */
-+ if ((dir == DMA_FROM_DEVICE) || (dir == DMA_BIDIRECTIONAL))
-+ __sync_single(buffer, dma_addr, size, DMA_FROM_DEVICE);
-+
-+ /*
-+ * Return the buffer to the free list by setting the corresponding
-+ * entries to indicate the number of contigous entries available.
-+ * While returning the entries to the free list, we merge the entries
-+ * with slots below and above the pool being returned.
-+ */
-+ spin_lock_irqsave(&io_tlb_lock, flags);
-+ {
-+ count = ((index + nslots) < ALIGN(index + 1, IO_TLB_SEGSIZE) ?
-+ io_tlb_list[index + nslots] : 0);
-+ /*
-+ * Step 1: return the slots to the free list, merging the
-+ * slots with superceeding slots
-+ */
-+ for (i = index + nslots - 1; i >= index; i--)
-+ io_tlb_list[i] = ++count;
-+ /*
-+ * Step 2: merge the returned slots with the preceding slots,
-+ * if available (non zero)
-+ */
-+ for (i = index - 1;
-+ (OFFSET(i, IO_TLB_SEGSIZE) !=
-+ IO_TLB_SEGSIZE -1) && io_tlb_list[i];
-+ i--)
-+ io_tlb_list[i] = ++count;
-+ }
-+ spin_unlock_irqrestore(&io_tlb_lock, flags);
-+}
-+
-+static void
-+sync_single(struct device *hwdev, char *dma_addr, size_t size, int dir)
-+{
-+ 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);
-+}
-+
-+static void
-+swiotlb_full(struct device *dev, size_t size, int dir, int do_panic)
-+{
-+ /*
-+ * Ran out of IOMMU space for this operation. This is very bad.
-+ * Unfortunately the drivers cannot handle this operation properly.
-+ * unless they check for pci_dma_mapping_error (most don't)
-+ * When the mapping is small enough return a static buffer to limit
-+ * the damage, or panic when the transfer is too big.
-+ */
-+ printk(KERN_ERR "PCI-DMA: Out of SW-IOMMU space for %lu bytes at "
-+ "device %s\n", (unsigned long)size, dev ? dev->bus_id : "?");
-+
-+ if (size > io_tlb_overflow && do_panic) {
-+ if (dir == PCI_DMA_FROMDEVICE || dir == PCI_DMA_BIDIRECTIONAL)
-+ panic("PCI-DMA: Memory would be corrupted\n");
-+ if (dir == PCI_DMA_TODEVICE || dir == PCI_DMA_BIDIRECTIONAL)
-+ panic("PCI-DMA: Random memory would be DMAed\n");
-+ }
-+}
-+
-+/*
-+ * Map a single buffer of the indicated size for DMA in streaming mode. The
-+ * PCI address to use is returned.
-+ *
-+ * Once the device is given the dma address, the device owns this memory until
-+ * either swiotlb_unmap_single or swiotlb_dma_sync_single is performed.
-+ */
-+dma_addr_t
-+swiotlb_map_single(struct device *hwdev, void *ptr, size_t size, int dir)
-+{
-+ dma_addr_t dev_addr = virt_to_bus(ptr);
-+ void *map;
-+ struct phys_addr buffer;
-+
-+ BUG_ON(dir == DMA_NONE);
-+
-+ /*
-+ * If the pointer passed in happens to be in the device's DMA window,
-+ * we can safely return the device addr and not worry about bounce
-+ * buffering it.
-+ */
-+ if (!range_straddles_page_boundary(__pa(ptr), size) &&
-+ !address_needs_mapping(hwdev, dev_addr))
-+ return dev_addr;
-+
-+ /*
-+ * Oh well, have to allocate and map a bounce buffer.
-+ */
-+ buffer.page = virt_to_page(ptr);
-+ buffer.offset = (unsigned long)ptr & ~PAGE_MASK;
-+ map = map_single(hwdev, buffer, size, dir);
-+ if (!map) {
-+ swiotlb_full(hwdev, size, dir, 1);
-+ map = io_tlb_overflow_buffer;
-+ }
-+
-+ dev_addr = virt_to_bus(map);
-+ return dev_addr;
-+}
-+
-+/*
-+ * Unmap a single streaming mode DMA translation. The dma_addr and size must
-+ * match what was provided for in a previous swiotlb_map_single call. All
-+ * other usages are undefined.
-+ *
-+ * After this call, reads by the cpu to the buffer are guaranteed to see
-+ * whatever the device wrote there.
-+ */
-+void
-+swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr, size_t size,
-+ int dir)
-+{
-+ BUG_ON(dir == DMA_NONE);
-+ if (in_swiotlb_aperture(dev_addr))
-+ unmap_single(hwdev, bus_to_virt(dev_addr), size, dir);
-+}
-+
-+/*
-+ * Make physical memory consistent for a single streaming mode DMA translation
-+ * after a transfer.
-+ *
-+ * If you perform a swiotlb_map_single() but wish to interrogate the buffer
-+ * using the cpu, yet do not wish to teardown the PCI dma mapping, you must
-+ * call this function before doing so. At the next point you give the PCI dma
-+ * address back to the card, you must first perform a
-+ * swiotlb_dma_sync_for_device, and then the device again owns the buffer
-+ */
-+void
-+swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
-+ size_t size, int dir)
-+{
-+ BUG_ON(dir == DMA_NONE);
-+ if (in_swiotlb_aperture(dev_addr))
-+ sync_single(hwdev, bus_to_virt(dev_addr), size, dir);
-+}
-+
-+void
-+swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr,
-+ size_t size, int dir)
-+{
-+ BUG_ON(dir == DMA_NONE);
-+ if (in_swiotlb_aperture(dev_addr))
-+ sync_single(hwdev, bus_to_virt(dev_addr), size, dir);
-+}
-+
-+/*
-+ * Map a set of buffers described by scatterlist in streaming mode for DMA.
-+ * This is the scatter-gather version of the above swiotlb_map_single
-+ * interface. Here the scatter gather list elements are each tagged with the
-+ * appropriate dma address and length. They are obtained via
-+ * sg_dma_{address,length}(SG).
-+ *
-+ * NOTE: An implementation may be able to use a smaller number of
-+ * DMA address/length pairs than there are SG table elements.
-+ * (for example via virtual mapping capabilities)
-+ * The routine returns the number of addr/length pairs actually
-+ * used, at most nents.
-+ *
-+ * Device ownership issues as mentioned above for swiotlb_map_single are the
-+ * same here.
-+ */
-+int
-+swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
-+ int dir)
-+{
-+ struct phys_addr buffer;
-+ dma_addr_t dev_addr;
-+ char *map;
-+ int i;
-+
-+ BUG_ON(dir == DMA_NONE);
-+
-+ for (i = 0; i < nelems; i++, sg++) {
-+ dev_addr = SG_ENT_PHYS_ADDRESS(sg);
-+ 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);
-+ if (!map) {
-+ /* Don't panic here, we expect map_sg users
-+ to do proper error handling. */
-+ swiotlb_full(hwdev, sg->length, dir, 0);
-+ swiotlb_unmap_sg(hwdev, sg - i, i, dir);
-+ sg[0].dma_length = 0;
-+ return 0;
-+ }
-+ sg->dma_address = (dma_addr_t)virt_to_bus(map);
-+ } else
-+ sg->dma_address = dev_addr;
-+ sg->dma_length = sg->length;
-+ }
-+ return nelems;
-+}
-+
-+/*
-+ * Unmap a set of streaming mode DMA translations. Again, cpu read rules
-+ * concerning calls here are the same as for swiotlb_unmap_single() above.
-+ */
-+void
-+swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
-+ int dir)
-+{
-+ int i;
-+
-+ BUG_ON(dir == DMA_NONE);
-+
-+ for (i = 0; i < nelems; i++, sg++)
-+ if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
-+ unmap_single(hwdev,
-+ (void *)bus_to_virt(sg->dma_address),
-+ sg->dma_length, dir);
-+}
-+
-+/*
-+ * Make physical memory consistent for a set of streaming mode DMA translations
-+ * after a transfer.
-+ *
-+ * The same as swiotlb_sync_single_* but for a scatter-gather list, same rules
-+ * and usage.
-+ */
-+void
-+swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
-+ int nelems, int dir)
-+{
-+ int i;
-+
-+ BUG_ON(dir == DMA_NONE);
-+
-+ for (i = 0; i < nelems; i++, sg++)
-+ if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
-+ sync_single(hwdev,
-+ (void *)bus_to_virt(sg->dma_address),
-+ sg->dma_length, dir);
-+}
-+
-+void
-+swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
-+ int nelems, int dir)
-+{
-+ int i;
-+
-+ BUG_ON(dir == DMA_NONE);
-+
-+ for (i = 0; i < nelems; i++, sg++)
-+ if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
-+ sync_single(hwdev,
-+ (void *)bus_to_virt(sg->dma_address),
-+ sg->dma_length, dir);
-+}
-+
-+#ifdef CONFIG_HIGHMEM
-+
-+dma_addr_t
-+swiotlb_map_page(struct device *hwdev, struct page *page,
-+ unsigned long offset, size_t size,
-+ enum dma_data_direction direction)
-+{
-+ struct phys_addr buffer;
-+ dma_addr_t dev_addr;
-+ char *map;
-+
-+ dev_addr = page_to_bus(page) + offset;
-+ if (address_needs_mapping(hwdev, dev_addr)) {
-+ buffer.page = page;
-+ buffer.offset = offset;
-+ map = map_single(hwdev, buffer, size, direction);
-+ if (!map) {
-+ swiotlb_full(hwdev, size, direction, 1);
-+ map = io_tlb_overflow_buffer;
-+ }
-+ dev_addr = (dma_addr_t)virt_to_bus(map);
-+ }
-+
-+ return dev_addr;
-+}
-+
-+void
-+swiotlb_unmap_page(struct device *hwdev, dma_addr_t dma_address,
-+ size_t size, enum dma_data_direction direction)
-+{
-+ BUG_ON(direction == DMA_NONE);
-+ if (in_swiotlb_aperture(dma_address))
-+ unmap_single(hwdev, bus_to_virt(dma_address), size, direction);
-+}
-+
-+#endif
-+
-+int
-+swiotlb_dma_mapping_error(dma_addr_t dma_addr)
-+{
-+ return (dma_addr == virt_to_bus(io_tlb_overflow_buffer));
-+}
-+
-+/*
-+ * Return whether the given PCI device DMA address mask can be supported
-+ * properly. For example, if your device can only drive the low 24-bits
-+ * during PCI bus mastering, then you would pass 0x00ffffff as the mask to
-+ * this function.
-+ */
-+int
-+swiotlb_dma_supported (struct device *hwdev, u64 mask)
-+{
-+ return (mask >= ((1UL << dma_bits) - 1));
-+}
-+
-+EXPORT_SYMBOL(swiotlb_init);
-+EXPORT_SYMBOL(swiotlb_map_single);
-+EXPORT_SYMBOL(swiotlb_unmap_single);
-+EXPORT_SYMBOL(swiotlb_map_sg);
-+EXPORT_SYMBOL(swiotlb_unmap_sg);
-+EXPORT_SYMBOL(swiotlb_sync_single_for_cpu);
-+EXPORT_SYMBOL(swiotlb_sync_single_for_device);
-+EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu);
-+EXPORT_SYMBOL(swiotlb_sync_sg_for_device);
-+EXPORT_SYMBOL(swiotlb_dma_mapping_error);
-+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/sysenter.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/sysenter.c
+--- linux-2.6.18.8/arch/i386/kernel/sysenter.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/sysenter.c 2008-02-15 16:21:49.000000000 -0800
@@ -23,6 +23,10 @@
#include <asm/pgtable.h>
#include <asm/unistd.h>
@@ -14295,41 +14212,52 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/sysenter.c tmp-linux-2.6-xen.p
void enable_sep_cpu(void)
{
-+#ifndef CONFIG_X86_NO_TSS
++#ifndef CONFIG_XEN
int cpu = get_cpu();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
-@@ -58,6 +63,7 @@ void enable_sep_cpu(void)
+@@ -57,7 +62,36 @@ void enable_sep_cpu(void)
+ wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0);
wrmsr(MSR_IA32_SYSENTER_ESP, tss->esp1, 0);
wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long) sysenter_entry, 0);
- put_cpu();
+- put_cpu();
++#else
++ extern asmlinkage void sysenter_entry_pv(void);
++ static struct callback_register sysenter = {
++ .type = CALLBACKTYPE_sysenter,
++ .address = { __KERNEL_CS, (unsigned long)sysenter_entry_pv },
++ };
++
++ if (!boot_cpu_has(X86_FEATURE_SEP))
++ return;
++
++ get_cpu();
++
++ if (xen_feature(XENFEAT_supervisor_mode_kernel))
++ sysenter.address.eip = (unsigned long)sysenter_entry;
++
++ switch (HYPERVISOR_callback_op(CALLBACKOP_register, &sysenter)) {
++ case 0:
++ break;
++#if CONFIG_XEN_COMPAT < 0x030200
++ case -ENOSYS:
++ sysenter.type = CALLBACKTYPE_sysenter_deprecated;
++ if (HYPERVISOR_callback_op(CALLBACKOP_register, &sysenter) == 0)
++ break;
++#endif
++ default:
++ clear_bit(X86_FEATURE_SEP, boot_cpu_data.x86_capability);
++ break;
++ }
+#endif
++ put_cpu();
}
/*
-@@ -72,6 +78,18 @@ int __init sysenter_setup(void)
- {
- syscall_page = (void *)get_zeroed_page(GFP_ATOMIC);
-
-+#ifdef CONFIG_XEN
-+ if (boot_cpu_has(X86_FEATURE_SEP)) {
-+ static struct callback_register __initdata sysenter = {
-+ .type = CALLBACKTYPE_sysenter,
-+ .address = { __KERNEL_CS, (unsigned long)sysenter_entry },
-+ };
-+
-+ if (HYPERVISOR_callback_op(CALLBACKOP_register, &sysenter) < 0)
-+ clear_bit(X86_FEATURE_SEP, boot_cpu_data.x86_capability);
-+ }
-+#endif
-+
- #ifdef CONFIG_COMPAT_VDSO
- __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_READONLY);
- 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,1159 @@
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/time-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/time-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/time-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/time-xen.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,1194 @@
+/*
+ * linux/arch/i386/kernel/time.c
+ *
@@ -14382,6 +14310,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+#include <linux/percpu.h>
+#include <linux/kernel_stat.h>
+#include <linux/posix-timers.h>
++#include <linux/cpufreq.h>
+
+#include <asm/io.h>
+#include <asm/smp.h>
@@ -14633,7 +14562,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ * Reads a consistent set of time-base values from Xen, into a shadow data
+ * area.
+ */
-+static void get_time_values_from_xen(int cpu)
++static void get_time_values_from_xen(unsigned int cpu)
+{
+ struct vcpu_time_info *src;
+ struct shadow_time_info *dst;
@@ -14654,7 +14583,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ dst->tsc_to_usec_mul = dst->tsc_to_nsec_mul / 1000;
+}
+
-+static inline int time_values_up_to_date(int cpu)
++static inline int time_values_up_to_date(unsigned int cpu)
+{
+ struct vcpu_time_info *src;
+ struct shadow_time_info *dst;
@@ -14805,7 +14734,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ op.u.settime.secs = sec;
+ op.u.settime.nsecs = nsec;
+ op.u.settime.system_time = shadow->system_timestamp;
-+ HYPERVISOR_platform_op(&op);
++ WARN_ON(HYPERVISOR_platform_op(&op));
+ update_wallclock();
+ } else if (independent_wallclock) {
+ nsec -= shadow->system_timestamp;
@@ -14850,7 +14779,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ op.u.settime.secs = sec;
+ op.u.settime.nsecs = nsec;
+ op.u.settime.system_time = processed_system_time;
-+ HYPERVISOR_platform_op(&op);
++ WARN_ON(HYPERVISOR_platform_op(&op));
+
+ update_wallclock();
+
@@ -14886,7 +14815,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ */
+unsigned long long monotonic_clock(void)
+{
-+ int cpu = get_cpu();
++ unsigned int cpu = get_cpu();
+ struct shadow_time_info *shadow = &per_cpu(shadow_time, cpu);
+ u64 time;
+ u32 local_time_version;
@@ -14952,7 +14881,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+{
+ s64 delta, delta_cpu, stolen, blocked;
+ u64 sched_time;
-+ int i, cpu = smp_processor_id();
++ unsigned int i, cpu = smp_processor_id();
+ struct shadow_time_info *shadow = &per_cpu(shadow_time, cpu);
+ struct vcpu_runstate_info *runstate = &per_cpu(runstate, cpu);
+
@@ -14993,7 +14922,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ if ((unlikely(delta < -(s64)permitted_clock_jitter) ||
+ unlikely(delta_cpu < -(s64)permitted_clock_jitter))
+ && printk_ratelimit()) {
-+ printk("Timer ISR/%d: Time went backwards: "
++ printk("Timer ISR/%u: Time went backwards: "
+ "delta=%lld delta_cpu=%lld shadow=%lld "
+ "off=%lld processed=%lld cpu_processed=%lld\n",
+ cpu, delta, delta_cpu, shadow->system_timestamp,
@@ -15076,7 +15005,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ return IRQ_HANDLED;
+}
+
-+static void init_missing_ticks_accounting(int cpu)
++static void init_missing_ticks_accounting(unsigned int cpu)
+{
+ struct vcpu_register_runstate_memory_area area;
+ struct vcpu_runstate_info *runstate = &per_cpu(runstate, cpu);
@@ -15164,44 +15093,15 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ mod_timer(&sync_xen_wallclock_timer, jiffies + 1);
+}
+
-+static long clock_cmos_diff, sleep_start;
-+
-+static int timer_suspend(struct sys_device *dev, pm_message_t state)
-+{
-+ /*
-+ * Estimate time zone so that set_time can update the clock
-+ */
-+ clock_cmos_diff = -get_cmos_time();
-+ clock_cmos_diff += get_seconds();
-+ sleep_start = get_cmos_time();
-+ return 0;
-+}
-+
+static int timer_resume(struct sys_device *dev)
+{
-+ unsigned long flags;
-+ unsigned long sec;
-+ unsigned long sleep_length;
-+
-+#ifdef CONFIG_HPET_TIMER
-+ if (is_hpet_enabled())
-+ hpet_reenable();
-+#endif
-+ sec = get_cmos_time() + clock_cmos_diff;
-+ sleep_length = (get_cmos_time() - sleep_start) * HZ;
-+ write_seqlock_irqsave(&xtime_lock, flags);
-+ xtime.tv_sec = sec;
-+ xtime.tv_nsec = 0;
-+ jiffies_64 += sleep_length;
-+ wall_jiffies += sleep_length;
-+ write_sequnlock_irqrestore(&xtime_lock, flags);
-+ touch_softlockup_watchdog();
++ extern void time_resume(void);
++ time_resume();
+ return 0;
+}
+
+static struct sysdev_class timer_sysclass = {
+ .resume = timer_resume,
-+ .suspend = timer_suspend,
+ set_kset_name("timer"),
+};
+
@@ -15274,8 +15174,16 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ }
+#endif
+
-+ HYPERVISOR_vcpu_op(VCPUOP_set_periodic_timer, 0,
-+ &xen_set_periodic_tick);
++ switch (HYPERVISOR_vcpu_op(VCPUOP_set_periodic_timer, 0,
++ &xen_set_periodic_tick)) {
++ case 0:
++#if CONFIG_XEN_COMPAT <= 0x030004
++ case -ENOSYS:
++#endif
++ break;
++ default:
++ BUG();
++ }
+
+ get_time_values_from_xen(0);
+
@@ -15386,7 +15294,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+void halt(void)
+{
+ if (irqs_disabled())
-+ HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL);
++ VOID(HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL));
+}
+EXPORT_SYMBOL(halt);
+
@@ -15398,8 +15306,16 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ init_cpu_khz();
+
+ for_each_online_cpu(cpu) {
-+ HYPERVISOR_vcpu_op(VCPUOP_set_periodic_timer, cpu,
-+ &xen_set_periodic_tick);
++ switch (HYPERVISOR_vcpu_op(VCPUOP_set_periodic_timer, cpu,
++ &xen_set_periodic_tick)) {
++ case 0:
++#if CONFIG_XEN_COMPAT <= 0x030004
++ case -ENOSYS:
++#endif
++ break;
++ default:
++ BUG();
++ }
+ get_time_values_from_xen(cpu);
+ per_cpu(processed_system_time, cpu) =
+ per_cpu(shadow_time, 0).system_timestamp;
@@ -15414,14 +15330,22 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+#ifdef CONFIG_SMP
+static char timer_name[NR_CPUS][15];
+
-+int local_setup_timer(unsigned int cpu)
++int __cpuinit local_setup_timer(unsigned int cpu)
+{
+ int seq, irq;
+
+ BUG_ON(cpu == 0);
+
-+ HYPERVISOR_vcpu_op(VCPUOP_set_periodic_timer, cpu,
-+ &xen_set_periodic_tick);
++ switch (HYPERVISOR_vcpu_op(VCPUOP_set_periodic_timer, cpu,
++ &xen_set_periodic_tick)) {
++ case 0:
++#if CONFIG_XEN_COMPAT <= 0x030004
++ case -ENOSYS:
++#endif
++ break;
++ default:
++ BUG();
++ }
+
+ do {
+ seq = read_seqbegin(&xtime_lock);
@@ -15431,7 +15355,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ init_missing_ticks_accounting(cpu);
+ } while (read_seqretry(&xtime_lock, seq));
+
-+ sprintf(timer_name[cpu], "timer%d", cpu);
++ sprintf(timer_name[cpu], "timer%u", cpu);
+ irq = bind_virq_to_irqhandler(VIRQ_TIMER,
+ cpu,
+ timer_interrupt,
@@ -15445,13 +15369,52 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ return 0;
+}
+
-+void local_teardown_timer(unsigned int cpu)
++void __cpuexit local_teardown_timer(unsigned int cpu)
+{
+ BUG_ON(cpu == 0);
+ unbind_from_irqhandler(per_cpu(timer_irq, cpu), NULL);
+}
+#endif
+
++#ifdef CONFIG_CPU_FREQ
++static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
++ void *data)
++{
++ struct cpufreq_freqs *freq = data;
++ struct xen_platform_op op;
++
++ if (cpu_has(&cpu_data[freq->cpu], X86_FEATURE_CONSTANT_TSC))
++ return 0;
++
++ if (val == CPUFREQ_PRECHANGE)
++ return 0;
++
++ op.cmd = XENPF_change_freq;
++ op.u.change_freq.flags = 0;
++ op.u.change_freq.cpu = freq->cpu;
++ op.u.change_freq.freq = (u64)freq->new * 1000;
++ WARN_ON(HYPERVISOR_platform_op(&op));
++
++ return 0;
++}
++
++static struct notifier_block time_cpufreq_notifier_block = {
++ .notifier_call = time_cpufreq_notifier
++};
++
++static int __init cpufreq_time_setup(void)
++{
++ if (!cpufreq_register_notifier(&time_cpufreq_notifier_block,
++ CPUFREQ_TRANSITION_NOTIFIER)) {
++ printk(KERN_ERR "failed to set up cpufreq notifier\n");
++ return -ENODEV;
++ }
++ return 0;
++}
++
++core_initcall(cpufreq_time_setup);
++#endif
++
+/*
+ * /proc/sys/xen: This really belongs in another file. It can stay here for
+ * now however.
@@ -15489,10 +15452,10 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.p
+ return 0;
+}
+__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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,1186 @@
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/traps-xen.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/traps-xen.c
+--- linux-2.6.18.8/arch/i386/kernel/traps-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/traps-xen.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,1190 @@
+/*
+ * linux/arch/i386/traps.c
+ *
@@ -16616,7 +16579,11 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/traps-xen.c tmp-linux-2.6-xen.
+
+void __init trap_init(void)
+{
-+ HYPERVISOR_set_trap_table(trap_table);
++ int ret;
++
++ ret = HYPERVISOR_set_trap_table(trap_table);
++ if (ret)
++ printk("HYPERVISOR_set_trap_table failed: error %d\n", ret);
+
+ if (cpu_has_fxsr) {
+ /*
@@ -16648,7 +16615,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/traps-xen.c tmp-linux-2.6-xen.
+
+void smp_trap_init(trap_info_t *trap_ctxt)
+{
-+ trap_info_t *t = trap_table;
++ const trap_info_t *t = trap_table;
+
+ for (t = trap_table; t->address; t++) {
+ trap_ctxt[t->vector].flags = t->flags;
@@ -16679,9 +16646,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/traps-xen.c tmp-linux-2.6-xen.
+}
+__setup("call_trace=", call_trace_setup);
+#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-11-16 16:18:12.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/traps.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/traps.c
+--- linux-2.6.18.8/arch/i386/kernel/traps.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/traps.c 2008-02-15 16:21:49.000000000 -0800
@@ -642,18 +642,11 @@ static void mem_parity_error(unsigned ch
static void io_check_error(unsigned char reason, struct pt_regs * regs)
@@ -16702,9 +16669,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/vm86.c linux-2.6.18-xen-3.2.0/arch/i386/kernel/vm86.c
+--- linux-2.6.18.8/arch/i386/kernel/vm86.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/vm86.c 2008-02-15 16:21:49.000000000 -0800
@@ -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)
@@ -16759,9 +16726,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/vm86.c tmp-linux-2.6-xen.patch
tsk->thread.screen_bitmap = info->screen_bitmap;
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/vmlinux.lds.S linux-2.6.18-xen-3.2.0/arch/i386/kernel/vmlinux.lds.S
+--- linux-2.6.18.8/arch/i386/kernel/vmlinux.lds.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/vmlinux.lds.S 2008-02-15 16:21:49.000000000 -0800
@@ -13,6 +13,12 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386"
OUTPUT_ARCH(i386)
ENTRY(phys_startup_32)
@@ -16804,9 +16771,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/vmlinux.lds.S tmp-linux-2.6-xe
+
+ NOTES
}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/kernel/vsyscall-note-xen.S linux-2.6.18-xen-3.2.0/arch/i386/kernel/vsyscall-note-xen.S
+--- linux-2.6.18.8/arch/i386/kernel/vsyscall-note-xen.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/kernel/vsyscall-note-xen.S 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,32 @@
+/*
+ * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
@@ -16840,18 +16807,51 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/kernel/vsyscall-note-xen.S tmp-linux-
+NOTE_KERNELCAP_BEGIN(1, 1)
+NOTE_KERNELCAP(0, "nosegneg")
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/lib/Makefile linux-2.6.18-xen-3.2.0/arch/i386/lib/Makefile
+--- linux-2.6.18.8/arch/i386/lib/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/lib/Makefile 2008-02-15 16:21:49.000000000 -0800
+@@ -7,3 +7,4 @@ lib-y = checksum.o delay.o usercopy.o ge
+ bitops.o
+
+ lib-$(CONFIG_X86_USE_3DNOW) += mmx.o
++lib-$(CONFIG_XEN_SCRUB_PAGES) += scrub.o
+diff -rpuN linux-2.6.18.8/arch/i386/lib/scrub.c linux-2.6.18-xen-3.2.0/arch/i386/lib/scrub.c
+--- linux-2.6.18.8/arch/i386/lib/scrub.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/lib/scrub.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,21 @@
++#include <asm/cpufeature.h>
++#include <asm/page.h>
++#include <asm/processor.h>
++
++void scrub_pages(void *v, unsigned int count)
++{
++ if (likely(cpu_has_xmm2)) {
++ unsigned long n = count * (PAGE_SIZE / sizeof(long) / 4);
++
++ for (; n--; v += sizeof(long) * 4)
++ asm("movnti %1,(%0)\n\t"
++ "movnti %1,%c2(%0)\n\t"
++ "movnti %1,2*%c2(%0)\n\t"
++ "movnti %1,3*%c2(%0)\n\t"
++ : : "r" (v), "r" (0L), "i" (sizeof(long))
++ : "memory");
++ asm volatile("sfence" : : : "memory");
++ } else
++ for (; count--; v += PAGE_SIZE)
++ clear_page(v);
++}
+diff -rpuN linux-2.6.18.8/arch/i386/mach-xen/Makefile linux-2.6.18-xen-3.2.0/arch/i386/mach-xen/Makefile
+--- linux-2.6.18.8/arch/i386/mach-xen/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/mach-xen/Makefile 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,5 @@
+#
+# Makefile for the linux kernel.
+#
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/mach-xen/setup.c linux-2.6.18-xen-3.2.0/arch/i386/mach-xen/setup.c
+--- linux-2.6.18.8/arch/i386/mach-xen/setup.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/mach-xen/setup.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,147 @@
+/*
+ * Machine specific setup for generic
@@ -17000,25 +17000,18 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mach-xen/setup.c tmp-linux-2.6-xen.pa
+ while ((1UL << machine_to_phys_order) < machine_to_phys_nr_ents )
+ machine_to_phys_order++;
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -8,3 +8,11 @@ obj-$(CONFIG_NUMA) += discontig.o
+diff -rpuN linux-2.6.18.8/arch/i386/mm/Makefile linux-2.6.18-xen-3.2.0/arch/i386/mm/Makefile
+--- linux-2.6.18.8/arch/i386/mm/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/mm/Makefile 2008-02-15 16:21:49.000000000 -0800
+@@ -8,3 +8,4 @@ obj-$(CONFIG_NUMA) += discontig.o
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
obj-$(CONFIG_HIGHMEM) += highmem.o
obj-$(CONFIG_BOOT_IOREMAP) += boot_ioremap.o
-+
-+ifdef CONFIG_XEN
-+include $(srctree)/scripts/Makefile.xen
-+
-+obj-y += hypervisor.o
-+
-+obj-y := $(call cherrypickxen, $(obj-y))
-+endif
-diff -Nurp 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,782 @@
++obj-$(CONFIG_XEN) += hypervisor.o
+diff -rpuN linux-2.6.18.8/arch/i386/mm/fault-xen.c linux-2.6.18-xen-3.2.0/arch/i386/mm/fault-xen.c
+--- linux-2.6.18.8/arch/i386/mm/fault-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/mm/fault-xen.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,779 @@
+/*
+ * linux/arch/i386/mm/fault.c
+ *
@@ -17282,7 +17275,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/fault-xen.c tmp-linux-2.6-xen.patc
+ p = (unsigned long *)__va(page);
+ p += (address >> 30) * 2;
+ printk(KERN_ALERT "%08lx -> *pde = %08lx:%08lx\n", page, p[1], p[0]);
-+ if (p[0] & 1) {
++ if (p[0] & _PAGE_PRESENT) {
+ mfn = (p[0] >> PAGE_SHIFT) | (p[1] << 20);
+ page = mfn_to_pfn(mfn) << PAGE_SHIFT;
+ p = (unsigned long *)__va(page);
@@ -17295,7 +17288,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/fault-xen.c tmp-linux-2.6-xen.patc
+ if (mfn_to_pfn(mfn) >= highstart_pfn)
+ return;
+#endif
-+ if (p[0] & 1) {
++ if (p[0] & _PAGE_PRESENT) {
+ page = mfn_to_pfn(mfn) << PAGE_SHIFT;
+ p = (unsigned long *) __va(page);
+ address &= 0x001fffff;
@@ -17367,7 +17360,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/fault-xen.c tmp-linux-2.6-xen.patc
+ if ((error_code & 0x02) && !pte_write(*pte))
+ return 0;
+#ifdef CONFIG_X86_PAE
-+ if ((error_code & 0x10) && (pte_val(*pte) & _PAGE_NX))
++ if ((error_code & 0x10) && (__pte_val(*pte) & _PAGE_NX))
+ return 0;
+#endif
+
@@ -17403,11 +17396,11 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/fault-xen.c tmp-linux-2.6-xen.patc
+ if (!pmd_present(*pmd_k))
+ return NULL;
+ if (!pmd_present(*pmd))
-+#ifndef CONFIG_XEN
++#if CONFIG_XEN_COMPAT > 0x030002
+ set_pmd(pmd, *pmd_k);
+#else
+ /*
-+ * When running on Xen we must launder *pmd_k through
++ * When running on older Xen we must launder *pmd_k through
+ * pmd_val() to ensure that _PAGE_PRESENT is correctly set.
+ */
+ set_pmd(pmd, __pmd(pmd_val(*pmd_k)));
@@ -17777,10 +17770,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/fault-xen.c tmp-linux-2.6-xen.patc
+ struct page *page;
+
+ spin_lock_irqsave(&pgd_lock, flags);
-+ /*
-+ * XEN: vmalloc_sync_one() failure path logic assumes
-+ * pgd_list is non-empty.
-+ */
++ /* XEN: failure path assumes non-empty pgd_list. */
+ if (unlikely(!pgd_list)) {
+ spin_unlock_irqrestore(&pgd_lock, flags);
+ return;
@@ -17801,9 +17791,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/fault-xen.c tmp-linux-2.6-xen.patc
+ }
+}
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/mm/highmem-xen.c linux-2.6.18-xen-3.2.0/arch/i386/mm/highmem-xen.c
+--- linux-2.6.18.8/arch/i386/mm/highmem-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/mm/highmem-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,136 @@
+#include <linux/highmem.h>
+#include <linux/module.h>
@@ -17941,10 +17931,10 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/highmem-xen.c tmp-linux-2.6-xen.pa
+EXPORT_SYMBOL(kmap_atomic_pte);
+EXPORT_SYMBOL(kunmap_atomic);
+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,543 @@
+diff -rpuN linux-2.6.18.8/arch/i386/mm/hypervisor.c linux-2.6.18-xen-3.2.0/arch/i386/mm/hypervisor.c
+--- linux-2.6.18.8/arch/i386/mm/hypervisor.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/mm/hypervisor.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,602 @@
+/******************************************************************************
+ * mm/hypervisor.c
+ *
@@ -17994,10 +17984,16 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+void xen_l1_entry_update(pte_t *ptr, pte_t val)
+{
+ mmu_update_t u;
++#ifdef CONFIG_HIGHPTE
++ u.ptr = ((unsigned long)ptr >= (unsigned long)high_memory) ?
++ arbitrary_virt_to_machine(ptr) : virt_to_machine(ptr);
++#else
+ u.ptr = virt_to_machine(ptr);
++#endif
+ u.val = __pte_val(val);
+ BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
+}
++EXPORT_SYMBOL_GPL(xen_l1_entry_update);
+
+void xen_l2_entry_update(pmd_t *ptr, pmd_t val)
+{
@@ -18122,12 +18118,12 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+ BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
+}
+
-+void xen_set_ldt(unsigned long ptr, unsigned long len)
++void xen_set_ldt(const void *ptr, unsigned int ents)
+{
+ struct mmuext_op op;
+ op.cmd = MMUEXT_SET_LDT;
-+ op.arg1.linear_addr = ptr;
-+ op.arg2.nr_ents = len;
++ op.arg1.linear_addr = (unsigned long)ptr;
++ op.arg2.nr_ents = ents;
+ BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
+}
+
@@ -18190,9 +18186,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+ unsigned long vstart, unsigned int order, unsigned int address_bits)
+{
+ unsigned long *in_frames = discontig_frames, out_frame;
-+ unsigned long frame, i, flags;
-+ long rc;
-+ int success;
++ unsigned long frame, flags;
++ unsigned int i;
++ int rc, success;
+ struct xen_memory_exchange exchange = {
+ .in = {
+ .nr_extents = 1UL << order,
@@ -18221,12 +18217,12 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+ set_xen_guest_handle(exchange.in.extent_start, in_frames);
+ set_xen_guest_handle(exchange.out.extent_start, &out_frame);
+
-+ scrub_pages(vstart, 1 << order);
++ scrub_pages((void *)vstart, 1 << order);
+
+ balloon_lock(flags);
+
+ /* 1. Zap current PTEs, remembering MFNs. */
-+ for (i = 0; i < (1UL<<order); i++) {
++ for (i = 0; i < (1U<<order); i++) {
+ in_frames[i] = pfn_to_mfn((__pa(vstart) >> PAGE_SHIFT) + i);
+ MULTI_update_va_mapping(cr_mcl + i, vstart + (i*PAGE_SIZE),
+ __pte_ma(0), 0);
@@ -18252,7 +18248,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+ &exchange.out) == 1);
+ if (!success) {
+ /* Couldn't get special memory: fall back to normal. */
-+ for (i = 0; i < (1UL<<order); i++)
++ for (i = 0; i < (1U<<order); i++)
+ in_frames[i] = (__pa(vstart)>>PAGE_SHIFT) + i;
+ if (HYPERVISOR_memory_op(XENMEM_populate_physmap,
+ &exchange.in) != (1UL<<order))
@@ -18262,7 +18258,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+#endif
+
+ /* 3. Map the new extent in place of old pages. */
-+ for (i = 0; i < (1UL<<order); i++) {
++ for (i = 0; i < (1U<<order); i++) {
+ frame = success ? (out_frame + i) : in_frames[i];
+ MULTI_update_va_mapping(cr_mcl + i, vstart + (i*PAGE_SIZE),
+ pfn_pte_ma(frame, PAGE_KERNEL), 0);
@@ -18288,9 +18284,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+void xen_destroy_contiguous_region(unsigned long vstart, unsigned int order)
+{
+ unsigned long *out_frames = discontig_frames, in_frame;
-+ unsigned long frame, i, flags;
-+ long rc;
-+ int success;
++ unsigned long frame, flags;
++ unsigned int i;
++ int rc, success;
+ struct xen_memory_exchange exchange = {
+ .in = {
+ .nr_extents = 1,
@@ -18314,7 +18310,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+ set_xen_guest_handle(exchange.in.extent_start, &in_frame);
+ set_xen_guest_handle(exchange.out.extent_start, out_frames);
+
-+ scrub_pages(vstart, 1 << order);
++ scrub_pages((void *)vstart, 1 << order);
+
+ balloon_lock(flags);
+
@@ -18324,7 +18320,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+ in_frame = pfn_to_mfn(__pa(vstart) >> PAGE_SHIFT);
+
+ /* 2. Zap current PTEs. */
-+ for (i = 0; i < (1UL<<order); i++) {
++ for (i = 0; i < (1U<<order); i++) {
+ MULTI_update_va_mapping(cr_mcl + i, vstart + (i*PAGE_SIZE),
+ __pte_ma(0), 0);
+ set_phys_to_machine((__pa(vstart)>>PAGE_SHIFT)+i,
@@ -18353,7 +18349,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+#endif
+
+ /* 4. Map new pages in place of old pages. */
-+ for (i = 0; i < (1UL<<order); i++) {
++ for (i = 0; i < (1U<<order); i++) {
+ frame = success ? out_frames[i] : (in_frame + i);
+ MULTI_update_va_mapping(cr_mcl + i, vstart + (i*PAGE_SIZE),
+ pfn_pte_ma(frame, PAGE_KERNEL), 0);
@@ -18375,18 +18371,17 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+{
+ 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;
++ unsigned int i, n, nr_mcl;
++ int rc, success;
++ DECLARE_BITMAP(limit_map, 1 << MAX_CONTIG_ORDER);
+
+ 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
@@ -18399,79 +18394,98 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+ if (unlikely(order > MAX_CONTIG_ORDER))
+ return -ENOMEM;
+
++ bitmap_zero(limit_map, 1U << order);
+ 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++ ) {
++ for (i = 0, n = 0; i < 1U<<order ; i++) {
+ page = &pages[i];
++ if (!(pfn_to_mfn(page_to_pfn(page)) >> (address_bits - PAGE_SHIFT)))
++ continue;
++ __set_bit(i, limit_map);
+
-+ if (!PageHighMem(page)) {
-+ v = page_address(page);
-+ scrub_pages(v, 1);
-+ } else {
-+ v = kmap(page);
-+ scrub_pages(v, 1);
++ if (!PageHighMem(page))
++ scrub_pages(page_address(page), 1);
++#ifdef CONFIG_XEN_SCRUB_PAGES
++ else {
++ scrub_pages(kmap(page), 1);
+ kunmap(page);
++ ++n;
+ }
++#endif
+ }
++ if (bitmap_empty(limit_map, 1U << order))
++ return 0;
+
-+ kmap_flush_unused();
++ if (n)
++ kmap_flush_unused();
+
+ balloon_lock(flags);
+
+ /* 1. Zap current PTEs (if any), remembering MFNs. */
-+ for (i = 0, nr_mcl = 0; i < (1UL<<order); i++) {
++ for (i = 0, n = 0, nr_mcl = 0; i < (1U<<order); i++) {
++ if(!test_bit(i, limit_map))
++ continue;
+ page = &pages[i];
+
-+ out_frames[i] = page_to_pfn(page);
-+ in_frames[i] = pfn_to_mfn(out_frames[i]);
++ out_frames[n] = page_to_pfn(page);
++ in_frames[n] = pfn_to_mfn(out_frames[n]);
+
+ 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);
++ set_phys_to_machine(out_frames[n], INVALID_P2M_ENTRY);
++ ++n;
+ }
-+ if (HYPERVISOR_multicall_check(cr_mcl, nr_mcl, NULL))
++ if (nr_mcl && HYPERVISOR_multicall_check(cr_mcl, nr_mcl, NULL))
+ BUG();
+
+ /* 2. Get new memory below the required limit. */
++ exchange.in.nr_extents = n;
++ exchange.out.nr_extents = n;
+ rc = HYPERVISOR_memory_op(XENMEM_exchange, &exchange);
-+ success = (exchange.nr_exchanged == (1UL << order));
++ success = (exchange.nr_exchanged == n);
+ 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))
++ &exchange.in) != n)
+ BUG();
-+ success = (HYPERVISOR_memory_op(XENMEM_populate_physmap,
-+ &exchange.out) != (1UL <<order));
++ if (HYPERVISOR_memory_op(XENMEM_populate_physmap,
++ &exchange.out) != n)
++ BUG();
++ success = 1;
+ }
+#endif
+
+ /* 3. Map the new pages in place of old pages. */
-+ for (i = 0, nr_mcl = 0; i < (1UL<<order); i++) {
++ for (i = 0, n = 0, nr_mcl = 0; i < (1U<<order); i++) {
++ if(!test_bit(i, limit_map))
++ continue;
+ page = &pages[i];
-+ unsigned long pfn = page_to_pfn(page);
+
-+ frame = success ? out_frames[i] : in_frames[i];
++ frame = success ? out_frames[n] : in_frames[n];
+
+ 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);
++ set_phys_to_machine(page_to_pfn(page), frame);
++ ++n;
++ }
++ if (nr_mcl) {
++ 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();
+ }
-+ 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);
+
@@ -18488,9 +18502,44 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.pat
+ mach_lp, (u64)entry_a | ((u64)entry_b<<32));
+}
+#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-11-14 15:35:27.000000000 -0800
++
++#define MAX_BATCHED_FULL_PTES 32
++
++int xen_change_pte_range(struct mm_struct *mm, pmd_t *pmd,
++ unsigned long addr, unsigned long end, pgprot_t newprot)
++{
++ int rc = 0, i = 0;
++ mmu_update_t u[MAX_BATCHED_FULL_PTES];
++ pte_t *pte;
++ spinlock_t *ptl;
++
++ if (!xen_feature(XENFEAT_mmu_pt_update_preserve_ad))
++ return 0;
++
++ pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
++ do {
++ if (pte_present(*pte)) {
++ u[i].ptr = (__pmd_val(*pmd) & PHYSICAL_PAGE_MASK)
++ | ((unsigned long)pte & ~PAGE_MASK)
++ | MMU_PT_UPDATE_PRESERVE_AD;
++ u[i].val = __pte_val(pte_modify(*pte, newprot));
++ if (++i == MAX_BATCHED_FULL_PTES) {
++ if ((rc = HYPERVISOR_mmu_update(
++ &u[0], i, NULL, DOMID_SELF)) != 0)
++ break;
++ i = 0;
++ }
++ }
++ } while (pte++, addr += PAGE_SIZE, addr != end);
++ if (i)
++ rc = HYPERVISOR_mmu_update( &u[0], i, NULL, DOMID_SELF);
++ pte_unmap_unlock(pte - 1, ptl);
++ BUG_ON(rc && rc != -ENOSYS);
++ return !rc;
++}
+diff -rpuN linux-2.6.18.8/arch/i386/mm/init-xen.c linux-2.6.18-xen-3.2.0/arch/i386/mm/init-xen.c
+--- linux-2.6.18.8/arch/i386/mm/init-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/mm/init-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,850 @@
+/*
+ * linux/arch/i386/mm/init.c
@@ -19342,9 +19391,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/init-xen.c tmp-linux-2.6-xen.patch
+}
+#endif
+
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/mm/ioremap-xen.c linux-2.6.18-xen-3.2.0/arch/i386/mm/ioremap-xen.c
+--- linux-2.6.18.8/arch/i386/mm/ioremap-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/mm/ioremap-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,443 @@
+/*
+ * arch/i386/mm/ioremap.c
@@ -19789,9 +19838,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/ioremap-xen.c tmp-linux-2.6-xen.pa
+ --nrpages;
+ }
+}
-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-11-16 16:18:12.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/mm/pageattr.c linux-2.6.18-xen-3.2.0/arch/i386/mm/pageattr.c
+--- linux-2.6.18.8/arch/i386/mm/pageattr.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/mm/pageattr.c 2008-02-15 16:21:49.000000000 -0800
@@ -84,7 +84,7 @@ static void set_pmd_pte(pte_t *kpte, uns
unsigned long flags;
@@ -19801,10 +19850,10 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pageattr.c tmp-linux-2.6-xen.patch
return;
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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,727 @@
+diff -rpuN linux-2.6.18.8/arch/i386/mm/pgtable-xen.c linux-2.6.18-xen-3.2.0/arch/i386/mm/pgtable-xen.c
+--- linux-2.6.18.8/arch/i386/mm/pgtable-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/mm/pgtable-xen.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,725 @@
+/*
+ * linux/arch/i386/mm/pgtable.c
+ */
@@ -19881,87 +19930,6 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pgtable-xen.c tmp-linux-2.6-xen.pa
+}
+
+/*
-+ * Associate a virtual page frame with a given physical page frame
-+ * and protection flags for that frame.
-+ */
-+static void set_pte_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags)
-+{
-+ pgd_t *pgd;
-+ pud_t *pud;
-+ pmd_t *pmd;
-+ pte_t *pte;
-+
-+ pgd = swapper_pg_dir + pgd_index(vaddr);
-+ if (pgd_none(*pgd)) {
-+ BUG();
-+ return;
-+ }
-+ pud = pud_offset(pgd, vaddr);
-+ if (pud_none(*pud)) {
-+ BUG();
-+ return;
-+ }
-+ pmd = pmd_offset(pud, vaddr);
-+ if (pmd_none(*pmd)) {
-+ BUG();
-+ return;
-+ }
-+ pte = pte_offset_kernel(pmd, vaddr);
-+ if (pgprot_val(flags))
-+ /* <pfn,flags> stored as-is, to permit clearing entries */
-+ set_pte(pte, pfn_pte(pfn, flags));
-+ else
-+ pte_clear(&init_mm, vaddr, pte);
-+
-+ /*
-+ * It's enough to flush this one mapping.
-+ * (PGE mappings get flushed as well)
-+ */
-+ __flush_tlb_one(vaddr);
-+}
-+
-+/*
-+ * Associate a virtual page frame with a given physical page frame
-+ * and protection flags for that frame.
-+ */
-+static void set_pte_pfn_ma(unsigned long vaddr, unsigned long pfn,
-+ pgprot_t flags)
-+{
-+ pgd_t *pgd;
-+ pud_t *pud;
-+ pmd_t *pmd;
-+ pte_t *pte;
-+
-+ pgd = swapper_pg_dir + pgd_index(vaddr);
-+ if (pgd_none(*pgd)) {
-+ BUG();
-+ return;
-+ }
-+ pud = pud_offset(pgd, vaddr);
-+ if (pud_none(*pud)) {
-+ BUG();
-+ return;
-+ }
-+ pmd = pmd_offset(pud, vaddr);
-+ if (pmd_none(*pmd)) {
-+ BUG();
-+ return;
-+ }
-+ pte = pte_offset_kernel(pmd, vaddr);
-+ if (pgprot_val(flags))
-+ /* <pfn,flags> stored as-is, to permit clearing entries */
-+ set_pte(pte, pfn_pte_ma(pfn, flags));
-+ else
-+ pte_clear(&init_mm, vaddr, pte);
-+
-+ /*
-+ * It's enough to flush this one mapping.
-+ * (PGE mappings get flushed as well)
-+ */
-+ __flush_tlb_one(vaddr);
-+}
-+
-+/*
+ * Associate a large virtual page frame with a given physical page frame
+ * and protection flags for that frame. pfn is for the base of the page,
+ * vaddr is what the page gets mapped to - both must be properly aligned.
@@ -20011,6 +19979,7 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pgtable-xen.c tmp-linux-2.6-xen.pa
+void __set_fixmap (enum fixed_addresses idx, maddr_t phys, pgprot_t flags)
+{
+ unsigned long address = __fix_to_virt(idx);
++ pte_t pte;
+
+ if (idx >= __end_of_fixed_addresses) {
+ BUG();
@@ -20018,16 +19987,16 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pgtable-xen.c tmp-linux-2.6-xen.pa
+ }
+ switch (idx) {
+ case FIX_WP_TEST:
-+#ifdef CONFIG_X86_F00F_BUG
-+ case FIX_F00F_IDT:
-+#endif
+ case FIX_VDSO:
-+ set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
++ pte = pfn_pte(phys >> PAGE_SHIFT, flags);
+ break;
+ default:
-+ set_pte_pfn_ma(address, phys >> PAGE_SHIFT, flags);
++ pte = pfn_pte_ma(phys >> PAGE_SHIFT, flags);
+ break;
+ }
++ if (HYPERVISOR_update_va_mapping(address, pte,
++ UVMF_INVLPG|UVMF_ALL))
++ BUG();
+ nr_fixmaps++;
+}
+
@@ -20381,10 +20350,71 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pgtable-xen.c tmp-linux-2.6-xen.pa
+ }
+}
+
-+static inline void pgd_walk_set_prot(struct page *page, pgprot_t flags)
++static void _pin_lock(struct mm_struct *mm, int lock) {
++ if (lock)
++ spin_lock(&mm->page_table_lock);
++#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
++ /* While mm->page_table_lock protects us against insertions and
++ * removals of higher level page table pages, it doesn't protect
++ * against updates of pte-s. Such updates, however, require the
++ * pte pages to be in consistent state (unpinned+writable or
++ * pinned+readonly). The pinning and attribute changes, however
++ * cannot be done atomically, which is why such updates must be
++ * prevented from happening concurrently.
++ * Note that no pte lock can ever elsewhere be acquired nesting
++ * with an already acquired one in the same mm, or with the mm's
++ * page_table_lock already acquired, as that would break in the
++ * non-split case (where all these are actually resolving to the
++ * one page_table_lock). Thus acquiring all of them here is not
++ * going to result in dead locks, and the order of acquires
++ * doesn't matter.
++ */
++ {
++ pgd_t *pgd = mm->pgd;
++ unsigned g;
++
++ for (g = 0; g < USER_PTRS_PER_PGD; g++, pgd++) {
++ pud_t *pud;
++ unsigned u;
++
++ if (pgd_none(*pgd))
++ continue;
++ pud = pud_offset(pgd, 0);
++ for (u = 0; u < PTRS_PER_PUD; u++, pud++) {
++ pmd_t *pmd;
++ unsigned m;
++
++ if (pud_none(*pud))
++ continue;
++ pmd = pmd_offset(pud, 0);
++ for (m = 0; m < PTRS_PER_PMD; m++, pmd++) {
++ spinlock_t *ptl;
++
++ if (pmd_none(*pmd))
++ continue;
++ ptl = pte_lockptr(0, pmd);
++ if (lock)
++ spin_lock(ptl);
++ else
++ spin_unlock(ptl);
++ }
++ }
++ }
++ }
++#endif
++ if (!lock)
++ spin_unlock(&mm->page_table_lock);
++}
++#define pin_lock(mm) _pin_lock(mm, 1)
++#define pin_unlock(mm) _pin_lock(mm, 0)
++
++#define PIN_BATCH 4
++static DEFINE_PER_CPU(multicall_entry_t[PIN_BATCH], pb_mcl);
++
++static inline unsigned int pgd_walk_set_prot(struct page *page, pgprot_t flags,
++ unsigned int cpu, unsigned seq)
+{
+ unsigned long pfn = page_to_pfn(page);
-+ int rc;
+
+ if (PageHighMem(page)) {
+ if (pgprot_val(flags) & _PAGE_RW)
@@ -20392,12 +20422,18 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pgtable-xen.c tmp-linux-2.6-xen.pa
+ else
+ set_bit(PG_pinned, &page->flags);
+ } else {
-+ rc = HYPERVISOR_update_va_mapping(
-+ (unsigned long)__va(pfn << PAGE_SHIFT),
-+ pfn_pte(pfn, flags), 0);
-+ if (rc)
-+ BUG();
++ MULTI_update_va_mapping(per_cpu(pb_mcl, cpu) + seq,
++ (unsigned long)__va(pfn << PAGE_SHIFT),
++ pfn_pte(pfn, flags), 0);
++ if (unlikely(++seq == PIN_BATCH)) {
++ if (unlikely(HYPERVISOR_multicall_check(per_cpu(pb_mcl, cpu),
++ PIN_BATCH, NULL)))
++ BUG();
++ seq = 0;
++ }
+ }
++
++ return seq;
+}
+
+static void pgd_walk(pgd_t *pgd_base, pgprot_t flags)
@@ -20405,37 +20441,48 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pgtable-xen.c tmp-linux-2.6-xen.pa
+ pgd_t *pgd = pgd_base;
+ pud_t *pud;
+ pmd_t *pmd;
-+ int g, u, m, rc;
++ int g, u, m;
++ unsigned int cpu, seq;
+
+ if (xen_feature(XENFEAT_auto_translated_physmap))
+ return;
+
-+ for (g = 0; g < USER_PTRS_PER_PGD; g++, pgd++) {
++ cpu = get_cpu();
++
++ for (g = 0, seq = 0; g < USER_PTRS_PER_PGD; g++, pgd++) {
+ if (pgd_none(*pgd))
+ continue;
+ pud = pud_offset(pgd, 0);
+ if (PTRS_PER_PUD > 1) /* not folded */
-+ pgd_walk_set_prot(virt_to_page(pud),flags);
++ seq = pgd_walk_set_prot(virt_to_page(pud),flags,cpu,seq);
+ for (u = 0; u < PTRS_PER_PUD; u++, pud++) {
+ if (pud_none(*pud))
+ continue;
+ pmd = pmd_offset(pud, 0);
+ if (PTRS_PER_PMD > 1) /* not folded */
-+ pgd_walk_set_prot(virt_to_page(pmd),flags);
++ seq = pgd_walk_set_prot(virt_to_page(pmd),flags,cpu,seq);
+ for (m = 0; m < PTRS_PER_PMD; m++, pmd++) {
+ if (pmd_none(*pmd))
+ continue;
-+ pgd_walk_set_prot(pmd_page(*pmd),flags);
++ seq = pgd_walk_set_prot(pmd_page(*pmd),flags,cpu,seq);
+ }
+ }
+ }
+
-+ rc = HYPERVISOR_update_va_mapping(
-+ (unsigned long)pgd_base,
-+ pfn_pte(virt_to_phys(pgd_base)>>PAGE_SHIFT, flags),
-+ UVMF_TLB_FLUSH);
-+ if (rc)
++ if (likely(seq != 0)) {
++ MULTI_update_va_mapping(per_cpu(pb_mcl, cpu) + seq,
++ (unsigned long)pgd_base,
++ pfn_pte(virt_to_phys(pgd_base)>>PAGE_SHIFT, flags),
++ UVMF_TLB_FLUSH);
++ if (unlikely(HYPERVISOR_multicall_check(per_cpu(pb_mcl, cpu),
++ seq + 1, NULL)))
++ BUG();
++ } else if(HYPERVISOR_update_va_mapping((unsigned long)pgd_base,
++ pfn_pte(virt_to_phys(pgd_base)>>PAGE_SHIFT, flags),
++ UVMF_TLB_FLUSH))
+ BUG();
++
++ put_cpu();
+}
+
+static void __pgd_pin(pgd_t *pgd)
@@ -20463,18 +20510,18 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pgtable-xen.c tmp-linux-2.6-xen.pa
+{
+ if (xen_feature(XENFEAT_writable_page_tables))
+ return;
-+ spin_lock(&mm->page_table_lock);
++ pin_lock(mm);
+ __pgd_pin(mm->pgd);
-+ spin_unlock(&mm->page_table_lock);
++ pin_unlock(mm);
+}
+
+void mm_unpin(struct mm_struct *mm)
+{
+ if (xen_feature(XENFEAT_writable_page_tables))
+ return;
-+ spin_lock(&mm->page_table_lock);
++ pin_lock(mm);
+ __pgd_unpin(mm->pgd);
-+ spin_unlock(&mm->page_table_lock);
++ pin_unlock(mm);
+}
+
+void mm_pin_all(void)
@@ -20532,9 +20579,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pgtable-xen.c tmp-linux-2.6-xen.pa
+ !mm->context.has_foreign_mappings)
+ mm_unpin(mm);
+}
-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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/mm/pgtable.c linux-2.6.18-xen-3.2.0/arch/i386/mm/pgtable.c
+--- linux-2.6.18.8/arch/i386/mm/pgtable.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/mm/pgtable.c 2008-02-15 16:21:49.000000000 -0800
@@ -12,6 +12,7 @@
#include <linux/slab.h>
#include <linux/pagemap.h>
@@ -20640,9 +20687,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/mm/pgtable.c tmp-linux-2.6-xen.patch/
/* in the non-PAE case, free_pgtables() clears user pgd entries */
kmem_cache_free(pgd_cache, pgd);
}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/oprofile/Makefile linux-2.6.18-xen-3.2.0/arch/i386/oprofile/Makefile
+--- linux-2.6.18.8/arch/i386/oprofile/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/oprofile/Makefile 2008-02-15 16:21:49.000000000 -0800
@@ -6,7 +6,14 @@ DRIVER_OBJS = $(addprefix ../../../drive
oprofilefs.o oprofile_stats.o \
timer_int.o )
@@ -20658,9 +20705,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/oprofile/Makefile tmp-linux-2.6-xen.p
op_model_ppro.o op_model_p4.o
oprofile-$(CONFIG_X86_IO_APIC) += nmi_timer_int.o
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/oprofile/xenoprof.c linux-2.6.18-xen-3.2.0/arch/i386/oprofile/xenoprof.c
+--- linux-2.6.18.8/arch/i386/oprofile/xenoprof.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/oprofile/xenoprof.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,179 @@
+/**
+ * @file xenoprof.c
@@ -20716,8 +20763,8 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/oprofile/xenoprof.c tmp-linux-2.6-xen
+ counter.kernel = (uint32_t)counter_config[i].kernel;
+ counter.user = (uint32_t)counter_config[i].user;
+ counter.unit_mask = (uint64_t)counter_config[i].unit_mask;
-+ HYPERVISOR_xenoprof_op(XENOPROF_counter,
-+ &counter);
++ WARN_ON(HYPERVISOR_xenoprof_op(XENOPROF_counter,
++ &counter));
+ }
+}
+
@@ -20841,9 +20888,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/oprofile/xenoprof.c tmp-linux-2.6-xen
+{
+ xenoprofile_exit();
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/pci/Makefile linux-2.6.18-xen-3.2.0/arch/i386/pci/Makefile
+--- linux-2.6.18.8/arch/i386/pci/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/pci/Makefile 2008-02-15 16:21:49.000000000 -0800
@@ -4,6 +4,10 @@ obj-$(CONFIG_PCI_BIOS) += pcbios.o
obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o
obj-$(CONFIG_PCI_DIRECT) += direct.o
@@ -20855,18 +20902,9 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/pci/Makefile tmp-linux-2.6-xen.patch/
pci-y := fixup.o
pci-$(CONFIG_ACPI) += acpi.o
pci-y += legacy.o irq.o
-@@ -12,3 +16,8 @@ pci-$(CONFIG_X86_VISWS) := visws.o fixu
- pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o
-
- obj-y += $(pci-y) common.o
-+
-+ifdef CONFIG_XEN
-+include $(srctree)/scripts/Makefile.xen
-+obj-y := $(call cherrypickxen, $(obj-y))
-+endif
-diff -Nurp 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/pci/irq-xen.c linux-2.6.18-xen-3.2.0/arch/i386/pci/irq-xen.c
+--- linux-2.6.18.8/arch/i386/pci/irq-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/pci/irq-xen.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,1205 @@
+/*
+ * Low-Level PCI Support for PC -- Routing of Interrupts
@@ -22073,9 +22111,25 @@ diff -Nurp pristine-linux-2.6.18/arch/i386/pci/irq-xen.c tmp-linux-2.6-xen.patch
+
+ return count;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/pci/irq.c linux-2.6.18-xen-3.2.0/arch/i386/pci/irq.c
+--- linux-2.6.18.8/arch/i386/pci/irq.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/pci/irq.c 2008-02-15 16:21:49.000000000 -0800
+@@ -543,6 +543,12 @@ static __init int intel_router_probe(str
+ case PCI_DEVICE_ID_INTEL_ICH8_2:
+ case PCI_DEVICE_ID_INTEL_ICH8_3:
+ case PCI_DEVICE_ID_INTEL_ICH8_4:
++ case PCI_DEVICE_ID_INTEL_ICH9_0:
++ case PCI_DEVICE_ID_INTEL_ICH9_1:
++ case PCI_DEVICE_ID_INTEL_ICH9_2:
++ case PCI_DEVICE_ID_INTEL_ICH9_3:
++ case PCI_DEVICE_ID_INTEL_ICH9_4:
++ case PCI_DEVICE_ID_INTEL_ICH9_5:
+ r->name = "PIIX/ICH";
+ r->get = pirq_piix_get;
+ r->set = pirq_piix_set;
+diff -rpuN linux-2.6.18.8/arch/i386/pci/pcifront.c linux-2.6.18-xen-3.2.0/arch/i386/pci/pcifront.c
+--- linux-2.6.18.8/arch/i386/pci/pcifront.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/pci/pcifront.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,55 @@
+/*
+ * PCI Frontend Stub - puts some "dummy" functions in to the Linux x86 PCI core
@@ -22132,36 +22186,47 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/i386/power/Makefile linux-2.6.18-xen-3.2.0/arch/i386/power/Makefile
+--- linux-2.6.18.8/arch/i386/power/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/power/Makefile 2008-02-15 16:21:49.000000000 -0800
@@ -1,2 +1,4 @@
-obj-$(CONFIG_PM) += cpu.o
-+obj-$(CONFIG_PM_LEGACY) += cpu.o
++obj-$(subst m,y,$(CONFIG_APM)) += cpu.o
+obj-$(CONFIG_SOFTWARE_SUSPEND) += cpu.o
+obj-$(CONFIG_ACPI_SLEEP) += cpu.o
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-11-14 15:35:27.000000000 -0800
-@@ -58,6 +58,34 @@ config GENERIC_IOMAP
+diff -rpuN linux-2.6.18.8/arch/i386/power/cpu.c linux-2.6.18-xen-3.2.0/arch/i386/power/cpu.c
+--- linux-2.6.18.8/arch/i386/power/cpu.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/i386/power/cpu.c 2008-02-15 16:21:49.000000000 -0800
+@@ -62,11 +62,12 @@ static void do_fpu_end(void)
+
+ static void fix_processor_context(void)
+ {
++#ifndef CONFIG_X86_NO_TSS
+ int cpu = smp_processor_id();
+ struct tss_struct * t = &per_cpu(init_tss, cpu);
+
+ set_tss_desc(cpu,t); /* This just modifies memory; should not be necessary. But... This is necessary, because 386 hardware has concept of busy TSS or some similar stupidity. */
+-
++#endif
+ load_TR_desc(); /* This does ltr */
+ load_LDT(&current->active_mm->context); /* This does lldt */
+
+diff -rpuN linux-2.6.18.8/arch/ia64/Kconfig linux-2.6.18-xen-3.2.0/arch/ia64/Kconfig
+--- linux-2.6.18.8/arch/ia64/Kconfig 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/Kconfig 2008-02-15 16:21:49.000000000 -0800
+@@ -58,6 +58,28 @@ config GENERIC_IOMAP
bool
default y
+config XEN
+ bool "Xen hypervisor support"
+ default y
++ select XEN_XENCOMM
+ help
+ Enable Xen hypervisor support. Resulting kernel runs
+ both as a guest OS on Xen and natively on hardware.
+
-+config XEN_IA64_VDSO_PARAVIRT
-+ bool
-+ depends on XEN && !ITANIUM
-+ default y
-+ help
-+ vDSO paravirtualization
-+
+config XEN_IA64_EXPOSE_P2M
+ bool "Xen/IA64 exposure p2m table"
+ depends on XEN
@@ -22179,7 +22244,48 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/Kconfig tmp-linux-2.6-xen.patch/arch/
config SCHED_NO_NO_OMIT_FRAME_POINTER
bool
default y
-@@ -465,6 +493,21 @@ config PCI_DOMAINS
+@@ -133,6 +155,10 @@ config IA64_SGI_SN2
+ config IA64_HP_SIM
+ bool "Ski-simulator"
+
++config IA64_XEN
++ bool "Xen guest"
++ depends on XEN
++
+ endchoice
+
+ choice
+@@ -431,6 +457,29 @@ config SGI_SN
+
+ source "drivers/sn/Kconfig"
+
++config KEXEC
++ bool "kexec system call (EXPERIMENTAL)"
++ depends on EXPERIMENTAL && !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)
++ help
++ kexec is a system call that implements the ability to shutdown your
++ current kernel, and to start another kernel. It is like a reboot
++ but it is indepedent of the system firmware. And like a reboot
++ you can start any kernel with it, not just Linux.
++
++ The name comes from the similiarity to the exec system call.
++
++ It is an ongoing process to be certain the hardware in a machine
++ is properly shutdown, so do not be surprised if this code does not
++ initially work for you. It may help to enable device hotplugging
++ support. As of this writing the exact hardware interface is
++ strongly in flux, so no good recommendation can be made.
++
++config CRASH_DUMP
++ bool "kernel crash dumps (EXPERIMENTAL)"
++ depends on EXPERIMENTAL && IA64_MCA_RECOVERY && !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)
++ help
++ Generate crash dump after being started by kexec.
++
+ source "drivers/firmware/Kconfig"
+
+ source "fs/Kconfig.binfmt"
+@@ -465,6 +514,21 @@ config PCI_DOMAINS
bool
default PCI
@@ -22201,7 +22307,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/Kconfig tmp-linux-2.6-xen.patch/arch/
source "drivers/pci/pcie/Kconfig"
source "drivers/pci/Kconfig"
-@@ -528,3 +571,13 @@ source "arch/ia64/Kconfig.debug"
+@@ -528,3 +592,16 @@ source "arch/ia64/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
@@ -22212,12 +22318,15 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/Kconfig tmp-linux-2.6-xen.patch/arch/
+if XEN
+config XEN_SMPBOOT
+ default n
++
++config XEN_DEVMEM
++ default n
+endif
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/Makefile linux-2.6.18-xen-3.2.0/arch/ia64/Makefile
+--- linux-2.6.18.8/arch/ia64/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/Makefile 2008-02-15 16:21:49.000000000 -0800
@@ -45,6 +45,12 @@ ifeq ($(call cc-version),0304)
endif
@@ -22231,23 +22340,17 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/Makefile tmp-linux-2.6-xen.patch/arch
head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
libs-y += arch/ia64/lib/
-@@ -55,9 +61,15 @@ core-$(CONFIG_IA64_GENERIC) += arch/ia6
+@@ -54,7 +60,9 @@ core-$(CONFIG_IA64_DIG) += arch/ia64/di
+ core-$(CONFIG_IA64_GENERIC) += arch/ia64/dig/
core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/
core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
++core-$(CONFIG_IA64_XEN) += arch/ia64/dig/
core-$(CONFIG_IA64_SGI_SN2) += arch/ia64/sn/
+core-$(CONFIG_XEN) += arch/ia64/xen/
drivers-$(CONFIG_PCI) += arch/ia64/pci/
-+ifneq ($(CONFIG_XEN),y)
drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/
-+endif
-+ifneq ($(CONFIG_IA64_GENERIC),y)
-+drivers-$(CONFIG_XEN) += arch/ia64/hp/sim/
-+endif
- drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
- drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
- drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ arch/ia64/sn/
-@@ -87,8 +99,8 @@ CLEAN_FILES += vmlinux.gz bootloader
+@@ -87,8 +95,8 @@ CLEAN_FILES += vmlinux.gz bootloader
boot: lib/lib.a vmlinux
$(Q)$(MAKE) $(build)=$(boot) $@
@@ -22258,41 +22361,446 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/Makefile tmp-linux-2.6-xen.patch/arch
define archhelp
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-11-14 15:35:27.000000000 -0800
-@@ -24,6 +24,8 @@
- #include <asm/machvec.h>
- #include <asm/system.h>
+diff -rpuN linux-2.6.18.8/arch/ia64/hp/common/sba_iommu.c linux-2.6.18-xen-3.2.0/arch/ia64/hp/common/sba_iommu.c
+--- linux-2.6.18.8/arch/ia64/hp/common/sba_iommu.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/hp/common/sba_iommu.c 2008-02-15 16:21:49.000000000 -0800
+@@ -42,6 +42,11 @@
+ #include <asm/system.h> /* wmb() */
+
+ #include <asm/acpi-ext.h>
++#include <asm/maddr.h> /* range_straddles_page_boundary() */
++#ifdef CONFIG_XEN
++#include <xen/gnttab.h>
++#include <asm/gnttab_dma.h>
++#endif
-+#include <xen/xencons.h>
-+
- void __init
- dig_setup (char **cmdline_p)
+ #define PFX "IOC: "
+
+@@ -198,6 +203,9 @@ struct ioc {
+ void __iomem *ioc_hpa; /* I/O MMU base address */
+ char *res_map; /* resource map, bit == pdir entry */
+ u64 *pdir_base; /* physical base address */
++#ifdef CONFIG_XEN
++ u64 *xen_virt_cache;
++#endif
+ unsigned long ibase; /* pdir IOV Space base */
+ unsigned long imask; /* pdir IOV Space mask */
+
+@@ -762,14 +770,21 @@ sba_free_range(struct ioc *ioc, dma_addr
+ * on the vba.
+ */
+
+-#if 1
+-#define sba_io_pdir_entry(pdir_ptr, vba) *pdir_ptr = ((vba & ~0xE000000000000FFFULL) \
+- | 0x8000000000000000ULL)
++#ifndef CONFIG_XEN
++#define sba_io_pdir_entry(ioc, pdir_ptr, vba) *pdir_ptr = \
++ ((virt_to_bus((void *)vba) & ~0xFFFULL) | 0x8000000000000000ULL)
+ #else
+ void SBA_INLINE
+-sba_io_pdir_entry(u64 *pdir_ptr, unsigned long vba)
++sba_io_pdir_entry(struct ioc *ioc, u64 *pdir_ptr, unsigned long vba)
{
-@@ -67,4 +69,19 @@ dig_setup (char **cmdline_p)
- screen_info.orig_video_mode = 3; /* XXX fake */
- screen_info.orig_video_isVGA = 1; /* XXX fake */
- screen_info.orig_video_ega_bx = 3; /* XXX fake */
+- *pdir_ptr = ((vba & ~0xE000000000000FFFULL) | 0x80000000000000FFULL);
++ *pdir_ptr = ((virt_to_bus((void *)vba) & ~0xFFFULL) |
++ 0x80000000000000FFULL);
+#ifdef CONFIG_XEN
-+ if (!is_running_on_xen() || !is_initial_xendomain())
++ if (is_running_on_xen()) {
++ int pide = ((u64)pdir_ptr - (u64)ioc->pdir_base) >> 3;
++ ioc->xen_virt_cache[pide] = vba;
++ }
++#endif
+ }
+ #endif
+
+@@ -784,6 +799,12 @@ mark_clean (void *addr, size_t size)
+ {
+ unsigned long pg_addr, end;
+
++#ifdef CONFIG_XEN
++ /* XXX: Bad things happen starting domUs when this is enabled. */
++ if (is_running_on_xen())
+ return;
++#endif
+
-+ if (xen_start_info->console.dom0.info_size >=
-+ sizeof(struct dom0_vga_console_info)) {
-+ const struct dom0_vga_console_info *info =
-+ (struct dom0_vga_console_info *)(
-+ (char *)xen_start_info +
-+ xen_start_info->console.dom0.info_off);
-+ dom0_init_screen_info(info);
+ pg_addr = PAGE_ALIGN((unsigned long) addr);
+ end = (unsigned long) addr + size;
+ while (pg_addr + PAGE_SIZE <= end) {
+@@ -850,6 +871,10 @@ sba_mark_invalid(struct ioc *ioc, dma_ad
+ */
+ ioc->pdir_base[off] = (0x80000000000000FFULL | prefetch_spill_page);
+ #endif
++#ifdef CONFIG_XEN
++ if (is_running_on_xen())
++ ioc->xen_virt_cache[off] = 0UL;
++#endif
+ } else {
+ u32 t = get_iovp_order(byte_cnt) + iovp_shift;
+
+@@ -865,6 +890,10 @@ sba_mark_invalid(struct ioc *ioc, dma_ad
+ #else
+ ioc->pdir_base[off] = (0x80000000000000FFULL | prefetch_spill_page);
+ #endif
++#ifdef CONFIG_XEN
++ if (is_running_on_xen())
++ ioc->xen_virt_cache[off] = 0UL;
++#endif
+ off++;
+ byte_cnt -= iovp_size;
+ } while (byte_cnt > 0);
+@@ -894,15 +923,29 @@ sba_map_single(struct device *dev, void
+ unsigned long flags;
+ #endif
+ #ifdef ALLOW_IOV_BYPASS
+- unsigned long pci_addr = virt_to_phys(addr);
++ unsigned long pci_addr;
++#endif
++
++#ifdef CONFIG_XEN
++ if (is_running_on_xen()) {
++ void* tmp_addr = addr;
++ size_t tmp_size = size;
++ do {
++ gnttab_dma_use_page(virt_to_page(tmp_addr));
++ tmp_addr += PAGE_SIZE;
++ tmp_size -= min(tmp_size, PAGE_SIZE);
++ } while (tmp_size);
+ }
-+ xen_start_info->console.domU.mfn = 0;
-+ xen_start_info->console.domU.evtchn = 0;
+ #endif
+
+ #ifdef ALLOW_IOV_BYPASS
++ pci_addr = virt_to_bus(addr);
+ ASSERT(to_pci_dev(dev)->dma_mask);
+ /*
+ ** Check if the PCI device can DMA to ptr... if so, just return ptr
+ */
+- if (likely((pci_addr & ~to_pci_dev(dev)->dma_mask) == 0)) {
++ if (likely((pci_addr & ~to_pci_dev(dev)->dma_mask) == 0 &&
++ !range_straddles_page_boundary(__pa(addr), size))) {
+ /*
+ ** Device is bit capable of DMA'ing to the buffer...
+ ** just return the PCI address of ptr
+@@ -944,7 +987,7 @@ sba_map_single(struct device *dev, void
+
+ while (size > 0) {
+ ASSERT(((u8 *)pdir_start)[7] == 0); /* verify availability */
+- sba_io_pdir_entry(pdir_start, (unsigned long) addr);
++ sba_io_pdir_entry(ioc, pdir_start, (unsigned long) addr);
+
+ DBG_RUN(" pdir 0x%p %lx\n", pdir_start, *pdir_start);
+
+@@ -973,13 +1016,29 @@ sba_mark_clean(struct ioc *ioc, dma_addr
+ void *addr;
+
+ if (size <= iovp_size) {
+- addr = phys_to_virt(ioc->pdir_base[off] &
+- ~0xE000000000000FFFULL);
++#ifdef CONFIG_XEN
++ if (is_running_on_xen())
++ addr = (void *)ioc->xen_virt_cache[off];
++ else
++ addr = bus_to_virt(ioc->pdir_base[off] &
++ ~0xE000000000000FFFULL);
++#else
++ addr = bus_to_virt(ioc->pdir_base[off] &
++ ~0xE000000000000FFFULL);
++#endif
+ mark_clean(addr, size);
+ } else {
+ do {
+- addr = phys_to_virt(ioc->pdir_base[off] &
+- ~0xE000000000000FFFULL);
++#ifdef CONFIG_XEN
++ if (is_running_on_xen())
++ addr = (void *)ioc->xen_virt_cache[off];
++ else
++ addr = bus_to_virt(ioc->pdir_base[off] &
++ ~0xE000000000000FFFULL);
++#else
++ addr = bus_to_virt(ioc->pdir_base[off] &
++ ~0xE000000000000FFFULL);
++#endif
+ mark_clean(addr, min(size, iovp_size));
+ off++;
+ size -= iovp_size;
+@@ -988,6 +1047,34 @@ sba_mark_clean(struct ioc *ioc, dma_addr
+ }
+ #endif
+
++#ifdef CONFIG_XEN
++static void
++sba_gnttab_dma_unmap_page(struct ioc *ioc, dma_addr_t iova, size_t size)
++{
++ u32 iovp = (u32) SBA_IOVP(ioc,iova);
++ int off = PDIR_INDEX(iovp);
++ struct page *page;
++
++ if (size <= iovp_size) {
++ BUG_ON(!ioc->xen_virt_cache[off]);
++ page = virt_to_page(ioc->xen_virt_cache[off]);
++ __gnttab_dma_unmap_page(page);
++ } else {
++ struct page *last_page = (struct page *)~0UL;
++ do {
++ BUG_ON(!ioc->xen_virt_cache[off]);
++ page = virt_to_page(ioc->xen_virt_cache[off]);
++ if (page != last_page) {
++ __gnttab_dma_unmap_page(page);
++ last_page = page;
++ }
++ off++;
++ size -= iovp_size;
++ } while (size > 0);
++ }
++}
++#endif
++
+ /**
+ * sba_unmap_single - unmap one IOVA and free resources
+ * @dev: instance of PCI owned by the driver that's asking.
+@@ -1018,7 +1105,16 @@ void sba_unmap_single(struct device *dev
+
+ #ifdef ENABLE_MARK_CLEAN
+ if (dir == DMA_FROM_DEVICE) {
+- mark_clean(phys_to_virt(iova), size);
++ mark_clean(bus_to_virt(iova), size);
++ }
++#endif
++#ifdef CONFIG_XEN
++ if (is_running_on_xen()) {
++ do {
++ gnttab_dma_unmap_page(iova);
++ iova += PAGE_SIZE;
++ size -= min(size,PAGE_SIZE);
++ } while (size);
+ }
+ #endif
+ return;
+@@ -1037,6 +1133,10 @@ void sba_unmap_single(struct device *dev
+ if (dir == DMA_FROM_DEVICE)
+ sba_mark_clean(ioc, iova, size);
+ #endif
++#ifdef CONFIG_XEN
++ if (is_running_on_xen())
++ sba_gnttab_dma_unmap_page(ioc, iova, size);
++#endif
+
+ #if DELAYED_RESOURCE_CNT > 0
+ spin_lock_irqsave(&ioc->saved_lock, flags);
+@@ -1102,9 +1202,14 @@ sba_alloc_coherent (struct device *dev,
+ return NULL;
+
+ memset(addr, 0, size);
+- *dma_handle = virt_to_phys(addr);
+
+ #ifdef ALLOW_IOV_BYPASS
++#ifdef CONFIG_XEN
++ if (xen_create_contiguous_region((unsigned long)addr, get_order(size),
++ fls64(dev->coherent_dma_mask)))
++ goto iommu_map;
+#endif
++ *dma_handle = virt_to_bus(addr);
+ ASSERT(dev->coherent_dma_mask);
+ /*
+ ** Check if the PCI device can DMA to ptr... if so, just return ptr
+@@ -1115,6 +1220,9 @@ sba_alloc_coherent (struct device *dev,
+
+ return addr;
+ }
++#ifdef CONFIG_XEN
++iommu_map:
++#endif
+ #endif
+
+ /*
+@@ -1138,6 +1246,13 @@ sba_alloc_coherent (struct device *dev,
+ */
+ void sba_free_coherent (struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle)
+ {
++#if defined(ALLOW_IOV_BYPASS) && defined(CONFIG_XEN)
++ struct ioc *ioc = GET_IOC(dev);
++
++ if (likely((dma_handle & ioc->imask) != ioc->ibase))
++ xen_destroy_contiguous_region((unsigned long)vaddr,
++ get_order(size));
++#endif
+ sba_unmap_single(dev, dma_handle, size, 0);
+ free_pages((unsigned long) vaddr, get_order(size));
}
-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-11-14 15:35:27.000000000 -0800
+@@ -1219,7 +1334,7 @@ sba_fill_pdir(
+ dma_offset=0; /* only want offset on first chunk */
+ cnt = ROUNDUP(cnt, iovp_size);
+ do {
+- sba_io_pdir_entry(pdirp, vaddr);
++ sba_io_pdir_entry(ioc, pdirp, vaddr);
+ vaddr += iovp_size;
+ cnt -= iovp_size;
+ pdirp++;
+@@ -1406,7 +1521,11 @@ int sba_map_sg(struct device *dev, struc
+ if (likely((ioc->dma_mask & ~to_pci_dev(dev)->dma_mask) == 0)) {
+ for (sg = sglist ; filled < nents ; filled++, sg++){
+ sg->dma_length = sg->length;
+- sg->dma_address = virt_to_phys(sba_sg_address(sg));
++#ifdef CONFIG_XEN
++ sg->dma_address = gnttab_dma_map_page(sg->page) + sg->offset;
++#else
++ sg->dma_address = virt_to_bus(sba_sg_address(sg));
++#endif
+ }
+ return filled;
+ }
+@@ -1430,6 +1549,15 @@ int sba_map_sg(struct device *dev, struc
+
+ prefetch(ioc->res_hint);
+
++#ifdef CONFIG_XEN
++ if (is_running_on_xen()) {
++ int i;
++
++ for (i = 0; i < nents; i++)
++ gnttab_dma_use_page(sglist[i].page);
++ }
++#endif
++
+ /*
+ ** First coalesce the chunks and allocate I/O pdir space
+ **
+@@ -1562,11 +1690,25 @@ ioc_iova_init(struct ioc *ioc)
+
+ memset(ioc->pdir_base, 0, ioc->pdir_size);
+
++#ifdef CONFIG_XEN
++ /* The page table needs to be pinned in Xen memory */
++ if (xen_create_contiguous_region((unsigned long)ioc->pdir_base,
++ get_order(ioc->pdir_size), 0))
++ panic(PFX "Couldn't contiguously map I/O Page Table\n");
++
++ ioc->xen_virt_cache = (void *) __get_free_pages(
++ GFP_KERNEL, get_order(ioc->pdir_size));
++ if (!ioc->xen_virt_cache)
++ panic(PFX "Couldn't allocate Xen virtual address cache\n");
++
++ memset(ioc->xen_virt_cache, 0, ioc->pdir_size);
++#endif
++
+ DBG_INIT("%s() IOV page size %ldK pdir %p size %x\n", __FUNCTION__,
+ iovp_size >> 10, ioc->pdir_base, ioc->pdir_size);
+
+ ASSERT(ALIGN((unsigned long) ioc->pdir_base, 4*1024) == (unsigned long) ioc->pdir_base);
+- WRITE_REG(virt_to_phys(ioc->pdir_base), ioc->ioc_hpa + IOC_PDIR_BASE);
++ WRITE_REG(virt_to_bus(ioc->pdir_base), ioc->ioc_hpa + IOC_PDIR_BASE);
+
+ /*
+ ** If an AGP device is present, only use half of the IOV space
+@@ -1603,7 +1745,7 @@ ioc_iova_init(struct ioc *ioc)
+ for ( ; (u64) poison_addr < addr + iovp_size; poison_addr += poison_size)
+ memcpy(poison_addr, spill_poison, poison_size);
+
+- prefetch_spill_page = virt_to_phys(addr);
++ prefetch_spill_page = virt_to_bus(addr);
+
+ DBG_INIT("%s() prefetch spill addr: 0x%lx\n", __FUNCTION__, prefetch_spill_page);
+ }
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/Makefile linux-2.6.18-xen-3.2.0/arch/ia64/kernel/Makefile
+--- linux-2.6.18.8/arch/ia64/kernel/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/Makefile 2008-02-15 16:21:49.000000000 -0800
+@@ -28,6 +28,8 @@ obj-$(CONFIG_IA64_CYCLONE) += cyclone.o
+ obj-$(CONFIG_CPU_FREQ) += cpufreq/
+ obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o
+ obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o
++obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o
++obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
+ obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o
+ obj-$(CONFIG_AUDIT) += audit.o
+ mca_recovery-y += mca_drv.o mca_drv_asm.o
+@@ -61,3 +63,61 @@ $(obj)/gate-syms.o: $(obj)/gate.lds $(ob
+ # We must build gate.so before we can assemble it.
+ # Note: kbuild does not track this dependency due to usage of .incbin
+ $(obj)/gate-data.o: $(obj)/gate.so
++
++#
++# gate page paravirtualization for xen
++#
++obj-$(CONFIG_XEN) += xengate-data.o
++
++ifeq ($(CONFIG_XEN), y)
++# The gate DSO image is built using a special linker script.
++targets += xengate.so xengate-syms.o
++endif
++
++extra-$(CONFIG_XEN) += xengate.so xengate.lds xengate.o
++
++AFLAGS_xengate.o += -D__XEN_IA64_VDSO_PARAVIRT
++$(obj)/xengate.o: $(src)/gate.S FORCE
++ $(call if_changed_dep,as_o_S)
++
++CPPFLAGS_xengate.lds := -P -C -U$(ARCH) -D__XEN_IA64_VDSO_PARAVIRT
++$(obj)/xengate.lds: $(src)/gate.lds.S
++ $(call if_changed_dep,cpp_lds_S)
++
++GATECFLAGS_xengate.so = -shared -s -Wl,-soname=linux-gate.so.1 \
++ $(call ld-option, -Wl$(comma)--hash-style=sysv)
++$(obj)/xengate.so: $(obj)/xengate.lds $(obj)/xengate.o FORCE
++ $(call if_changed,gate)
++
++ifeq ($(CONFIG_XEN), y)
++$(obj)/built-in.o: $(obj)/xengate-syms.o
++$(obj)/built-in.o: ld_flags += -R $(obj)/xengate-syms.o
++$(obj)/mca_recovery.o: $(obj)/gate-syms.o $(obj)/xengate-syms.o
++endif
++
++GATECFLAGS_xengate-syms.o = -r
++$(obj)/xengate-syms.o: $(obj)/xengate.lds $(obj)/xengate.o FORCE
++ $(call if_changed,gate)
++$(obj)/xengate-data.o: $(obj)/xengate.so
++
++#
++# .tmp_gate.o to calculate padding size for __kernel_syscall_via_epc
++#
++extra-$(CONFIG_XEN) += gate-skip.s .tmp_gate.o
++
++ifeq ($(CONFIG_XEN), y)
++AFLAGS_gate.o += -D__KERNEL_SYSCALL_VIA_EPC_PADDING
++$(obj)/gate.o: $(obj)/gate-skip.s FORCE
++endif
++
++$(obj)/.tmp_gate.o: $(src)/gate.S FORCE
++ $(call if_changed_dep,as_o_S)
++
++quiet_cmd_gate_size = GATE_SIZE $@
++ cmd_gate_size = $(NM) --extern-only --print-size $(obj)/xengate.o | \
++ $(AWK) '/__kernel_syscall_via_epc/{printf "\t.skip 0x"$$2" - "}' > $@; \
++ $(NM) --extern-only --print-size $(obj)/.tmp_gate.o | \
++ $(AWK) '/__kernel_syscall_via_epc/{printf "0x"$$2"\n"}' >> $@
++
++$(obj)/gate-skip.s: $(obj)/xengate.o $(obj)/.tmp_gate.o FORCE
++ $(call if_changed,gate_size)
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/acpi.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/acpi.c
+--- linux-2.6.18.8/arch/ia64/kernel/acpi.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/acpi.c 2008-02-15 16:21:49.000000000 -0800
+@@ -109,6 +109,10 @@ const char *acpi_get_sysname(void)
+ return "hpzx1";
+ } else if (!strcmp(hdr->oem_id, "SGI")) {
+ return "sn2";
++#ifdef CONFIG_XEN
++ } else if (is_running_on_xen() && !strcmp(hdr->oem_id, "XEN")) {
++ return "xen";
++#endif
+ }
+
+ return "dig";
+@@ -123,6 +127,8 @@ const char *acpi_get_sysname(void)
+ return "sn2";
+ # elif defined (CONFIG_IA64_DIG)
+ return "dig";
++# elif defined (CONFIG_IA64_XEN)
++ return "xen";
+ # else
+ # error Unknown platform. Fix acpi.c.
+ # endif
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/asm-offsets.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/asm-offsets.c
+--- linux-2.6.18.8/arch/ia64/kernel/asm-offsets.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/asm-offsets.c 2008-02-15 16:21:49.000000000 -0800
@@ -268,4 +268,29 @@ void foo(void)
DEFINE(IA64_TIME_SOURCE_MMIO64, TIME_SOURCE_MMIO64);
DEFINE(IA64_TIME_SOURCE_MMIO32, TIME_SOURCE_MMIO32);
@@ -22323,9 +22831,536 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/asm-offsets.c tmp-linux-2.6-xe
+ DEFINE_MAPPED_REG_OFS(XSI_B1NATS_OFS, vnat);
+#endif /* CONFIG_XEN */
}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/crash.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/crash.c
+--- linux-2.6.18.8/arch/ia64/kernel/crash.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/crash.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,222 @@
++/*
++ * arch/ia64/kernel/crash.c
++ *
++ * Architecture specific (ia64) functions for kexec based crash dumps.
++ *
++ * Created by: Khalid Aziz <khalid.aziz@hp.com>
++ * Copyright (C) 2005 Hewlett-Packard Development Company, L.P.
++ * Copyright (C) 2005 Intel Corp Zou Nan hai <nanhai.zou@intel.com>
++ *
++ */
++#include <linux/smp.h>
++#include <linux/delay.h>
++#include <linux/crash_dump.h>
++#include <linux/bootmem.h>
++#include <linux/kexec.h>
++#include <linux/elfcore.h>
++#include <linux/sysctl.h>
++#include <linux/init.h>
++
++#include <asm/kdebug.h>
++#include <asm/mca.h>
++
++int kdump_status[NR_CPUS];
++atomic_t kdump_cpu_freezed;
++atomic_t kdump_in_progress;
++int kdump_on_init = 1;
++
++static inline Elf64_Word
++*append_elf_note(Elf64_Word *buf, char *name, unsigned type, void *data,
++ size_t data_len)
++{
++ struct elf_note *note = (struct elf_note *)buf;
++ note->n_namesz = strlen(name) + 1;
++ note->n_descsz = data_len;
++ note->n_type = type;
++ buf += (sizeof(*note) + 3)/4;
++ memcpy(buf, name, note->n_namesz);
++ buf += (note->n_namesz + 3)/4;
++ memcpy(buf, data, data_len);
++ buf += (data_len + 3)/4;
++ return buf;
++}
++
++static void
++final_note(void *buf)
++{
++ memset(buf, 0, sizeof(struct elf_note));
++}
++
++extern void ia64_dump_cpu_regs(void *);
++
++static DEFINE_PER_CPU(struct elf_prstatus, elf_prstatus);
++
++void
++crash_save_this_cpu()
++{
++ void *buf;
++ unsigned long cfm, sof, sol;
++
++ int cpu = smp_processor_id();
++ struct elf_prstatus *prstatus = &per_cpu(elf_prstatus, cpu);
++
++ elf_greg_t *dst = (elf_greg_t *)&(prstatus->pr_reg);
++ memset(prstatus, 0, sizeof(*prstatus));
++ prstatus->pr_pid = current->pid;
++
++ ia64_dump_cpu_regs(dst);
++ cfm = dst[43];
++ sol = (cfm >> 7) & 0x7f;
++ sof = cfm & 0x7f;
++ dst[46] = (unsigned long)ia64_rse_skip_regs((unsigned long *)dst[46],
++ sof - sol);
++
++ buf = (u64 *) per_cpu_ptr(crash_notes, cpu);
++ if (!buf)
++ return;
++ buf = append_elf_note(buf, "CORE", NT_PRSTATUS, prstatus,
++ sizeof(*prstatus));
++ final_note(buf);
++}
++
++static int
++kdump_wait_cpu_freeze(void)
++{
++ int cpu_num = num_online_cpus() - 1;
++ int timeout = 1000;
++ while(timeout-- > 0) {
++ if (atomic_read(&kdump_cpu_freezed) == cpu_num)
++ return 0;
++ udelay(1000);
++ }
++ return 1;
++}
++
++void
++machine_crash_shutdown(struct pt_regs *pt)
++{
++ /* This function is only called after the system
++ * has paniced or is otherwise in a critical state.
++ * The minimum amount of code to allow a kexec'd kernel
++ * to run successfully needs to happen here.
++ *
++ * In practice this means shooting down the other cpus in
++ * an SMP system.
++ */
++ kexec_disable_iosapic();
++#ifdef CONFIG_SMP
++ kdump_smp_send_stop();
++ if (kdump_wait_cpu_freeze() && kdump_on_init) {
++ //not all cpu response to IPI, send INIT to freeze them
++ kdump_smp_send_init();
++ }
++#endif
++}
++
++static void
++machine_kdump_on_init(void)
++{
++ local_irq_disable();
++ kexec_disable_iosapic();
++ machine_kexec(ia64_kimage);
++}
++
++void
++kdump_cpu_freeze(struct unw_frame_info *info, void *arg)
++{
++ int cpuid;
++ local_irq_disable();
++ cpuid = smp_processor_id();
++ crash_save_this_cpu();
++ current->thread.ksp = (__u64)info->sw - 16;
++ atomic_inc(&kdump_cpu_freezed);
++ kdump_status[cpuid] = 1;
++ mb();
++ if (cpuid == 0) {
++ for (;;)
++ cpu_relax();
++ } else
++ ia64_jump_to_sal(&sal_boot_rendez_state[cpuid]);
++}
++
++static int
++kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data)
++{
++ struct die_args *args = data;
++
++ if (!kdump_on_init)
++ return NOTIFY_DONE;
++
++ if (val != DIE_INIT_MONARCH_ENTER &&
++ val != DIE_INIT_SLAVE_ENTER &&
++ val != DIE_MCA_RENDZVOUS_LEAVE &&
++ val != DIE_MCA_MONARCH_LEAVE)
++ return NOTIFY_DONE;
++
++ /* There really ought to be a check here to see if this
++ * is a machine check rendevous. The kexec code that
++ * was merged around 2.6.20-rc1 includes such a check.
++ * But the check relies on infastructure that is not
++ * available in 2.6.16. */
++
++ switch (val) {
++ case DIE_INIT_MONARCH_ENTER:
++ machine_kdump_on_init();
++ break;
++ case DIE_INIT_SLAVE_ENTER:
++ unw_init_running(kdump_cpu_freeze, NULL);
++ break;
++ case DIE_MCA_RENDZVOUS_LEAVE:
++ if (atomic_read(&kdump_in_progress))
++ unw_init_running(kdump_cpu_freeze, NULL);
++ break;
++ case DIE_MCA_MONARCH_LEAVE:
++ /* die_register->signr indicate if MCA is recoverable */
++ if (!args->signr)
++ machine_kdump_on_init();
++ break;
++ }
++ return NOTIFY_DONE;
++}
++
++#ifdef CONFIG_SYSCTL
++static ctl_table kdump_on_init_table[] = {
++ {
++ .ctl_name = CTL_UNNUMBERED,
++ .procname = "kdump_on_init",
++ .data = &kdump_on_init,
++ .maxlen = sizeof(int),
++ .mode = 0644,
++ .proc_handler = &proc_dointvec,
++ },
++ { .ctl_name = 0 }
++};
++
++static ctl_table sys_table[] = {
++ {
++ .ctl_name = CTL_KERN,
++ .procname = "kernel",
++ .mode = 0555,
++ .child = kdump_on_init_table,
++ },
++ { .ctl_name = 0 }
++};
++#endif
++
++static int
++machine_crash_setup(void)
++{
++ static struct notifier_block kdump_init_notifier_nb = {
++ .notifier_call = kdump_init_notifier,
++ };
++ int ret;
++ if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0)
++ return ret;
++#ifdef CONFIG_SYSCTL
++ register_sysctl_table(sys_table, 0);
++#endif
++ return 0;
++}
++
++__initcall(machine_crash_setup);
++
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/crash_dump.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/crash_dump.c
+--- linux-2.6.18.8/arch/ia64/kernel/crash_dump.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/crash_dump.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,48 @@
++/*
++ * kernel/crash_dump.c - Memory preserving reboot related code.
++ *
++ * Created by: Simon Horman <horms@verge.net.au>
++ * Original code moved from kernel/crash.c
++ * Original code comment copied from the i386 version of this file
++ */
++
++#include <linux/errno.h>
++#include <linux/types.h>
++
++#include <linux/uaccess.h>
++
++/**
++ * copy_oldmem_page - copy one page from "oldmem"
++ * @pfn: page frame number to be copied
++ * @buf: target memory address for the copy; this can be in kernel address
++ * space or user address space (see @userbuf)
++ * @csize: number of bytes to copy
++ * @offset: offset in bytes into the page (based on pfn) to begin the copy
++ * @userbuf: if set, @buf is in user address space, use copy_to_user(),
++ * otherwise @buf is in kernel address space, use memcpy().
++ *
++ * Copy a page from "oldmem". For this page, there is no pte mapped
++ * in the current kernel. We stitch up a pte, similar to kmap_atomic.
++ *
++ * Calling copy_to_user() in atomic context is not desirable. Hence first
++ * copying the data to a pre-allocated kernel page and then copying to user
++ * space in non-atomic context.
++ */
++ssize_t
++copy_oldmem_page(unsigned long pfn, char *buf,
++ size_t csize, unsigned long offset, int userbuf)
++{
++ void *vaddr;
++
++ if (!csize)
++ return 0;
++ vaddr = __va(pfn<<PAGE_SHIFT);
++ if (userbuf) {
++ if (copy_to_user(buf, (vaddr + offset), csize)) {
++ return -EFAULT;
++ }
++ } else
++ memcpy(buf, (vaddr + offset), csize);
++ return csize;
++}
++
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/efi.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/efi.c
+--- linux-2.6.18.8/arch/ia64/kernel/efi.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/efi.c 2008-02-15 16:21:49.000000000 -0800
+@@ -26,6 +26,7 @@
+ #include <linux/types.h>
+ #include <linux/time.h>
+ #include <linux/efi.h>
++#include <linux/kexec.h>
+
+ #include <asm/io.h>
+ #include <asm/kregs.h>
+@@ -34,6 +35,11 @@
+ #include <asm/processor.h>
+ #include <asm/mca.h>
+
++#ifdef CONFIG_PROC_IOMEM_MACHINE
++#include <xen/interface/memory.h>
++#include <asm/hypercall.h>
++#endif
++
+ #define EFI_DEBUG 0
+
+ extern efi_status_t efi_call_phys (void *, ...);
+@@ -41,7 +47,7 @@ extern efi_status_t efi_call_phys (void
+ struct efi efi;
+ EXPORT_SYMBOL(efi);
+ static efi_runtime_services_t *runtime;
+-static unsigned long mem_limit = ~0UL, max_addr = ~0UL;
++static unsigned long mem_limit = ~0UL, max_addr = ~0UL, min_addr = 0UL;
+
+ #define efi_call_virt(f, args...) (*(f))(args)
+
+@@ -421,6 +427,8 @@ efi_init (void)
+ mem_limit = memparse(cp + 4, &cp);
+ } else if (memcmp(cp, "max_addr=", 9) == 0) {
+ max_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp));
++ } else if (memcmp(cp, "min_addr=", 9) == 0) {
++ min_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp));
+ } else {
+ while (*cp != ' ' && *cp)
+ ++cp;
+@@ -428,6 +436,8 @@ efi_init (void)
+ ++cp;
+ }
+ }
++ if (min_addr != 0UL)
++ printk(KERN_INFO "Ignoring memory below %luMB\n", min_addr >> 20);
+ if (max_addr != ~0UL)
+ printk(KERN_INFO "Ignoring memory above %luMB\n", max_addr >> 20);
+
+@@ -894,7 +904,8 @@ find_memmap_space (void)
+ as = max(contig_low, md->phys_addr);
+ ae = min(contig_high, efi_md_end(md));
+
+- /* keep within max_addr= command line arg */
++ /* keep within max_addr= and min_addr= command line arg */
++ as = max(as, min_addr);
+ ae = min(ae, max_addr);
+ if (ae <= as)
+ continue;
+@@ -1004,7 +1015,8 @@ efi_memmap_init(unsigned long *s, unsign
+ } else
+ ae = efi_md_end(md);
+
+- /* keep within max_addr= command line arg */
++ /* keep within max_addr= and min_addr= command line arg */
++ as = max(as, min_addr);
+ ae = min(ae, max_addr);
+ if (ae <= as)
+ continue;
+@@ -1033,21 +1045,22 @@ efi_memmap_init(unsigned long *s, unsign
+ *e = (u64)++k;
+ }
+
+-void
+-efi_initialize_iomem_resources(struct resource *code_resource,
+- struct resource *data_resource)
++#define EFI_INITIALISE_PHYS 0x1
++#define EFI_INITIALISE_MACH 0x2
++#define EFI_INITIALISE_ALL (EFI_INITIALISE_PHYS|EFI_INITIALISE_MACH)
++
++static void
++efi_initialize_resources(void *efi_map_start, void *efi_map_end,
++ u64 efi_desc_size, struct resource *root_resource,
++ struct resource *code_resource,
++ struct resource *data_resource, unsigned flag)
+ {
+ struct resource *res;
+- void *efi_map_start, *efi_map_end, *p;
++ void *p;
+ efi_memory_desc_t *md;
+- u64 efi_desc_size;
+ char *name;
+ unsigned long flags;
+
+- efi_map_start = __va(ia64_boot_param->efi_memmap);
+- efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
+- efi_desc_size = ia64_boot_param->efi_memdesc_size;
+-
+ res = NULL;
+
+ for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
+@@ -1106,7 +1119,7 @@ efi_initialize_iomem_resources(struct re
+ res->end = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT) - 1;
+ res->flags = flags;
+
+- if (insert_resource(&iomem_resource, res) < 0)
++ if (insert_resource(root_resource, res) < 0)
+ kfree(res);
+ else {
+ /*
+@@ -1114,8 +1127,135 @@ efi_initialize_iomem_resources(struct re
+ * kernel data so we try it repeatedly and
+ * let the resource manager test it.
+ */
+- insert_resource(res, code_resource);
+- insert_resource(res, data_resource);
++ if (flag & EFI_INITIALISE_PHYS) {
++ insert_resource(res, code_resource);
++ insert_resource(res, data_resource);
++ }
++#ifdef CONFIG_KEXEC
++ if (flag & EFI_INITIALISE_MACH) {
++ insert_resource(res, &efi_memmap_res);
++ insert_resource(res, &boot_param_res);
++ if (crashk_res.end > crashk_res.start)
++ insert_resource(res, &crashk_res);
++#ifdef CONFIG_XEN
++ if (is_initial_xendomain())
++ xen_machine_kexec_register_resources(
++ res);
++#endif
++ }
++#endif
+ }
+ }
+ }
++
++#ifdef CONFIG_PROC_IOMEM_MACHINE
++static int
++efi_initialize_iomem_machine_resources(void)
++{
++ unsigned long size;
++ xen_memory_map_t memmap;
++ xen_ia64_memmap_info_t *memmap_info = NULL;
++ void *efi_map_start, *efi_map_end;
++ u64 efi_desc_size;
++ int ret;
++
++ /* It would be nice if it wasn't neccessary to loop like this */
++ for (size = 1024; 1; size += 1024) {
++ memmap_info = kmalloc(size, GFP_KERNEL);
++ if (memmap_info == NULL)
++ return -ENOMEM;
++
++ memmap.nr_entries = size;
++ set_xen_guest_handle(memmap.buffer, memmap_info);
++ ret = HYPERVISOR_memory_op(XENMEM_machine_memory_map, &memmap);
++ if (!ret)
++ break;
++
++ kfree(memmap_info);
++ }
++
++ efi_map_start = &memmap_info->memdesc;
++ efi_map_end = efi_map_start + memmap_info->efi_memmap_size;
++ efi_desc_size = memmap_info->efi_memdesc_size;
++ efi_initialize_resources(efi_map_start, efi_map_end, efi_desc_size,
++ &iomem_machine_resource, NULL, NULL,
++ EFI_INITIALISE_MACH);
++
++ kfree(memmap_info);
++}
++#endif
++
++void
++efi_initialize_iomem_resources(struct resource *code_resource,
++ struct resource *data_resource)
++{
++ void *efi_map_start, *efi_map_end;
++ u64 efi_desc_size;
++
++ efi_map_start = __va(ia64_boot_param->efi_memmap);
++ efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
++ efi_desc_size = ia64_boot_param->efi_memdesc_size;
++
++#ifdef CONFIG_PROC_IOMEM_MACHINE
++ if (is_initial_xendomain()) {
++ efi_initialize_resources(efi_map_start, efi_map_end,
++ efi_desc_size, &iomem_resource,
++ code_resource, data_resource,
++ EFI_INITIALISE_PHYS);
++ efi_initialize_iomem_machine_resources();
++ }
++ else
++#endif
++ efi_initialize_resources(efi_map_start, efi_map_end,
++ efi_desc_size, &iomem_resource,
++ code_resource, data_resource,
++ EFI_INITIALISE_ALL);
++}
++
++
++
++#ifdef CONFIG_KEXEC
++/* find a block of memory aligned to 64M exclude reserved regions
++ rsvd_regions are sorted
++ */
++unsigned long
++kdump_find_rsvd_region (unsigned long size,
++ struct rsvd_region *r, int n)
++{
++ int i;
++ u64 start, end;
++ u64 alignment = 1UL << _PAGE_SIZE_64M;
++ void *efi_map_start, *efi_map_end, *p;
++ efi_memory_desc_t *md;
++ u64 efi_desc_size;
++
++ efi_map_start = __va(ia64_boot_param->efi_memmap);
++ efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
++ efi_desc_size = ia64_boot_param->efi_memdesc_size;
++
++ for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
++ md = p;
++ if (!efi_wb(md))
++ continue;
++ start = ALIGN(md->phys_addr, alignment);
++ end = efi_md_end(md);
++ for (i = 0; i < n; i++) {
++ if (__pa(r[i].start) >= start && __pa(r[i].end) < end) {
++ if (__pa(r[i].start) > start + size)
++ return start;
++ start = ALIGN(__pa(r[i].end), alignment);
++ if (i < n-1 && __pa(r[i+1].start) < start + size)
++ continue;
++ else
++ break;
++ }
++ }
++ if (end > start + size)
++ return start;
++ }
++
++ printk(KERN_WARNING "Cannot reserve 0x%lx byte of memory for crashdump\n",
++ size);
++ return ~0UL;
++}
++#endif
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/entry.S linux-2.6.18-xen-3.2.0/arch/ia64/kernel/entry.S
+--- linux-2.6.18.8/arch/ia64/kernel/entry.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/entry.S 2008-02-15 16:21:49.000000000 -0800
@@ -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.
@@ -22463,9 +23498,18 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/entry.S tmp-linux-2.6-xen.patc
;;
mov ar.unat=r9
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-11-14 15:35:27.000000000 -0800
+@@ -1575,7 +1581,7 @@ sys_call_table:
+ data8 sys_mq_timedreceive // 1265
+ data8 sys_mq_notify
+ data8 sys_mq_getsetattr
+- data8 sys_ni_syscall // reserved for kexec_load
++ data8 sys_kexec_load
+ data8 sys_ni_syscall // reserved for vserver
+ data8 sys_waitid // 1270
+ data8 sys_add_key
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/fsys.S linux-2.6.18-xen-3.2.0/arch/ia64/kernel/fsys.S
+--- linux-2.6.18.8/arch/ia64/kernel/fsys.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/fsys.S 2008-02-15 16:21:49.000000000 -0800
@@ -516,11 +516,34 @@ ENTRY(fsys_fallback_syscall)
adds r17=-1024,r15
movl r14=sys_call_table
@@ -22527,189 +23571,298 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/fsys.S tmp-linux-2.6-xen.patch
cmp.eq p8,p0=r3,r0 // A
(p10) br.cond.spnt.many ia64_ret_from_syscall // B return if bad call-frame or r15 is a NaT
-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-11-14 15:35:27.000000000 -0800
-@@ -13,6 +13,9 @@
- #include <asm/sigcontext.h>
- #include <asm/system.h>
- #include <asm/unistd.h>
-+#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT
-+# include <asm/privop.h>
-+#endif
-
- /*
- * We can't easily refer to symbols inside the kernel. To avoid full runtime relocation,
-@@ -32,6 +35,40 @@
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/gate.S linux-2.6.18-xen-3.2.0/arch/ia64/kernel/gate.S
+--- linux-2.6.18.8/arch/ia64/kernel/gate.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/gate.S 2008-02-15 16:21:49.000000000 -0800
+@@ -32,102 +32,6 @@
[1:](pr)brl.cond.sptk 0; \
.xdata4 ".data.patch.brl_fsys_bubble_down", 1b-.
-+#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT
-+ // The page in which hyperprivop lives must be pinned by ITR.
-+ // However vDSO area isn't pinned. So issuing hyperprivop
-+ // from vDSO page causes trouble that Kevin pointed out.
-+ // After clearing vpsr.ic, the vcpu is pre-empted and the itlb
-+ // is flushed. Then vcpu get cpu again, tlb miss fault occures.
-+ // However it results in nested dtlb fault because vpsr.ic is off.
-+ // To avoid such a situation, we jump into the kernel text area
-+ // which is pinned, and then issue hyperprivop and return back
-+ // to vDSO page.
-+ // This is Dan Magenheimer's idea.
-+
-+ // Currently is_running_on_xen() is defined as running_on_xen.
-+ // If is_running_on_xen() is a real function, we must update
-+ // according to it.
-+ .section ".data.patch.running_on_xen", "a"
-+ .previous
-+#define LOAD_RUNNING_ON_XEN(reg) \
-+[1:] movl reg=0; \
-+ .xdata4 ".data.patch.running_on_xen", 1b-.
-+
-+ .section ".data.patch.brl_xen_ssm_i_0", "a"
-+ .previous
-+#define BRL_COND_XEN_SSM_I_0(pr) \
-+[1:](pr)brl.cond.sptk 0; \
-+ .xdata4 ".data.patch.brl_xen_ssm_i_0", 1b-.
+-GLOBAL_ENTRY(__kernel_syscall_via_break)
+- .prologue
+- .altrp b6
+- .body
+- /*
+- * Note: for (fast) syscall restart to work, the break instruction must be
+- * the first one in the bundle addressed by syscall_via_break.
+- */
+-{ .mib
+- break 0x100000
+- nop.i 0
+- br.ret.sptk.many b6
+-}
+-END(__kernel_syscall_via_break)
+-
+-/*
+- * On entry:
+- * r11 = saved ar.pfs
+- * r15 = system call #
+- * b0 = saved return address
+- * b6 = return address
+- * On exit:
+- * r11 = saved ar.pfs
+- * r15 = system call #
+- * b0 = saved return address
+- * all other "scratch" registers: undefined
+- * all "preserved" registers: same as on entry
+- */
+-
+-GLOBAL_ENTRY(__kernel_syscall_via_epc)
+- .prologue
+- .altrp b6
+- .body
+-{
+- /*
+- * Note: the kernel cannot assume that the first two instructions in this
+- * bundle get executed. The remaining code must be safe even if
+- * they do not get executed.
+- */
+- adds r17=-1024,r15 // A
+- mov r10=0 // A default to successful syscall execution
+- epc // B causes split-issue
+-}
+- ;;
+- rsm psr.be | psr.i // M2 (5 cyc to srlz.d)
+- LOAD_FSYSCALL_TABLE(r14) // X
+- ;;
+- mov r16=IA64_KR(CURRENT) // M2 (12 cyc)
+- shladd r18=r17,3,r14 // A
+- mov r19=NR_syscalls-1 // A
+- ;;
+- lfetch [r18] // M0|1
+- mov r29=psr // M2 (12 cyc)
+- // If r17 is a NaT, p6 will be zero
+- cmp.geu p6,p7=r19,r17 // A (sysnr > 0 && sysnr < 1024+NR_syscalls)?
+- ;;
+- mov r21=ar.fpsr // M2 (12 cyc)
+- tnat.nz p10,p9=r15 // I0
+- mov.i r26=ar.pfs // I0 (would stall anyhow due to srlz.d...)
+- ;;
+- srlz.d // M0 (forces split-issue) ensure PSR.BE==0
+-(p6) ld8 r18=[r18] // M0|1
+- nop.i 0
+- ;;
+- nop.m 0
+-(p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!)
+- nop.i 0
+- ;;
+-(p8) ssm psr.i
+-(p6) mov b7=r18 // I0
+-(p8) br.dptk.many b7 // B
+-
+- mov r27=ar.rsc // M2 (12 cyc)
+-/*
+- * brl.cond doesn't work as intended because the linker would convert this branch
+- * into a branch to a PLT. Perhaps there will be a way to avoid this with some
+- * future version of the linker. In the meantime, we just use an indirect branch
+- * instead.
+- */
+-#ifdef CONFIG_ITANIUM
+-(p6) add r14=-8,r14 // r14 <- addr of fsys_bubble_down entry
+- ;;
+-(p6) ld8 r14=[r14] // r14 <- fsys_bubble_down
+- ;;
+-(p6) mov b7=r14
+-(p6) br.sptk.many b7
+-#else
+- BRL_COND_FSYS_BUBBLE_DOWN(p6)
+-#endif
+- ssm psr.i
+- mov r10=-1
+-(p10) mov r8=EINVAL
+-(p9) mov r8=ENOSYS
+- FSYS_RETURN
+-END(__kernel_syscall_via_epc)
+-
+ # define ARG0_OFF (16 + IA64_SIGFRAME_ARG0_OFFSET)
+ # define ARG1_OFF (16 + IA64_SIGFRAME_ARG1_OFFSET)
+ # define ARG2_OFF (16 + IA64_SIGFRAME_ARG2_OFFSET)
+@@ -373,3 +277,154 @@ restore_rbs:
+ // invala not necessary as that will happen when returning to user-mode
+ br.cond.sptk back_from_restore_rbs
+ END(__kernel_sigtramp)
++
++GLOBAL_ENTRY(__kernel_syscall_via_break)
++ .prologue
++ .altrp b6
++ .body
++ /*
++ * Note: for (fast) syscall restart to work, the break instruction must be
++ * the first one in the bundle addressed by syscall_via_break.
++ */
++{ .mib
++ break 0x100000
++ nop.i 0
++ br.ret.sptk.many b6
++}
++END(__kernel_syscall_via_break)
+
-+ .section ".data.patch.brl_xen_ssm_i_1", "a"
-+ .previous
-+#define BRL_COND_XEN_SSM_I_1(pr) \
-+[1:](pr)brl.cond.sptk 0; \
-+ .xdata4 ".data.patch.brl_xen_ssm_i_1", 1b-.
-+#endif
++/*
++ * On entry:
++ * r11 = saved ar.pfs
++ * r15 = system call #
++ * b0 = saved return address
++ * b6 = return address
++ * On exit:
++ * r11 = saved ar.pfs
++ * r15 = system call #
++ * b0 = saved return address
++ * all other "scratch" registers: undefined
++ * all "preserved" registers: same as on entry
++ */
+
- GLOBAL_ENTRY(__kernel_syscall_via_break)
- .prologue
- .altrp b6
-@@ -76,7 +113,42 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc)
- epc // B causes split-issue
- }
- ;;
-+#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT
++GLOBAL_ENTRY(__kernel_syscall_via_epc)
++ .prologue
++ .altrp b6
++ .body
++{
++ /*
++ * Note: the kernel cannot assume that the first two instructions in this
++ * bundle get executed. The remaining code must be safe even if
++ * they do not get executed.
++ */
++ adds r17=-1024,r15 // A
++ mov r10=0 // A default to successful syscall execution
++ epc // B causes split-issue
++}
++ ;;
++#ifdef __XEN_IA64_VDSO_PARAVIRT
+ // r20 = 1
+ // r22 = &vcpu->vcpu_info->evtchn_upcall_mask
-+ // r23 = &vpsr.ic
+ // r24 = &vcpu->vcpu_info->evtchn_upcall_pending
+ // r25 = tmp
-+ // r28 = &running_on_xen
-+ // r30 = running_on_xen
+ // r31 = tmp
+ // p11 = tmp
-+ // p12 = running_on_xen
-+ // p13 = !running_on_xen
+ // p14 = tmp
-+ // p15 = tmp
-+#define isXen p12
-+#define isRaw p13
-+ LOAD_RUNNING_ON_XEN(r28)
++ mov r20=1
+ movl r22=XSI_PSR_I_ADDR
+ ;;
+ ld8 r22=[r22]
+ ;;
-+ movl r23=XSI_PSR_IC
++ st1 [r22]=r20
++ rum psr.be
+ adds r24=-1,r22
-+ mov r20=1
-+ ;;
-+ ld4 r30=[r28]
-+ ;;
-+ cmp.ne isXen,isRaw=r0,r30
++#else
++ rsm psr.be | psr.i // M2 (5 cyc to srlz.d)
++#endif
++ LOAD_FSYSCALL_TABLE(r14) // X
+ ;;
-+(isRaw) rsm psr.be | psr.i
-+(isXen) st1 [r22]=r20
-+(isXen) rum psr.be
++ mov r16=IA64_KR(CURRENT) // M2 (12 cyc)
++ shladd r18=r17,3,r14 // A
++ mov r19=NR_syscalls-1 // A
++#ifdef __XEN_IA64_VDSO_PARAVIRT
++ XEN_HYPER_GET_PSR
+ ;;
++ lfetch [r18] // M0|1
++ mov r29=r8
+#else
- rsm psr.be | psr.i // M2 (5 cyc to srlz.d)
++ ;;
++ lfetch [r18] // M0|1
++ mov r29=psr // M2 (12 cyc)
+#endif
- LOAD_FSYSCALL_TABLE(r14) // X
- ;;
- mov r16=IA64_KR(CURRENT) // M2 (12 cyc)
-@@ -84,7 +156,14 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc)
- mov r19=NR_syscalls-1 // A
- ;;
- lfetch [r18] // M0|1
-+#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT
-+(isRaw) mov r29=psr
-+(isXen) XEN_HYPER_GET_PSR
++ // If r17 is a NaT, p6 will be zero
++ cmp.geu p6,p7=r19,r17 // A (sysnr > 0 && sysnr < 1024+NR_syscalls)?
+ ;;
-+(isXen) mov r29=r8
++ mov r21=ar.fpsr // M2 (12 cyc)
++ tnat.nz p10,p9=r15 // I0
++ mov.i r26=ar.pfs // I0 (would stall anyhow due to srlz.d...)
++ ;;
++ srlz.d // M0 (forces split-issue) ensure PSR.BE==0
++(p6) ld8 r18=[r18] // M0|1
++ nop.i 0
++ ;;
++ nop.m 0
++(p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!)
++#ifdef __XEN_IA64_VDSO_PARAVIRT
++
++#define XEN_SET_PSR_I(pred) \
++(pred) ld1 r31=[r22]; \
++ ;; ; \
++(pred) st1 [r22]=r0; \
++(pred) cmp.ne.unc p14,p0=r0,r31; \
++ ;; ; \
++(p14) ld1 r25=[r24]; \
++ ;; ; \
++(p14) cmp.ne.unc p11,p0=r0,r25; \
++ ;; ; \
++(p11) XEN_HYPER_SSM_I;
++
++ ;;
++ XEN_SET_PSR_I(p8)
+#else
- mov r29=psr // M2 (12 cyc)
++ nop.i 0
++ ;;
++(p8) ssm psr.i
+#endif
- // If r17 is a NaT, p6 will be zero
- cmp.geu p6,p7=r19,r17 // A (sysnr > 0 && sysnr < 1024+NR_syscalls)?
- ;;
-@@ -98,9 +177,21 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc)
- ;;
- nop.m 0
- (p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!)
-+#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT
++(p6) mov b7=r18 // I0
++(p8) br.dptk.many b7 // B
++
++ mov r27=ar.rsc // M2 (12 cyc)
++/*
++ * brl.cond doesn't work as intended because the linker would convert this branch
++ * into a branch to a PLT. Perhaps there will be a way to avoid this with some
++ * future version of the linker. In the meantime, we just use an indirect branch
++ * instead.
++ */
++#ifdef CONFIG_ITANIUM
++(p6) add r14=-8,r14 // r14 <- addr of fsys_bubble_down entry
+ ;;
-+ // p14 = running_on_xen && p8
-+ // p15 = !running_on_xen && p8
-+(p8) cmp.ne.unc p14,p15=r0,r30
++(p6) ld8 r14=[r14] // r14 <- fsys_bubble_down
+ ;;
-+(p15) ssm psr.i
-+ BRL_COND_XEN_SSM_I_0(p14)
-+ .global .vdso_ssm_i_0_ret
-+.vdso_ssm_i_0_ret:
++(p6) mov b7=r14
++(p6) br.sptk.many b7
+#else
- nop.i 0
- ;;
- (p8) ssm psr.i
++ BRL_COND_FSYS_BUBBLE_DOWN(p6)
+#endif
- (p6) mov b7=r18 // I0
- (p8) br.dptk.many b7 // B
-
-@@ -121,9 +212,21 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc)
- #else
- BRL_COND_FSYS_BUBBLE_DOWN(p6)
- #endif
-+#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT
-+(isRaw) ssm psr.i
-+ BRL_COND_XEN_SSM_I_1(isXen)
-+ .global .vdso_ssm_i_1_ret
-+.vdso_ssm_i_1_ret:
++#ifdef __XEN_IA64_VDSO_PARAVIRT
++ XEN_SET_PSR_I(p0)
+#else
- ssm psr.i
-+#endif
- mov r10=-1
- (p10) mov r8=EINVAL
-+#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT
-+ dv_serialize_data // shut up gas warning.
-+ // we know xen_hyper_ssm_i_0 or xen_hyper_ssm_i_1
-+ // doesn't change p9 and p10
-+#endif
- (p9) mov r8=ENOSYS
- FSYS_RETURN
- 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-11-14 15:35:27.000000000 -0800
-@@ -43,6 +43,20 @@ SECTIONS
- __start_gate_brl_fsys_bubble_down_patchlist = .;
- *(.data.patch.brl_fsys_bubble_down)
- __end_gate_brl_fsys_bubble_down_patchlist = .;
-+
-+#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT
-+ __start_gate_running_on_xen_patchlist = .;
-+ *(.data.patch.running_on_xen)
-+ __end_gate_running_on_xen_patchlist = .;
-+
-+ __start_gate_brl_xen_ssm_i_0_patchlist = .;
-+ *(.data.patch.brl_xen_ssm_i_0)
-+ __end_gate_brl_xen_ssm_i_0_patchlist = .;
-+
-+ __start_gate_brl_xen_ssm_i_1_patchlist = .;
-+ *(.data.patch.brl_xen_ssm_i_1)
-+ __end_gate_brl_xen_ssm_i_1_patchlist = .;
-+#endif
- } :readable
- .IA_64.unwind_info : { *(.IA_64.unwind_info*) }
- .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-11-14 15:35:27.000000000 -0800
++ ssm psr.i
++#endif
++ mov r10=-1
++(p10) mov r8=EINVAL
++(p9) mov r8=ENOSYS
++ FSYS_RETURN
++#ifdef __KERNEL_SYSCALL_VIA_EPC_PADDING
++ /*
++ * All values/sizes of __kernel_xxx symbol in gate.so and xengate.so
++ * must be same to each other.
++ * Adjust symbol size in gate.so to be same to the one in xengate.so.
++ */
++.include "arch/ia64/kernel/gate-skip.s"
++#endif
++END(__kernel_syscall_via_epc)
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/gate.lds.S linux-2.6.18-xen-3.2.0/arch/ia64/kernel/gate.lds.S
+--- linux-2.6.18.8/arch/ia64/kernel/gate.lds.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/gate.lds.S 2008-02-15 16:21:49.000000000 -0800
+@@ -28,6 +28,24 @@ SECTIONS
+ . = GATE_ADDR + 0x500;
+
+ .data.patch : {
++#ifdef __XEN_IA64_VDSO_PARAVIRT
++#define __start_gate_mckinley_e9_patchlist \
++ __start_gate_mckinley_e9_patchlist_xen
++#define __end_gate_mckinley_e9_patchlist \
++ __end_gate_mckinley_e9_patchlist_xen
++#define __start_gate_vtop_patchlist \
++ __start_gate_vtop_patchlist_xen
++#define __end_gate_vtop_patchlist \
++ __end_gate_vtop_patchlist_xen
++#define __start_gate_fsyscall_patchlist \
++ __start_gate_fsyscall_patchlist_xen
++#define __end_gate_fsyscall_patchlist \
++ __end_gate_fsyscall_patchlist_xen
++#define __start_gate_brl_fsys_bubble_down_patchlist \
++ __start_gate_brl_fsys_bubble_down_patchlist_xen
++#define __end_gate_brl_fsys_bubble_down_patchlist \
++ __end_gate_brl_fsys_bubble_down_patchlist_xen
++#endif
+ __start_gate_mckinley_e9_patchlist = .;
+ *(.data.patch.mckinley_e9)
+ __end_gate_mckinley_e9_patchlist = .;
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/head.S linux-2.6.18-xen-3.2.0/arch/ia64/kernel/head.S
+--- linux-2.6.18.8/arch/ia64/kernel/head.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/head.S 2008-02-15 16:21:49.000000000 -0800
@@ -367,6 +367,12 @@ start_ap:
;;
(isBP) st8 [r2]=r28 // save the address of the boot param area passed by the bootloader
@@ -22723,9 +23876,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/head.S tmp-linux-2.6-xen.patch
#ifdef CONFIG_SMP
(isAP) br.call.sptk.many rp=start_secondary
.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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/iosapic.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/iosapic.c
+--- linux-2.6.18.8/arch/ia64/kernel/iosapic.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/iosapic.c 2008-02-15 16:21:49.000000000 -0800
@@ -159,6 +159,75 @@ static unsigned char pcat_compat __devin
static int iosapic_kmalloc_ok;
static LIST_HEAD(free_rte_list);
@@ -22802,7 +23955,35 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/iosapic.c tmp-linux-2.6-xen.pa
/*
* Find an IOSAPIC associated with a GSI
*/
-@@ -653,6 +722,9 @@ register_intr (unsigned int gsi, int vec
+@@ -288,6 +357,27 @@ nop (unsigned int irq)
+ /* do nothing... */
+ }
+
++
++#ifdef CONFIG_KEXEC
++void
++kexec_disable_iosapic(void)
++{
++ struct iosapic_intr_info *info;
++ struct iosapic_rte_info *rte;
++ u8 vec = 0;
++ for (info = iosapic_intr_info; info <
++ iosapic_intr_info + IA64_NUM_VECTORS; ++info, ++vec) {
++ list_for_each_entry(rte, &info->rtes,
++ rte_list) {
++ iosapic_write(rte->addr,
++ IOSAPIC_RTE_LOW(rte->rte_index),
++ IOSAPIC_MASK|vec);
++ iosapic_eoi(rte->addr, vec);
++ }
++ }
++}
++#endif
++
+ static void
+ mask_irq (unsigned int irq)
+ {
+@@ -653,6 +743,9 @@ register_intr (unsigned int gsi, int vec
iosapic_intr_info[vector].dmode = delivery;
iosapic_intr_info[vector].trigger = trigger;
@@ -22812,7 +23993,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/iosapic.c tmp-linux-2.6-xen.pa
if (trigger == IOSAPIC_EDGE)
irq_type = &irq_type_iosapic_edge;
else
-@@ -1015,6 +1087,9 @@ iosapic_system_init (int system_pcat_com
+@@ -1015,6 +1108,9 @@ iosapic_system_init (int system_pcat_com
}
pcat_compat = system_pcat_compat;
@@ -22822,9 +24003,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/iosapic.c tmp-linux-2.6-xen.pa
if (pcat_compat) {
/*
* 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/irq_ia64.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/irq_ia64.c
+--- linux-2.6.18.8/arch/ia64/kernel/irq_ia64.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/irq_ia64.c 2008-02-15 16:21:49.000000000 -0800
@@ -30,6 +30,9 @@
#include <linux/smp_lock.h>
#include <linux/threads.h>
@@ -22863,7 +24044,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,277 @@ static struct irqaction ipi_irqaction =
+@@ -240,12 +257,340 @@ static struct irqaction ipi_irqaction =
};
#endif
@@ -23124,72 +24305,46 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/irq_ia64.c tmp-linux-2.6-xen.p
+#endif /* CONFIG_SMP */
+}
+
-+#endif /* CONFIG_XEN */
++void
++xen_irq_init(void)
++{
++ struct callback_register event = {
++ .type = CALLBACKTYPE_event,
++ .address = (unsigned long)&xen_event_callback,
++ };
+
- void
- register_percpu_irq (ia64_vector vec, struct irqaction *action)
- {
- irq_desc_t *desc;
- unsigned int irq;
-
-+#ifdef CONFIG_XEN
-+ if (is_running_on_xen())
-+ return xen_register_percpu_irq(smp_processor_id(),
-+ vec, action, 1);
++ xen_init_IRQ();
++ BUG_ON(HYPERVISOR_callback_op(CALLBACKOP_register, &event));
++ late_time_init = xen_bind_early_percpu_irq;
++#ifdef CONFIG_SMP
++ register_percpu_irq(IA64_IPI_RESCHEDULE, &resched_irqaction);
+#endif
++}
+
- for (irq = 0; irq < NR_IRQS; ++irq)
- if (irq_to_vector(irq) == vec) {
- desc = irq_desc + irq;
-@@ -259,6 +541,21 @@ register_percpu_irq (ia64_vector vec, st
- void __init
- init_IRQ (void)
- {
-+#ifdef CONFIG_XEN
-+ /* Maybe put into platform_irq_init later */
-+ if (is_running_on_xen()) {
-+ struct callback_register event = {
-+ .type = CALLBACKTYPE_event,
-+ .address = (unsigned long)&xen_event_callback,
-+ };
-+ xen_init_IRQ();
-+ BUG_ON(HYPERVISOR_callback_op(CALLBACKOP_register, &event));
-+ late_time_init = xen_bind_early_percpu_irq;
-+#ifdef CONFIG_SMP
-+ register_percpu_irq(IA64_IPI_RESCHEDULE, &resched_irqaction);
-+#endif /* CONFIG_SMP */
-+ }
-+#endif /* CONFIG_XEN */
- register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL);
- #ifdef CONFIG_SMP
- register_percpu_irq(IA64_IPI_VECTOR, &ipi_irqaction);
-@@ -276,6 +573,54 @@ ia64_send_ipi (int cpu, int vector, int
- unsigned long ipi_data;
- unsigned long phys_cpu_id;
-
-+#ifdef CONFIG_XEN
-+ if (is_running_on_xen()) {
-+ int irq = -1;
++void
++xen_platform_send_ipi(int cpu, int vector, int delivery_mode, int redirect)
++{
++ int irq = -1;
+
+#ifdef CONFIG_SMP
-+ /* 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);
++ /* 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;
-+ }
++ xen_send_ipi (cpu, vector);
++ //vcpu_prepare_and_up(cpu);
++ return;
++ }
+#endif
+
-+ switch(vector) {
++ switch (vector) {
+ case IA64_IPI_VECTOR:
+ irq = per_cpu(ipi_to_irq, cpu)[IPI_VECTOR];
+ break;
@@ -23207,20 +24362,265 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/irq_ia64.c tmp-linux-2.6-xen.p
+ vector);
+ irq = 0;
+ break;
-+ }
++ }
+
-+ BUG_ON(irq < 0);
-+ notify_remote_via_irq(irq);
-+ return;
-+ }
++ BUG_ON(irq < 0);
++ notify_remote_via_irq(irq);
++ return;
++}
+#endif /* CONFIG_XEN */
+
+ void
+ register_percpu_irq (ia64_vector vec, struct irqaction *action)
+ {
+ irq_desc_t *desc;
+ unsigned int irq;
+
++#ifdef CONFIG_XEN
++ if (is_running_on_xen())
++ 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;
+@@ -267,6 +612,10 @@ init_IRQ (void)
+ pfm_init_percpu();
+ #endif
+ platform_irq_init();
++#ifdef CONFIG_XEN
++ if (is_running_on_xen() && !ia64_platform_is("xen"))
++ xen_irq_init();
++#endif
+ }
+
+ void
+@@ -276,6 +625,13 @@ ia64_send_ipi (int cpu, int vector, int
+ unsigned long ipi_data;
+ unsigned long phys_cpu_id;
+
++#ifdef CONFIG_XEN
++ if (is_running_on_xen()) {
++ xen_platform_send_ipi(cpu, vector, delivery_mode, redirect);
++ return;
++ }
++#endif
++
#ifdef CONFIG_SMP
phys_cpu_id = cpu_physical_id(cpu);
#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/machine_kexec.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/machine_kexec.c
+--- linux-2.6.18.8/arch/ia64/kernel/machine_kexec.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/machine_kexec.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,145 @@
++/*
++ * arch/ia64/kernel/machine_kexec.c
++ *
++ * Handle transition of Linux booting another kernel
++ * Copyright (C) 2005 Hewlett-Packard Development Comapny, L.P.
++ * Copyright (C) 2005 Khalid Aziz <khalid.aziz@hp.com>
++ * Copyright (C) 2006 Intel Corp, Zou Nan hai <nanhai.zou@intel.com>
++ *
++ * This source code is licensed under the GNU General Public License,
++ * Version 2. See the file COPYING for more details.
++ */
++
++#include <linux/mm.h>
++#include <linux/kexec.h>
++#include <linux/cpu.h>
++#include <linux/irq.h>
++#include <asm/mmu_context.h>
++#include <asm/setup.h>
++#include <asm/delay.h>
++#include <asm/meminit.h>
++#ifdef CONFIG_XEN
++#include <xen/interface/kexec.h>
++#include <asm/kexec.h>
++#endif
++
++typedef void (*relocate_new_kernel_t)(unsigned long, unsigned long,
++ struct ia64_boot_param *, unsigned long);
++
++struct kimage *ia64_kimage;
++
++struct resource efi_memmap_res = {
++ .name = "EFI Memory Map",
++ .start = 0,
++ .end = 0,
++ .flags = IORESOURCE_BUSY | IORESOURCE_MEM
++};
++
++struct resource boot_param_res = {
++ .name = "Boot parameter",
++ .start = 0,
++ .end = 0,
++ .flags = IORESOURCE_BUSY | IORESOURCE_MEM
++};
++
++
++/*
++ * Do what every setup is needed on image and the
++ * reboot code buffer to allow us to avoid allocations
++ * later.
++ */
++int machine_kexec_prepare(struct kimage *image)
++{
++ void *control_code_buffer;
++ const unsigned long *func;
++
++ func = (unsigned long *)&relocate_new_kernel;
++ /* Pre-load control code buffer to minimize work in kexec path */
++ control_code_buffer = page_address(image->control_code_page);
++ memcpy((void *)control_code_buffer, (const void *)func[0],
++ relocate_new_kernel_size);
++ flush_icache_range((unsigned long)control_code_buffer,
++ (unsigned long)control_code_buffer + relocate_new_kernel_size);
++ ia64_kimage = image;
++
++ return 0;
++}
++
++void machine_kexec_cleanup(struct kimage *image)
++{
++}
++
++#ifndef CONFIG_XEN
++void machine_shutdown(void)
++{
++ int cpu;
++
++ for_each_online_cpu(cpu) {
++ if (cpu != smp_processor_id())
++ cpu_down(cpu);
++ }
++ kexec_disable_iosapic();
++}
++
++/*
++ * Do not allocate memory (or fail in any way) in machine_kexec().
++ * We are past the point of no return, committed to rebooting now.
++ */
++extern void *efi_get_pal_addr(void);
++static void ia64_machine_kexec(struct unw_frame_info *info, void *arg)
++{
++ struct kimage *image = arg;
++ relocate_new_kernel_t rnk;
++ void *pal_addr = efi_get_pal_addr();
++ unsigned long code_addr = (unsigned long)page_address(image->control_code_page);
++ unsigned long vector;
++ int ii;
++
++ if (image->type == KEXEC_TYPE_CRASH) {
++ crash_save_this_cpu();
++ current->thread.ksp = (__u64)info->sw - 16;
++ }
++
++ /* Interrupts aren't acceptable while we reboot */
++ local_irq_disable();
++
++ /* Mask CMC and Performance Monitor interrupts */
++ ia64_setreg(_IA64_REG_CR_PMV, 1 << 16);
++ ia64_setreg(_IA64_REG_CR_CMCV, 1 << 16);
++
++ /* Mask ITV and Local Redirect Registers */
++ ia64_set_itv(1 << 16);
++ ia64_set_lrr0(1 << 16);
++ ia64_set_lrr1(1 << 16);
++
++ /* terminate possible nested in-service interrupts */
++ for (ii = 0; ii < 16; ii++)
++ ia64_eoi();
++
++ /* unmask TPR and clear any pending interrupts */
++ ia64_setreg(_IA64_REG_CR_TPR, 0);
++ ia64_srlz_d();
++ vector = ia64_get_ivr();
++ while (vector != IA64_SPURIOUS_INT_VECTOR) {
++ ia64_eoi();
++ vector = ia64_get_ivr();
++ }
++ platform_kernel_launch_event();
++ rnk = (relocate_new_kernel_t)&code_addr;
++ (*rnk)(image->head, image->start, ia64_boot_param,
++ GRANULEROUNDDOWN((unsigned long) pal_addr));
++ BUG();
++}
++
++void machine_kexec(struct kimage *image)
++{
++ unw_init_running(ia64_machine_kexec, image);
++ for(;;);
++}
++#else /* CONFIG_XEN */
++void machine_kexec_setup_load_arg(xen_kexec_image_t *xki,struct kimage *image)
++{
++ xki->reboot_code_buffer =
++ kexec_page_to_pfn(image->control_code_page) << PAGE_SHIFT;
++}
++#endif /* CONFIG_XEN */
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/mca.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/mca.c
+--- linux-2.6.18.8/arch/ia64/kernel/mca.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/mca.c 2008-02-15 16:21:49.000000000 -0800
+@@ -79,6 +79,7 @@
+ #include <asm/system.h>
+ #include <asm/sal.h>
+ #include <asm/mca.h>
++#include <asm/kexec.h>
+
+ #include <asm/irq.h>
+ #include <asm/hw_irq.h>
+@@ -160,11 +161,33 @@ typedef struct ia64_state_log_s
+
+ static ia64_state_log_t ia64_state_log[IA64_MAX_LOG_TYPES];
+
++#ifdef CONFIG_XEN
++DEFINE_SPINLOCK(ia64_mca_xencomm_lock);
++LIST_HEAD(ia64_mca_xencomm_list);
++
++#define IA64_MCA_XENCOMM_ALLOCATE(rec, desc) \
++ if (is_running_on_xen()) { \
++ ia64_mca_xencomm_t *entry; \
++ entry = alloc_bootmem(sizeof(ia64_mca_xencomm_t)); \
++ entry->record = rec; \
++ entry->handle = desc; \
++ list_add(&entry->list, &ia64_mca_xencomm_list); \
++ }
++#define IA64_LOG_ALLOCATE(it, size) \
++ {ia64_err_rec_t *rec; \
++ ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)] = rec = \
++ (ia64_err_rec_t *)alloc_bootmem(size); \
++ IA64_MCA_XENCOMM_ALLOCATE(rec, xencomm_map(rec, size)); \
++ ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)] = rec = \
++ (ia64_err_rec_t *)alloc_bootmem(size); \
++ IA64_MCA_XENCOMM_ALLOCATE(rec, xencomm_map(rec, size));}
++#else
+ #define IA64_LOG_ALLOCATE(it, size) \
+ {ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)] = \
+ (ia64_err_rec_t *)alloc_bootmem(size); \
+ ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)] = \
+ (ia64_err_rec_t *)alloc_bootmem(size);}
++#endif
+ #define IA64_LOG_LOCK_INIT(it) spin_lock_init(&ia64_state_log[it].isl_lock)
+ #define IA64_LOG_LOCK(it) spin_lock_irqsave(&ia64_state_log[it].isl_lock, s)
+ #define IA64_LOG_UNLOCK(it) spin_unlock_irqrestore(&ia64_state_log[it].isl_lock,s)
+@@ -1066,7 +1089,12 @@ ia64_mca_handler(struct pt_regs *regs, s
+ rh->severity = sal_log_severity_corrected;
+ ia64_sal_clear_state_info(SAL_INFO_TYPE_MCA);
+ sos->os_status = IA64_MCA_CORRECTED;
+- }
++ } else {
++#ifdef CONFIG_KEXEC
++ atomic_set(&kdump_in_progress, 1);
++ monarch_cpu = -1;
++#endif
++ }
+ if (notify_die(DIE_MCA_MONARCH_LEAVE, "MCA", regs, (long)&nd, 0, recover)
+ == NOTIFY_STOP)
+ ia64_mca_spin(__FUNCTION__);
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/pal.S linux-2.6.18-xen-3.2.0/arch/ia64/kernel/pal.S
+--- linux-2.6.18.8/arch/ia64/kernel/pal.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/pal.S 2008-02-15 16:21:49.000000000 -0800
@@ -16,6 +16,7 @@
#include <asm/processor.h>
@@ -23247,97 +24647,55 @@ 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-11-14 15:35:27.000000000 -0800
-@@ -184,6 +184,69 @@ patch_brl_fsys_bubble_down (unsigned lon
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/patch.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/patch.c
+--- linux-2.6.18.8/arch/ia64/kernel/patch.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/patch.c 2008-02-15 16:21:49.000000000 -0800
+@@ -184,9 +184,37 @@ patch_brl_fsys_bubble_down (unsigned lon
ia64_srlz_i();
}
-+#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT
-+extern char __start_gate_running_on_xen_patchlist[];
-+extern char __end_gate_running_on_xen_patchlist[];
-+
-+void
-+patch_running_on_xen(unsigned long start, unsigned long end)
++#ifdef CONFIG_XEN
++void __init
++ia64_patch_gate_xen (void)
+{
-+ extern int running_on_xen;
-+ s32 *offp = (s32 *)start;
-+ u64 ip;
-+
-+ while (offp < (s32 *)end) {
-+ ip = (u64)ia64_imva((char *)offp + *offp);
-+ ia64_patch_imm64(ip, (u64)&running_on_xen);
-+ ia64_fc((void *)ip);
-+ ++offp;
-+ }
-+ ia64_sync_i();
-+ ia64_srlz_i();
-+}
++ extern char __start_gate_mckinley_e9_patchlist_xen[], __end_gate_mckinley_e9_patchlist_xen[];
++ extern char __start_gate_vtop_patchlist_xen[], __end_gate_vtop_patchlist_xen[];
++ extern char __start_gate_fsyscall_patchlist_xen[], __end_gate_fsyscall_patchlist_xen[];
++ extern char __start_gate_brl_fsys_bubble_down_patchlist_xen[], __end_gate_brl_fsys_bubble_down_patchlist_xen[];
++# define START(name) ((unsigned long) __start_gate_##name##_patchlist_xen)
++# define END(name) ((unsigned long)__end_gate_##name##_patchlist_xen)
+
-+static void
-+patch_brl_symaddr(unsigned long start, unsigned long end,
-+ unsigned long symaddr)
-+{
-+ s32 *offp = (s32 *)start;
-+ u64 ip;
++ patch_fsyscall_table(START(fsyscall), END(fsyscall));
++ patch_brl_fsys_bubble_down(START(brl_fsys_bubble_down), END(brl_fsys_bubble_down));
++ ia64_patch_vtop(START(vtop), END(vtop));
++ ia64_patch_mckinley_e9(START(mckinley_e9), END(mckinley_e9));
+
-+ while (offp < (s32 *)end) {
-+ ip = (u64)offp + *offp;
-+ ia64_patch_imm60((u64)ia64_imva((void *)ip),
-+ (u64)(symaddr - (ip & -16)) / 16);
-+ ia64_fc((void *)ip);
-+ ++offp;
-+ }
-+ ia64_sync_i();
-+ ia64_srlz_i();
-+}
-+
-+#define EXTERN_PATCHLIST(name) \
-+ extern char __start_gate_brl_##name##_patchlist[]; \
-+ extern char __end_gate_brl_##name##_patchlist[]; \
-+ extern char name[]
-+
-+#define PATCH_BRL_SYMADDR(name) \
-+ patch_brl_symaddr((unsigned long)__start_gate_brl_##name##_patchlist, \
-+ (unsigned long)__end_gate_brl_##name##_patchlist, \
-+ (unsigned long)name)
-+
-+static void
-+patch_brl_in_vdso(void)
-+{
-+ EXTERN_PATCHLIST(xen_ssm_i_0);
-+ EXTERN_PATCHLIST(xen_ssm_i_1);
-+
-+ PATCH_BRL_SYMADDR(xen_ssm_i_0);
-+ PATCH_BRL_SYMADDR(xen_ssm_i_1);
++# undef START
++# undef END
+}
+#else
-+#define patch_running_on_xen(start, end) do { } while (0)
-+#define patch_brl_in_vdso() do { } while (0)
++#define ia64_patch_gate_xen() do { } while (0)
+#endif
+
void __init
ia64_patch_gate (void)
{
-@@ -192,6 +255,10 @@ ia64_patch_gate (void)
++ if (is_running_on_xen()) {
++ ia64_patch_gate_xen();
++ return;
++ }
++
+ # define START(name) ((unsigned long) __start_gate_##name##_patchlist)
+ # define END(name) ((unsigned long)__end_gate_##name##_patchlist)
- patch_fsyscall_table(START(fsyscall), END(fsyscall));
- patch_brl_fsys_bubble_down(START(brl_fsys_bubble_down), END(brl_fsys_bubble_down));
-+#ifdef CONFIG_XEN
-+ patch_running_on_xen(START(running_on_xen), END(running_on_xen));
-+ patch_brl_in_vdso();
-+#endif
- ia64_patch_vtop(START(vtop), END(vtop));
- ia64_patch_mckinley_e9(START(mckinley_e9), END(mckinley_e9));
- }
-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-11-14 15:35:27.000000000 -0800
-@@ -52,6 +52,28 @@
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/perfmon.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/perfmon.c
+--- linux-2.6.18.8/arch/ia64/kernel/perfmon.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/perfmon.c 2008-02-15 16:21:49.000000000 -0800
+@@ -52,6 +52,31 @@
#include <asm/delay.h>
#ifdef CONFIG_PERFMON
++#include <asm/hypervisor.h>
+#ifdef CONFIG_XEN
+//#include <xen/xenoprof.h>
+#include <xen/interface/xenoprof.h>
@@ -23357,13 +24715,15 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
+#define init_xenoprof_primary(is_primary) do { } while (0)
+#define is_xenoprof_primary() (0)
+#define XEN_NOT_SUPPORTED_YET do { } while (0)
-+#define HYPERVISOR_perfmon_op(cmd, arg, count) do { } while (0)
++#define HYPERVISOR_perfmon_op(cmd, arg, count) (0)
++#define HYPERVISOR_xenoprof_op(op, arg) ({(void)arg;0;})
++struct xenoprof_init { /* dummy */ };
+#endif
+
/*
* perfmon context state
*/
-@@ -1514,6 +1536,7 @@ pfm_read(struct file *filp, char __user
+@@ -1514,6 +1539,7 @@ pfm_read(struct file *filp, char __user
ssize_t ret;
unsigned long flags;
DECLARE_WAITQUEUE(wait, current);
@@ -23371,7 +24731,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
if (PFM_IS_FILE(filp) == 0) {
printk(KERN_ERR "perfmon: pfm_poll: bad magic [%d]\n", current->pid);
return -EINVAL;
-@@ -2112,6 +2135,15 @@ doit:
+@@ -2112,6 +2138,15 @@ doit:
*/
if (free_possible) pfm_context_free(ctx);
@@ -23387,7 +24747,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
return 0;
}
-@@ -2735,6 +2767,23 @@ pfm_context_create(pfm_context_t *ctx, v
+@@ -2735,6 +2770,23 @@ pfm_context_create(pfm_context_t *ctx, v
*/
pfm_reset_pmu_state(ctx);
@@ -23411,7 +24771,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
return 0;
buffer_error:
-@@ -2871,6 +2920,12 @@ pfm_write_pmcs(pfm_context_t *ctx, void
+@@ -2871,6 +2923,12 @@ pfm_write_pmcs(pfm_context_t *ctx, void
pfm_reg_check_t wr_func;
#define PFM_CHECK_PMC_PM(x, y, z) ((x)->ctx_fl_system ^ PMC_PM(y, z))
@@ -23424,7 +24784,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
state = ctx->ctx_state;
is_loaded = state == PFM_CTX_LOADED ? 1 : 0;
is_system = ctx->ctx_fl_system;
-@@ -3111,6 +3166,12 @@ pfm_write_pmds(pfm_context_t *ctx, void
+@@ -3111,6 +3169,12 @@ pfm_write_pmds(pfm_context_t *ctx, void
int ret = -EINVAL;
pfm_reg_check_t wr_func;
@@ -23437,7 +24797,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
state = ctx->ctx_state;
is_loaded = state == PFM_CTX_LOADED ? 1 : 0;
-@@ -3308,6 +3369,7 @@ pfm_read_pmds(pfm_context_t *ctx, void *
+@@ -3308,6 +3372,7 @@ pfm_read_pmds(pfm_context_t *ctx, void *
int is_loaded, is_system, is_counting, expert_mode;
int ret = -EINVAL;
pfm_reg_check_t rd_func;
@@ -23445,7 +24805,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
/*
* access is possible when loaded only for
-@@ -3559,6 +3621,7 @@ pfm_restart(pfm_context_t *ctx, void *ar
+@@ -3559,6 +3624,7 @@ pfm_restart(pfm_context_t *ctx, void *ar
pfm_ovfl_ctrl_t rst_ctrl;
int state, is_system;
int ret = 0;
@@ -23453,7 +24813,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
state = ctx->ctx_state;
fmt = ctx->ctx_buf_fmt;
-@@ -3708,6 +3771,7 @@ static int
+@@ -3708,6 +3774,7 @@ static int
pfm_debug(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
{
unsigned int m = *(unsigned int *)arg;
@@ -23461,7 +24821,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
pfm_sysctl.debug = m == 0 ? 0 : 1;
-@@ -3978,6 +4042,8 @@ pfm_get_features(pfm_context_t *ctx, voi
+@@ -3978,6 +4045,8 @@ pfm_get_features(pfm_context_t *ctx, voi
{
pfarg_features_t *req = (pfarg_features_t *)arg;
@@ -23470,7 +24830,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
req->ft_version = PFM_VERSION;
return 0;
}
-@@ -3989,6 +4055,12 @@ pfm_stop(pfm_context_t *ctx, void *arg,
+@@ -3989,6 +4058,12 @@ pfm_stop(pfm_context_t *ctx, void *arg,
struct task_struct *task = PFM_CTX_TASK(ctx);
int state, is_system;
@@ -23483,7 +24843,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
state = ctx->ctx_state;
is_system = ctx->ctx_fl_system;
-@@ -4077,6 +4149,11 @@ pfm_start(pfm_context_t *ctx, void *arg,
+@@ -4077,6 +4152,11 @@ pfm_start(pfm_context_t *ctx, void *arg,
struct pt_regs *tregs;
int state, is_system;
@@ -23495,7 +24855,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
state = ctx->ctx_state;
is_system = ctx->ctx_fl_system;
-@@ -4159,6 +4236,7 @@ pfm_get_pmc_reset(pfm_context_t *ctx, vo
+@@ -4159,6 +4239,7 @@ pfm_get_pmc_reset(pfm_context_t *ctx, vo
unsigned int cnum;
int i;
int ret = -EINVAL;
@@ -23503,7 +24863,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
for (i = 0; i < count; i++, req++) {
-@@ -4217,6 +4295,11 @@ pfm_context_load(pfm_context_t *ctx, voi
+@@ -4217,6 +4298,11 @@ pfm_context_load(pfm_context_t *ctx, voi
int ret = 0;
int state, is_system, set_dbregs = 0;
@@ -23515,7 +24875,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
state = ctx->ctx_state;
is_system = ctx->ctx_fl_system;
/*
-@@ -4465,6 +4548,12 @@ pfm_context_unload(pfm_context_t *ctx, v
+@@ -4465,6 +4551,12 @@ pfm_context_unload(pfm_context_t *ctx, v
int prev_state, is_system;
int ret;
@@ -23528,10 +24888,463 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/perfmon.c tmp-linux-2.6-xen.pa
DPRINT(("ctx_state=%d task [%d]\n", ctx->ctx_state, task ? task->pid : -1));
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-11-14 15:35:27.000000000 -0800
-@@ -60,6 +60,12 @@
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/relocate_kernel.S linux-2.6.18-xen-3.2.0/arch/ia64/kernel/relocate_kernel.S
+--- linux-2.6.18.8/arch/ia64/kernel/relocate_kernel.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/relocate_kernel.S 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,380 @@
++/*
++ * arch/ia64/kernel/relocate_kernel.S
++ *
++ * Relocate kexec'able kernel and start it
++ *
++ * Copyright (C) 2005 Hewlett-Packard Development Company, L.P.
++ * Copyright (C) 2005 Khalid Aziz <khalid.aziz@hp.com>
++ * Copyright (C) 2005 Intel Corp, Zou Nan hai <nanhai.zou@intel.com>
++ *
++ * This source code is licensed under the GNU General Public License,
++ * Version 2. See the file COPYING for more details.
++ */
++#include <asm/asmmacro.h>
++#include <asm/kregs.h>
++#include <asm/page.h>
++#include <asm/pgtable.h>
++#include <asm/mca_asm.h>
++
++ /* Must be relocatable PIC code callable as a C function
++ */
++GLOBAL_ENTRY(relocate_new_kernel)
++ .prologue
++#ifdef CONFIG_XEN
++ alloc r31=ar.pfs,8,0,0,0
++#else
++ alloc r31=ar.pfs,4,0,0,0
++#endif
++ .body
++.reloc_entry:
++{
++ rsm psr.i| psr.ic
++ mov r2=ip
++}
++ ;;
++{
++ flushrs // must be first insn in group
++ srlz.i
++}
++ ;;
++#ifdef CONFIG_XEN
++ dep r2=0,r2,60,4 //to physical address
++#else
++ dep r2=0,r2,61,3 //to physical address
++#endif
++ ;;
++ //first switch to physical mode
++ add r3=1f-.reloc_entry, r2
++ movl r16 = IA64_PSR_AC|IA64_PSR_BN|IA64_PSR_IC
++ mov ar.rsc=0 // put RSE in enforced lazy mode
++ ;;
++ add sp=(memory_stack_end - 16 - .reloc_entry),r2
++ add r8=(register_stack - .reloc_entry),r2
++ ;;
++ mov r18=ar.rnat
++ mov ar.bspstore=r8
++ ;;
++ mov cr.ipsr=r16
++ mov cr.iip=r3
++ mov cr.ifs=r0
++ srlz.i
++ ;;
++ mov ar.rnat=r18
++ rfi
++ ;;
++1:
++ //physical mode code begin
++ mov b6=in1
++#ifdef CONFIG_XEN
++ dep r28=0,in2,60,4 //to physical address
++#else
++ dep r28=0,in2,61,3 //to physical address
++#endif
++
++ // purge all TC entries
++#define O(member) IA64_CPUINFO_##member##_OFFSET
++#ifdef CONFIG_XEN
++ mov r2=in4 // load phys addr of cpu_info into r2
++#else
++ GET_THIS_PADDR(r2, cpu_info) // load phys addr of cpu_info into r2
++#endif
++ ;;
++ addl r17=O(PTCE_STRIDE),r2
++ addl r2=O(PTCE_BASE),r2
++ ;;
++ ld8 r18=[r2],(O(PTCE_COUNT)-O(PTCE_BASE));; // r18=ptce_base
++ ld4 r19=[r2],4 // r19=ptce_count[0]
++ ld4 r21=[r17],4 // r21=ptce_stride[0]
++ ;;
++ ld4 r20=[r2] // r20=ptce_count[1]
++ ld4 r22=[r17] // r22=ptce_stride[1]
++ mov r24=r0
++ ;;
++ adds r20=-1,r20
++ ;;
++#undef O
++2:
++ cmp.ltu p6,p7=r24,r19
++(p7) br.cond.dpnt.few 4f
++ mov ar.lc=r20
++3:
++ ptc.e r18
++ ;;
++ add r18=r22,r18
++ br.cloop.sptk.few 3b
++ ;;
++ add r18=r21,r18
++ add r24=1,r24
++ ;;
++ br.sptk.few 2b
++4:
++ srlz.i
++ ;;
++ //purge TR entry for kernel text and data
++#ifdef CONFIG_XEN
++ mov r16=in5
++#else
++ movl r16=KERNEL_START
++#endif
++ mov r18=KERNEL_TR_PAGE_SHIFT<<2
++ ;;
++ ptr.i r16, r18
++ ptr.d r16, r18
++ ;;
++ srlz.i
++ ;;
++
++ // purge TR entry for percpu data
++ movl r16=PERCPU_ADDR
++ mov r18=PERCPU_PAGE_SHIFT<<2
++ ;;
++ ptr.d r16,r18
++ ;;
++ srlz.d
++ ;;
++
++ // purge TR entry for pal code
++ mov r16=in3
++ mov r18=IA64_GRANULE_SHIFT<<2
++ ;;
++ ptr.i r16,r18
++ ;;
++ srlz.i
++ ;;
++
++ // purge TR entry for stack
++ mov r16=IA64_KR(CURRENT_STACK)
++ ;;
++ shl r16=r16,IA64_GRANULE_SHIFT
++#ifdef CONFIG_XEN
++ mov r19=in6
++#else
++ movl r19=PAGE_OFFSET
++#endif
++ ;;
++ add r16=r19,r16
++ mov r18=IA64_GRANULE_SHIFT<<2
++ ;;
++ ptr.d r16,r18
++ ;;
++ srlz.i
++ ;;
++
++#ifdef XEN
++ /* XXX: Is this neccessary ??? */
++ // purge TR entry for VHPT
++ mov r16=in7
++ ;;
++ dep r16=0,r16,0,IA64_GRANULE_SHIFT
++ mov r18=IA64_GRANULE_SHIFT<<2
++ ;;
++ ptr.d r16,r18
++ ;;
++ srlz.i
++ ;;
++#endif
++
++ //copy segments
++ movl r16=PAGE_MASK
++ mov r30=in0 // in0 is page_list
++ br.sptk.few .dest_page
++ ;;
++.loop:
++ ld8 r30=[in0], 8;;
++.dest_page:
++ tbit.z p0, p6=r30, 0;; // 0x1 dest page
++(p6) and r17=r30, r16
++(p6) br.cond.sptk.few .loop;;
++
++ tbit.z p0, p6=r30, 1;; // 0x2 indirect page
++(p6) and in0=r30, r16
++(p6) br.cond.sptk.few .loop;;
++
++ tbit.z p0, p6=r30, 2;; // 0x4 end flag
++(p6) br.cond.sptk.few .end_loop;;
++
++ tbit.z p6, p0=r30, 3;; // 0x8 source page
++(p6) br.cond.sptk.few .loop
++
++ and r18=r30, r16
++
++ // simple copy page, may optimize later
++ movl r14=PAGE_SIZE/8 - 1;;
++ mov ar.lc=r14;;
++1:
++ ld8 r14=[r18], 8;;
++ st8 [r17]=r14;;
++ fc.i r17
++ add r17=8, r17
++ br.ctop.sptk.few 1b
++ br.sptk.few .loop
++ ;;
++
++.end_loop:
++ sync.i // for fc.i
++ ;;
++ srlz.i
++ ;;
++ srlz.d
++ ;;
++ br.call.sptk.many b0=b6;;
++
++.align 32
++memory_stack:
++#ifdef CONFIG_XEN
++ .fill 4096, 1, 0
++#else
++ .fill 8192, 1, 0
++#endif
++memory_stack_end:
++register_stack:
++#ifdef CONFIG_XEN
++ .fill 4096, 1, 0
++#else
++ .fill 8192, 1, 0
++#endif
++register_stack_end:
++relocate_new_kernel_end:
++END(relocate_new_kernel)
++
++.global relocate_new_kernel_size
++relocate_new_kernel_size:
++ data8 relocate_new_kernel_end - relocate_new_kernel
++
++GLOBAL_ENTRY(ia64_dump_cpu_regs)
++ .prologue
++ alloc loc0=ar.pfs,1,2,0,0
++ .body
++ mov ar.rsc=0 // put RSE in enforced lazy mode
++ add loc1=4*8, in0 // save r4 and r5 first
++ ;;
++{
++ flushrs // flush dirty regs to backing store
++ srlz.i
++}
++ st8 [loc1]=r4, 8
++ ;;
++ st8 [loc1]=r5, 8
++ ;;
++ add loc1=32*8, in0
++ mov r4=ar.rnat
++ ;;
++ st8 [in0]=r0, 8 // r0
++ st8 [loc1]=r4, 8 // rnat
++ mov r5=pr
++ ;;
++ st8 [in0]=r1, 8 // r1
++ st8 [loc1]=r5, 8 // pr
++ mov r4=b0
++ ;;
++ st8 [in0]=r2, 8 // r2
++ st8 [loc1]=r4, 8 // b0
++ mov r5=b1;
++ ;;
++ st8 [in0]=r3, 24 // r3
++ st8 [loc1]=r5, 8 // b1
++ mov r4=b2
++ ;;
++ st8 [in0]=r6, 8 // r6
++ st8 [loc1]=r4, 8 // b2
++ mov r5=b3
++ ;;
++ st8 [in0]=r7, 8 // r7
++ st8 [loc1]=r5, 8 // b3
++ mov r4=b4
++ ;;
++ st8 [in0]=r8, 8 // r8
++ st8 [loc1]=r4, 8 // b4
++ mov r5=b5
++ ;;
++ st8 [in0]=r9, 8 // r9
++ st8 [loc1]=r5, 8 // b5
++ mov r4=b6
++ ;;
++ st8 [in0]=r10, 8 // r10
++ st8 [loc1]=r5, 8 // b6
++ mov r5=b7
++ ;;
++ st8 [in0]=r11, 8 // r11
++ st8 [loc1]=r5, 8 // b7
++ mov r4=b0
++ ;;
++ st8 [in0]=r12, 8 // r12
++ st8 [loc1]=r4, 8 // ip
++ mov r5=loc0
++ ;;
++ st8 [in0]=r13, 8 // r13
++ extr.u r5=r5, 0, 38 // ar.pfs.pfm
++ mov r4=r0 // user mask
++ ;;
++ st8 [in0]=r14, 8 // r14
++ st8 [loc1]=r5, 8 // cfm
++ ;;
++ st8 [in0]=r15, 8 // r15
++ st8 [loc1]=r4, 8 // user mask
++ mov r5=ar.rsc
++ ;;
++ st8 [in0]=r16, 8 // r16
++ st8 [loc1]=r5, 8 // ar.rsc
++ mov r4=ar.bsp
++ ;;
++ st8 [in0]=r17, 8 // r17
++ st8 [loc1]=r4, 8 // ar.bsp
++ mov r5=ar.bspstore
++ ;;
++ st8 [in0]=r18, 8 // r18
++ st8 [loc1]=r5, 8 // ar.bspstore
++ mov r4=ar.rnat
++ ;;
++ st8 [in0]=r19, 8 // r19
++ st8 [loc1]=r4, 8 // ar.rnat
++ mov r5=ar.ccv
++ ;;
++ st8 [in0]=r20, 8 // r20
++ st8 [loc1]=r5, 8 // ar.ccv
++ mov r4=ar.unat
++ ;;
++ st8 [in0]=r21, 8 // r21
++ st8 [loc1]=r4, 8 // ar.unat
++ mov r5 = ar.fpsr
++ ;;
++ st8 [in0]=r22, 8 // r22
++ st8 [loc1]=r5, 8 // ar.fpsr
++ mov r4 = ar.unat
++ ;;
++ st8 [in0]=r23, 8 // r23
++ st8 [loc1]=r4, 8 // unat
++ mov r5 = ar.fpsr
++ ;;
++ st8 [in0]=r24, 8 // r24
++ st8 [loc1]=r5, 8 // fpsr
++ mov r4 = ar.pfs
++ ;;
++ st8 [in0]=r25, 8 // r25
++ st8 [loc1]=r4, 8 // ar.pfs
++ mov r5 = ar.lc
++ ;;
++ st8 [in0]=r26, 8 // r26
++ st8 [loc1]=r5, 8 // ar.lc
++ mov r4 = ar.ec
++ ;;
++ st8 [in0]=r27, 8 // r27
++ st8 [loc1]=r4, 8 // ar.ec
++ mov r5 = ar.csd
++ ;;
++ st8 [in0]=r28, 8 // r28
++ st8 [loc1]=r5, 8 // ar.csd
++ mov r4 = ar.ssd
++ ;;
++ st8 [in0]=r29, 8 // r29
++ st8 [loc1]=r4, 8 // ar.ssd
++ ;;
++ st8 [in0]=r30, 8 // r30
++ ;;
++ st8 [in0]=r31, 8 // r31
++ mov ar.pfs=loc0
++ ;;
++ br.ret.sptk.many rp
++END(ia64_dump_cpu_regs)
++
++
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/salinfo.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/salinfo.c
+--- linux-2.6.18.8/arch/ia64/kernel/salinfo.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/salinfo.c 2008-02-15 16:21:49.000000000 -0800
+@@ -375,6 +375,25 @@ salinfo_log_open(struct inode *inode, st
+ data->open = 0;
+ return -ENOMEM;
+ }
++#ifdef CONFIG_XEN
++ if (is_running_on_xen()) {
++ ia64_mca_xencomm_t *entry;
++ unsigned long flags;
++
++ entry = vmalloc(sizeof(ia64_mca_xencomm_t));
++ if (!entry) {
++ data->open = 0;
++ vfree(data->log_buffer);
++ return -ENOMEM;
++ }
++ entry->record = data->log_buffer;
++ entry->handle = xencomm_map(data->log_buffer,
++ ia64_sal_get_state_info_size(data->type));
++ spin_lock_irqsave(&ia64_mca_xencomm_lock, flags);
++ list_add(&entry->list, &ia64_mca_xencomm_list);
++ spin_unlock_irqrestore(&ia64_mca_xencomm_lock, flags);
++ }
++#endif
+
+ return 0;
+ }
+@@ -386,6 +405,30 @@ salinfo_log_release(struct inode *inode,
+ struct salinfo_data *data = entry->data;
+
+ if (data->state == STATE_NO_DATA) {
++#ifdef CONFIG_XEN
++ if (is_running_on_xen()) {
++ struct list_head *pos, *n;
++ ia64_mca_xencomm_t *found_entry = NULL;
++ unsigned long flags;
++
++ spin_lock_irqsave(&ia64_mca_xencomm_lock, flags);
++ list_for_each_safe(pos, n, &ia64_mca_xencomm_list) {
++ ia64_mca_xencomm_t *entry;
++
++ entry = list_entry(pos, ia64_mca_xencomm_t, list);
++ if (entry->record == data->log_buffer) {
++ list_del(&entry->list);
++ found_entry = entry;
++ break;
++ }
++ }
++ spin_unlock_irqrestore(&ia64_mca_xencomm_lock, flags);
++ if (found_entry) {
++ xencomm_free(found_entry->handle);
++ vfree(found_entry);
++ }
++ }
++#endif
+ vfree(data->log_buffer);
+ vfree(data->oemdata);
+ data->log_buffer = NULL;
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/setup.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/setup.c
+--- linux-2.6.18.8/arch/ia64/kernel/setup.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/setup.c 2008-02-15 16:21:49.000000000 -0800
+@@ -43,6 +43,8 @@
+ #include <linux/initrd.h>
+ #include <linux/pm.h>
+ #include <linux/cpufreq.h>
++#include <linux/kexec.h>
++#include <linux/crash_dump.h>
+
+ #include <asm/ia32.h>
+ #include <asm/machvec.h>
+@@ -60,6 +62,12 @@
#include <asm/system.h>
#include <asm/unistd.h>
#include <asm/system.h>
@@ -23544,7 +25357,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/setup.c tmp-linux-2.6-xen.patc
#if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
# error "struct cpuinfo_ia64 too big!"
-@@ -70,6 +76,34 @@ unsigned long __per_cpu_offset[NR_CPUS];
+@@ -70,6 +78,34 @@ unsigned long __per_cpu_offset[NR_CPUS];
EXPORT_SYMBOL(__per_cpu_offset);
#endif
@@ -23579,7 +25392,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/setup.c tmp-linux-2.6-xen.patc
extern void ia64_setup_printk_clock(void);
DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info);
-@@ -242,6 +276,14 @@ reserve_memory (void)
+@@ -242,6 +278,14 @@ reserve_memory (void)
rsvd_region[n].end = (unsigned long) ia64_imva(_end);
n++;
@@ -23594,59 +25407,148 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/setup.c tmp-linux-2.6-xen.patc
#ifdef CONFIG_BLK_DEV_INITRD
if (ia64_boot_param->initrd_start) {
rsvd_region[n].start = (unsigned long)__va(ia64_boot_param->initrd_start);
-@@ -402,6 +444,19 @@ setup_arch (char **cmdline_p)
+@@ -253,6 +297,56 @@ reserve_memory (void)
+ efi_memmap_init(&rsvd_region[n].start, &rsvd_region[n].end);
+ n++;
+
++#ifdef CONFIG_KEXEC
++ /* crashkernel=size@offset specifies the size to reserve for a crash
++ * kernel. If offset is 0, then it is determined automatically.
++ * By reserving this memory we guarantee that linux never set's it
++ * up as a DMA target.Useful for holding code to do something
++ * appropriate after a kernel panic.
++ */
++ {
++ char *from = strstr(saved_command_line, "crashkernel=");
++ unsigned long base, size;
++#ifdef CONFIG_XEN
++ if (is_initial_xendomain() && from)
++ printk("Ignoring crashkernel command line, "
++ "parameter will be supplied by xen\n");
++ else {
++#endif
++ if (from) {
++ size = memparse(from + 12, &from);
++ if (*from == '@')
++ base = memparse(from+1, &from);
++ else
++ base = 0;
++ if (size) {
++ if (!base) {
++ sort_regions(rsvd_region, n);
++ base = kdump_find_rsvd_region(size,
++ rsvd_region, n);
++ }
++ if (base != ~0UL) {
++ rsvd_region[n].start =
++ (unsigned long)__va(base);
++ rsvd_region[n].end =
++ (unsigned long)__va(base + size);
++ n++;
++ crashk_res.start = base;
++ crashk_res.end = base + size - 1;
++ }
++ }
++ }
++#ifdef CONFIG_XEN
++ }
++#endif
++ efi_memmap_res.start = ia64_boot_param->efi_memmap;
++ efi_memmap_res.end = efi_memmap_res.start +
++ ia64_boot_param->efi_memmap_size;
++ boot_param_res.start = kexec_virt_to_phys(ia64_boot_param);
++ boot_param_res.end = boot_param_res.start +
++ sizeof(*ia64_boot_param);
++ }
++#endif
+ /* end of memory marker */
+ rsvd_region[n].start = ~0UL;
+ rsvd_region[n].end = ~0UL;
+@@ -264,6 +358,7 @@ reserve_memory (void)
+ sort_regions(rsvd_region, num_rsvd_regions);
+ }
+
++
+ /**
+ * find_initrd - get initrd parameters from the boot parameter structure
+ *
+@@ -397,11 +492,49 @@ static __init int setup_nomca(char *s)
+ }
+ early_param("nomca", setup_nomca);
+
++#ifdef CONFIG_PROC_VMCORE
++/* elfcorehdr= specifies the location of elf core header
++ * stored by the crashed kernel.
++ */
++static int __init parse_elfcorehdr(char *arg)
++{
++ if (!arg)
++ return -EINVAL;
++
++ elfcorehdr_addr = memparse(arg, &arg);
++ return 0;
++}
++early_param("elfcorehdr", parse_elfcorehdr);
++#endif /* CONFIG_PROC_VMCORE */
++
+ void __init
+ setup_arch (char **cmdline_p)
{
++#ifdef CONFIG_XEN
++ shared_info_t *s = NULL;
++ if (is_running_on_xen()) {
++ s = HYPERVISOR_shared_info;
++ xen_start_info = __va(s->arch.start_info_pfn << PAGE_SHIFT);
++ }
++#endif
++
unw_init();
+#ifdef CONFIG_XEN
+ if (is_running_on_xen()) {
+ /* Must be done before any hypercall. */
-+ xencomm_init();
++ xencomm_initialize();
+
+ setup_xen_features();
+ /* Register a call for panic conditions. */
+ atomic_notifier_chain_register(&panic_notifier_list,
+ &xen_panic_block);
+ pm_power_off = xen_pm_power_off;
++
++ xen_ia64_enable_opt_feature();
+ }
+#endif
+
ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist);
*cmdline_p = __va(ia64_boot_param->command_line);
-@@ -478,14 +533,79 @@ setup_arch (char **cmdline_p)
- conswitchp = &vga_con;
- # endif
- }
+@@ -462,6 +595,57 @@ setup_arch (char **cmdline_p)
+ acpi_boot_init();
+ #endif
+
+#ifdef CONFIG_XEN
+ if (is_running_on_xen()) {
-+ shared_info_t *s = HYPERVISOR_shared_info;
-+
-+ xen_start_info = __va(s->arch.start_info_pfn << PAGE_SHIFT);
-+
+ printk("Running on Xen! start_info_pfn=0x%lx nr_pages=%ld "
+ "flags=0x%x\n", s->arch.start_info_pfn,
+ xen_start_info->nr_pages, xen_start_info->flags);
+
-+ if (!is_initial_xendomain()) {
-+#if !defined(CONFIG_VT) || !defined(CONFIG_DUMMY_CONSOLE)
-+ conswitchp = NULL;
-+#endif
-+ }
-+
+ /*
+ * If a console= is NOT specified, we assume using the
-+ * xencons console is desired. By default, this is ttyS0
-+ * for dom0 and tty0 for domU.
++ * xencons console is desired. By default, this is xvc0
++ * for both dom0 and domU.
+ */
+ if (!strstr(*cmdline_p, "console=")) {
-+ char *p, *q, name[5];
++ char *p, *q, name[5] = "xvc";
+ int offset = 0;
+
-+ if (is_initial_xendomain())
-+ strncpy(name, "ttyS", 4);
-+ else
++#if defined(CONFIG_VGA_CONSOLE)
++ /*
++ * conswitchp might be set intelligently from the
++ * PCDP code. If set to VGA console, use it.
++ */
++ if (is_initial_xendomain() && conswitchp == &vga_con)
+ strncpy(name, "tty", 3);
++#endif
+
+ p = strstr(*cmdline_p, "xencons=");
+
@@ -23673,47 +25575,114 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/setup.c tmp-linux-2.6-xen.patc
+ add_preferred_console(name, offset, NULL);
+ }
+ }
-+ xencons_early_setup();
+#endif
++
+ #ifdef CONFIG_VT
+ if (!conswitchp) {
+ # if defined(CONFIG_DUMMY_CONSOLE)
+@@ -481,11 +665,28 @@ setup_arch (char **cmdline_p)
#endif
-+
/* enable IA-64 Machine Check Abort Handling unless disabled */
+#ifdef CONFIG_XEN
-+ if (is_running_on_xen() && !is_initial_xendomain())
++ if (is_running_on_xen() && !is_initial_xendomain()) {
+ nomca = 1;
++#if !defined(CONFIG_VT) || !defined(CONFIG_DUMMY_CONSOLE)
++ conswitchp = NULL;
++#endif
++ }
+#endif
if (!nomca)
ia64_mca_init();
platform_setup(cmdline_p);
++#ifdef CONFIG_XEN
++ if (is_running_on_xen() && !ia64_platform_is("xen")) {
++ extern ia64_mv_setup_t xen_setup;
++ xen_setup(cmdline_p);
++ }
++#endif
paging_init();
+#ifdef CONFIG_XEN
-+ contiguous_bitmap_init(max_pfn);
++ xen_contiguous_bitmap_init(max_pfn);
+#endif
}
/*
-@@ -870,6 +990,15 @@ cpu_init (void)
+@@ -870,6 +1071,13 @@ cpu_init (void)
/* size of physical stacked register partition plus 8 bytes: */
__get_cpu_var(ia64_phys_stacked_size_p8) = num_phys_stacked*8 + 8;
platform_cpu_init();
-+
+#ifdef CONFIG_XEN
-+ /* Need to be moved into platform_cpu_init later */
-+ if (is_running_on_xen()) {
-+ extern void xen_smp_intr_init(void);
-+ xen_smp_intr_init();
++ if (is_running_on_xen() && !ia64_platform_is("xen")) {
++ extern ia64_mv_cpu_init_t xen_cpu_init;
++ xen_cpu_init();
+ }
+#endif
+
pm_idle = default_idle;
}
-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-11-16 16:18:13.000000000 -0800
-@@ -328,10 +328,14 @@ int
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/smp.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/smp.c
+--- linux-2.6.18.8/arch/ia64/kernel/smp.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/smp.c 2008-02-15 16:21:49.000000000 -0800
+@@ -30,6 +30,7 @@
+ #include <linux/delay.h>
+ #include <linux/efi.h>
+ #include <linux/bitops.h>
++#include <linux/kexec.h>
+
+ #include <asm/atomic.h>
+ #include <asm/current.h>
+@@ -66,6 +67,7 @@ static volatile struct call_data_struct
+
+ #define IPI_CALL_FUNC 0
+ #define IPI_CPU_STOP 1
++#define IPI_KDUMP_CPU_STOP 3
+
+ /* This needs to be cacheline aligned because it is written to by *other* CPUs. */
+ static DEFINE_PER_CPU(u64, ipi_operation) ____cacheline_aligned;
+@@ -155,7 +157,11 @@ handle_IPI (int irq, void *dev_id, struc
+ case IPI_CPU_STOP:
+ stop_this_cpu();
+ break;
+-
++#ifdef CONFIG_KEXEC
++ case IPI_KDUMP_CPU_STOP:
++ unw_init_running(kdump_cpu_freeze, NULL);
++ break;
++#endif
+ default:
+ printk(KERN_CRIT "Unknown IPI on CPU %d: %lu\n", this_cpu, which);
+ break;
+@@ -213,6 +219,26 @@ send_IPI_self (int op)
+ send_IPI_single(smp_processor_id(), op);
+ }
+
++#ifdef CONFIG_KEXEC
++void
++kdump_smp_send_stop()
++{
++ send_IPI_allbutself(IPI_KDUMP_CPU_STOP);
++}
++
++void
++kdump_smp_send_init()
++{
++ unsigned int cpu, self_cpu;
++ self_cpu = smp_processor_id();
++ for_each_online_cpu(cpu) {
++ if (cpu != self_cpu) {
++ if(kdump_status[cpu] == 0)
++ platform_send_ipi(cpu, 0, IA64_IPI_DM_INIT, 0);
++ }
++ }
++}
++#endif
+ /*
+ * Called with preeemption disabled.
+ */
+@@ -328,10 +354,14 @@ int
smp_call_function (void (*func) (void *info), void *info, int nonatomic, int wait)
{
struct call_data_struct data;
@@ -23730,7 +25699,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/smp.c tmp-linux-2.6-xen.patch/
/* Can deadlock when called with interrupts disabled */
WARN_ON(irqs_disabled());
-@@ -343,8 +347,6 @@ smp_call_function (void (*func) (void *i
+@@ -343,8 +373,6 @@ smp_call_function (void (*func) (void *i
if (wait)
atomic_set(&data.finished, 0);
@@ -23739,13 +25708,14 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/smp.c tmp-linux-2.6-xen.patch/
call_data = &data;
mb(); /* ensure store to call_data precedes setting of IPI_CALL_FUNC */
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-11-14 15:35:27.000000000 -0800
-@@ -29,6 +29,13 @@
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/time.c linux-2.6.18-xen-3.2.0/arch/ia64/kernel/time.c
+--- linux-2.6.18.8/arch/ia64/kernel/time.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/time.c 2008-02-15 16:21:49.000000000 -0800
+@@ -29,6 +29,14 @@
#include <asm/sections.h>
#include <asm/system.h>
++#include <asm/hypervisor.h>
+#ifdef CONFIG_XEN
+#include <linux/kernel_stat.h>
+#include <linux/posix-timers.h>
@@ -23756,7 +25726,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/time.c tmp-linux-2.6-xen.patch
extern unsigned long wall_jiffies;
volatile int time_keeper_id = 0; /* smp_processor_id() of time-keeper */
-@@ -40,16 +47,109 @@ EXPORT_SYMBOL(last_cli_ip);
+@@ -40,16 +48,109 @@ EXPORT_SYMBOL(last_cli_ip);
#endif
@@ -23866,7 +25836,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/time.c tmp-linux-2.6-xen.patch
if (unlikely(cpu_is_offline(smp_processor_id()))) {
return IRQ_HANDLED;
-@@ -65,6 +165,13 @@ timer_interrupt (int irq, void *dev_id,
+@@ -65,6 +166,13 @@ timer_interrupt (int irq, void *dev_id,
profile_tick(CPU_PROFILING, regs);
@@ -23880,7 +25850,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/time.c tmp-linux-2.6-xen.patch
while (1) {
update_process_times(user_mode(regs));
-@@ -88,6 +195,8 @@ timer_interrupt (int irq, void *dev_id,
+@@ -88,6 +196,8 @@ timer_interrupt (int irq, void *dev_id,
break;
}
@@ -23889,7 +25859,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,85 @@ static int __init nojitter_setup(char *s
+@@ -142,6 +252,85 @@ static int __init nojitter_setup(char *s
__setup("nojitter", nojitter_setup);
@@ -23975,7 +25945,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/time.c tmp-linux-2.6-xen.patch
void __devinit
ia64_init_itm (void)
-@@ -225,6 +413,12 @@ ia64_init_itm (void)
+@@ -225,6 +414,12 @@ ia64_init_itm (void)
register_time_interpolator(&itc_interpolator);
}
@@ -23988,22 +25958,116 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/kernel/time.c tmp-linux-2.6-xen.patch
/* 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/vmlinux.lds.S linux-2.6.18-xen-3.2.0/arch/ia64/kernel/vmlinux.lds.S
+--- linux-2.6.18.8/arch/ia64/kernel/vmlinux.lds.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/vmlinux.lds.S 2008-02-15 16:21:49.000000000 -0800
+@@ -183,6 +183,12 @@ SECTIONS
+ __start_gate_section = .;
+ *(.data.gate)
+ __stop_gate_section = .;
++#if defined(CONFIG_XEN)
++ . = ALIGN(PAGE_SIZE);
++ __start_xen_gate_section = .;
++ *(.data.gate.xen)
++ __stop_xen_gate_section = .;
++#endif
+ }
+ . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose kernel data */
+
+diff -rpuN linux-2.6.18.8/arch/ia64/kernel/xengate-data.S linux-2.6.18-xen-3.2.0/arch/ia64/kernel/xengate-data.S
+--- linux-2.6.18.8/arch/ia64/kernel/xengate-data.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/kernel/xengate-data.S 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,3 @@
++ .section .data.gate.xen, "aw"
++
++ .incbin "arch/ia64/kernel/xengate.so"
+diff -rpuN linux-2.6.18.8/arch/ia64/mm/contig.c linux-2.6.18-xen-3.2.0/arch/ia64/mm/contig.c
+--- linux-2.6.18.8/arch/ia64/mm/contig.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/mm/contig.c 2008-02-15 16:21:49.000000000 -0800
+@@ -18,6 +18,9 @@
+ #include <linux/efi.h>
+ #include <linux/mm.h>
+ #include <linux/swap.h>
++#ifdef CONFIG_XEN
++#include <linux/kexec.h>
++#endif
+
+ #include <asm/meminit.h>
+ #include <asm/pgalloc.h>
+@@ -172,8 +175,17 @@ find_memory (void)
+ /* Free all available memory, then mark bootmem-map as being in use. */
+ efi_memmap_walk(filter_rsvd_memory, free_bootmem);
+ reserve_bootmem(bootmap_start, bootmap_size);
++#if defined(CONFIG_XEN) && defined(CONFIG_KEXEC)
++ xen_machine_kexec_setup_resources();
++#endif
+
+ find_initrd();
++
++#ifdef CONFIG_CRASH_DUMP
++ /* If we are doing a crash dump, we still need to know the real mem
++ * size before original memory map is * reset. */
++ saved_max_pfn = max_pfn;
++#endif
+ }
+
+ #ifdef CONFIG_SMP
+diff -rpuN linux-2.6.18.8/arch/ia64/mm/init.c linux-2.6.18-xen-3.2.0/arch/ia64/mm/init.c
+--- linux-2.6.18.8/arch/ia64/mm/init.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/mm/init.c 2008-02-15 16:21:49.000000000 -0800
+@@ -303,16 +303,34 @@ static void __init
+ setup_gate (void)
+ {
+ struct page *page;
++ void *gate_page_addr = __start_gate_section;
++
++#ifdef CONFIG_XEN
++ unsigned long unused_gate;
++ extern char __start_xen_gate_section[];
++ if (is_running_on_xen()) {
++ gate_page_addr = __start_xen_gate_section;
++ unused_gate = (unsigned long)ia64_imva(__start_gate_section);
++ } else
++ unused_gate =
++ (unsigned long)ia64_imva(__start_xen_gate_section);
++#ifndef HAVE_BUGGY_SEGREL
++ ClearPageReserved(virt_to_page(unused_gate));
++ init_page_count(virt_to_page(unused_gate));
++ free_page(unused_gate);
++ ++totalram_pages;
++#endif
++#endif
+
+ /*
+ * Map the gate page twice: once read-only to export the ELF
+ * headers etc. and once execute-only page to enable
+ * privilege-promotion via "epc":
+ */
+- page = virt_to_page(ia64_imva(__start_gate_section));
++ page = virt_to_page(ia64_imva(gate_page_addr));
+ put_kernel_page(page, GATE_ADDR, PAGE_READONLY);
+ #ifdef HAVE_BUGGY_SEGREL
+- page = virt_to_page(ia64_imva(__start_gate_section + PAGE_SIZE));
++ page = virt_to_page(ia64_imva(gate_page_addr + PAGE_SIZE));
+ put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE);
+ #else
+ put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE);
+diff -rpuN linux-2.6.18.8/arch/ia64/mm/ioremap.c linux-2.6.18-xen-3.2.0/arch/ia64/mm/ioremap.c
+--- linux-2.6.18.8/arch/ia64/mm/ioremap.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/mm/ioremap.c 2008-02-15 16:21:49.000000000 -0800
@@ -16,6 +16,9 @@
static inline void __iomem *
__ioremap (unsigned long offset, unsigned long size)
{
+ offset = HYPERVISOR_ioremap(offset, size);
+ if (IS_ERR_VALUE(offset))
-+ return (void __iomem*)offset;
++ return NULL;
return (void __iomem *) (__IA64_UNCACHED_OFFSET | offset);
}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/oprofile/Makefile linux-2.6.18-xen-3.2.0/arch/ia64/oprofile/Makefile
+--- linux-2.6.18.8/arch/ia64/oprofile/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/oprofile/Makefile 2008-02-15 16:21:49.000000000 -0800
@@ -8,3 +8,7 @@ DRIVER_OBJS := $(addprefix ../../../driv
oprofile-y := $(DRIVER_OBJS) init.o backtrace.o
@@ -24012,18 +26076,19 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/Makefile tmp-linux-2.6-xen.p
+oprofile-$(CONFIG_PERFMON) += xenoprof.o \
+ ../../../drivers/xen/xenoprof/xenoprofile.o
+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-11-14 15:35:27.000000000 -0800
-@@ -11,6 +11,7 @@
+diff -rpuN linux-2.6.18.8/arch/ia64/oprofile/init.c linux-2.6.18-xen-3.2.0/arch/ia64/oprofile/init.c
+--- linux-2.6.18.8/arch/ia64/oprofile/init.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/oprofile/init.c 2008-02-15 16:21:49.000000000 -0800
+@@ -11,6 +11,8 @@
#include <linux/oprofile.h>
#include <linux/init.h>
#include <linux/errno.h>
++#include <asm/hypervisor.h>
+#include "oprofile_perfmon.h"
extern int perfmon_init(struct oprofile_operations * ops);
extern void perfmon_exit(void);
-@@ -20,6 +21,13 @@ int __init oprofile_arch_init(struct opr
+@@ -20,6 +22,13 @@ int __init oprofile_arch_init(struct opr
{
int ret = -ENODEV;
@@ -24037,7 +26102,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/init.c tmp-linux-2.6-xen.pat
#ifdef CONFIG_PERFMON
/* perfmon_init() can fail, but we have no way to report it */
ret = perfmon_init(ops);
-@@ -32,6 +40,12 @@ int __init oprofile_arch_init(struct opr
+@@ -32,6 +41,12 @@ int __init oprofile_arch_init(struct opr
void oprofile_arch_exit(void)
{
@@ -24050,18 +26115,20 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/init.c tmp-linux-2.6-xen.pat
#ifdef CONFIG_PERFMON
perfmon_exit();
#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,28 @@
+diff -rpuN linux-2.6.18.8/arch/ia64/oprofile/oprofile_perfmon.h linux-2.6.18-xen-3.2.0/arch/ia64/oprofile/oprofile_perfmon.h
+--- linux-2.6.18.8/arch/ia64/oprofile/oprofile_perfmon.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/oprofile/oprofile_perfmon.h 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,30 @@
+#ifndef OPROFILE_PERFMON_H
+#define OPROFILE_PERFMON_H
+
+#ifdef CONFIG_PERFMON
++#ifdef CONFIG_XEN
+int __perfmon_init(void);
+void __perfmon_exit(void);
+int perfmon_start(void);
+void perfmon_stop(void);
++#endif
+#else
+#define __perfmon_init() (-ENOSYS)
+#define __perfmon_exit() do {} while (0)
@@ -24077,14 +26144,14 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/oprofile_perfmon.h tmp-linux
+#define STATIC_IF_NO_XEN static
+#define xen_perfmon_init() (-ENOSYS)
+#define xen_perfmon_exit() do {} while (0)
-+#define xenoprofile_init() (-ENOSYS)
++#define xenoprofile_init(ops) (-ENOSYS)
+#define xenoprofile_exit() do {} while (0)
+#endif /* CONFIG_XEN */
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/oprofile/perfmon.c linux-2.6.18-xen-3.2.0/arch/ia64/oprofile/perfmon.c
+--- linux-2.6.18.8/arch/ia64/oprofile/perfmon.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/oprofile/perfmon.c 2008-02-15 16:21:49.000000000 -0800
@@ -13,6 +13,7 @@
#include <asm/perfmon.h>
#include <asm/ptrace.h>
@@ -24160,9 +26227,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/perfmon.c tmp-linux-2.6-xen.
- pfm_unregister_buffer_fmt(oprofile_fmt.fmt_uuid);
+ __perfmon_exit();
}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/oprofile/xenoprof.c linux-2.6.18-xen-3.2.0/arch/ia64/oprofile/xenoprof.c
+--- linux-2.6.18.8/arch/ia64/oprofile/xenoprof.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/oprofile/xenoprof.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,142 @@
+/******************************************************************************
+ * xenoprof ia64 specific part
@@ -24217,9 +26284,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/xenoprof.c tmp-linux-2.6-xen
+}
+
+/* XXX move them to an appropriate header file. */
-+struct resource* xen_ia64_allocate_resource(unsigned long size);
-+void xen_ia64_release_resource(struct resource* res);
-+void xen_ia64_unmap_resource(struct resource* res);
++struct resource* xen_ia64_allocate_resource(unsigned long size);
++void xen_ia64_release_resource(struct resource *res);
++void xen_ia64_unmap_resource(struct resource *res);
+
+struct resource*
+xenoprof_ia64_allocate_resource(int32_t max_samples)
@@ -24239,7 +26306,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/xenoprof.c tmp-linux-2.6-xen
+ return xen_ia64_allocate_resource(bufsize);
+}
+
-+void xenoprof_arch_unmap_shared_buffer(struct xenoprof_shared_buffer* sbuf)
++void xenoprof_arch_unmap_shared_buffer(struct xenoprof_shared_buffer *sbuf)
+{
+ if (sbuf->buffer) {
+ xen_ia64_unmap_resource(sbuf->arch.res);
@@ -24248,11 +26315,11 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/xenoprof.c tmp-linux-2.6-xen
+ }
+}
+
-+int xenoprof_arch_map_shared_buffer(struct xenoprof_get_buffer* get_buffer,
-+ struct xenoprof_shared_buffer* sbuf)
++int xenoprof_arch_map_shared_buffer(struct xenoprof_get_buffer *get_buffer,
++ struct xenoprof_shared_buffer *sbuf)
+{
+ int ret;
-+ struct resource* res;
++ struct resource *res;
+
+ sbuf->buffer = NULL;
+ sbuf->arch.res = NULL;
@@ -24278,11 +26345,11 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/xenoprof.c tmp-linux-2.6-xen
+ return ret;
+}
+
-+int xenoprof_arch_set_passive(struct xenoprof_passive* pdomain,
-+ struct xenoprof_shared_buffer* sbuf)
++int xenoprof_arch_set_passive(struct xenoprof_passive *pdomain,
++ struct xenoprof_shared_buffer *sbuf)
+{
+ int ret;
-+ struct resource* res;
++ struct resource *res;
+
+ sbuf->buffer = NULL;
+ sbuf->arch.res = NULL;
@@ -24306,10 +26373,26 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/oprofile/xenoprof.c tmp-linux-2.6-xen
+
+ return ret;
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -165,6 +165,11 @@ new_space (u64 phys_base, int sparse)
+diff -rpuN linux-2.6.18.8/arch/ia64/pci/pci.c linux-2.6.18-xen-3.2.0/arch/ia64/pci/pci.c
+--- linux-2.6.18.8/arch/ia64/pci/pci.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/pci/pci.c 2008-02-15 16:21:49.000000000 -0800
+@@ -30,6 +30,15 @@
+ #include <asm/irq.h>
+ #include <asm/hw_irq.h>
+
++#ifdef CONFIG_XEN
++struct ioremap_issue_list {
++ struct list_head listp;
++ unsigned long start;
++ unsigned long end;
++};
++typedef struct ioremap_issue_list ioremap_issue_list_t;
++#endif /* CONFIG_XEN */
++
+ /*
+ * Low-level SAL-based PCI configuration access functions. Note that SAL
+ * calls are already serialized (via sal_lock), so we don't need another
+@@ -165,6 +174,11 @@ new_space (u64 phys_base, int sparse)
io_space[i].mmio_base = mmio_base;
io_space[i].sparse = sparse;
@@ -24321,37 +26404,196 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/pci/pci.c tmp-linux-2.6-xen.patch/arc
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);
+@@ -332,6 +346,169 @@ pcibios_setup_root_windows(struct pci_bu
+ }
+ }
-+ if (is_initial_xendomain()) {
-+ unsigned long addr = vma->vm_pgoff << PAGE_SHIFT;
-+ size_t size = vma->vm_end - vma->vm_start;
-+ unsigned long offset = HYPERVISOR_ioremap(addr, size);
-+ if (IS_ERR_VALUE(offset))
-+ return offset;
++#ifdef CONFIG_XEN
++static void __devinit
++__cleanup_issue_list(struct list_head *top)
++{
++ ioremap_issue_list_t *ptr, *tmp_ptr;
++
++ list_for_each_entry_safe(ptr, tmp_ptr, top, listp) {
++ list_del(&(ptr->listp));
++ kfree(ptr);
++ }
++}
++
++static int __devinit
++__add_issue_list(unsigned long start, unsigned long end, struct list_head *top)
++{
++ ioremap_issue_list_t *ptr, *new;
++
++ if (start > end) {
++ printk(KERN_ERR "%s: Internal error (start addr > end addr)\n",
++ __FUNCTION__);
++ return 0;
++ }
++
++ /*
++ * Head of the resource structure list contains
++ * dummy val.(start=0, end=~0), so skip it
++ */
++ if ((start == 0) && (end == ~0))
++ return 0;
++
++ start &= PAGE_MASK;
++ end |= ~PAGE_MASK;
++
++ /* We can merge specified address range into existing entry */
++ list_for_each_entry(ptr, top, listp) {
++ if ((ptr->start > end + 1) || (ptr->end + 1 < start))
++ continue;
++ ptr->start = min(start, ptr->start);
++ ptr->end = max(end, ptr->end);
++ return 0;
++ }
++
++ /* We could not merge, so create new entry */
++ new = kmalloc(sizeof(ioremap_issue_list_t), GFP_KERNEL);
++ if (new == NULL) {
++ printk(KERN_ERR "%s: Could not allocate memory. "
++ "HYPERVISOR_ioremap will not be issued\n",
++ __FUNCTION__);
++ return -ENOMEM;
+ }
+
- 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 +677,14 @@ pci_mmap_legacy_page_range(struct pci_bu
- vma->vm_pgoff += (unsigned long)addr >> PAGE_SHIFT;
- vma->vm_page_prot = prot;
++ new->start = start;
++ new->end = end;
++
++ /* Insert the new entry to the list by ascending order */
++ if (list_empty(top)) {
++ list_add_tail(&(new->listp), top);
++ return 0;
++ }
++ list_for_each_entry(ptr, top, listp) {
++ if (new->start > ptr->start)
++ continue;
++ list_add(&(new->listp), ((struct list_head *)ptr)->prev);
++ return 0;
++ }
++ list_add_tail(&(new->listp), top);
++
++ return 0;
++}
++
++static int __devinit
++__make_issue_list(struct resource *ptr, struct list_head *top)
++{
++ int ret;
++
++ if (ptr->child) {
++ ret = __make_issue_list(ptr->child, top);
++ if (ret)
++ return ret;
++ }
++ if (ptr->sibling) {
++ ret = __make_issue_list(ptr->sibling, top);
++ if (ret)
++ return ret;
++ }
++
++ if (ptr->flags & IORESOURCE_MEM) {
++ ret = __add_issue_list(ptr->start, ptr->end, top);
++ if (ret)
++ return ret;
++ }
++
++ return 0;
++}
++
++static void __devinit
++__compress_issue_list(struct list_head *top)
++{
++ ioremap_issue_list_t *ptr, *tmp_ptr, *next;
++ int compressed;
++
++ /*
++ * Merge adjacent entries, if overlapped
++ * (entries are sorted by ascending order)
++ */
++ list_for_each_entry_safe(ptr, tmp_ptr, top, listp) {
++ if (list_is_last((struct list_head *)ptr, top))
++ continue;
++
++ next = (ioremap_issue_list_t *)
++ (((struct list_head *)ptr)->next);
++ if (next->start <= (ptr->end) + 1) {
++ next->start = min(ptr->start, next->start);
++ next->end = max(ptr->end, next->end);
++
++ list_del(&(ptr->listp));
++ kfree(ptr);
++ }
++ }
++}
++
++static int __devinit
++__issue_ioremap(struct list_head *top)
++{
++ ioremap_issue_list_t *ptr, *tmp_ptr;
++ unsigned int offset;
++
++ list_for_each_entry_safe(ptr, tmp_ptr, top, listp) {
++ offset = HYPERVISOR_ioremap(ptr->start,
++ ptr->end - ptr->start + 1);
++ if (offset == ~0) {
++ printk(KERN_ERR "%s: HYPERVISOR_ioremap() failed. "
++ "Address Range: 0x%016lx-0x%016lx\n",
++ __FUNCTION__, ptr->start, ptr->end);
++ }
++
++ list_del(&(ptr->listp));
++ kfree(ptr);
++ }
++
++ return 0;
++}
++
++static int __devinit
++do_ioremap_on_resource_list(struct resource *top)
++{
++ LIST_HEAD(ioremap_issue_list_top);
++ int ret;
++
++ ret = __make_issue_list(top, &ioremap_issue_list_top);
++ if (ret) {
++ __cleanup_issue_list(&ioremap_issue_list_top);
++ return ret;
++ }
++
++ __compress_issue_list(&ioremap_issue_list_top);
++
++ (void)__issue_ioremap(&ioremap_issue_list_top);
++
++ return 0;
++}
++#endif /* CONFIG_XEN */
++
+ struct pci_bus * __devinit
+ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus)
+ {
+@@ -375,6 +552,18 @@ pci_acpi_scan_root(struct acpi_device *d
+ if (pbus)
+ pcibios_setup_root_windows(pbus, controller);
++#ifdef CONFIG_XEN
+ if (is_initial_xendomain()) {
-+ unsigned long addr = vma->vm_pgoff << PAGE_SHIFT;
-+ size_t size = vma->vm_end - vma->vm_start;
-+ unsigned long offset = HYPERVISOR_ioremap(addr, size);
-+ if (IS_ERR_VALUE(offset))
-+ return offset;
++ if (do_ioremap_on_resource_list(&iomem_resource) != 0) {
++ printk(KERN_ERR
++ "%s: Counld not issue HYPERVISOR_ioremap "
++ "due to lack of memory or hypercall failure\n",
++ __FUNCTION__);
++ goto out3;
++ }
+ }
++#endif /* CONFIG_XEN */
+
- 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 pbus;
+
+ out3:
+@@ -818,3 +1007,31 @@ int pci_vector_resources(int last, int n
return count;
}
@@ -24383,36 +26625,112 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/pci/pci.c tmp-linux-2.6-xen.patch/arc
+}
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/sn/kernel/setup.c linux-2.6.18-xen-3.2.0/arch/ia64/sn/kernel/setup.c
+--- linux-2.6.18.8/arch/ia64/sn/kernel/setup.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/sn/kernel/setup.c 2008-02-15 16:21:49.000000000 -0800
+@@ -763,5 +763,13 @@ int sn_prom_feature_available(int id)
+ return 0;
+ return test_bit(id, sn_prom_features);
+ }
++
++void
++sn_kernel_launch_event(void)
++{
++ /* ignore status until we understand possible failure, if any*/
++ if (ia64_sn_kernel_launch_event())
++ printk(KERN_ERR "KEXEC is not supported in this PROM, Please update the PROM.\n");
++}
+ EXPORT_SYMBOL(sn_prom_feature_available);
+
+diff -rpuN linux-2.6.18.8/arch/ia64/sn/pci/pcibr/pcibr_provider.c linux-2.6.18-xen-3.2.0/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+--- linux-2.6.18.8/arch/ia64/sn/pci/pcibr/pcibr_provider.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/sn/pci/pcibr/pcibr_provider.c 2008-02-15 16:21:49.000000000 -0800
+@@ -15,6 +15,7 @@
+ #include <asm/sn/pcibus_provider_defs.h>
+ #include <asm/sn/pcidev.h>
+ #include <asm/sn/sn_sal.h>
++#include <asm/sn/pic.h>
+ #include <asm/sn/sn2/sn_hwperf.h>
+ #include "xtalk/xwidgetdev.h"
+ #include "xtalk/hubdev.h"
+@@ -129,9 +130,9 @@ pcibr_bus_fixup(struct pcibus_bussoft *p
+ }
+
+ memcpy(soft, prom_bussoft, sizeof(struct pcibus_info));
+- soft->pbi_buscommon.bs_base =
+- (((u64) soft->pbi_buscommon.
+- bs_base << 4) >> 4) | __IA64_UNCACHED_OFFSET;
++ soft->pbi_buscommon.bs_base = (unsigned long)
++ ioremap(REGION_OFFSET(soft->pbi_buscommon.bs_base),
++ sizeof(struct pic));
+
+ spin_lock_init(&soft->pbi_lock);
+
+diff -rpuN linux-2.6.18.8/arch/ia64/sn/pci/tioca_provider.c linux-2.6.18-xen-3.2.0/arch/ia64/sn/pci/tioca_provider.c
+--- linux-2.6.18.8/arch/ia64/sn/pci/tioca_provider.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/sn/pci/tioca_provider.c 2008-02-15 16:21:49.000000000 -0800
+@@ -611,7 +611,9 @@ tioca_bus_fixup(struct pcibus_bussoft *p
+ return NULL;
+
+ memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common));
+- tioca_common->ca_common.bs_base |= __IA64_UNCACHED_OFFSET;
++ tioca_common->ca_common.bs_base = (unsigned long)
++ ioremap(REGION_OFFSET(tioca_common->ca_common.bs_base),
++ sizeof(struct tioca_common));
+
+ /* init kernel-private area */
+
+diff -rpuN linux-2.6.18.8/arch/ia64/sn/pci/tioce_provider.c linux-2.6.18-xen-3.2.0/arch/ia64/sn/pci/tioce_provider.c
+--- linux-2.6.18.8/arch/ia64/sn/pci/tioce_provider.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/sn/pci/tioce_provider.c 2008-02-15 16:21:49.000000000 -0800
+@@ -1006,7 +1006,9 @@ tioce_bus_fixup(struct pcibus_bussoft *p
+ return NULL;
+
+ memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common));
+- tioce_common->ce_pcibus.bs_base |= __IA64_UNCACHED_OFFSET;
++ tioce_common->ce_pcibus.bs_base = (unsigned long)
++ ioremap(REGION_OFFSET(tioce_common->ce_pcibus.bs_base),
++ sizeof(struct tioce_common));
+
+ tioce_kern = tioce_kern_init(tioce_common);
+ if (tioce_kern == NULL) {
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/Makefile linux-2.6.18-xen-3.2.0/arch/ia64/xen/Makefile
+--- linux-2.6.18.8/arch/ia64/xen/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/Makefile 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,9 @@
+#
+# Makefile for Xen components
+#
+
+obj-y := hypercall.o xenivt.o xenentry.o xensetup.o xenpal.o xenhpski.o \
-+ hypervisor.o pci-dma-xen.o util.o xencomm.o xcom_hcall.o \
-+ xcom_mini.o xcom_privcmd.o mem.o
++ hypervisor.o util.o xencomm.o xcom_hcall.o \
++ xcom_privcmd.o xen_dma.o
+
-+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,170 @@
++obj-$(CONFIG_IA64_GENERIC) += machvec.o
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/hypercall.S linux-2.6.18-xen-3.2.0/arch/ia64/xen/hypercall.S
+--- linux-2.6.18.8/arch/ia64/xen/hypercall.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/hypercall.S 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,141 @@
+/*
+ * Support routines for Xen hypercalls
+ *
+ * Copyright (C) 2005 Dan Magenheimer <dan.magenheimer@hp.com>
+ */
+
-+#include <asm/processor.h>
+#include <asm/asmmacro.h>
++#include <asm/intrinsics.h>
++
++#ifdef __INTEL_COMPILER
++# undef ASM_SUPPORTED
++#else
++# define ASM_SUPPORTED
++#endif
+
++#ifndef ASM_SUPPORTED
+GLOBAL_ENTRY(xen_get_psr)
+ XEN_HYPER_GET_PSR
+ br.ret.sptk.many rp
-+ ;;
++ ;;
+END(xen_get_psr)
+
+GLOBAL_ENTRY(xen_get_ivr)
@@ -24515,65 +26833,29 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypercall.S tmp-linux-2.6-xen.pat
+ XEN_HYPER_SET_EFLAG
+ br.ret.sptk.many rp
+END(xen_set_eflag)
-+#endif
++#endif /* CONFIG_IA32_SUPPORT */
++#endif /* ASM_SUPPORTED */
+
+GLOBAL_ENTRY(xen_send_ipi)
-+ mov r14=r32
-+ mov r15=r33
-+ mov r2=0x400
-+ break 0x1000
-+ ;;
-+ br.ret.sptk.many rp
-+ ;;
++ mov r14=r32
++ mov r15=r33
++ mov r2=0x400
++ break 0x1000
++ ;;
++ br.ret.sptk.many rp
++ ;;
+END(xen_send_ipi)
+
-+#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT
-+// Those are vdso specialized.
-+// In fsys mode, call, ret can't be used.
-+
-+ // see xen_ssm_i() in privop.h
-+ // r22 = &vcpu->vcpu_info->evtchn_upcall_mask
-+ // r23 = &vpsr.ic
-+ // r24 = &vcpu->vcpu_info->evtchn_upcall_pending
-+ // r25 = tmp
-+ // r31 = tmp
-+ // p11 = tmp
-+ // p14 = tmp
-+#define XEN_SET_PSR_I \
-+ ld1 r31=[r22]; \
-+ ld1 r25=[r24]; \
-+ ;; \
-+ st1 [r22]=r0; \
-+ cmp.ne.unc p14,p0=r0,r31; \
-+ ;; \
-+(p14) cmp.ne.unc p11,p0=r0,r25; \
-+ ;; \
-+(p11) st1 [r22]=r20; \
-+(p11) XEN_HYPER_SSM_I;
-+
-+GLOBAL_ENTRY(xen_ssm_i_0)
-+ XEN_SET_PSR_I
-+ brl.cond.sptk .vdso_ssm_i_0_ret
-+ ;;
-+END(xen_ssm_i_0)
-+
-+GLOBAL_ENTRY(xen_ssm_i_1)
-+ XEN_SET_PSR_I
-+ brl.cond.sptk .vdso_ssm_i_1_ret
-+ ;;
-+END(xen_ssm_i_1)
-+
+GLOBAL_ENTRY(__hypercall)
+ mov r2=r37
+ break 0x1000
+ br.ret.sptk.many b0
+ ;;
+END(__hypercall)
-+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,1234 @@
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/hypervisor.c linux-2.6.18-xen-3.2.0/arch/ia64/xen/hypervisor.c
+--- linux-2.6.18.8/arch/ia64/xen/hypervisor.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/hypervisor.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,1511 @@
+/******************************************************************************
+ * include/asm-ia64/shadow.h
+ *
@@ -24596,7 +26878,6 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ *
+ */
+
-+//#include <linux/kernel.h>
+#include <linux/spinlock.h>
+#include <linux/bootmem.h>
+#include <linux/module.h>
@@ -24608,15 +26889,16 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+#include <asm/hypervisor.h>
+#include <asm/hypercall.h>
+#include <xen/interface/memory.h>
++#include <xen/xencons.h>
+#include <xen/balloon.h>
+
-+shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)XSI_BASE;
++shared_info_t *HYPERVISOR_shared_info __read_mostly =
++ (shared_info_t *)XSI_BASE;
+EXPORT_SYMBOL(HYPERVISOR_shared_info);
+
+start_info_t *xen_start_info;
+EXPORT_SYMBOL(xen_start_info);
+
-+int running_on_xen;
+EXPORT_SYMBOL(running_on_xen);
+
+#ifdef CONFIG_XEN_IA64_EXPOSE_P2M
@@ -24628,15 +26910,44 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+
+EXPORT_SYMBOL(__hypercall);
+
-+//XXX same as i386, x86_64 contiguous_bitmap_set(), contiguous_bitmap_clear()
-+// move those to lib/contiguous_bitmap?
-+//XXX discontigmem/sparsemem
++void __init
++xen_setup(char **cmdline_p)
++{
++ struct dom0_vga_console_info *info;
++ extern void dig_setup(char **cmdline_p);
++
++ if (ia64_platform_is("xen"))
++ dig_setup(cmdline_p);
++
++ if (!is_running_on_xen() || !is_initial_xendomain())
++ return;
++
++ info = (void *)((char *)xen_start_info +
++ xen_start_info->console.dom0.info_off);
++ dom0_init_screen_info(info, xen_start_info->console.dom0.info_size);
++
++ xen_start_info->console.domU.mfn = 0;
++ xen_start_info->console.domU.evtchn = 0;
++}
++
++void __cpuinit
++xen_cpu_init(void)
++{
++ extern void xen_smp_intr_init(void);
++ xen_smp_intr_init();
++}
++
++/*
++ *XXX same as i386, x86_64 contiguous_bitmap_set(), contiguous_bitmap_clear()
++ * move those to lib/contiguous_bitmap?
++ *XXX discontigmem/sparsemem
++ */
+
+/*
+ * Bitmap is indexed by page number. If bit is set, the page is part of a
+ * xen_create_contiguous_region() area of memory.
+ */
-+unsigned long *contiguous_bitmap;
++unsigned long *contiguous_bitmap __read_mostly;
+
+#ifdef CONFIG_VIRTUAL_MEM_MAP
+/* Following logic is stolen from create_mem_map_table() for virtual memmap */
@@ -24653,16 +26964,16 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ pte_t *pte;
+
+ bitmap_start = (unsigned long)contiguous_bitmap +
-+ ((__pa(start) >> PAGE_SHIFT) >> 3);
++ ((__pa(start) >> PAGE_SHIFT) >> 3);
+ bitmap_end = (unsigned long)contiguous_bitmap +
-+ (((__pa(end) >> PAGE_SHIFT) + 2 * BITS_PER_LONG) >> 3);
++ (((__pa(end) >> PAGE_SHIFT) + 2 * BITS_PER_LONG) >> 3);
+
+ start_page = bitmap_start & PAGE_MASK;
+ end_page = PAGE_ALIGN(bitmap_end);
+ node = paddr_to_nid(__pa(start));
+
+ bitmap = alloc_bootmem_pages_node(NODE_DATA(node),
-+ end_page - start_page);
++ end_page - start_page);
+ BUG_ON(!bitmap);
+ memset(bitmap, 0, end_page - start_page);
+
@@ -24670,26 +26981,26 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ pgd = pgd_offset_k(address);
+ if (pgd_none(*pgd))
+ pgd_populate(&init_mm, pgd,
-+ alloc_bootmem_pages_node(NODE_DATA(node),
-+ PAGE_SIZE));
++ alloc_bootmem_pages_node(NODE_DATA(node),
++ PAGE_SIZE));
+ pud = pud_offset(pgd, address);
+
+ if (pud_none(*pud))
+ pud_populate(&init_mm, pud,
-+ alloc_bootmem_pages_node(NODE_DATA(node),
-+ PAGE_SIZE));
++ alloc_bootmem_pages_node(NODE_DATA(node),
++ PAGE_SIZE));
+ pmd = pmd_offset(pud, address);
+
+ if (pmd_none(*pmd))
+ pmd_populate_kernel(&init_mm, pmd,
-+ alloc_bootmem_pages_node
-+ (NODE_DATA(node), PAGE_SIZE));
++ alloc_bootmem_pages_node
++ (NODE_DATA(node), PAGE_SIZE));
+ pte = pte_offset_kernel(pmd, address);
+
+ if (pte_none(*pte))
+ set_pte(pte,
-+ pfn_pte(__pa(bitmap + (address - start_page))
-+ >> PAGE_SHIFT, PAGE_KERNEL));
++ pfn_pte(__pa(bitmap + (address - start_page))
++ >> PAGE_SHIFT, PAGE_KERNEL));
+ }
+ return 0;
+}
@@ -24704,7 +27015,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+}
+
+void
-+contiguous_bitmap_init(unsigned long end_pfn)
++xen_contiguous_bitmap_init(unsigned long end_pfn)
+{
+ unsigned long size = (end_pfn + 2 * BITS_PER_LONG) >> 3;
+#ifndef CONFIG_VIRTUAL_MEM_MAP
@@ -24774,9 +27085,11 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ }
+}
+
-+// __xen_create_contiguous_region(), __xen_destroy_contiguous_region()
-+// are based on i386 xen_create_contiguous_region(),
-+// xen_destroy_contiguous_region()
++/*
++ * __xen_create_contiguous_region(), __xen_destroy_contiguous_region()
++ * are based on i386 xen_create_contiguous_region(),
++ * xen_destroy_contiguous_region()
++ */
+
+/* Protected by balloon_lock. */
+#define MAX_CONTIG_ORDER 7
@@ -24822,9 +27135,8 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ balloon_lock(flags);
+
+ /* Get a new contiguous memory extent. */
-+ for (i = 0; i < num_gpfn; i++) {
++ for (i = 0; i < num_gpfn; i++)
+ in_frames[i] = start_gpfn + i;
-+ }
+ out_frame = start_gpfn;
+ error = HYPERVISOR_memory_op(XENMEM_exchange, &exchange);
+ success = (exchange.nr_exchanged == num_gpfn);
@@ -24906,7 +27218,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ .domid = DOMID_SELF
+ },
+ .nr_exchanged = 0
-+ };
++ };
+
+
+ if (!test_bit(start_gpfn, contiguous_bitmap))
@@ -24924,17 +27236,16 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+
+ contiguous_bitmap_clear(start_gpfn, num_gpfn);
+
-+ /* Do the exchange for non-contiguous MFNs. */
++ /* Do the exchange for non-contiguous MFNs. */
+ in_frame = start_gpfn;
-+ for (i = 0; i < num_gpfn; i++) {
++ for (i = 0; i < num_gpfn; i++)
+ out_frames[i] = start_gpfn + i;
-+ }
+ error = HYPERVISOR_memory_op(XENMEM_exchange, &exchange);
+ success = (exchange.nr_exchanged == 1);
+ BUG_ON(!success && ((exchange.nr_exchanged != 0) || (error == 0)));
+ BUG_ON(success && (error != 0));
+ if (unlikely(error == -ENOSYS)) {
-+ /* Compatibility when XENMEM_exchange is unsupported. */
++ /* Compatibility when XENMEM_exchange is unsupported. */
+ error = HYPERVISOR_memory_op(XENMEM_decrease_reservation,
+ &exchange.in);
+ BUG_ON(error != 1);
@@ -24946,15 +27257,27 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ balloon_unlock(flags);
+}
+
++int
++xen_limit_pages_to_max_mfn(struct page *pages, unsigned int order,
++ unsigned int address_bits)
++{
++ return xen_create_contiguous_region((unsigned long)page_address(pages),
++ order, address_bits);
++}
+
-+///////////////////////////////////////////////////////////////////////////
-+// grant table hack
-+// cmd: GNTTABOP_xxx
-+
++/****************************************************************************
++ * grant table hack
++ * cmd: GNTTABOP_xxx
++ */
+#include <linux/mm.h>
+#include <xen/interface/xen.h>
+#include <xen/gnttab.h>
+
++void *arch_gnttab_alloc_shared(unsigned long *frames)
++{
++ return __va(frames[0] << PAGE_SHIFT);
++}
++
+static void
+gnttab_map_grant_ref_pre(struct gnttab_map_grant_ref *uop)
+{
@@ -24964,16 +27287,19 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+
+ if (flags & GNTMAP_host_map) {
+ if (flags & GNTMAP_application_map) {
-+ xprintd("GNTMAP_application_map is not supported yet: flags 0x%x\n", flags);
++ xprintd("GNTMAP_application_map is not supported yet:"
++ " flags 0x%x\n", flags);
+ BUG();
+ }
+ if (flags & GNTMAP_contains_pte) {
-+ xprintd("GNTMAP_contains_pte is not supported yet flags 0x%x\n", flags);
++ xprintd("GNTMAP_contains_pte is not supported yet"
++ " flags 0x%x\n", flags);
+ BUG();
+ }
+ } else if (flags & GNTMAP_device_map) {
-+ xprintd("GNTMAP_device_map is not supported yet 0x%x\n", flags);
-+ BUG();//XXX not yet. actually this flag is not used.
++ xprintd("GNTMAP_device_map is not supported yet 0x%x\n",
++ flags);
++ BUG(); /* XXX not yet. actually this flag is not used. */
+ } else {
+ BUG();
+ }
@@ -24989,19 +27315,21 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ (struct gnttab_map_grant_ref*)uop + i);
+ }
+ }
-+ return xencomm_mini_hypercall_grant_table_op(cmd, uop, count);
++ return xencomm_hypercall_grant_table_op(cmd, uop, count);
+}
+EXPORT_SYMBOL(HYPERVISOR_grant_table_op);
+
-+///////////////////////////////////////////////////////////////////////////
-+// foreign mapping
++/**************************************************************************
++ * foreign mapping
++ */
+#include <linux/efi.h>
-+#include <asm/meminit.h> // for IA64_GRANULE_SIZE, GRANULEROUND{UP,DOWN}()
++#include <asm/meminit.h> /* for IA64_GRANULE_SIZE, GRANULEROUND{UP,DOWN}() */
+
+static unsigned long privcmd_resource_min = 0;
-+// Xen/ia64 currently can handle pseudo physical address bits up to
-+// (PAGE_SHIFT * 3)
-+static unsigned long privcmd_resource_max = GRANULEROUNDDOWN((1UL << (PAGE_SHIFT * 3)) - 1);
++/* Xen/ia64 currently can handle pseudo physical address bits up to
++ * (PAGE_SHIFT * 3) */
++static unsigned long privcmd_resource_max =
++ GRANULEROUNDDOWN((1UL << (PAGE_SHIFT * 3)) - 1);
+static unsigned long privcmd_resource_align = IA64_GRANULE_SIZE;
+
+static unsigned long
@@ -25036,18 +27364,18 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
+ efi_desc_size = ia64_boot_param->efi_memdesc_size;
+
-+ // at first check the used highest address
++ /* at first check the used highest address */
+ for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
-+ // nothing
++ /* nothing */;
+ }
+ md = p - efi_desc_size;
+ privcmd_resource_min = GRANULEROUNDUP(md_end_addr(md));
+ if (xen_ia64_privcmd_check_size(privcmd_resource_min,
-+ privcmd_resource_max)) {
++ privcmd_resource_max))
+ goto out;
-+ }
+
-+ // the used highest address is too large. try to find the largest gap.
++ /* the used highest address is too large.
++ * try to find the largest gap. */
+ tmp_min = privcmd_resource_max;
+ tmp_max = 0;
+ gap_size = 0;
@@ -25061,23 +27389,21 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+
+ md = p;
+ end = md_end_addr(md);
-+ if (end > privcmd_resource_max) {
++ if (end > privcmd_resource_max)
+ break;
-+ }
+ if (end < prev_end) {
-+ // work around.
-+ // Xen may pass incompletely sorted memory
-+ // descriptors like
-+ // [x, x + length]
-+ // [x, x]
-+ // this order should be reversed.
++ /* work around.
++ * Xen may pass incompletely sorted memory
++ * descriptors like
++ * [x, x + length]
++ * [x, x]
++ * this order should be reversed. */
+ continue;
+ }
+ next = p + efi_desc_size;
+ next_start = next->phys_addr;
-+ if (next_start > privcmd_resource_max) {
++ if (next_start > privcmd_resource_max)
+ next_start = privcmd_resource_max;
-+ }
+ if (end < next_start && gap_size < (next_start - end)) {
+ tmp_min = end;
+ tmp_max = next_start;
@@ -25096,19 +27422,21 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ privcmd_resource_max = tmp_max;
+ if (!xen_ia64_privcmd_check_size(privcmd_resource_min,
+ privcmd_resource_max)) {
-+ // Any large enough gap isn't found.
-+ // go ahead anyway with the warning hoping that large region
-+ // won't be requested.
-+ printk(KERN_WARNING "xen privcmd: large enough region for privcmd mmap is not found.\n");
++ /* Any large enough gap isn't found.
++ * go ahead anyway with the warning hoping that large region
++ * won't be requested. */
++ printk(KERN_WARNING "xen privcmd: "
++ "large enough region for privcmd mmap is not found.\n");
+ }
+
+out:
-+ printk(KERN_INFO "xen privcmd uses pseudo physical addr range [0x%lx, 0x%lx] (%ldMB)\n",
++ printk(KERN_INFO "xen privcmd uses pseudo physical addr range "
++ "[0x%lx, 0x%lx] (%ldMB)\n",
+ privcmd_resource_min, privcmd_resource_max,
+ (privcmd_resource_max - privcmd_resource_min) >> 20);
+ BUG_ON(privcmd_resource_min >= privcmd_resource_max);
+
-+ // XXX this should be somewhere appropriate
++ /* XXX this should be somewhere appropriate */
+ (void)p2m_expose_init();
+
+ return 0;
@@ -25123,8 +27451,12 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+
+struct xen_ia64_privcmd_range {
+ atomic_t ref_count;
-+ unsigned long pgoff; // in PAGE_SIZE
-+ struct resource* res;
++ unsigned long pgoff; /* in PAGE_SIZE */
++ struct resource *res;
++
++ /* for foreign domain p2m mapping */
++ void *private;
++ void (*callback)(struct xen_ia64_privcmd_range *range, void *arg);
+
+ unsigned long num_entries;
+ struct xen_ia64_privcmd_entry entries[0];
@@ -25132,30 +27464,30 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+
+struct xen_ia64_privcmd_vma {
+ int is_privcmd_mmapped;
-+ struct xen_ia64_privcmd_range* range;
++ struct xen_ia64_privcmd_range *range;
+
+ unsigned long num_entries;
-+ struct xen_ia64_privcmd_entry* entries;
++ struct xen_ia64_privcmd_entry *entries;
+};
+
+static void
-+xen_ia64_privcmd_init_entry(struct xen_ia64_privcmd_entry* entry)
++xen_ia64_privcmd_init_entry(struct xen_ia64_privcmd_entry *entry)
+{
+ atomic_set(&entry->map_count, 0);
+ entry->gpfn = INVALID_GPFN;
+}
+
+static int
-+xen_ia64_privcmd_entry_mmap(struct vm_area_struct* vma,
++xen_ia64_privcmd_entry_mmap(struct vm_area_struct *vma,
+ unsigned long addr,
-+ struct xen_ia64_privcmd_range* privcmd_range,
++ struct xen_ia64_privcmd_range *privcmd_range,
+ int i,
+ unsigned long gmfn,
+ pgprot_t prot,
+ domid_t domid)
+{
+ int error = 0;
-+ struct xen_ia64_privcmd_entry* entry = &privcmd_range->entries[i];
++ struct xen_ia64_privcmd_entry *entry = &privcmd_range->entries[i];
+ unsigned long gpfn;
+ unsigned long flags;
+
@@ -25171,21 +27503,18 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ gpfn = (privcmd_range->res->start >> PAGE_SHIFT) + i;
+
+ flags = ASSIGN_writable;
-+ if (pgprot_val(prot) == PROT_READ) {
++ if (pgprot_val(prot) == PROT_READ)
+ flags = ASSIGN_readonly;
-+ }
+ error = HYPERVISOR_add_physmap_with_gmfn(gpfn, gmfn, flags, domid);
-+ if (error != 0) {
++ if (error != 0)
+ goto out;
-+ }
+
+ prot = vma->vm_page_prot;
+ error = remap_pfn_range(vma, addr, gpfn, 1 << PAGE_SHIFT, prot);
+ if (error != 0) {
+ error = HYPERVISOR_zap_physmap(gpfn, 0);
-+ if (error) {
-+ BUG();//XXX
-+ }
++ if (error)
++ BUG(); /* XXX */
+ } else {
+ atomic_inc(&entry->map_count);
+ entry->gpfn = gpfn;
@@ -25196,47 +27525,44 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+}
+
+static void
-+xen_ia64_privcmd_entry_munmap(struct xen_ia64_privcmd_range* privcmd_range,
++xen_ia64_privcmd_entry_munmap(struct xen_ia64_privcmd_range *privcmd_range,
+ int i)
+{
-+ struct xen_ia64_privcmd_entry* entry = &privcmd_range->entries[i];
++ struct xen_ia64_privcmd_entry *entry = &privcmd_range->entries[i];
+ unsigned long gpfn = entry->gpfn;
-+ //gpfn = (privcmd_range->res->start >> PAGE_SHIFT) +
-+ // (vma->vm_pgoff - privcmd_range->pgoff);
++ /* gpfn = (privcmd_range->res->start >> PAGE_SHIFT) +
++ (vma->vm_pgoff - privcmd_range->pgoff); */
+ int error;
+
+ error = HYPERVISOR_zap_physmap(gpfn, 0);
-+ if (error) {
-+ BUG();//XXX
-+ }
++ if (error)
++ BUG(); /* XXX */
+ entry->gpfn = INVALID_GPFN;
+}
+
+static void
-+xen_ia64_privcmd_entry_open(struct xen_ia64_privcmd_range* privcmd_range,
++xen_ia64_privcmd_entry_open(struct xen_ia64_privcmd_range *privcmd_range,
+ int i)
+{
-+ struct xen_ia64_privcmd_entry* entry = &privcmd_range->entries[i];
-+ if (entry->gpfn != INVALID_GPFN) {
++ struct xen_ia64_privcmd_entry *entry = &privcmd_range->entries[i];
++ if (entry->gpfn != INVALID_GPFN)
+ atomic_inc(&entry->map_count);
-+ } else {
++ else
+ BUG_ON(atomic_read(&entry->map_count) != 0);
-+ }
+}
+
+static void
-+xen_ia64_privcmd_entry_close(struct xen_ia64_privcmd_range* privcmd_range,
++xen_ia64_privcmd_entry_close(struct xen_ia64_privcmd_range *privcmd_range,
+ int i)
+{
-+ struct xen_ia64_privcmd_entry* entry = &privcmd_range->entries[i];
++ struct xen_ia64_privcmd_entry *entry = &privcmd_range->entries[i];
+ if (entry->gpfn != INVALID_GPFN &&
-+ atomic_dec_and_test(&entry->map_count)) {
++ atomic_dec_and_test(&entry->map_count))
+ xen_ia64_privcmd_entry_munmap(privcmd_range, i);
-+ }
+}
+
-+static void xen_ia64_privcmd_vma_open(struct vm_area_struct* vma);
-+static void xen_ia64_privcmd_vma_close(struct vm_area_struct* vma);
++static void xen_ia64_privcmd_vma_open(struct vm_area_struct *vma);
++static void xen_ia64_privcmd_vma_close(struct vm_area_struct *vma);
+
+struct vm_operations_struct xen_ia64_privcmd_vm_ops = {
+ .open = &xen_ia64_privcmd_vma_open,
@@ -25244,12 +27570,13 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+};
+
+static void
-+__xen_ia64_privcmd_vma_open(struct vm_area_struct* vma,
-+ struct xen_ia64_privcmd_vma* privcmd_vma,
-+ struct xen_ia64_privcmd_range* privcmd_range)
++__xen_ia64_privcmd_vma_open(struct vm_area_struct *vma,
++ struct xen_ia64_privcmd_vma *privcmd_vma,
++ struct xen_ia64_privcmd_range *privcmd_range)
+{
+ unsigned long entry_offset = vma->vm_pgoff - privcmd_range->pgoff;
-+ unsigned long num_entries = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
++ unsigned long num_entries =
++ (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+ unsigned long i;
+
+ BUG_ON(entry_offset < 0);
@@ -25259,41 +27586,43 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ privcmd_vma->num_entries = num_entries;
+ privcmd_vma->entries = &privcmd_range->entries[entry_offset];
+ vma->vm_private_data = privcmd_vma;
-+ for (i = 0; i < privcmd_vma->num_entries; i++) {
++ for (i = 0; i < privcmd_vma->num_entries; i++)
+ xen_ia64_privcmd_entry_open(privcmd_range, entry_offset + i);
-+ }
+
+ vma->vm_private_data = privcmd_vma;
+ vma->vm_ops = &xen_ia64_privcmd_vm_ops;
+}
+
+static void
-+xen_ia64_privcmd_vma_open(struct vm_area_struct* vma)
++xen_ia64_privcmd_vma_open(struct vm_area_struct *vma)
+{
-+ struct xen_ia64_privcmd_vma* old_privcmd_vma = (struct xen_ia64_privcmd_vma*)vma->vm_private_data;
-+ struct xen_ia64_privcmd_vma* privcmd_vma = (struct xen_ia64_privcmd_vma*)vma->vm_private_data;
-+ struct xen_ia64_privcmd_range* privcmd_range = privcmd_vma->range;
++ struct xen_ia64_privcmd_vma *old_privcmd_vma =
++ (struct xen_ia64_privcmd_vma*)vma->vm_private_data;
++ struct xen_ia64_privcmd_vma *privcmd_vma =
++ (struct xen_ia64_privcmd_vma*)vma->vm_private_data;
++ struct xen_ia64_privcmd_range *privcmd_range = privcmd_vma->range;
+
+ atomic_inc(&privcmd_range->ref_count);
-+ // vm_op->open() can't fail.
++ /* vm_op->open() can't fail. */
+ privcmd_vma = kmalloc(sizeof(*privcmd_vma), GFP_KERNEL | __GFP_NOFAIL);
-+ // copy original value if necessary
++ /* copy original value if necessary */
+ privcmd_vma->is_privcmd_mmapped = old_privcmd_vma->is_privcmd_mmapped;
+
+ __xen_ia64_privcmd_vma_open(vma, privcmd_vma, privcmd_range);
+}
+
+static void
-+xen_ia64_privcmd_vma_close(struct vm_area_struct* vma)
++xen_ia64_privcmd_vma_close(struct vm_area_struct *vma)
+{
-+ struct xen_ia64_privcmd_vma* privcmd_vma =
++ struct xen_ia64_privcmd_vma *privcmd_vma =
+ (struct xen_ia64_privcmd_vma*)vma->vm_private_data;
-+ struct xen_ia64_privcmd_range* privcmd_range = privcmd_vma->range;
++ struct xen_ia64_privcmd_range *privcmd_range = privcmd_vma->range;
+ unsigned long entry_offset = vma->vm_pgoff - privcmd_range->pgoff;
+ unsigned long i;
+
+ for (i = 0; i < privcmd_vma->num_entries; i++) {
+ xen_ia64_privcmd_entry_close(privcmd_range, entry_offset + i);
++ cond_resched();
+ }
+ vma->vm_private_data = NULL;
+ kfree(privcmd_vma);
@@ -25301,12 +27630,15 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ if (atomic_dec_and_test(&privcmd_range->ref_count)) {
+#if 1
+ for (i = 0; i < privcmd_range->num_entries; i++) {
-+ struct xen_ia64_privcmd_entry* entry =
++ struct xen_ia64_privcmd_entry *entry =
+ &privcmd_range->entries[i];
+ BUG_ON(atomic_read(&entry->map_count) != 0);
+ BUG_ON(entry->gpfn != INVALID_GPFN);
+ }
+#endif
++ if (privcmd_range->callback)
++ (*privcmd_range->callback)(privcmd_range,
++ privcmd_range->private);
+ release_resource(privcmd_range->res);
+ kfree(privcmd_range->res);
+ vfree(privcmd_range);
@@ -25316,7 +27648,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+int
+privcmd_enforce_singleshot_mapping(struct vm_area_struct *vma)
+{
-+ struct xen_ia64_privcmd_vma* privcmd_vma =
++ struct xen_ia64_privcmd_vma *privcmd_vma =
+ (struct xen_ia64_privcmd_vma *)vma->vm_private_data;
+ return (xchg(&privcmd_vma->is_privcmd_mmapped, 1) == 0);
+}
@@ -25327,9 +27659,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ int error;
+ unsigned long size = vma->vm_end - vma->vm_start;
+ unsigned long num_entries = size >> PAGE_SHIFT;
-+ struct xen_ia64_privcmd_range* privcmd_range = NULL;
-+ struct xen_ia64_privcmd_vma* privcmd_vma = NULL;
-+ struct resource* res = NULL;
++ struct xen_ia64_privcmd_range *privcmd_range = NULL;
++ struct xen_ia64_privcmd_vma *privcmd_vma = NULL;
++ struct resource *res = NULL;
+ unsigned long i;
+ BUG_ON(!is_running_on_xen());
+
@@ -25339,26 +27671,22 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ privcmd_range =
+ vmalloc(sizeof(*privcmd_range) +
+ sizeof(privcmd_range->entries[0]) * num_entries);
-+ if (privcmd_range == NULL) {
++ if (privcmd_range == NULL)
+ goto out_enomem0;
-+ }
+ privcmd_vma = kmalloc(sizeof(*privcmd_vma), GFP_KERNEL);
-+ if (privcmd_vma == NULL) {
++ if (privcmd_vma == NULL)
+ goto out_enomem1;
-+ }
+ privcmd_vma->is_privcmd_mmapped = 0;
+
+ res = kzalloc(sizeof(*res), GFP_KERNEL);
-+ if (res == NULL) {
++ if (res == NULL)
+ goto out_enomem1;
-+ }
+ res->name = "Xen privcmd mmap";
+ error = allocate_resource(&iomem_resource, res, size,
+ privcmd_resource_min, privcmd_resource_max,
+ privcmd_resource_align, NULL, NULL);
-+ if (error) {
++ if (error)
+ goto out_enomem1;
-+ }
+ privcmd_range->res = res;
+
+ /* DONTCOPY is essential for Xen as copy_page_range is broken. */
@@ -25367,9 +27695,10 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ atomic_set(&privcmd_range->ref_count, 1);
+ privcmd_range->pgoff = vma->vm_pgoff;
+ privcmd_range->num_entries = num_entries;
-+ for (i = 0; i < privcmd_range->num_entries; i++) {
++ privcmd_range->private = NULL;
++ privcmd_range->callback = NULL;
++ for (i = 0; i < privcmd_range->num_entries; i++)
+ xen_ia64_privcmd_init_entry(&privcmd_range->entries[i]);
-+ }
+
+ __xen_ia64_privcmd_vma_open(vma, privcmd_vma, privcmd_range);
+ return 0;
@@ -25384,15 +27713,15 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+
+int
+direct_remap_pfn_range(struct vm_area_struct *vma,
-+ unsigned long address, // process virtual address
-+ unsigned long gmfn, // gmfn, gmfn + 1, ... gmfn + size/PAGE_SIZE
++ unsigned long address, /* process virtual address */
++ unsigned long gmfn, /* gmfn, gmfn + 1, ... gmfn + size/PAGE_SIZE */
+ unsigned long size,
+ pgprot_t prot,
-+ domid_t domid) // target domain
++ domid_t domid) /* target domain */
+{
-+ struct xen_ia64_privcmd_vma* privcmd_vma =
++ struct xen_ia64_privcmd_vma *privcmd_vma =
+ (struct xen_ia64_privcmd_vma*)vma->vm_private_data;
-+ struct xen_ia64_privcmd_range* privcmd_range = privcmd_vma->range;
++ struct xen_ia64_privcmd_range *privcmd_range = privcmd_vma->range;
+ unsigned long entry_offset = vma->vm_pgoff - privcmd_range->pgoff;
+
+ unsigned long i;
@@ -25401,28 +27730,27 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ BUG_ON(!is_running_on_xen());
+
+#if 0
-+ if (prot != vm->vm_page_prot) {
++ if (prot != vm->vm_page_prot)
+ return -EINVAL;
-+ }
+#endif
+
+ i = (address - vma->vm_start) >> PAGE_SHIFT;
+ for (offset = 0; offset < size; offset += PAGE_SIZE) {
+ error = xen_ia64_privcmd_entry_mmap(vma, (address + offset) & PAGE_MASK, privcmd_range, entry_offset + i, gmfn, prot, domid);
-+ if (error != 0) {
++ if (error != 0)
+ break;
-+ }
+
+ i++;
+ gmfn++;
-+ }
++ }
+
+ return error;
+}
+
+
-+///////////////////////////////////////////////////////////////////////////
-+// expose p2m table
++/**************************************************************************
++ * expose p2m table
++ */
+#ifdef CONFIG_XEN_IA64_EXPOSE_P2M
+#include <linux/cpu.h>
+#include <asm/uaccess.h>
@@ -25440,12 +27768,13 @@ 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;
++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
-+static unsigned long p2m_granule_pfn __read_mostly = GRNULE_PFN;
++#define GRANULE_PFN PTRS_PER_PTE
++static unsigned long p2m_granule_pfn __read_mostly = GRANULE_PFN;
+
+#define ROUNDDOWN(x, y) ((x) & ~((y) - 1))
+#define ROUNDUP(x, y) (((x) + (y) - 1) & ~((y) - 1))
@@ -25455,13 +27784,13 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+static int xen_ia64_p2m_expose __read_mostly = 1;
+module_param(xen_ia64_p2m_expose, int, 0);
+MODULE_PARM_DESC(xen_ia64_p2m_expose,
-+ "enable/disable xen/ia64 p2m exposure optimization\n");
++ "enable/disable xen/ia64 p2m exposure optimization\n");
+
+#ifdef CONFIG_XEN_IA64_EXPOSE_P2M_USE_DTR
+static int xen_ia64_p2m_expose_use_dtr __read_mostly = 1;
+module_param(xen_ia64_p2m_expose_use_dtr, int, 0);
+MODULE_PARM_DESC(xen_ia64_p2m_expose_use_dtr,
-+ "use/unuse dtr to map exposed p2m table\n");
++ "use/unuse dtr to map exposed p2m table\n");
+
+static const int p2m_page_shifts[] = {
+ _PAGE_SIZE_4K,
@@ -25483,21 +27812,21 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+};
+static struct p2m_itr_arg p2m_itr_arg __read_mostly;
+
-+// This should be in asm-ia64/kregs.h
++/* This should be in asm-ia64/kregs.h */
+#define IA64_TR_P2M_TABLE 3
+
+static void
-+p2m_itr(void* info)
++p2m_itr(void *info)
+{
-+ struct p2m_itr_arg* arg = (struct p2m_itr_arg*)info;
++ struct p2m_itr_arg *arg = (struct p2m_itr_arg*)info;
+ ia64_itr(0x2, IA64_TR_P2M_TABLE,
-+ arg->vaddr, arg->pteval, arg->log_page_size);
++ arg->vaddr, arg->pteval, arg->log_page_size);
+ ia64_srlz_d();
+}
+
+static int
+p2m_expose_dtr_call(struct notifier_block *self,
-+ unsigned long event, void* ptr)
++ unsigned long event, void *ptr)
+{
+ unsigned int cpu = (unsigned int)(long)ptr;
+ if (event != CPU_ONLINE)
@@ -25521,6 +27850,12 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+};
+#endif
+
++static inline unsigned long
++p2m_table_size(unsigned long num_pfn)
++{
++ return ((num_pfn + PTRS_PER_PTE - 1) / PTRS_PER_PTE) << PAGE_SHIFT;
++}
++
+static int
+p2m_expose_init(void)
+{
@@ -25530,7 +27865,6 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ int error = 0;
+#ifdef CONFIG_XEN_IA64_EXPOSE_P2M_USE_DTR
+ int i;
-+ unsigned long page_size;
+ unsigned long log_page_size = 0;
+#endif
+
@@ -25559,8 +27893,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+
+#ifdef CONFIG_XEN_IA64_EXPOSE_P2M_USE_DTR
+ if (xen_ia64_p2m_expose_use_dtr) {
++ unsigned long page_size = 0;
+ unsigned long granule_pfn = 0;
-+ p2m_size = p2m_max_low_pfn - p2m_min_low_pfn;
++ p2m_size = p2m_table_size(p2m_max_low_pfn - p2m_min_low_pfn);
+ for (i = 0;
+ i < sizeof(p2m_page_shifts)/sizeof(p2m_page_shifts[0]);
+ i++) {
@@ -25570,15 +27905,16 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ continue;
+
+ granule_pfn = max(page_size >> PAGE_SHIFT,
-+ p2m_granule_pfn);
++ p2m_granule_pfn);
+ p2m_convert_min_pfn = ROUNDDOWN(p2m_min_low_pfn,
-+ granule_pfn);
++ granule_pfn);
+ p2m_convert_max_pfn = ROUNDUP(p2m_max_low_pfn,
-+ granule_pfn);
++ granule_pfn);
+ num_pfn = p2m_convert_max_pfn - p2m_convert_min_pfn;
+ p2m_expose_size = num_pfn << PAGE_SHIFT;
-+ p2m_size = num_pfn / PTRS_PER_PTE;
-+ p2m_size = ROUNDUP(p2m_size, granule_pfn << PAGE_SHIFT);
++ p2m_size = p2m_table_size(num_pfn);
++ p2m_size = ROUNDUP(p2m_size,
++ granule_pfn << PAGE_SHIFT);
+ if (p2m_size == page_size)
+ break;
+ }
@@ -25593,24 +27929,25 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ {
+ BUG_ON(p2m_granule_pfn & (p2m_granule_pfn - 1));
+ p2m_convert_min_pfn = ROUNDDOWN(p2m_min_low_pfn,
-+ p2m_granule_pfn);
-+ p2m_convert_max_pfn = ROUNDUP(p2m_max_low_pfn, p2m_granule_pfn);
++ 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;
+ p2m_expose_size = num_pfn << PAGE_SHIFT;
-+ p2m_size = num_pfn / PTRS_PER_PTE;
++ p2m_size = p2m_table_size(num_pfn);
+ p2m_size = ROUNDUP(p2m_size, p2m_granule_pfn << PAGE_SHIFT);
+ align = max(privcmd_resource_align,
-+ p2m_granule_pfn << PAGE_SHIFT);
++ p2m_granule_pfn << PAGE_SHIFT);
+ }
+
-+ // use privcmd region
++ /* use privcmd region */
+ error = allocate_resource(&iomem_resource, &p2m_resource, p2m_size,
-+ privcmd_resource_min, privcmd_resource_max,
-+ align, NULL, NULL);
++ privcmd_resource_min, privcmd_resource_max,
++ align, NULL, NULL);
+ if (error) {
+ printk(KERN_ERR P2M_PREFIX
+ "can't allocate region for p2m exposure "
-+ "[0x%016lx, 0x%016lx) 0x%016lx\n",
++ "[0x%016lx, 0x%016lx] 0x%016lx\n",
+ p2m_convert_min_pfn, p2m_convert_max_pfn, p2m_size);
+ goto out;
+ }
@@ -25619,8 +27956,8 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ p2m_assign_end_pfn = p2m_resource.end >> PAGE_SHIFT;
+
+ error = HYPERVISOR_expose_p2m(p2m_convert_min_pfn,
-+ p2m_assign_start_pfn,
-+ p2m_expose_size, p2m_granule_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);
@@ -25635,9 +27972,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+#ifdef CONFIG_XEN_IA64_EXPOSE_P2M_USE_DTR
+ if (xen_ia64_p2m_expose_use_dtr) {
+ p2m_itr_arg.vaddr = (unsigned long)__va(p2m_assign_start_pfn
-+ << PAGE_SHIFT);
++ << PAGE_SHIFT);
+ p2m_itr_arg.pteval = pte_val(pfn_pte(p2m_assign_start_pfn,
-+ PAGE_KERNEL));
++ PAGE_KERNEL));
+ p2m_itr_arg.log_page_size = log_page_size;
+ smp_mb();
+ smp_call_function(&p2m_itr, &p2m_itr_arg, 1, 1);
@@ -25648,10 +27985,10 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ p2m_initialized = 1;
+ printk(P2M_PREFIX "assign p2m table of [0x%016lx, 0x%016lx)\n",
+ p2m_convert_min_pfn << PAGE_SHIFT,
-+ p2m_convert_max_pfn << PAGE_SHIFT);
++ (p2m_convert_max_pfn << PAGE_SHIFT) + PAGE_SIZE);
+ printk(P2M_PREFIX "to [0x%016lx, 0x%016lx) (%ld KBytes)\n",
+ p2m_assign_start_pfn << PAGE_SHIFT,
-+ p2m_assign_end_pfn << PAGE_SHIFT,
++ (p2m_assign_end_pfn << PAGE_SHIFT) + PAGE_SIZE,
+ p2m_size / 1024);
+out:
+ unlock_cpu_hotplug();
@@ -25685,8 +28022,8 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ * interrupts are masked when resume.
+ */
+ error = HYPERVISOR_expose_p2m(p2m_convert_min_pfn,
-+ p2m_assign_start_pfn,
-+ p2m_expose_size, p2m_granule_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);
@@ -25713,11 +28050,11 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ }
+}
+
-+//XXX inlinize?
++/* XXX inlinize? */
+unsigned long
+p2m_phystomach(unsigned long gpfn)
+{
-+ volatile const pte_t* pte;
++ volatile const pte_t *pte;
+ unsigned long mfn;
+ unsigned long pteval;
+
@@ -25729,8 +28066,8 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+
+ mfn = INVALID_MFN;
+ if (likely(__get_user(pteval, (unsigned long __user *)pte) == 0 &&
-+ pte_present(__pte(pteval)) &&
-+ pte_pfn(__pte(pteval)) != (INVALID_MFN >> PAGE_SHIFT)))
++ pte_present(__pte(pteval)) &&
++ pte_pfn(__pte(pteval)) != (INVALID_MFN >> PAGE_SHIFT)))
+ mfn = (pteval & _PFN_MASK) >> PAGE_SHIFT;
+
+ return mfn;
@@ -25743,26 +28080,230 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+EXPORT_SYMBOL_GPL(p2m_convert_max_pfn);
+EXPORT_SYMBOL_GPL(p2m_pte);
+EXPORT_SYMBOL_GPL(p2m_phystomach);
-+#endif
+
-+///////////////////////////////////////////////////////////////////////////
-+// for xenoprof
++/**************************************************************************
++ * foreign domain p2m mapping
++ */
++#include <asm/xen/xencomm.h>
++#include <xen/public/privcmd.h>
++
++struct foreign_p2m_private {
++ unsigned long gpfn;
++ domid_t domid;
++};
++
++static void
++xen_foreign_p2m_unexpose(struct xen_ia64_privcmd_range *privcmd_range,
++ void *arg)
++{
++ struct foreign_p2m_private *private = (struct foreign_p2m_private*)arg;
++ int ret;
++
++ privcmd_range->private = NULL;
++ privcmd_range->callback = NULL;
++
++ ret = HYPERVISOR_unexpose_foreign_p2m(private->gpfn, private->domid);
++ if (ret)
++ printk(KERN_WARNING
++ "unexpose_foreign_p2m hypercall failed.\n");
++ kfree(private);
++}
++
++int
++xen_foreign_p2m_expose(privcmd_hypercall_t *hypercall)
++{
++ /*
++ * hypercall->
++ * arg0: cmd = IA64_DOM0VP_expose_foreign_p2m
++ * arg1: va
++ * arg2: domid
++ * arg3: __user* memmap_info
++ * arg4: flags
++ */
++
++ int ret = 0;
++ struct mm_struct *mm = current->mm;
++
++ unsigned long vaddr = hypercall->arg[1];
++ domid_t domid = hypercall->arg[2];
++ struct xen_ia64_memmap_info __user *u_memmap_info =
++ (struct xen_ia64_memmap_info __user *)hypercall->arg[3];
++
++ struct xen_ia64_memmap_info memmap_info;
++ size_t memmap_size;
++ struct xen_ia64_memmap_info *k_memmap_info = NULL;
++ unsigned long max_gpfn;
++ unsigned long p2m_size;
++ struct resource *res;
++ unsigned long gpfn;
++
++ struct vm_area_struct *vma;
++ void *p;
++ unsigned long prev_src_gpfn_end;
++
++ struct xen_ia64_privcmd_vma *privcmd_vma;
++ struct xen_ia64_privcmd_range *privcmd_range;
++ struct foreign_p2m_private *private = NULL;
+
++ BUG_ON(hypercall->arg[0] != IA64_DOM0VP_expose_foreign_p2m);
++
++ private = kmalloc(sizeof(*private), GFP_KERNEL);
++ if (private == NULL)
++ goto kfree_out;
++
++ if (copy_from_user(&memmap_info, u_memmap_info, sizeof(memmap_info)))
++ return -EFAULT;
++ /* memmap_info integrity check */
++ if (memmap_info.efi_memdesc_size < sizeof(efi_memory_desc_t) ||
++ memmap_info.efi_memmap_size < memmap_info.efi_memdesc_size ||
++ (memmap_info.efi_memmap_size % memmap_info.efi_memdesc_size)
++ != 0) {
++ ret = -EINVAL;
++ goto kfree_out;
++ }
++
++ memmap_size = sizeof(*k_memmap_info) + memmap_info.efi_memmap_size;
++ k_memmap_info = kmalloc(memmap_size, GFP_KERNEL);
++ if (k_memmap_info == NULL)
++ return -ENOMEM;
++ if (copy_from_user(k_memmap_info, u_memmap_info, memmap_size)) {
++ ret = -EFAULT;
++ goto kfree_out;
++ }
++ /* k_memmap_info integrity check is done by the expose foreng p2m
++ hypercall */
++
++ max_gpfn = HYPERVISOR_memory_op(XENMEM_maximum_gpfn, &domid);
++ if (max_gpfn < 0) {
++ ret = max_gpfn;
++ goto kfree_out;
++ }
++ p2m_size = p2m_table_size(max_gpfn + 1);
++
++ down_write(&mm->mmap_sem);
++
++ vma = find_vma(mm, vaddr);
++ if (vma == NULL || vma->vm_ops != &xen_ia64_privcmd_vm_ops ||
++ vaddr != vma->vm_start ||
++ (vma->vm_flags & VM_WRITE) || (vma->vm_flags & VM_EXEC) ||
++ !privcmd_enforce_singleshot_mapping(vma))
++ goto mmap_out;
++
++ privcmd_vma = (struct xen_ia64_privcmd_vma*)vma->vm_private_data;
++ res = privcmd_vma->range->res;
++ if (p2m_size > (res->end - res->start + 1) ||
++ p2m_size > vma->vm_end - vma->vm_start) {
++ ret = -EINVAL;
++ goto mmap_out;
++ }
++
++ gpfn = res->start >> PAGE_SHIFT;
++ /*
++ * arg0: dest_gpfn
++ * arg1: domid
++ * arg2: XEN_GUEST_HANDLE(char) buffer: memmap_info
++ * arg3: flags
++ * The hypercall checks its intergirty/simplfies it and
++ * copy it back for us.
++ */
++ ret = xencomm_arch_expose_foreign_p2m(gpfn, domid,
++ xencomm_map_no_alloc(k_memmap_info, memmap_size),
++ hypercall->arg[4]);
++ if (ret)
++ goto mmap_out;
++
++ privcmd_range = (struct xen_ia64_privcmd_range*)privcmd_vma->range;
++ prev_src_gpfn_end = 0;
++ for (p = k_memmap_info->memdesc;
++ p < (void*)&k_memmap_info->memdesc[0] +
++ k_memmap_info->efi_memmap_size;
++ p += k_memmap_info->efi_memdesc_size) {
++ efi_memory_desc_t* md = p;
++ unsigned long src_gpfn = md->phys_addr >> PAGE_SHIFT;
++ unsigned long src_gpfn_end =
++ (md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) >>
++ PAGE_SHIFT;
++ unsigned long num_src_gpfn;
++ unsigned long gpfn_offset;
++ unsigned long size;
++ unsigned int i;
++
++ if (src_gpfn <= prev_src_gpfn_end)
++ src_gpfn = prev_src_gpfn_end + 1;
++ if (src_gpfn_end <= prev_src_gpfn_end)
++ continue;
++
++ src_gpfn &= ~(PTRS_PER_PTE - 1);
++ src_gpfn_end = (src_gpfn_end + PTRS_PER_PTE - 1) &
++ ~(PTRS_PER_PTE - 1);
++ num_src_gpfn = src_gpfn_end - src_gpfn;
++ gpfn_offset = src_gpfn / PTRS_PER_PTE;
++ size = p2m_table_size(num_src_gpfn);
++
++ prev_src_gpfn_end = src_gpfn_end;
++ ret = remap_pfn_range(vma,
++ vaddr + (gpfn_offset << PAGE_SHIFT),
++ gpfn + gpfn_offset, size,
++ vma->vm_page_prot);
++ if (ret) {
++ for (i = 0; i < gpfn + gpfn_offset; i++) {
++ struct xen_ia64_privcmd_entry *entry =
++ &privcmd_range->entries[i];
++ BUG_ON(atomic_read(&entry->map_count) != 1 &&
++ atomic_read(&entry->map_count) != 0);
++ atomic_set(&entry->map_count, 0);
++ entry->gpfn = INVALID_GPFN;
++ }
++ (void)HYPERVISOR_unexpose_foreign_p2m(gpfn, domid);
++ goto mmap_out;
++ }
++
++ for (i = gpfn_offset;
++ i < gpfn_offset + (size >> PAGE_SHIFT);
++ i++) {
++ struct xen_ia64_privcmd_entry *entry =
++ &privcmd_range->entries[i];
++ BUG_ON(atomic_read(&entry->map_count) != 0);
++ BUG_ON(entry->gpfn != INVALID_GPFN);
++ atomic_inc(&entry->map_count);
++ entry->gpfn = gpfn + i;
++ }
++ }
++
++ private->gpfn = gpfn;
++ private->domid = domid;
++
++ privcmd_range->callback = &xen_foreign_p2m_unexpose;
++ privcmd_range->private = private;
++
++mmap_out:
++ up_write(&mm->mmap_sem);
++kfree_out:
++ kfree(k_memmap_info);
++ if (ret != 0)
++ kfree(private);
++ return ret;
++}
++#endif
++
++/**************************************************************************
++ * for xenoprof
++ */
+struct resource*
+xen_ia64_allocate_resource(unsigned long size)
+{
-+ struct resource* res;
++ struct resource *res;
+ int error;
+
-+ res = kmalloc(sizeof(*res), GFP_KERNEL);
++ res = kzalloc(sizeof(*res), GFP_KERNEL);
+ if (res == NULL)
+ return ERR_PTR(-ENOMEM);
+
+ res->name = "Xen";
+ res->flags = IORESOURCE_MEM;
+ error = allocate_resource(&iomem_resource, res, PAGE_ALIGN(size),
-+ privcmd_resource_min, privcmd_resource_max,
-+ IA64_GRANULE_SIZE, NULL, NULL);
++ privcmd_resource_min, privcmd_resource_max,
++ IA64_GRANULE_SIZE, NULL, NULL);
+ if (error) {
+ kfree(res);
+ return ERR_PTR(error);
@@ -25772,7 +28313,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+EXPORT_SYMBOL_GPL(xen_ia64_allocate_resource);
+
+void
-+xen_ia64_release_resource(struct resource* res)
++xen_ia64_release_resource(struct resource *res)
+{
+ release_resource(res);
+ kfree(res);
@@ -25780,7 +28321,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+EXPORT_SYMBOL_GPL(xen_ia64_release_resource);
+
+void
-+xen_ia64_unmap_resource(struct resource* res)
++xen_ia64_unmap_resource(struct resource *res)
+{
+ unsigned long gpfn = res->start >> PAGE_SHIFT;
+ unsigned long nr_pages = (res->end - res->start) >> PAGE_SHIFT;
@@ -25797,8 +28338,25 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+}
+EXPORT_SYMBOL_GPL(xen_ia64_unmap_resource);
+
-+///////////////////////////////////////////////////////////////////////////
-+// suspend/resume
++/**************************************************************************
++ * opt feature
++ */
++void
++xen_ia64_enable_opt_feature(void)
++{
++ /* Enable region 7 identity map optimizations in Xen */
++ struct xen_ia64_opt_feature optf;
++
++ optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG7;
++ optf.on = XEN_IA64_OPTF_ON;
++ optf.pgprot = pgprot_val(PAGE_KERNEL);
++ optf.key = 0; /* No key on linux. */
++ HYPERVISOR_opt_feature(&optf);
++}
++
++/**************************************************************************
++ * suspend/resume
++ */
+void
+xen_post_suspend(int suspend_cancelled)
+{
@@ -25806,91 +28364,931 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/hypervisor.c tmp-linux-2.6-xen.pa
+ return;
+
+ p2m_expose_resume();
++ xen_ia64_enable_opt_feature();
+ /* 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,75 @@
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/machvec.c linux-2.6.18-xen-3.2.0/arch/ia64/xen/machvec.c
+--- linux-2.6.18.8/arch/ia64/xen/machvec.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/machvec.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,4 @@
++#define MACHVEC_PLATFORM_NAME xen
++#define MACHVEC_PLATFORM_HEADER <asm/machvec_xen.h>
++#include <asm/machvec_init.h>
++
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/swiotlb.c linux-2.6.18-xen-3.2.0/arch/ia64/xen/swiotlb.c
+--- linux-2.6.18.8/arch/ia64/xen/swiotlb.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/swiotlb.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,906 @@
+/*
-+ * Originally from linux/drivers/char/mem.c
++ * Dynamic DMA mapping support.
+ *
-+ * Copyright (C) 1991, 1992 Linus Torvalds
++ * This implementation is for IA-64 and EM64T platforms that do not support
++ * I/O TLBs (aka DMA address translation hardware).
++ * Copyright (C) 2000 Asit Mallick <Asit.K.Mallick@intel.com>
++ * Copyright (C) 2000 Goutham Rao <goutham.rao@intel.com>
++ * Copyright (C) 2000, 2003 Hewlett-Packard Co
++ * David Mosberger-Tang <davidm@hpl.hp.com>
+ *
-+ * Added devfs support.
-+ * Jan-11-1998, C. Scott Ananian <cananian@alumni.princeton.edu>
-+ * Shared /dev/zero mmaping support, Feb 2000, Kanoj Sarcar <kanoj@sgi.com>
++ * 03/05/07 davidm Switch from PCI-DMA to generic device DMA API.
++ * 00/12/13 davidm Rename to swiotlb.c and add mark_clean() to avoid
++ * unnecessary i-cache flushing.
++ * 04/07/.. ak Better overflow handling. Assorted fixes.
++ * 05/09/10 linville Add support for syncing ranges, support syncing for
++ * DMA_BIDIRECTIONAL mappings, miscellaneous cleanup.
+ */
++
++#include <linux/cache.h>
++#include <linux/dma-mapping.h>
++#include <linux/mm.h>
++#include <linux/module.h>
++#include <linux/spinlock.h>
++#include <linux/string.h>
++#include <linux/types.h>
++#include <linux/ctype.h>
++
++#include <asm/io.h>
++#include <asm/dma.h>
++#include <asm/scatterlist.h>
++
++#include <linux/init.h>
++#include <linux/bootmem.h>
++
++#ifdef CONFIG_XEN
++#include <xen/gnttab.h>
++#include <asm/gnttab_dma.h>
+/*
-+ * taken from
-+ * linux/drivers/char/mem.c and linux-2.6-xen-sparse/drivers/xen/char/mem.c.
-+ * adjusted for IA64 and made transparent.
-+ * Copyright (c) 2006 Isaku Yamahata <yamahata at valinux co jp>
-+ * VA Linux Systems Japan K.K.
++ * What DMA mask should Xen use to remap the bounce buffer pool? Most
++ * reports seem to indicate 30 bits is sufficient, except maybe for old
++ * sound cards that we probably don't care about anyway. If we need to,
++ * we could put in some smarts to try to lower, but hopefully it's not
++ * necessary.
+ */
++#define DMA_BITS (30)
++#endif
+
-+#include <linux/mm.h>
-+#include <linux/efi.h>
++#define OFFSET(val,align) ((unsigned long) \
++ ( (val) & ( (align) - 1)))
++
++#define SG_ENT_VIRT_ADDRESS(sg) (page_address((sg)->page) + (sg)->offset)
++#define SG_ENT_PHYS_ADDRESS(SG) virt_to_bus(SG_ENT_VIRT_ADDRESS(SG))
+
+/*
-+ * Architectures vary in how they handle caching for addresses
-+ * outside of main memory.
-+ *
++ * Maximum allowable number of contiguous slabs to map,
++ * must be a power of 2. What is the appropriate value ?
++ * The complexity of {map,unmap}_single is linearly dependent on this value.
++ */
++#define IO_TLB_SEGSIZE 128
++
++/*
++ * log of the size of each IO TLB slab. The number of slabs is command line
++ * controllable.
++ */
++#define IO_TLB_SHIFT 11
++
++#define SLABS_PER_PAGE (1 << (PAGE_SHIFT - IO_TLB_SHIFT))
++
++/*
++ * Minimum IO TLB size to bother booting with. Systems with mainly
++ * 64bit capable cards will only lightly use the swiotlb. If we can't
++ * allocate a contiguous 1MB, we're probably in trouble anyway.
++ */
++#define IO_TLB_MIN_SLABS ((1<<20) >> IO_TLB_SHIFT)
++
++/*
++ * Enumeration for sync targets
++ */
++enum dma_sync_target {
++ SYNC_FOR_CPU = 0,
++ SYNC_FOR_DEVICE = 1,
++};
++
++int swiotlb_force;
++
++/*
++ * Used to do a quick range check in swiotlb_unmap_single and
++ * swiotlb_sync_single_*, to see if the memory was in fact allocated by this
++ * API.
++ */
++static char *io_tlb_start, *io_tlb_end;
++
++/*
++ * The number of IO TLB blocks (in groups of 64) betweeen io_tlb_start and
++ * io_tlb_end. This is command line adjustable via setup_io_tlb_npages.
++ */
++static unsigned long io_tlb_nslabs;
++
++/*
++ * When the IOMMU overflows we return a fallback buffer. This sets the size.
++ */
++static unsigned long io_tlb_overflow = 32*1024;
++
++void *io_tlb_overflow_buffer;
++
++/*
++ * This is a free list describing the number of free entries available from
++ * each index
++ */
++static unsigned int *io_tlb_list;
++static unsigned int io_tlb_index;
++
++/*
++ * We need to save away the original address corresponding to a mapped entry
++ * for the sync operations.
++ */
++static unsigned char **io_tlb_orig_addr;
++
++/*
++ * Protect the above data structures in the map and unmap calls
++ */
++static DEFINE_SPINLOCK(io_tlb_lock);
++
++static int __init
++setup_io_tlb_npages(char *str)
++{
++ if (isdigit(*str)) {
++ io_tlb_nslabs = simple_strtoul(str, &str, 0);
++ /* avoid tail segment of size < IO_TLB_SEGSIZE */
++ io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
++ }
++ if (*str == ',')
++ ++str;
++ if (!strcmp(str, "force"))
++ swiotlb_force = 1;
++ return 1;
++}
++__setup("swiotlb=", setup_io_tlb_npages);
++/* make io_tlb_overflow tunable too? */
++
++/*
++ * Statically reserve bounce buffer space and initialize bounce buffer data
++ * structures for the software IO TLB used to implement the DMA API.
+ */
-+static inline int uncached_access(struct file *file, unsigned long addr)
++void
++swiotlb_init_with_default_size (size_t default_size)
+{
++ unsigned long i;
++
++ if (!io_tlb_nslabs) {
++ io_tlb_nslabs = (default_size >> IO_TLB_SHIFT);
++ io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
++ }
++
++#ifdef CONFIG_XEN
++ if (is_running_on_xen())
++ io_tlb_nslabs = roundup_pow_of_two(io_tlb_nslabs);
++#endif
++ /*
++ * Get IO TLB memory from the low pages
++ */
++ io_tlb_start = alloc_bootmem_low_pages(io_tlb_nslabs * (1 << IO_TLB_SHIFT));
++ if (!io_tlb_start)
++ panic("Cannot allocate SWIOTLB buffer");
++ io_tlb_end = io_tlb_start + io_tlb_nslabs * (1 << IO_TLB_SHIFT);
++
++#ifdef CONFIG_XEN
++ for (i = 0 ; i < io_tlb_nslabs ; i += IO_TLB_SEGSIZE) {
++ if (xen_create_contiguous_region(
++ (unsigned long)io_tlb_start +
++ (i << IO_TLB_SHIFT),
++ get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT),
++ DMA_BITS))
++ panic("Failed to setup Xen contiguous region");
++ }
++#endif
++
+ /*
-+ * On ia64, we ignore O_SYNC because we cannot tolerate memory attribute aliases.
++ * Allocate and initialize the free list array. This array is used
++ * to find contiguous free memory regions of size up to IO_TLB_SEGSIZE
++ * between io_tlb_start and io_tlb_end.
++ */
++ io_tlb_list = alloc_bootmem(io_tlb_nslabs * sizeof(int));
++ for (i = 0; i < io_tlb_nslabs; i++)
++ io_tlb_list[i] = IO_TLB_SEGSIZE - OFFSET(i, IO_TLB_SEGSIZE);
++ io_tlb_index = 0;
++ io_tlb_orig_addr = alloc_bootmem(io_tlb_nslabs * sizeof(char *));
++
++ /*
++ * Get the overflow emergency buffer
+ */
-+ return !(efi_mem_attributes(addr) & EFI_MEMORY_WB);
++ io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow);
++#ifdef CONFIG_XEN
++ if (xen_create_contiguous_region((unsigned long)io_tlb_overflow_buffer,
++ get_order(io_tlb_overflow), DMA_BITS))
++ panic("Failed to setup Xen contiguous region for overflow");
++#endif
++ printk(KERN_INFO "Placing software IO TLB between 0x%lx - 0x%lx\n",
++ virt_to_phys(io_tlb_start), virt_to_phys(io_tlb_end));
+}
+
-+int xen_mmap_mem(struct file * file, struct vm_area_struct * vma)
++void
++swiotlb_init (void)
+{
-+ unsigned long addr = vma->vm_pgoff << PAGE_SHIFT;
-+ size_t size = vma->vm_end - vma->vm_start;
++ swiotlb_init_with_default_size(64 * (1<<20)); /* default to 64MB */
++}
++
++/*
++ * Systems with larger DMA zones (those that don't support ISA) can
++ * initialize the swiotlb later using the slab allocator if needed.
++ * This should be just like above, but with some error catching.
++ */
++int
++swiotlb_late_init_with_default_size (size_t default_size)
++{
++ unsigned long i, req_nslabs = io_tlb_nslabs;
++ unsigned int order;
+
++ if (!io_tlb_nslabs) {
++ io_tlb_nslabs = (default_size >> IO_TLB_SHIFT);
++ io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
++ }
+
-+#if 0
++#ifdef CONFIG_XEN
++ if (is_running_on_xen())
++ io_tlb_nslabs = roundup_pow_of_two(io_tlb_nslabs);
++#endif
+ /*
-+ *XXX FIXME: linux-2.6.16.29, linux-2.6.17
-+ * valid_mmap_phys_addr_range() in linux/arch/ia64/kernel/efi.c
-+ * fails checks.
-+ * linux-2.6.18.1's returns always 1.
-+ * Its comments says
-+ *
-+ * MMIO regions are often missing from the EFI memory map.
-+ * We must allow mmap of them for programs like X, so we
-+ * currently can't do any useful validation.
-+ */
-+ if (!valid_mmap_phys_addr_range(addr, &size))
-+ return -EINVAL;
-+ if (size < vma->vm_end - vma->vm_start)
-+ return -EINVAL;
++ * Get IO TLB memory from the low pages
++ */
++ order = get_order(io_tlb_nslabs * (1 << IO_TLB_SHIFT));
++ io_tlb_nslabs = SLABS_PER_PAGE << order;
++
++ while ((SLABS_PER_PAGE << order) > IO_TLB_MIN_SLABS) {
++ io_tlb_start = (char *)__get_free_pages(GFP_DMA | __GFP_NOWARN,
++ order);
++ if (io_tlb_start)
++ break;
++ order--;
++ }
++
++ if (!io_tlb_start)
++ goto cleanup1;
++
++ if (order != get_order(io_tlb_nslabs * (1 << IO_TLB_SHIFT))) {
++ printk(KERN_WARNING "Warning: only able to allocate %ld MB "
++ "for software IO TLB\n", (PAGE_SIZE << order) >> 20);
++ io_tlb_nslabs = SLABS_PER_PAGE << order;
++ }
++ io_tlb_end = io_tlb_start + io_tlb_nslabs * (1 << IO_TLB_SHIFT);
++ memset(io_tlb_start, 0, io_tlb_nslabs * (1 << IO_TLB_SHIFT));
++
++#ifdef CONFIG_XEN
++ for (i = 0 ; i < io_tlb_nslabs ; i += IO_TLB_SEGSIZE) {
++ if (xen_create_contiguous_region(
++ (unsigned long)io_tlb_start +
++ (i << IO_TLB_SHIFT),
++ get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT),
++ DMA_BITS))
++ panic("Failed to setup Xen contiguous region");
++ }
+#endif
++ /*
++ * Allocate and initialize the free list array. This array is used
++ * to find contiguous free memory regions of size up to IO_TLB_SEGSIZE
++ * between io_tlb_start and io_tlb_end.
++ */
++ io_tlb_list = (unsigned int *)__get_free_pages(GFP_KERNEL,
++ get_order(io_tlb_nslabs * sizeof(int)));
++ if (!io_tlb_list)
++ goto cleanup2;
+
-+ if (is_running_on_xen()) {
-+ unsigned long offset = HYPERVISOR_ioremap(addr, size);
-+ if (IS_ERR_VALUE(offset))
-+ return offset;
++ for (i = 0; i < io_tlb_nslabs; i++)
++ io_tlb_list[i] = IO_TLB_SEGSIZE - OFFSET(i, IO_TLB_SEGSIZE);
++ io_tlb_index = 0;
++
++ io_tlb_orig_addr = (unsigned char **)__get_free_pages(GFP_KERNEL,
++ get_order(io_tlb_nslabs * sizeof(char *)));
++ if (!io_tlb_orig_addr)
++ goto cleanup3;
++
++ memset(io_tlb_orig_addr, 0, io_tlb_nslabs * sizeof(char *));
++
++ /*
++ * Get the overflow emergency buffer
++ */
++ io_tlb_overflow_buffer = (void *)__get_free_pages(GFP_DMA,
++ get_order(io_tlb_overflow));
++ if (!io_tlb_overflow_buffer)
++ goto cleanup4;
++
++#ifdef CONFIG_XEN
++ if (xen_create_contiguous_region((unsigned long)io_tlb_overflow_buffer,
++ get_order(io_tlb_overflow), DMA_BITS))
++ panic("Failed to setup Xen contiguous region for overflow");
++#endif
++ printk(KERN_INFO "Placing %ldMB software IO TLB between 0x%lx - "
++ "0x%lx\n", (io_tlb_nslabs * (1 << IO_TLB_SHIFT)) >> 20,
++ virt_to_phys(io_tlb_start), virt_to_phys(io_tlb_end));
++
++ return 0;
++
++cleanup4:
++ free_pages((unsigned long)io_tlb_orig_addr, get_order(io_tlb_nslabs *
++ sizeof(char *)));
++ io_tlb_orig_addr = NULL;
++cleanup3:
++ free_pages((unsigned long)io_tlb_list, get_order(io_tlb_nslabs *
++ sizeof(int)));
++ io_tlb_list = NULL;
++ io_tlb_end = NULL;
++cleanup2:
++ free_pages((unsigned long)io_tlb_start, order);
++ io_tlb_start = NULL;
++cleanup1:
++ io_tlb_nslabs = req_nslabs;
++ return -ENOMEM;
++}
++
++static inline int
++address_needs_mapping(struct device *hwdev, dma_addr_t addr)
++{
++ dma_addr_t mask = 0xffffffff;
++ /* If the device has a mask, use it, otherwise default to 32 bits */
++ if (hwdev && hwdev->dma_mask)
++ mask = *hwdev->dma_mask;
++ return (addr & ~mask) != 0;
++}
++
++/*
++ * Allocates bounce buffer and returns its kernel virtual address.
++ */
++static void *
++map_single(struct device *hwdev, char *buffer, size_t size, int dir)
++{
++ unsigned long flags;
++ char *dma_addr;
++ unsigned int nslots, stride, index, wrap;
++ char *slot_buf;
++ int i;
++
++ /*
++ * For mappings greater than a page, we limit the stride (and
++ * hence alignment) to a page size.
++ */
++ nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
++ if (size > PAGE_SIZE)
++ stride = (1 << (PAGE_SHIFT - IO_TLB_SHIFT));
++ else
++ stride = 1;
++
++ BUG_ON(!nslots);
++
++ /*
++ * Find suitable number of IO TLB entries size that will fit this
++ * request and allocate a buffer from that IO TLB pool.
++ */
++ spin_lock_irqsave(&io_tlb_lock, flags);
++ {
++ wrap = index = ALIGN(io_tlb_index, stride);
++
++ if (index >= io_tlb_nslabs)
++ wrap = index = 0;
++
++ do {
++ /*
++ * If we find a slot that indicates we have 'nslots'
++ * number of contiguous buffers, we allocate the
++ * buffers from that slot and mark the entries as '0'
++ * indicating unavailable.
++ */
++ if (io_tlb_list[index] >= nslots) {
++ int count = 0;
++
++ for (i = index; i < (int) (index + nslots); i++)
++ io_tlb_list[i] = 0;
++ for (i = index - 1; (OFFSET(i, IO_TLB_SEGSIZE) != IO_TLB_SEGSIZE -1) && io_tlb_list[i]; i--)
++ io_tlb_list[i] = ++count;
++ dma_addr = io_tlb_start + (index << IO_TLB_SHIFT);
++
++ /*
++ * Update the indices to avoid searching in
++ * the next round.
++ */
++ io_tlb_index = ((index + nslots) < io_tlb_nslabs
++ ? (index + nslots) : 0);
++
++ goto found;
++ }
++ index += stride;
++ if (index >= io_tlb_nslabs)
++ index = 0;
++ } while (index != wrap);
++
++ spin_unlock_irqrestore(&io_tlb_lock, flags);
++ return NULL;
+ }
++ found:
++ spin_unlock_irqrestore(&io_tlb_lock, flags);
+
-+ if (uncached_access(file, vma->vm_pgoff << PAGE_SHIFT))
-+ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
++ /*
++ * Save away the mapping from the original address to the DMA address.
++ * This is needed when we sync the memory. Then we sync the buffer if
++ * needed.
++ */
++ slot_buf = buffer;
++ for (i = 0; i < nslots; i++) {
++ io_tlb_orig_addr[index + i] = slot_buf;
++ slot_buf += 1 << IO_TLB_SHIFT;
++ }
++ if (dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL)
++ memcpy(dma_addr, buffer, size);
+
-+ /* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */
-+ if (remap_pfn_range(vma,
-+ vma->vm_start,
-+ vma->vm_pgoff,
-+ size,
-+ vma->vm_page_prot))
-+ return -EAGAIN;
-+ return 0;
-+}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,105 @@
++ return dma_addr;
++}
++
++/*
++ * dma_addr is the kernel virtual address of the bounce buffer to unmap.
++ */
++static void
++unmap_single(struct device *hwdev, char *dma_addr, size_t size, int dir)
++{
++ unsigned long flags;
++ int i, count, nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
++ int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT;
++ char *buffer = io_tlb_orig_addr[index];
++
++ /*
++ * First, sync the memory before unmapping the entry
++ */
++ if (buffer && ((dir == DMA_FROM_DEVICE) || (dir == DMA_BIDIRECTIONAL)))
++ /*
++ * bounce... copy the data back into the original buffer * and
++ * delete the bounce buffer.
++ */
++ memcpy(buffer, dma_addr, size);
++
++ /*
++ * Return the buffer to the free list by setting the corresponding
++ * entries to indicate the number of contigous entries available.
++ * While returning the entries to the free list, we merge the entries
++ * with slots below and above the pool being returned.
++ */
++ spin_lock_irqsave(&io_tlb_lock, flags);
++ {
++ count = ((index + nslots) < ALIGN(index + 1, IO_TLB_SEGSIZE) ?
++ io_tlb_list[index + nslots] : 0);
++ /*
++ * Step 1: return the slots to the free list, merging the
++ * slots with superceeding slots
++ */
++ for (i = index + nslots - 1; i >= index; i--)
++ io_tlb_list[i] = ++count;
++ /*
++ * Step 2: merge the returned slots with the preceding slots,
++ * if available (non zero)
++ */
++ for (i = index - 1; (OFFSET(i, IO_TLB_SEGSIZE) != IO_TLB_SEGSIZE -1) && io_tlb_list[i]; i--)
++ io_tlb_list[i] = ++count;
++ }
++ spin_unlock_irqrestore(&io_tlb_lock, flags);
++}
++
++static void
++sync_single(struct device *hwdev, char *dma_addr, size_t size,
++ int dir, int target)
++{
++ int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT;
++ char *buffer = io_tlb_orig_addr[index];
++
++ switch (target) {
++ case SYNC_FOR_CPU:
++ if (likely(dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL))
++ memcpy(buffer, dma_addr, size);
++ else
++ BUG_ON(dir != DMA_TO_DEVICE);
++ break;
++ case SYNC_FOR_DEVICE:
++ if (likely(dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL))
++ memcpy(dma_addr, buffer, size);
++ else
++ BUG_ON(dir != DMA_FROM_DEVICE);
++ break;
++ default:
++ BUG();
++ }
++}
++
++void *
++swiotlb_alloc_coherent(struct device *hwdev, size_t size,
++ dma_addr_t *dma_handle, gfp_t flags)
++{
++ unsigned long dev_addr;
++ void *ret;
++ int order = get_order(size);
++
++ /*
++ * XXX fix me: the DMA API should pass us an explicit DMA mask
++ * instead, or use ZONE_DMA32 (ia64 overloads ZONE_DMA to be a ~32
++ * bit range instead of a 16MB one).
++ */
++ flags |= GFP_DMA;
++
++ ret = (void *)__get_free_pages(flags, order);
++#ifdef CONFIG_XEN
++ if (ret && is_running_on_xen()) {
++ if (xen_create_contiguous_region((unsigned long)ret, order,
++ fls64(hwdev->coherent_dma_mask))) {
++ free_pages((unsigned long)ret, order);
++ ret = NULL;
++ } else {
++ /*
++ * Short circuit the rest, xen_create_contiguous_region
++ * should fail if it didn't give us an address within
++ * the mask requested.
++ */
++ memset(ret, 0, size);
++ *dma_handle = virt_to_bus(ret);
++ return ret;
++ }
++ }
++#endif
++ if (ret && address_needs_mapping(hwdev, virt_to_bus(ret))) {
++ /*
++ * The allocated memory isn't reachable by the device.
++ * Fall back on swiotlb_map_single().
++ */
++ free_pages((unsigned long) ret, order);
++ ret = NULL;
++ }
++ if (!ret) {
++ /*
++ * We are either out of memory or the device can't DMA
++ * to GFP_DMA memory; fall back on
++ * swiotlb_map_single(), which will grab memory from
++ * the lowest available address range.
++ */
++ dma_addr_t handle;
++ handle = swiotlb_map_single(NULL, NULL, size, DMA_FROM_DEVICE);
++ if (swiotlb_dma_mapping_error(handle))
++ return NULL;
++
++ ret = bus_to_virt(handle);
++ }
++
++ memset(ret, 0, size);
++ dev_addr = virt_to_bus(ret);
++
++ /* Confirm address can be DMA'd by device */
++ if (address_needs_mapping(hwdev, dev_addr)) {
++ printk("hwdev DMA mask = 0x%016Lx, dev_addr = 0x%016lx\n",
++ (unsigned long long)*hwdev->dma_mask, dev_addr);
++ panic("swiotlb_alloc_coherent: allocated memory is out of "
++ "range for device");
++ }
++ *dma_handle = dev_addr;
++ return ret;
++}
++
++void
++swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr,
++ dma_addr_t dma_handle)
++{
++ if (!(vaddr >= (void *)io_tlb_start
++ && vaddr < (void *)io_tlb_end)) {
++#ifdef CONFIG_XEN
++ xen_destroy_contiguous_region((unsigned long)vaddr,
++ get_order(size));
++#endif
++ free_pages((unsigned long) vaddr, get_order(size));
++ } else
++ /* DMA_TO_DEVICE to avoid memcpy in unmap_single */
++ swiotlb_unmap_single (hwdev, dma_handle, size, DMA_TO_DEVICE);
++}
++
++static void
++swiotlb_full(struct device *dev, size_t size, int dir, int do_panic)
++{
++ /*
++ * Ran out of IOMMU space for this operation. This is very bad.
++ * Unfortunately the drivers cannot handle this operation properly.
++ * unless they check for dma_mapping_error (most don't)
++ * When the mapping is small enough return a static buffer to limit
++ * the damage, or panic when the transfer is too big.
++ */
++ printk(KERN_ERR "DMA: Out of SW-IOMMU space for %lu bytes at "
++ "device %s\n", size, dev ? dev->bus_id : "?");
++
++ if (size > io_tlb_overflow && do_panic) {
++ if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL)
++ panic("DMA: Memory would be corrupted\n");
++ if (dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL)
++ panic("DMA: Random memory would be DMAed\n");
++ }
++}
++
++/*
++ * Map a single buffer of the indicated size for DMA in streaming mode. The
++ * physical address to use is returned.
++ *
++ * Once the device is given the dma address, the device owns this memory until
++ * either swiotlb_unmap_single or swiotlb_dma_sync_single is performed.
++ */
++dma_addr_t
++swiotlb_map_single(struct device *hwdev, void *ptr, size_t size, int dir)
++{
++ unsigned long dev_addr = gnttab_dma_map_virt(ptr);
++ void *map;
++
++ BUG_ON(dir == DMA_NONE);
++ /*
++ * If the pointer passed in happens to be in the device's DMA window,
++ * we can safely return the device addr and not worry about bounce
++ * buffering it.
++ */
++ if (!range_straddles_page_boundary(__pa(ptr), size) &&
++ !address_needs_mapping(hwdev, dev_addr) && !swiotlb_force)
++ return dev_addr;
++
++ __gnttab_dma_unmap_page(virt_to_page(ptr));
++ /*
++ * Oh well, have to allocate and map a bounce buffer.
++ */
++ map = map_single(hwdev, ptr, size, dir);
++ if (!map) {
++ swiotlb_full(hwdev, size, dir, 1);
++ map = io_tlb_overflow_buffer;
++ }
++
++ dev_addr = virt_to_bus(map);
++
++ /*
++ * Ensure that the address returned is DMA'ble
++ */
++ if (address_needs_mapping(hwdev, dev_addr))
++ panic("map_single: bounce buffer is not DMA'ble");
++
++ return dev_addr;
++}
++
++/*
++ * Since DMA is i-cache coherent, any (complete) pages that were written via
++ * DMA can be marked as "clean" so that lazy_mmu_prot_update() doesn't have to
++ * flush them when they get mapped into an executable vm-area.
++ */
++static void
++mark_clean(void *addr, size_t size)
++{
++ unsigned long pg_addr, end;
++
++#ifdef CONFIG_XEN
++ /* XXX: Bad things happen when starting domUs if this is enabled. */
++ if (is_running_on_xen())
++ return;
++#endif
++
++ pg_addr = PAGE_ALIGN((unsigned long) addr);
++ end = (unsigned long) addr + size;
++ while (pg_addr + PAGE_SIZE <= end) {
++ struct page *page = virt_to_page(pg_addr);
++ set_bit(PG_arch_1, &page->flags);
++ pg_addr += PAGE_SIZE;
++ }
++}
++
++/*
++ * Unmap a single streaming mode DMA translation. The dma_addr and size must
++ * match what was provided for in a previous swiotlb_map_single call. All
++ * other usages are undefined.
++ *
++ * After this call, reads by the cpu to the buffer are guaranteed to see
++ * whatever the device wrote there.
++ */
++void
++swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr, size_t size,
++ int dir)
++{
++ char *dma_addr = bus_to_virt(dev_addr);
++
++ BUG_ON(dir == DMA_NONE);
++ if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
++ unmap_single(hwdev, dma_addr, size, dir);
++ else {
++ __gnttab_dma_unmap_page(virt_to_page(dma_addr));
++ if (dir == DMA_FROM_DEVICE)
++ mark_clean(dma_addr, size);
++ }
++}
++
++/*
++ * Make physical memory consistent for a single streaming mode DMA translation
++ * after a transfer.
++ *
++ * If you perform a swiotlb_map_single() but wish to interrogate the buffer
++ * using the cpu, yet do not wish to teardown the dma mapping, you must
++ * call this function before doing so. At the next point you give the dma
++ * address back to the card, you must first perform a
++ * swiotlb_dma_sync_for_device, and then the device again owns the buffer
++ */
++static inline void
++swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr,
++ size_t size, int dir, int target)
++{
++ char *dma_addr = bus_to_virt(dev_addr);
++
++ BUG_ON(dir == DMA_NONE);
++ if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
++ sync_single(hwdev, dma_addr, size, dir, target);
++ else if (dir == DMA_FROM_DEVICE)
++ mark_clean(dma_addr, size);
++}
++
++void
++swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
++ size_t size, int dir)
++{
++ swiotlb_sync_single(hwdev, dev_addr, size, dir, SYNC_FOR_CPU);
++}
++
++void
++swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr,
++ size_t size, int dir)
++{
++ swiotlb_sync_single(hwdev, dev_addr, size, dir, SYNC_FOR_DEVICE);
++}
++
++/*
++ * Same as above, but for a sub-range of the mapping.
++ */
++static inline void
++swiotlb_sync_single_range(struct device *hwdev, dma_addr_t dev_addr,
++ unsigned long offset, size_t size,
++ int dir, int target)
++{
++ char *dma_addr = bus_to_virt(dev_addr) + offset;
++
++ BUG_ON(dir == DMA_NONE);
++ if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
++ sync_single(hwdev, dma_addr, size, dir, target);
++ else if (dir == DMA_FROM_DEVICE)
++ mark_clean(dma_addr, size);
++}
++
++void
++swiotlb_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
++ unsigned long offset, size_t size, int dir)
++{
++ swiotlb_sync_single_range(hwdev, dev_addr, offset, size, dir,
++ SYNC_FOR_CPU);
++}
++
++void
++swiotlb_sync_single_range_for_device(struct device *hwdev, dma_addr_t dev_addr,
++ unsigned long offset, size_t size, int dir)
++{
++ swiotlb_sync_single_range(hwdev, dev_addr, offset, size, dir,
++ SYNC_FOR_DEVICE);
++}
++
++/*
++ * Map a set of buffers described by scatterlist in streaming mode for DMA.
++ * This is the scatter-gather version of the above swiotlb_map_single
++ * interface. Here the scatter gather list elements are each tagged with the
++ * appropriate dma address and length. They are obtained via
++ * sg_dma_{address,length}(SG).
++ *
++ * NOTE: An implementation may be able to use a smaller number of
++ * DMA address/length pairs than there are SG table elements.
++ * (for example via virtual mapping capabilities)
++ * The routine returns the number of addr/length pairs actually
++ * used, at most nents.
++ *
++ * Device ownership issues as mentioned above for swiotlb_map_single are the
++ * same here.
++ */
++int
++swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
++ int dir)
++{
++ void *addr;
++ unsigned long dev_addr;
++ int i;
++
++ BUG_ON(dir == DMA_NONE);
++
++ for (i = 0; i < nelems; i++, sg++) {
++ addr = SG_ENT_VIRT_ADDRESS(sg);
++ dev_addr = gnttab_dma_map_virt(addr);
++ if (swiotlb_force ||
++ range_straddles_page_boundary(page_to_pseudophys(sg->page)
++ + sg->offset, sg->length) ||
++ address_needs_mapping(hwdev, dev_addr)) {
++ void *map;
++ __gnttab_dma_unmap_page(sg->page);
++ map = map_single(hwdev, addr, sg->length, dir);
++ sg->dma_address = virt_to_bus(map);
++ if (!map) {
++ /* Don't panic here, we expect map_sg users
++ to do proper error handling. */
++ swiotlb_full(hwdev, sg->length, dir, 0);
++ swiotlb_unmap_sg(hwdev, sg - i, i, dir);
++ sg[0].dma_length = 0;
++ return 0;
++ }
++ } else
++ sg->dma_address = dev_addr;
++ sg->dma_length = sg->length;
++ }
++ return nelems;
++}
++
++/*
++ * Unmap a set of streaming mode DMA translations. Again, cpu read rules
++ * concerning calls here are the same as for swiotlb_unmap_single() above.
++ */
++void
++swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
++ int dir)
++{
++ int i;
++
++ BUG_ON(dir == DMA_NONE);
++
++ for (i = 0; i < nelems; i++, sg++)
++ if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
++ unmap_single(hwdev, (void *) bus_to_virt(sg->dma_address), sg->dma_length, dir);
++ else {
++ __gnttab_dma_unmap_page(sg->page);
++ if (dir == DMA_FROM_DEVICE)
++ mark_clean(SG_ENT_VIRT_ADDRESS(sg),
++ sg->dma_length);
++ }
++}
++
++/*
++ * Make physical memory consistent for a set of streaming mode DMA translations
++ * after a transfer.
++ *
++ * The same as swiotlb_sync_single_* but for a scatter-gather list, same rules
++ * and usage.
++ */
++static inline void
++swiotlb_sync_sg(struct device *hwdev, struct scatterlist *sg,
++ int nelems, int dir, int target)
++{
++ int i;
++
++ BUG_ON(dir == DMA_NONE);
++
++ for (i = 0; i < nelems; i++, sg++)
++ if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
++ sync_single(hwdev, (void *) sg->dma_address,
++ sg->dma_length, dir, target);
++}
++
++void
++swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
++ int nelems, int dir)
++{
++ swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_CPU);
++}
++
++void
++swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
++ int nelems, int dir)
++{
++ swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_DEVICE);
++}
++
++int
++swiotlb_dma_mapping_error(dma_addr_t dma_addr)
++{
++ return (dma_addr == virt_to_bus(io_tlb_overflow_buffer));
++}
++
++/*
++ * Return whether the given device DMA address mask can be supported
++ * properly. For example, if your device can only drive the low 24-bits
++ * during bus mastering, then you would pass 0x00ffffff as the mask to
++ * this function.
++ */
++int
++swiotlb_dma_supported (struct device *hwdev, u64 mask)
++{
++#ifdef CONFIG_XEN
++ return (virt_to_bus(io_tlb_end - 1)) <= mask;
++#else
++ return (virt_to_bus(io_tlb_end) - 1) <= mask;
++#endif
++}
++
++EXPORT_SYMBOL(swiotlb_init);
++EXPORT_SYMBOL(swiotlb_map_single);
++EXPORT_SYMBOL(swiotlb_unmap_single);
++EXPORT_SYMBOL(swiotlb_map_sg);
++EXPORT_SYMBOL(swiotlb_unmap_sg);
++EXPORT_SYMBOL(swiotlb_sync_single_for_cpu);
++EXPORT_SYMBOL(swiotlb_sync_single_for_device);
++EXPORT_SYMBOL_GPL(swiotlb_sync_single_range_for_cpu);
++EXPORT_SYMBOL_GPL(swiotlb_sync_single_range_for_device);
++EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu);
++EXPORT_SYMBOL(swiotlb_sync_sg_for_device);
++EXPORT_SYMBOL(swiotlb_dma_mapping_error);
++EXPORT_SYMBOL(swiotlb_alloc_coherent);
++EXPORT_SYMBOL(swiotlb_free_coherent);
++EXPORT_SYMBOL(swiotlb_dma_supported);
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/util.c linux-2.6.18-xen-3.2.0/arch/ia64/xen/util.c
+--- linux-2.6.18.8/arch/ia64/xen/util.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/util.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,102 @@
+/******************************************************************************
+ * arch/ia64/xen/util.c
+ * This file is the ia64 counterpart of drivers/xen/util.c
@@ -25928,25 +29326,23 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/util.c tmp-linux-2.6-xen.patch/ar
+ int order;
+ unsigned long virt;
+ unsigned long nr_pages;
-+ struct vm_struct* area;
-+
++ struct vm_struct *area;
++
+ order = get_order(size);
+ virt = __get_free_pages(GFP_KERNEL, order);
-+ if (virt == 0) {
++ if (virt == 0)
+ goto err0;
-+ }
+ nr_pages = 1 << order;
+ scrub_pages(virt, nr_pages);
-+
++
+ area = kmalloc(sizeof(*area), GFP_KERNEL);
-+ if (area == NULL) {
++ if (area == NULL)
+ goto err1;
-+ }
-+
-+ area->flags = VM_IOREMAP;//XXX
++
++ area->flags = VM_IOREMAP; /* XXX */
+ area->addr = (void*)virt;
+ area->size = size;
-+ area->pages = NULL; //XXX
++ area->pages = NULL; /* XXX */
+ area->nr_pages = nr_pages;
+ area->phys_addr = 0; /* xenbus_map_ring_valloc uses this field! */
+
@@ -25956,7 +29352,6 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/util.c tmp-linux-2.6-xen.patch/ar
+ free_pages(virt, order);
+err0:
+ return NULL;
-+
+}
+EXPORT_SYMBOL_GPL(alloc_vm_area);
+
@@ -25966,8 +29361,8 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/util.c tmp-linux-2.6-xen.patch/ar
+ unsigned long i;
+ unsigned long phys_addr = __pa(area->addr);
+
-+ // This area is used for foreign page mappping.
-+ // So underlying machine page may not be assigned.
++ /* This area is used for foreign page mappping.
++ * So underlying machine page may not be assigned. */
+ for (i = 0; i < (1 << order); i++) {
+ unsigned long ret;
+ unsigned long gpfn = (phys_addr >> PAGE_SHIFT) + i;
@@ -25996,10 +29391,10 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/util.c tmp-linux-2.6-xen.patch/ar
+ * tab-width: 8
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,383 @@
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/xcom_hcall.c linux-2.6.18-xen-3.2.0/arch/ia64/xen/xcom_hcall.c
+--- linux-2.6.18.8/arch/ia64/xen/xcom_hcall.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/xcom_hcall.c 2008-02-15 16:21:49.000000000 -0800
+@@ -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
@@ -26016,6 +29411,11 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_hcall.c tmp-linux-2.6-xen.pa
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Tristan Gingold <tristan.gingold@bull.net>
++ *
++ * Copyright (c) 2007
++ * Isaku Yamahata <yamahata at valinux co jp>
++ * VA Linux Systems Japan K.K.
++ * consolidate mini and inline version.
+ */
+#include <linux/types.h>
+#include <linux/errno.h>
@@ -26032,11 +29432,12 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_hcall.c tmp-linux-2.6-xen.pa
+#include <xen/interface/physdev.h>
+#include <xen/interface/grant_table.h>
+#include <xen/interface/callback.h>
-+#include <xen/interface/acm_ops.h>
++#include <xen/interface/xsm/acm_ops.h>
+#include <xen/interface/hvm/params.h>
+#include <xen/interface/xenoprof.h>
+#include <xen/interface/vcpu.h>
-+#include <asm/hypercall.h>
++#include <xen/interface/kexec.h>
++#include <asm/hypervisor.h>
+#include <asm/page.h>
+#include <asm/uaccess.h>
+#include <asm/xen/xencomm.h>
@@ -26044,8 +29445,8 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_hcall.c tmp-linux-2.6-xen.pa
+
+/* Xencomm notes:
+ * This file defines hypercalls to be used by xencomm. The hypercalls simply
-+ * create inlines descriptors for pointers and then call the raw arch hypercall
-+ * xencomm_arch_hypercall_XXX
++ * create inlines or mini descriptors for pointers and then call the raw arch
++ * hypercall xencomm_arch_hypercall_XXX
+ *
+ * If the arch wants to directly use these hypercalls, simply define macros
+ * in asm/hypercall.h, eg:
@@ -26054,106 +29455,206 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_hcall.c tmp-linux-2.6-xen.pa
+ * The arch may also define HYPERVISOR_xxx as a function and do more operations
+ * before/after doing the hypercall.
+ *
-+ * Note: because only inline descriptors are created these functions must only
-+ * be called with in kernel memory parameters.
++ * Note: because only inline or mini descriptors are created these functions
++ * must only be called with in kernel memory parameters.
+ */
+
+int
+xencomm_hypercall_console_io(int cmd, int count, char *str)
+{
+ return xencomm_arch_hypercall_console_io
-+ (cmd, count, xencomm_create_inline(str));
++ (cmd, count, xencomm_map_no_alloc(str, count));
+}
++EXPORT_SYMBOL_GPL(xencomm_hypercall_console_io);
+
+int
+xencomm_hypercall_event_channel_op(int cmd, void *op)
+{
-+ return xencomm_arch_hypercall_event_channel_op
-+ (cmd, xencomm_create_inline(op));
++ struct xencomm_handle *desc;
++ desc = xencomm_map_no_alloc(op, sizeof(evtchn_op_t));
++ if (desc == NULL)
++ return -EINVAL;
++
++ return xencomm_arch_hypercall_event_channel_op(cmd, desc);
+}
++EXPORT_SYMBOL_GPL(xencomm_hypercall_event_channel_op);
+
+int
+xencomm_hypercall_xen_version(int cmd, void *arg)
+{
++ struct xencomm_handle *desc;
++ unsigned int argsize;
++
+ switch (cmd) {
+ case XENVER_version:
++ /* do not actually pass an argument */
++ return xencomm_arch_hypercall_xen_version(cmd, 0);
+ case XENVER_extraversion:
++ argsize = sizeof(xen_extraversion_t);
++ break;
+ case XENVER_compile_info:
++ argsize = sizeof(xen_compile_info_t);
++ break;
+ case XENVER_capabilities:
++ argsize = sizeof(xen_capabilities_info_t);
++ break;
+ case XENVER_changeset:
++ argsize = sizeof(xen_changeset_info_t);
++ break;
+ case XENVER_platform_parameters:
++ argsize = sizeof(xen_platform_parameters_t);
++ break;
+ case XENVER_pagesize:
++ argsize = (arg == NULL) ? 0 : sizeof(void *);
++ break;
+ case XENVER_get_features:
++ argsize = (arg == NULL) ? 0 : sizeof(xen_feature_info_t);
+ break;
++
+ default:
-+ printk("%s: unknown version cmd %d\n", __func__, cmd);
++ printk("%s: unknown version op %d\n", __func__, cmd);
+ return -ENOSYS;
+ }
+
-+ return xencomm_arch_hypercall_xen_version
-+ (cmd, xencomm_create_inline(arg));
++ desc = xencomm_map_no_alloc(arg, argsize);
++ if (desc == NULL)
++ return -EINVAL;
++
++ return xencomm_arch_hypercall_xen_version(cmd, desc);
+}
++EXPORT_SYMBOL_GPL(xencomm_hypercall_xen_version);
+
+int
+xencomm_hypercall_physdev_op(int cmd, void *op)
+{
++ unsigned int argsize;
++
++ switch (cmd) {
++ case PHYSDEVOP_apic_read:
++ case PHYSDEVOP_apic_write:
++ argsize = sizeof(physdev_apic_t);
++ break;
++ case PHYSDEVOP_alloc_irq_vector:
++ case PHYSDEVOP_free_irq_vector:
++ argsize = sizeof(physdev_irq_t);
++ break;
++ case PHYSDEVOP_irq_status_query:
++ argsize = sizeof(physdev_irq_status_query_t);
++ break;
++
++ default:
++ printk("%s: unknown physdev op %d\n", __func__, cmd);
++ return -ENOSYS;
++ }
++
+ return xencomm_arch_hypercall_physdev_op
-+ (cmd, xencomm_create_inline(op));
++ (cmd, xencomm_map_no_alloc(op, argsize));
+}
+
-+static void *
-+xencommize_grant_table_op(unsigned int cmd, void *op, unsigned int count)
++static int
++xencommize_grant_table_op(struct xencomm_mini **xc_area,
++ unsigned int cmd, void *op, unsigned int count,
++ struct xencomm_handle **desc)
+{
++ struct xencomm_handle *desc1;
++ unsigned int argsize;
++
+ switch (cmd) {
+ case GNTTABOP_map_grant_ref:
++ argsize = sizeof(struct gnttab_map_grant_ref);
++ break;
+ case GNTTABOP_unmap_grant_ref:
++ argsize = sizeof(struct gnttab_unmap_grant_ref);
++ break;
++ case GNTTABOP_unmap_and_replace:
++ argsize = sizeof(struct gnttab_unmap_and_replace);
+ break;
+ case GNTTABOP_setup_table:
+ {
+ struct gnttab_setup_table *setup = op;
-+ struct xencomm_handle *frame_list;
+
-+ frame_list = xencomm_create_inline
-+ (xen_guest_handle(setup->frame_list));
++ argsize = sizeof(*setup);
+
-+ set_xen_guest_handle(setup->frame_list, (void *)frame_list);
++ if (count != 1)
++ return -EINVAL;
++ desc1 = __xencomm_map_no_alloc
++ (xen_guest_handle(setup->frame_list),
++ setup->nr_frames *
++ sizeof(*xen_guest_handle(setup->frame_list)),
++ *xc_area);
++ if (desc1 == NULL)
++ return -EINVAL;
++ (*xc_area)++;
++ set_xen_guest_handle(setup->frame_list, (void *)desc1);
+ break;
+ }
+ case GNTTABOP_dump_table:
++ argsize = sizeof(struct gnttab_dump_table);
++ break;
+ case GNTTABOP_transfer:
++ argsize = sizeof(struct gnttab_transfer);
++ break;
+ case GNTTABOP_copy:
++ argsize = sizeof(struct gnttab_copy);
++ break;
++ case GNTTABOP_query_size:
++ argsize = sizeof(struct gnttab_query_size);
+ break;
+ default:
-+ printk("%s: unknown grant table op %d\n", __func__, cmd);
++ printk("%s: unknown hypercall grant table op %d\n",
++ __func__, cmd);
+ BUG();
+ }
+
-+ return xencomm_create_inline(op);
++ *desc = __xencomm_map_no_alloc(op, count * argsize, *xc_area);
++ if (*desc == NULL)
++ return -EINVAL;
++ (*xc_area)++;
++
++ return 0;
+}
+
+int
-+xencomm_hypercall_grant_table_op(unsigned int cmd, void *op, unsigned int count)
++xencomm_hypercall_grant_table_op(unsigned int cmd, void *op,
++ unsigned int count)
+{
-+ void *desc = xencommize_grant_table_op (cmd, op, count);
++ int rc;
++ struct xencomm_handle *desc;
++ XENCOMM_MINI_ALIGNED(xc_area, 2);
++
++ rc = xencommize_grant_table_op(&xc_area, cmd, op, count, &desc);
++ if (rc)
++ return rc;
+
+ return xencomm_arch_hypercall_grant_table_op(cmd, desc, count);
+}
++EXPORT_SYMBOL_GPL(xencomm_hypercall_grant_table_op);
+
+int
+xencomm_hypercall_sched_op(int cmd, void *arg)
+{
++ struct xencomm_handle *desc;
++ unsigned int argsize;
++
+ switch (cmd) {
+ case SCHEDOP_yield:
+ case SCHEDOP_block:
++ argsize = 0;
++ break;
+ case SCHEDOP_shutdown:
++ argsize = sizeof(sched_shutdown_t);
++ break;
+ case SCHEDOP_remote_shutdown:
++ argsize = sizeof(sched_remote_shutdown_t);
+ break;
+ case SCHEDOP_poll:
+ {
+ sched_poll_t *poll = arg;
+ struct xencomm_handle *ports;
+
-+ ports = xencomm_create_inline(xen_guest_handle(poll->ports));
++ argsize = sizeof(sched_poll_t);
++ ports = xencomm_map_no_alloc(xen_guest_handle(poll->ports),
++ sizeof(*xen_guest_handle(poll->ports)));
+
+ set_xen_guest_handle(poll->ports, (void *)ports);
+ break;
@@ -26163,14 +29664,22 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_hcall.c tmp-linux-2.6-xen.pa
+ return -ENOSYS;
+ }
+
-+ return xencomm_arch_hypercall_sched_op(cmd, xencomm_create_inline(arg));
++ desc = xencomm_map_no_alloc(arg, argsize);
++ if (desc == NULL)
++ return -EINVAL;
++
++ return xencomm_arch_hypercall_sched_op(cmd, desc);
+}
++EXPORT_SYMBOL_GPL(xencomm_hypercall_sched_op);
+
+int
+xencomm_hypercall_multicall(void *call_list, int nr_calls)
+{
++ int rc;
+ int i;
+ multicall_entry_t *mce;
++ struct xencomm_handle *desc;
++ XENCOMM_MINI_ALIGNED(xc_area, nr_calls * 2);
+
+ for (i = 0; i < nr_calls; i++) {
+ mce = (multicall_entry_t *)call_list + i;
@@ -26181,9 +29690,13 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_hcall.c tmp-linux-2.6-xen.pa
+ /* No-op on ia64. */
+ break;
+ case __HYPERVISOR_grant_table_op:
-+ mce->args[1] = (unsigned long)xencommize_grant_table_op
-+ (mce->args[0], (void *)mce->args[1],
-+ mce->args[2]);
++ rc = xencommize_grant_table_op
++ (&xc_area,
++ mce->args[0], (void *)mce->args[1],
++ mce->args[2], &desc);
++ if (rc)
++ return rc;
++ mce->args[1] = (unsigned long)desc;
+ break;
+ case __HYPERVISOR_memory_op:
+ default:
@@ -26193,17 +29706,26 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_hcall.c tmp-linux-2.6-xen.pa
+ }
+ }
+
-+ return xencomm_arch_hypercall_multicall
-+ (xencomm_create_inline(call_list), nr_calls);
++ desc = xencomm_map_no_alloc(call_list,
++ nr_calls * sizeof(multicall_entry_t));
++ if (desc == NULL)
++ return -EINVAL;
++
++ return xencomm_arch_hypercall_multicall(desc, nr_calls);
+}
++EXPORT_SYMBOL_GPL(xencomm_hypercall_multicall);
+
+int
+xencomm_hypercall_callback_op(int cmd, void *arg)
+{
++ unsigned int argsize;
+ switch (cmd)
+ {
+ case CALLBACKOP_register:
++ argsize = sizeof(struct callback_register);
++ break;
+ case CALLBACKOP_unregister:
++ argsize = sizeof(struct callback_unregister);
+ break;
+ default:
+ printk("%s: unknown callback op %d\n", __func__, cmd);
@@ -26211,16 +29733,24 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_hcall.c tmp-linux-2.6-xen.pa
+ }
+
+ return xencomm_arch_hypercall_callback_op
-+ (cmd, xencomm_create_inline(arg));
++ (cmd, xencomm_map_no_alloc(arg, argsize));
+}
+
-+static void
-+xencommize_memory_reservation (xen_memory_reservation_t *mop)
++static int
++xencommize_memory_reservation(struct xencomm_mini *xc_area,
++ xen_memory_reservation_t *mop)
+{
+ struct xencomm_handle *desc;
+
-+ desc = xencomm_create_inline(xen_guest_handle(mop->extent_start));
++ desc = __xencomm_map_no_alloc(xen_guest_handle(mop->extent_start),
++ mop->nr_extents *
++ sizeof(*xen_guest_handle(mop->extent_start)),
++ xc_area);
++ if (desc == NULL)
++ return -EINVAL;
++
+ set_xen_guest_handle(mop->extent_start, (void *)desc);
++ return 0;
+}
+
+int
@@ -26228,426 +29758,110 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_hcall.c tmp-linux-2.6-xen.pa
+{
+ XEN_GUEST_HANDLE(xen_pfn_t) extent_start_va[2];
+ xen_memory_reservation_t *xmr = NULL, *xme_in = NULL, *xme_out = NULL;
++ xen_memory_map_t *memmap = NULL;
++ XEN_GUEST_HANDLE(void) buffer;
+ int rc;
++ struct xencomm_handle *desc;
++ unsigned int argsize;
++ XENCOMM_MINI_ALIGNED(xc_area, 2);
+
+ switch (cmd) {
+ case XENMEM_increase_reservation:
+ case XENMEM_decrease_reservation:
+ case XENMEM_populate_physmap:
+ xmr = (xen_memory_reservation_t *)arg;
-+ xen_guest_handle(extent_start_va[0]) =
-+ xen_guest_handle(xmr->extent_start);
-+ xencommize_memory_reservation((xen_memory_reservation_t *)arg);
-+ break;
-+
-+ case XENMEM_maximum_ram_page:
-+ break;
-+
-+ case XENMEM_exchange:
-+ xme_in = &((xen_memory_exchange_t *)arg)->in;
-+ xme_out = &((xen_memory_exchange_t *)arg)->out;
-+ xen_guest_handle(extent_start_va[0]) =
-+ xen_guest_handle(xme_in->extent_start);
-+ xen_guest_handle(extent_start_va[1]) =
-+ xen_guest_handle(xme_out->extent_start);
-+ xencommize_memory_reservation
-+ (&((xen_memory_exchange_t *)arg)->in);
-+ xencommize_memory_reservation
-+ (&((xen_memory_exchange_t *)arg)->out);
-+ break;
++ set_xen_guest_handle(extent_start_va[0],
++ xen_guest_handle(xmr->extent_start));
+
-+ default:
-+ printk("%s: unknown memory op %d\n", __func__, cmd);
-+ return -ENOSYS;
-+ }
-+
-+ rc = xencomm_arch_hypercall_memory_op(cmd, xencomm_create_inline(arg));
-+
-+ switch (cmd) {
-+ case XENMEM_increase_reservation:
-+ case XENMEM_decrease_reservation:
-+ case XENMEM_populate_physmap:
-+ xen_guest_handle(xmr->extent_start) =
-+ xen_guest_handle(extent_start_va[0]);
++ argsize = sizeof(*xmr);
++ rc = xencommize_memory_reservation(xc_area, xmr);
++ if (rc)
++ return rc;
++ xc_area++;
+ break;
+
-+ case XENMEM_exchange:
-+ xen_guest_handle(xme_in->extent_start) =
-+ xen_guest_handle(extent_start_va[0]);
-+ xen_guest_handle(xme_out->extent_start) =
-+ xen_guest_handle(extent_start_va[1]);
++ case XENMEM_maximum_gpfn:
++ argsize = 0;
+ break;
-+ }
-+
-+ return rc;
-+}
+
-+unsigned long
-+xencomm_hypercall_hvm_op(int cmd, void *arg)
-+{
-+ switch (cmd) {
-+ case HVMOP_set_param:
-+ case HVMOP_get_param:
++ case XENMEM_maximum_ram_page:
++ argsize = 0;
+ break;
-+ default:
-+ printk("%s: unknown hvm op %d\n", __func__, cmd);
-+ return -ENOSYS;
-+ }
-+
-+ return xencomm_arch_hypercall_hvm_op(cmd, xencomm_create_inline(arg));
-+}
-+
-+int
-+xencomm_hypercall_suspend(unsigned long srec)
-+{
-+ struct sched_shutdown arg;
+
-+ arg.reason = SHUTDOWN_suspend;
-+
-+ return xencomm_arch_hypercall_suspend(xencomm_create_inline(&arg));
-+}
-+
-+int
-+xencomm_hypercall_xenoprof_op(int op, void *arg)
-+{
-+ switch (op) {
-+ case XENOPROF_init:
-+ case XENOPROF_set_active:
-+ case XENOPROF_set_passive:
-+ case XENOPROF_counter:
-+ case XENOPROF_get_buffer:
-+ break;
++ case XENMEM_exchange:
++ xme_in = &((xen_memory_exchange_t *)arg)->in;
++ xme_out = &((xen_memory_exchange_t *)arg)->out;
++ set_xen_guest_handle(extent_start_va[0],
++ xen_guest_handle(xme_in->extent_start));
++ set_xen_guest_handle(extent_start_va[1],
++ xen_guest_handle(xme_out->extent_start));
+
-+ case XENOPROF_reset_active_list:
-+ case XENOPROF_reset_passive_list:
-+ case XENOPROF_reserve_counters:
-+ case XENOPROF_setup_events:
-+ case XENOPROF_enable_virq:
-+ case XENOPROF_start:
-+ case XENOPROF_stop:
-+ case XENOPROF_disable_virq:
-+ case XENOPROF_release_counters:
-+ case XENOPROF_shutdown:
-+ return xencomm_arch_hypercall_xenoprof_op(op, arg);
++ argsize = sizeof(xen_memory_exchange_t);
++ rc = xencommize_memory_reservation(xc_area, xme_in);
++ if (rc)
++ return rc;
++ xc_area++;
++ rc = xencommize_memory_reservation(xc_area, xme_out);
++ if (rc)
++ return rc;
++ xc_area++;
+ break;
+
-+ default:
-+ printk("%s: op %d isn't supported\n", __func__, op);
-+ return -ENOSYS;
-+ }
-+ return xencomm_arch_hypercall_xenoprof_op(op,
-+ xencomm_create_inline(arg));
-+}
-+
-+int
-+xencomm_hypercall_perfmon_op(unsigned long cmd, void* arg, unsigned long count)
-+{
-+ switch (cmd) {
-+ case PFM_GET_FEATURES:
-+ case PFM_CREATE_CONTEXT:
-+ case PFM_WRITE_PMCS:
-+ case PFM_WRITE_PMDS:
-+ case PFM_LOAD_CONTEXT:
++ case XENMEM_add_to_physmap:
++ argsize = sizeof(xen_add_to_physmap_t);
+ break;
+
-+ case PFM_DESTROY_CONTEXT:
-+ case PFM_UNLOAD_CONTEXT:
-+ case PFM_START:
-+ case PFM_STOP:
-+ return xencomm_arch_hypercall_perfmon_op(cmd, arg, count);
-+
-+ default:
-+ printk("%s:%d cmd %ld isn't supported\n",
-+ __func__,__LINE__, cmd);
-+ BUG();
-+ }
-+
-+ return xencomm_arch_hypercall_perfmon_op(cmd,
-+ xencomm_create_inline(arg),
-+ count);
-+}
-+
-+long
-+xencomm_hypercall_vcpu_op(int cmd, int cpu, void *arg)
-+{
-+ switch (cmd) {
-+ case VCPUOP_register_runstate_memory_area:
-+ xencommize_memory_reservation((xen_memory_reservation_t *)arg);
++ case XENMEM_machine_memory_map:
++ argsize = sizeof(*memmap);
++ memmap = (xen_memory_map_t *)arg;
++ set_xen_guest_handle(buffer, xen_guest_handle(memmap->buffer));
++ desc = xencomm_map_no_alloc(xen_guest_handle(memmap->buffer),
++ memmap->nr_entries);
++ if (desc == NULL)
++ return -EINVAL;
++ set_xen_guest_handle(memmap->buffer, (void *)desc);
+ break;
+
+ default:
-+ printk("%s: unknown vcpu op %d\n", __func__, cmd);
++ printk("%s: unknown memory op %d\n", __func__, cmd);
+ return -ENOSYS;
+ }
+
-+ return xencomm_arch_hypercall_vcpu_op(cmd, cpu,
-+ xencomm_create_inline(arg));
-+}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,456 @@
-+/*
-+ * 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-+ *
-+ * Tristan Gingold <tristan.gingold@bull.net>
-+ */
-+#include <linux/types.h>
-+#include <linux/errno.h>
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <xen/interface/xen.h>
-+#include <xen/interface/platform.h>
-+#include <xen/interface/memory.h>
-+#include <xen/interface/xencomm.h>
-+#include <xen/interface/version.h>
-+#include <xen/interface/event_channel.h>
-+#include <xen/interface/physdev.h>
-+#include <xen/interface/grant_table.h>
-+#include <xen/interface/hvm/params.h>
-+#include <xen/interface/xenoprof.h>
-+#ifdef CONFIG_VMX_GUEST
-+#include <asm/hypervisor.h>
-+#else
-+#include <asm/hypercall.h>
-+#endif
-+#include <asm/xen/xencomm.h>
-+#include <asm/perfmon.h>
-+
-+int
-+xencomm_mini_hypercall_event_channel_op(int cmd, void *op)
-+{
-+ struct xencomm_mini xc_area[2];
-+ int nbr_area = 2;
-+ struct xencomm_handle *desc;
-+ int rc;
-+
-+ rc = xencomm_create_mini(xc_area, &nbr_area,
-+ op, sizeof(evtchn_op_t), &desc);
-+ if (rc)
-+ return rc;
-+
-+ return xencomm_arch_hypercall_event_channel_op(cmd, desc);
-+}
-+EXPORT_SYMBOL(xencomm_mini_hypercall_event_channel_op);
-+
-+static int
-+xencommize_mini_grant_table_op(struct xencomm_mini *xc_area, int *nbr_area,
-+ unsigned int cmd, void *op, unsigned int count,
-+ struct xencomm_handle **desc)
-+{
-+ struct xencomm_handle *desc1;
-+ unsigned int argsize;
-+ int rc;
-+
-+ switch (cmd) {
-+ case GNTTABOP_map_grant_ref:
-+ argsize = sizeof(struct gnttab_map_grant_ref);
-+ break;
-+ case GNTTABOP_unmap_grant_ref:
-+ argsize = sizeof(struct gnttab_unmap_grant_ref);
-+ break;
-+ case GNTTABOP_setup_table:
-+ {
-+ struct gnttab_setup_table *setup = op;
-+
-+ argsize = sizeof(*setup);
-+
-+ if (count != 1)
-+ return -EINVAL;
-+ rc = xencomm_create_mini
-+ (xc_area, nbr_area,
-+ xen_guest_handle(setup->frame_list),
-+ setup->nr_frames
-+ * sizeof(*xen_guest_handle(setup->frame_list)),
-+ &desc1);
-+ if (rc)
-+ return rc;
-+ set_xen_guest_handle(setup->frame_list, (void *)desc1);
-+ break;
-+ }
-+ case GNTTABOP_dump_table:
-+ argsize = sizeof(struct gnttab_dump_table);
-+ break;
-+ case GNTTABOP_transfer:
-+ argsize = sizeof(struct gnttab_transfer);
-+ break;
-+ case GNTTABOP_copy:
-+ argsize = sizeof(struct gnttab_copy);
-+ break;
-+ case GNTTABOP_query_size:
-+ argsize = sizeof(struct gnttab_query_size);
-+ break;
-+ default:
-+ printk("%s: unknown mini grant table op %d\n", __func__, cmd);
-+ BUG();
-+ }
-+
-+ rc = xencomm_create_mini(xc_area, nbr_area, op, count * argsize, desc);
-+ if (rc)
-+ return rc;
-+
-+ return 0;
-+}
-+
-+int
-+xencomm_mini_hypercall_grant_table_op(unsigned int cmd, void *op,
-+ unsigned int count)
-+{
-+ int rc;
-+ struct xencomm_handle *desc;
-+ int nbr_area = 2;
-+ struct xencomm_mini xc_area[2];
-+
-+ rc = xencommize_mini_grant_table_op(xc_area, &nbr_area,
-+ cmd, op, count, &desc);
-+ if (rc)
-+ return rc;
-+
-+ return xencomm_arch_hypercall_grant_table_op(cmd, desc, count);
-+}
-+EXPORT_SYMBOL(xencomm_mini_hypercall_grant_table_op);
-+
-+int
-+xencomm_mini_hypercall_multicall(void *call_list, int nr_calls)
-+{
-+ int i;
-+ multicall_entry_t *mce;
-+ int nbr_area = 2 + nr_calls * 3;
-+ struct xencomm_mini xc_area[nbr_area];
-+ struct xencomm_handle *desc;
-+ int rc;
-+
-+ for (i = 0; i < nr_calls; i++) {
-+ mce = (multicall_entry_t *)call_list + i;
-+
-+ switch (mce->op) {
-+ case __HYPERVISOR_update_va_mapping:
-+ case __HYPERVISOR_mmu_update:
-+ /* No-op on ia64. */
-+ break;
-+ case __HYPERVISOR_grant_table_op:
-+ rc = xencommize_mini_grant_table_op
-+ (xc_area, &nbr_area,
-+ mce->args[0], (void *)mce->args[1],
-+ mce->args[2], &desc);
-+ if (rc)
-+ return rc;
-+ mce->args[1] = (unsigned long)desc;
-+ break;
-+ case __HYPERVISOR_memory_op:
-+ default:
-+ printk("%s: unhandled multicall op entry op %lu\n",
-+ __func__, mce->op);
-+ return -ENOSYS;
-+ }
-+ }
-+
-+ rc = xencomm_create_mini(xc_area, &nbr_area, call_list,
-+ nr_calls * sizeof(multicall_entry_t), &desc);
-+ if (rc)
-+ return rc;
-+
-+ return xencomm_arch_hypercall_multicall(desc, nr_calls);
-+}
-+EXPORT_SYMBOL(xencomm_mini_hypercall_multicall);
-+
-+static int
-+xencommize_mini_memory_reservation(struct xencomm_mini *area, int *nbr_area,
-+ xen_memory_reservation_t *mop)
-+{
-+ struct xencomm_handle *desc;
-+ int rc;
-+
-+ rc = xencomm_create_mini
-+ (area, nbr_area,
-+ xen_guest_handle(mop->extent_start),
-+ mop->nr_extents
-+ * sizeof(*xen_guest_handle(mop->extent_start)),
-+ &desc);
-+ if (rc)
-+ return rc;
-+
-+ set_xen_guest_handle(mop->extent_start, (void *)desc);
-+
-+ return 0;
-+}
++ desc = xencomm_map_no_alloc(arg, argsize);
++ if (desc == NULL)
++ return -EINVAL;
+
-+int
-+xencomm_mini_hypercall_memory_op(unsigned int cmd, void *arg)
-+{
-+ int nbr_area = 4;
-+ struct xencomm_mini xc_area[4];
-+ struct xencomm_handle *desc;
-+ int rc;
-+ unsigned int argsize;
++ rc = xencomm_arch_hypercall_memory_op(cmd, desc);
+
+ switch (cmd) {
+ case XENMEM_increase_reservation:
+ case XENMEM_decrease_reservation:
+ case XENMEM_populate_physmap:
-+ argsize = sizeof(xen_memory_reservation_t);
-+ rc = xencommize_mini_memory_reservation
-+ (xc_area, &nbr_area, (xen_memory_reservation_t *)arg);
-+ if (rc)
-+ return rc;
-+ break;
-+
-+ case XENMEM_maximum_ram_page:
-+ argsize = 0;
++ set_xen_guest_handle(xmr->extent_start,
++ xen_guest_handle(extent_start_va[0]));
+ break;
+
+ case XENMEM_exchange:
-+ argsize = sizeof(xen_memory_exchange_t);
-+ rc = xencommize_mini_memory_reservation
-+ (xc_area, &nbr_area,
-+ &((xen_memory_exchange_t *)arg)->in);
-+ if (rc)
-+ return rc;
-+ rc = xencommize_mini_memory_reservation
-+ (xc_area, &nbr_area,
-+ &((xen_memory_exchange_t *)arg)->out);
-+ if (rc)
-+ return rc;
++ set_xen_guest_handle(xme_in->extent_start,
++ xen_guest_handle(extent_start_va[0]));
++ set_xen_guest_handle(xme_out->extent_start,
++ xen_guest_handle(extent_start_va[1]));
+ break;
+
-+ case XENMEM_add_to_physmap:
-+ argsize = sizeof (xen_add_to_physmap_t);
++ case XENMEM_machine_memory_map:
++ set_xen_guest_handle(memmap->buffer, xen_guest_handle(buffer));
+ break;
-+
-+ default:
-+ printk("%s: unknown mini memory op %d\n", __func__, cmd);
-+ return -ENOSYS;
+ }
+
-+ rc = xencomm_create_mini(xc_area, &nbr_area, arg, argsize, &desc);
-+ if (rc)
-+ return rc;
-+
-+ return xencomm_arch_hypercall_memory_op(cmd, desc);
++ return rc;
+}
-+EXPORT_SYMBOL(xencomm_mini_hypercall_memory_op);
++EXPORT_SYMBOL_GPL(xencomm_hypercall_memory_op);
+
+unsigned long
-+xencomm_mini_hypercall_hvm_op(int cmd, void *arg)
++xencomm_hypercall_hvm_op(int cmd, void *arg)
+{
+ struct xencomm_handle *desc;
-+ int nbr_area = 2;
-+ struct xencomm_mini xc_area[2];
+ unsigned int argsize;
-+ int rc;
+
+ switch (cmd) {
+ case HVMOP_get_param:
@@ -26659,70 +29873,32 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_mini.c tmp-linux-2.6-xen.pat
+ return -EINVAL;
+ }
+
-+ rc = xencomm_create_mini(xc_area, &nbr_area, arg, argsize, &desc);
-+ if (rc)
-+ return rc;
++ desc = xencomm_map_no_alloc(arg, argsize);
++ if (desc == NULL)
++ return -EINVAL;
+
+ return xencomm_arch_hypercall_hvm_op(cmd, desc);
+}
-+EXPORT_SYMBOL(xencomm_mini_hypercall_hvm_op);
++EXPORT_SYMBOL_GPL(xencomm_hypercall_hvm_op);
+
++#ifndef CONFIG_VMX_GUEST
+int
-+xencomm_mini_hypercall_xen_version(int cmd, void *arg)
++xencomm_hypercall_suspend(unsigned long srec)
+{
-+ struct xencomm_handle *desc;
-+ int nbr_area = 2;
-+ struct xencomm_mini xc_area[2];
-+ unsigned int argsize;
-+ int rc;
-+
-+ switch (cmd) {
-+ case XENVER_version:
-+ /* do not actually pass an argument */
-+ return xencomm_arch_hypercall_xen_version(cmd, 0);
-+ case XENVER_extraversion:
-+ argsize = sizeof(xen_extraversion_t);
-+ break;
-+ case XENVER_compile_info:
-+ argsize = sizeof(xen_compile_info_t);
-+ break;
-+ case XENVER_capabilities:
-+ argsize = sizeof(xen_capabilities_info_t);
-+ break;
-+ case XENVER_changeset:
-+ argsize = sizeof(xen_changeset_info_t);
-+ break;
-+ case XENVER_platform_parameters:
-+ argsize = sizeof(xen_platform_parameters_t);
-+ break;
-+ case XENVER_pagesize:
-+ argsize = (arg == NULL) ? 0 : sizeof(void *);
-+ break;
-+ case XENVER_get_features:
-+ argsize = (arg == NULL) ? 0 : sizeof(xen_feature_info_t);
-+ break;
-+
-+ default:
-+ printk("%s: unknown version op %d\n", __func__, cmd);
-+ return -ENOSYS;
-+ }
++ struct sched_shutdown arg;
+
-+ rc = xencomm_create_mini(xc_area, &nbr_area, arg, argsize, &desc);
-+ if (rc)
-+ return rc;
++ arg.reason = SHUTDOWN_suspend;
+
-+ return xencomm_arch_hypercall_xen_version(cmd, desc);
++ return xencomm_arch_hypercall_suspend(
++ xencomm_map_no_alloc(&arg, sizeof(arg)));
+}
-+EXPORT_SYMBOL(xencomm_mini_hypercall_xen_version);
++#endif
+
+int
-+xencomm_mini_hypercall_xenoprof_op(int op, void *arg)
++xencomm_hypercall_xenoprof_op(int op, void *arg)
+{
+ unsigned int argsize;
-+ struct xencomm_mini xc_area[2];
-+ int nbr_area = 2;
+ struct xencomm_handle *desc;
-+ int rc;
+
+ switch (op) {
+ case XENOPROF_init:
@@ -26757,22 +29933,21 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_mini.c tmp-linux-2.6-xen.pat
+ printk("%s: op %d isn't supported\n", __func__, op);
+ return -ENOSYS;
+ }
-+ rc = xencomm_create_mini(xc_area, &nbr_area, arg, argsize, &desc);
-+ if (rc)
-+ return rc;
++
++ desc = xencomm_map_no_alloc(arg, argsize);
++ if (desc == NULL)
++ return -EINVAL;
++
+ return xencomm_arch_hypercall_xenoprof_op(op, desc);
+}
-+EXPORT_SYMBOL_GPL(xencomm_mini_hypercall_xenoprof_op);
++EXPORT_SYMBOL_GPL(xencomm_hypercall_xenoprof_op);
+
+int
-+xencomm_mini_hypercall_perfmon_op(unsigned long cmd, void* arg,
++xencomm_hypercall_perfmon_op(unsigned long cmd, void* arg,
+ unsigned long count)
+{
+ unsigned int argsize;
-+ struct xencomm_mini xc_area[2];
-+ int nbr_area = 2;
+ struct xencomm_handle *desc;
-+ int rc;
+
+ switch (cmd) {
+ case PFM_GET_FEATURES:
@@ -26801,52 +29976,92 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_mini.c tmp-linux-2.6-xen.pat
+ BUG();
+ }
+
-+ rc = xencomm_create_mini(xc_area, &nbr_area, arg, argsize, &desc);
-+ if (rc)
-+ return rc;
++ desc = xencomm_map_no_alloc(arg, argsize);
++ if (desc == NULL)
++ return -EINVAL;
++
+ return xencomm_arch_hypercall_perfmon_op(cmd, desc, count);
+}
-+EXPORT_SYMBOL_GPL(xencomm_mini_hypercall_perfmon_op);
++EXPORT_SYMBOL_GPL(xencomm_hypercall_perfmon_op);
++
++long
++xencomm_hypercall_vcpu_op(int cmd, int cpu, void *arg)
++{
++ unsigned int argsize;
++ switch (cmd) {
++ case VCPUOP_register_runstate_memory_area: {
++ vcpu_register_runstate_memory_area_t *area =
++ (vcpu_register_runstate_memory_area_t *)arg;
++ argsize = sizeof(*arg);
++ set_xen_guest_handle(area->addr.h,
++ (void *)xencomm_map_no_alloc(area->addr.v,
++ sizeof(area->addr.v)));
++ break;
++ }
++
++ default:
++ printk("%s: unknown vcpu op %d\n", __func__, cmd);
++ return -ENOSYS;
++ }
++
++ return xencomm_arch_hypercall_vcpu_op(cmd, cpu,
++ xencomm_map_no_alloc(arg, argsize));
++}
++
++long
++xencomm_hypercall_opt_feature(void *arg)
++{
++ return xencomm_arch_hypercall_opt_feature(
++ xencomm_map_no_alloc(arg,
++ sizeof(struct xen_ia64_opt_feature)));
++}
+
+int
-+xencomm_mini_hypercall_sched_op(int cmd, void *arg)
++xencomm_hypercall_fpswa_revision(unsigned int *revision)
+{
-+ int rc, nbr_area = 2;
-+ struct xencomm_mini xc_area[2];
+ struct xencomm_handle *desc;
++
++ desc = xencomm_map_no_alloc(revision, sizeof(*revision));
++ if (desc == NULL)
++ return -EINVAL;
++
++ return xencomm_arch_hypercall_fpswa_revision(desc);
++}
++EXPORT_SYMBOL_GPL(xencomm_hypercall_fpswa_revision);
++
++int
++xencomm_hypercall_kexec_op(int cmd, void *arg)
++{
+ unsigned int argsize;
++ struct xencomm_handle *desc;
+
+ switch (cmd) {
-+ case SCHEDOP_yield:
-+ case SCHEDOP_block:
-+ argsize = 0;
-+ break;
-+ case SCHEDOP_shutdown:
-+ argsize = sizeof(sched_shutdown_t);
++ case KEXEC_CMD_kexec_get_range:
++ argsize = sizeof(xen_kexec_range_t);
+ break;
-+ case SCHEDOP_poll:
-+ argsize = sizeof(sched_poll_t);
++ case KEXEC_CMD_kexec_load:
++ case KEXEC_CMD_kexec_unload:
++ argsize = sizeof(xen_kexec_load_t);
+ break;
-+ case SCHEDOP_remote_shutdown:
-+ argsize = sizeof(sched_remote_shutdown_t);
++ case KEXEC_CMD_kexec:
++ argsize = sizeof(xen_kexec_exec_t);
+ break;
-+
+ default:
-+ printk("%s: unknown sched op %d\n", __func__, cmd);
-+ return -ENOSYS;
++ printk("%s:%d cmd %d isn't supported\n",
++ __func__, __LINE__, cmd);
++ BUG();
+ }
+
-+ rc = xencomm_create_mini(xc_area, &nbr_area, arg, argsize, &desc);
-+ if (rc)
-+ return rc;
++ desc = xencomm_map_no_alloc(arg, argsize);
++ if (desc == NULL)
++ return -EINVAL;
+
-+ return xencomm_arch_hypercall_sched_op(cmd, desc);
++ return xencomm_arch_hypercall_kexec_op(cmd, desc);
+}
-+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,663 @@
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/xcom_privcmd.c linux-2.6.18-xen-3.2.0/arch/ia64/xen/xcom_privcmd.c
+--- linux-2.6.18.8/arch/ia64/xen/xcom_privcmd.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/xcom_privcmd.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,823 @@
+/*
+ * 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
@@ -26878,8 +30093,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+#include <xen/interface/memory.h>
+#include <xen/interface/version.h>
+#include <xen/interface/event_channel.h>
-+#include <xen/interface/acm_ops.h>
++#include <xen/interface/xsm/acm_ops.h>
+#include <xen/interface/hvm/params.h>
++#include <xen/interface/arch-ia64/debug_op.h>
+#include <xen/public/privcmd.h>
+#include <asm/hypercall.h>
+#include <asm/page.h>
@@ -26903,7 +30119,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ if (kern_op.interface_version != XENPF_INTERFACE_VERSION)
+ return -EACCES;
+
-+ op_desc = xencomm_create_inline(&kern_op);
++ op_desc = xencomm_map_no_alloc(&kern_op, sizeof(kern_op));
+
+ switch (kern_op.cmd) {
+ default:
@@ -26922,17 +30138,10 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ if (copy_to_user(user_op, &kern_op, sizeof(struct xen_platform_op)))
+ ret = -EFAULT;
+
-+ if (desc)
-+ xencomm_free(desc);
++ xencomm_free(desc);
+ return ret;
+}
+
-+/*
-+ * Temporarily disable the NUMA PHYSINFO code until the rest of the
-+ * changes are upstream.
-+ */
-+#undef IA64_NUMA_PHYSINFO
-+
+static int
+xencomm_privcmd_sysctl(privcmd_hypercall_t *hypercall)
+{
@@ -26951,21 +30160,20 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ if (kern_op.interface_version != XEN_SYSCTL_INTERFACE_VERSION)
+ return -EACCES;
+
-+ op_desc = xencomm_create_inline(&kern_op);
++ op_desc = xencomm_map_no_alloc(&kern_op, sizeof(kern_op));
+
+ switch (kern_op.cmd) {
+ case XEN_SYSCTL_readconsole:
-+ ret = xencomm_create(
++ desc = xencomm_map(
+ xen_guest_handle(kern_op.u.readconsole.buffer),
-+ kern_op.u.readconsole.count,
-+ &desc, GFP_KERNEL);
++ kern_op.u.readconsole.count);
++ if (xen_guest_handle(kern_op.u.readconsole.buffer) != NULL &&
++ kern_op.u.readconsole.count > 0 && desc == NULL)
++ return -ENOMEM;
+ set_xen_guest_handle(kern_op.u.readconsole.buffer,
+ (void *)desc);
+ break;
+ case XEN_SYSCTL_tbuf_op:
-+#ifndef IA64_NUMA_PHYSINFO
-+ case XEN_SYSCTL_physinfo:
-+#endif
+ case XEN_SYSCTL_sched_id:
+ break;
+ case XEN_SYSCTL_perfc_op:
@@ -26976,8 +30184,8 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ .interface_version = XEN_SYSCTL_INTERFACE_VERSION,
+ .u.perfc_op = {
+ .cmd = XEN_SYSCTL_PERFCOP_query,
-+ // .desc.p = NULL,
-+ // .val.p = NULL,
++ /* .desc.p = NULL, */
++ /* .val.p = NULL, */
+ },
+ };
+
@@ -26988,60 +30196,66 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ }
+
+ /* query the buffer size for xencomm */
-+ tmp_desc = xencomm_create_inline(&tmp_op);
++ tmp_desc = xencomm_map_no_alloc(&tmp_op, sizeof(tmp_op));
+ ret = xencomm_arch_hypercall_sysctl(tmp_desc);
+ if (ret)
+ return ret;
+
-+ ret = xencomm_create(xen_guest_handle(kern_op.u.perfc_op.desc),
-+ tmp_op.u.perfc_op.nr_counters *
-+ sizeof(xen_sysctl_perfc_desc_t),
-+ &desc, GFP_KERNEL);
-+ if (ret)
-+ return ret;
++ desc = xencomm_map(xen_guest_handle(kern_op.u.perfc_op.desc),
++ tmp_op.u.perfc_op.nr_counters *
++ sizeof(xen_sysctl_perfc_desc_t));
++ if (xen_guest_handle(kern_op.u.perfc_op.desc) != NULL &&
++ tmp_op.u.perfc_op.nr_counters > 0 && desc == NULL)
++ return -ENOMEM;
+
+ set_xen_guest_handle(kern_op.u.perfc_op.desc, (void *)desc);
+
-+ ret = xencomm_create(xen_guest_handle(kern_op.u.perfc_op.val),
-+ tmp_op.u.perfc_op.nr_vals *
-+ sizeof(xen_sysctl_perfc_val_t),
-+ &desc1, GFP_KERNEL);
-+ if (ret)
++ desc1 = xencomm_map(xen_guest_handle(kern_op.u.perfc_op.val),
++ tmp_op.u.perfc_op.nr_vals *
++ sizeof(xen_sysctl_perfc_val_t));
++ if (xen_guest_handle(kern_op.u.perfc_op.val) != NULL &&
++ tmp_op.u.perfc_op.nr_vals > 0 && desc1 == NULL) {
+ xencomm_free(desc);
++ return -ENOMEM;
++ }
+
+ set_xen_guest_handle(kern_op.u.perfc_op.val, (void *)desc1);
+ break;
+ }
+ case XEN_SYSCTL_getdomaininfolist:
-+ ret = xencomm_create(
++ desc = xencomm_map(
+ xen_guest_handle(kern_op.u.getdomaininfolist.buffer),
+ kern_op.u.getdomaininfolist.max_domains *
-+ sizeof(xen_domctl_getdomaininfo_t),
-+ &desc, GFP_KERNEL);
++ sizeof(xen_domctl_getdomaininfo_t));
++ if (xen_guest_handle(kern_op.u.getdomaininfolist.buffer) !=
++ NULL && kern_op.u.getdomaininfolist.max_domains > 0 &&
++ desc == NULL)
++ return -ENOMEM;
+ set_xen_guest_handle(kern_op.u.getdomaininfolist.buffer,
+ (void *)desc);
+ break;
-+#ifdef IA64_NUMA_PHYSINFO
-+ case XEN_SYSCTL_physinfo:
-+ ret = xencomm_create(
-+ xen_guest_handle(kern_op.u.physinfo.memory_chunks),
-+ PUBLIC_MAXCHUNKS * sizeof(node_data_t),
-+ &desc, GFP_KERNEL);
-+ if (ret)
-+ return ret;
-+ set_xen_guest_handle(kern_op.u.physinfo.memory_chunks,
-+ (void *)desc);
++ case XEN_SYSCTL_debug_keys:
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.debug_keys.keys),
++ kern_op.u.debug_keys.nr_keys);
++ if (xen_guest_handle(kern_op.u.debug_keys.keys) != NULL &&
++ kern_op.u.debug_keys.nr_keys > 0 && desc == NULL)
++ return -ENOMEM;
++ set_xen_guest_handle(kern_op.u.debug_keys.keys,
++ (void *)desc);
++ break;
+
-+ ret = xencomm_create(
++ case XEN_SYSCTL_physinfo:
++ desc = xencomm_map(
+ xen_guest_handle(kern_op.u.physinfo.cpu_to_node),
-+ PUBLIC_MAX_NUMNODES * sizeof(u64),
-+ &desc1, GFP_KERNEL);
-+ if (ret)
-+ xencomm_free(desc);
++ kern_op.u.physinfo.max_cpu_id * sizeof(uint32_t));
++ if (xen_guest_handle(kern_op.u.physinfo.cpu_to_node) != NULL &&
++ kern_op.u.physinfo.max_cpu_id > 0 && desc == NULL)
++ return -ENOMEM;
++
+ set_xen_guest_handle(kern_op.u.physinfo.cpu_to_node,
-+ (void *)desc1);
++ (void *)desc);
+ break;
-+#endif
+ default:
+ printk("%s: unknown sysctl cmd %d\n", __func__, kern_op.cmd);
+ return -ENOSYS;
@@ -27058,10 +30272,8 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ if (copy_to_user(user_op, &kern_op, sizeof(xen_sysctl_t)))
+ ret = -EFAULT;
+
-+ if (desc)
-+ xencomm_free(desc);
-+ if (desc1)
-+ xencomm_free(desc1);
++ xencomm_free(desc);
++ xencomm_free(desc1);
+ return ret;
+}
+
@@ -27082,23 +30294,26 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ if (kern_op.interface_version != XEN_DOMCTL_INTERFACE_VERSION)
+ return -EACCES;
+
-+ op_desc = xencomm_create_inline(&kern_op);
++ op_desc = xencomm_map_no_alloc(&kern_op, sizeof(kern_op));
+
+ switch (kern_op.cmd) {
+ case XEN_DOMCTL_createdomain:
+ case XEN_DOMCTL_destroydomain:
+ case XEN_DOMCTL_pausedomain:
+ case XEN_DOMCTL_unpausedomain:
++ case XEN_DOMCTL_resumedomain:
+ case XEN_DOMCTL_getdomaininfo:
+ break;
+ case XEN_DOMCTL_getmemlist:
+ {
+ unsigned long nr_pages = kern_op.u.getmemlist.max_pfns;
+
-+ ret = xencomm_create(
++ desc = xencomm_map(
+ xen_guest_handle(kern_op.u.getmemlist.buffer),
-+ nr_pages * sizeof(unsigned long),
-+ &desc, GFP_KERNEL);
++ nr_pages * sizeof(unsigned long));
++ if (xen_guest_handle(kern_op.u.getmemlist.buffer) != NULL &&
++ nr_pages > 0 && desc == NULL)
++ return -ENOMEM;
+ set_xen_guest_handle(kern_op.u.getmemlist.buffer,
+ (void *)desc);
+ break;
@@ -27106,18 +30321,23 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ case XEN_DOMCTL_getpageframeinfo:
+ break;
+ case XEN_DOMCTL_getpageframeinfo2:
-+ ret = xencomm_create(
++ desc = xencomm_map(
+ xen_guest_handle(kern_op.u.getpageframeinfo2.array),
-+ kern_op.u.getpageframeinfo2.num,
-+ &desc, GFP_KERNEL);
++ kern_op.u.getpageframeinfo2.num);
++ if (xen_guest_handle(kern_op.u.getpageframeinfo2.array) !=
++ NULL && kern_op.u.getpageframeinfo2.num > 0 &&
++ desc == NULL)
++ return -ENOMEM;
+ set_xen_guest_handle(kern_op.u.getpageframeinfo2.array,
+ (void *)desc);
+ break;
+ case XEN_DOMCTL_shadow_op:
-+ ret = xencomm_create(
++ desc = xencomm_map(
+ xen_guest_handle(kern_op.u.shadow_op.dirty_bitmap),
-+ ROUND_DIV(kern_op.u.shadow_op.pages, 8),
-+ &desc, GFP_KERNEL);
++ ROUND_DIV(kern_op.u.shadow_op.pages, 8));
++ if (xen_guest_handle(kern_op.u.shadow_op.dirty_bitmap) != NULL
++ && kern_op.u.shadow_op.pages > 0 && desc == NULL)
++ return -ENOMEM;
+ set_xen_guest_handle(kern_op.u.shadow_op.dirty_bitmap,
+ (void *)desc);
+ break;
@@ -27125,23 +30345,39 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ break;
+ case XEN_DOMCTL_setvcpucontext:
+ case XEN_DOMCTL_getvcpucontext:
-+ ret = xencomm_create(
++ desc = xencomm_map(
+ xen_guest_handle(kern_op.u.vcpucontext.ctxt),
-+ sizeof(vcpu_guest_context_t),
-+ &desc, GFP_KERNEL);
++ sizeof(vcpu_guest_context_t));
++ if (xen_guest_handle(kern_op.u.vcpucontext.ctxt) != NULL &&
++ desc == NULL)
++ return -ENOMEM;
+ set_xen_guest_handle(kern_op.u.vcpucontext.ctxt, (void *)desc);
+ break;
+ case XEN_DOMCTL_getvcpuinfo:
+ break;
+ case XEN_DOMCTL_setvcpuaffinity:
+ case XEN_DOMCTL_getvcpuaffinity:
-+ ret = xencomm_create(
++ desc = xencomm_map(
+ xen_guest_handle(kern_op.u.vcpuaffinity.cpumap.bitmap),
-+ ROUND_DIV(kern_op.u.vcpuaffinity.cpumap.nr_cpus, 8),
-+ &desc, GFP_KERNEL);
++ ROUND_DIV(kern_op.u.vcpuaffinity.cpumap.nr_cpus, 8));
++ if (xen_guest_handle(kern_op.u.vcpuaffinity.cpumap.bitmap) !=
++ NULL && kern_op.u.vcpuaffinity.cpumap.nr_cpus > 0 &&
++ desc == NULL)
++ return -ENOMEM;
+ set_xen_guest_handle(kern_op.u.vcpuaffinity.cpumap.bitmap,
+ (void *)desc);
+ break;
++ case XEN_DOMCTL_gethvmcontext:
++ case XEN_DOMCTL_sethvmcontext:
++ if (kern_op.u.hvmcontext.size > 0)
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.hvmcontext.buffer),
++ kern_op.u.hvmcontext.size);
++ if (xen_guest_handle(kern_op.u.hvmcontext.buffer) != NULL &&
++ kern_op.u.hvmcontext.size > 0 && desc == NULL)
++ return -ENOMEM;
++ set_xen_guest_handle(kern_op.u.hvmcontext.buffer, (void*)desc);
++ break;
+ case XEN_DOMCTL_max_vcpus:
+ case XEN_DOMCTL_scheduler_op:
+ case XEN_DOMCTL_setdomainhandle:
@@ -27153,7 +30389,10 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ case XEN_DOMCTL_arch_setup:
+ case XEN_DOMCTL_settimeoffset:
+ case XEN_DOMCTL_sendtrigger:
++ case XEN_DOMCTL_set_opt_feature:
+ break;
++ case XEN_DOMCTL_pin_mem_cacheattr:
++ return -ENOSYS;
+ default:
+ printk("%s: unknown domctl cmd %d\n", __func__, kern_op.cmd);
+ return -ENOSYS;
@@ -27170,13 +30409,12 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ if (copy_to_user(user_op, &kern_op, sizeof(xen_domctl_t)))
+ ret = -EFAULT;
+
-+ if (desc)
-+ xencomm_free(desc);
++ xencomm_free(desc);
+ return ret;
+}
+
+static int
-+xencomm_privcmd_acm_op(privcmd_hypercall_t *hypercall)
++xencomm_privcmd_xsm_op(privcmd_hypercall_t *hypercall)
+{
+ void __user *arg = (void __user *)hypercall->arg[0];
+ xen_acmctl_t kern_arg;
@@ -27191,17 +30429,18 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+
+ switch (kern_arg.cmd) {
+ case ACMOP_getssid: {
-+ op_desc = xencomm_create_inline(&kern_arg);
++ op_desc = xencomm_map_no_alloc(&kern_arg, sizeof(kern_arg));
+
-+ ret = xencomm_create(
++ desc = xencomm_map(
+ xen_guest_handle(kern_arg.u.getssid.ssidbuf),
-+ kern_arg.u.getssid.ssidbuf_size, &desc, GFP_KERNEL);
-+ if (ret)
-+ return ret;
++ kern_arg.u.getssid.ssidbuf_size);
++ if (xen_guest_handle(kern_arg.u.getssid.ssidbuf) != NULL &&
++ kern_arg.u.getssid.ssidbuf_size > 0 && desc == NULL)
++ return -ENOMEM;
+
+ set_xen_guest_handle(kern_arg.u.getssid.ssidbuf, (void *)desc);
+
-+ ret = xencomm_arch_hypercall_acm_op(op_desc);
++ ret = xencomm_arch_hypercall_xsm_op(op_desc);
+
+ xencomm_free(desc);
+
@@ -27218,6 +30457,102 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+}
+
+static int
++xencomm_privcmd_memory_reservation_op(privcmd_hypercall_t *hypercall)
++{
++ const unsigned long cmd = hypercall->arg[0];
++ int ret = 0;
++ xen_memory_reservation_t kern_op;
++ xen_memory_reservation_t __user *user_op;
++ struct xencomm_handle *desc = NULL;
++ struct xencomm_handle *desc_op;
++
++ user_op = (xen_memory_reservation_t __user *)hypercall->arg[1];
++ if (copy_from_user(&kern_op, user_op,
++ sizeof(xen_memory_reservation_t)))
++ return -EFAULT;
++ desc_op = xencomm_map_no_alloc(&kern_op, sizeof(kern_op));
++
++ if (!xen_guest_handle(kern_op.extent_start)) {
++ ret = xencomm_arch_hypercall_memory_op(cmd, desc_op);
++ if (ret < 0)
++ return ret;
++ } else {
++ xen_ulong_t nr_done = 0;
++ xen_ulong_t nr_extents = kern_op.nr_extents;
++ void *addr = xen_guest_handle(kern_op.extent_start);
++
++ /*
++ * Work around.
++ * Xencomm has single page size limit caused
++ * by xencomm_alloc()/xencomm_free() so that
++ * we have to repeat the hypercall.
++ * This limitation can be removed.
++ */
++#define MEMORYOP_XENCOMM_LIMIT \
++ (((((PAGE_SIZE - sizeof(struct xencomm_desc)) / \
++ sizeof(uint64_t)) - 2) * PAGE_SIZE) / \
++ sizeof(*xen_guest_handle(kern_op.extent_start)))
++
++ /*
++ * Work around.
++ * Even if the above limitation is removed,
++ * the hypercall with large number of extents
++ * may cause the soft lockup warning.
++ * In order to avoid the warning, we limit
++ * the number of extents and repeat the hypercall.
++ * The following value is determined by experimentation.
++ * If the following limit causes soft lockup warning,
++ * we should decrease this value.
++ *
++ * Another way would be that start with small value and
++ * increase adoptively measuring hypercall time.
++ * It might be over-kill.
++ */
++#define MEMORYOP_MAX_EXTENTS (MEMORYOP_XENCOMM_LIMIT / 4)
++
++ while (nr_extents > 0) {
++ xen_ulong_t nr_tmp = nr_extents;
++ if (nr_tmp > MEMORYOP_MAX_EXTENTS)
++ nr_tmp = MEMORYOP_MAX_EXTENTS;
++
++ kern_op.nr_extents = nr_tmp;
++ desc = xencomm_map
++ (addr + nr_done * sizeof(*xen_guest_handle(kern_op.extent_start)),
++ nr_tmp * sizeof(*xen_guest_handle(kern_op.extent_start)));
++ if (addr != NULL && nr_tmp > 0 && desc == NULL)
++ return nr_done > 0 ? nr_done : -ENOMEM;
++
++ set_xen_guest_handle(kern_op.extent_start,
++ (void *)desc);
++
++ ret = xencomm_arch_hypercall_memory_op(cmd, desc_op);
++ xencomm_free(desc);
++ if (ret < 0)
++ return nr_done > 0 ? nr_done : ret;
++
++ nr_done += ret;
++ nr_extents -= ret;
++ if (ret < nr_tmp)
++ break;
++
++ /*
++ * prevent softlock up message.
++ * give cpu to soft lockup kernel thread.
++ */
++ if (nr_extents > 0)
++ schedule();
++ }
++ ret = nr_done;
++ set_xen_guest_handle(kern_op.extent_start, addr);
++ }
++
++ if (copy_to_user(user_op, &kern_op, sizeof(xen_memory_reservation_t)))
++ return -EFAULT;
++
++ return ret;
++}
++
++static int
+xencomm_privcmd_memory_op(privcmd_hypercall_t *hypercall)
+{
+ const unsigned long cmd = hypercall->arg[0];
@@ -27227,45 +30562,19 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ case XENMEM_increase_reservation:
+ case XENMEM_decrease_reservation:
+ case XENMEM_populate_physmap:
++ return xencomm_privcmd_memory_reservation_op(hypercall);
++ case XENMEM_maximum_gpfn:
+ {
-+ xen_memory_reservation_t kern_op;
-+ xen_memory_reservation_t __user *user_op;
-+ struct xencomm_handle *desc = NULL;
-+ struct xencomm_handle *desc_op;
++ domid_t kern_domid;
++ domid_t __user *user_domid;
++ struct xencomm_handle *desc;
+
-+ user_op = (xen_memory_reservation_t __user *)hypercall->arg[1];
-+ if (copy_from_user(&kern_op, user_op,
-+ sizeof(xen_memory_reservation_t)))
++ user_domid = (domid_t __user *)hypercall->arg[1];
++ if (copy_from_user(&kern_domid, user_domid, sizeof(domid_t)))
+ return -EFAULT;
-+ desc_op = xencomm_create_inline(&kern_op);
-+
-+ if (xen_guest_handle(kern_op.extent_start)) {
-+ void * addr;
-+
-+ addr = xen_guest_handle(kern_op.extent_start);
-+ ret = xencomm_create
-+ (addr,
-+ kern_op.nr_extents *
-+ sizeof(*xen_guest_handle
-+ (kern_op.extent_start)),
-+ &desc, GFP_KERNEL);
-+ if (ret)
-+ return ret;
-+ set_xen_guest_handle(kern_op.extent_start,
-+ (void *)desc);
-+ }
-+
-+ ret = xencomm_arch_hypercall_memory_op(cmd, desc_op);
++ desc = xencomm_map_no_alloc(&kern_domid, sizeof(kern_domid));
+
-+ if (desc)
-+ xencomm_free(desc);
-+
-+ if (ret != 0)
-+ return ret;
-+
-+ if (copy_to_user(user_op, &kern_op,
-+ sizeof(xen_memory_reservation_t)))
-+ return -EFAULT;
++ ret = xencomm_arch_hypercall_memory_op(cmd, desc);
+
+ return ret;
+ }
@@ -27283,41 +30592,41 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ if (copy_from_user(&kern_op, user_op,
+ sizeof(xen_translate_gpfn_list_t)))
+ return -EFAULT;
-+ desc_op = xencomm_create_inline(&kern_op);
++ desc_op = xencomm_map_no_alloc(&kern_op, sizeof(kern_op));
+
+ if (kern_op.nr_gpfns) {
+ /* gpfn_list. */
+ addr = xen_guest_handle(kern_op.gpfn_list);
+
-+ ret = xencomm_create(addr, kern_op.nr_gpfns *
++ desc_gpfn = xencomm_map(addr, kern_op.nr_gpfns *
+ sizeof(*xen_guest_handle
-+ (kern_op.gpfn_list)),
-+ &desc_gpfn, GFP_KERNEL);
-+ if (ret)
-+ return ret;
++ (kern_op.gpfn_list)));
++ if (addr != NULL && kern_op.nr_gpfns > 0 &&
++ desc_gpfn == NULL)
++ return -ENOMEM;
+ set_xen_guest_handle(kern_op.gpfn_list,
+ (void *)desc_gpfn);
+
+ /* mfn_list. */
+ addr = xen_guest_handle(kern_op.mfn_list);
+
-+ ret = xencomm_create(addr, kern_op.nr_gpfns *
++ desc_mfn = xencomm_map(addr, kern_op.nr_gpfns *
+ sizeof(*xen_guest_handle
-+ (kern_op.mfn_list)),
-+ &desc_mfn, GFP_KERNEL);
-+ if (ret)
-+ return ret;
++ (kern_op.mfn_list)));
++ if (addr != NULL && kern_op.nr_gpfns > 0 &&
++ desc_mfn == NULL) {
++ xencomm_free(desc_gpfn);
++ return -ENOMEM;
++ }
++
+ set_xen_guest_handle(kern_op.mfn_list,
+ (void *)desc_mfn);
+ }
+
+ ret = xencomm_arch_hypercall_memory_op(cmd, desc_op);
+
-+ if (desc_gpfn)
-+ xencomm_free(desc_gpfn);
-+
-+ if (desc_mfn)
-+ xencomm_free(desc_mfn);
++ xencomm_free(desc_gpfn);
++ xencomm_free(desc_mfn);
+
+ if (ret != 0)
+ return ret;
@@ -27371,9 +30680,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ return -ENOSYS;
+ }
+
-+ rc = xencomm_create(arg, argsize, &desc, GFP_KERNEL);
-+ if (rc)
-+ return rc;
++ desc = xencomm_map(arg, argsize);
++ if (arg != NULL && argsize > 0 && desc == NULL)
++ return -ENOMEM;
+
+ rc = xencomm_arch_hypercall_xen_version(cmd, desc);
+
@@ -27404,10 +30713,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ return -EINVAL;
+ }
+
-+ ret = xencomm_create((void *)hypercall->arg[1], argsize,
-+ &desc, GFP_KERNEL);
-+ if (ret)
-+ return ret;
++ desc = xencomm_map((void *)hypercall->arg[1], argsize);
++ if ((void *)hypercall->arg[1] != NULL && argsize > 0 && desc == NULL)
++ return -ENOMEM;
+
+ ret = xencomm_arch_hypercall_event_channel_op(cmd, desc);
+
@@ -27443,10 +30751,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ return -EINVAL;
+ }
+
-+ ret = xencomm_create((void *)hypercall->arg[1], argsize,
-+ &desc, GFP_KERNEL);
-+ if (ret)
-+ return ret;
++ desc = xencomm_map((void *)hypercall->arg[1], argsize);
++ if ((void *)hypercall->arg[1] != NULL && argsize > 0 && desc == NULL)
++ return -ENOMEM;
+
+ ret = xencomm_arch_hypercall_hvm_op(cmd, desc);
+
@@ -27471,10 +30778,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ return -EINVAL;
+ }
+
-+ ret = xencomm_create((void *)hypercall->arg[1], argsize,
-+ &desc, GFP_KERNEL);
-+ if (ret)
-+ return ret;
++ desc = xencomm_map((void *)hypercall->arg[1], argsize);
++ if ((void *)hypercall->arg[1] != NULL && argsize > 0 && desc == NULL)
++ return -ENOMEM;
+
+ ret = xencomm_arch_hypercall_sched_op(cmd, desc);
+
@@ -27482,6 +30788,71 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ return ret;
+}
+
++static int
++xencomm_privcmd_ia64_dom0vp_op(privcmd_hypercall_t *hypercall)
++{
++ int cmd = hypercall->arg[0];
++ int ret;
++
++ switch (cmd) {
++ case IA64_DOM0VP_fpswa_revision: {
++ unsigned int revision;
++ unsigned int __user *revision_user =
++ (unsigned int* __user)hypercall->arg[1];
++ struct xencomm_handle *desc;
++ desc = xencomm_map(&revision, sizeof(revision));
++ if (desc == NULL)
++ return -ENOMEM;
++
++ ret = xencomm_arch_hypercall_fpswa_revision(desc);
++ xencomm_free(desc);
++ if (ret)
++ break;
++ if (copy_to_user(revision_user, &revision, sizeof(revision)))
++ ret = -EFAULT;
++ break;
++ }
++#ifdef CONFIG_XEN_IA64_EXPOSE_P2M
++ case IA64_DOM0VP_expose_foreign_p2m:
++ ret = xen_foreign_p2m_expose(hypercall);
++ break;
++#endif
++ default:
++ printk("%s: unknown IA64 DOM0VP op %d\n", __func__, cmd);
++ ret = -EINVAL;
++ break;
++ }
++ return ret;
++}
++
++static int
++xencomm_privcmd_ia64_debug_op(privcmd_hypercall_t *hypercall)
++{
++ int cmd = hypercall->arg[0];
++ unsigned long domain = hypercall->arg[1];
++ struct xencomm_handle *desc;
++ int ret;
++
++ switch (cmd) {
++ case XEN_IA64_DEBUG_OP_SET_FLAGS:
++ case XEN_IA64_DEBUG_OP_GET_FLAGS:
++ break;
++ default:
++ printk("%s: unknown IA64 DEBUGOP %d\n", __func__, cmd);
++ return -EINVAL;
++ }
++
++ desc = xencomm_map((void *)hypercall->arg[2],
++ sizeof(xen_ia64_debug_op_t));
++ if (desc == NULL)
++ return -ENOMEM;
++
++ ret = xencomm_arch_hypercall_ia64_debug_op(cmd, domain, desc);
++
++ xencomm_free(desc);
++ return ret;
++}
++
+int
+privcmd_hypercall(privcmd_hypercall_t *hypercall)
+{
@@ -27492,8 +30863,8 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ return xencomm_privcmd_domctl(hypercall);
+ case __HYPERVISOR_sysctl:
+ return xencomm_privcmd_sysctl(hypercall);
-+ case __HYPERVISOR_acm_op:
-+ return xencomm_privcmd_acm_op(hypercall);
++ case __HYPERVISOR_xsm_op:
++ return xencomm_privcmd_xsm_op(hypercall);
+ case __HYPERVISOR_xen_version:
+ return xencomm_privcmd_xen_version(hypercall);
+ case __HYPERVISOR_memory_op:
@@ -27504,16 +30875,179 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xcom_privcmd.c tmp-linux-2.6-xen.
+ return xencomm_privcmd_hvm_op(hypercall);
+ case __HYPERVISOR_sched_op:
+ return xencomm_privcmd_sched_op(hypercall);
++ case __HYPERVISOR_ia64_dom0vp_op:
++ return xencomm_privcmd_ia64_dom0vp_op(hypercall);
++ case __HYPERVISOR_ia64_debug_op:
++ return xencomm_privcmd_ia64_debug_op(hypercall);
+ default:
+ printk("%s: unknown hcall (%ld)\n", __func__, hypercall->op);
+ return -ENOSYS;
+ }
+}
+
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,263 @@
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/xen_dma.c linux-2.6.18-xen-3.2.0/arch/ia64/xen/xen_dma.c
+--- linux-2.6.18.8/arch/ia64/xen/xen_dma.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/xen_dma.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,155 @@
++/*
++ * Copyright (C) 2007 Hewlett-Packard Development Company, L.P.
++ * Alex Williamson <alex.williamson@hp.com>
++ *
++ * Basic DMA mapping services for Xen guests.
++ * Based on arch/i386/kernel/pci-dma-xen.c.
++ *
++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++ * 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/bitops.h>
++#include <linux/dma-mapping.h>
++#include <linux/mm.h>
++#include <asm/scatterlist.h>
++#include <xen/gnttab.h>
++#include <asm/gnttab_dma.h>
++
++#define IOMMU_BUG_ON(test) \
++do { \
++ if (unlikely(test)) { \
++ printk(KERN_ALERT "Fatal DMA error!\n"); \
++ BUG(); \
++ } \
++} while (0)
++
++
++/*
++ * This should be broken out of swiotlb and put in a common place
++ * when merged with upstream Linux.
++ */
++static inline int
++address_needs_mapping(struct device *dev, dma_addr_t addr)
++{
++ dma_addr_t mask = 0xffffffff;
++
++ /* If the device has a mask, use it, otherwise default to 32 bits */
++ if (dev && dev->dma_mask)
++ mask = *dev->dma_mask;
++ return (addr & ~mask) != 0;
++}
++
++int
++xen_map_sg(struct device *dev, struct scatterlist *sg, int nents,
++ int direction)
++{
++ int i;
++
++ for (i = 0 ; i < nents ; i++) {
++ sg[i].dma_address = gnttab_dma_map_page(sg[i].page) + sg[i].offset;
++ sg[i].dma_length = sg[i].length;
++
++ IOMMU_BUG_ON(address_needs_mapping(dev, sg[i].dma_address));
++ IOMMU_BUG_ON(range_straddles_page_boundary(
++ page_to_pseudophys(sg[i].page) + sg[i].offset,
++ sg[i].length));
++ }
++
++ return nents;
++}
++EXPORT_SYMBOL(xen_map_sg);
++
++void
++xen_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
++ int direction)
++{
++ int i;
++ for (i = 0; i < nents; i++)
++ __gnttab_dma_unmap_page(sg[i].page);
++}
++EXPORT_SYMBOL(xen_unmap_sg);
++
++int
++xen_dma_mapping_error(dma_addr_t dma_addr)
++{
++ return 0;
++}
++EXPORT_SYMBOL(xen_dma_mapping_error);
++
++int
++xen_dma_supported(struct device *dev, u64 mask)
++{
++ return 1;
++}
++EXPORT_SYMBOL(xen_dma_supported);
++
++void *
++xen_alloc_coherent(struct device *dev, size_t size,
++ dma_addr_t *dma_handle, gfp_t gfp)
++{
++ unsigned long vaddr;
++ unsigned int order = get_order(size);
++
++ vaddr = __get_free_pages(gfp, order);
++
++ if (!vaddr)
++ return NULL;
++
++ if (xen_create_contiguous_region(vaddr, order,
++ fls64(dev->coherent_dma_mask))) {
++ free_pages(vaddr, order);
++ return NULL;
++ }
++
++ memset((void *)vaddr, 0, size);
++ *dma_handle = virt_to_bus((void *)vaddr);
++
++ return (void *)vaddr;
++}
++EXPORT_SYMBOL(xen_alloc_coherent);
++
++void
++xen_free_coherent(struct device *dev, size_t size,
++ void *vaddr, dma_addr_t dma_handle)
++{
++ unsigned int order = get_order(size);
++
++ xen_destroy_contiguous_region((unsigned long)vaddr, order);
++ free_pages((unsigned long)vaddr, order);
++}
++EXPORT_SYMBOL(xen_free_coherent);
++
++dma_addr_t
++xen_map_single(struct device *dev, void *ptr, size_t size,
++ int direction)
++{
++ dma_addr_t dma_addr = gnttab_dma_map_virt(ptr);
++
++ IOMMU_BUG_ON(range_straddles_page_boundary(__pa(ptr), size));
++ IOMMU_BUG_ON(address_needs_mapping(dev, dma_addr));
++
++ return dma_addr;
++}
++EXPORT_SYMBOL(xen_map_single);
++
++void
++xen_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
++ int direction)
++{
++ gnttab_dma_unmap_page(dma_addr);
++}
++EXPORT_SYMBOL(xen_unmap_single);
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/xencomm.c linux-2.6.18-xen-3.2.0/arch/ia64/xen/xencomm.c
+--- linux-2.6.18.8/arch/ia64/xen/xencomm.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/xencomm.c 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2006 Hollis Blanchard <hollisb@us.ibm.com>, IBM Corporation
+ *
@@ -27543,19 +31077,17 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xencomm.c tmp-linux-2.6-xen.patch
+
+#include <asm/xen/xencomm.h>
+
-+static int xencomm_debug = 0;
-+
+static unsigned long kernel_start_pa;
+
+void
-+xencomm_init (void)
++xencomm_initialize (void)
+{
+ kernel_start_pa = KERNEL_START - ia64_tpa(KERNEL_START);
+}
+
+/* Translate virtual address to physical address. */
+unsigned long
-+xencomm_vaddr_to_paddr(unsigned long vaddr)
++xencomm_vtop(unsigned long vaddr)
+{
+#ifndef CONFIG_VMX_GUEST
+ struct page *page;
@@ -27625,161 +31157,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xencomm.c tmp-linux-2.6-xen.patch
+ return (page_to_pfn(page) << PAGE_SHIFT) | (vaddr & ~PAGE_MASK);
+#endif
+}
-+
-+static int
-+xencomm_init_desc(struct xencomm_desc *desc, void *buffer, unsigned long bytes)
-+{
-+ unsigned long recorded = 0;
-+ int i = 0;
-+
-+ BUG_ON((buffer == NULL) && (bytes > 0));
-+
-+ /* record the physical pages used */
-+ if (buffer == NULL)
-+ desc->nr_addrs = 0;
-+
-+ while ((recorded < bytes) && (i < desc->nr_addrs)) {
-+ unsigned long vaddr = (unsigned long)buffer + recorded;
-+ unsigned long paddr;
-+ int offset;
-+ int chunksz;
-+
-+ offset = vaddr % PAGE_SIZE; /* handle partial pages */
-+ chunksz = min(PAGE_SIZE - offset, bytes - recorded);
-+
-+ paddr = xencomm_vaddr_to_paddr(vaddr);
-+ if (paddr == ~0UL) {
-+ printk("%s: couldn't translate vaddr %lx\n",
-+ __func__, vaddr);
-+ return -EINVAL;
-+ }
-+
-+ desc->address[i++] = paddr;
-+ recorded += chunksz;
-+ }
-+
-+ if (recorded < bytes) {
-+ printk("%s: could only translate %ld of %ld bytes\n",
-+ __func__, recorded, bytes);
-+ return -ENOSPC;
-+ }
-+
-+ /* mark remaining addresses invalid (just for safety) */
-+ while (i < desc->nr_addrs)
-+ desc->address[i++] = XENCOMM_INVALID;
-+
-+ desc->magic = XENCOMM_MAGIC;
-+
-+ return 0;
-+}
-+
-+static struct xencomm_desc *
-+xencomm_alloc(gfp_t gfp_mask)
-+{
-+ struct xencomm_desc *desc;
-+
-+ desc = (struct xencomm_desc *)__get_free_page(gfp_mask);
-+ if (desc == NULL)
-+ panic("%s: page allocation failed\n", __func__);
-+
-+ desc->nr_addrs = (PAGE_SIZE - sizeof(struct xencomm_desc)) /
-+ sizeof(*desc->address);
-+
-+ return desc;
-+}
-+
-+void
-+xencomm_free(struct xencomm_handle *desc)
-+{
-+ if (desc)
-+ free_page((unsigned long)__va(desc));
-+}
-+
-+int
-+xencomm_create(void *buffer, unsigned long bytes,
-+ struct xencomm_handle **ret, gfp_t gfp_mask)
-+{
-+ struct xencomm_desc *desc;
-+ struct xencomm_handle *handle;
-+ int rc;
-+
-+ if (xencomm_debug)
-+ printk("%s: %p[%ld]\n", __func__, buffer, bytes);
-+
-+ if (buffer == NULL || bytes == 0) {
-+ *ret = (struct xencomm_handle *)NULL;
-+ return 0;
-+ }
-+
-+ desc = xencomm_alloc(gfp_mask);
-+ if (!desc) {
-+ printk("%s failure\n", "xencomm_alloc");
-+ return -ENOMEM;
-+ }
-+ handle = (struct xencomm_handle *)__pa(desc);
-+
-+ rc = xencomm_init_desc(desc, buffer, bytes);
-+ if (rc) {
-+ printk("%s failure: %d\n", "xencomm_init_desc", rc);
-+ xencomm_free(handle);
-+ return rc;
-+ }
-+
-+ *ret = handle;
-+ return 0;
-+}
-+
-+/* "mini" routines, for stack-based communications: */
-+
-+static void *
-+xencomm_alloc_mini(struct xencomm_mini *area, int *nbr_area)
-+{
-+ unsigned long base;
-+ unsigned int pageoffset;
-+
-+ while (*nbr_area >= 0) {
-+ /* Allocate an area. */
-+ (*nbr_area)--;
-+
-+ base = (unsigned long)(area + *nbr_area);
-+ pageoffset = base % PAGE_SIZE;
-+
-+ /* If the area does not cross a page, use it. */
-+ if ((PAGE_SIZE - pageoffset) >= sizeof(struct xencomm_mini))
-+ return &area[*nbr_area];
-+ }
-+ /* No more area. */
-+ return NULL;
-+}
-+
-+int
-+xencomm_create_mini(struct xencomm_mini *area, int *nbr_area,
-+ void *buffer, unsigned long bytes,
-+ struct xencomm_handle **ret)
-+{
-+ struct xencomm_desc *desc;
-+ int rc;
-+ unsigned long res;
-+
-+ desc = xencomm_alloc_mini(area, nbr_area);
-+ if (!desc)
-+ return -ENOMEM;
-+ desc->nr_addrs = XENCOMM_MINI_ADDRS;
-+
-+ rc = xencomm_init_desc(desc, buffer, bytes);
-+ if (rc)
-+ return rc;
-+
-+ res = xencomm_vaddr_to_paddr((unsigned long)desc);
-+ if (res == ~0UL)
-+ return -EINVAL;
-+
-+ *ret = (struct xencomm_handle*)res;
-+ return 0;
-+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/xenentry.S linux-2.6.18-xen-3.2.0/arch/ia64/xen/xenentry.S
+--- linux-2.6.18.8/arch/ia64/xen/xenentry.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/xenentry.S 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,931 @@
+/*
+ * ia64/xen/entry.S
@@ -28712,12 +32092,12 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenentry.S tmp-linux-2.6-xen.patc
+#else
+END(ia64_leave_kernel)
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/xenhpski.c linux-2.6.18-xen-3.2.0/arch/ia64/xen/xenhpski.c
+--- linux-2.6.18.8/arch/ia64/xen/xenhpski.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/xenhpski.c 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,19 @@
-+
-+extern unsigned long xen_get_cpuid(int);
++#include <linux/kernel.h>
++#include <asm/hypervisor.h>
+
+int
+running_on_sim(void)
@@ -28735,9 +32115,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenhpski.c tmp-linux-2.6-xen.patc
+ return 1;
+}
+
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/xenivt.S linux-2.6.18-xen-3.2.0/arch/ia64/xen/xenivt.S
+--- linux-2.6.18.8/arch/ia64/xen/xenivt.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/xenivt.S 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,2177 @@
+/*
+ * arch/ia64/xen/ivt.S
@@ -29952,7 +33332,7 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenivt.S tmp-linux-2.6-xen.patch/
+ alloc r14=ar.pfs,0,0,2,0 // must be first in an insn group
+#ifdef CONFIG_XEN
+ ;;
-+ br.call.sptk.many rp=xen_get_ivr
++ XEN_HYPER_GET_IVR
+ ;;
+ mov out0=r8 // pass cr.ivr as first arg
+#else
@@ -30916,9 +34296,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/xenminstate.h linux-2.6.18-xen-3.2.0/arch/ia64/xen/xenminstate.h
+--- linux-2.6.18.8/arch/ia64/xen/xenminstate.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/xenminstate.h 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,358 @@
+#include <asm/cache.h>
+
@@ -31278,9 +34658,9 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenminstate.h tmp-linux-2.6-xen.p
+#else
+#define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, )
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/xenpal.S linux-2.6.18-xen-3.2.0/arch/ia64/xen/xenpal.S
+--- linux-2.6.18.8/arch/ia64/xen/xenpal.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/xenpal.S 2008-02-15 16:21:49.000000000 -0800
@@ -0,0 +1,85 @@
+/*
+ * ia64/xen/xenpal.S
@@ -31367,10 +34747,10 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xenpal.S tmp-linux-2.6-xen.patch/
+ srlz.d // seralize restoration of psr.l
+ br.ret.sptk.many b0
+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,52 @@
+diff -rpuN linux-2.6.18.8/arch/ia64/xen/xensetup.S linux-2.6.18-xen-3.2.0/arch/ia64/xen/xensetup.S
+--- linux-2.6.18.8/arch/ia64/xen/xensetup.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/ia64/xen/xensetup.S 2008-02-15 16:21:49.000000000 -0800
+@@ -0,0 +1,59 @@
+/*
+ * Support routines for Xen
+ *
@@ -31380,6 +34760,13 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xensetup.S tmp-linux-2.6-xen.patc
+#include <asm/processor.h>
+#include <asm/asmmacro.h>
+
++ .section .data.read_mostly
++ .align 8
++ .global running_on_xen
++running_on_xen:
++ data4 0
++ .previous
++
+#define isBP p3 // are we the Bootstrap Processor?
+
+ .text
@@ -31423,36 +34810,4483 @@ diff -Nurp pristine-linux-2.6.18/arch/ia64/xen/xensetup.S tmp-linux-2.6-xen.patc
+ ;;
+ br.ret.sptk.many b0
+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-11-14 15:35:27.000000000 -0800
-@@ -226,7 +226,7 @@ EXPORT_SYMBOL(physmem_forget_descriptor)
- EXPORT_SYMBOL(physmem_remove_mapping);
- EXPORT_SYMBOL(physmem_subst_mapping);
-
--void arch_free_page(struct page *page, int order)
-+int arch_free_page(struct page *page, int order)
- {
- void *virt;
- int i;
-@@ -235,6 +235,8 @@ void arch_free_page(struct page *page, i
- virt = __va(page_to_phys(page + i));
- physmem_remove_mapping(virt);
+diff -rpuN linux-2.6.18.8/arch/powerpc/Kconfig linux-2.6.18-xen-3.2.0/arch/powerpc/Kconfig
+--- linux-2.6.18.8/arch/powerpc/Kconfig 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/Kconfig 2008-02-15 16:21:51.000000000 -0800
+@@ -439,6 +439,17 @@ config UDBG_RTAS_CONSOLE
+ bool
+ default n
+
++config PPC_XEN
++ bool "Enable Xen compatible kernel"
++ depends on PPC_MULTIPLATFORM && PPC64 && PPC_MAPLE && PPC_PSERIES && SMP
++ select XEN
++ select XEN_PRIVILEGED_GUEST
++ select XEN_UNPRIVILEGED_GUEST
++ select XEN_XENCOMM
++
++ help
++ This option will compile a kernel compatible with Xen hypervisor
++
+ config XICS
+ depends on PPC_PSERIES
+ bool
+@@ -1080,6 +1091,8 @@ source "arch/powerpc/Kconfig.debug"
+
+ source "security/Kconfig"
+
++source "drivers/xen/Kconfig"
++
+ config KEYS_COMPAT
+ bool
+ depends on COMPAT && KEYS
+diff -rpuN linux-2.6.18.8/arch/powerpc/Kconfig.debug linux-2.6.18-xen-3.2.0/arch/powerpc/Kconfig.debug
+--- linux-2.6.18.8/arch/powerpc/Kconfig.debug 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/Kconfig.debug 2008-02-15 16:21:51.000000000 -0800
+@@ -160,6 +160,20 @@ config PPC_EARLY_DEBUG_ISERIES
+ Select this to enable early debugging for legacy iSeries. You need
+ to hit "Ctrl-x Ctrl-x" to see the messages on the console.
+
++config PPC_EARLY_DEBUG_XEN_DOM0
++ bool "Xen Dom0 Console"
++ depends on PPC_XEN
++ help
++ Select this to enable early debugging for Xen Dom0. Setting
++ this will result in a kernel that may not work as a DomU.
++
++config PPC_EARLY_DEBUG_XEN_DOMU
++ bool "Xen DomU Console"
++ depends on PPC_XEN && XEN_UNPRIVILEGED_GUEST
++ help
++ Select this to enable early debugging for Xen DomU. Setting
++ this will result in a kernel that may not work as a Dom0.
++
+ endchoice
+
+ endmenu
+diff -rpuN linux-2.6.18.8/arch/powerpc/Makefile linux-2.6.18-xen-3.2.0/arch/powerpc/Makefile
+--- linux-2.6.18.8/arch/powerpc/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/Makefile 2008-02-15 16:21:51.000000000 -0800
+@@ -65,6 +65,7 @@ CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARC
+ AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
+ CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc
+ CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple
++CFLAGS-$(CONFIG_PPC_XEN) += -Iinclude/asm-$(ARCH)/xen
+ CPPFLAGS += $(CPPFLAGS-y)
+ AFLAGS += $(AFLAGS-y)
+ CFLAGS += -msoft-float -pipe $(CFLAGS-y)
+diff -rpuN linux-2.6.18.8/arch/powerpc/boot/Makefile linux-2.6.18-xen-3.2.0/arch/powerpc/boot/Makefile
+--- linux-2.6.18.8/arch/powerpc/boot/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/boot/Makefile 2008-02-15 16:21:51.000000000 -0800
+@@ -36,8 +36,11 @@ zliblinuxheader := zlib.h zconf.h zutil.
+ $(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader))
+ #$(addprefix $(obj)/,main.o): $(addprefix $(obj)/,zlib.h)
+
++xen_guest-y = xen_guest.S
++
+ src-boot := crt0.S string.S prom.c stdio.c main.c div64.S
+ src-boot += $(zlib)
++src-boot += $(xen_guest-$(CONFIG_XEN))
+ src-boot := $(addprefix $(obj)/, $(src-boot))
+ obj-boot := $(addsuffix .o, $(basename $(src-boot)))
+
+diff -rpuN linux-2.6.18.8/arch/powerpc/boot/xen_guest.S linux-2.6.18-xen-3.2.0/arch/powerpc/boot/xen_guest.S
+--- linux-2.6.18.8/arch/powerpc/boot/xen_guest.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/boot/xen_guest.S 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,7 @@
++ .section __xen_guest
++ .ascii "GUEST_OS=linux"
++ .ascii ",GUEST_VER=xen-3.0"
++ .ascii ",XEN_VER=xen-3.0"
++ .ascii ",VIRT_BASE=0x0"
++ .ascii ",LOADER=generic"
++ .byte 0
+diff -rpuN linux-2.6.18.8/arch/powerpc/configs/xen_maple_defconfig linux-2.6.18-xen-3.2.0/arch/powerpc/configs/xen_maple_defconfig
+--- linux-2.6.18.8/arch/powerpc/configs/xen_maple_defconfig 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/configs/xen_maple_defconfig 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,1342 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.17
++# Mon Jan 15 23:48:47 2007
++#
++CONFIG_PPC64=y
++CONFIG_64BIT=y
++CONFIG_PPC_MERGE=y
++CONFIG_MMU=y
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_IRQ_PER_CPU=y
++CONFIG_RWSEM_XCHGADD_ALGORITHM=y
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_GENERIC_FIND_NEXT_BIT=y
++CONFIG_PPC=y
++CONFIG_EARLY_PRINTK=y
++CONFIG_COMPAT=y
++CONFIG_SYSVIPC_COMPAT=y
++CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
++CONFIG_ARCH_MAY_HAVE_PC_FDC=y
++CONFIG_PPC_OF=y
++CONFIG_PPC_UDBG_16550=y
++CONFIG_GENERIC_TBSYNC=y
++# CONFIG_DEFAULT_UIMAGE is not set
++
++#
++# Processor support
++#
++CONFIG_POWER4_ONLY=y
++CONFIG_POWER4=y
++CONFIG_PPC_FPU=y
++CONFIG_ALTIVEC=y
++CONFIG_PPC_STD_MMU=y
++CONFIG_VIRT_CPU_ACCOUNTING=y
++CONFIG_SMP=y
++CONFIG_NR_CPUS=32
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# Code maturity level options
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION="-Xen"
++CONFIG_LOCALVERSION_AUTO=y
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++# CONFIG_POSIX_MQUEUE is not set
++# CONFIG_BSD_PROCESS_ACCT is not set
++CONFIG_SYSCTL=y
++# CONFIG_AUDIT is not set
++CONFIG_IKCONFIG=y
++CONFIG_IKCONFIG_PROC=y
++# CONFIG_CPUSETS is not set
++# CONFIG_RELAY is not set
++CONFIG_INITRAMFS_SOURCE=""
++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
++# CONFIG_EMBEDDED is not set
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++# CONFIG_KALLSYMS_EXTRA_PASS is not set
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_BASE_FULL=y
++CONFIG_RT_MUTEXES=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SHMEM=y
++CONFIG_SLAB=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++# CONFIG_SLOB is not set
++
++#
++# Loadable module support
++#
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++# CONFIG_MODULE_FORCE_UNLOAD is not set
++CONFIG_MODVERSIONS=y
++CONFIG_MODULE_SRCVERSION_ALL=y
++CONFIG_KMOD=y
++CONFIG_STOP_MACHINE=y
++
++#
++# Block layer
++#
++# CONFIG_BLK_DEV_IO_TRACE is not set
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++# CONFIG_IOSCHED_AS is not set
++CONFIG_IOSCHED_DEADLINE=y
++# CONFIG_IOSCHED_CFQ is not set
++# CONFIG_DEFAULT_AS is not set
++CONFIG_DEFAULT_DEADLINE=y
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="deadline"
++
++#
++# Platform support
++#
++CONFIG_PPC_MULTIPLATFORM=y
++# CONFIG_PPC_ISERIES is not set
++# CONFIG_EMBEDDED6xx is not set
++# CONFIG_APUS is not set
++CONFIG_PPC_PSERIES=y
++# CONFIG_PPC_PMAC is not set
++CONFIG_PPC_MAPLE=y
++# CONFIG_PPC_CELL is not set
++# CONFIG_PPC_CELL_NATIVE is not set
++# CONFIG_PPC_IBM_CELL_BLADE is not set
++# CONFIG_UDBG_RTAS_CONSOLE is not set
++CONFIG_PPC_XEN=y
++CONFIG_XICS=y
++CONFIG_U3_DART=y
++CONFIG_MPIC=y
++CONFIG_PPC_RTAS=y
++CONFIG_RTAS_ERROR_LOGGING=y
++CONFIG_RTAS_PROC=y
++CONFIG_RTAS_FLASH=y
++# CONFIG_MMIO_NVRAM is not set
++CONFIG_MPIC_BROKEN_U3=y
++CONFIG_IBMVIO=y
++# CONFIG_IBMEBUS is not set
++# CONFIG_PPC_MPC106 is not set
++CONFIG_PPC_970_NAP=y
++# CONFIG_CPU_FREQ is not set
++# CONFIG_WANT_EARLY_SERIAL is not set
++
++#
++# Kernel options
++#
++CONFIG_HZ_100=y
++# CONFIG_HZ_250 is not set
++# CONFIG_HZ_1000 is not set
++CONFIG_HZ=100
++CONFIG_PREEMPT_NONE=y
++# CONFIG_PREEMPT_VOLUNTARY is not set
++# CONFIG_PREEMPT is not set
++# CONFIG_PREEMPT_BKL is not set
++CONFIG_BINFMT_ELF=y
++# CONFIG_BINFMT_MISC is not set
++CONFIG_FORCE_MAX_ZONEORDER=13
++CONFIG_IOMMU_VMERGE=y
++# CONFIG_HOTPLUG_CPU is not set
++CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
++# CONFIG_KEXEC is not set
++# CONFIG_CRASH_DUMP is not set
++CONFIG_IRQ_ALL_CPUS=y
++# CONFIG_PPC_SPLPAR is not set
++CONFIG_EEH=y
++CONFIG_SCANLOG=y
++CONFIG_LPARCFG=y
++CONFIG_NUMA=y
++CONFIG_NODES_SHIFT=4
++CONFIG_ARCH_SELECT_MEMORY_MODEL=y
++CONFIG_ARCH_SPARSEMEM_ENABLE=y
++CONFIG_ARCH_SPARSEMEM_DEFAULT=y
++CONFIG_SELECT_MEMORY_MODEL=y
++# CONFIG_FLATMEM_MANUAL is not set
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++CONFIG_SPARSEMEM_MANUAL=y
++CONFIG_SPARSEMEM=y
++CONFIG_NEED_MULTIPLE_NODES=y
++CONFIG_HAVE_MEMORY_PRESENT=y
++# CONFIG_SPARSEMEM_STATIC is not set
++CONFIG_SPARSEMEM_EXTREME=y
++CONFIG_MEMORY_HOTPLUG=y
++CONFIG_SPLIT_PTLOCK_CPUS=4
++CONFIG_MIGRATION=y
++CONFIG_RESOURCES_64BIT=y
++CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
++CONFIG_ARCH_MEMORY_PROBE=y
++# CONFIG_PPC_64K_PAGES is not set
++# CONFIG_SCHED_SMT is not set
++CONFIG_PROC_DEVICETREE=y
++# CONFIG_CMDLINE_BOOL is not set
++# CONFIG_PM is not set
++CONFIG_SECCOMP=y
++CONFIG_ISA_DMA_API=y
++
++#
++# Bus options
++#
++CONFIG_GENERIC_ISA_DMA=y
++CONFIG_PPC_I8259=y
++# CONFIG_PPC_INDIRECT_PCI is not set
++CONFIG_PCI=y
++CONFIG_PCI_DOMAINS=y
++# CONFIG_PCIEPORTBUS is not set
++# CONFIG_PCI_DEBUG is not set
++
++#
++# PCCARD (PCMCIA/CardBus) support
++#
++# CONFIG_PCCARD is not set
++
++#
++# PCI Hotplug Support
++#
++# CONFIG_HOTPLUG_PCI is not set
++CONFIG_KERNEL_START=0xc000000000000000
++
++#
++# Networking
++#
++CONFIG_NET=y
++
++#
++# Networking options
++#
++# CONFIG_NETDEBUG is not set
++CONFIG_PACKET=y
++CONFIG_PACKET_MMAP=y
++CONFIG_UNIX=y
++CONFIG_XFRM=y
++# CONFIG_XFRM_USER is not set
++# CONFIG_NET_KEY is not set
++CONFIG_INET=y
++CONFIG_IP_MULTICAST=y
++CONFIG_IP_ADVANCED_ROUTER=y
++CONFIG_ASK_IP_FIB_HASH=y
++# CONFIG_IP_FIB_TRIE is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_MULTIPLE_TABLES=y
++CONFIG_IP_ROUTE_FWMARK=y
++CONFIG_IP_ROUTE_MULTIPATH=y
++# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
++# CONFIG_IP_ROUTE_VERBOSE is not set
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++CONFIG_IP_PNP_BOOTP=y
++CONFIG_IP_PNP_RARP=y
++CONFIG_NET_IPIP=y
++# CONFIG_NET_IPGRE is not set
++CONFIG_IP_MROUTE=y
++CONFIG_IP_PIMSM_V1=y
++CONFIG_IP_PIMSM_V2=y
++# CONFIG_ARPD is not set
++CONFIG_SYN_COOKIES=y
++# CONFIG_INET_AH is not set
++# CONFIG_INET_ESP is not set
++# CONFIG_INET_IPCOMP is not set
++# CONFIG_INET_XFRM_TUNNEL is not set
++CONFIG_INET_TUNNEL=y
++CONFIG_INET_XFRM_MODE_TRANSPORT=y
++CONFIG_INET_XFRM_MODE_TUNNEL=y
++CONFIG_INET_DIAG=y
++CONFIG_INET_TCP_DIAG=y
++# CONFIG_TCP_CONG_ADVANCED is not set
++CONFIG_TCP_CONG_BIC=y
++
++#
++# IP: Virtual Server Configuration
++#
++# CONFIG_IP_VS is not set
++CONFIG_IPV6=y
++CONFIG_IPV6_PRIVACY=y
++CONFIG_IPV6_ROUTER_PREF=y
++CONFIG_IPV6_ROUTE_INFO=y
++CONFIG_INET6_AH=y
++CONFIG_INET6_ESP=y
++CONFIG_INET6_IPCOMP=y
++CONFIG_INET6_XFRM_TUNNEL=y
++CONFIG_INET6_TUNNEL=y
++CONFIG_INET6_XFRM_MODE_TRANSPORT=y
++CONFIG_INET6_XFRM_MODE_TUNNEL=y
++CONFIG_IPV6_TUNNEL=y
++# CONFIG_NETWORK_SECMARK is not set
++CONFIG_NETFILTER=y
++# CONFIG_NETFILTER_DEBUG is not set
++CONFIG_BRIDGE_NETFILTER=y
++
++#
++# Core Netfilter Configuration
++#
++CONFIG_NETFILTER_NETLINK=y
++CONFIG_NETFILTER_NETLINK_QUEUE=y
++CONFIG_NETFILTER_NETLINK_LOG=y
++CONFIG_NETFILTER_XTABLES=y
++CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
++CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
++CONFIG_NETFILTER_XT_TARGET_MARK=y
++CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
++CONFIG_NETFILTER_XT_TARGET_NOTRACK=y
++CONFIG_NETFILTER_XT_MATCH_COMMENT=y
++CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y
++CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
++CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
++CONFIG_NETFILTER_XT_MATCH_DCCP=y
++CONFIG_NETFILTER_XT_MATCH_ESP=y
++CONFIG_NETFILTER_XT_MATCH_HELPER=y
++CONFIG_NETFILTER_XT_MATCH_LENGTH=y
++CONFIG_NETFILTER_XT_MATCH_LIMIT=y
++CONFIG_NETFILTER_XT_MATCH_MAC=y
++CONFIG_NETFILTER_XT_MATCH_MARK=y
++CONFIG_NETFILTER_XT_MATCH_POLICY=y
++CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
++CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y
++CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
++CONFIG_NETFILTER_XT_MATCH_QUOTA=y
++CONFIG_NETFILTER_XT_MATCH_REALM=y
++CONFIG_NETFILTER_XT_MATCH_SCTP=y
++CONFIG_NETFILTER_XT_MATCH_STATE=y
++CONFIG_NETFILTER_XT_MATCH_STATISTIC=y
++CONFIG_NETFILTER_XT_MATCH_STRING=y
++CONFIG_NETFILTER_XT_MATCH_TCPMSS=y
++
++#
++# IP: Netfilter Configuration
++#
++CONFIG_IP_NF_CONNTRACK=y
++CONFIG_IP_NF_CT_ACCT=y
++CONFIG_IP_NF_CONNTRACK_MARK=y
++CONFIG_IP_NF_CONNTRACK_EVENTS=y
++CONFIG_IP_NF_CONNTRACK_NETLINK=y
++CONFIG_IP_NF_CT_PROTO_SCTP=y
++CONFIG_IP_NF_FTP=y
++CONFIG_IP_NF_IRC=y
++# CONFIG_IP_NF_NETBIOS_NS is not set
++CONFIG_IP_NF_TFTP=y
++CONFIG_IP_NF_AMANDA=y
++CONFIG_IP_NF_PPTP=y
++# CONFIG_IP_NF_H323 is not set
++# CONFIG_IP_NF_SIP is not set
++# CONFIG_IP_NF_QUEUE is not set
++CONFIG_IP_NF_IPTABLES=y
++CONFIG_IP_NF_MATCH_IPRANGE=y
++CONFIG_IP_NF_MATCH_TOS=y
++CONFIG_IP_NF_MATCH_RECENT=y
++CONFIG_IP_NF_MATCH_ECN=y
++CONFIG_IP_NF_MATCH_DSCP=y
++CONFIG_IP_NF_MATCH_AH=y
++CONFIG_IP_NF_MATCH_TTL=y
++CONFIG_IP_NF_MATCH_OWNER=y
++CONFIG_IP_NF_MATCH_ADDRTYPE=y
++CONFIG_IP_NF_MATCH_HASHLIMIT=y
++CONFIG_IP_NF_FILTER=y
++CONFIG_IP_NF_TARGET_REJECT=y
++CONFIG_IP_NF_TARGET_LOG=y
++CONFIG_IP_NF_TARGET_ULOG=y
++CONFIG_IP_NF_TARGET_TCPMSS=y
++CONFIG_IP_NF_NAT=y
++CONFIG_IP_NF_NAT_NEEDED=y
++CONFIG_IP_NF_TARGET_MASQUERADE=y
++CONFIG_IP_NF_TARGET_REDIRECT=y
++CONFIG_IP_NF_TARGET_NETMAP=y
++CONFIG_IP_NF_TARGET_SAME=y
++CONFIG_IP_NF_NAT_SNMP_BASIC=y
++CONFIG_IP_NF_NAT_IRC=y
++CONFIG_IP_NF_NAT_FTP=y
++CONFIG_IP_NF_NAT_TFTP=y
++CONFIG_IP_NF_NAT_AMANDA=y
++CONFIG_IP_NF_NAT_PPTP=y
++CONFIG_IP_NF_MANGLE=y
++CONFIG_IP_NF_TARGET_TOS=y
++CONFIG_IP_NF_TARGET_ECN=y
++CONFIG_IP_NF_TARGET_DSCP=y
++CONFIG_IP_NF_TARGET_TTL=y
++CONFIG_IP_NF_TARGET_CLUSTERIP=y
++CONFIG_IP_NF_RAW=y
++CONFIG_IP_NF_ARPTABLES=y
++CONFIG_IP_NF_ARPFILTER=y
++CONFIG_IP_NF_ARP_MANGLE=y
++
++#
++# IPv6: Netfilter Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP6_NF_QUEUE is not set
++CONFIG_IP6_NF_IPTABLES=y
++CONFIG_IP6_NF_MATCH_RT=y
++CONFIG_IP6_NF_MATCH_OPTS=y
++CONFIG_IP6_NF_MATCH_FRAG=y
++CONFIG_IP6_NF_MATCH_HL=y
++CONFIG_IP6_NF_MATCH_OWNER=y
++CONFIG_IP6_NF_MATCH_IPV6HEADER=y
++CONFIG_IP6_NF_MATCH_AH=y
++CONFIG_IP6_NF_MATCH_EUI64=y
++CONFIG_IP6_NF_FILTER=y
++CONFIG_IP6_NF_TARGET_LOG=y
++CONFIG_IP6_NF_TARGET_REJECT=y
++CONFIG_IP6_NF_MANGLE=y
++CONFIG_IP6_NF_TARGET_HL=y
++CONFIG_IP6_NF_RAW=y
++
++#
++# Bridge: Netfilter Configuration
++#
++CONFIG_BRIDGE_NF_EBTABLES=y
++CONFIG_BRIDGE_EBT_BROUTE=y
++CONFIG_BRIDGE_EBT_T_FILTER=y
++CONFIG_BRIDGE_EBT_T_NAT=y
++CONFIG_BRIDGE_EBT_802_3=y
++CONFIG_BRIDGE_EBT_AMONG=y
++CONFIG_BRIDGE_EBT_ARP=y
++CONFIG_BRIDGE_EBT_IP=y
++CONFIG_BRIDGE_EBT_LIMIT=y
++CONFIG_BRIDGE_EBT_MARK=y
++CONFIG_BRIDGE_EBT_PKTTYPE=y
++CONFIG_BRIDGE_EBT_STP=y
++CONFIG_BRIDGE_EBT_VLAN=y
++CONFIG_BRIDGE_EBT_ARPREPLY=y
++CONFIG_BRIDGE_EBT_DNAT=y
++CONFIG_BRIDGE_EBT_MARK_T=y
++CONFIG_BRIDGE_EBT_REDIRECT=y
++CONFIG_BRIDGE_EBT_SNAT=y
++CONFIG_BRIDGE_EBT_LOG=y
++CONFIG_BRIDGE_EBT_ULOG=y
++
++#
++# DCCP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_DCCP is not set
++
++#
++# SCTP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_SCTP is not set
++
++#
++# TIPC Configuration (EXPERIMENTAL)
++#
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++CONFIG_BRIDGE=y
++CONFIG_VLAN_8021Q=y
++# CONFIG_DECNET is not set
++CONFIG_LLC=y
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_NET_DIVERT is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++
++#
++# QoS and/or fair queueing
++#
++# CONFIG_NET_SCHED is not set
++CONFIG_NET_CLS_ROUTE=y
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++# CONFIG_IEEE80211 is not set
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++CONFIG_FW_LOADER=y
++# CONFIG_DEBUG_DRIVER is not set
++# CONFIG_SYS_HYPERVISOR is not set
++
++#
++# Connector - unified userspace <-> kernelspace linker
++#
++# CONFIG_CONNECTOR is not set
++
++#
++# Memory Technology Devices (MTD)
++#
++# CONFIG_MTD is not set
++
++#
++# Parallel port support
++#
++# CONFIG_PARPORT is not set
++
++#
++# Plug and Play support
++#
++
++#
++# Block devices
++#
++# CONFIG_BLK_DEV_FD is not set
++# CONFIG_BLK_CPQ_DA is not set
++# CONFIG_BLK_CPQ_CISS_DA is not set
++# CONFIG_BLK_DEV_DAC960 is not set
++# CONFIG_BLK_DEV_UMEM is not set
++# CONFIG_BLK_DEV_COW_COMMON is not set
++CONFIG_BLK_DEV_LOOP=y
++# CONFIG_BLK_DEV_CRYPTOLOOP is not set
++# CONFIG_BLK_DEV_NBD is not set
++# CONFIG_BLK_DEV_SX8 is not set
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=10240
++CONFIG_BLK_DEV_INITRD=y
++# CONFIG_CDROM_PKTCDVD is not set
++# CONFIG_ATA_OVER_ETH is not set
++
++#
++# ATA/ATAPI/MFM/RLL support
++#
++CONFIG_IDE=y
++CONFIG_BLK_DEV_IDE=y
++
++#
++# Please see Documentation/ide.txt for help/info on IDE drives
++#
++# CONFIG_BLK_DEV_IDE_SATA is not set
++CONFIG_BLK_DEV_IDEDISK=y
++# CONFIG_IDEDISK_MULTI_MODE is not set
++CONFIG_BLK_DEV_IDECD=y
++# CONFIG_BLK_DEV_IDETAPE is not set
++# CONFIG_BLK_DEV_IDEFLOPPY is not set
++# CONFIG_BLK_DEV_IDESCSI is not set
++CONFIG_IDE_TASK_IOCTL=y
++
++#
++# IDE chipset support/bugfixes
++#
++CONFIG_IDE_GENERIC=y
++CONFIG_BLK_DEV_IDEPCI=y
++CONFIG_IDEPCI_SHARE_IRQ=y
++# CONFIG_BLK_DEV_OFFBOARD is not set
++CONFIG_BLK_DEV_GENERIC=y
++# CONFIG_BLK_DEV_OPTI621 is not set
++# CONFIG_BLK_DEV_SL82C105 is not set
++CONFIG_BLK_DEV_IDEDMA_PCI=y
++# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
++CONFIG_IDEDMA_PCI_AUTO=y
++# CONFIG_IDEDMA_ONLYDISK is not set
++# CONFIG_BLK_DEV_AEC62XX is not set
++# CONFIG_BLK_DEV_ALI15X3 is not set
++CONFIG_BLK_DEV_AMD74XX=y
++# CONFIG_BLK_DEV_CMD64X is not set
++# CONFIG_BLK_DEV_TRIFLEX is not set
++# CONFIG_BLK_DEV_CY82C693 is not set
++# CONFIG_BLK_DEV_CS5520 is not set
++# CONFIG_BLK_DEV_CS5530 is not set
++# CONFIG_BLK_DEV_HPT34X is not set
++# CONFIG_BLK_DEV_HPT366 is not set
++# CONFIG_BLK_DEV_SC1200 is not set
++# CONFIG_BLK_DEV_PIIX is not set
++# CONFIG_BLK_DEV_IT821X is not set
++# CONFIG_BLK_DEV_NS87415 is not set
++# CONFIG_BLK_DEV_PDC202XX_OLD is not set
++# CONFIG_BLK_DEV_PDC202XX_NEW is not set
++# CONFIG_BLK_DEV_SVWKS is not set
++# CONFIG_BLK_DEV_SIIMAGE is not set
++# CONFIG_BLK_DEV_SLC90E66 is not set
++# CONFIG_BLK_DEV_TRM290 is not set
++# CONFIG_BLK_DEV_VIA82CXXX is not set
++# CONFIG_IDE_ARM is not set
++CONFIG_BLK_DEV_IDEDMA=y
++# CONFIG_IDEDMA_IVB is not set
++CONFIG_IDEDMA_AUTO=y
++# CONFIG_BLK_DEV_HD is not set
++
++#
++# SCSI device support
++#
++# CONFIG_RAID_ATTRS is not set
++CONFIG_SCSI=y
++# CONFIG_SCSI_PROC_FS is not set
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=y
++# CONFIG_CHR_DEV_ST is not set
++# CONFIG_CHR_DEV_OSST is not set
++CONFIG_BLK_DEV_SR=y
++# CONFIG_BLK_DEV_SR_VENDOR is not set
++CONFIG_CHR_DEV_SG=y
++# CONFIG_CHR_DEV_SCH is not set
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++# CONFIG_SCSI_MULTI_LUN is not set
++# CONFIG_SCSI_CONSTANTS is not set
++# CONFIG_SCSI_LOGGING is not set
++
++#
++# SCSI Transport Attributes
++#
++CONFIG_SCSI_SPI_ATTRS=y
++CONFIG_SCSI_FC_ATTRS=y
++CONFIG_SCSI_ISCSI_ATTRS=y
++CONFIG_SCSI_SAS_ATTRS=y
++
++#
++# SCSI low-level drivers
++#
++# CONFIG_ISCSI_TCP is not set
++# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
++# CONFIG_SCSI_3W_9XXX is not set
++# CONFIG_SCSI_ACARD is not set
++# CONFIG_SCSI_AACRAID is not set
++# CONFIG_SCSI_AIC7XXX is not set
++# CONFIG_SCSI_AIC7XXX_OLD is not set
++# CONFIG_SCSI_AIC79XX is not set
++# CONFIG_MEGARAID_NEWGEN is not set
++# CONFIG_MEGARAID_LEGACY is not set
++# CONFIG_MEGARAID_SAS is not set
++# CONFIG_SCSI_SATA is not set
++# CONFIG_SCSI_HPTIOP is not set
++# CONFIG_SCSI_BUSLOGIC is not set
++# CONFIG_SCSI_DMX3191D is not set
++# CONFIG_SCSI_EATA is not set
++# CONFIG_SCSI_FUTURE_DOMAIN is not set
++# CONFIG_SCSI_GDTH is not set
++# CONFIG_SCSI_IPS is not set
++# CONFIG_SCSI_IBMVSCSI is not set
++# CONFIG_SCSI_INITIO is not set
++# CONFIG_SCSI_INIA100 is not set
++# CONFIG_SCSI_SYM53C8XX_2 is not set
++CONFIG_SCSI_IPR=y
++# CONFIG_SCSI_IPR_TRACE is not set
++# CONFIG_SCSI_IPR_DUMP is not set
++# CONFIG_SCSI_QLOGIC_1280 is not set
++# CONFIG_SCSI_QLA_FC is not set
++# CONFIG_SCSI_LPFC is not set
++# CONFIG_SCSI_DC395x is not set
++# CONFIG_SCSI_DC390T is not set
++# CONFIG_SCSI_DEBUG is not set
++
++#
++# Multi-device support (RAID and LVM)
++#
++# CONFIG_MD is not set
++
++#
++# Fusion MPT device support
++#
++# CONFIG_FUSION is not set
++# CONFIG_FUSION_SPI is not set
++# CONFIG_FUSION_FC is not set
++# CONFIG_FUSION_SAS is not set
++
++#
++# IEEE 1394 (FireWire) support
++#
++# CONFIG_IEEE1394 is not set
++
++#
++# I2O device support
++#
++# CONFIG_I2O is not set
++
++#
++# Macintosh device drivers
++#
++# CONFIG_WINDFARM is not set
++
++#
++# Network device support
++#
++CONFIG_NETDEVICES=y
++# CONFIG_DUMMY is not set
++# CONFIG_BONDING is not set
++# CONFIG_EQUALIZER is not set
++# CONFIG_TUN is not set
++
++#
++# ARCnet devices
++#
++# CONFIG_ARCNET is not set
++
++#
++# PHY device support
++#
++# CONFIG_PHYLIB is not set
++
++#
++# Ethernet (10 or 100Mbit)
++#
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=y
++# CONFIG_HAPPYMEAL is not set
++# CONFIG_SUNGEM is not set
++# CONFIG_CASSINI is not set
++# CONFIG_NET_VENDOR_3COM is not set
++
++#
++# Tulip family network device support
++#
++# CONFIG_NET_TULIP is not set
++# CONFIG_HP100 is not set
++CONFIG_IBMVETH=y
++CONFIG_NET_PCI=y
++# CONFIG_PCNET32 is not set
++CONFIG_AMD8111_ETH=y
++# CONFIG_AMD8111E_NAPI is not set
++# CONFIG_ADAPTEC_STARFIRE is not set
++# CONFIG_B44 is not set
++# CONFIG_FORCEDETH is not set
++# CONFIG_DGRS is not set
++# CONFIG_EEPRO100 is not set
++# CONFIG_E100 is not set
++# CONFIG_FEALNX is not set
++# CONFIG_NATSEMI is not set
++# CONFIG_NE2K_PCI is not set
++# CONFIG_8139CP is not set
++# CONFIG_8139TOO is not set
++# CONFIG_SIS900 is not set
++# CONFIG_EPIC100 is not set
++# CONFIG_SUNDANCE is not set
++# CONFIG_VIA_RHINE is not set
++
++#
++# Ethernet (1000 Mbit)
++#
++# CONFIG_ACENIC is not set
++# CONFIG_DL2K is not set
++CONFIG_E1000=y
++# CONFIG_E1000_NAPI is not set
++# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
++# CONFIG_NS83820 is not set
++# CONFIG_HAMACHI is not set
++# CONFIG_YELLOWFIN is not set
++# CONFIG_R8169 is not set
++# CONFIG_SIS190 is not set
++# CONFIG_SKGE is not set
++CONFIG_SKY2=y
++CONFIG_SK98LIN=y
++# CONFIG_VIA_VELOCITY is not set
++CONFIG_TIGON3=y
++CONFIG_BNX2=y
++# CONFIG_MV643XX_ETH is not set
++
++#
++# Ethernet (10000 Mbit)
++#
++# CONFIG_CHELSIO_T1 is not set
++# CONFIG_IXGB is not set
++# CONFIG_S2IO is not set
++# CONFIG_MYRI10GE is not set
++
++#
++# Token Ring devices
++#
++# CONFIG_TR is not set
++
++#
++# Wireless LAN (non-hamradio)
++#
++# CONFIG_NET_RADIO is not set
++
++#
++# Wan interfaces
++#
++# CONFIG_WAN is not set
++# CONFIG_FDDI is not set
++# CONFIG_HIPPI is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++# CONFIG_NET_FC is not set
++# CONFIG_SHAPER is not set
++# CONFIG_NETCONSOLE is not set
++# CONFIG_NETPOLL is not set
++# CONFIG_NET_POLL_CONTROLLER is not set
++
++#
++# ISDN subsystem
++#
++# CONFIG_ISDN is not set
++
++#
++# Telephony Support
++#
++# CONFIG_PHONE is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++
++#
++# Userland interfaces
++#
++CONFIG_INPUT_MOUSEDEV=y
++# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1600
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1200
++# CONFIG_INPUT_JOYDEV is not set
++# CONFIG_INPUT_TSDEV is not set
++# CONFIG_INPUT_EVDEV is not set
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++# CONFIG_INPUT_KEYBOARD is not set
++# CONFIG_INPUT_MOUSE is not set
++# CONFIG_INPUT_JOYSTICK is not set
++# CONFIG_INPUT_TOUCHSCREEN is not set
++# CONFIG_INPUT_MISC is not set
++
++#
++# Hardware I/O ports
++#
++# CONFIG_SERIO is not set
++# CONFIG_GAMEPORT is not set
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++
++#
++# Non-8250 serial port support
++#
++# CONFIG_SERIAL_ICOM is not set
++# CONFIG_SERIAL_JSM is not set
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=256
++CONFIG_HVC_DRIVER=y
++CONFIG_HVC_CONSOLE=y
++# CONFIG_HVC_RTAS is not set
++# CONFIG_HVCS is not set
++
++#
++# IPMI
++#
++# CONFIG_IPMI_HANDLER is not set
++
++#
++# Watchdog Cards
++#
++# CONFIG_WATCHDOG is not set
++CONFIG_HW_RANDOM=y
++CONFIG_GEN_RTC=y
++# CONFIG_GEN_RTC_X is not set
++# CONFIG_DTLK is not set
++# CONFIG_R3964 is not set
++# CONFIG_APPLICOM is not set
++
++#
++# Ftape, the floppy tape device driver
++#
++# CONFIG_AGP is not set
++# CONFIG_DRM is not set
++# CONFIG_RAW_DRIVER is not set
++# CONFIG_HANGCHECK_TIMER is not set
++
++#
++# TPM devices
++#
++# CONFIG_TCG_TPM is not set
++# CONFIG_TELCLOCK is not set
++
++#
++# I2C support
++#
++CONFIG_I2C=y
++CONFIG_I2C_CHARDEV=y
++
++#
++# I2C Algorithms
++#
++CONFIG_I2C_ALGOBIT=y
++# CONFIG_I2C_ALGOPCF is not set
++# CONFIG_I2C_ALGOPCA is not set
++
++#
++# I2C Hardware Bus support
++#
++# CONFIG_I2C_ALI1535 is not set
++# CONFIG_I2C_ALI1563 is not set
++# CONFIG_I2C_ALI15X3 is not set
++# CONFIG_I2C_AMD756 is not set
++CONFIG_I2C_AMD8111=y
++# CONFIG_I2C_I801 is not set
++# CONFIG_I2C_I810 is not set
++# CONFIG_I2C_PIIX4 is not set
++# CONFIG_I2C_NFORCE2 is not set
++# CONFIG_I2C_OCORES is not set
++# CONFIG_I2C_PARPORT_LIGHT is not set
++# CONFIG_I2C_PROSAVAGE is not set
++# CONFIG_I2C_SAVAGE4 is not set
++# CONFIG_I2C_SIS5595 is not set
++# CONFIG_I2C_SIS630 is not set
++# CONFIG_I2C_SIS96X is not set
++# CONFIG_I2C_STUB is not set
++# CONFIG_I2C_VIA is not set
++# CONFIG_I2C_VIAPRO is not set
++# CONFIG_I2C_VOODOO3 is not set
++# CONFIG_I2C_PCA_ISA is not set
++
++#
++# Miscellaneous I2C Chip support
++#
++# CONFIG_SENSORS_DS1337 is not set
++# CONFIG_SENSORS_DS1374 is not set
++# CONFIG_SENSORS_EEPROM is not set
++# CONFIG_SENSORS_PCF8574 is not set
++# CONFIG_SENSORS_PCA9539 is not set
++# CONFIG_SENSORS_PCF8591 is not set
++# CONFIG_SENSORS_MAX6875 is not set
++# CONFIG_I2C_DEBUG_CORE is not set
++# CONFIG_I2C_DEBUG_ALGO is not set
++# CONFIG_I2C_DEBUG_BUS is not set
++# CONFIG_I2C_DEBUG_CHIP is not set
++
++#
++# SPI support
++#
++# CONFIG_SPI is not set
++# CONFIG_SPI_MASTER is not set
++
++#
++# Dallas's 1-wire bus
++#
++
++#
++# Hardware Monitoring support
++#
++# CONFIG_HWMON is not set
++# CONFIG_HWMON_VID is not set
++
++#
++# Misc devices
++#
++
++#
++# Multimedia devices
++#
++# CONFIG_VIDEO_DEV is not set
++CONFIG_VIDEO_V4L2=y
++
++#
++# Digital Video Broadcasting Devices
++#
++# CONFIG_DVB is not set
++
++#
++# Graphics support
++#
++CONFIG_FIRMWARE_EDID=y
++# CONFIG_FB is not set
++
++#
++# Console display driver support
++#
++# CONFIG_VGA_CONSOLE is not set
++CONFIG_DUMMY_CONSOLE=y
++
++#
++# Sound
++#
++# CONFIG_SOUND is not set
++
++#
++# USB support
++#
++CONFIG_USB_ARCH_HAS_HCD=y
++CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
++# CONFIG_USB is not set
++
++#
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
++#
++
++#
++# USB Gadget Support
++#
++# CONFIG_USB_GADGET is not set
++
++#
++# MMC/SD Card support
++#
++# CONFIG_MMC is not set
++
++#
++# LED devices
++#
++# CONFIG_NEW_LEDS is not set
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++
++#
++# InfiniBand support
++#
++CONFIG_INFINIBAND=y
++CONFIG_INFINIBAND_USER_MAD=y
++CONFIG_INFINIBAND_USER_ACCESS=y
++CONFIG_INFINIBAND_ADDR_TRANS=y
++CONFIG_INFINIBAND_MTHCA=y
++CONFIG_INFINIBAND_MTHCA_DEBUG=y
++CONFIG_INFINIBAND_IPOIB=y
++CONFIG_INFINIBAND_IPOIB_DEBUG=y
++CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
++CONFIG_INFINIBAND_SRP=y
++# CONFIG_INFINIBAND_ISER is not set
++
++#
++# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
++#
++
++#
++# Real Time Clock
++#
++# CONFIG_RTC_CLASS is not set
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
++#
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++# CONFIG_EXT2_FS_XATTR is not set
++CONFIG_EXT2_FS_XIP=y
++CONFIG_FS_XIP=y
++CONFIG_EXT3_FS=y
++# CONFIG_EXT3_FS_XATTR is not set
++CONFIG_JBD=y
++# CONFIG_JBD_DEBUG is not set
++CONFIG_REISERFS_FS=y
++# CONFIG_REISERFS_CHECK is not set
++CONFIG_REISERFS_PROC_INFO=y
++CONFIG_REISERFS_FS_XATTR=y
++CONFIG_REISERFS_FS_POSIX_ACL=y
++CONFIG_REISERFS_FS_SECURITY=y
++# CONFIG_JFS_FS is not set
++CONFIG_FS_POSIX_ACL=y
++# CONFIG_XFS_FS is not set
++# CONFIG_OCFS2_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_ROMFS_FS is not set
++CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
++# CONFIG_QUOTA is not set
++CONFIG_DNOTIFY=y
++CONFIG_AUTOFS_FS=y
++# CONFIG_AUTOFS4_FS is not set
++# CONFIG_FUSE_FS is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=y
++# CONFIG_JOLIET is not set
++# CONFIG_ZISOFS is not set
++# CONFIG_UDF_FS is not set
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=y
++CONFIG_MSDOS_FS=y
++CONFIG_VFAT_FS=y
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_KCORE=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_RAMFS=y
++# CONFIG_CONFIGFS_FS is not set
++
++#
++# Miscellaneous filesystems
++#
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++CONFIG_CRAMFS=y
++# CONFIG_VXFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++
++#
++# Network File Systems
++#
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3=y
++CONFIG_NFS_V3_ACL=y
++CONFIG_NFS_V4=y
++# CONFIG_NFS_DIRECTIO is not set
++# CONFIG_NFSD is not set
++CONFIG_ROOT_NFS=y
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_NFS_ACL_SUPPORT=y
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++CONFIG_SUNRPC_GSS=y
++CONFIG_RPCSEC_GSS_KRB5=y
++# CONFIG_RPCSEC_GSS_SPKM3 is not set
++# CONFIG_SMB_FS is not set
++# CONFIG_CIFS is not set
++# CONFIG_CIFS_DEBUG2 is not set
++# CONFIG_NCP_FS is not set
++# CONFIG_CODA_FS is not set
++# CONFIG_AFS_FS is not set
++# CONFIG_9P_FS is not set
++
++#
++# Partition Types
++#
++CONFIG_PARTITION_ADVANCED=y
++# CONFIG_ACORN_PARTITION is not set
++# CONFIG_OSF_PARTITION is not set
++# CONFIG_AMIGA_PARTITION is not set
++# CONFIG_ATARI_PARTITION is not set
++CONFIG_MAC_PARTITION=y
++CONFIG_MSDOS_PARTITION=y
++# CONFIG_BSD_DISKLABEL is not set
++# CONFIG_MINIX_SUBPARTITION is not set
++# CONFIG_SOLARIS_X86_PARTITION is not set
++# CONFIG_UNIXWARE_DISKLABEL is not set
++# CONFIG_LDM_PARTITION is not set
++# CONFIG_SGI_PARTITION is not set
++# CONFIG_ULTRIX_PARTITION is not set
++# CONFIG_SUN_PARTITION is not set
++# CONFIG_KARMA_PARTITION is not set
++# CONFIG_EFI_PARTITION is not set
++
++#
++# Native Language Support
++#
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="utf-8"
++# CONFIG_NLS_CODEPAGE_437 is not set
++# CONFIG_NLS_CODEPAGE_737 is not set
++# CONFIG_NLS_CODEPAGE_775 is not set
++# CONFIG_NLS_CODEPAGE_850 is not set
++# CONFIG_NLS_CODEPAGE_852 is not set
++# CONFIG_NLS_CODEPAGE_855 is not set
++# CONFIG_NLS_CODEPAGE_857 is not set
++# CONFIG_NLS_CODEPAGE_860 is not set
++# CONFIG_NLS_CODEPAGE_861 is not set
++# CONFIG_NLS_CODEPAGE_862 is not set
++# CONFIG_NLS_CODEPAGE_863 is not set
++# CONFIG_NLS_CODEPAGE_864 is not set
++# CONFIG_NLS_CODEPAGE_865 is not set
++# CONFIG_NLS_CODEPAGE_866 is not set
++# CONFIG_NLS_CODEPAGE_869 is not set
++# CONFIG_NLS_CODEPAGE_936 is not set
++# CONFIG_NLS_CODEPAGE_950 is not set
++# CONFIG_NLS_CODEPAGE_932 is not set
++# CONFIG_NLS_CODEPAGE_949 is not set
++# CONFIG_NLS_CODEPAGE_874 is not set
++# CONFIG_NLS_ISO8859_8 is not set
++# CONFIG_NLS_CODEPAGE_1250 is not set
++# CONFIG_NLS_CODEPAGE_1251 is not set
++# CONFIG_NLS_ASCII is not set
++# CONFIG_NLS_ISO8859_1 is not set
++# CONFIG_NLS_ISO8859_2 is not set
++# CONFIG_NLS_ISO8859_3 is not set
++# CONFIG_NLS_ISO8859_4 is not set
++# CONFIG_NLS_ISO8859_5 is not set
++# CONFIG_NLS_ISO8859_6 is not set
++# CONFIG_NLS_ISO8859_7 is not set
++# CONFIG_NLS_ISO8859_9 is not set
++# CONFIG_NLS_ISO8859_13 is not set
++# CONFIG_NLS_ISO8859_14 is not set
++# CONFIG_NLS_ISO8859_15 is not set
++# CONFIG_NLS_KOI8_R is not set
++# CONFIG_NLS_KOI8_U is not set
++CONFIG_NLS_UTF8=y
++
++#
++# Library routines
++#
++CONFIG_CRC_CCITT=y
++# CONFIG_CRC16 is not set
++CONFIG_CRC32=y
++# CONFIG_LIBCRC32C is not set
++CONFIG_ZLIB_INFLATE=y
++CONFIG_ZLIB_DEFLATE=y
++CONFIG_TEXTSEARCH=y
++CONFIG_TEXTSEARCH_KMP=y
++CONFIG_TEXTSEARCH_BM=y
++CONFIG_TEXTSEARCH_FSM=y
++CONFIG_PLIST=y
++
++#
++# Instrumentation Support
++#
++# CONFIG_PROFILING is not set
++# CONFIG_KPROBES is not set
++
++#
++# Kernel hacking
++#
++# CONFIG_PRINTK_TIME is not set
++CONFIG_MAGIC_SYSRQ=y
++# CONFIG_UNUSED_SYMBOLS is not set
++CONFIG_DEBUG_KERNEL=y
++CONFIG_LOG_BUF_SHIFT=17
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_SCHEDSTATS is not set
++CONFIG_DEBUG_SLAB=y
++CONFIG_DEBUG_MUTEXES=y
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++CONFIG_DEBUG_SPINLOCK_SLEEP=y
++# CONFIG_DEBUG_KOBJECT is not set
++CONFIG_DEBUG_INFO=y
++CONFIG_DEBUG_FS=y
++# CONFIG_DEBUG_VM is not set
++CONFIG_FORCED_INLINING=y
++# CONFIG_RCU_TORTURE_TEST is not set
++CONFIG_DEBUG_STACKOVERFLOW=y
++CONFIG_DEBUG_STACK_USAGE=y
++CONFIG_DEBUGGER=y
++CONFIG_XMON=y
++CONFIG_XMON_DEFAULT=y
++# CONFIG_IRQSTACKS is not set
++CONFIG_BOOTX_TEXT=y
++# CONFIG_PPC_EARLY_DEBUG is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++CONFIG_XEN=y
++CONFIG_XEN_INTERFACE_VERSION=0x00030202
++
++#
++# XEN
++#
++CONFIG_XEN_PRIVILEGED_GUEST=y
++CONFIG_XEN_UNPRIVILEGED_GUEST=y
++CONFIG_XEN_PRIVCMD=y
++CONFIG_XEN_BACKEND=y
++# CONFIG_XEN_PCIDEV_BACKEND is not set
++CONFIG_XEN_BLKDEV_BACKEND=y
++CONFIG_XEN_XENBUS_DEV=y
++CONFIG_XEN_NETDEV_BACKEND=y
++# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
++CONFIG_XEN_NETDEV_LOOPBACK=y
++# CONFIG_XEN_TPMDEV_BACKEND is not set
++CONFIG_XEN_BLKDEV_FRONTEND=y
++CONFIG_XEN_NETDEV_FRONTEND=y
++CONFIG_XEN_SCRUB_PAGES=y
++CONFIG_XEN_DISABLE_SERIAL=y
++CONFIG_XEN_SYSFS=y
++# CONFIG_XEN_COMPAT_030002_AND_LATER is not set
++CONFIG_XEN_COMPAT_LATEST_ONLY=y
++# CONFIG_XEN_COMPAT_030002 is not set
++CONFIG_HAVE_ARCH_ALLOC_SKB=y
++CONFIG_HAVE_ARCH_DEV_ALLOC_SKB=y
++CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
++CONFIG_NO_IDLE_HZ=y
++CONFIG_XEN_DEVMEM=y
++CONFIG_XEN_SKBUFF=y
++CONFIG_XEN_REBOOT=y
++CONFIG_XEN_XENCOMM=y
++
++#
++# Cryptographic options
++#
++CONFIG_CRYPTO=y
++CONFIG_CRYPTO_HMAC=y
++# CONFIG_CRYPTO_NULL is not set
++# CONFIG_CRYPTO_MD4 is not set
++CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_SHA1=y
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_WP512 is not set
++# CONFIG_CRYPTO_TGR192 is not set
++CONFIG_CRYPTO_DES=y
++# CONFIG_CRYPTO_BLOWFISH is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++# CONFIG_CRYPTO_SERPENT is not set
++# CONFIG_CRYPTO_AES is not set
++# CONFIG_CRYPTO_CAST5 is not set
++# CONFIG_CRYPTO_CAST6 is not set
++# CONFIG_CRYPTO_TEA is not set
++# CONFIG_CRYPTO_ARC4 is not set
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_ANUBIS is not set
++CONFIG_CRYPTO_DEFLATE=y
++# CONFIG_CRYPTO_MICHAEL_MIC is not set
++# CONFIG_CRYPTO_CRC32C is not set
++# CONFIG_CRYPTO_TEST is not set
++
++#
++# Hardware crypto devices
++#
+diff -rpuN linux-2.6.18.8/arch/powerpc/kernel/cpu_setup_power4.S linux-2.6.18-xen-3.2.0/arch/powerpc/kernel/cpu_setup_power4.S
+--- linux-2.6.18.8/arch/powerpc/kernel/cpu_setup_power4.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/kernel/cpu_setup_power4.S 2008-02-15 16:21:53.000000000 -0800
+@@ -73,6 +73,13 @@ _GLOBAL(__970_cpu_preinit)
+ blr
+
+ _GLOBAL(__setup_cpu_ppc970)
++ /*
++ * Do nothing if not running in HV mode
++ */
++ mfmsr r0
++ rldicl. r0,r0,4,63
++ beqlr
++
+ mfspr r0,SPRN_HID0
+ li r11,5 /* clear DOZE and SLEEP */
+ rldimi r0,r11,52,8 /* set NAP and DPM */
+diff -rpuN linux-2.6.18.8/arch/powerpc/kernel/prom_init.c linux-2.6.18-xen-3.2.0/arch/powerpc/kernel/prom_init.c
+--- linux-2.6.18.8/arch/powerpc/kernel/prom_init.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/kernel/prom_init.c 2008-02-15 16:21:53.000000000 -0800
+@@ -188,6 +188,7 @@ static unsigned long __initdata prom_tce
+ #define PLATFORM_LPAR 0x0001
+ #define PLATFORM_POWERMAC 0x0400
+ #define PLATFORM_GENERIC 0x0500
++#define PLATFORM_GENERIC_XEN (PLATFORM_GENERIC | PLATFORM_LPAR)
+
+ static int __initdata of_platform;
+
+@@ -1529,6 +1530,14 @@ static int __init prom_find_machine_type
+ phandle rtas;
+ int x;
+ #endif
++#ifdef CONFIG_PPC_XEN
++ phandle xen;
++
++ xen = call_prom("finddevice", 1, 1, ADDR("/xen"));
++ if (PHANDLE_VALID(xen)) {
++ return PLATFORM_GENERIC_XEN;
++ }
++#endif
+
+ /* Look for a PowerMac */
+ len = prom_getprop(_prom->root, "compatible",
+@@ -2262,6 +2271,31 @@ unsigned long __init prom_init(unsigned
+ if (RELOC(of_platform) == PLATFORM_PSERIES)
+ prom_initialize_tce_table();
+ #endif
++#ifdef CONFIG_PPC_XEN
++ if (RELOC(of_platform) & PLATFORM_LPAR) {
++ phandle xen;
++
++ prom_debug("XXX:checking for Xen OF package\n");
++
++ xen = call_prom("finddevice", 1, 1, ADDR("/xen"));
++ if (PHANDLE_VALID(xen)) {
++ u64 res[2];
++ int l;
++ ulong base;
++
++ l = prom_getprop(xen, "reserved", res, sizeof (res));
++ if (l != sizeof(res)) {
++ prom_panic("Xen reserved prop not exist\n");
++ }
++
++ base = alloc_down(res[1], PAGE_SIZE, 0);
++ if (base != res[0]) {
++ prom_panic("XSI != alloc_down()\n");
++ }
++ reserve_mem(res[0], res[1]);
++ }
++ }
++#endif
+
+ /*
+ * On non-powermacs, try to instantiate RTAS and puts all CPUs
+diff -rpuN linux-2.6.18.8/arch/powerpc/kernel/setup-common.c linux-2.6.18-xen-3.2.0/arch/powerpc/kernel/setup-common.c
+--- linux-2.6.18.8/arch/powerpc/kernel/setup-common.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/kernel/setup-common.c 2008-02-15 16:21:53.000000000 -0800
+@@ -387,6 +387,12 @@ void __init smp_setup_cpu_maps(void)
+ }
}
+
++ if (machine_is(xen)) {
++ /* something more inteligent perhaps? */
++ for (cpu = 0; cpu < NR_CPUS; cpu++)
++ cpu_set(cpu, cpu_possible_map);
++ }
+
-+ return 0;
+ #ifdef CONFIG_PPC64
+ /*
+ * On pSeries LPAR, we need to know how many cpus
+diff -rpuN linux-2.6.18.8/arch/powerpc/kernel/udbg.c linux-2.6.18-xen-3.2.0/arch/powerpc/kernel/udbg.c
+--- linux-2.6.18.8/arch/powerpc/kernel/udbg.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/kernel/udbg.c 2008-02-15 16:21:53.000000000 -0800
+@@ -45,6 +45,9 @@ void __init udbg_early_init(void)
+ #elif defined(CONFIG_PPC_EARLY_DEBUG_ISERIES)
+ /* For iSeries - hit Ctrl-x Ctrl-x to see the output */
+ udbg_init_iseries();
++#elif defined(CONFIG_PPC_EARLY_DEBUG_XEN_DOM0) || \
++ defined(CONFIG_PPC_EARLY_DEBUG_XEN_DOMU)
++ udbg_init_xen();
+ #endif
}
- 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-11-14 15:35:27.000000000 -0800
-@@ -135,6 +135,22 @@ config GENERIC_CPU
+diff -rpuN linux-2.6.18.8/arch/powerpc/mm/slb_low.S linux-2.6.18-xen-3.2.0/arch/powerpc/mm/slb_low.S
+--- linux-2.6.18.8/arch/powerpc/mm/slb_low.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/mm/slb_low.S 2008-02-15 16:21:53.000000000 -0800
+@@ -51,6 +51,23 @@ _GLOBAL(slb_allocate_realmode)
+ */
+ bne cr7,1f
+
++#ifdef CONFIG_PPC_XEN
++_GLOBAL(slb_miss_kernel_load_xen_nop)
++ b 3f
++ /* Need to check if it is in the part of our XEN Foreign Map */
++ rldicl r9,r3,30,63 /* get Xen region */
++ cmpldi cr7,r9,1 /* cmp this bit set to 1 */
++ bne cr7,3f
++ /* Xen Linear mapping encoding bits, the "li" instruction below
++ * could be patched below (like the other pages of the linear map)
++ * if we ever wish to map anything other that 4K pages in
++ * this region, right now it is fine as zero.
++ */
++_GLOBAL(slb_miss_kernel_load_xen_linear)
++ li r11,0
++ b slb_finish_load
++3:
++#endif
+ /* Linear mapping encoding bits, the "li" instruction below will
+ * be patched by the kernel at boot
+ */
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/Makefile linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/Makefile
+--- linux-2.6.18.8/arch/powerpc/platforms/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/Makefile 2008-02-15 16:21:53.000000000 -0800
+@@ -12,6 +12,8 @@ obj-$(CONFIG_PPC_85xx) += 85xx/
+ obj-$(CONFIG_PPC_86xx) += 86xx/
+ obj-$(CONFIG_PPC_PSERIES) += pseries/
+ obj-$(CONFIG_PPC_ISERIES) += iseries/
++# must occur before xen hosting platforms
++obj-$(CONFIG_PPC_XEN) += xen/
+ obj-$(CONFIG_PPC_MAPLE) += maple/
+ obj-$(CONFIG_PPC_CELL) += cell/
+ obj-$(CONFIG_EMBEDDED6xx) += embedded6xx/
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/pseries/iommu.c linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/pseries/iommu.c
+--- linux-2.6.18.8/arch/powerpc/platforms/pseries/iommu.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/pseries/iommu.c 2008-02-15 16:21:53.000000000 -0800
+@@ -531,6 +531,17 @@ static void iommu_dev_setup_pSeriesLP(st
+ * already allocated.
+ */
+ dn = pci_device_to_OF_node(dev);
++ if (dn == NULL) {
++#ifdef CONFIG_PPC_XEN
++ /* this becomes possible for Xen Dom0 */
++ DBG("%s, dev %p (%s) has no OF devtree entree\n", __func__,
++ dev, pci_name(dev));
++ return;
++#else
++ panic("%s, dev %p (%s) has no OF devtree entree\n", __func__,
++ dev, pci_name(dev));
++#endif
++ }
+
+ for (pdn = dn; pdn && PCI_DN(pdn) && !PCI_DN(pdn)->iommu_table;
+ pdn = pdn->parent) {
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/xen/Makefile linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/Makefile
+--- linux-2.6.18.8/arch/powerpc/platforms/xen/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/Makefile 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,20 @@
++obj-y += gnttab.o
++obj-y += hcall.o
++obj-y += reboot.o
++obj-y += setup.o
++obj-y += smp.o
++obj-y += time.o
++obj-y += udbg_xen.o
++obj-y += xen_guest.o
++obj-y += xencomm.o
++
++# we need the latest __XEN_INTERFACE_VERSION__ (see xen-compat.h)
++CFLAGS_hcall.o += -D__XEN_TOOLS__
++
++ifndef CONFIG_XEN_BALLOON
++obj-y += balloon.o
++endif
++
++ifndef CONFIG_XEN_UTIL
++obj-y += util.o
++endif
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/xen/balloon.c linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/balloon.c
+--- linux-2.6.18.8/arch/powerpc/platforms/xen/balloon.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/balloon.c 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,82 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Jimi Xenidis <jimix@watson.ibm.com>
++ */
++
++#include <linux/module.h>
++#include <linux/mm.h>
++#include <asm/hypervisor.h>
++#include "setup.h"
++
++/*
++ * FIXME: Port balloon driver, if ever
++ */
++
++struct page **alloc_empty_pages_and_pagevec(int nr_pages)
++{
++ struct page *page, **pagevec;
++ int i;
++
++ pagevec = kmalloc(sizeof(*pagevec) * nr_pages, GFP_KERNEL);
++ if (pagevec == NULL)
++ return NULL;
++
++ for (i = 0; i < nr_pages; i++) {
++ page = alloc_foreign_page();
++ BUG_ON(page == NULL);
++ pagevec[i] = page;
++ /* There is no real page backing us yet so it cannot
++ * be scrubbed */
++ }
++
++ return pagevec;
++}
++
++void free_empty_pages_and_pagevec(struct page **pagevec, int nr_pages)
++{
++ int i;
++
++ if (pagevec == NULL)
++ return;
++
++ for (i = 0; i < nr_pages; i++) {
++ free_foreign_page(pagevec[i]);
++ }
++
++ kfree(pagevec);
++}
++
++void balloon_dealloc_empty_page_range(
++ struct page *page, unsigned long nr_pages)
++{
++ __free_pages(page, get_order(nr_pages * PAGE_SIZE));
++}
++
++void balloon_update_driver_allowance(long delta)
++{
++}
++
++void balloon_release_driver_page(struct page *page)
++{
++ BUG();
++}
++
++EXPORT_SYMBOL_GPL(balloon_update_driver_allowance);
++EXPORT_SYMBOL_GPL(alloc_empty_pages_and_pagevec);
++EXPORT_SYMBOL_GPL(free_empty_pages_and_pagevec);
++EXPORT_SYMBOL_GPL(balloon_release_driver_page);
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/xen/gnttab.c linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/gnttab.c
+--- linux-2.6.18.8/arch/powerpc/platforms/xen/gnttab.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/gnttab.c 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,468 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Jimi Xenidis <jimix@watson.ibm.com>
++ */
++
++#include <linux/config.h>
++#include <linux/vmalloc.h>
++#include <linux/memory_hotplug.h>
++#include <xen/gnttab.h>
++#include <asm/hypervisor.h>
++#include <xen/interface/grant_table.h>
++#include <asm/pgtable.h>
++#include <asm/sections.h>
++#include <asm/io.h>
++#include <asm/machdep.h>
++#include <asm/prom.h>
++#include <asm/cacheflush.h>
++#include "setup.h"
++#include "../pseries/plpar_wrappers.h"
++
++#undef DEBUG
++
++#ifdef DEBUG
++#define DBG(fmt...) printk(KERN_EMERG fmt)
++#else
++#define DBG(fmt...)
++#endif
++
++#define NR_GRANT_FRAMES 4
++
++struct address_space xen_foreign_dummy_mapping;
++
++static ulong foreign_map_pfn;
++static ulong foreign_map_pgs;
++static unsigned long *foreign_map_bitmap;
++
++
++/* hijack _mapcount */
++static inline int gnt_mapcount(struct page *page)
++{
++ return atomic_read(&(page)->_mapcount) + 1;
++}
++
++static inline int gnt_map(struct page *page)
++{
++ /* return true is transition from -1 to 0 */
++ return atomic_inc_and_test(&page->_mapcount);
++}
++
++static inline int gnt_unmap(struct page *page)
++{
++ int val;
++
++ val = atomic_dec_return(&page->_mapcount);
++ if (val < -1) {
++ atomic_inc(&page->_mapcount);
++ printk(KERN_EMERG "%s: %d\n", __func__, val);
++ }
++
++ return (val == -1);
++}
++
++
++static long map_to_linear(ulong paddr)
++{
++ unsigned long vaddr;
++ int psize;
++ unsigned long mode;
++ int slot;
++ uint shift;
++ unsigned long tmp_mode;
++
++ psize = MMU_PAGE_4K;
++ shift = mmu_psize_defs[psize].shift;
++ mode = _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX;
++ vaddr = (ulong)__va(paddr);
++
++ {
++ unsigned long vpn, hash, hpteg;
++ unsigned long vsid = get_kernel_vsid(vaddr);
++ unsigned long va = (vsid << 28) | (vaddr & 0x0fffffff);
++
++ vpn = va >> shift;
++ tmp_mode = mode;
++
++ /* Make non-kernel text non-executable */
++ if (!in_kernel_text(vaddr))
++ tmp_mode = mode | HPTE_R_N;
++
++ hash = hpt_hash(va, shift);
++ hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP);
++
++ BUG_ON(!ppc_md.hpte_insert);
++ slot = ppc_md.hpte_insert(hpteg, va, paddr,
++ tmp_mode, HPTE_V_BOLTED, psize);
++ if (slot < 0)
++ printk(KERN_EMERG
++ "%s: no more bolted entries "
++ "HTAB[0x%lx]: 0x%lx\n",
++ __func__, hpteg, paddr);
++ }
++ return slot;
++}
++
++static unsigned long get_hpte_vsid(ulong slot)
++{
++ unsigned long dword0;
++ unsigned long lpar_rc;
++ unsigned long dummy_word1;
++ unsigned long flags;
++
++ /* Read 1 pte at a time */
++ /* Do not need RPN to logical page translation */
++ /* No cross CEC PFT access */
++ flags = 0;
++
++ lpar_rc = plpar_pte_read(flags, slot, &dword0, &dummy_word1);
++
++ BUG_ON(lpar_rc != H_SUCCESS);
++
++ return dword0;
++}
++
++static long find_hpte_slot(unsigned long va, int psize)
++{
++ unsigned long hash;
++ unsigned long i, j;
++ long slot;
++ unsigned long want_v, hpte_v;
++
++ hash = hpt_hash(va, mmu_psize_defs[psize].shift);
++ want_v = hpte_encode_v(va, psize);
++
++ for (j = 0; j < 2; j++) {
++ slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
++ for (i = 0; i < HPTES_PER_GROUP; i++) {
++ hpte_v = get_hpte_vsid(slot);
++
++ if (HPTE_V_COMPARE(hpte_v, want_v)
++ && (hpte_v & HPTE_V_VALID)
++ && (!!(hpte_v & HPTE_V_SECONDARY) == j)) {
++ /* HPTE matches */
++ if (j)
++ slot = -slot;
++ return slot;
++ }
++ ++slot;
++ }
++ hash = ~hash;
++ }
++
++ return -1;
++}
++
++static long find_map_slot(ulong ea)
++{
++ int psize = MMU_PAGE_4K;
++ ulong vsid;
++ ulong va;
++
++ vsid = get_kernel_vsid(ea);
++ va = (vsid << 28) | (ea & 0x0fffffff);
++
++ return find_hpte_slot(va, psize);
++}
++
++
++static void gnttab_pre_unmap_grant_ref(
++ struct gnttab_unmap_grant_ref *unmap, int count)
++{
++ long slot;
++ int i;
++ ulong ea;
++ unsigned long dummy1, dummy2;
++ ulong flags;
++
++ /* paranoia */
++ local_irq_save(flags);
++
++ for (i = 0 ; i < count; i++) {
++ struct page *page;
++
++ ea = (ulong)__va(unmap[i].host_addr);
++ page = virt_to_page(ea);
++
++ if (!gnt_unmap(page)) {
++ DBG("%s[0x%x]: skip: 0x%lx, mapcount 0x%x\n",
++ __func__, i, ea, gnt_mapcount(page));
++ continue;
++ }
++ slot = find_map_slot(ea);
++ if (slot < 0) {
++ printk(KERN_EMERG "%s: PTE not found: 0x%lx\n",
++ __func__, ea);
++ continue;
++ }
++
++ DBG("%s[0x%x]: 0x%lx: mapcount: 0x%x\n",
++ __func__, i, ea, gnt_mapcount(page));
++ plpar_pte_remove(0, slot, 0, &dummy1, &dummy2);
++ }
++ local_irq_restore(flags);
++}
++
++static void gnttab_post_map_grant_ref(
++ struct gnttab_map_grant_ref *map, int count)
++{
++ int i;
++ long slot;
++ ulong flags;
++
++ /* paranoia */
++ local_irq_save(flags);
++
++ for (i = 0 ; i < count; i++) {
++ ulong pa = map[i].host_addr;
++ struct page *page;
++
++ if (map[i].status != GNTST_okay) {
++ printk(KERN_EMERG "%s: status, skip\n", __func__);
++ continue;
++ }
++
++ BUG_ON(pa < (foreign_map_pfn << PAGE_SHIFT));
++ BUG_ON(pa >= (foreign_map_pfn << PAGE_SHIFT) +
++ (foreign_map_pgs << PAGE_SHIFT));
++
++ page = virt_to_page(__va(pa));
++
++ if (gnt_map(page)) {
++#ifdef DEBUG
++ /* we need to get smarted than this */
++ slot = find_map_slot((ulong)__va(pa));
++ if (slot >= 0) {
++ DBG("%s: redundant 0x%lx\n", __func__, pa);
++ continue;
++ }
++#endif
++ slot = map_to_linear(pa);
++ DBG("%s[0x%x]: 0x%lx, mapcount:0x%x\n",
++ __func__, i, pa, gnt_mapcount(page));
++
++ } else {
++ DBG("%s[0x%x] skip 0x%lx, mapcount:0x%x\n",
++ __func__, i, pa, gnt_mapcount(page));
++ }
++ }
++ local_irq_restore(flags);
++}
++
++int HYPERVISOR_grant_table_op(unsigned int cmd, void *op, unsigned int count)
++{
++ void *desc;
++ void *frame_list = NULL;
++ int argsize;
++ int ret = -ENOMEM;
++
++ switch (cmd) {
++ case GNTTABOP_map_grant_ref:
++ argsize = sizeof(struct gnttab_map_grant_ref);
++ break;
++ case GNTTABOP_unmap_grant_ref:
++ gnttab_pre_unmap_grant_ref(op, count);
++ argsize = sizeof(struct gnttab_unmap_grant_ref);
++ break;
++ case GNTTABOP_setup_table: {
++ struct gnttab_setup_table setup;
++
++ memcpy(&setup, op, sizeof(setup));
++ argsize = sizeof(setup);
++
++ frame_list = xencomm_map(
++ xen_guest_handle(setup.frame_list),
++ (sizeof(*xen_guest_handle(setup.frame_list))
++ * setup.nr_frames));
++
++ if (frame_list == NULL)
++ return -ENOMEM;
++
++ set_xen_guest_handle(setup.frame_list, frame_list);
++ memcpy(op, &setup, sizeof(setup));
++ }
++ break;
++ case GNTTABOP_dump_table:
++ argsize = sizeof(struct gnttab_dump_table);
++ break;
++ case GNTTABOP_transfer:
++ BUG();
++ argsize = sizeof(struct gnttab_transfer);
++ break;
++ case GNTTABOP_copy:
++ argsize = sizeof(struct gnttab_transfer);
++ break;
++ case GNTTABOP_query_size:
++ argsize = sizeof(struct gnttab_query_size);
++ break;
++ default:
++ printk(KERN_EMERG "%s: unknown grant table op %d\n",
++ __func__, cmd);
++ return -ENOSYS;
++ }
++
++ desc = xencomm_map_no_alloc(op, argsize);
++ if (desc) {
++ ret = plpar_hcall_norets(XEN_MARK(__HYPERVISOR_grant_table_op),
++ cmd, desc, count);
++ if (!ret && cmd == GNTTABOP_map_grant_ref)
++ gnttab_post_map_grant_ref(op, count);
++ xencomm_free(desc);
++ }
++ xencomm_free(frame_list);
++
++ return ret;
++}
++EXPORT_SYMBOL(HYPERVISOR_grant_table_op);
++
++static ulong find_grant_maps(void)
++{
++ struct device_node *xen;
++ u64 *gm;
++ u64 _gm[2];
++ u64 expect;
++
++ /* This value is currently hardcoded into the SLB logic that
++ * it written in assempler, See
++ * slb_miss_kernel_load_xen_linear for more information.
++ * Anything else and we can not run. */
++ expect = 34 - PAGE_SHIFT;
++
++ xen = of_find_node_by_path("/xen");
++
++ /*
++ * The foreign is 2x2 Cells.
++ * The first entry is log2 of the base page frame.
++ * The second is the number of pages
++ */
++ gm = (u64 *)get_property(xen, "foreign-map", NULL);
++ if (gm == NULL) {
++ if (!is_initial_xendomain()) {
++ printk("OF: /xen/foreign-map not present\n");
++ _gm[0] = expect;
++ _gm[1] = 2048;
++ gm = _gm;
++ } else
++ panic("OF: /xen/foreign-map must be present\n");
++ }
++
++ if (gm[0] != expect)
++ panic("foreign-map is 0x%lx, expect 0x%lx\n",
++ gm[0], expect);
++
++ foreign_map_pfn = 1UL << gm[0];
++ return gm[1];
++}
++
++static void setup_foreign_segment(void)
++{
++ extern int *slb_miss_kernel_load_xen_nop;
++ ulong iaddr = (ulong)slb_miss_kernel_load_xen_nop;
++
++ /* By default Linux will branch around this logic we replace
++ * the branch with a NOP to turn the logic on */
++ *slb_miss_kernel_load_xen_nop = 0x60000000;
++ flush_icache_range(iaddr, iaddr + 4);
++}
++
++struct page *alloc_foreign_page(void)
++{
++ ulong bit;
++ do {
++ bit = find_first_zero_bit(foreign_map_bitmap,
++ foreign_map_pgs);
++ if (bit >= foreign_map_pgs)
++ return NULL;
++ } while (test_and_set_bit(bit, foreign_map_bitmap) == 1);
++
++ return pfn_to_page(foreign_map_pfn + bit);
++}
++
++void free_foreign_page(struct page *page)
++{
++ ulong bit = page_to_pfn(page) - foreign_map_pfn;
++
++ BUG_ON(bit >= foreign_map_pgs);
++ BUG_ON(!test_bit(bit, foreign_map_bitmap));
++
++ clear_bit(bit, foreign_map_bitmap);
++}
++
++static void setup_grant_area(void)
++{
++ ulong pgs;
++ int err;
++ struct zone *zone;
++ struct pglist_data *pgdata;
++ int nid;
++
++ pgs = find_grant_maps();
++ setup_foreign_segment();
++
++ printk("%s: Xen VIO will use a foreign address space of 0x%lx pages\n",
++ __func__, pgs);
++
++ /* add pages to the zone */
++ nid = 0;
++ pgdata = NODE_DATA(nid);
++ zone = pgdata->node_zones;
++
++ err = __add_pages(zone, foreign_map_pfn, pgs);
++
++ if (err < 0) {
++ printk(KERN_EMERG "%s: add_pages(0x%lx, 0x%lx) = %d\n",
++ __func__, foreign_map_pfn, pgs, err);
++ BUG();
++ }
++
++ /* create a bitmap to manage these pages */
++ foreign_map_bitmap = kmalloc(BITS_TO_LONGS(pgs) * sizeof(long),
++ GFP_KERNEL);
++ if (foreign_map_bitmap == NULL) {
++ printk(KERN_EMERG
++ "%s: could not allocate foreign_map_bitmap to "
++ "manage 0x%lx foreign pages\n", __func__, pgs);
++ BUG();
++ }
++ /* I'm paranoid so make sure we assign the top bits so we
++ * don't give them away */
++ bitmap_fill(&foreign_map_bitmap[BITS_TO_LONGS(pgs) - 1],
++ BITS_PER_LONG);
++ /* now clear all the real bits */
++ bitmap_zero(foreign_map_bitmap, pgs);
++
++ foreign_map_pgs = pgs;
++}
++
++void *arch_gnttab_alloc_shared(unsigned long *frames)
++{
++ void *shared;
++ ulong pa = frames[0] << PAGE_SHIFT;
++ static int resume;
++
++ shared = ioremap(pa, PAGE_SIZE * NR_GRANT_FRAMES);
++ BUG_ON(shared == NULL);
++ printk("%s: grant table at %p\n", __func__, shared);
++
++ /* no need to do the rest of this if we are resuming */
++ if (!resume)
++ setup_grant_area();
++
++ resume = 1;
++
++ return shared;
++}
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/xen/hcall.c linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/hcall.c
+--- linux-2.6.18.8/arch/powerpc/platforms/xen/hcall.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/hcall.c 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,891 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006, 2007
++ *
++ * Authors: Hollis Blanchard <hollisb@us.ibm.com>
++ */
++
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/kernel.h>
++#include <linux/gfp.h>
++#include <linux/module.h>
++#include <xen/interface/xen.h>
++#include <xen/interface/domctl.h>
++#include <xen/interface/sysctl.h>
++#include <xen/interface/platform.h>
++#include <xen/interface/memory.h>
++#include <xen/interface/xencomm.h>
++#include <xen/interface/version.h>
++#include <xen/interface/sched.h>
++#include <xen/interface/event_channel.h>
++#include <xen/interface/physdev.h>
++#include <xen/interface/vcpu.h>
++#include <xen/interface/xsm/acm_ops.h>
++#include <xen/interface/kexec.h>
++#include <xen/public/privcmd.h>
++#include <asm/hypercall.h>
++#include <asm/page.h>
++#include <asm/uaccess.h>
++#include <asm/hvcall.h>
++#include "setup.h"
++
++/* Xencomm notes:
++ *
++ * For kernel memory, we assume that virtually contiguous pages are also
++ * physically contiguous. This allows us to avoid creating descriptors for
++ * kernel hypercalls, such as console and event channel operations.
++ *
++ * In general, we need a xencomm descriptor to cover the top-level data
++ * structure (e.g. the domctl op), plus another for every embedded pointer to
++ * another data structure (i.e. for every GUEST_HANDLE).
++ */
++
++int HYPERVISOR_console_io(int cmd, int count, char *str)
++{
++ struct xencomm_handle *desc;
++ int rc;
++
++ desc = xencomm_map_no_alloc(str, count);
++ if (desc == NULL)
++ return -EINVAL;
++
++ rc = plpar_hcall_norets(XEN_MARK(__HYPERVISOR_console_io),
++ cmd, count, desc);
++
++ xencomm_free(desc);
++
++ return rc;
++}
++EXPORT_SYMBOL(HYPERVISOR_console_io);
++
++int HYPERVISOR_event_channel_op(int cmd, void *op)
++{
++ int rc;
++
++ struct xencomm_handle *desc =
++ xencomm_map_no_alloc(op, sizeof(evtchn_op_t));
++ if (desc == NULL)
++ return -EINVAL;
++
++ rc = plpar_hcall_norets(XEN_MARK(__HYPERVISOR_event_channel_op),
++ cmd, desc);
++
++ xencomm_free(desc);
++
++ return rc;
++
++}
++EXPORT_SYMBOL(HYPERVISOR_event_channel_op);
++
++int HYPERVISOR_xen_version(int cmd, void *arg)
++{
++ struct xencomm_handle *desc;
++ const unsigned long hcall = __HYPERVISOR_xen_version;
++ int argsize;
++ int rc;
++
++ switch (cmd) {
++ case XENVER_version:
++ /* do not actually pass an argument */
++ return plpar_hcall_norets(XEN_MARK(hcall), cmd, 0);
++ case XENVER_extraversion:
++ argsize = sizeof(xen_extraversion_t);
++ break;
++ case XENVER_compile_info:
++ argsize = sizeof(xen_compile_info_t);
++ break;
++ case XENVER_capabilities:
++ argsize = sizeof(xen_capabilities_info_t);
++ break;
++ case XENVER_changeset:
++ argsize = sizeof(xen_changeset_info_t);
++ break;
++ case XENVER_platform_parameters:
++ argsize = sizeof(xen_platform_parameters_t);
++ break;
++ case XENVER_pagesize:
++ if (arg == NULL)
++ argsize = 0;
++ else
++ argsize = sizeof(void *);
++ break;
++ case XENVER_get_features:
++ argsize = sizeof(xen_feature_info_t);
++ break;
++ default:
++ printk(KERN_ERR "%s: unknown version cmd %d\n", __func__, cmd);
++ return -ENOSYS;
++ }
++
++ /* desc could be NULL in the case of XENVER_pagesize with NULL arg */
++ desc = xencomm_map(arg, argsize);
++
++ rc = plpar_hcall_norets(XEN_MARK(hcall), cmd, desc);
++
++ xencomm_free(desc);
++
++ return rc;
++}
++EXPORT_SYMBOL(HYPERVISOR_xen_version);
++
++
++int HYPERVISOR_physdev_op(int cmd, void *op)
++{
++ struct xencomm_handle *desc =
++ xencomm_map_no_alloc(op, sizeof(physdev_op_t));
++ int rc;
++
++ if (desc == NULL)
++ return -EINVAL;
++
++ rc = plpar_hcall_norets(XEN_MARK(__HYPERVISOR_physdev_op),
++ cmd, desc);
++
++ xencomm_free(desc);
++
++ return rc;
++}
++EXPORT_SYMBOL(HYPERVISOR_physdev_op);
++
++int HYPERVISOR_sched_op(int cmd, void *arg)
++{
++ int argsize = 0;
++ int rc = -EINVAL;
++ struct xencomm_handle *desc;
++ struct xencomm_handle *ports = NULL;
++
++ switch (cmd) {
++ case SCHEDOP_yield:
++ case SCHEDOP_block:
++ return plpar_hcall_norets(XEN_MARK(__HYPERVISOR_sched_op),
++ cmd, 0);
++ break;
++
++ case SCHEDOP_poll: {
++ struct sched_poll sched_poll;
++
++ argsize = sizeof(struct sched_poll);
++
++ memcpy(&sched_poll, arg, sizeof(sched_poll));
++
++ ports = xencomm_map(
++ xen_guest_handle(sched_poll.ports),
++ (sizeof(evtchn_port_t) * sched_poll.nr_ports));
++
++ if (ports == NULL)
++ return -ENOMEM;
++
++ set_xen_guest_handle(sched_poll.ports, (evtchn_port_t *)ports);
++ memcpy(arg, &sched_poll, sizeof(sched_poll));
++
++ }
++ break;
++ case SCHEDOP_shutdown:
++ argsize = sizeof(struct sched_shutdown);
++ break;
++ case SCHEDOP_remote_shutdown:
++ argsize = sizeof(struct sched_remote_shutdown);
++ break;
++ default:
++ printk(KERN_ERR "%s: unknown sched op %d\n", __func__, cmd);
++ return -ENOSYS;
++ }
++
++ desc = xencomm_map_no_alloc(arg, argsize);
++ if (desc) {
++ rc = plpar_hcall_norets(XEN_MARK(__HYPERVISOR_sched_op),
++ cmd, desc);
++ xencomm_free(desc);
++ }
++
++ xencomm_free(ports);
++
++ return rc;
++}
++EXPORT_SYMBOL(HYPERVISOR_sched_op);
++
++int HYPERVISOR_suspend(unsigned long srec)
++{
++ int cmd = SCHEDOP_shutdown;
++ struct sched_shutdown sched_shutdown = {
++ .reason = SHUTDOWN_suspend,
++ };
++ struct xencomm_handle *desc;
++
++ desc = xencomm_map_no_alloc(&sched_shutdown, sizeof(struct sched_shutdown));
++
++ return plpar_hcall_norets(XEN_MARK(__HYPERVISOR_sched_op),
++ cmd, desc, srec);
++}
++EXPORT_SYMBOL(HYPERVISOR_suspend);
++
++int HYPERVISOR_kexec_op(unsigned long op, void *args)
++{
++ unsigned long argsize;
++ struct xencomm_handle *desc;
++
++ switch (op) {
++ case KEXEC_CMD_kexec_get_range:
++ argsize = sizeof(struct xen_kexec_range);
++ break;
++ case KEXEC_CMD_kexec_load:
++ argsize = sizeof(struct xen_kexec_load);
++ break;
++ case KEXEC_CMD_kexec_unload:
++ argsize = sizeof(struct xen_kexec_load);
++ break;
++ case KEXEC_CMD_kexec:
++ argsize = sizeof(struct xen_kexec_exec);
++ break;
++ default:
++ return -ENOSYS;
++ }
++ desc = xencomm_map_no_alloc(args, argsize);
++
++ return plpar_hcall_norets(XEN_MARK(__HYPERVISOR_kexec_op),
++ op, desc);
++}
++EXPORT_SYMBOL(HYPERVISOR_kexec_op);
++
++int HYPERVISOR_poll(
++ evtchn_port_t *ports, unsigned int nr_ports, u64 timeout)
++{
++ struct sched_poll sched_poll = {
++ .nr_ports = nr_ports,
++ .timeout = jiffies_to_ns(timeout)
++ };
++ set_xen_guest_handle(sched_poll.ports, ports);
++
++ return HYPERVISOR_sched_op(SCHEDOP_poll, &sched_poll);
++}
++EXPORT_SYMBOL(HYPERVISOR_poll);
++
++typedef ulong (mf_t)(ulong arg0, ...);
++
++static mf_t *multicall_funcs[] = {
++ [__HYPERVISOR_grant_table_op] = (mf_t *)HYPERVISOR_grant_table_op,
++};
++
++int HYPERVISOR_multicall(void *call_list, int nr_calls)
++{
++ /* we blow out the multicall because the xencomm stuff is jsut
++ * too tricky */
++ multicall_entry_t *mcl = (multicall_entry_t *)call_list;
++ multicall_entry_t *c;
++ int i;
++ mf_t *mf;
++ int res;
++ ulong flags;
++
++ /* let make sure all the calls are supported */
++ for (i = 0; i < nr_calls; i++) {
++ mf = multicall_funcs[mcl[i].op];
++ BUG_ON(mf == NULL);
++ }
++ /* disable interrupts until we are done all calls */
++ local_irq_save(flags);
++ for (i = 0; i < nr_calls; i++) {
++ /* lookup supported multicalls */
++ c = &mcl[i];
++ mf = multicall_funcs[c->op];
++ res = mf(c->args[0], c->args[1], c->args[2],
++ c->args[3], c->args[4], c->args[5]);
++ c->result = res;
++ }
++ local_irq_restore(flags);
++ return 0;
++}
++EXPORT_SYMBOL(HYPERVISOR_multicall);
++
++
++/* privcmd operations: */
++
++static int xenppc_privcmd_domctl(privcmd_hypercall_t *hypercall)
++{
++ xen_domctl_t kern_op;
++ xen_domctl_t __user *user_op = (xen_domctl_t __user *)hypercall->arg[0];
++ struct xencomm_handle *op_desc;
++ struct xencomm_handle *desc = NULL;
++ int ret = 0;
++
++ if (copy_from_user(&kern_op, user_op, sizeof(xen_domctl_t)))
++ return -EFAULT;
++
++ if (kern_op.interface_version != XEN_DOMCTL_INTERFACE_VERSION) {
++ printk(KERN_WARNING "%s: %s %x != %x\n", __func__, current->comm,
++ kern_op.interface_version, XEN_DOMCTL_INTERFACE_VERSION);
++ return -EACCES;
++ }
++
++ op_desc = xencomm_map(&kern_op, sizeof(xen_domctl_t));
++ if (op_desc == NULL)
++ return -ENOMEM;
++
++ switch (kern_op.cmd) {
++ case XEN_DOMCTL_createdomain:
++ case XEN_DOMCTL_destroydomain:
++ case XEN_DOMCTL_pausedomain:
++ case XEN_DOMCTL_unpausedomain:
++ case XEN_DOMCTL_getdomaininfo:
++ break;
++ case XEN_DOMCTL_getmemlist:
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.getmemlist.buffer),
++ kern_op.u.getmemlist.max_pfns * sizeof(unsigned long));
++
++ if (desc == NULL)
++ ret = -ENOMEM;
++
++ set_xen_guest_handle(kern_op.u.getmemlist.buffer,
++ (void *)desc);
++ break;
++ case XEN_DOMCTL_getpageframeinfo:
++ break;
++ case XEN_DOMCTL_getpageframeinfo2:
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.getpageframeinfo2.array),
++ kern_op.u.getpageframeinfo2.num);
++
++ if (desc == NULL)
++ ret = -ENOMEM;
++
++ set_xen_guest_handle(kern_op.u.getpageframeinfo2.array,
++ (void *)desc);
++ break;
++ case XEN_DOMCTL_shadow_op:
++
++ if (xen_guest_handle(kern_op.u.shadow_op.dirty_bitmap))
++ {
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.shadow_op.dirty_bitmap),
++ kern_op.u.shadow_op.pages * sizeof(unsigned long));
++
++ if (desc == NULL)
++ ret = -ENOMEM;
++
++ set_xen_guest_handle(kern_op.u.shadow_op.dirty_bitmap,
++ (void *)desc);
++ }
++ break;
++ case XEN_DOMCTL_max_mem:
++ break;
++ case XEN_DOMCTL_setvcpucontext:
++ case XEN_DOMCTL_getvcpucontext:
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.vcpucontext.ctxt),
++ sizeof(vcpu_guest_context_t));
++
++ if (desc == NULL)
++ ret = -ENOMEM;
++
++ set_xen_guest_handle(kern_op.u.vcpucontext.ctxt,
++ (void *)desc);
++ break;
++ case XEN_DOMCTL_getvcpuinfo:
++ break;
++ case XEN_DOMCTL_setvcpuaffinity:
++ case XEN_DOMCTL_getvcpuaffinity:
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.vcpuaffinity.cpumap.bitmap),
++ (kern_op.u.vcpuaffinity.cpumap.nr_cpus + 7) / 8);
++
++ if (desc == NULL)
++ ret = -ENOMEM;
++
++ set_xen_guest_handle(kern_op.u.vcpuaffinity.cpumap.bitmap,
++ (void *)desc);
++ break;
++ case XEN_DOMCTL_max_vcpus:
++ case XEN_DOMCTL_scheduler_op:
++ case XEN_DOMCTL_setdomainhandle:
++ case XEN_DOMCTL_setdebugging:
++ case XEN_DOMCTL_irq_permission:
++ case XEN_DOMCTL_iomem_permission:
++ case XEN_DOMCTL_ioport_permission:
++ case XEN_DOMCTL_hypercall_init:
++ case XEN_DOMCTL_arch_setup:
++ case XEN_DOMCTL_settimeoffset:
++ case XEN_DOMCTL_real_mode_area:
++ break;
++ default:
++ printk(KERN_ERR "%s: unknown domctl cmd %d\n", __func__, kern_op.cmd);
++ return -ENOSYS;
++ }
++
++ if (ret)
++ goto out; /* error mapping the nested pointer */
++
++ ret = plpar_hcall_norets(XEN_MARK(hypercall->op),op_desc);
++
++ if (copy_to_user(user_op, &kern_op, sizeof(xen_domctl_t)))
++ ret = -EFAULT;
++
++out:
++ xencomm_free(desc);
++ xencomm_free(op_desc);
++ return ret;
++}
++
++static int xenppc_privcmd_sysctl(privcmd_hypercall_t *hypercall)
++{
++ xen_sysctl_t kern_op;
++ xen_sysctl_t __user *user_op = (xen_sysctl_t __user *)hypercall->arg[0];
++ struct xencomm_handle *op_desc;
++ struct xencomm_handle *desc = NULL;
++ int ret = 0;
++
++ if (copy_from_user(&kern_op, user_op, sizeof(xen_sysctl_t)))
++ return -EFAULT;
++
++ if (kern_op.interface_version != XEN_SYSCTL_INTERFACE_VERSION) {
++ printk(KERN_WARNING "%s: %s %x != %x\n", __func__, current->comm,
++ kern_op.interface_version, XEN_SYSCTL_INTERFACE_VERSION);
++ return -EACCES;
++ }
++
++ op_desc = xencomm_map(&kern_op, sizeof(xen_sysctl_t));
++
++ if (op_desc == NULL)
++ return -ENOMEM;
++
++ switch (kern_op.cmd) {
++ case XEN_SYSCTL_readconsole:
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.readconsole.buffer),
++ kern_op.u.readconsole.count);
++
++ if (desc == NULL)
++ ret = -ENOMEM;
++
++ set_xen_guest_handle(kern_op.u.readconsole.buffer,
++ (void *)desc);
++ break;
++ case XEN_SYSCTL_tbuf_op:
++ case XEN_SYSCTL_physinfo:
++ case XEN_SYSCTL_sched_id:
++ break;
++ case XEN_SYSCTL_perfc_op:
++ /* XXX this requires *two* embedded xencomm mappings (desc and val),
++ * and I don't feel like it right now. */
++ printk(KERN_ERR "%s: unknown sysctl cmd %d\n", __func__, kern_op.cmd);
++ return -ENOSYS;
++ case XEN_SYSCTL_getdomaininfolist:
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.getdomaininfolist.buffer),
++ kern_op.u.getdomaininfolist.max_domains *
++ sizeof(xen_domctl_getdomaininfo_t));
++
++ if (desc == NULL)
++ ret = -ENOMEM;
++
++ set_xen_guest_handle(kern_op.u.getdomaininfolist.buffer,
++ (void *)desc);
++ break;
++ default:
++ printk(KERN_ERR "%s: unknown sysctl cmd %d\n", __func__, kern_op.cmd);
++ return -ENOSYS;
++ }
++
++ if (ret)
++ goto out; /* error mapping the nested pointer */
++
++ ret = plpar_hcall_norets(XEN_MARK(hypercall->op), op_desc);
++
++ if (copy_to_user(user_op, &kern_op, sizeof(xen_sysctl_t)))
++ ret = -EFAULT;
++
++out:
++ xencomm_free(desc);
++ xencomm_free(op_desc);
++ return ret;
++}
++
++static int xenppc_privcmd_platform_op(privcmd_hypercall_t *hypercall)
++{
++ xen_platform_op_t kern_op;
++ xen_platform_op_t __user *user_op =
++ (xen_platform_op_t __user *)hypercall->arg[0];
++ struct xencomm_handle *op_desc;
++ struct xencomm_handle *desc = NULL;
++ int ret = 0;
++
++ if (copy_from_user(&kern_op, user_op, sizeof(xen_platform_op_t)))
++ return -EFAULT;
++
++ if (kern_op.interface_version != XENPF_INTERFACE_VERSION) {
++ printk(KERN_WARNING "%s: %s %x != %x\n", __func__, current->comm,
++ kern_op.interface_version, XENPF_INTERFACE_VERSION);
++ return -EACCES;
++ }
++
++ op_desc = xencomm_map(&kern_op, sizeof(xen_platform_op_t));
++
++ if (op_desc == NULL)
++ return -ENOMEM;
++
++ switch (kern_op.cmd) {
++ case XENPF_settime:
++ case XENPF_add_memtype:
++ case XENPF_del_memtype:
++ case XENPF_read_memtype:
++ case XENPF_microcode_update:
++ case XENPF_platform_quirk:
++ break;
++ default:
++ printk(KERN_ERR "%s: unknown platform_op cmd %d\n", __func__,
++ kern_op.cmd);
++ return -ENOSYS;
++ }
++
++ if (ret)
++ goto out; /* error mapping the nested pointer */
++
++ ret = plpar_hcall_norets(XEN_MARK(hypercall->op), op_desc);
++
++ if (copy_to_user(user_op, &kern_op, sizeof(xen_platform_op_t)))
++ ret = -EFAULT;
++
++out:
++ xencomm_free(desc);
++ xencomm_free(op_desc);
++ return ret;
++}
++
++int HYPERVISOR_memory_op(unsigned int cmd, void *arg)
++{
++ int ret;
++ struct xencomm_handle *op_desc;
++ xen_memory_reservation_t *mop;
++
++
++ mop = (xen_memory_reservation_t *)arg;
++
++ op_desc = xencomm_map(mop, sizeof(xen_memory_reservation_t));
++
++ if (op_desc == NULL)
++ return -ENOMEM;
++
++ switch (cmd) {
++ case XENMEM_increase_reservation:
++ case XENMEM_decrease_reservation:
++ case XENMEM_populate_physmap: {
++ struct xencomm_handle *desc = NULL;
++
++ if (xen_guest_handle(mop->extent_start)) {
++ desc = xencomm_map(
++ xen_guest_handle(mop->extent_start),
++ mop->nr_extents *
++ sizeof(*xen_guest_handle(mop->extent_start)));
++
++ if (desc == NULL) {
++ ret = -ENOMEM;
++ goto out;
++ }
++
++ set_xen_guest_handle(mop->extent_start,
++ (void *)desc);
++ }
++
++ ret = plpar_hcall_norets(XEN_MARK(__HYPERVISOR_memory_op),
++ cmd, op_desc);
++
++ xencomm_free(desc);
++ }
++ break;
++
++ case XENMEM_maximum_ram_page:
++ /* arg is NULL so we can call thru here */
++ ret = plpar_hcall_norets(XEN_MARK(__HYPERVISOR_memory_op),
++ cmd, NULL);
++ break;
++ default:
++ printk(KERN_ERR "%s: unknown memory op %d\n", __func__, cmd);
++ ret = -ENOSYS;
++ }
++
++out:
++ xencomm_free(op_desc);
++ return ret;
++}
++EXPORT_SYMBOL(HYPERVISOR_memory_op);
++
++static int xenppc_privcmd_memory_op(privcmd_hypercall_t *hypercall)
++{
++ xen_memory_reservation_t kern_op;
++ xen_memory_reservation_t __user *user_op;
++ const unsigned long cmd = hypercall->arg[0];
++ int ret = 0;
++
++ user_op = (xen_memory_reservation_t __user *)hypercall->arg[1];
++ if (copy_from_user(&kern_op, user_op,
++ sizeof(xen_memory_reservation_t)))
++ return -EFAULT;
++
++ ret = HYPERVISOR_memory_op(cmd, &kern_op);
++ if (ret >= 0) {
++ if (copy_to_user(user_op, &kern_op,
++ sizeof(xen_memory_reservation_t)))
++ return -EFAULT;
++ }
++ return ret;
++}
++
++static int xenppc_privcmd_version(privcmd_hypercall_t *hypercall)
++{
++ return HYPERVISOR_xen_version(hypercall->arg[0],
++ (void *)hypercall->arg[1]);
++}
++
++static int xenppc_privcmd_event_channel_op(privcmd_hypercall_t *hypercall)
++{
++ struct xencomm_handle *desc;
++ unsigned int argsize;
++ int ret;
++
++ switch (hypercall->arg[0]) {
++ case EVTCHNOP_alloc_unbound:
++ argsize = sizeof(evtchn_alloc_unbound_t);
++ break;
++
++ case EVTCHNOP_status:
++ argsize = sizeof(evtchn_status_t);
++ break;
++
++ default:
++ printk(KERN_ERR "%s: unknown EVTCHNOP (%ld)\n",
++ __func__, hypercall->arg[0]);
++ return -EINVAL;
++ }
++
++ desc = xencomm_map((void *)hypercall->arg[1], argsize);
++
++ if (desc == NULL)
++ return -ENOMEM;
++
++ ret = plpar_hcall_norets(XEN_MARK(hypercall->op), hypercall->arg[0],
++ desc);
++
++ xencomm_free(desc);
++ return ret;
++}
++
++static int xenppc_acmcmd_op(privcmd_hypercall_t *hypercall)
++{
++ xen_acmctl_t kern_op;
++ xen_acmctl_t __user *user_op = (xen_acmctl_t __user *)hypercall->arg[0];
++ void *op_desc;
++ void *desc = NULL, *desc2 = NULL, *desc3 = NULL, *desc4 = NULL;
++ int ret = 0;
++
++ if (copy_from_user(&kern_op, user_op, sizeof(xen_acmctl_t)))
++ return -EFAULT;
++
++ if (kern_op.interface_version != ACM_INTERFACE_VERSION) {
++ printk(KERN_WARNING "%s: %s %x != %x\n", __func__, current->comm,
++ kern_op.interface_version, ACM_INTERFACE_VERSION);
++ return -EACCES;
++ }
++
++ op_desc = xencomm_map(&kern_op, sizeof(xen_acmctl_t));
++ if (op_desc == NULL)
++ return -ENOMEM;
++
++ switch (kern_op.cmd) {
++ case ACMOP_setpolicy:
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.setpolicy.pushcache),
++ kern_op.u.setpolicy.pushcache_size);
++
++ if (desc == NULL)
++ ret = -ENOMEM;
++
++ set_xen_guest_handle(kern_op.u.setpolicy.pushcache,
++ desc);
++ break;
++ case ACMOP_getpolicy:
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.getpolicy.pullcache),
++ kern_op.u.getpolicy.pullcache_size);
++
++ if (desc == NULL)
++ ret = -ENOMEM;
++
++ set_xen_guest_handle(kern_op.u.getpolicy.pullcache,
++ desc);
++ break;
++ case ACMOP_dumpstats:
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.dumpstats.pullcache),
++ kern_op.u.dumpstats.pullcache_size);
++
++ if (desc == NULL)
++ ret = -ENOMEM;
++
++ set_xen_guest_handle(kern_op.u.dumpstats.pullcache,
++ desc);
++ break;
++ case ACMOP_getssid:
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.getssid.ssidbuf),
++ kern_op.u.getssid.ssidbuf_size);
++
++ if (desc == NULL)
++ ret = -ENOMEM;
++
++ set_xen_guest_handle(kern_op.u.getssid.ssidbuf,
++ desc);
++ break;
++ case ACMOP_getdecision:
++ break;
++ case ACMOP_chgpolicy:
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.change_policy.policy_pushcache),
++ kern_op.u.change_policy.policy_pushcache_size);
++ desc2 = xencomm_map(
++ xen_guest_handle(kern_op.u.change_policy.del_array),
++ kern_op.u.change_policy.delarray_size);
++ desc3 = xencomm_map(
++ xen_guest_handle(kern_op.u.change_policy.chg_array),
++ kern_op.u.change_policy.chgarray_size);
++ desc4 = xencomm_map(
++ xen_guest_handle(kern_op.u.change_policy.err_array),
++ kern_op.u.change_policy.errarray_size);
++
++ if (desc == NULL || desc2 == NULL ||
++ desc3 == NULL || desc4 == NULL) {
++ ret = -ENOMEM;
++ goto out;
++ }
++
++ set_xen_guest_handle(kern_op.u.change_policy.policy_pushcache,
++ desc);
++ set_xen_guest_handle(kern_op.u.change_policy.del_array,
++ desc2);
++ set_xen_guest_handle(kern_op.u.change_policy.chg_array,
++ desc3);
++ set_xen_guest_handle(kern_op.u.change_policy.err_array,
++ desc4);
++ break;
++ case ACMOP_relabeldoms:
++ desc = xencomm_map(
++ xen_guest_handle(kern_op.u.relabel_doms.relabel_map),
++ kern_op.u.relabel_doms.relabel_map_size);
++ desc2 = xencomm_map(
++ xen_guest_handle(kern_op.u.relabel_doms.err_array),
++ kern_op.u.relabel_doms.errarray_size);
++
++ if (desc == NULL || desc2 == NULL) {
++ ret = -ENOMEM;
++ goto out;
++ }
++
++ set_xen_guest_handle(kern_op.u.relabel_doms.relabel_map,
++ desc);
++ set_xen_guest_handle(kern_op.u.relabel_doms.err_array,
++ desc2);
++ break;
++ default:
++ printk(KERN_ERR "%s: unknown/unsupported acmctl cmd %d\n",
++ __func__, kern_op.cmd);
++ return -ENOSYS;
++ }
++
++ if (ret)
++ goto out; /* error mapping the nested pointer */
++
++ ret = plpar_hcall_norets(XEN_MARK(hypercall->op),op_desc);
++
++ if (copy_to_user(user_op, &kern_op, sizeof(xen_acmctl_t)))
++ ret = -EFAULT;
++
++out:
++ xencomm_free(desc);
++ xencomm_free(desc2);
++ xencomm_free(desc3);
++ xencomm_free(desc4);
++ xencomm_free(op_desc);
++ return ret;
++}
++
++
++/* The PowerPC hypervisor runs in a separate address space from Linux
++ * kernel/userspace, i.e. real mode. We must therefore translate userspace
++ * pointers to something the hypervisor can make sense of. */
++int privcmd_hypercall(privcmd_hypercall_t *hypercall)
++{
++ switch (hypercall->op) {
++ case __HYPERVISOR_domctl:
++ return xenppc_privcmd_domctl(hypercall);
++ case __HYPERVISOR_sysctl:
++ return xenppc_privcmd_sysctl(hypercall);
++ case __HYPERVISOR_platform_op:
++ return xenppc_privcmd_platform_op(hypercall);
++ case __HYPERVISOR_memory_op:
++ return xenppc_privcmd_memory_op(hypercall);
++ case __HYPERVISOR_xen_version:
++ return xenppc_privcmd_version(hypercall);
++ case __HYPERVISOR_event_channel_op:
++ return xenppc_privcmd_event_channel_op(hypercall);
++ case __HYPERVISOR_acm_op:
++ return xenppc_acmcmd_op(hypercall);
++ default:
++ printk(KERN_ERR "%s: unknown hcall (%ld)\n", __func__, hypercall->op);
++ /* maybe we'll get lucky and the hcall needs no translation. */
++ return plpar_hcall_norets(XEN_MARK(hypercall->op),
++ hypercall->arg[0],
++ hypercall->arg[1],
++ hypercall->arg[2],
++ hypercall->arg[3],
++ hypercall->arg[4]);
++ }
++}
++
++int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args)
++{
++ int argsize;
++ const unsigned long hcall = __HYPERVISOR_vcpu_op;
++ struct xencomm_handle *desc;
++ int rc;
++
++ switch (cmd) {
++ case VCPUOP_initialise:
++ argsize = sizeof(vcpu_guest_context_t);
++ break;
++ case VCPUOP_up:
++ case VCPUOP_down:
++ case VCPUOP_is_up:
++ return plpar_hcall_norets(XEN_MARK(hcall), cmd, vcpuid, 0);
++
++ case VCPUOP_get_runstate_info:
++ argsize = sizeof (vcpu_runstate_info_t);
++ break;
++ default:
++ printk(KERN_ERR "%s: unknown version cmd %d\n", __func__, cmd);
++ return -ENOSYS;
++ }
++
++ desc = xencomm_map_no_alloc(extra_args, argsize);
++
++ if (desc == NULL)
++ return -EINVAL;
++
++ rc = plpar_hcall_norets(XEN_MARK(hcall), cmd, vcpuid, desc);
++
++ xencomm_free(desc);
++
++ return rc;
++}
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/xen/reboot.c linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/reboot.c
+--- linux-2.6.18.8/arch/powerpc/platforms/xen/reboot.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/reboot.c 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,53 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Jimi Xenidis <jimix@watson.ibm.com>
++ */
++
++#include <linux/module.h>
++#include <xen/interface/xen.h>
++#include <xen/interface/io/console.h>
++#include <xen/xencons.h>
++#include <asm/hypervisor.h>
++#include <asm/machdep.h>
++
++static void domain_machine_restart(char * __unused)
++{
++ /* We really want to get pending console data out before we die. */
++ xencons_force_flush();
++ HYPERVISOR_shutdown(SHUTDOWN_reboot);
++}
++
++static void domain_machine_power_off(void)
++{
++ /* We really want to get pending console data out before we die. */
++ xencons_force_flush();
++ HYPERVISOR_shutdown(SHUTDOWN_poweroff);
++}
++
++void xen_reboot_init(struct machdep_calls *md)
++{
++ if (md != NULL) {
++ ppc_md.restart = md->restart;
++ ppc_md.power_off = md->power_off;
++ ppc_md.halt = md->halt;
++ } else {
++ ppc_md.restart = domain_machine_restart;
++ ppc_md.power_off = domain_machine_power_off;
++ ppc_md.halt = domain_machine_power_off;
++ }
++}
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/xen/setup.c linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/setup.c
+--- linux-2.6.18.8/arch/powerpc/platforms/xen/setup.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/setup.c 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,336 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Jimi Xenidis <jimix@watson.ibm.com>
++ */
++
++#define DEBUG
++#define CONFIG_SHARE_MPIC
++
++#include <linux/module.h>
++#include <linux/rwsem.h>
++#include <linux/delay.h>
++#include <linux/console.h>
++#include <xen/interface/xen.h>
++#include <xen/interface/sched.h>
++#include <xen/evtchn.h>
++#include <xen/features.h>
++#include <xen/xencons.h>
++#include <asm/udbg.h>
++#include <asm/pgtable.h>
++#include <asm/prom.h>
++#include <asm/iommu.h>
++#include <asm/mmu.h>
++#include <asm/abs_addr.h>
++#include <asm/machdep.h>
++#include <asm/hypervisor.h>
++#include <asm/time.h>
++#include <asm/pmc.h>
++#include "setup.h"
++
++#ifdef DEBUG
++#define DBG(fmt...) udbg_printf(fmt)
++#else
++#define DBG(fmt...)
++#endif
++
++/* Apperently on other arches this could be used before its defined,
++ * this should not be the case in PPC */
++shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)NULL;
++EXPORT_SYMBOL(HYPERVISOR_shared_info);
++
++/* Raw start-of-day parameters from the hypervisor. */
++static start_info_t xsi;
++start_info_t *xen_start_info;
++EXPORT_SYMBOL(xen_start_info);
++
++extern struct machdep_calls mach_maple_md;
++extern void maple_pci_init(void);
++
++static unsigned long foreign_mfn_flag;
++
++/* Must be called with &vma->vm_mm->mmap_sem locked for write */
++int direct_remap_pfn_range(struct vm_area_struct *vma,
++ unsigned long address,
++ unsigned long mfn,
++ unsigned long size,
++ pgprot_t prot,
++ domid_t domid)
++{
++ int rc;
++
++ /* Set the MFN flag to tell Xen that this is not a PFN. */
++ printk("%s: mapping mfn 0x%lx (size 0x%lx) -> 0x%lx\n", __func__,
++ mfn, size, mfn | foreign_mfn_flag);
++ mfn = mfn | foreign_mfn_flag;
++
++ WARN_ON(!rwsem_is_locked(&vma->vm_mm->mmap_sem));
++ rc = remap_pfn_range(vma, address, mfn, size, prot);
++
++ return rc;
++}
++
++static void __init xen_fw_feature_init(void)
++{
++ DBG(" -> %s\n", __func__);
++
++ powerpc_firmware_features = 0;
++
++ powerpc_firmware_features |= FW_FEATURE_LPAR;
++ powerpc_firmware_features |= FW_FEATURE_TCE | FW_FEATURE_DABR;
++
++ printk(KERN_INFO "firmware_features = 0x%lx\n",
++ powerpc_firmware_features);
++
++ DBG(" <- %s\n", __func__);
++}
++
++/* if these were global then I could get them from the pseries/setup.c */
++static int pseries_set_dabr(unsigned long dabr)
++{
++ return plpar_hcall_norets(H_SET_DABR, dabr);
++}
++
++static int pseries_set_xdabr(unsigned long dabr)
++{
++ /* We want to catch accesses from kernel and userspace */
++ return plpar_hcall_norets(H_SET_XDABR, dabr,
++ H_DABRX_KERNEL | H_DABRX_USER);
++}
++
++/*
++ * Early initialization.
++ */
++static void __init xenppc_init_early(void)
++{
++ struct device_node *xen;
++
++ DBG(" -> %s\n", __func__);
++
++ xen = of_find_node_by_path("/xen");
++
++ xen_start_info = &xsi;
++
++ /* fill out start_info_t from devtree */
++ if ((char *)get_property(xen, "privileged", NULL))
++ xen_start_info->flags |= SIF_PRIVILEGED;
++ if ((char *)get_property(xen, "initdomain", NULL))
++ xen_start_info->flags |= SIF_INITDOMAIN;
++ xen_start_info->shared_info = *((u64 *)get_property(xen,
++ "shared-info", NULL));
++
++ /* only look for store and console for guest domains */
++ if (xen_start_info->flags == 0) {
++ struct device_node *console = of_find_node_by_path("/xen/console");
++ struct device_node *store = of_find_node_by_path("/xen/store");
++
++ xen_start_info->store_mfn = (*((u64 *)get_property(store,
++ "reg", NULL))) >> PAGE_SHIFT;
++ xen_start_info->store_evtchn = *((u32 *)get_property(store,
++ "interrupts", NULL));
++ xen_start_info->console.domU.mfn = (*((u64 *)get_property(console,
++ "reg", NULL))) >> PAGE_SHIFT;
++ xen_start_info->console.domU.evtchn = *((u32 *)get_property(console,
++ "interrupts", NULL));
++ }
++
++ HYPERVISOR_shared_info = __va(xen_start_info->shared_info);
++
++ udbg_init_xen();
++
++ DBG("xen_start_info at %p\n", xen_start_info);
++ DBG(" magic %s\n", xen_start_info->magic);
++ DBG(" flags %x\n", xen_start_info->flags);
++ DBG(" shared_info %lx, %p\n",
++ xen_start_info->shared_info, HYPERVISOR_shared_info);
++ DBG(" store_mfn %llx\n", xen_start_info->store_mfn);
++ DBG(" store_evtchn %x\n", xen_start_info->store_evtchn);
++ DBG(" console_mfn %llx\n", xen_start_info->console.domU.mfn);
++ DBG(" console_evtchn %x\n", xen_start_info->console.domU.evtchn);
++
++ xen_setup_time(&mach_maple_md);
++
++ add_preferred_console("xvc", 0, NULL);
++
++ if (get_property(xen, "power-control", NULL))
++ xen_reboot_init(&mach_maple_md);
++ else
++ xen_reboot_init(NULL);
++
++ if (is_initial_xendomain()) {
++ u64 *mfnflag = (u64 *)get_property(xen, "mfn-flag", NULL);
++ if (mfnflag) {
++ foreign_mfn_flag = (1UL << mfnflag[0]);
++ printk("OF: using 0x%lx as foreign mfn flag\n", foreign_mfn_flag);
++ } else
++ printk("OF: /xen/mfn-base must be present it build guests\n");
++ }
++
++ /* get the domain features */
++ setup_xen_features();
++
++ DBG("Hello World I'm Maple Xen-LPAR!\n");
++
++ if (firmware_has_feature(FW_FEATURE_DABR))
++ ppc_md.set_dabr = pseries_set_dabr;
++ else if (firmware_has_feature(FW_FEATURE_XDABR))
++ ppc_md.set_dabr = pseries_set_xdabr;
++
++ iommu_init_early_pSeries();
++
++ DBG(" <- %s\n", __func__);
++}
++
++/*
++ * this interface is limiting
++ */
++static int running_on_xen;
++int is_running_on_xen(void)
++{
++ return running_on_xen;
++}
++EXPORT_SYMBOL(is_running_on_xen);
++
++static void xenppc_power_save(void)
++{
++ /* SCHEDOP_yield could immediately return. Instead, we
++ * want to idle in the Xen idle domain, so use
++ * SCHEDOP_block with a one-shot timer. */
++ /* XXX do tickless stuff here. See
++ * linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c */
++ u64 now_ns = tb_to_ns(get_tb());
++ u64 offset_ns = jiffies_to_ns(1);
++ int rc;
++
++ rc = HYPERVISOR_set_timer_op(now_ns + offset_ns);
++ BUG_ON(rc != 0);
++
++ HYPERVISOR_sched_op(SCHEDOP_block, NULL);
++}
++
++void __init xenppc_setup_arch(void)
++{
++ /* init to some ~sane value until calibrate_delay() runs */
++ loops_per_jiffy = 50000000;
++
++ /* Lookup PCI hosts */
++ if (is_initial_xendomain())
++ maple_pci_init();
++
++#ifdef CONFIG_DUMMY_CONSOLE
++ conswitchp = &dummy_con;
++#endif
++#ifdef CONFIG_SMP
++ /* let them fly */
++ xen_setup_smp();
++#endif
++
++ printk(KERN_INFO "Using Xen idle loop\n");
++}
++
++static int __init xen_probe_flat_dt(unsigned long node,
++ const char *uname, int depth,
++ void *data)
++{
++ if (depth != 1)
++ return 0;
++ if (strcmp(uname, "xen") != 0)
++ return 0;
++
++ running_on_xen = 1;
++
++ return 1;
++}
++
++/*
++ * Called very early, MMU is off, device-tree isn't unflattened
++ */
++/* forward ref */
++struct machdep_calls __initdata xen_md;
++static int __init xenppc_probe(void)
++{
++ of_scan_flat_dt(xen_probe_flat_dt, NULL);
++
++ if (!running_on_xen)
++ return 0;
++
++ xen_fw_feature_init();
++
++ hpte_init_lpar();
++
++ return 1;
++}
++
++static void __init xenppc_progress(char *s, unsigned short hex)
++{
++ printk("*** %04x : %s\n", hex, s ? s : "");
++}
++
++unsigned int xenppc_get_irq(struct pt_regs *regs)
++{
++ evtchn_do_upcall(regs);
++ /* evtchn_do_upcall() handles all pending event channels directly, so there
++ * is nothing for do_IRQ() to do.
++ * XXX This means we aren't using IRQ stacks. */
++ return NO_IRQ;
++}
++
++static void xenppc_enable_pmcs(void)
++{
++ unsigned long set, reset;
++
++ power4_enable_pmcs();
++
++ set = 1UL << 63;
++ reset = 0;
++ plpar_hcall_norets(H_PERFMON, set, reset);
++}
++
++#ifdef CONFIG_KEXEC
++void xen_machine_kexec(struct kimage *image)
++{
++ panic("%s(%p): called\n", __func__, image);
++}
++
++int xen_machine_kexec_prepare(struct kimage *image)
++{
++ panic("%s(%p): called\n", __func__, image);
++}
++
++void xen_machine_crash_shutdown(struct pt_regs *regs)
++{
++ panic("%s(%p): called\n", __func__, regs);
++}
++#endif
++
++define_machine(xen) {
++ .name = "Xen-Maple",
++ .probe = xenppc_probe,
++ .setup_arch = xenppc_setup_arch,
++ .init_early = xenppc_init_early,
++ .init_IRQ = xen_init_IRQ,
++ .get_irq = xenppc_get_irq,
++ .calibrate_decr = generic_calibrate_decr,
++ .progress = xenppc_progress,
++ .power_save = xenppc_power_save,
++ .enable_pmcs = xenppc_enable_pmcs,
++#ifdef CONFIG_KEXEC
++ .machine_kexec = xen_machine_kexec,
++ .machine_kexec_prepare = xen_machine_kexec_prepare,
++ .machine_crash_shutdown = xen_machine_crash_shutdown,
++#endif
++};
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/xen/setup.h linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/setup.h
+--- linux-2.6.18.8/arch/powerpc/platforms/xen/setup.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/setup.h 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,47 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Jimi Xenidis <jimix@watson.ibm.com>
++ */
++
++#include <asm/machdep.h>
++#include <asm/time.h>
++
++extern void evtchn_init_IRQ(void);
++extern void xen_init_IRQ(void);
++extern void xen_reboot_init(struct machdep_calls *);
++extern void xen_maple_init_IRQ(void);
++extern unsigned int xen_get_irq(struct pt_regs *regs);
++
++static inline u64 tb_to_ns(u64 tb)
++{
++ if (likely(tb_ticks_per_sec)) {
++ return tb * (1000000000UL / tb_ticks_per_sec);
++ }
++ return 0;
++}
++
++static inline u64 jiffies_to_ns(unsigned long j)
++{
++ return j * (1000000000UL / HZ);
++}
++
++extern struct page *alloc_foreign_page(void);
++extern void free_foreign_page(struct page *page);
++
++extern void __init xen_setup_time(struct machdep_calls *host_md);
++extern void xen_setup_smp(void);
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/xen/smp.c linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/smp.c
+--- linux-2.6.18.8/arch/powerpc/platforms/xen/smp.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/smp.c 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,444 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Jimi Xenidis <jimix@watson.ibm.com>
++ */
++
++#include <linux/kernel.h>
++#include <linux/config.h>
++#include <linux/bootmem.h>
++#include <linux/irq.h>
++#include <linux/smp.h>
++#include <xen/interface/xen.h>
++#include <xen/interface/vcpu.h>
++#include <xen/evtchn.h>
++#include <asm/prom.h>
++#include <asm/udbg.h>
++#include <asm/hypervisor.h>
++#include "setup.h"
++
++#undef DEBUG
++
++#ifdef DEBUG
++#define DBG(fmt...) printk(KERN_EMERG fmt)
++#else
++#define DBG(fmt...)
++#endif
++
++static inline void *xen_of_alloc(ulong size)
++{
++ if (mem_init_done)
++ return kmalloc(size, GFP_KERNEL);
++ return alloc_bootmem(size);
++}
++static inline void xen_of_free(void *ptr)
++{
++ /* if this happens with the boot allocator then we are screwed */
++ BUG_ON(!mem_init_done);
++ kfree(ptr);
++}
++
++static struct property *dup_prop(struct property *op)
++{
++ struct property *np;
++ void *p;
++ ulong sz;
++
++
++ /* allocate everything in one go in case it fails */
++ sz = sizeof (*np); /* prop node */
++ sz += strlen(op->name) + 1; /* prop name */
++ sz += op->length; /* prop value */
++
++ p = xen_of_alloc(sz);
++ if (!p)
++ return NULL;
++ memset(p, 0, sz);
++
++ /* prop node first */
++ np = p;
++ p += sizeof (*np);
++
++ /* value next becuase we want it aligned */
++ np->value = p;
++ p += op->length;
++
++ /* name */
++ np->name = p;
++
++ /* copy it all */
++ strcpy(np->name, op->name);
++ np->length = op->length;
++ memcpy(np->value, op->value, np->length);
++
++ return np;
++}
++
++static int dup_properties(struct device_node *dst, struct device_node *src)
++{
++ struct property *op;
++ struct property *np;
++ struct property *lp;
++ int rc = 0;
++
++ DBG("%s: duping to new cpu node: %s\n", __func__, dst->full_name);
++
++ np = lp = NULL;
++ for (op = src->properties; op != 0; op = op->next) {
++ lp = np;
++ np = dup_prop(op);
++ if (!np)
++ break;
++
++ prom_add_property(dst, np);
++ }
++
++ if (!np) {
++ DBG("%s: FAILED duping: %s\n", __func__, dst->full_name);
++ /* we could not allocate enuff so free what we have
++ * allocated */
++ rc = -ENOMEM;
++ for (op = dst->properties; lp && op != lp; op = op->next)
++ xen_of_free(op);
++ }
++
++ return rc;
++}
++
++/* returns added device node so it can be added to procfs in the case
++ * of hotpluging */
++static struct device_node *xen_add_vcpu_node(struct device_node *boot_cpu,
++ uint cpu)
++{
++ struct device_node *new_cpu;
++ struct property *pp;
++ void *p;
++ int sz;
++ int type_sz;
++ int name_sz;
++
++ DBG("%s: boot cpu: %s\n", __func__, boot_cpu->full_name);
++
++ /* allocate in one shot in case we fail */
++ name_sz = strlen(boot_cpu->name) + 1;
++ type_sz = strlen(boot_cpu->type) + 1;
++
++ sz = sizeof (*new_cpu); /* the node */
++ sz += strlen(boot_cpu->full_name) + 3; /* full_name */
++ sz += name_sz; /* name */
++ sz += type_sz; /* type */
++
++ p = xen_of_alloc(sz);
++ if (!p)
++ return NULL;
++ memset(p, 0, sz);
++
++ /* the node */
++ new_cpu = p;
++ p += sizeof (*new_cpu);
++
++ /* name */
++ new_cpu->name = p;
++ strcpy(new_cpu->name, boot_cpu->name);
++ p += name_sz;
++
++ /* type */
++ new_cpu->type = p;
++ strcpy(new_cpu->type, boot_cpu->type);
++ p += type_sz;
++
++ /* full_name */
++ new_cpu->full_name = p;
++
++ /* assemble new full_name */
++ pp = of_find_property(boot_cpu, "name", NULL);
++ if (!pp)
++ panic("%s: no name prop\n", __func__);
++
++ DBG("%s: name is: %s = %s\n", __func__, pp->name, pp->value);
++ sprintf(new_cpu->full_name, "/cpus/%s@%u", pp->value, cpu);
++
++ if (dup_properties(new_cpu, boot_cpu)) {
++ xen_of_free(new_cpu);
++ return NULL;
++ }
++
++ /* fixup reg property */
++ DBG("%s: updating reg: %d\n", __func__, cpu);
++ pp = of_find_property(new_cpu, "reg", NULL);
++ if (!pp)
++ panic("%s: no reg prop\n", __func__);
++ *(int *)pp->value = cpu;
++
++ if (mem_init_done)
++ OF_MARK_DYNAMIC(new_cpu);
++
++ kref_init(&new_cpu->kref);
++
++ /* insert the node */
++ new_cpu->parent = of_get_parent(boot_cpu);
++ of_attach_node(new_cpu);
++ of_node_put(new_cpu->parent);
++
++ return new_cpu;
++}
++
++static void cpu_initialize_context(unsigned int vcpu, ulong entry)
++{
++ vcpu_guest_context_t ctxt;
++
++ memset(&ctxt.user_regs, 0x55, sizeof(ctxt.user_regs));
++
++ ctxt.user_regs.pc = entry;
++ ctxt.user_regs.msr = 0;
++ ctxt.user_regs.gprs[1] = 0; /* Linux uses its own stack */
++ ctxt.user_regs.gprs[3] = vcpu;
++
++ /* XXX verify this *** */
++ /* There is a buggy kernel that does not zero the "local_paca", so
++ * we must make sure this register is 0 */
++ ctxt.user_regs.gprs[13] = 0;
++
++ DBG("%s: initializing vcpu: %d\n", __func__, vcpu);
++
++ if (HYPERVISOR_vcpu_op(VCPUOP_initialise, vcpu, &ctxt))
++ panic("%s: VCPUOP_initialise failed, vcpu: %d\n",
++ __func__, vcpu);
++
++}
++
++static int xen_start_vcpu(uint vcpu, ulong entry)
++{
++ DBG("%s: starting vcpu: %d\n", __func__, vcpu);
++
++ cpu_initialize_context(vcpu, entry);
++
++ DBG("%s: Spinning up vcpu: %d\n", __func__, vcpu);
++ return HYPERVISOR_vcpu_op(VCPUOP_up, vcpu, NULL);
++}
++
++extern void __secondary_hold(void);
++extern unsigned long __secondary_hold_spinloop;
++extern unsigned long __secondary_hold_acknowledge;
++
++static void xen_boot_secondary_vcpus(void)
++{
++ int vcpu;
++ int rc;
++ const unsigned long mark = (unsigned long)-1;
++ unsigned long *spinloop = &__secondary_hold_spinloop;
++ unsigned long *acknowledge = &__secondary_hold_acknowledge;
++#ifdef CONFIG_PPC64
++ /* __secondary_hold is actually a descriptor, not the text address */
++ unsigned long secondary_hold = __pa(*(unsigned long *)__secondary_hold);
++#else
++ unsigned long secondary_hold = __pa(__secondary_hold);
++#endif
++ struct device_node *boot_cpu;
++
++ DBG("%s: finding CPU node\n", __func__);
++ boot_cpu = of_find_node_by_type(NULL, "cpu");
++ if (!boot_cpu)
++ panic("%s: Cannot find Booting CPU node\n", __func__);
++
++ /* Set the common spinloop variable, so all of the secondary cpus
++ * will block when they are awakened from their OF spinloop.
++ * This must occur for both SMP and non SMP kernels, since OF will
++ * be trashed when we move the kernel.
++ */
++ *spinloop = 0;
++
++ DBG("%s: Searching for all vcpu numbers > 0\n", __func__);
++ /* try and start as many as we can */
++ for (vcpu = 1; vcpu < NR_CPUS; vcpu++) {
++ int i;
++
++ rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, vcpu, NULL);
++ if (rc < 0)
++ continue;
++
++ DBG("%s: Found vcpu: %d\n", __func__, vcpu);
++ /* Init the acknowledge var which will be reset by
++ * the secondary cpu when it awakens from its OF
++ * spinloop.
++ */
++ *acknowledge = mark;
++
++ DBG("%s: Starting vcpu: %d at pc: 0x%lx\n", __func__,
++ vcpu, secondary_hold);
++ rc = xen_start_vcpu(vcpu, secondary_hold);
++ if (rc)
++ panic("%s: xen_start_vpcu() failed\n", __func__);
++
++
++ DBG("%s: Waiting for ACK on vcpu: %d\n", __func__, vcpu);
++ for (i = 0; (i < 100000000) && (*acknowledge == mark); i++)
++ mb();
++
++ if (*acknowledge == vcpu)
++ DBG("%s: Recieved for ACK on vcpu: %d\n",
++ __func__, vcpu);
++
++ xen_add_vcpu_node(boot_cpu, vcpu);
++
++ cpu_set(vcpu, cpu_present_map);
++ set_hard_smp_processor_id(vcpu, vcpu);
++ }
++ of_node_put(boot_cpu);
++ DBG("%s: end...\n", __func__);
++}
++
++static int __init smp_xen_probe(void)
++{
++ return cpus_weight(cpu_present_map);
++}
++
++static irqreturn_t xen_ppc_msg_reschedule(int irq, void *dev_id,
++ struct pt_regs *regs)
++{
++ smp_message_recv(PPC_MSG_RESCHEDULE, regs);
++ return IRQ_HANDLED;
++}
++
++static irqreturn_t xen_ppc_msg_call_function(int irq, void *dev_id,
++ struct pt_regs *regs)
++{
++ smp_message_recv(PPC_MSG_CALL_FUNCTION, regs);
++ return IRQ_HANDLED;
++}
++
++static irqreturn_t xen_ppc_msg_debugger_break(int irq, void *dev_id,
++ struct pt_regs *regs)
++{
++ smp_message_recv(PPC_MSG_DEBUGGER_BREAK, regs);
++ return IRQ_HANDLED;
++}
++
++struct message {
++ irqreturn_t (*f)(int, void *, struct pt_regs *);
++ int num;
++ char *name;
++};
++static struct message ipi_msgs[] = {
++ {
++ .num = PPC_MSG_RESCHEDULE,
++ .f = xen_ppc_msg_reschedule,
++ .name = "IPI-resched"
++ },
++ {
++ .num = PPC_MSG_CALL_FUNCTION,
++ .f = xen_ppc_msg_call_function,
++ .name = "IPI-function"
++ },
++ {
++ .num = PPC_MSG_DEBUGGER_BREAK,
++ .f = xen_ppc_msg_debugger_break,
++ .name = "IPI-debug"
++ }
++};
++
++DECLARE_PER_CPU(int, ipi_to_irq[NR_IPIS]);
++
++static void __devinit smp_xen_setup_cpu(int cpu)
++{
++ int irq;
++ int i;
++ const int nr_ipis = ARRAY_SIZE(__get_cpu_var(ipi_to_irq));
++
++ /* big scary include web could mess with our values, so we
++ * make sure they are sane */
++ BUG_ON(ARRAY_SIZE(ipi_msgs) > nr_ipis);
++
++ for (i = 0; i < ARRAY_SIZE(ipi_msgs); i++) {
++ BUG_ON(ipi_msgs[i].num >= nr_ipis);
++
++ irq = bind_ipi_to_irqhandler(ipi_msgs[i].num,
++ cpu,
++ ipi_msgs[i].f,
++ SA_INTERRUPT,
++ ipi_msgs[i].name,
++ NULL);
++ BUG_ON(irq < 0);
++ per_cpu(ipi_to_irq, cpu)[ipi_msgs[i].num] = irq;
++ DBG("%s: cpu: %d vector :%d irq: %d\n",
++ __func__, cpu, ipi_msgs[i].num, irq);
++ }
++}
++
++static inline void send_IPI_one(unsigned int cpu, int vector)
++{
++ int irq;
++
++ irq = per_cpu(ipi_to_irq, cpu)[vector];
++ BUG_ON(irq < 0);
++
++ DBG("%s: cpu: %d vector :%d irq: %d!\n",
++ __func__, cpu, vector, irq);
++ DBG("%s: per_cpu[%p]: %d %d %d %d\n",
++ __func__, per_cpu(ipi_to_irq, cpu),
++ per_cpu(ipi_to_irq, cpu)[0],
++ per_cpu(ipi_to_irq, cpu)[1],
++ per_cpu(ipi_to_irq, cpu)[2],
++ per_cpu(ipi_to_irq, cpu)[3]);
++
++ notify_remote_via_irq(irq);
++}
++
++static void smp_xen_message_pass(int target, int msg)
++{
++ int cpu;
++
++ switch (msg) {
++ case PPC_MSG_RESCHEDULE:
++ case PPC_MSG_CALL_FUNCTION:
++ case PPC_MSG_DEBUGGER_BREAK:
++ break;
++ default:
++ panic("SMP %d: smp_message_pass: unknown msg %d\n",
++ smp_processor_id(), msg);
++ return;
++ }
++ switch (target) {
++ case MSG_ALL:
++ case MSG_ALL_BUT_SELF:
++ for_each_online_cpu(cpu) {
++ if (target == MSG_ALL_BUT_SELF &&
++ cpu == smp_processor_id())
++ continue;
++ send_IPI_one(cpu, msg);
++ }
++ break;
++ default:
++ send_IPI_one(target, msg);
++ break;
++ }
++}
++
++static struct smp_ops_t xen_smp_ops = {
++ .probe = smp_xen_probe,
++ .message_pass = smp_xen_message_pass,
++ .kick_cpu = smp_generic_kick_cpu,
++ .setup_cpu = smp_xen_setup_cpu,
++};
++
++void xen_setup_smp(void)
++{
++ smp_ops = &xen_smp_ops;
++
++ xen_boot_secondary_vcpus();
++ smp_release_cpus();
++}
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/xen/time.c linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/time.c
+--- linux-2.6.18.8/arch/powerpc/platforms/xen/time.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/time.c 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,114 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Jimi Xenidis <jimix@watson.ibm.com>
++ */
++
++#include <linux/module.h>
++#include <linux/time.h>
++#include <linux/rtc.h>
++#include <asm/hypervisor.h>
++#include <asm/machdep.h>
++#include <asm/time.h>
++#include <asm/udbg.h>
++
++#ifdef DEBUG
++#define DBG(fmt...) printk(fmt)
++#else
++#define DBG(fmt...)
++#endif
++
++void time_resume(void)
++{
++ snapshot_timebase();
++}
++
++static inline ulong time_from_shared(void)
++{
++ ulong t;
++
++ DBG("tb_freq: %ld\n", ppc_tb_freq);
++
++ t = mftb() - HYPERVISOR_shared_info->arch.boot_timebase;
++ t /= ppc_tb_freq;
++ t += HYPERVISOR_shared_info->wc_sec;
++
++ return t;
++}
++
++static void (*host_md_get_rtc_time)(struct rtc_time *tm);
++static void xen_get_rtc_time(struct rtc_time *tm)
++{
++ if (is_initial_xendomain()) {
++ host_md_get_rtc_time(tm);
++ return;
++ } else {
++ ulong t;
++
++ t = time_from_shared();
++ to_tm(t, tm);
++ }
++}
++
++static int (*host_md_set_rtc_time)(struct rtc_time *tm);
++static int xen_set_rtc_time(struct rtc_time *tm)
++{
++ ulong sec;
++
++ if (is_initial_xendomain()) {
++ host_md_set_rtc_time(tm);
++ return 0;
++ }
++
++ sec = mktime(tm->tm_year, tm->tm_mon, tm->tm_mday,
++ tm->tm_hour, tm->tm_min, tm->tm_sec);
++
++ HYPERVISOR_shared_info->wc_sec = sec;
++ HYPERVISOR_shared_info->arch.boot_timebase = mftb();
++
++ return 0;
++}
++
++static unsigned long (*host_md_get_boot_time)(void);
++static unsigned long __init xen_get_boot_time(void)
++{
++ ulong t;
++
++ if (is_initial_xendomain()) {
++ t = host_md_get_boot_time();
++
++ HYPERVISOR_shared_info->wc_sec = t;
++ HYPERVISOR_shared_info->arch.boot_timebase = mftb();
++ DBG("%s: time: %ld\n", __func__, t);
++ } else {
++ t = time_from_shared();
++ DBG("%s: %ld\n", __func__, t);
++ }
++ return t;
++}
++
++void __init xen_setup_time(struct machdep_calls *host_md)
++{
++ ppc_md.get_boot_time = xen_get_boot_time;
++ host_md_get_boot_time = host_md->get_boot_time;
++
++ ppc_md.set_rtc_time = xen_set_rtc_time;
++ host_md_set_rtc_time = host_md->set_rtc_time;
++
++ ppc_md.get_rtc_time = xen_get_rtc_time;
++ host_md_get_rtc_time = host_md->get_rtc_time;
++}
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/xen/udbg_xen.c linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/udbg_xen.c
+--- linux-2.6.18.8/arch/powerpc/platforms/xen/udbg_xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/udbg_xen.c 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,164 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Jimi Xenidis <jimix@watson.ibm.com>
++ */
++
++#include <linux/module.h>
++#include <xen/interface/xen.h>
++#include <xen/interface/io/console.h>
++#include <xen/evtchn.h>
++#include <asm/udbg.h>
++#include <asm/hypervisor.h>
++#include "setup.h"
++
++static void udbg_xen_wait(void)
++{
++ evtchn_port_t port = 0;
++
++ if (xen_start_info) {
++ port = xen_start_info->console.domU.evtchn;
++ clear_evtchn(port);
++ }
++ HYPERVISOR_poll(&port, 1, 10);
++}
++
++static int udbg_getc_xen(void)
++{
++ int ch;
++ for (;;) {
++ ch = udbg_getc_poll();
++ if (ch == -1) {
++ udbg_xen_wait();
++ } else {
++ return ch;
++ }
++ }
++}
++
++static void udbg_putc_dom0_xen(char c)
++{
++ unsigned long rc;
++
++ if (c == '\n')
++ udbg_putc_dom0_xen('\r');
++
++ do {
++ rc = HYPERVISOR_console_io(CONSOLEIO_write, 1, &c);
++ } while (rc < 0);
++}
++
++/* Buffered chars getc */
++static long inbuflen;
++static char inbuf[128]; /* Xen serial ring buffer */
++
++static int udbg_getc_poll_dom0_xen(void)
++{
++ /* The interface is tricky because it may return many chars.
++ * We save them statically for future calls to udbg_getc().
++ */
++ char ch, *buf = (char *)inbuf;
++ int i;
++
++ if (inbuflen == 0) {
++ /* get some more chars. */
++ inbuflen = HYPERVISOR_console_io(CONSOLEIO_read,
++ sizeof(inbuf), buf);
++ }
++
++ if (inbuflen == 0)
++ return -1;
++
++ ch = buf[0];
++ for (i = 1; i < inbuflen; i++) /* shuffle them down. */
++ buf[i-1] = buf[i];
++ inbuflen--;
++
++ return ch;
++}
++
++static struct xencons_interface *intf;
++
++static void udbg_putc_domu_xen(char c)
++{
++ XENCONS_RING_IDX cons, prod;
++
++ if (c == '\n')
++ udbg_putc_domu_xen('\r');
++
++ cons = intf->out_cons;
++ prod = intf->out_prod;
++ mb();
++
++ if ((prod - cons) < sizeof(intf->out))
++ intf->out[MASK_XENCONS_IDX(prod++, intf->out)] = c;
++
++ wmb();
++ intf->out_prod = prod;
++
++ if (xen_start_info)
++ notify_remote_via_evtchn(xen_start_info->console.domU.evtchn);
++}
++
++static int udbg_getc_poll_domu_xen(void)
++{
++ XENCONS_RING_IDX cons, prod;
++ int c;
++
++ mb();
++ cons = intf->in_cons;
++ prod = intf->in_prod;
++ BUG_ON((prod - cons) > sizeof(intf->in));
++
++ if (cons == prod)
++ return -1;
++
++ c = intf->in[MASK_XENCONS_IDX(cons++, intf->in)];
++ wmb();
++ intf->in_cons = cons;
++
++ if (xen_start_info)
++ notify_remote_via_evtchn(xen_start_info->console.domU.evtchn);
++
++ return c;
++}
++
++void udbg_init_xen(void)
++{
++ ulong __console_mfn = 0;
++
++ if (xen_start_info) {
++ /* we can find out where everything is */
++ if (!(xen_start_info->flags & SIF_INITDOMAIN))
++ __console_mfn = xen_start_info->console.domU.mfn;
++ } else {
++ /* VERY early printf */
++#ifdef CONFIG_PPC_EARLY_DEBUG_XEN_DOMU
++ __console_mfn = 0x3ffdUL;
++#endif
++ }
++
++ udbg_getc = udbg_getc_xen;
++ if (__console_mfn == 0) {
++ udbg_putc = udbg_putc_dom0_xen;
++ udbg_getc_poll = udbg_getc_poll_dom0_xen;
++ } else {
++ udbg_putc = udbg_putc_domu_xen;
++ udbg_getc_poll = udbg_getc_poll_domu_xen;
++ intf = (struct xencons_interface *)mfn_to_virt(__console_mfn);
++ }
++}
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/xen/util.c linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/util.c
+--- linux-2.6.18.8/arch/powerpc/platforms/xen/util.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/util.c 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,70 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Jimi Xenidis <jimix@watson.ibm.com>
++ */
++
++#include <linux/config.h>
++#include <linux/mm.h>
++#include <linux/module.h>
++#include <linux/slab.h>
++#include <linux/vmalloc.h>
++#include <asm/uaccess.h>
++#include <xen/driver_util.h>
++#include "setup.h"
++
++struct vm_struct *alloc_vm_area(unsigned long size)
++{
++ struct vm_struct *area;
++ struct page *page;
++
++ page = alloc_foreign_page();
++ if (page == NULL) {
++ BUG();
++ return NULL;
++ }
++
++ area = kmalloc(sizeof(*area), GFP_KERNEL);
++ if (area != NULL) {
++ area->flags = VM_MAP;//XXX
++ area->addr = pfn_to_kaddr(page_to_pfn(page));
++ area->size = size;
++ area->pages = NULL; //XXX
++ area->nr_pages = size >> PAGE_SHIFT;
++ area->phys_addr = 0;
++ }
++ return area;
++}
++EXPORT_SYMBOL_GPL(alloc_vm_area);
++
++void free_vm_area(struct vm_struct *area)
++{
++ free_foreign_page(virt_to_page(area->addr));
++ kfree(area);
++}
++EXPORT_SYMBOL_GPL(free_vm_area);
++
++void lock_vm_area(struct vm_struct *area)
++{
++ preempt_disable();
++}
++
++void unlock_vm_area(struct vm_struct *area)
++{
++ preempt_enable();
++}
++EXPORT_SYMBOL_GPL(unlock_vm_area);
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/xen/xen_guest.S linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/xen_guest.S
+--- linux-2.6.18.8/arch/powerpc/platforms/xen/xen_guest.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/xen_guest.S 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,27 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Jimi Xenidis <jimix@watson.ibm.com>
++ */
++
++ .section __xen_guest
++ .ascii "GUEST_OS=linux"
++ .ascii ",GUEST_VER=xen-3.0"
++ .ascii ",XEN_VER=xen-3.0"
++ .ascii ",VIRT_BASE=0xC000000000000000"
++ .ascii ",LOADER=generic"
++ .byte 0
+diff -rpuN linux-2.6.18.8/arch/powerpc/platforms/xen/xencomm.c linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/xencomm.c
+--- linux-2.6.18.8/arch/powerpc/platforms/xen/xencomm.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/platforms/xen/xencomm.c 2008-02-15 16:21:53.000000000 -0800
+@@ -0,0 +1,54 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Hollis Blanchard <hollisb@us.ibm.com>
++ */
++
++#include <linux/types.h>
++#include <linux/sched.h>
++#include <linux/mm.h>
++#include <asm/page.h>
++#include <asm/current.h>
++#include <xen/interface/arch-powerpc.h>
++#include <xen/xencomm.h>
++
++/* translate virtual address to physical address */
++unsigned long xencomm_vtop(unsigned long vaddr)
++{
++ struct page *page;
++ struct vm_area_struct *vma;
++
++ /* NULL is NULL */
++ if (vaddr == 0)
++ return 0;
++
++ if (is_kernel_addr(vaddr))
++ return __pa(vaddr);
++
++ /* XXX double-check (lack of) locking */
++ vma = find_extend_vma(current->mm, vaddr);
++ BUG_ON(!vma);
++ if (!vma)
++ return ~0UL;
++
++ page = follow_page(vma, vaddr, 0);
++ BUG_ON(!page);
++ if (!page)
++ return ~0UL;
++
++ return (page_to_pfn(page) << PAGE_SHIFT) | (vaddr & ~PAGE_MASK);
++}
+diff -rpuN linux-2.6.18.8/arch/powerpc/sysdev/mpic.c linux-2.6.18-xen-3.2.0/arch/powerpc/sysdev/mpic.c
+--- linux-2.6.18.8/arch/powerpc/sysdev/mpic.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/sysdev/mpic.c 2008-02-15 16:21:53.000000000 -0800
+@@ -765,6 +765,9 @@ static int mpic_host_map(struct irq_host
+ else if (hw >= MPIC_VEC_IPI_0) {
+ WARN_ON(!(mpic->flags & MPIC_PRIMARY));
+
++ if (mpic->flags & MPIC_SKIP_IPI_INIT)
++ return 0;
++
+ DBG("mpic: mapping as IPI\n");
+ set_irq_chip_data(virq, mpic);
+ set_irq_chip_and_handler(virq, &mpic->hc_ipi,
+@@ -1019,6 +1022,9 @@ void __init mpic_init(struct mpic *mpic)
+ (MPIC_VEC_TIMER_0 + i));
+ }
+
++ if (mpic->flags & MPIC_SKIP_IPI_INIT)
++ goto ipi_bailout;
++
+ /* Initialize IPIs to our reserved vectors and mark them disabled for now */
+ mpic_test_broken_ipi(mpic);
+ for (i = 0; i < 4; i++) {
+@@ -1028,6 +1034,7 @@ void __init mpic_init(struct mpic *mpic)
+ (MPIC_VEC_IPI_0 + i));
+ }
+
++ipi_bailout:
+ /* Initialize interrupt sources */
+ if (mpic->irq_count == 0)
+ mpic->irq_count = mpic->num_sources;
+diff -rpuN linux-2.6.18.8/arch/powerpc/xmon/xmon.c linux-2.6.18-xen-3.2.0/arch/powerpc/xmon/xmon.c
+--- linux-2.6.18.8/arch/powerpc/xmon/xmon.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/powerpc/xmon/xmon.c 2008-02-15 16:21:53.000000000 -0800
+@@ -752,6 +752,9 @@ cmds(struct pt_regs *excp)
+ cmd = inchar();
+ }
+ switch (cmd) {
++ case 'A':
++ asm volatile(".long 0x200;nop");
++ break;
+ case 'm':
+ cmd = inchar();
+ switch (cmd) {
+diff -rpuN linux-2.6.18.8/arch/x86_64/Kconfig linux-2.6.18-xen-3.2.0/arch/x86_64/Kconfig
+--- linux-2.6.18.8/arch/x86_64/Kconfig 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/Kconfig 2008-02-15 16:21:55.000000000 -0800
+@@ -135,6 +135,23 @@ config GENERIC_CPU
endchoice
+config X86_64_XEN
+ bool "Enable Xen compatible kernel"
++ select XEN
+ select SWIOTLB
+ help
+ This option will compile a kernel compatible with Xen hypervisor
@@ -31470,7 +39304,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
#
# Define implied options from the CPU selection here
#
-@@ -155,6 +171,7 @@ config X86_INTERNODE_CACHE_BYTES
+@@ -155,6 +172,7 @@ config X86_INTERNODE_CACHE_BYTES
config X86_TSC
bool
@@ -31478,7 +39312,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
default y
config X86_GOOD_APIC
-@@ -197,7 +214,7 @@ config X86_CPUID
+@@ -197,7 +215,7 @@ config X86_CPUID
config X86_HT
bool
@@ -31487,18 +39321,18 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
default y
config MATH_EMULATION
-@@ -211,14 +228,22 @@ config EISA
+@@ -211,14 +229,22 @@ config EISA
config X86_IO_APIC
bool
+ depends !XEN_UNPRIVILEGED_GUEST
- default y
-
++ default y
++
+config X86_XEN_GENAPIC
+ bool
-+ depends X86_64_XEN
-+ default XEN_PRIVILEGED_GUEST || SMP
-+
++ depends on X86_64_XEN
+ default y
+
config X86_LOCAL_APIC
bool
+ depends !XEN_UNPRIVILEGED_GUEST
@@ -31510,7 +39344,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
---help---
On Intel P6 family processors (Pentium Pro, Pentium II and later)
the Memory Type Range Registers (MTRRs) may be used to control
-@@ -259,7 +284,7 @@ config SMP
+@@ -259,7 +285,7 @@ config SMP
config SCHED_SMT
bool "SMT (Hyperthreading) scheduler support"
@@ -31519,7 +39353,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
default n
help
SMT scheduler support improves the CPU scheduler's decision making
-@@ -269,7 +294,7 @@ config SCHED_SMT
+@@ -269,7 +295,7 @@ config SCHED_SMT
config SCHED_MC
bool "Multi-core scheduler support"
@@ -31528,7 +39362,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
default y
help
Multi-core scheduler support improves the CPU scheduler's decision
-@@ -280,7 +305,7 @@ source "kernel/Kconfig.preempt"
+@@ -280,7 +306,7 @@ source "kernel/Kconfig.preempt"
config NUMA
bool "Non Uniform Memory Access (NUMA) Support"
@@ -31537,7 +39371,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
help
Enable NUMA (Non Uniform Memory Access) support. The kernel
will try to allocate memory used by a CPU on the local memory
-@@ -341,7 +366,7 @@ config ARCH_DISCONTIGMEM_DEFAULT
+@@ -341,7 +367,7 @@ config ARCH_DISCONTIGMEM_DEFAULT
config ARCH_SPARSEMEM_ENABLE
def_bool y
@@ -31546,7 +39380,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
config ARCH_MEMORY_PROBE
def_bool y
-@@ -365,6 +390,7 @@ config NR_CPUS
+@@ -365,6 +391,7 @@ config NR_CPUS
int "Maximum number of CPUs (2-256)"
range 2 255
depends on SMP
@@ -31554,7 +39388,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
default "8"
help
This allows you to specify the maximum number of CPUs which this
-@@ -387,6 +413,7 @@ config ARCH_ENABLE_MEMORY_HOTPLUG
+@@ -387,6 +414,7 @@ config ARCH_ENABLE_MEMORY_HOTPLUG
config HPET_TIMER
bool
@@ -31562,7 +39396,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
default y
help
Use the IA-PC HPET (High Precision Event Timer) to manage
-@@ -407,7 +434,7 @@ config IOMMU
+@@ -407,7 +435,7 @@ config IOMMU
default y
select SWIOTLB
select AGP
@@ -31571,7 +39405,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
help
Support for full DMA access of devices with 32bit memory access only
on systems with more than 3GB. This is usually needed for USB,
-@@ -423,7 +450,7 @@ config CALGARY_IOMMU
+@@ -423,7 +451,7 @@ config CALGARY_IOMMU
bool "IBM Calgary IOMMU support"
default y
select SWIOTLB
@@ -31580,7 +39414,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
help
Support for hardware IOMMUs in IBM's xSeries x366 and x460
systems. Needed to run systems with more than 3GB of memory
-@@ -444,6 +471,7 @@ config SWIOTLB
+@@ -444,6 +472,7 @@ config SWIOTLB
config X86_MCE
bool "Machine check support" if EMBEDDED
@@ -31588,7 +39422,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
default y
help
Include a machine check error handler to report hardware errors.
-@@ -469,7 +497,7 @@ config X86_MCE_AMD
+@@ -469,7 +498,7 @@ config X86_MCE_AMD
config KEXEC
bool "kexec system call (EXPERIMENTAL)"
@@ -31597,19 +39431,18 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
help
kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel. It is like a reboot
-@@ -564,8 +592,11 @@ config GENERIC_PENDING_IRQ
+@@ -564,8 +593,9 @@ config GENERIC_PENDING_IRQ
default y
menu "Power management options"
+ depends on !XEN_UNPRIVILEGED_GUEST
-+if !X86_64_XEN
- source kernel/power/Kconfig
-+endif
+-source kernel/power/Kconfig
++source "kernel/power/Kconfig"
source "drivers/acpi/Kconfig"
-@@ -588,6 +619,21 @@ config PCI_MMCONFIG
+@@ -588,6 +618,21 @@ config PCI_MMCONFIG
bool "Support mmconfig PCI config space access"
depends on PCI && ACPI
@@ -31631,66 +39464,100 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arc
source "drivers/pci/pcie/Kconfig"
source "drivers/pci/Kconfig"
-@@ -658,4 +704,6 @@ source "security/Kconfig"
+@@ -658,4 +703,6 @@ source "security/Kconfig"
source "crypto/Kconfig"
+source "drivers/xen/Kconfig"
+
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-11-14 15:35:27.000000000 -0800
-@@ -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)
+diff -rpuN linux-2.6.18.8/arch/x86_64/Makefile linux-2.6.18-xen-3.2.0/arch/x86_64/Makefile
+--- linux-2.6.18.8/arch/x86_64/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/Makefile 2008-02-15 16:21:55.000000000 -0800
+@@ -71,9 +71,22 @@ drivers-$(CONFIG_OPROFILE) += arch/x86_
-+cppflags-$(CONFIG_XEN) += \
-+ -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION)
-+CPPFLAGS += $(cppflags-y)
-+
- cflags-y += -m64
- cflags-y += -mno-red-zone
- cflags-y += -mcmodel=kernel
-@@ -74,6 +78,21 @@ boot := arch/x86_64/boot
- PHONY += bzImage bzlilo install archmrproper \
+ boot := arch/x86_64/boot
+
+-PHONY += bzImage bzlilo install archmrproper \
++PHONY += bzImage bzlilo vmlinuz install archmrproper \
fdimage fdimage144 fdimage288 isoimage archclean
+ifdef CONFIG_XEN
-+CPPFLAGS := -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS)
-+head-y := arch/x86_64/kernel/head-xen.o arch/x86_64/kernel/head64-xen.o arch/x86_64/kernel/init_task.o
-+LDFLAGS_vmlinux := -e _start
-+boot := arch/i386/boot-xen
-+.PHONY: vmlinuz
++CPPFLAGS := -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION) \
++ -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS)
++LDFLAGS_vmlinux := -e startup_64
+#Default target when executing "make"
+all: vmlinuz
+
-+vmlinuz: vmlinux
-+ $(Q)$(MAKE) $(build)=$(boot) $@
++BOOTIMAGE := $(boot)/vmlinuz
++KBUILD_IMAGE := $(BOOTIMAGE)
+
-+install:
-+ $(Q)$(MAKE) $(build)=$(boot) XENGUEST=$(XENGUEST) $@
++vmlinuz: vmlinux
++ $(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE)
+else
#Default target when executing "make"
all: bzImage
-@@ -94,6 +113,7 @@ fdimage fdimage144 fdimage288 isoimage:
+@@ -91,6 +104,7 @@ bzdisk: vmlinux
+
+ fdimage fdimage144 fdimage288 isoimage: vmlinux
+ $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
++endif
install:
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
-+endif
+diff -rpuN linux-2.6.18.8/arch/x86_64/boot/Makefile linux-2.6.18-xen-3.2.0/arch/x86_64/boot/Makefile
+--- linux-2.6.18.8/arch/x86_64/boot/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/boot/Makefile 2008-02-15 16:21:55.000000000 -0800
+@@ -26,7 +26,7 @@ SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
+ #RAMDISK := -DRAMDISK=512
- archclean:
- $(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-11-14 15:35:27.000000000 -0800
-@@ -27,9 +27,25 @@ quiet_cmd_syscall = SYSCALL $@
+ targets := vmlinux.bin bootsect bootsect.o \
+- setup setup.o bzImage mtools.conf
++ setup setup.o bzImage mtools.conf vmlinuz vmlinux-stripped
+
+ EXTRA_CFLAGS := -m32
+
+@@ -131,5 +131,13 @@ zlilo: $(BOOTIMAGE)
+ cp System.map $(INSTALL_PATH)/
+ if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
+
++$(obj)/vmlinuz: $(obj)/vmlinux-stripped FORCE
++ $(call if_changed,gzip)
++ @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
++
++$(obj)/vmlinux-stripped: OBJCOPYFLAGS := -g --strip-unneeded
++$(obj)/vmlinux-stripped: vmlinux FORCE
++ $(call if_changed,objcopy)
++
+ install:
+ sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
+diff -rpuN linux-2.6.18.8/arch/x86_64/ia32/Makefile linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/Makefile
+--- linux-2.6.18.8/arch/x86_64/ia32/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/Makefile 2008-02-15 16:21:55.000000000 -0800
+@@ -14,11 +14,14 @@ obj-$(CONFIG_IA32_AOUT) += ia32_aout.o
+ audit-class-$(CONFIG_AUDIT) := audit.o
+ obj-$(CONFIG_IA32_EMULATION) += $(audit-class-y)
+
++syscall32-types-y := sysenter syscall
++syscall32-types-$(subst 1,$(CONFIG_XEN),$(shell expr $(CONFIG_XEN_COMPAT)0 '<' 0x0302000)) += int80
++
+ $(obj)/syscall32_syscall.o: \
+- $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so)
++ $(foreach F,$(syscall32-types-y),$(obj)/vsyscall-$F.so)
+
+ # Teach kbuild about targets
+-targets := $(foreach F,sysenter syscall,vsyscall-$F.o vsyscall-$F.so)
++targets := $(foreach F,$(syscall32-types-y),vsyscall-$F.o vsyscall-$F.so)
+
+ # The DSO images are built using a special linker script
+ quiet_cmd_syscall = SYSCALL $@
+@@ -27,9 +30,10 @@ quiet_cmd_syscall = SYSCALL $@
-Wl,-soname=linux-gate.so.1 -o $@ \
-Wl,-T,$(filter-out FORCE,$^)
-+$(obj)/vsyscall-int80.so \
- $(obj)/vsyscall-sysenter.so $(obj)/vsyscall-syscall.so: \
+-$(obj)/vsyscall-sysenter.so $(obj)/vsyscall-syscall.so: \
++$(foreach F,$(syscall32-types-y),$(obj)/vsyscall-$F.so): \
$(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE
$(call if_changed,syscall)
@@ -31698,25 +39565,81 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/Makefile tmp-linux-2.6-xen.pat
-AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32
+AFLAGS_vsyscall-sysenter.o = -m32 -Wa,-32 -Iarch/i386/kernel
+AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32 -Iarch/i386/kernel
-+
-+ifdef CONFIG_XEN
+AFLAGS_vsyscall-int80.o = -m32 -Wa,-32 -Iarch/i386/kernel
-+CFLAGS_syscall32-xen.o += -DUSE_INT80
-+AFLAGS_syscall32_syscall-xen.o += -DUSE_INT80
-+
-+$(obj)/syscall32_syscall-xen.o: \
-+ $(foreach F,int80 sysenter syscall,$(obj)/vsyscall-$F.so)
-+
-+targets := $(foreach F,int80 sysenter syscall,vsyscall-$F.o vsyscall-$F.so)
-+
-+include $(srctree)/scripts/Makefile.xen
-+
-+obj-y := $(call cherrypickxen, $(obj-y))
-+endif
-diff -Nurp 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,755 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/ia32/ia32_signal.c linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/ia32_signal.c
+--- linux-2.6.18.8/arch/x86_64/ia32/ia32_signal.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/ia32_signal.c 2008-02-15 16:21:55.000000000 -0800
+@@ -113,25 +113,19 @@ int copy_siginfo_from_user32(siginfo_t *
+ }
+
+ asmlinkage long
+-sys32_sigsuspend(int history0, int history1, old_sigset_t mask,
+- struct pt_regs *regs)
++sys32_sigsuspend(int history0, int history1, old_sigset_t mask)
+ {
+- sigset_t saveset;
+-
+ mask &= _BLOCKABLE;
+ spin_lock_irq(&current->sighand->siglock);
+- saveset = current->blocked;
++ current->saved_sigmask = current->blocked;
+ siginitset(&current->blocked, mask);
+ recalc_sigpending();
+ spin_unlock_irq(&current->sighand->siglock);
+
+- regs->rax = -EINTR;
+- while (1) {
+- current->state = TASK_INTERRUPTIBLE;
+- schedule();
+- if (do_signal(regs, &saveset))
+- return -EINTR;
+- }
++ current->state = TASK_INTERRUPTIBLE;
++ schedule();
++ set_thread_flag(TIF_RESTORE_SIGMASK);
++ return -ERESTARTNOHAND;
+ }
+
+ asmlinkage long
+@@ -508,11 +502,11 @@ int ia32_setup_frame(int sig, struct k_s
+ current->comm, current->pid, frame, regs->rip, frame->pretcode);
+ #endif
+
+- return 1;
++ return 0;
+
+ give_sigsegv:
+ force_sigsegv(sig, current);
+- return 0;
++ return -EFAULT;
+ }
+
+ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+@@ -595,7 +589,7 @@ int ia32_setup_rt_frame(int sig, struct
+ regs->ss = __USER32_DS;
+
+ set_fs(USER_DS);
+- regs->eflags &= ~TF_MASK;
++ regs->eflags &= ~TF_MASK;
+ if (test_thread_flag(TIF_SINGLESTEP))
+ ptrace_notify(SIGTRAP);
+
+@@ -604,9 +598,9 @@ int ia32_setup_rt_frame(int sig, struct
+ current->comm, current->pid, frame, regs->rip, frame->pretcode);
+ #endif
+
+- return 1;
++ return 0;
+
+ give_sigsegv:
+ force_sigsegv(sig, current);
+- return 0;
++ return -EFAULT;
+ }
+diff -rpuN linux-2.6.18.8/arch/x86_64/ia32/ia32entry-xen.S linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/ia32entry-xen.S
+--- linux-2.6.18.8/arch/x86_64/ia32/ia32entry-xen.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/ia32entry-xen.S 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,668 @@
+/*
+ * Compatibility mode system call entry point for x86-64.
+ *
@@ -31735,8 +39658,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+#include <asm/irqflags.h>
+#include <linux/linkage.h>
+
-+#define __XEN_X86_64 1
-+
+#define IA32_NR_syscalls ((ia32_syscall_end - ia32_sys_call_table)/8)
+
+ .macro IA32_ARG_FIXUP noebp=0
@@ -31771,20 +39692,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ movl \offset+72(%rsp),%eax
+ .endm
+
-+#if defined (__XEN_X86_64)
+#include "../kernel/xen_entry.S"
-+
-+#define __swapgs
-+#define __cli
-+#define __sti
-+#else
-+/*
-+ * Use the native instructions
-+ */
-+#define __swapgs swapgs
-+#define __cli cli
-+#define __sti sti
-+#endif
+
+ .macro CFI_STARTPROC32 simple
+ CFI_STARTPROC \simple
@@ -31811,7 +39719,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ * %ebp user stack
+ * 0(%ebp) Arg6
+ *
-+ * Interrupts off.
++ * Interrupts on.
+ *
+ * This is purely a fast path. For anything complicated we use the int 0x80
+ * path below. Set up a complete hardware stack frame to share code
@@ -31819,38 +39727,26 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ */
+ENTRY(ia32_sysenter_target)
+ CFI_STARTPROC32 simple
-+ CFI_DEF_CFA rsp,0
-+ CFI_REGISTER rsp,rbp
-+ __swapgs
-+ movq %gs:pda_kernelstack, %rsp
-+ addq $(PDA_STACKOFFSET),%rsp
-+ /*
-+ * No need to follow this irqs on/off section: the syscall
-+ * disabled irqs, here we enable it straight after entry:
-+ */
-+ XEN_UNBLOCK_EVENTS(%r11)
-+ __sti
++ CFI_DEF_CFA rsp,SS+8-RIP+16
++ /*CFI_REL_OFFSET ss,SS-RIP+16*/
++ CFI_REL_OFFSET rsp,RSP-RIP+16
++ /*CFI_REL_OFFSET rflags,EFLAGS-RIP+16*/
++ /*CFI_REL_OFFSET cs,CS-RIP+16*/
++ CFI_REL_OFFSET rip,RIP-RIP+16
++ CFI_REL_OFFSET r11,8
++ CFI_REL_OFFSET rcx,0
++ movq 8(%rsp),%r11
++ CFI_RESTORE r11
++ popq %rcx
++ CFI_ADJUST_CFA_OFFSET -8
++ CFI_RESTORE rcx
+ movl %ebp,%ebp /* zero extension */
-+ pushq $__USER32_DS
-+ CFI_ADJUST_CFA_OFFSET 8
-+ /*CFI_REL_OFFSET ss,0*/
-+ pushq %rbp
-+ CFI_ADJUST_CFA_OFFSET 8
-+ CFI_REL_OFFSET rsp,0
-+ pushfq
-+ CFI_ADJUST_CFA_OFFSET 8
-+ /*CFI_REL_OFFSET rflags,0*/
-+ movl $VSYSCALL32_SYSEXIT, %r10d
-+ CFI_REGISTER rip,r10
-+ pushq $__USER32_CS
-+ CFI_ADJUST_CFA_OFFSET 8
-+ /*CFI_REL_OFFSET cs,0*/
-+ movl %eax, %eax
-+ pushq %r10
-+ CFI_ADJUST_CFA_OFFSET 8
-+ CFI_REL_OFFSET rip,0
-+ pushq %rax
-+ CFI_ADJUST_CFA_OFFSET 8
++ movl %eax,%eax
++ movl $__USER32_DS,40(%rsp)
++ movq %rbp,32(%rsp)
++ movl $__USER32_CS,16(%rsp)
++ movl $VSYSCALL32_SYSEXIT,8(%rsp)
++ movq %rax,(%rsp)
+ cld
+ SAVE_ARGS 0,0,0
+ /* no need to do an access_ok check here because rbp has been
@@ -31862,7 +39758,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ GET_THREAD_INFO(%r10)
+ orl $TS_COMPAT,threadinfo_status(%r10)
+ testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
-+ CFI_REMEMBER_STATE
+ jnz sysenter_tracesys
+sysenter_do_call:
+ cmpl $(IA32_NR_syscalls-1),%eax
@@ -31870,33 +39765,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ IA32_ARG_FIXUP 1
+ call *ia32_sys_call_table(,%rax,8)
+ movq %rax,RAX-ARGOFFSET(%rsp)
-+ GET_THREAD_INFO(%r10)
-+ XEN_BLOCK_EVENTS(%r11)
-+ __cli
-+ TRACE_IRQS_OFF
-+ testl $_TIF_ALLWORK_MASK,threadinfo_flags(%r10)
-+ jnz int_ret_from_sys_call
-+ andl $~TS_COMPAT,threadinfo_status(%r10)
-+ /* clear IF, that popfq doesn't enable interrupts early */
-+ andl $~0x200,EFLAGS-R11(%rsp)
-+ RESTORE_ARGS 1,24,1,1,1,1
-+ popfq
-+ CFI_ADJUST_CFA_OFFSET -8
-+ /*CFI_RESTORE rflags*/
-+ popq %rcx /* User %esp */
-+ CFI_ADJUST_CFA_OFFSET -8
-+ CFI_REGISTER rsp,rcx
-+ movl $VSYSCALL32_SYSEXIT,%edx /* User %eip */
-+ CFI_REGISTER rip,rdx
-+ TRACE_IRQS_ON
-+ __swapgs
-+ XEN_UNBLOCK_EVENTS(%r11)
-+ __sti /* sti only takes effect after the next instruction */
-+ /* sysexit */
-+ .byte 0xf, 0x35 /* TBD */
++ jmp int_ret_from_sys_call
+
+sysenter_tracesys:
-+ CFI_RESTORE_STATE
+ SAVE_REST
+ CLEAR_RREGS
+ movq $-ENOSYS,RAX(%rsp) /* really needed? */
@@ -31929,7 +39800,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ * %esp user stack
+ * 0(%esp) Arg6
+ *
-+ * Interrupts off.
++ * Interrupts on.
+ *
+ * This is purely a fast path. For anything complicated we use the int 0x80
+ * path below. Set up a complete hardware stack frame to share code
@@ -31937,32 +39808,20 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ */
+ENTRY(ia32_cstar_target)
+ CFI_STARTPROC32 simple
-+ CFI_DEF_CFA rsp,PDA_STACKOFFSET
-+ CFI_REGISTER rip,rcx
-+ /*CFI_REGISTER rflags,r11*/
-+ __swapgs
-+ movl %esp,%r8d
-+ CFI_REGISTER rsp,r8
-+ movq %gs:pda_kernelstack,%rsp
-+ /*
-+ * No need to follow this irqs on/off section: the syscall
-+ * disabled irqs and here we enable it straight after entry:
-+ */
-+ XEN_UNBLOCK_EVENTS(%r11)
-+ __sti
-+ SAVE_ARGS 8,1,1
++ CFI_DEF_CFA rsp,SS+8-RIP+16
++ /*CFI_REL_OFFSET ss,SS-RIP+16*/
++ CFI_REL_OFFSET rsp,RSP-RIP+16
++ /*CFI_REL_OFFSET rflags,EFLAGS-RIP+16*/
++ /*CFI_REL_OFFSET cs,CS-RIP+16*/
++ CFI_REL_OFFSET rip,RIP-RIP+16
+ movl %eax,%eax /* zero extension */
++ movl RSP-RIP+16(%rsp),%r8d
++ SAVE_ARGS -8,1,1
+ movq %rax,ORIG_RAX-ARGOFFSET(%rsp)
-+ movq %rcx,RIP-ARGOFFSET(%rsp)
-+ CFI_REL_OFFSET rip,RIP-ARGOFFSET
+ movq %rbp,RCX-ARGOFFSET(%rsp) /* this lies slightly to ptrace */
+ movl %ebp,%ecx
-+ movq $__USER32_CS,CS-ARGOFFSET(%rsp)
-+ movq $__USER32_DS,SS-ARGOFFSET(%rsp)
-+ movq %r11,EFLAGS-ARGOFFSET(%rsp)
-+ /*CFI_REL_OFFSET rflags,EFLAGS-ARGOFFSET*/
-+ movq %r8,RSP-ARGOFFSET(%rsp)
-+ CFI_REL_OFFSET rsp,RSP-ARGOFFSET
++ movl $__USER32_CS,CS-ARGOFFSET(%rsp)
++ movl $__USER32_DS,SS-ARGOFFSET(%rsp)
+ /* no need to do an access_ok check here because r8 has been
+ 32bit zero extended */
+ /* hardware stack frame is complete now */
@@ -31973,7 +39832,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ GET_THREAD_INFO(%r10)
+ orl $TS_COMPAT,threadinfo_status(%r10)
+ testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
-+ CFI_REMEMBER_STATE
+ jnz cstar_tracesys
+cstar_do_call:
+ cmpl $IA32_NR_syscalls-1,%eax
@@ -31981,26 +39839,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ IA32_ARG_FIXUP 1
+ call *ia32_sys_call_table(,%rax,8)
+ movq %rax,RAX-ARGOFFSET(%rsp)
-+ GET_THREAD_INFO(%r10)
-+ XEN_BLOCK_EVENTS(%r11)
-+ __cli
-+ TRACE_IRQS_OFF
-+ testl $_TIF_ALLWORK_MASK,threadinfo_flags(%r10)
-+ jnz int_ret_from_sys_call
-+ andl $~TS_COMPAT,threadinfo_status(%r10)
-+ RESTORE_ARGS 1,-ARG_SKIP,1,1,1
-+ movl RIP-ARGOFFSET(%rsp),%ecx
-+ CFI_REGISTER rip,rcx
-+ movl EFLAGS-ARGOFFSET(%rsp),%r11d
-+ /*CFI_REGISTER rflags,r11*/
-+ TRACE_IRQS_ON
-+ movl RSP-ARGOFFSET(%rsp),%esp
-+ CFI_RESTORE rsp
-+ __swapgs
-+ sysretl /* TBD */
++ jmp int_ret_from_sys_call
+
+cstar_tracesys:
-+ CFI_RESTORE_STATE
+ SAVE_REST
+ CLEAR_RREGS
+ movq $-ENOSYS,RAX(%rsp) /* really needed? */
@@ -32041,32 +39882,27 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ * Arguments are zero extended. For system calls that want sign extension and
+ * take long arguments a wrapper is needed. Most calls can just be called
+ * directly.
-+ * Assumes it is only called from user space and entered with interrupts off.
++ * Assumes it is only called from user space and entered with interrupts on.
+ */
+
+ENTRY(ia32_syscall)
+ CFI_STARTPROC simple
-+ CFI_DEF_CFA rsp,SS+8-RIP
-+ /*CFI_REL_OFFSET ss,SS-RIP*/
-+ CFI_REL_OFFSET rsp,RSP-RIP
-+ /*CFI_REL_OFFSET rflags,EFLAGS-RIP*/
-+ /*CFI_REL_OFFSET cs,CS-RIP*/
-+ CFI_REL_OFFSET rip,RIP-RIP
-+ __swapgs
-+ /*
-+ * No need to follow this irqs on/off section: the syscall
-+ * disabled irqs and here we enable it straight after entry:
-+ */
-+ XEN_UNBLOCK_EVENTS(%r11)
-+ __sti
-+ movq (%rsp),%rcx
++ CFI_DEF_CFA rsp,SS+8-RIP+16
++ /*CFI_REL_OFFSET ss,SS-RIP+16*/
++ CFI_REL_OFFSET rsp,RSP-RIP+16
++ /*CFI_REL_OFFSET rflags,EFLAGS-RIP+16*/
++ /*CFI_REL_OFFSET cs,CS-RIP+16*/
++ CFI_REL_OFFSET rip,RIP-RIP+16
++ CFI_REL_OFFSET r11,8
++ CFI_REL_OFFSET rcx,0
+ movq 8(%rsp),%r11
-+ addq $0x10,%rsp /* skip rcx and r11 */
++ CFI_RESTORE r11
++ popq %rcx
++ CFI_ADJUST_CFA_OFFSET -8
++ CFI_RESTORE rcx
+ movl %eax,%eax
-+ pushq %rax
-+ CFI_ADJUST_CFA_OFFSET 8
++ movq %rax,(%rsp)
+ cld
-+/* 1: jmp 1b */
+ /* note the registers are not zero extended to the sf.
+ this could be a problem. */
+ SAVE_ARGS 0,0,1
@@ -32461,8 +40297,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ .quad sys_readlinkat /* 305 */
+ .quad sys_fchmodat
+ .quad sys_faccessat
-+ .quad quiet_ni_syscall /* pselect6 for now */
-+ .quad quiet_ni_syscall /* ppoll for now */
++ .quad compat_sys_pselect6
++ .quad compat_sys_ppoll
+ .quad sys_unshare /* 310 */
+ .quad compat_sys_set_robust_list
+ .quad compat_sys_get_robust_list
@@ -32472,10 +40308,24 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/ia32entry-xen.S tmp-linux-2.6-
+ .quad compat_sys_vmsplice
+ .quad compat_sys_move_pages
+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,128 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/ia32/ia32entry.S linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/ia32entry.S
+--- linux-2.6.18.8/arch/x86_64/ia32/ia32entry.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/ia32entry.S 2008-02-15 16:21:55.000000000 -0800
+@@ -703,8 +703,8 @@ ia32_sys_call_table:
+ .quad sys_readlinkat /* 305 */
+ .quad sys_fchmodat
+ .quad sys_faccessat
+- .quad quiet_ni_syscall /* pselect6 for now */
+- .quad quiet_ni_syscall /* ppoll for now */
++ .quad compat_sys_pselect6
++ .quad compat_sys_ppoll
+ .quad sys_unshare /* 310 */
+ .quad compat_sys_set_robust_list
+ .quad compat_sys_get_robust_list
+diff -rpuN linux-2.6.18.8/arch/x86_64/ia32/syscall32-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/syscall32-xen.c
+--- linux-2.6.18.8/arch/x86_64/ia32/syscall32-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/syscall32-xen.c 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,137 @@
+/* Copyright 2002,2003 Andi Kleen, SuSE Labs */
+
+/* vsyscall handling for 32bit processes. Map a stub page into it
@@ -32491,17 +40341,18 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/syscall32-xen.c tmp-linux-2.6-
+#include <asm/proto.h>
+#include <asm/tlbflush.h>
+#include <asm/ia32_unistd.h>
++#include <xen/interface/callback.h>
+
-+#ifdef USE_INT80
-+extern unsigned char syscall32_int80[], syscall32_int80_end[];
-+#endif
+extern unsigned char syscall32_syscall[], syscall32_syscall_end[];
+extern unsigned char syscall32_sysenter[], syscall32_sysenter_end[];
+extern int sysctl_vsyscall32;
+
+char *syscall32_page;
-+#ifndef USE_INT80
+static int use_sysenter = -1;
++
++#if CONFIG_XEN_COMPAT < 0x030200
++extern unsigned char syscall32_int80[], syscall32_int80_end[];
++static int use_int80 = 1;
+#endif
+
+static struct page *
@@ -32564,13 +40415,12 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/syscall32-xen.c tmp-linux-2.6-
+ if (!syscall32_page)
+ panic("Cannot allocate syscall32 page");
+
-+#ifdef USE_INT80
-+ /*
-+ * At this point we use int 0x80.
-+ */
-+ memcpy(syscall32_page, syscall32_int80,
-+ syscall32_int80_end - syscall32_int80);
-+#else
++#if CONFIG_XEN_COMPAT < 0x030200
++ if (use_int80) {
++ memcpy(syscall32_page, syscall32_int80,
++ syscall32_int80_end - syscall32_int80);
++ } else
++#endif
+ if (use_sysenter > 0) {
+ memcpy(syscall32_page, syscall32_sysenter,
+ syscall32_sysenter_end - syscall32_sysenter);
@@ -32578,7 +40428,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/syscall32-xen.c tmp-linux-2.6-
+ memcpy(syscall32_page, syscall32_syscall,
+ syscall32_syscall_end - syscall32_syscall);
+ }
-+#endif
+ return 0;
+}
+
@@ -32591,28 +40440,38 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/syscall32-xen.c tmp-linux-2.6-
+/* May not be __init: called during resume */
+void syscall32_cpu_init(void)
+{
-+#ifndef USE_INT80
-+ if (use_sysenter < 0)
-+ use_sysenter = (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL);
++ static const struct callback_register cstar = {
++ .type = CALLBACKTYPE_syscall32,
++ .address = (unsigned long)ia32_cstar_target
++ };
++ static const struct callback_register sysenter = {
++ .type = CALLBACKTYPE_sysenter,
++ .address = (unsigned long)ia32_sysenter_target
++ };
+
+ /* Load these always in case some future AMD CPU supports
+ SYSENTER from compat mode too. */
-+ checking_wrmsrl(MSR_IA32_SYSENTER_CS, (u64)__KERNEL_CS);
-+ checking_wrmsrl(MSR_IA32_SYSENTER_ESP, 0ULL);
-+ checking_wrmsrl(MSR_IA32_SYSENTER_EIP, (u64)ia32_sysenter_target);
-+
-+ wrmsrl(MSR_CSTAR, ia32_cstar_target);
++ if ((HYPERVISOR_callback_op(CALLBACKOP_register, &sysenter) < 0) ||
++ (HYPERVISOR_callback_op(CALLBACKOP_register, &cstar) < 0))
++#if CONFIG_XEN_COMPAT < 0x030200
++ return;
++ use_int80 = 0;
++#else
++ BUG();
+#endif
++
++ if (use_sysenter < 0)
++ use_sysenter = (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL);
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/ia32/syscall32_syscall-xen.S linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/syscall32_syscall-xen.S
+--- linux-2.6.18.8/arch/x86_64/ia32/syscall32_syscall-xen.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/syscall32_syscall-xen.S 2008-02-15 16:21:55.000000000 -0800
@@ -0,0 +1,28 @@
+/* 32bit VDSOs mapped into user space. */
+
+ .section ".init.data","aw"
+
-+#ifdef USE_INT80
++#if CONFIG_XEN_COMPAT < 0x030200
+
+ .globl syscall32_int80
+ .globl syscall32_int80_end
@@ -32636,9 +40495,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/syscall32_syscall-xen.S tmp-li
+syscall32_sysenter:
+ .incbin "arch/x86_64/ia32/vsyscall-sysenter.so"
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/ia32/vsyscall-int80.S linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/vsyscall-int80.S
+--- linux-2.6.18.8/arch/x86_64/ia32/vsyscall-int80.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/vsyscall-int80.S 2008-02-15 16:21:55.000000000 -0800
@@ -0,0 +1,58 @@
+/*
+ * Code for the vsyscall page. This version uses the old int $0x80 method.
@@ -32698,9 +40557,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/vsyscall-int80.S tmp-linux-2.6
+ */
+#define SYSCALL_ENTER_KERNEL int $0x80
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/ia32/vsyscall-sigreturn.S linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/vsyscall-sigreturn.S
+--- linux-2.6.18.8/arch/x86_64/ia32/vsyscall-sigreturn.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/ia32/vsyscall-sigreturn.S 2008-02-15 16:21:55.000000000 -0800
@@ -139,5 +139,5 @@ __kernel_rt_sigreturn:
.align 4
.LENDFDE3:
@@ -32708,9 +40567,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/ia32/vsyscall-sigreturn.S tmp-linux
-#include "../../i386/kernel/vsyscall-note.S"
+#include <vsyscall-note.S>
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/Makefile linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/Makefile
+--- linux-2.6.18.8/arch/x86_64/kernel/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/Makefile 2008-02-15 16:21:55.000000000 -0800
@@ -21,11 +21,13 @@ obj-$(CONFIG_MICROCODE) += microcode.o
obj-$(CONFIG_X86_CPUID) += cpuid.o
obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o
@@ -32726,36 +40585,200 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/Makefile tmp-linux-2.6-xen.p
obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend_asm.o
obj-$(CONFIG_CPU_FREQ) += cpufreq/
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-@@ -55,3 +57,18 @@ i8237-y += ../../i386/kernel/i8237.o
+@@ -55,3 +57,8 @@ i8237-y += ../../i386/kernel/i8237.o
msr-$(subst m,y,$(CONFIG_X86_MSR)) += ../../i386/kernel/msr.o
alternative-y += ../../i386/kernel/alternative.o
-+ifdef CONFIG_XEN
-+time-y += ../../i386/kernel/time-xen.o
-+pci-dma-y += ../../i386/kernel/pci-dma-xen.o
-+microcode-$(subst m,y,$(CONFIG_MICROCODE)) := ../../i386/kernel/microcode-xen.o
-+quirks-y := ../../i386/kernel/quirks-xen.o
-+
-+n-obj-xen := i8259.o reboot.o i8237.o smpboot.o trampoline.o
-+
-+include $(srctree)/scripts/Makefile.xen
-+
-+obj-y := $(call filterxen, $(obj-y), $(n-obj-xen))
-+obj-y := $(call cherrypickxen, $(obj-y))
-+extra-y := $(call cherrypickxen, $(extra-y))
-+%/head-xen.o %/head-xen.s: EXTRA_AFLAGS :=
-+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-11-14 15:35:27.000000000 -0800
-@@ -7,3 +7,4 @@ obj-y += processor.o
++time-$(CONFIG_XEN) += ../../i386/kernel/time.o
++pci-dma-$(CONFIG_XEN) += ../../i386/kernel/pci-dma.o
++
++disabled-obj-$(CONFIG_XEN) := i8259.o reboot.o smpboot.o trampoline.o
++%/head.o %/head.s: $(if $(CONFIG_XEN),EXTRA_AFLAGS,dummy) :=
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/acpi/Makefile linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/acpi/Makefile
+--- linux-2.6.18.8/arch/x86_64/kernel/acpi/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/acpi/Makefile 2008-02-15 16:21:55.000000000 -0800
+@@ -5,5 +5,7 @@ obj-$(CONFIG_ACPI_SLEEP) += sleep.o wake
+ ifneq ($(CONFIG_ACPI_PROCESSOR),)
+ obj-y += processor.o
processor-y := ../../../i386/kernel/acpi/processor.o ../../../i386/kernel/acpi/cstate.o
++processor-$(CONFIG_XEN) := ../../../i386/kernel/acpi/processor.o
endif
-+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-11-14 15:35:27.000000000 -0800
++disabled-obj-$(CONFIG_XEN) := wakeup.o
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/acpi/sleep-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/acpi/sleep-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/acpi/sleep-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/acpi/sleep-xen.c 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,167 @@
++/*
++ * acpi.c - Architecture-Specific Low-Level ACPI Support
++ *
++ * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
++ * Copyright (C) 2001 Jun Nakajima <jun.nakajima@intel.com>
++ * Copyright (C) 2001 Patrick Mochel <mochel@osdl.org>
++ * Copyright (C) 2002 Andi Kleen, SuSE Labs (x86-64 port)
++ * Copyright (C) 2003 Pavel Machek, SuSE Labs
++ *
++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++ *
++ * 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/kernel.h>
++#include <linux/init.h>
++#include <linux/types.h>
++#include <linux/stddef.h>
++#include <linux/slab.h>
++#include <linux/pci.h>
++#include <linux/bootmem.h>
++#include <linux/acpi.h>
++#include <linux/cpumask.h>
++
++#include <asm/mpspec.h>
++#include <asm/io.h>
++#include <asm/apic.h>
++#include <asm/apicdef.h>
++#include <asm/page.h>
++#include <asm/pgtable.h>
++#include <asm/pgalloc.h>
++#include <asm/io_apic.h>
++#include <asm/proto.h>
++#include <asm/tlbflush.h>
++
++/* --------------------------------------------------------------------------
++ Low-Level Sleep Support
++ -------------------------------------------------------------------------- */
++
++#ifdef CONFIG_ACPI_SLEEP
++
++#ifndef CONFIG_ACPI_PV_SLEEP
++/* address in low memory of the wakeup routine. */
++unsigned long acpi_wakeup_address = 0;
++unsigned long acpi_video_flags;
++extern char wakeup_start, wakeup_end;
++
++extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
++
++static pgd_t low_ptr;
++
++static void init_low_mapping(void)
++{
++ pgd_t *slot0 = pgd_offset(current->mm, 0UL);
++ low_ptr = *slot0;
++ set_pgd(slot0, *pgd_offset(current->mm, PAGE_OFFSET));
++ WARN_ON(num_online_cpus() != 1);
++ local_flush_tlb();
++}
++#endif
++
++/**
++ * acpi_save_state_mem - save kernel state
++ *
++ * Create an identity mapped page table and copy the wakeup routine to
++ * low memory.
++ */
++int acpi_save_state_mem(void)
++{
++#ifndef CONFIG_ACPI_PV_SLEEP
++ init_low_mapping();
++
++ memcpy((void *)acpi_wakeup_address, &wakeup_start,
++ &wakeup_end - &wakeup_start);
++ acpi_copy_wakeup_routine(acpi_wakeup_address);
++#endif
++ return 0;
++}
++
++/*
++ * acpi_restore_state
++ */
++void acpi_restore_state_mem(void)
++{
++#ifndef CONFIG_ACPI_PV_SLEEP
++ set_pgd(pgd_offset(current->mm, 0UL), low_ptr);
++ local_flush_tlb();
++#endif
++}
++
++/**
++ * acpi_reserve_bootmem - do _very_ early ACPI initialisation
++ *
++ * We allocate a page in low memory for the wakeup
++ * routine for when we come back from a sleep state. The
++ * runtime allocator allows specification of <16M pages, but not
++ * <1M pages.
++ */
++void __init acpi_reserve_bootmem(void)
++{
++#ifndef CONFIG_ACPI_PV_SLEEP
++ acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE);
++ if ((&wakeup_end - &wakeup_start) > PAGE_SIZE)
++ printk(KERN_CRIT
++ "ACPI: Wakeup code way too big, will crash on attempt to suspend\n");
++#endif
++}
++
++#ifndef CONFIG_ACPI_PV_SLEEP
++static int __init acpi_sleep_setup(char *str)
++{
++ while ((str != NULL) && (*str != '\0')) {
++ if (strncmp(str, "s3_bios", 7) == 0)
++ acpi_video_flags = 1;
++ if (strncmp(str, "s3_mode", 7) == 0)
++ acpi_video_flags |= 2;
++ str = strchr(str, ',');
++ if (str != NULL)
++ str += strspn(str, ", \t");
++ }
++
++ return 1;
++}
++
++__setup("acpi_sleep=", acpi_sleep_setup);
++
++#else /* CONFIG_ACPI_PV_SLEEP */
++#include <asm/hypervisor.h>
++#include <xen/interface/platform.h>
++int acpi_notify_hypervisor_state(u8 sleep_state,
++ u32 pm1a_cnt, u32 pm1b_cnt)
++{
++ struct xen_platform_op op = {
++ .cmd = XENPF_enter_acpi_sleep,
++ .interface_version = XENPF_INTERFACE_VERSION,
++ .u = {
++ .enter_acpi_sleep = {
++ .pm1a_cnt_val = (u16)pm1a_cnt,
++ .pm1b_cnt_val = (u16)pm1b_cnt,
++ .sleep_state = sleep_state,
++ },
++ },
++ };
++
++ return HYPERVISOR_platform_op(&op);
++}
++#endif /* CONFIG_ACPI_PV_SLEEP */
++
++#endif /*CONFIG_ACPI_SLEEP */
++
++void acpi_pci_link_exit(void)
++{
++}
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/apic-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/apic-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/apic-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/apic-xen.c 2008-02-15 16:21:55.000000000 -0800
@@ -0,0 +1,197 @@
+/*
+ * Local APIC handling, local APIC timers
@@ -32954,9 +40977,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/apic-xen.c tmp-linux-2.6-xen
+
+ return 1;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/asm-offsets.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/asm-offsets.c
+--- linux-2.6.18.8/arch/x86_64/kernel/asm-offsets.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/asm-offsets.c 2008-02-15 16:21:55.000000000 -0800
@@ -67,8 +67,10 @@ int main(void)
DEFINE(pbe_address, offsetof(struct pbe, address));
DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
@@ -32968,9 +40991,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/asm-offsets.c tmp-linux-2.6-
BLANK();
DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx));
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/crash.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/crash.c
+--- linux-2.6.18.8/arch/x86_64/kernel/crash.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/crash.c 2008-02-15 16:21:55.000000000 -0800
@@ -92,6 +92,7 @@ static void crash_save_self(struct pt_re
crash_save_this_cpu(regs, cpu);
}
@@ -33004,10 +41027,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/crash.c tmp-linux-2.6-xen.pa
+#endif /* CONFIG_XEN */
crash_save_self(regs);
}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,774 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/e820-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/e820-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/e820-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/e820-xen.c 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,783 @@
+/*
+ * Handle the memory map.
+ * The functions here do the job until bootmem takes over.
@@ -33107,17 +41130,26 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/e820-xen.c tmp-linux-2.6-xen
+ return 0;
+}
+
-+#ifndef CONFIG_XEN
+/*
+ * This function checks if any part of the range <start,end> is mapped
+ * with type.
+ */
-+int __meminit
-+e820_any_mapped(unsigned long start, unsigned long end, unsigned type)
++int e820_any_mapped(unsigned long start, unsigned long end, unsigned type)
+{
+ int i;
++
++#ifndef CONFIG_XEN
+ for (i = 0; i < e820.nr_map; i++) {
+ struct e820entry *ei = &e820.map[i];
++#else
++ extern struct e820map machine_e820;
++
++ if (!is_initial_xendomain())
++ return 0;
++ for (i = 0; i < machine_e820.nr_map; i++) {
++ const struct e820entry *ei = &machine_e820.map[i];
++#endif
++
+ if (type && ei->type != type)
+ continue;
+ if (ei->addr >= end || ei->addr + ei->size <= start)
@@ -33126,7 +41158,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/e820-xen.c tmp-linux-2.6-xen
+ }
+ return 0;
+}
-+#endif
++EXPORT_SYMBOL_GPL(e820_any_mapped);
+
+/*
+ * This function checks if the entire range <start,end> is mapped with type.
@@ -33782,9 +41814,29 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/e820-xen.c tmp-linux-2.6-xen
+ printk(KERN_INFO "Allocating PCI resources starting at %lx (gap: %lx:%lx)\n",
+ pci_mem_start, gapstart, gapsize);
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/e820.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/e820.c
+--- linux-2.6.18.8/arch/x86_64/kernel/e820.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/e820.c 2008-02-15 16:21:55.000000000 -0800
+@@ -93,7 +93,7 @@ static inline int bad_addr(unsigned long
+ * This function checks if any part of the range <start,end> is mapped
+ * with type.
+ */
+-int __meminit
++int
+ e820_any_mapped(unsigned long start, unsigned long end, unsigned type)
+ {
+ int i;
+@@ -107,6 +107,7 @@ e820_any_mapped(unsigned long start, uns
+ }
+ return 0;
+ }
++EXPORT_SYMBOL_GPL(e820_any_mapped);
+
+ /*
+ * This function checks if the entire range <start,end> is mapped with type.
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/early_printk-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/early_printk-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/early_printk-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/early_printk-xen.c 2008-02-15 16:21:55.000000000 -0800
@@ -0,0 +1,302 @@
+#include <linux/console.h>
+#include <linux/kernel.h>
@@ -34088,10 +42140,10 @@ 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,1325 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/entry-xen.S linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/entry-xen.S
+--- linux-2.6.18.8/arch/x86_64/kernel/entry-xen.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/entry-xen.S 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,1322 @@
+/*
+ * linux/arch/x86_64/entry.S
+ *
@@ -34144,8 +42196,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/entry-xen.S tmp-linux-2.6-xe
+#include <xen/interface/arch-x86_64.h>
+#include <xen/interface/features.h>
+
-+#include "irq_vectors.h"
-+
+#include "xen_entry.S"
+
+ .code64
@@ -34274,6 +42324,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/entry-xen.S tmp-linux-2.6-xe
+/* rdi: prev */
+ENTRY(ret_from_fork)
+ CFI_DEFAULT_STACK
++ push kernel_eflags(%rip)
++ CFI_ADJUST_CFA_OFFSET 4
++ popf # reset kernel eflags
++ CFI_ADJUST_CFA_OFFSET -4
+ call schedule_tail
+ GET_THREAD_INFO(%rcx)
+ testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%rcx)
@@ -34327,7 +42381,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/entry-xen.S tmp-linux-2.6-xe
+ * r11 eflags for syscall/sysret, temporary for C
+ * r12-r15,rbp,rbx saved by C code, not touched.
+ *
-+ * Interrupts are off on entry.
++ * Interrupts are enabled on entry.
+ * Only called from user space.
+ *
+ * XXX if we had a free scratch register we could save the RSP into the stack frame
@@ -34342,11 +42396,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/entry-xen.S tmp-linux-2.6-xe
+ _frame (RIP-0x10)
+ SAVE_ARGS -8,0
+ movq %rax,ORIG_RAX-ARGOFFSET(%rsp)
-+ /*
-+ * No need to follow this irqs off/on section - it's straight
-+ * and short:
-+ */
-+ XEN_UNBLOCK_EVENTS(%r11)
+ GET_THREAD_INFO(%rcx)
+ testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%rcx)
+ CFI_REMEMBER_STATE
@@ -35417,9 +43466,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/entry-xen.S tmp-linux-2.6-xe
+ CFI_ENDPROC
+ENDPROC(arch_unwind_init_running)
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/genapic-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/genapic-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/genapic-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/genapic-xen.c 2008-02-15 16:21:55.000000000 -0800
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2004 James Cleverdon, IBM.
@@ -35564,9 +43613,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/genapic-xen.c tmp-linux-2.6-
+ xen_send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL);
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/genapic_xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/genapic_xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/genapic_xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/genapic_xen.c 2008-02-15 16:21:55.000000000 -0800
@@ -0,0 +1,161 @@
+/*
+ * Copyright 2004 James Cleverdon, IBM.
@@ -35729,10 +43778,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/genapic_xen.c tmp-linux-2.6-
+ .cpu_mask_to_apicid = xen_cpu_mask_to_apicid,
+ .phys_pkg_id = phys_pkg_id,
+};
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,203 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/head-xen.S linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/head-xen.S
+--- linux-2.6.18.8/arch/x86_64/kernel/head-xen.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/head-xen.S 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,214 @@
+/*
+ * linux/arch/x86_64/kernel/head.S -- start in 32bit and switch to 64bit
+ *
@@ -35762,11 +43811,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/head-xen.S tmp-linux-2.6-xen
+
+ .section .bootstrap.text, "ax", @progbits
+ .code64
-+#define VIRT_ENTRY_OFFSET 0x0
-+.org VIRT_ENTRY_OFFSET
+ .globl startup_64
+startup_64:
-+ENTRY(_start)
+ movq $(init_thread_union+THREAD_SIZE-8),%rsp
+
+ /* rsi is pointer to startup info structure.
@@ -35775,6 +43821,13 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/head-xen.S tmp-linux-2.6-xen
+ pushq $0 # fake return address
+ jmp x86_64_start_kernel
+
++#ifdef CONFIG_ACPI_SLEEP
++.org 0xf00
++ .globl pGDT32
++pGDT32:
++ .word gdt_end-cpu_gdt_table-1
++ .long cpu_gdt_table-__START_KERNEL_map
++#endif
+ENTRY(stext)
+ENTRY(_stext)
+
@@ -35788,15 +43841,14 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/head-xen.S tmp-linux-2.6-xen
+NEXT_PAGE(init_level4_pgt)
+ /* This gets initialized in x86_64_start_kernel */
+ .fill 512,8,0
-+
++NEXT_PAGE(init_level4_user_pgt)
+ /*
+ * We update two pgd entries to make kernel and user pgd consistent
+ * at pgd_populate(). It can be used for kernel modules. So we place
+ * this page here for those cases to avoid memory corruption.
-+ * We also use this page to establish the initiali mapping for
++ * We also use this page to establish the initial mapping for the
+ * vsyscall area.
+ */
-+NEXT_PAGE(init_level4_user_pgt)
+ .fill 512,8,0
+
+NEXT_PAGE(level3_kernel_pgt)
@@ -35836,6 +43888,14 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/head-xen.S tmp-linux-2.6-xen
+#undef NEXT_PAGE
+
+ .data
++/* Just dummy symbol to allow compilation. Not used in sleep path */
++#ifdef CONFIG_ACPI_SLEEP
++ .align PAGE_SIZE
++ENTRY(wakeup_level4_pgt)
++ .fill 512,8,0
++#endif
++
++ .data
+
+ .align 16
+ .globl cpu_gdt_descr
@@ -35910,7 +43970,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/head-xen.S tmp-linux-2.6-xen
+ .ascii ",ELF_PADDR_OFFSET=0x"
+ utoh __START_KERNEL_map
+ .ascii ",VIRT_ENTRY=0x"
-+ utoh (__START_KERNEL_map + __PHYSICAL_START + VIRT_ENTRY_OFFSET)
++ utoh (__START_KERNEL_map + __PHYSICAL_START)
+ .ascii ",HYPERCALL_PAGE=0x"
+ utoh (phys_hypercall_page >> PAGE_SHIFT)
+ .ascii ",FEATURES=writable_page_tables"
@@ -35936,9 +43996,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/head-xen.S tmp-linux-2.6-xen
+ ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz, "writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel")
+ ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz, "generic")
+ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/head64-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/head64-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/head64-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/head64-xen.c 2008-02-15 16:21:55.000000000 -0800
@@ -0,0 +1,162 @@
+/*
+ * linux/arch/x86_64/kernel/head64.c -- prepare to run common code
@@ -36102,9 +44162,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/head64-xen.c tmp-linux-2.6-x
+ setup_boot_cpu_data();
+ start_kernel();
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/init_task.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/init_task.c
+--- linux-2.6.18.8/arch/x86_64/kernel/init_task.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/init_task.c 2008-02-15 16:21:55.000000000 -0800
@@ -37,6 +37,8 @@ union thread_union init_thread_union
struct task_struct init_task = INIT_TASK(init_task);
@@ -36121,10 +44181,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/init_task.c tmp-linux-2.6-xe
+#endif
#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,2269 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/io_apic-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/io_apic-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/io_apic-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/io_apic-xen.c 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,2262 @@
+/*
+ * Intel IO-APIC support for multi-Pentium hosts.
+ *
@@ -36250,7 +44310,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/io_apic-xen.c tmp-linux-2.6-
+ apic_op.apic_physbase = mp_ioapics[apic].mpc_apicaddr;
+ apic_op.reg = reg;
+ apic_op.value = value;
-+ HYPERVISOR_physdev_op(PHYSDEVOP_apic_write, &apic_op);
++ WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_apic_write, &apic_op));
+}
+
+#define io_apic_read(a,r) xen_io_apic_read(a,r)
@@ -37313,8 +45373,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/io_apic-xen.c tmp-linux-2.6-
+ return;
+}
+
-+#if 0
-+
+static __apicdebuginit void print_APIC_bitfield (int base)
+{
+ unsigned int v;
@@ -37449,11 +45507,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/io_apic-xen.c tmp-linux-2.6-
+ v = inb(0x4d1) << 8 | inb(0x4d0);
+ printk(KERN_DEBUG "... PIC ELCR: %04x\n", v);
+}
-+
-+#endif /* 0 */
-+
-+#else
-+void __init print_IO_APIC(void) { }
+#endif /* !CONFIG_XEN */
+
+static void __init enable_IO_APIC(void)
@@ -38394,10 +46447,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/io_apic-xen.c tmp-linux-2.6-
+}
+#endif
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,99 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/ioport-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/ioport-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/ioport-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/ioport-xen.c 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,100 @@
+/*
+ * linux/arch/x86_64/kernel/ioport.c
+ *
@@ -38461,7 +46514,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/ioport-xen.c tmp-linux-2.6-x
+
+ set_xen_guest_handle(set_iobitmap.bitmap, (char *)bitmap);
+ set_iobitmap.nr_ports = IO_BITMAP_BITS;
-+ HYPERVISOR_physdev_op(PHYSDEVOP_set_iobitmap, &set_iobitmap);
++ WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_set_iobitmap,
++ &set_iobitmap));
+ }
+
+ set_bitmap(t->io_bitmap_ptr, from, num, !turn_on);
@@ -38493,13 +46547,13 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/ioport-xen.c tmp-linux-2.6-x
+
+ /* Force the change at ring 0. */
+ set_iopl.iopl = (new_iopl == 0) ? 1 : new_iopl;
-+ HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
++ WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl));
+
+ return 0;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/irq-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/irq-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/irq-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/irq-xen.c 2008-02-15 16:21:55.000000000 -0800
@@ -0,0 +1,197 @@
+/*
+ * linux/arch/x86_64/kernel/irq.c
@@ -38698,9 +46752,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/irq-xen.c tmp-linux-2.6-xen.
+ printk("unexpected IRQ trap at vector %02x\n", irq);
+}
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/ldt-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/ldt-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/ldt-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/ldt-xen.c 2008-02-15 16:21:55.000000000 -0800
@@ -0,0 +1,282 @@
+/*
+ * linux/arch/x86_64/kernel/ldt.c
@@ -38984,9 +47038,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/ldt-xen.c tmp-linux-2.6-xen.
+ }
+ return ret;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/machine_kexec.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/machine_kexec.c
+--- linux-2.6.18.8/arch/x86_64/kernel/machine_kexec.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/machine_kexec.c 2008-02-15 16:21:55.000000000 -0800
@@ -15,6 +15,113 @@
#include <asm/mmu_context.h>
#include <asm/io.h>
@@ -39305,9 +47359,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/machine_kexec.c tmp-linux-2.
+ image->start);
}
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/mpparse-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/mpparse-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/mpparse-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/mpparse-xen.c 2008-02-15 16:21:55.000000000 -0800
@@ -0,0 +1,1011 @@
+/*
+ * Intel Multiprocessor Specification 1.1 and 1.4
@@ -40320,9 +48374,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/mpparse-xen.c tmp-linux-2.6-
+
+#endif /*CONFIG_X86_IO_APIC*/
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/pci-swiotlb-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/pci-swiotlb-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/pci-swiotlb-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/pci-swiotlb-xen.c 2008-02-15 16:21:55.000000000 -0800
@@ -0,0 +1,55 @@
+/* Glue code to lib/swiotlb.c */
+
@@ -40379,10 +48433,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/pci-swiotlb-xen.c tmp-linux-
+ }
+#endif
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,829 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/process-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/process-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/process-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/process-xen.c 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,833 @@
+/*
+ * linux/arch/x86-64/kernel/process.c
+ *
@@ -40537,7 +48591,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/process-xen.c tmp-linux-2.6-
+ local_irq_disable();
+ cpu_clear(smp_processor_id(), cpu_initialized);
+ preempt_enable_no_resched();
-+ HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL);
++ VOID(HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL));
+ cpu_bringup();
+}
+#else
@@ -40703,7 +48757,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/process-xen.c tmp-linux-2.6-
+ put_cpu();
+#endif
+#ifdef CONFIG_XEN
-+ HYPERVISOR_physdev_op(PHYSDEVOP_set_iobitmap, &iobmp_op);
++ WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_set_iobitmap,
++ &iobmp_op));
+#endif
+ t->io_bitmap_max = 0;
+ }
@@ -40711,7 +48766,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/process-xen.c tmp-linux-2.6-
+
+void load_gs_index(unsigned gs)
+{
-+ HYPERVISOR_set_segment_base(SEGBASE_GS_USER_SEL, gs);
++ WARN_ON(HYPERVISOR_set_segment_base(SEGBASE_GS_USER_SEL, gs));
+}
+
+void flush_thread(void)
@@ -40935,7 +48990,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/process-xen.c tmp-linux-2.6-
+ mcl++;
+ }
+
-+ (void)HYPERVISOR_multicall(_mcl, mcl - _mcl);
++ BUG_ON(mcl > _mcl + ARRAY_SIZE(_mcl));
++ if (unlikely(HYPERVISOR_multicall_check(_mcl, mcl - _mcl, NULL)))
++ BUG();
++
+ /*
+ * Switch DS and ES.
+ * This won't pick up thread selector changes, but I guess that is ok.
@@ -40953,13 +49011,13 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/process-xen.c tmp-linux-2.6-
+ loadsegment(fs, next->fsindex);
+
+ if (next->fs)
-+ HYPERVISOR_set_segment_base(SEGBASE_FS, next->fs);
++ WARN_ON(HYPERVISOR_set_segment_base(SEGBASE_FS, next->fs));
+
+ if (unlikely(next->gsindex))
+ load_gs_index(next->gsindex);
+
+ if (next->gs)
-+ HYPERVISOR_set_segment_base(SEGBASE_GS_USER, next->gs);
++ WARN_ON(HYPERVISOR_set_segment_base(SEGBASE_GS_USER, next->gs));
+
+ /*
+ * Switch the PDA context.
@@ -41212,9 +49270,9 @@ 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-11-16 16:18:11.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/relocate_kernel.S linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/relocate_kernel.S
+--- linux-2.6.18.8/arch/x86_64/kernel/relocate_kernel.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/relocate_kernel.S 2008-02-15 16:21:55.000000000 -0800
@@ -7,31 +7,195 @@
*/
@@ -41451,10 +49509,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/relocate_kernel.S tmp-linux-
+idt_80:
+ .word 0 /* limit */
+ .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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,1677 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/setup-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/setup-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/setup-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/setup-xen.c 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,1662 @@
+/*
+ * linux/arch/x86-64/kernel/setup.c
+ *
@@ -41528,6 +49586,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xe
+#include <asm/hypervisor.h>
+#include <xen/interface/nmi.h>
+#include <xen/features.h>
++#include <xen/firmware.h>
+#include <xen/xencons.h>
+#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
+#define PFN_PHYS(x) ((x) << PAGE_SHIFT)
@@ -41991,6 +50050,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xe
+#ifdef CONFIG_EDD_MODULE
+EXPORT_SYMBOL(edd);
+#endif
++#ifndef CONFIG_XEN
+/**
+ * copy_edd() - Copy the BIOS EDD information
+ * from boot_params into a safe place.
@@ -42003,6 +50063,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xe
+ edd.mbr_signature_nr = EDD_MBR_SIG_NR;
+ edd.edd_info_nr = EDD_NR;
+}
++#endif
+#else
+static inline void copy_edd(void)
+{
@@ -42048,48 +50109,28 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xe
+ screen_info = SCREEN_INFO;
+
+ if (is_initial_xendomain()) {
-+ /* This is drawn from a dump from vgacon:startup in
-+ * standard Linux. */
-+ screen_info.orig_video_mode = 3;
-+ screen_info.orig_video_isVGA = 1;
-+ screen_info.orig_video_lines = 25;
-+ screen_info.orig_video_cols = 80;
-+ screen_info.orig_video_ega_bx = 3;
-+ screen_info.orig_video_points = 16;
-+ screen_info.orig_y = screen_info.orig_video_lines - 1;
-+ if (xen_start_info->console.dom0.info_size >=
-+ sizeof(struct dom0_vga_console_info)) {
-+ const struct dom0_vga_console_info *info =
-+ (struct dom0_vga_console_info *)(
-+ (char *)xen_start_info +
-+ xen_start_info->console.dom0.info_off);
-+ dom0_init_screen_info(info);
-+ }
++ const struct dom0_vga_console_info *info =
++ (void *)((char *)xen_start_info +
++ xen_start_info->console.dom0.info_off);
++
++ dom0_init_screen_info(info,
++ xen_start_info->console.dom0.info_size);
+ xen_start_info->console.domU.mfn = 0;
+ xen_start_info->console.domU.evtchn = 0;
+ } else
+ screen_info.orig_video_isVGA = 0;
+
-+ edid_info = EDID_INFO;
-+ saved_video_mode = SAVED_VIDEO_MODE;
-+ bootloader_type = LOADER_TYPE;
-+
-+#ifdef CONFIG_BLK_DEV_RAM
-+ rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;
-+ rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0);
-+ rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0);
-+
-+
-+#endif
++ copy_edid();
+
-+ HYPERVISOR_vm_assist(VMASST_CMD_enable,
-+ VMASST_TYPE_writable_pagetables);
++ WARN_ON(HYPERVISOR_vm_assist(VMASST_CMD_enable,
++ VMASST_TYPE_writable_pagetables));
+
+ ARCH_SETUP
+#else
+ ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
+ screen_info = SCREEN_INFO;
+ edid_info = EDID_INFO;
++#endif /* !CONFIG_XEN */
+ saved_video_mode = SAVED_VIDEO_MODE;
+ bootloader_type = LOADER_TYPE;
+
@@ -42098,7 +50139,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xe
+ rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0);
+ rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0);
+#endif
-+#endif /* !CONFIG_XEN */
+ setup_memory_region();
+ copy_edd();
+
@@ -42317,6 +50357,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xe
+ virt_to_mfn(pfn_to_mfn_frame_list_list);
+ }
+
++ /* Mark all ISA DMA channels in-use - using them wouldn't work. */
++ for (i = 0; i < MAX_DMA_CHANNELS; ++i)
++ if (i != 4 && request_dma(i, "xen") != 0)
++ BUG();
+ }
+
+ if (!is_initial_xendomain()) {
@@ -42411,7 +50455,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xe
+ struct physdev_set_iopl set_iopl;
+
+ set_iopl.iopl = 1;
-+ HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
++ WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl));
+
+ if (is_initial_xendomain()) {
+#ifdef CONFIG_VT
@@ -42427,7 +50471,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xe
+#endif
+ }
+ }
-+ xencons_early_setup();
+#else /* CONFIG_XEN */
+
+#ifdef CONFIG_VT
@@ -43132,10 +51175,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xe
+}
+device_initcall(add_pcspkr);
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,361 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/setup64-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/setup64-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/setup64-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/setup64-xen.c 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,367 @@
+/*
+ * X86-64 specific CPU setup.
+ * Copyright (C) 1995 Linus Torvalds
@@ -43266,11 +51309,11 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup64-xen.c tmp-linux-2.6-
+#ifdef CONFIG_XEN
+static void switch_pt(void)
+{
-+ xen_pt_switch(__pa(init_level4_pgt));
-+ xen_new_user_pt(__pa(init_level4_user_pgt));
++ xen_pt_switch(__pa_symbol(init_level4_pgt));
++ xen_new_user_pt(__pa_symbol(__user_pgd(init_level4_pgt)));
+}
+
-+void __cpuinit cpu_gdt_init(struct desc_ptr *gdt_descr)
++static void __cpuinit cpu_gdt_init(const struct desc_ptr *gdt_descr)
+{
+ unsigned long frames[16];
+ unsigned long va;
@@ -43283,7 +51326,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup64-xen.c tmp-linux-2.6-
+ make_page_readonly(
+ (void *)va, XENFEAT_writable_descriptor_tables);
+ }
-+ if (HYPERVISOR_set_gdt(frames, gdt_descr->size /
++ if (HYPERVISOR_set_gdt(frames, (gdt_descr->size + 1) /
+ sizeof (struct desc_struct)))
+ BUG();
+}
@@ -43293,7 +51336,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup64-xen.c tmp-linux-2.6-
+ asm volatile("movq %0,%%cr3" :: "r" (__pa_symbol(&init_level4_pgt)));
+}
+
-+void __init cpu_gdt_init(struct desc_ptr *gdt_descr)
++static void __cpuinit cpu_gdt_init(const struct desc_ptr *gdt_descr)
+{
+ asm volatile("lgdt %0" :: "m" (*gdt_descr));
+ asm volatile("lidt %0" :: "m" (idt_descr));
@@ -43309,7 +51352,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup64-xen.c tmp-linux-2.6-
+#ifndef CONFIG_XEN
+ wrmsrl(MSR_GS_BASE, pda);
+#else
-+ HYPERVISOR_set_segment_base(SEGBASE_GS_KERNEL, (unsigned long)pda);
++ if (HYPERVISOR_set_segment_base(SEGBASE_GS_KERNEL,
++ (unsigned long)pda))
++ BUG();
+#endif
+ pda->cpunumber = cpu;
+ pda->irqcount = -1;
@@ -43372,6 +51417,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup64-xen.c tmp-linux-2.6-
+ }
+}
+
++unsigned long kernel_eflags;
++
+/*
+ * cpu_init() initializes state that is per-CPU. Some data is already
+ * initialized (naturally) in the bootstrap process, such as the GDT
@@ -43496,11 +51543,171 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/setup64-xen.c tmp-linux-2.6-
+ set_debugreg(0UL, 7);
+
+ fpu_init();
++
++ raw_local_save_flags(kernel_eflags);
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,600 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/signal.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/signal.c
+--- linux-2.6.18.8/arch/x86_64/kernel/signal.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/signal.c 2008-02-15 16:21:55.000000000 -0800
+@@ -38,37 +38,6 @@ int ia32_setup_frame(int sig, struct k_s
+ sigset_t *set, struct pt_regs * regs);
+
+ asmlinkage long
+-sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, struct pt_regs *regs)
+-{
+- sigset_t saveset, newset;
+-
+- /* XXX: Don't preclude handling different sized sigset_t's. */
+- if (sigsetsize != sizeof(sigset_t))
+- return -EINVAL;
+-
+- if (copy_from_user(&newset, unewset, sizeof(newset)))
+- return -EFAULT;
+- sigdelsetmask(&newset, ~_BLOCKABLE);
+-
+- spin_lock_irq(&current->sighand->siglock);
+- saveset = current->blocked;
+- current->blocked = newset;
+- recalc_sigpending();
+- spin_unlock_irq(&current->sighand->siglock);
+-#ifdef DEBUG_SIG
+- printk("rt_sigsuspend savset(%lx) newset(%lx) regs(%p) rip(%lx)\n",
+- saveset, newset, regs, regs->rip);
+-#endif
+- regs->rax = -EINTR;
+- while (1) {
+- current->state = TASK_INTERRUPTIBLE;
+- schedule();
+- if (do_signal(regs, &saveset))
+- return -EINTR;
+- }
+-}
+-
+-asmlinkage long
+ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
+ struct pt_regs *regs)
+ {
+@@ -341,11 +310,11 @@ static int setup_rt_frame(int sig, struc
+ current->comm, current->pid, frame, regs->rip, frame->pretcode);
+ #endif
+
+- return 1;
++ return 0;
+
+ give_sigsegv:
+ force_sigsegv(sig, current);
+- return 0;
++ return -EFAULT;
+ }
+
+ /*
+@@ -408,7 +377,7 @@ handle_signal(unsigned long sig, siginfo
+ #endif
+ ret = setup_rt_frame(sig, ka, info, oldset, regs);
+
+- if (ret) {
++ if (ret == 0) {
+ spin_lock_irq(&current->sighand->siglock);
+ sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+ if (!(ka->sa.sa_flags & SA_NODEFER))
+@@ -425,11 +394,12 @@ handle_signal(unsigned long sig, siginfo
+ * want to handle. Thus you cannot kill init even with a SIGKILL even by
+ * mistake.
+ */
+-int do_signal(struct pt_regs *regs, sigset_t *oldset)
++static void do_signal(struct pt_regs *regs)
+ {
+ struct k_sigaction ka;
+ siginfo_t info;
+ int signr;
++ sigset_t *oldset;
+
+ /*
+ * We want the common case to go fast, which
+@@ -438,9 +408,11 @@ int do_signal(struct pt_regs *regs, sigs
+ * if so.
+ */
+ if (!user_mode(regs))
+- return 1;
++ return;
+
+- if (!oldset)
++ if (test_thread_flag(TIF_RESTORE_SIGMASK))
++ oldset = &current->saved_sigmask;
++ else
+ oldset = &current->blocked;
+
+ signr = get_signal_to_deliver(&info, &ka, regs, NULL);
+@@ -454,30 +426,46 @@ int do_signal(struct pt_regs *regs, sigs
+ set_debugreg(current->thread.debugreg7, 7);
+
+ /* Whee! Actually deliver the signal. */
+- return handle_signal(signr, &info, &ka, oldset, regs);
++ if (handle_signal(signr, &info, &ka, oldset, regs) == 0) {
++ /* a signal was successfully delivered; the saved
++ * sigmask will have been stored in the signal frame,
++ * and will be restored by sigreturn, so we can simply
++ * clear the TIF_RESTORE_SIGMASK flag */
++ clear_thread_flag(TIF_RESTORE_SIGMASK);
++ }
++ return;
+ }
+
+ /* Did we come from a system call? */
+ if ((long)regs->orig_rax >= 0) {
+ /* Restart the system call - no handlers present */
+ long res = regs->rax;
+- if (res == -ERESTARTNOHAND ||
+- res == -ERESTARTSYS ||
+- res == -ERESTARTNOINTR) {
++ switch (res) {
++ case -ERESTARTNOHAND:
++ case -ERESTARTSYS:
++ case -ERESTARTNOINTR:
+ regs->rax = regs->orig_rax;
+ regs->rip -= 2;
+- }
+- if (regs->rax == (unsigned long)-ERESTART_RESTARTBLOCK) {
++ break;
++ case -ERESTART_RESTARTBLOCK:
+ regs->rax = test_thread_flag(TIF_IA32) ?
+ __NR_ia32_restart_syscall :
+ __NR_restart_syscall;
+ regs->rip -= 2;
++ break;
+ }
+ }
+- return 0;
++
++ /* if there's no signal to deliver, we just put the saved sigmask
++ back. */
++ if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
++ clear_thread_flag(TIF_RESTORE_SIGMASK);
++ sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
++ }
+ }
+
+-void do_notify_resume(struct pt_regs *regs, sigset_t *oldset, __u32 thread_info_flags)
++void
++do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
+ {
+ #ifdef DEBUG_SIG
+ printk("do_notify_resume flags:%x rip:%lx rsp:%lx caller:%lx pending:%lx\n",
+@@ -491,8 +479,8 @@ void do_notify_resume(struct pt_regs *re
+ }
+
+ /* deal with pending signal delivery */
+- if (thread_info_flags & _TIF_SIGPENDING)
+- do_signal(regs,oldset);
++ if (thread_info_flags & (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK))
++ do_signal(regs);
+ }
+
+ void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/smp-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/smp-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/smp-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/smp-xen.c 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,577 @@
+/*
+ * Intel SMP support routines.
+ *
@@ -43792,17 +51999,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/smp-xen.c tmp-linux-2.6-xen.
+{
+ on_each_cpu(do_flush_tlb_all, NULL, 1, 1);
+}
-+#else
-+asmlinkage void smp_invalidate_interrupt (void)
-+{ return; }
-+void flush_tlb_current_task(void)
-+{ xen_tlb_flush_mask(&current->mm->cpu_vm_mask); }
-+void flush_tlb_mm (struct mm_struct * mm)
-+{ xen_tlb_flush_mask(&mm->cpu_vm_mask); }
-+void flush_tlb_page(struct vm_area_struct * vma, unsigned long va)
-+{ xen_invlpg_mask(&vma->vm_mm->cpu_vm_mask, va); }
-+void flush_tlb_all(void)
-+{ xen_tlb_flush_all(); }
+#endif /* Xen */
+
+/*
@@ -43935,21 +52131,13 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/smp-xen.c tmp-linux-2.6-xen.
+
+ /* Wait for response */
+ while (atomic_read(&data.started) != cpus)
-+#ifndef CONFIG_XEN
+ cpu_relax();
-+#else
-+ barrier();
-+#endif
+
+ if (!wait)
+ return;
+
+ while (atomic_read(&data.finished) != cpus)
-+#ifndef CONFIG_XEN
+ cpu_relax();
-+#else
-+ barrier();
-+#endif
+}
+
+/*
@@ -43985,9 +52173,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/smp-xen.c tmp-linux-2.6-xen.
+ */
+ cpu_clear(smp_processor_id(), cpu_online_map);
+ local_irq_save(flags);
-+#ifndef CONFIG_XEN
-+ disable_local_APIC();
-+#endif
++ disable_all_local_evtchn();
+ local_irq_restore(flags);
+}
+
@@ -44015,9 +52201,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/smp-xen.c tmp-linux-2.6-xen.
+ spin_unlock(&call_lock);
+
+ local_irq_disable();
-+#ifndef CONFIG_XEN
-+ disable_local_APIC();
-+#endif
++ disable_all_local_evtchn();
+ local_irq_enable();
+}
+
@@ -44101,10 +52285,28 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/smp-xen.c tmp-linux-2.6-xen.
+ return 0; /* Should not happen */
+#endif
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,1175 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/suspend.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/suspend.c
+--- linux-2.6.18.8/arch/x86_64/kernel/suspend.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/suspend.c 2008-02-15 16:21:55.000000000 -0800
+@@ -114,12 +114,14 @@ void restore_processor_state(void)
+
+ void fix_processor_context(void)
+ {
++#ifndef CONFIG_X86_NO_TSS
+ int cpu = smp_processor_id();
+ struct tss_struct *t = &per_cpu(init_tss, cpu);
+
+ set_tss_desc(cpu,t); /* This just modifies memory; should not be neccessary. But... This is neccessary, because 386 hardware has concept of busy TSS or some similar stupidity. */
+
+ cpu_gdt(cpu)[GDT_ENTRY_TSS].type = 9;
++#endif
+
+ syscall_init(); /* This sets MSR_*STAR and related */
+ load_TR_desc(); /* This does ltr */
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/traps-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/traps-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/traps-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/traps-xen.c 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,1173 @@
+/*
+ * linux/arch/x86-64/traps.c
+ *
@@ -45217,7 +53419,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/traps-xen.c tmp-linux-2.6-xe
+#endif
+ { 19, 0|4, __KERNEL_CS, (unsigned long)simd_coprocessor_error },
+#ifdef CONFIG_IA32_EMULATION
-+ { IA32_SYSCALL_VECTOR, 3|4, __KERNEL_CS, (unsigned long)ia32_syscall},
++ { IA32_SYSCALL_VECTOR, 3, __KERNEL_CS, (unsigned long)ia32_syscall},
+#endif
+ { 0, 0, 0, 0 }
+};
@@ -45227,10 +53429,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/traps-xen.c tmp-linux-2.6-xe
+ int ret;
+
+ ret = HYPERVISOR_set_trap_table(trap_table);
-+
+ if (ret)
-+ printk("HYPERVISOR_set_trap_table faild: error %d\n",
-+ ret);
++ printk("HYPERVISOR_set_trap_table failed: error %d\n", ret);
+
+ /*
+ * Should be a barrier for any external CPU state.
@@ -45240,7 +53440,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/traps-xen.c tmp-linux-2.6-xe
+
+void smp_trap_init(trap_info_t *trap_ctxt)
+{
-+ trap_info_t *t = trap_table;
++ const trap_info_t *t = trap_table;
+
+ for (t = trap_table; t->address; t++) {
+ trap_ctxt[t->vector].flags = t->flags;
@@ -45280,9 +53480,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/traps-xen.c tmp-linux-2.6-xe
+}
+__setup("call_trace=", call_trace_setup);
+#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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/vmlinux.lds.S linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/vmlinux.lds.S
+--- linux-2.6.18.8/arch/x86_64/kernel/vmlinux.lds.S 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/vmlinux.lds.S 2008-02-15 16:21:55.000000000 -0800
@@ -13,6 +13,13 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86
OUTPUT_ARCH(i386:x86-64)
ENTRY(phys_startup_64)
@@ -45365,10 +53565,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/vmlinux.lds.S tmp-linux-2.6-
+
+ NOTES
}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,239 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/vsyscall-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/vsyscall-xen.c
+--- linux-2.6.18.8/arch/x86_64/kernel/vsyscall-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/vsyscall-xen.c 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1,227 @@
+/*
+ * linux/arch/x86_64/kernel/vsyscall.c
+ *
@@ -45579,17 +53779,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/vsyscall-xen.c tmp-linux-2.6
+ __set_fixmap(VSYSCALL_FIRST_PAGE, physaddr_page0, PAGE_KERNEL_VSYSCALL);
+}
+
-+#ifdef CONFIG_XEN
-+static void __init map_vsyscall_user(void)
-+{
-+ extern void __set_fixmap_user(enum fixed_addresses, unsigned long, pgprot_t);
-+ extern char __vsyscall_0;
-+ unsigned long physaddr_page0 = __pa_symbol(&__vsyscall_0);
-+
-+ __set_fixmap_user(VSYSCALL_FIRST_PAGE, physaddr_page0, PAGE_KERNEL_VSYSCALL);
-+}
-+#endif
-+
+static int __init vsyscall_init(void)
+{
+ BUG_ON(((unsigned long) &vgettimeofday !=
@@ -45598,7 +53787,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/vsyscall-xen.c tmp-linux-2.6
+ BUG_ON((VSYSCALL_ADDR(0) != __fix_to_virt(VSYSCALL_FIRST_PAGE)));
+ map_vsyscall();
+#ifdef CONFIG_XEN
-+ map_vsyscall_user();
+ sysctl_vsyscall = 0; /* disable vgettimeofay() */
+#endif
+#ifdef CONFIG_SYSCTL
@@ -45608,9 +53796,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/kernel/xen_entry.S linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/xen_entry.S
+--- linux-2.6.18.8/arch/x86_64/kernel/xen_entry.S 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/kernel/xen_entry.S 2008-02-15 16:21:55.000000000 -0800
@@ -0,0 +1,40 @@
+/*
+ * Copied from arch/xen/i386/kernel/entry.S
@@ -45652,26 +53840,34 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/kernel/xen_entry.S tmp-linux-2.6-xe
+VGCF_IN_SYSCALL = (1<<8)
+
+
-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-11-14 15:35:27.000000000 -0800
-@@ -9,3 +9,13 @@ obj-$(CONFIG_K8_NUMA) += k8topology.o
+diff -rpuN linux-2.6.18.8/arch/x86_64/lib/Makefile linux-2.6.18-xen-3.2.0/arch/x86_64/lib/Makefile
+--- linux-2.6.18.8/arch/x86_64/lib/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/lib/Makefile 2008-02-15 16:21:55.000000000 -0800
+@@ -10,3 +10,4 @@ lib-y := csum-partial.o csum-copy.o csum
+ usercopy.o getuser.o putuser.o \
+ thunk.o clear_page.o copy_page.o bitstr.o bitops.o
+ lib-y += memcpy.o memmove.o memset.o copy_user.o
++lib-$(CONFIG_XEN_SCRUB_PAGES) += scrub.o
+diff -rpuN linux-2.6.18.8/arch/x86_64/lib/scrub.c linux-2.6.18-xen-3.2.0/arch/x86_64/lib/scrub.c
+--- linux-2.6.18.8/arch/x86_64/lib/scrub.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/lib/scrub.c 2008-02-15 16:21:55.000000000 -0800
+@@ -0,0 +1 @@
++#include "../../i386/lib/scrub.c"
+diff -rpuN linux-2.6.18.8/arch/x86_64/mm/Makefile linux-2.6.18-xen-3.2.0/arch/x86_64/mm/Makefile
+--- linux-2.6.18.8/arch/x86_64/mm/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/mm/Makefile 2008-02-15 16:21:56.000000000 -0800
+@@ -7,5 +7,8 @@ obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpag
+ obj-$(CONFIG_NUMA) += numa.o
+ obj-$(CONFIG_K8_NUMA) += k8topology.o
obj-$(CONFIG_ACPI_NUMA) += srat.o
++obj-$(CONFIG_XEN) += hypervisor.o
hugetlbpage-y = ../../i386/mm/hugetlbpage.o
-+
-+ifdef CONFIG_XEN
-+include $(srctree)/scripts/Makefile.xen
-+
-+ioremap-y += ../../i386/mm/ioremap-xen.o
-+hypervisor-y += ../../i386/mm/hypervisor.o
-+obj-y += hypervisor.o
-+
-+obj-y := $(call cherrypickxen, $(obj-y))
-+endif
-diff -Nurp 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-11-14 15:35:27.000000000 -0800
++ioremap-$(CONFIG_XEN) := ../../i386/mm/ioremap.o
++hypervisor-y := ../../i386/mm/hypervisor.o
+diff -rpuN linux-2.6.18.8/arch/x86_64/mm/fault-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/mm/fault-xen.c
+--- linux-2.6.18.8/arch/x86_64/mm/fault-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/mm/fault-xen.c 2008-02-15 16:21:56.000000000 -0800
@@ -0,0 +1,724 @@
+/*
+ * linux/arch/x86-64/mm/fault.c
@@ -46055,7 +54251,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/fault-xen.c tmp-linux-2.6-xen.pa
+ return 0;
+ if ((error_code & PF_WRITE) && !pte_write(*pte))
+ return 0;
-+ if ((error_code & PF_INSTR) && (pte_val(*pte) & _PAGE_NX))
++ if ((error_code & PF_INSTR) && (__pte_val(*pte) & _PAGE_NX))
+ return 0;
+
+ return 1;
@@ -46397,10 +54593,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/fault-xen.c tmp-linux-2.6-xen.pa
+ return 1;
+}
+__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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,1238 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/mm/init-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/mm/init-xen.c
+--- linux-2.6.18.8/arch/x86_64/mm/init-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/mm/init-xen.c 2008-02-15 16:21:56.000000000 -0800
+@@ -0,0 +1,1207 @@
+/*
+ * linux/arch/x86_64/mm/init.c
+ *
@@ -46630,14 +54826,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+ return ptr;
+}
+
-+#define pgd_offset_u(address) (pgd_t *)(init_level4_user_pgt + pgd_index(address))
-+
-+static inline pud_t *pud_offset_u(unsigned long address)
-+{
-+ pud_t *pud = level3_user_pgt;
-+
-+ return pud + pud_index(address);
-+}
++#define pgd_offset_u(address) (__user_pgd(init_level4_pgt) + pgd_index(address))
++#define pud_offset_u(address) (level3_user_pgt + pud_index(address))
+
+static __init void set_pte_phys(unsigned long vaddr,
+ unsigned long phys, pgprot_t prot, int user_mode)
@@ -46681,7 +54871,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+
+ pte = pte_offset_kernel(pmd, vaddr);
+ if (!pte_none(*pte) &&
-+ pte_val(*pte) != (pte_val(new_pte) & __supported_pte_mask))
++ __pte_val(*pte) != (__pte_val(new_pte) & __supported_pte_mask))
+ pte_ERROR(*pte);
+ set_pte(pte, new_pte);
+
@@ -46740,9 +54930,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+ __flush_tlb_one(vaddr);
+}
+
-+#define SET_FIXMAP_KERNEL 0
-+#define SET_FIXMAP_USER 1
-+
+/* NOTE: this is meant to be run only at boot */
+void __init
+__set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
@@ -46755,7 +54942,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+ }
+ switch (idx) {
+ case VSYSCALL_LAST_PAGE ... VSYSCALL_FIRST_PAGE:
-+ set_pte_phys(address, phys, prot, SET_FIXMAP_KERNEL);
++ set_pte_phys(address, phys, prot, 0);
++ set_pte_phys(address, phys, prot, 1);
+ break;
+ default:
+ set_pte_phys_ma(address, phys, prot);
@@ -46763,22 +54951,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+ }
+}
+
-+/*
-+ * This only supports vsyscall area.
-+ */
-+void __init
-+__set_fixmap_user (enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
-+{
-+ unsigned long address = __fix_to_virt(idx);
-+
-+ if (idx >= __end_of_fixed_addresses) {
-+ printk("Invalid __set_fixmap\n");
-+ return;
-+ }
-+
-+ set_pte_phys(address, phys, prot, SET_FIXMAP_USER);
-+}
-+
+unsigned long __initdata table_start, table_end;
+
+static __meminit void *alloc_static_page(unsigned long *phys)
@@ -46982,13 +55154,15 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+ init_level4_pgt[pgd_index(__START_KERNEL_map)] =
+ __pgd(__pa_symbol(level3_kernel_pgt) | _PAGE_TABLE);
+ level3_kernel_pgt[pud_index(__START_KERNEL_map)] =
-+ __pud(__pa_symbol(level2_kernel_pgt) |
-+ _KERNPG_TABLE);
-+ memcpy((void *)level2_kernel_pgt, page, PAGE_SIZE);
++ __pud(__pa_symbol(level2_kernel_pgt) | _PAGE_TABLE);
++ memcpy(level2_kernel_pgt, page, PAGE_SIZE);
++
++ __user_pgd(init_level4_pgt)[pgd_index(VSYSCALL_START)] =
++ __pgd(__pa_symbol(level3_user_pgt) | _PAGE_TABLE);
+
+ early_make_page_readonly(init_level4_pgt,
+ XENFEAT_writable_page_tables);
-+ early_make_page_readonly(init_level4_user_pgt,
++ early_make_page_readonly(__user_pgd(init_level4_pgt),
+ XENFEAT_writable_page_tables);
+ early_make_page_readonly(level3_kernel_pgt,
+ XENFEAT_writable_page_tables);
@@ -46999,11 +55173,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+
+ if (!xen_feature(XENFEAT_writable_page_tables)) {
+ xen_pgd_pin(__pa_symbol(init_level4_pgt));
-+ xen_pgd_pin(__pa_symbol(init_level4_user_pgt));
++ xen_pgd_pin(__pa_symbol(__user_pgd(init_level4_pgt)));
+ }
-+
-+ set_pgd((pgd_t *)(init_level4_user_pgt + 511),
-+ mk_kernel_pgd(__pa_symbol(level3_user_pgt)));
+}
+
+static void __init extend_init_mapping(unsigned long tables_space)
@@ -47021,7 +55192,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+
+ /* Kill mapping of low 1MB. */
+ while (va < (unsigned long)&_text) {
-+ HYPERVISOR_update_va_mapping(va, __pte_ma(0), 0);
++ if (HYPERVISOR_update_va_mapping(va, __pte_ma(0), 0))
++ BUG();
+ va += PAGE_SIZE;
+ }
+
@@ -47054,7 +55226,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+ pmd = (pmd_t *)&page[pmd_index(va)];
+ if (pmd_none(*pmd))
+ break;
-+ HYPERVISOR_update_va_mapping(va, __pte_ma(0), 0);
++ if (HYPERVISOR_update_va_mapping(va, __pte_ma(0), 0))
++ BUG();
+ va += PAGE_SIZE;
+ }
+}
@@ -47107,8 +55280,8 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+ start = PAGE_ALIGN((unsigned long)_end);
+ end = __START_KERNEL_map + (table_end << PAGE_SHIFT);
+ for (; start < end; start += PAGE_SIZE)
-+ WARN_ON(HYPERVISOR_update_va_mapping(
-+ start, __pte_ma(0), 0));
++ if (HYPERVISOR_update_va_mapping(start, __pte_ma(0), 0))
++ BUG();
+
+ /* Allocate pte's for initial fixmaps from 'start_pfn' allocator. */
+ table_end = ~0UL;
@@ -47203,14 +55376,11 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+ unsigned long start_pfn, unsigned long end_pfn)
+{
+ int i;
-+#ifndef CONFIG_XEN
+ unsigned long w;
-+#endif
+
+ for (i = 0; i < MAX_NR_ZONES; i++)
+ z[i] = 0;
+
-+#ifndef CONFIG_XEN
+ if (start_pfn < MAX_DMA_PFN)
+ z[ZONE_DMA] = MAX_DMA_PFN - start_pfn;
+ if (start_pfn < MAX_DMA32_PFN) {
@@ -47251,11 +55421,6 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+ h[ZONE_DMA] = z[ZONE_DMA];
+ }
+ }
-+#else
-+ z[ZONE_DMA] = end_pfn;
-+ for (i = 0; i < MAX_NR_ZONES; i++)
-+ h[i] = 0;
-+#endif
+}
+
+#ifndef CONFIG_NUMA
@@ -47296,7 +55461,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+ pmd = pmd_offset(pud, address);
+ if (!pmd || pmd_none(*pmd))
+ continue;
-+ if (0 == (pmd_val(*pmd) & _PAGE_PSE)) {
++ if (0 == (__pmd_val(*pmd) & _PAGE_PSE)) {
+ /* Could handle this, but it should not happen currently. */
+ printk(KERN_ERR
+ "clear_kernel_mapping: mapping has been split. will leak memory\n");
@@ -47639,10 +55804,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.pat
+{
+ return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END);
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,433 @@
+diff -rpuN linux-2.6.18.8/arch/x86_64/mm/pageattr-xen.c linux-2.6.18-xen-3.2.0/arch/x86_64/mm/pageattr-xen.c
+--- linux-2.6.18.8/arch/x86_64/mm/pageattr-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/mm/pageattr-xen.c 2008-02-15 16:21:56.000000000 -0800
+@@ -0,0 +1,502 @@
+/*
+ * Copyright 2002 Andi Kleen, SuSE Labs.
+ * Thanks to Ben LaHaise for precious feedback.
@@ -47665,17 +55830,84 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/pageattr-xen.c tmp-linux-2.6-xen
+LIST_HEAD(mm_unpinned);
+DEFINE_SPINLOCK(mm_unpinned_lock);
+
-+static inline void mm_walk_set_prot(void *pt, pgprot_t flags)
++static void _pin_lock(struct mm_struct *mm, int lock) {
++ if (lock)
++ spin_lock(&mm->page_table_lock);
++#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
++ /* While mm->page_table_lock protects us against insertions and
++ * removals of higher level page table pages, it doesn't protect
++ * against updates of pte-s. Such updates, however, require the
++ * pte pages to be in consistent state (unpinned+writable or
++ * pinned+readonly). The pinning and attribute changes, however
++ * cannot be done atomically, which is why such updates must be
++ * prevented from happening concurrently.
++ * Note that no pte lock can ever elsewhere be acquired nesting
++ * with an already acquired one in the same mm, or with the mm's
++ * page_table_lock already acquired, as that would break in the
++ * non-split case (where all these are actually resolving to the
++ * one page_table_lock). Thus acquiring all of them here is not
++ * going to result in dead locks, and the order of acquires
++ * doesn't matter.
++ */
++ {
++ pgd_t *pgd = mm->pgd;
++ unsigned g;
++
++ for (g = 0; g <= ((TASK_SIZE64-1) / PGDIR_SIZE); g++, pgd++) {
++ pud_t *pud;
++ unsigned u;
++
++ if (pgd_none(*pgd))
++ continue;
++ pud = pud_offset(pgd, 0);
++ for (u = 0; u < PTRS_PER_PUD; u++, pud++) {
++ pmd_t *pmd;
++ unsigned m;
++
++ if (pud_none(*pud))
++ continue;
++ pmd = pmd_offset(pud, 0);
++ for (m = 0; m < PTRS_PER_PMD; m++, pmd++) {
++ spinlock_t *ptl;
++
++ if (pmd_none(*pmd))
++ continue;
++ ptl = pte_lockptr(0, pmd);
++ if (lock)
++ spin_lock(ptl);
++ else
++ spin_unlock(ptl);
++ }
++ }
++ }
++ }
++#endif
++ if (!lock)
++ spin_unlock(&mm->page_table_lock);
++}
++#define pin_lock(mm) _pin_lock(mm, 1)
++#define pin_unlock(mm) _pin_lock(mm, 0)
++
++#define PIN_BATCH 8
++static DEFINE_PER_CPU(multicall_entry_t[PIN_BATCH], pb_mcl);
++
++static inline unsigned int mm_walk_set_prot(void *pt, pgprot_t flags,
++ unsigned int cpu, unsigned int seq)
+{
+ struct page *page = virt_to_page(pt);
+ unsigned long pfn = page_to_pfn(page);
-+ int rc;
+
-+ rc = HYPERVISOR_update_va_mapping(
++ MULTI_update_va_mapping(per_cpu(pb_mcl, cpu) + seq,
+ (unsigned long)__va(pfn << PAGE_SHIFT),
+ pfn_pte(pfn, flags), 0);
-+ if (rc)
-+ BUG();
++ if (unlikely(++seq == PIN_BATCH)) {
++ if (unlikely(HYPERVISOR_multicall_check(per_cpu(pb_mcl, cpu),
++ PIN_BATCH, NULL)))
++ BUG();
++ seq = 0;
++ }
++
++ return seq;
+}
+
+static void mm_walk(struct mm_struct *mm, pgprot_t flags)
@@ -47685,8 +55917,12 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/pageattr-xen.c tmp-linux-2.6-xen
+ pmd_t *pmd;
+ pte_t *pte;
+ int g,u,m;
++ unsigned int cpu, seq;
++ multicall_entry_t *mcl;
+
+ pgd = mm->pgd;
++ cpu = get_cpu();
++
+ /*
+ * Cannot iterate up to USER_PTRS_PER_PGD as these pagetables may not
+ * be the 'current' task's pagetables (e.g., current may be 32-bit,
@@ -47694,26 +55930,45 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/pageattr-xen.c tmp-linux-2.6-xen
+ * Subtracting 1 from TASK_SIZE64 means the loop limit is correct
+ * regardless of whether TASK_SIZE64 is a multiple of PGDIR_SIZE.
+ */
-+ for (g = 0; g <= ((TASK_SIZE64-1) / PGDIR_SIZE); g++, pgd++) {
++ for (g = 0, seq = 0; g <= ((TASK_SIZE64-1) / PGDIR_SIZE); g++, pgd++) {
+ if (pgd_none(*pgd))
+ continue;
+ pud = pud_offset(pgd, 0);
+ if (PTRS_PER_PUD > 1) /* not folded */
-+ mm_walk_set_prot(pud,flags);
++ seq = mm_walk_set_prot(pud,flags,cpu,seq);
+ for (u = 0; u < PTRS_PER_PUD; u++, pud++) {
+ if (pud_none(*pud))
+ continue;
+ pmd = pmd_offset(pud, 0);
+ if (PTRS_PER_PMD > 1) /* not folded */
-+ mm_walk_set_prot(pmd,flags);
++ seq = mm_walk_set_prot(pmd,flags,cpu,seq);
+ for (m = 0; m < PTRS_PER_PMD; m++, pmd++) {
+ if (pmd_none(*pmd))
+ continue;
+ pte = pte_offset_kernel(pmd,0);
-+ mm_walk_set_prot(pte,flags);
++ seq = mm_walk_set_prot(pte,flags,cpu,seq);
+ }
+ }
+ }
++
++ mcl = per_cpu(pb_mcl, cpu);
++ if (unlikely(seq > PIN_BATCH - 2)) {
++ if (unlikely(HYPERVISOR_multicall_check(mcl, seq, NULL)))
++ BUG();
++ seq = 0;
++ }
++ MULTI_update_va_mapping(mcl + seq,
++ (unsigned long)__user_pgd(mm->pgd),
++ pfn_pte(virt_to_phys(__user_pgd(mm->pgd))>>PAGE_SHIFT, flags),
++ 0);
++ MULTI_update_va_mapping(mcl + seq + 1,
++ (unsigned long)mm->pgd,
++ pfn_pte(virt_to_phys(mm->pgd)>>PAGE_SHIFT, flags),
++ UVMF_TLB_FLUSH);
++ if (unlikely(HYPERVISOR_multicall_check(mcl, seq + 2, NULL)))
++ BUG();
++
++ put_cpu();
+}
+
+void mm_pin(struct mm_struct *mm)
@@ -47721,20 +55976,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/pageattr-xen.c tmp-linux-2.6-xen
+ if (xen_feature(XENFEAT_writable_page_tables))
+ return;
+
-+ spin_lock(&mm->page_table_lock);
++ pin_lock(mm);
+
+ mm_walk(mm, PAGE_KERNEL_RO);
-+ if (HYPERVISOR_update_va_mapping(
-+ (unsigned long)mm->pgd,
-+ pfn_pte(virt_to_phys(mm->pgd)>>PAGE_SHIFT, PAGE_KERNEL_RO),
-+ UVMF_TLB_FLUSH))
-+ BUG();
-+ if (HYPERVISOR_update_va_mapping(
-+ (unsigned long)__user_pgd(mm->pgd),
-+ pfn_pte(virt_to_phys(__user_pgd(mm->pgd))>>PAGE_SHIFT,
-+ PAGE_KERNEL_RO),
-+ UVMF_TLB_FLUSH))
-+ BUG();
+ xen_pgd_pin(__pa(mm->pgd)); /* kernel */
+ xen_pgd_pin(__pa(__user_pgd(mm->pgd))); /* user */
+ mm->context.pinned = 1;
@@ -47742,7 +55986,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/pageattr-xen.c tmp-linux-2.6-xen
+ list_del(&mm->context.unpinned);
+ spin_unlock(&mm_unpinned_lock);
+
-+ spin_unlock(&mm->page_table_lock);
++ pin_unlock(mm);
+}
+
+void mm_unpin(struct mm_struct *mm)
@@ -47750,27 +55994,17 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/pageattr-xen.c tmp-linux-2.6-xen
+ if (xen_feature(XENFEAT_writable_page_tables))
+ return;
+
-+ spin_lock(&mm->page_table_lock);
++ pin_lock(mm);
+
+ xen_pgd_unpin(__pa(mm->pgd));
+ xen_pgd_unpin(__pa(__user_pgd(mm->pgd)));
-+ if (HYPERVISOR_update_va_mapping(
-+ (unsigned long)mm->pgd,
-+ pfn_pte(virt_to_phys(mm->pgd)>>PAGE_SHIFT, PAGE_KERNEL), 0))
-+ BUG();
-+ if (HYPERVISOR_update_va_mapping(
-+ (unsigned long)__user_pgd(mm->pgd),
-+ pfn_pte(virt_to_phys(__user_pgd(mm->pgd))>>PAGE_SHIFT,
-+ PAGE_KERNEL), 0))
-+ BUG();
+ mm_walk(mm, PAGE_KERNEL);
-+ xen_tlb_flush();
+ mm->context.pinned = 0;
+ spin_lock(&mm_unpinned_lock);
+ list_add(&mm->context.unpinned, &mm_unpinned);
+ spin_unlock(&mm_unpinned_lock);
+
-+ spin_unlock(&mm->page_table_lock);
++ pin_unlock(mm);
+}
+
+void mm_pin_all(void)
@@ -47946,7 +56180,7 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/pageattr-xen.c tmp-linux-2.6-xen
+ pud = pud_offset(pgd,address);
+ BUG_ON(pud_none(*pud));
+ pmd = pmd_offset(pud, address);
-+ BUG_ON(pmd_val(*pmd) & _PAGE_PSE);
++ BUG_ON(__pmd_val(*pmd) & _PAGE_PSE);
+ pgprot_val(ref_prot) |= _PAGE_PSE;
+ large_pte = mk_pte_phys(__pa(address) & LARGE_PAGE_MASK, ref_prot);
+ set_pte((pte_t *)pmd, large_pte);
@@ -48076,9 +56310,9 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/mm/pageattr-xen.c tmp-linux-2.6-xen
+
+EXPORT_SYMBOL(change_page_attr);
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/arch/x86_64/oprofile/Makefile linux-2.6.18-xen-3.2.0/arch/x86_64/oprofile/Makefile
+--- linux-2.6.18.8/arch/x86_64/oprofile/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/oprofile/Makefile 2008-02-15 16:21:56.000000000 -0800
@@ -11,9 +11,15 @@ DRIVER_OBJS = $(addprefix ../../../drive
oprofilefs.o oprofile_stats.o \
timer_int.o )
@@ -48097,10 +56331,10 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/oprofile/Makefile tmp-linux-2.6-xen
+endif
+oprofile-y = $(DRIVER_OBJS) $(XENOPROF_COMMON_OBJS) \
+ $(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-11-14 15:35:27.000000000 -0800
-@@ -15,11 +15,23 @@ obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o
+diff -rpuN linux-2.6.18.8/arch/x86_64/pci/Makefile linux-2.6.18-xen-3.2.0/arch/x86_64/pci/Makefile
+--- linux-2.6.18.8/arch/x86_64/pci/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/arch/x86_64/pci/Makefile 2008-02-15 16:21:56.000000000 -0800
+@@ -15,8 +15,13 @@ obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o
obj-$(CONFIG_NUMA) += k8-bus.o
@@ -48114,19 +56348,16700 @@ diff -Nurp pristine-linux-2.6.18/arch/x86_64/pci/Makefile tmp-linux-2.6-xen.patc
legacy-y += ../../i386/pci/legacy.o
irq-y += ../../i386/pci/irq.o
common-y += ../../i386/pci/common.o
- fixup-y += ../../i386/pci/fixup.o
- i386-y += ../../i386/pci/i386.o
- init-y += ../../i386/pci/init.o
+diff -rpuN linux-2.6.18.8/block/elevator.c linux-2.6.18-xen-3.2.0/block/elevator.c
+--- linux-2.6.18.8/block/elevator.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/block/elevator.c 2008-02-15 16:21:56.000000000 -0800
+@@ -493,6 +493,16 @@ struct request *elv_next_request(request
+ int ret;
+
+ while ((rq = __elv_next_request(q)) != NULL) {
++ /*
++ * Kill the empty barrier place holder, the driver must
++ * not ever see it.
++ */
++ if (blk_empty_barrier(rq)) {
++ blkdev_dequeue_request(rq);
++ end_that_request_chunk(rq, 1, 0);
++ end_that_request_last(rq, 1);
++ continue;
++ }
+ if (!(rq->flags & REQ_STARTED)) {
+ elevator_t *e = q->elevator;
+
+diff -rpuN linux-2.6.18.8/block/ll_rw_blk.c linux-2.6.18-xen-3.2.0/block/ll_rw_blk.c
+--- linux-2.6.18.8/block/ll_rw_blk.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/block/ll_rw_blk.c 2008-02-15 16:21:56.000000000 -0800
+@@ -483,9 +483,12 @@ static inline struct request *start_orde
+ * Queue ordered sequence. As we stack them at the head, we
+ * need to queue in reverse order. Note that we rely on that
+ * no fs request uses ELEVATOR_INSERT_FRONT and thus no fs
+- * request gets inbetween ordered sequence.
++ * request gets inbetween ordered sequence. If this request is
++ * an empty barrier, we don't need to do a postflush ever since
++ * there will be no data written between the pre and post flush.
++ * Hence a single flush will suffice.
+ */
+- if (q->ordered & QUEUE_ORDERED_POSTFLUSH)
++ if ((q->ordered & QUEUE_ORDERED_POSTFLUSH) && !blk_empty_barrier(rq))
+ queue_flush(q, QUEUE_ORDERED_POSTFLUSH);
+ else
+ q->ordseq |= QUEUE_ORDSEQ_POSTFLUSH;
+@@ -2967,7 +2970,7 @@ static inline void blk_partition_remap(s
+ {
+ struct block_device *bdev = bio->bi_bdev;
+
+- if (bdev != bdev->bd_contains) {
++ if (bio_sectors(bio) && bdev != bdev->bd_contains) {
+ struct hd_struct *p = bdev->bd_part;
+ const int rw = bio_data_dir(bio);
+
+@@ -3028,7 +3031,7 @@ void generic_make_request(struct bio *bi
+ might_sleep();
+ /* Test device or partition size, when known. */
+ maxsector = bio->bi_bdev->bd_inode->i_size >> 9;
+- if (maxsector) {
++ if (maxsector && nr_sectors) {
+ sector_t sector = bio->bi_sector;
+
+ if (maxsector < nr_sectors || maxsector - nr_sectors < sector) {
+@@ -3094,7 +3097,7 @@ end_io:
+ old_dev = bio->bi_bdev->bd_dev;
+
+ maxsector = bio->bi_bdev->bd_inode->i_size >> 9;
+- if (maxsector) {
++ if (maxsector && nr_sectors) {
+ sector_t sector = bio->bi_sector;
+
+ if (maxsector < nr_sectors || maxsector - nr_sectors < sector) {
+@@ -3128,21 +3131,25 @@ void submit_bio(int rw, struct bio *bio)
+ {
+ int count = bio_sectors(bio);
+
+- BIO_BUG_ON(!bio->bi_size);
+- BIO_BUG_ON(!bio->bi_io_vec);
+ bio->bi_rw |= rw;
+- if (rw & WRITE)
+- count_vm_events(PGPGOUT, count);
+- else
+- count_vm_events(PGPGIN, count);
+
+- if (unlikely(block_dump)) {
+- char b[BDEVNAME_SIZE];
+- printk(KERN_DEBUG "%s(%d): %s block %Lu on %s\n",
+- current->comm, current->pid,
+- (rw & WRITE) ? "WRITE" : "READ",
+- (unsigned long long)bio->bi_sector,
+- bdevname(bio->bi_bdev,b));
++ if (!bio_empty_barrier(bio)) {
++ BIO_BUG_ON(!bio->bi_size);
++ BIO_BUG_ON(!bio->bi_io_vec);
++
++ if (rw & WRITE)
++ count_vm_events(PGPGOUT, count);
++ else
++ count_vm_events(PGPGIN, count);
+
-+ifdef CONFIG_XEN
-+irq-y := ../../i386/pci/irq-xen.o
-+include $(srctree)/scripts/Makefile.xen
++ if (unlikely(block_dump)) {
++ char b[BDEVNAME_SIZE];
++ printk(KERN_DEBUG "%s(%d): %s block %Lu on %s\n",
++ current->comm, current->pid,
++ (rw & WRITE) ? "WRITE" : "READ",
++ (unsigned long long)bio->bi_sector,
++ bdevname(bio->bi_bdev,b));
++ }
+ }
+
+ generic_make_request(bio);
+@@ -3260,6 +3267,13 @@ static int __end_that_request_first(stru
+ while ((bio = req->bio) != NULL) {
+ int nbytes;
+
++ /* For an empty barrier request, the low level driver must
++ * store a potential error location in ->sector. We pass
++ * that back up in ->bi_sector
++ */
++ if (blk_empty_barrier(req))
++ bio->bi_sector = req->sector;
++
+ if (nr_bytes >= bio->bi_size) {
+ req->bio = bio->bi_next;
+ nbytes = bio->bi_size;
+diff -rpuN linux-2.6.18.8/buildconfigs/conf.linux-native/00_xen_to_native linux-2.6.18-xen-3.2.0/buildconfigs/conf.linux-native/00_xen_to_native
+--- linux-2.6.18.8/buildconfigs/conf.linux-native/00_xen_to_native 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/buildconfigs/conf.linux-native/00_xen_to_native 2008-02-15 16:21:56.000000000 -0800
+@@ -0,0 +1,86 @@
++# Linux kernel version: 2.6.16.13-native
++# Mon May 15 10:59:54 2006
++#
++CONFIG_X86_PC=y
++# CONFIG_X86_XEN is not set
++# CONFIG_HPET_TIMER is not set
++# CONFIG_SCHED_SMT is not set
++# CONFIG_X86_MCE is not set
++# CONFIG_X86_MSR is not set
++# CONFIG_SWIOTLB is not set
++# CONFIG_EDD is not set
++CONFIG_ARCH_FLATMEM_ENABLE=y
++CONFIG_ARCH_SPARSEMEM_ENABLE=y
++CONFIG_ARCH_SELECT_MEMORY_MODEL=y
++CONFIG_SPARSEMEM_STATIC=y
++CONFIG_SPLIT_PTLOCK_CPUS=4
++# CONFIG_HIGHPTE is not set
++# CONFIG_MATH_EMULATION is not set
++# CONFIG_EFI is not set
++CONFIG_IRQBALANCE=y
++# CONFIG_KEXEC is not set
++CONFIG_DOUBLEFAULT=y
++CONFIG_PM_LEGACY=y
++# CONFIG_PM_DEBUG is not set
++# CONFIG_SOFTWARE_SUSPEND is not set
++CONFIG_SUSPEND_SMP=y
++CONFIG_ACPI_SLEEP=y
++CONFIG_ACPI_SLEEP_PROC_FS=y
++# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
++CONFIG_X86_PM_TIMER=y
++# APM (Advanced Power Management) BIOS Support
++#
++# CONFIG_APM is not set
+
-+obj-y := $(call cherrypickxen, $(obj-y))
-+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-11-14 15:35:27.000000000 -0800
++#
++CONFIG_PCI_BIOS=y
++# CONFIG_XEN_PCIDEV_FRONTEND is not set
++# CONFIG_XEN_PCIDEV_FE_DEBUG is not set
++# CONFIG_PCI_MSI is not set
++# CONFIG_ISA is not set
++# CONFIG_MCA is not set
++# CONFIG_HOTPLUG_PCI_COMPAQ is not set
++# CONFIG_HOTPLUG_PCI_IBM is not set
++# CONFIG_I2O_EXT_ADAPTEC_DMA64 is not set
++CONFIG_SERIAL_8250=y
++CONFIG_SERIAL_8250_CONSOLE=y
++CONFIG_SERIAL_CORE=y
++CONFIG_SERIAL_CORE_CONSOLE=y
++# CONFIG_TCG_XEN is not set
++# CONFIG_HUGETLBFS is not set
++# CONFIG_XEN is not set
++# CONFIG_XEN_INTERFACE_VERSION is not set
++
++#
++# XEN
++#
++# CONFIG_XEN_PRIVILEGED_GUEST is not set
++# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
++# CONFIG_XEN_BACKEND is not set
++# CONFIG_XEN_PCIDEV_BACKEND is not set
++# CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set
++# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
++# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
++# CONFIG_XEN_BLKDEV_BACKEND is not set
++# CONFIG_XEN_BLKDEV_TAP_BE is not set
++# CONFIG_XEN_NETDEV_BACKEND is not set
++# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
++# CONFIG_XEN_NETDEV_LOOPBACK is not set
++# CONFIG_XEN_TPMDEV_BACKEND is not set
++# CONFIG_XEN_BLKDEV_FRONTEND is not set
++# CONFIG_XEN_NETDEV_FRONTEND is not set
++# CONFIG_XEN_BLKDEV_TAP is not set
++# CONFIG_XEN_SCRUB_PAGES is not set
++# CONFIG_XEN_DISABLE_SERIAL is not set
++# CONFIG_XEN_SYSFS is not set
++# CONFIG_XEN_COMPAT_030002_AND_LATER is not set
++# CONFIG_XEN_COMPAT_030004_AND_LATER is not set
++# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
++# CONFIG_XEN_COMPAT_030002 is not set
++# CONFIG_XEN_COMPAT_030004 is not set
++# CONFIG_HAVE_ARCH_ALLOC_SKB is not set
++# CONFIG_HAVE_ARCH_DEV_ALLOC_SKB is not set
++# CONFIG_NO_IDLE_HZ is not set
++CONFIG_X86_HT=y
++# CONFIG_X86_NO_TSS is not set
++# CONFIG_X86_NO_IDT is not set
+diff -rpuN linux-2.6.18.8/buildconfigs/create_config.sh linux-2.6.18-xen-3.2.0/buildconfigs/create_config.sh
+--- linux-2.6.18.8/buildconfigs/create_config.sh 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/buildconfigs/create_config.sh 2008-02-15 16:21:56.000000000 -0800
+@@ -0,0 +1,54 @@
++#!/bin/sh
++set -e
++
++
++# Parse arguments
++#
++if [ $# -lt 1 -o $# -gt 4 ]; then
++ echo "Usage: $0 config-file EXTRAVERSION XEN_TARGET_ARCH XEN_SYSTYPE"
++ exit 1
++fi
++
++config_file=$1
++extraversion=$2
++target_arch=$3
++systype=$4
++
++
++# Start with initial config skeleton file, if any.
++# Derive from linux-defconfig_xen_x86_32 otherwise.
++#
++skeleton=buildconfigs/linux-defconfig_${extraversion#-}_${target_arch}${systype}
++[ -r $skeleton ] || skeleton=buildconfigs/linux-defconfig_xen_x86_32
++[ -r $skeleton.local ] && skeleton=$skeleton.local
++cp $skeleton $config_file
++
++echo "Using $skeleton as base config"
++
++# Update
++#
++filter_template="s/^#\{0,1\} *\(CONFIG[^= ]*\).*/\/^#\\\{0,1\\\} *\1[= ].*\/d/p"
++config_dirs="buildconfigs/conf.linux buildconfigs/conf.linux-${target_arch} buildconfigs/conf.linux${extraversion} buildconfigs/conf.linux-${target_arch}${extraversion}"
++
++for config_dir in $config_dirs
++do
++ if [ -d $config_dir ]; then
++ echo "Processing $config_dir..." 1>&2
++ # processing is done in alphanumeric order
++ find $config_dir -type f | sort | while read update
++ do
++ echo " ... $update" 1>&2
++ # create the filter rules in a temp file
++ filter_rules=`mktemp -t xenupdateconf.XXXXXXXXXX`
++ sed -n "${filter_template}" < $update > $filter_rules
++
++ # filter the config file in place, removing any options that
++ # will be updated.
++ sed -f $filter_rules -i $config_file
++ cat $update >> $config_file
++
++ # clean up
++ rm -f $filter_rules
++ done
++ fi
++done
+diff -rpuN linux-2.6.18.8/buildconfigs/linux-defconfig_xen0_ia64 linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xen0_ia64
+--- linux-2.6.18.8/buildconfigs/linux-defconfig_xen0_ia64 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xen0_ia64 2008-02-15 16:21:56.000000000 -0800
+@@ -0,0 +1,1697 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.18.8
++# Mon Dec 17 13:38:33 2007
++#
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# Code maturity level options
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION=""
++CONFIG_LOCALVERSION_AUTO=y
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++CONFIG_POSIX_MQUEUE=y
++CONFIG_BSD_PROCESS_ACCT=y
++# CONFIG_BSD_PROCESS_ACCT_V3 is not set
++# CONFIG_TASKSTATS is not set
++# CONFIG_AUDIT is not set
++CONFIG_IKCONFIG=y
++CONFIG_IKCONFIG_PROC=y
++# CONFIG_CPUSETS is not set
++# CONFIG_RELAY is not set
++CONFIG_INITRAMFS_SOURCE=""
++CONFIG_CC_OPTIMIZE_FOR_SIZE=y
++# CONFIG_EMBEDDED is not set
++CONFIG_SYSCTL=y
++CONFIG_KALLSYMS=y
++CONFIG_KALLSYMS_ALL=y
++CONFIG_KALLSYMS_EXTRA_PASS=y
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SHMEM=y
++CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_RT_MUTEXES=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++# CONFIG_SLOB is not set
++
++#
++# Loadable module support
++#
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++# CONFIG_MODULE_FORCE_UNLOAD is not set
++CONFIG_MODVERSIONS=y
++CONFIG_MODULE_SRCVERSION_ALL=y
++CONFIG_KMOD=y
++CONFIG_STOP_MACHINE=y
++
++#
++# Block layer
++#
++# CONFIG_BLK_DEV_IO_TRACE is not set
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++CONFIG_DEFAULT_AS=y
++# CONFIG_DEFAULT_DEADLINE is not set
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="anticipatory"
++
++#
++# Processor type and features
++#
++CONFIG_IA64=y
++CONFIG_64BIT=y
++CONFIG_MMU=y
++CONFIG_SWIOTLB=y
++CONFIG_RWSEM_XCHGADD_ALGORITHM=y
++CONFIG_GENERIC_FIND_NEXT_BIT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_TIME_INTERPOLATION=y
++CONFIG_DMI=y
++CONFIG_EFI=y
++CONFIG_GENERIC_IOMAP=y
++CONFIG_XEN=y
++CONFIG_XEN_IA64_EXPOSE_P2M=y
++CONFIG_XEN_IA64_EXPOSE_P2M_USE_DTR=y
++CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
++CONFIG_DMA_IS_DMA32=y
++CONFIG_AUDIT_ARCH=y
++CONFIG_IA64_GENERIC=y
++# CONFIG_IA64_DIG is not set
++# CONFIG_IA64_HP_ZX1 is not set
++# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
++# CONFIG_IA64_SGI_SN2 is not set
++# CONFIG_IA64_HP_SIM is not set
++# CONFIG_IA64_XEN is not set
++# CONFIG_ITANIUM is not set
++CONFIG_MCKINLEY=y
++# CONFIG_IA64_PAGE_SIZE_4KB is not set
++# CONFIG_IA64_PAGE_SIZE_8KB is not set
++CONFIG_IA64_PAGE_SIZE_16KB=y
++# CONFIG_IA64_PAGE_SIZE_64KB is not set
++CONFIG_PGTABLE_3=y
++# CONFIG_PGTABLE_4 is not set
++CONFIG_HZ_100=y
++# CONFIG_HZ_250 is not set
++# CONFIG_HZ_1000 is not set
++CONFIG_HZ=100
++CONFIG_IA64_L1_CACHE_SHIFT=7
++CONFIG_IA64_CYCLONE=y
++CONFIG_IOSAPIC=y
++# CONFIG_IA64_SGI_SN_XP is not set
++CONFIG_FORCE_MAX_ZONEORDER=11
++CONFIG_SMP=y
++CONFIG_NR_CPUS=16
++CONFIG_HOTPLUG_CPU=y
++CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
++# CONFIG_SCHED_SMT is not set
++# CONFIG_PERMIT_BSP_REMOVE is not set
++# CONFIG_PREEMPT is not set
++CONFIG_SELECT_MEMORY_MODEL=y
++# CONFIG_FLATMEM_MANUAL is not set
++CONFIG_DISCONTIGMEM_MANUAL=y
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_DISCONTIGMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++CONFIG_NEED_MULTIPLE_NODES=y
++# CONFIG_SPARSEMEM_STATIC is not set
++CONFIG_SPLIT_PTLOCK_CPUS=4
++# CONFIG_MIGRATION is not set
++CONFIG_RESOURCES_64BIT=y
++CONFIG_ARCH_SELECT_MEMORY_MODEL=y
++CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
++CONFIG_ARCH_FLATMEM_ENABLE=y
++CONFIG_ARCH_SPARSEMEM_ENABLE=y
++CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
++CONFIG_NUMA=y
++CONFIG_NODES_SHIFT=10
++CONFIG_VIRTUAL_MEM_MAP=y
++CONFIG_HOLES_IN_ZONE=y
++CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
++CONFIG_HAVE_ARCH_NODEDATA_EXTENSION=y
++# CONFIG_IA32_SUPPORT is not set
++# CONFIG_IA64_MCA_RECOVERY is not set
++CONFIG_PERFMON=y
++CONFIG_IA64_PALINFO=y
++CONFIG_SGI_SN=y
++
++#
++# SN Devices
++#
++# CONFIG_SGI_IOC3 is not set
++CONFIG_KEXEC=y
++
++#
++# Firmware Drivers
++#
++CONFIG_EFI_VARS=y
++CONFIG_EFI_PCDP=y
++CONFIG_BINFMT_ELF=y
++CONFIG_BINFMT_MISC=y
++
++#
++# Power management and ACPI
++#
++CONFIG_PM=y
++CONFIG_PM_LEGACY=y
++# CONFIG_PM_DEBUG is not set
++
++#
++# ACPI (Advanced Configuration and Power Interface) Support
++#
++CONFIG_ACPI=y
++CONFIG_ACPI_BUTTON=y
++CONFIG_ACPI_FAN=y
++# CONFIG_ACPI_DOCK is not set
++CONFIG_ACPI_PROCESSOR=y
++CONFIG_ACPI_HOTPLUG_CPU=y
++CONFIG_ACPI_THERMAL=y
++CONFIG_ACPI_NUMA=y
++CONFIG_ACPI_BLACKLIST_YEAR=0
++# CONFIG_ACPI_DEBUG is not set
++CONFIG_ACPI_EC=y
++CONFIG_ACPI_POWER=y
++CONFIG_ACPI_SYSTEM=y
++CONFIG_ACPI_CONTAINER=y
++
++#
++# CPU Frequency scaling
++#
++# CONFIG_CPU_FREQ is not set
++
++#
++# Bus options (PCI, PCMCIA)
++#
++CONFIG_PCI=y
++CONFIG_PCI_DOMAINS=y
++CONFIG_XEN_PCIDEV_FRONTEND=y
++# CONFIG_XEN_PCIDEV_FE_DEBUG is not set
++# CONFIG_PCIEPORTBUS is not set
++# CONFIG_PCI_DEBUG is not set
++
++#
++# PCI Hotplug Support
++#
++CONFIG_HOTPLUG_PCI=y
++# CONFIG_HOTPLUG_PCI_FAKE is not set
++CONFIG_HOTPLUG_PCI_ACPI=y
++# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
++# CONFIG_HOTPLUG_PCI_CPCI is not set
++# CONFIG_HOTPLUG_PCI_SHPC is not set
++# CONFIG_HOTPLUG_PCI_SGI is not set
++
++#
++# PCCARD (PCMCIA/CardBus) support
++#
++# CONFIG_PCCARD is not set
++
++#
++# Networking
++#
++CONFIG_NET=y
++
++#
++# Networking options
++#
++# CONFIG_NETDEBUG is not set
++CONFIG_PACKET=y
++# CONFIG_PACKET_MMAP is not set
++CONFIG_UNIX=y
++CONFIG_XFRM=y
++# CONFIG_XFRM_USER is not set
++# CONFIG_NET_KEY is not set
++CONFIG_INET=y
++CONFIG_IP_MULTICAST=y
++# CONFIG_IP_ADVANCED_ROUTER is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++# CONFIG_IP_PNP_BOOTP is not set
++# CONFIG_IP_PNP_RARP is not set
++# CONFIG_NET_IPIP is not set
++# CONFIG_NET_IPGRE is not set
++# CONFIG_IP_MROUTE is not set
++CONFIG_ARPD=y
++CONFIG_SYN_COOKIES=y
++# CONFIG_INET_AH is not set
++# CONFIG_INET_ESP is not set
++# CONFIG_INET_IPCOMP is not set
++# CONFIG_INET_XFRM_TUNNEL is not set
++# CONFIG_INET_TUNNEL is not set
++CONFIG_INET_XFRM_MODE_TRANSPORT=y
++CONFIG_INET_XFRM_MODE_TUNNEL=y
++CONFIG_INET_DIAG=y
++CONFIG_INET_TCP_DIAG=y
++# CONFIG_TCP_CONG_ADVANCED is not set
++CONFIG_TCP_CONG_BIC=y
++
++#
++# IP: Virtual Server Configuration
++#
++# CONFIG_IP_VS is not set
++# CONFIG_IPV6 is not set
++# CONFIG_INET6_XFRM_TUNNEL is not set
++# CONFIG_INET6_TUNNEL is not set
++# CONFIG_NETWORK_SECMARK is not set
++CONFIG_NETFILTER=y
++# CONFIG_NETFILTER_DEBUG is not set
++CONFIG_BRIDGE_NETFILTER=y
++
++#
++# Core Netfilter Configuration
++#
++# CONFIG_NETFILTER_NETLINK is not set
++# CONFIG_NF_CONNTRACK is not set
++# CONFIG_NETFILTER_XTABLES is not set
++
++#
++# IP: Netfilter Configuration
++#
++# CONFIG_IP_NF_CONNTRACK is not set
++# CONFIG_IP_NF_QUEUE is not set
++
++#
++# Bridge: Netfilter Configuration
++#
++# CONFIG_BRIDGE_NF_EBTABLES is not set
++
++#
++# DCCP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_DCCP is not set
++
++#
++# SCTP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_SCTP is not set
++
++#
++# TIPC Configuration (EXPERIMENTAL)
++#
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++CONFIG_BRIDGE=y
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++CONFIG_LLC=y
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++
++#
++# QoS and/or fair queueing
++#
++# CONFIG_NET_SCHED is not set
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++# CONFIG_IEEE80211 is not set
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++CONFIG_FW_LOADER=y
++# CONFIG_DEBUG_DRIVER is not set
++CONFIG_SYS_HYPERVISOR=y
++
++#
++# Connector - unified userspace <-> kernelspace linker
++#
++# CONFIG_CONNECTOR is not set
++
++#
++# Memory Technology Devices (MTD)
++#
++# CONFIG_MTD is not set
++
++#
++# Parallel port support
++#
++# CONFIG_PARPORT is not set
++
++#
++# Plug and Play support
++#
++# CONFIG_PNP is not set
++
++#
++# Block devices
++#
++# CONFIG_BLK_CPQ_DA is not set
++CONFIG_BLK_CPQ_CISS_DA=y
++# CONFIG_CISS_SCSI_TAPE is not set
++# CONFIG_BLK_DEV_DAC960 is not set
++# CONFIG_BLK_DEV_UMEM is not set
++# CONFIG_BLK_DEV_COW_COMMON is not set
++CONFIG_BLK_DEV_LOOP=y
++CONFIG_BLK_DEV_CRYPTOLOOP=y
++CONFIG_BLK_DEV_NBD=m
++# CONFIG_BLK_DEV_SX8 is not set
++# CONFIG_BLK_DEV_UB is not set
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=4096
++CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
++CONFIG_BLK_DEV_INITRD=y
++# CONFIG_CDROM_PKTCDVD is not set
++# CONFIG_ATA_OVER_ETH is not set
++
++#
++# ATA/ATAPI/MFM/RLL support
++#
++CONFIG_IDE=y
++CONFIG_IDE_MAX_HWIFS=4
++CONFIG_BLK_DEV_IDE=y
++
++#
++# Please see Documentation/ide.txt for help/info on IDE drives
++#
++# CONFIG_BLK_DEV_IDE_SATA is not set
++CONFIG_BLK_DEV_IDEDISK=y
++# CONFIG_IDEDISK_MULTI_MODE is not set
++CONFIG_BLK_DEV_IDECD=y
++# CONFIG_BLK_DEV_IDETAPE is not set
++CONFIG_BLK_DEV_IDEFLOPPY=y
++CONFIG_BLK_DEV_IDESCSI=y
++# CONFIG_IDE_TASK_IOCTL is not set
++
++#
++# IDE chipset support/bugfixes
++#
++# CONFIG_IDE_GENERIC is not set
++CONFIG_BLK_DEV_IDEPCI=y
++# CONFIG_IDEPCI_SHARE_IRQ is not set
++# CONFIG_BLK_DEV_OFFBOARD is not set
++CONFIG_BLK_DEV_GENERIC=y
++# CONFIG_BLK_DEV_OPTI621 is not set
++CONFIG_BLK_DEV_IDEDMA_PCI=y
++# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
++CONFIG_IDEDMA_PCI_AUTO=y
++# CONFIG_IDEDMA_ONLYDISK is not set
++# CONFIG_BLK_DEV_AEC62XX is not set
++# CONFIG_BLK_DEV_ALI15X3 is not set
++# CONFIG_BLK_DEV_AMD74XX is not set
++CONFIG_BLK_DEV_CMD64X=y
++# CONFIG_BLK_DEV_TRIFLEX is not set
++# CONFIG_BLK_DEV_CY82C693 is not set
++# CONFIG_BLK_DEV_CS5520 is not set
++# CONFIG_BLK_DEV_CS5530 is not set
++# CONFIG_BLK_DEV_HPT34X is not set
++# CONFIG_BLK_DEV_HPT366 is not set
++# CONFIG_BLK_DEV_SC1200 is not set
++CONFIG_BLK_DEV_PIIX=y
++# CONFIG_BLK_DEV_IT821X is not set
++# CONFIG_BLK_DEV_NS87415 is not set
++# CONFIG_BLK_DEV_PDC202XX_OLD is not set
++# CONFIG_BLK_DEV_PDC202XX_NEW is not set
++# CONFIG_BLK_DEV_SVWKS is not set
++# CONFIG_BLK_DEV_SIIMAGE is not set
++# CONFIG_BLK_DEV_SLC90E66 is not set
++# CONFIG_BLK_DEV_TRM290 is not set
++# CONFIG_BLK_DEV_VIA82CXXX is not set
++# CONFIG_IDE_ARM is not set
++CONFIG_BLK_DEV_IDEDMA=y
++# CONFIG_IDEDMA_IVB is not set
++CONFIG_IDEDMA_AUTO=y
++# CONFIG_BLK_DEV_HD is not set
++
++#
++# SCSI device support
++#
++# CONFIG_RAID_ATTRS is not set
++CONFIG_SCSI=y
++CONFIG_SCSI_PROC_FS=y
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=y
++CONFIG_CHR_DEV_ST=y
++CONFIG_CHR_DEV_OSST=y
++CONFIG_BLK_DEV_SR=y
++CONFIG_BLK_DEV_SR_VENDOR=y
++CONFIG_CHR_DEV_SG=y
++# CONFIG_CHR_DEV_SCH is not set
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++CONFIG_SCSI_MULTI_LUN=y
++CONFIG_SCSI_CONSTANTS=y
++CONFIG_SCSI_LOGGING=y
++
++#
++# SCSI Transport Attributes
++#
++CONFIG_SCSI_SPI_ATTRS=y
++CONFIG_SCSI_FC_ATTRS=y
++# CONFIG_SCSI_ISCSI_ATTRS is not set
++CONFIG_SCSI_SAS_ATTRS=y
++
++#
++# SCSI low-level drivers
++#
++# CONFIG_ISCSI_TCP is not set
++# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
++# CONFIG_SCSI_3W_9XXX is not set
++# CONFIG_SCSI_ACARD is not set
++# CONFIG_SCSI_AACRAID is not set
++# CONFIG_SCSI_AIC7XXX is not set
++# CONFIG_SCSI_AIC7XXX_OLD is not set
++# CONFIG_SCSI_AIC79XX is not set
++# CONFIG_MEGARAID_NEWGEN is not set
++# CONFIG_MEGARAID_LEGACY is not set
++# CONFIG_MEGARAID_SAS is not set
++# CONFIG_SCSI_SATA is not set
++# CONFIG_SCSI_HPTIOP is not set
++# CONFIG_SCSI_DMX3191D is not set
++# CONFIG_SCSI_FUTURE_DOMAIN is not set
++# CONFIG_SCSI_IPS is not set
++# CONFIG_SCSI_INITIO is not set
++# CONFIG_SCSI_INIA100 is not set
++CONFIG_SCSI_SYM53C8XX_2=y
++CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
++CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
++CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
++CONFIG_SCSI_SYM53C8XX_MMIO=y
++# CONFIG_SCSI_IPR is not set
++CONFIG_SCSI_QLOGIC_1280=y
++# CONFIG_SCSI_QLA_FC is not set
++# CONFIG_SCSI_LPFC is not set
++# CONFIG_SCSI_DC395x is not set
++# CONFIG_SCSI_DC390T is not set
++# CONFIG_SCSI_DEBUG is not set
++
++#
++# Multi-device support (RAID and LVM)
++#
++CONFIG_MD=y
++# CONFIG_BLK_DEV_MD is not set
++CONFIG_BLK_DEV_DM=y
++CONFIG_DM_CRYPT=m
++CONFIG_DM_SNAPSHOT=y
++CONFIG_DM_MIRROR=m
++CONFIG_DM_ZERO=m
++CONFIG_DM_MULTIPATH=m
++CONFIG_DM_MULTIPATH_EMC=m
++
++#
++# Fusion MPT device support
++#
++CONFIG_FUSION=y
++CONFIG_FUSION_SPI=y
++# CONFIG_FUSION_FC is not set
++CONFIG_FUSION_SAS=y
++CONFIG_FUSION_MAX_SGE=128
++# CONFIG_FUSION_CTL is not set
++
++#
++# IEEE 1394 (FireWire) support
++#
++# CONFIG_IEEE1394 is not set
++
++#
++# I2O device support
++#
++# CONFIG_I2O is not set
++
++#
++# Network device support
++#
++CONFIG_NETDEVICES=y
++CONFIG_DUMMY=y
++# CONFIG_BONDING is not set
++# CONFIG_EQUALIZER is not set
++CONFIG_TUN=y
++
++#
++# ARCnet devices
++#
++CONFIG_ARCNET=y
++# CONFIG_ARCNET_1201 is not set
++# CONFIG_ARCNET_1051 is not set
++# CONFIG_ARCNET_RAW is not set
++# CONFIG_ARCNET_CAP is not set
++# CONFIG_ARCNET_COM90xx is not set
++# CONFIG_ARCNET_COM90xxIO is not set
++# CONFIG_ARCNET_RIM_I is not set
++# CONFIG_ARCNET_COM20020 is not set
++
++#
++# PHY device support
++#
++# CONFIG_PHYLIB is not set
++
++#
++# Ethernet (10 or 100Mbit)
++#
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=y
++# CONFIG_HAPPYMEAL is not set
++# CONFIG_SUNGEM is not set
++# CONFIG_CASSINI is not set
++# CONFIG_NET_VENDOR_3COM is not set
++
++#
++# Tulip family network device support
++#
++CONFIG_NET_TULIP=y
++# CONFIG_DE2104X is not set
++CONFIG_TULIP=y
++CONFIG_TULIP_MWI=y
++CONFIG_TULIP_MMIO=y
++CONFIG_TULIP_NAPI=y
++CONFIG_TULIP_NAPI_HW_MITIGATION=y
++# CONFIG_DE4X5 is not set
++# CONFIG_WINBOND_840 is not set
++# CONFIG_DM9102 is not set
++# CONFIG_ULI526X is not set
++# CONFIG_HP100 is not set
++CONFIG_NET_PCI=y
++# CONFIG_PCNET32 is not set
++# CONFIG_AMD8111_ETH is not set
++# CONFIG_ADAPTEC_STARFIRE is not set
++# CONFIG_B44 is not set
++# CONFIG_FORCEDETH is not set
++# CONFIG_DGRS is not set
++CONFIG_EEPRO100=y
++CONFIG_E100=y
++# CONFIG_FEALNX is not set
++# CONFIG_NATSEMI is not set
++# CONFIG_NE2K_PCI is not set
++# CONFIG_8139CP is not set
++# CONFIG_8139TOO is not set
++# CONFIG_SIS900 is not set
++# CONFIG_EPIC100 is not set
++# CONFIG_SUNDANCE is not set
++# CONFIG_VIA_RHINE is not set
++
++#
++# Ethernet (1000 Mbit)
++#
++# CONFIG_ACENIC is not set
++# CONFIG_DL2K is not set
++CONFIG_E1000=y
++# CONFIG_E1000_NAPI is not set
++# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
++# CONFIG_NS83820 is not set
++# CONFIG_HAMACHI is not set
++# CONFIG_YELLOWFIN is not set
++# CONFIG_R8169 is not set
++# CONFIG_SIS190 is not set
++# CONFIG_SKGE is not set
++# CONFIG_SKY2 is not set
++# CONFIG_SK98LIN is not set
++# CONFIG_VIA_VELOCITY is not set
++CONFIG_TIGON3=y
++# CONFIG_BNX2 is not set
++
++#
++# Ethernet (10000 Mbit)
++#
++# CONFIG_CHELSIO_T1 is not set
++# CONFIG_IXGB is not set
++# CONFIG_S2IO is not set
++# CONFIG_MYRI10GE is not set
++
++#
++# Token Ring devices
++#
++# CONFIG_TR is not set
++
++#
++# Wireless LAN (non-hamradio)
++#
++# CONFIG_NET_RADIO is not set
++
++#
++# Wan interfaces
++#
++# CONFIG_WAN is not set
++# CONFIG_FDDI is not set
++# CONFIG_HIPPI is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++# CONFIG_NET_FC is not set
++# CONFIG_SHAPER is not set
++CONFIG_NETCONSOLE=y
++CONFIG_NETPOLL=y
++# CONFIG_NETPOLL_RX is not set
++# CONFIG_NETPOLL_TRAP is not set
++CONFIG_NET_POLL_CONTROLLER=y
++
++#
++# ISDN subsystem
++#
++CONFIG_ISDN=m
++
++#
++# Old ISDN4Linux
++#
++# CONFIG_ISDN_I4L is not set
++
++#
++# CAPI subsystem
++#
++# CONFIG_ISDN_CAPI is not set
++
++#
++# Telephony Support
++#
++# CONFIG_PHONE is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++
++#
++# Userland interfaces
++#
++CONFIG_INPUT_MOUSEDEV=y
++CONFIG_INPUT_MOUSEDEV_PSAUX=y
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++CONFIG_INPUT_JOYDEV=y
++# CONFIG_INPUT_TSDEV is not set
++CONFIG_INPUT_EVDEV=y
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++CONFIG_INPUT_KEYBOARD=y
++CONFIG_KEYBOARD_ATKBD=y
++# CONFIG_KEYBOARD_SUNKBD is not set
++# CONFIG_KEYBOARD_LKKBD is not set
++# CONFIG_KEYBOARD_XTKBD is not set
++# CONFIG_KEYBOARD_NEWTON is not set
++CONFIG_INPUT_MOUSE=y
++CONFIG_MOUSE_PS2=y
++# CONFIG_MOUSE_SERIAL is not set
++# CONFIG_MOUSE_VSXXXAA is not set
++# CONFIG_INPUT_JOYSTICK is not set
++# CONFIG_INPUT_TOUCHSCREEN is not set
++# CONFIG_INPUT_MISC is not set
++
++#
++# Hardware I/O ports
++#
++CONFIG_SERIO=y
++CONFIG_SERIO_I8042=y
++# CONFIG_SERIO_SERPORT is not set
++# CONFIG_SERIO_PCIPS2 is not set
++CONFIG_SERIO_LIBPS2=y
++# CONFIG_SERIO_RAW is not set
++CONFIG_GAMEPORT=y
++# CONFIG_GAMEPORT_NS558 is not set
++# CONFIG_GAMEPORT_L4 is not set
++# CONFIG_GAMEPORT_EMU10K1 is not set
++# CONFIG_GAMEPORT_FM801 is not set
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
++CONFIG_SERIAL_NONSTANDARD=y
++# CONFIG_COMPUTONE is not set
++# CONFIG_ROCKETPORT is not set
++# CONFIG_CYCLADES is not set
++# CONFIG_DIGIEPCA is not set
++# CONFIG_MOXA_INTELLIO is not set
++# CONFIG_MOXA_SMARTIO is not set
++# CONFIG_ISI is not set
++# CONFIG_SYNCLINKMP is not set
++# CONFIG_SYNCLINK_GT is not set
++# CONFIG_N_HDLC is not set
++# CONFIG_SPECIALIX is not set
++# CONFIG_SX is not set
++# CONFIG_RIO is not set
++# CONFIG_STALDRV is not set
++# CONFIG_SGI_SNSC is not set
++# CONFIG_SGI_TIOCX is not set
++
++#
++# Serial drivers
++#
++
++#
++# Non-8250 serial port support
++#
++# CONFIG_SERIAL_SGI_L1_CONSOLE is not set
++# CONFIG_SERIAL_JSM is not set
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=256
++
++#
++# IPMI
++#
++# CONFIG_IPMI_HANDLER is not set
++
++#
++# Watchdog Cards
++#
++# CONFIG_WATCHDOG is not set
++# CONFIG_HW_RANDOM is not set
++CONFIG_EFI_RTC=y
++# CONFIG_DTLK is not set
++# CONFIG_R3964 is not set
++# CONFIG_APPLICOM is not set
++
++#
++# Ftape, the floppy tape device driver
++#
++CONFIG_AGP=y
++# CONFIG_AGP_SIS is not set
++# CONFIG_AGP_VIA is not set
++CONFIG_AGP_I460=y
++# CONFIG_AGP_HP_ZX1 is not set
++# CONFIG_AGP_SGI_TIOCA is not set
++CONFIG_DRM=y
++# CONFIG_DRM_TDFX is not set
++# CONFIG_DRM_R128 is not set
++# CONFIG_DRM_RADEON is not set
++# CONFIG_DRM_MGA is not set
++# CONFIG_DRM_SIS is not set
++# CONFIG_DRM_VIA is not set
++# CONFIG_DRM_SAVAGE is not set
++# CONFIG_RAW_DRIVER is not set
++# CONFIG_HPET is not set
++# CONFIG_HANGCHECK_TIMER is not set
++# CONFIG_MMTIMER is not set
++
++#
++# TPM devices
++#
++# CONFIG_TCG_TPM is not set
++# CONFIG_TELCLOCK is not set
++
++#
++# I2C support
++#
++CONFIG_I2C=y
++CONFIG_I2C_CHARDEV=y
++
++#
++# I2C Algorithms
++#
++CONFIG_I2C_ALGOBIT=y
++CONFIG_I2C_ALGOPCF=y
++# CONFIG_I2C_ALGOPCA is not set
++
++#
++# I2C Hardware Bus support
++#
++# CONFIG_I2C_ALI1535 is not set
++# CONFIG_I2C_ALI1563 is not set
++# CONFIG_I2C_ALI15X3 is not set
++# CONFIG_I2C_AMD756 is not set
++# CONFIG_I2C_AMD8111 is not set
++# CONFIG_I2C_I801 is not set
++# CONFIG_I2C_I810 is not set
++# CONFIG_I2C_PIIX4 is not set
++# CONFIG_I2C_NFORCE2 is not set
++# CONFIG_I2C_OCORES is not set
++# CONFIG_I2C_PARPORT_LIGHT is not set
++# CONFIG_I2C_PROSAVAGE is not set
++# CONFIG_I2C_SAVAGE4 is not set
++# CONFIG_I2C_SIS5595 is not set
++# CONFIG_I2C_SIS630 is not set
++# CONFIG_I2C_SIS96X is not set
++# CONFIG_I2C_STUB is not set
++# CONFIG_I2C_VIA is not set
++# CONFIG_I2C_VIAPRO is not set
++# CONFIG_I2C_VOODOO3 is not set
++# CONFIG_I2C_PCA_ISA is not set
++
++#
++# Miscellaneous I2C Chip support
++#
++# CONFIG_SENSORS_DS1337 is not set
++# CONFIG_SENSORS_DS1374 is not set
++# CONFIG_SENSORS_EEPROM is not set
++# CONFIG_SENSORS_PCF8574 is not set
++# CONFIG_SENSORS_PCA9539 is not set
++# CONFIG_SENSORS_PCF8591 is not set
++# CONFIG_SENSORS_MAX6875 is not set
++# CONFIG_I2C_DEBUG_CORE is not set
++# CONFIG_I2C_DEBUG_ALGO is not set
++# CONFIG_I2C_DEBUG_BUS is not set
++# CONFIG_I2C_DEBUG_CHIP is not set
++
++#
++# SPI support
++#
++# CONFIG_SPI is not set
++# CONFIG_SPI_MASTER is not set
++
++#
++# Dallas's 1-wire bus
++#
++
++#
++# Hardware Monitoring support
++#
++CONFIG_HWMON=y
++# CONFIG_HWMON_VID is not set
++# CONFIG_SENSORS_ABITUGURU is not set
++# CONFIG_SENSORS_ADM1021 is not set
++# CONFIG_SENSORS_ADM1025 is not set
++# CONFIG_SENSORS_ADM1026 is not set
++# CONFIG_SENSORS_ADM1031 is not set
++# CONFIG_SENSORS_ADM9240 is not set
++# CONFIG_SENSORS_ASB100 is not set
++# CONFIG_SENSORS_ATXP1 is not set
++# CONFIG_SENSORS_DS1621 is not set
++# CONFIG_SENSORS_F71805F is not set
++# CONFIG_SENSORS_FSCHER is not set
++# CONFIG_SENSORS_FSCPOS is not set
++# CONFIG_SENSORS_GL518SM is not set
++# CONFIG_SENSORS_GL520SM is not set
++# CONFIG_SENSORS_IT87 is not set
++# CONFIG_SENSORS_LM63 is not set
++# CONFIG_SENSORS_LM75 is not set
++# CONFIG_SENSORS_LM77 is not set
++# CONFIG_SENSORS_LM78 is not set
++# CONFIG_SENSORS_LM80 is not set
++# CONFIG_SENSORS_LM83 is not set
++# CONFIG_SENSORS_LM85 is not set
++# CONFIG_SENSORS_LM87 is not set
++# CONFIG_SENSORS_LM90 is not set
++# CONFIG_SENSORS_LM92 is not set
++# CONFIG_SENSORS_MAX1619 is not set
++# CONFIG_SENSORS_PC87360 is not set
++# CONFIG_SENSORS_SIS5595 is not set
++# CONFIG_SENSORS_SMSC47M1 is not set
++# CONFIG_SENSORS_SMSC47M192 is not set
++# CONFIG_SENSORS_SMSC47B397 is not set
++# CONFIG_SENSORS_VIA686A is not set
++# CONFIG_SENSORS_VT8231 is not set
++# CONFIG_SENSORS_W83781D is not set
++# CONFIG_SENSORS_W83791D is not set
++# CONFIG_SENSORS_W83792D is not set
++# CONFIG_SENSORS_W83L785TS is not set
++# CONFIG_SENSORS_W83627HF is not set
++# CONFIG_SENSORS_W83627EHF is not set
++# CONFIG_HWMON_DEBUG_CHIP is not set
++
++#
++# Misc devices
++#
++
++#
++# Multimedia devices
++#
++CONFIG_VIDEO_DEV=y
++CONFIG_VIDEO_V4L1=y
++CONFIG_VIDEO_V4L1_COMPAT=y
++CONFIG_VIDEO_V4L2=y
++
++#
++# Video Capture Adapters
++#
++
++#
++# Video Capture Adapters
++#
++# CONFIG_VIDEO_ADV_DEBUG is not set
++# CONFIG_VIDEO_VIVI is not set
++# CONFIG_VIDEO_BT848 is not set
++# CONFIG_VIDEO_CPIA is not set
++# CONFIG_VIDEO_CPIA2 is not set
++# CONFIG_VIDEO_SAA5246A is not set
++# CONFIG_VIDEO_SAA5249 is not set
++# CONFIG_TUNER_3036 is not set
++# CONFIG_VIDEO_STRADIS is not set
++# CONFIG_VIDEO_ZORAN is not set
++# CONFIG_VIDEO_SAA7134 is not set
++# CONFIG_VIDEO_MXB is not set
++# CONFIG_VIDEO_DPC is not set
++# CONFIG_VIDEO_HEXIUM_ORION is not set
++# CONFIG_VIDEO_HEXIUM_GEMINI is not set
++# CONFIG_VIDEO_CX88 is not set
++
++#
++# Encoders and Decoders
++#
++# CONFIG_VIDEO_MSP3400 is not set
++# CONFIG_VIDEO_CS53L32A is not set
++# CONFIG_VIDEO_TLV320AIC23B is not set
++# CONFIG_VIDEO_WM8775 is not set
++# CONFIG_VIDEO_WM8739 is not set
++# CONFIG_VIDEO_CX2341X is not set
++# CONFIG_VIDEO_CX25840 is not set
++# CONFIG_VIDEO_SAA711X is not set
++# CONFIG_VIDEO_SAA7127 is not set
++# CONFIG_VIDEO_UPD64031A is not set
++# CONFIG_VIDEO_UPD64083 is not set
++
++#
++# V4L USB devices
++#
++# CONFIG_VIDEO_PVRUSB2 is not set
++# CONFIG_VIDEO_EM28XX is not set
++# CONFIG_USB_VICAM is not set
++# CONFIG_USB_IBMCAM is not set
++# CONFIG_USB_KONICAWC is not set
++# CONFIG_USB_QUICKCAM_MESSENGER is not set
++# CONFIG_USB_ET61X251 is not set
++# CONFIG_VIDEO_OVCAMCHIP is not set
++# CONFIG_USB_W9968CF is not set
++# CONFIG_USB_OV511 is not set
++# CONFIG_USB_SE401 is not set
++# CONFIG_USB_SN9C102 is not set
++# CONFIG_USB_STV680 is not set
++# CONFIG_USB_ZC0301 is not set
++# CONFIG_USB_PWC is not set
++
++#
++# Radio Adapters
++#
++# CONFIG_RADIO_GEMTEK_PCI is not set
++# CONFIG_RADIO_MAXIRADIO is not set
++# CONFIG_RADIO_MAESTRO is not set
++# CONFIG_USB_DSBR is not set
++
++#
++# Digital Video Broadcasting Devices
++#
++# CONFIG_DVB is not set
++# CONFIG_USB_DABUSB is not set
++
++#
++# Graphics support
++#
++CONFIG_FIRMWARE_EDID=y
++CONFIG_FB=y
++CONFIG_FB_CFB_FILLRECT=y
++CONFIG_FB_CFB_COPYAREA=y
++CONFIG_FB_CFB_IMAGEBLIT=y
++# CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
++CONFIG_FB_MODE_HELPERS=y
++# CONFIG_FB_TILEBLITTING is not set
++# CONFIG_FB_CIRRUS is not set
++# CONFIG_FB_PM2 is not set
++# CONFIG_FB_CYBER2000 is not set
++# CONFIG_FB_ASILIANT is not set
++# CONFIG_FB_IMSTT is not set
++# CONFIG_FB_S1D13XXX is not set
++# CONFIG_FB_NVIDIA is not set
++# CONFIG_FB_RIVA is not set
++# CONFIG_FB_MATROX is not set
++# CONFIG_FB_RADEON is not set
++# CONFIG_FB_ATY128 is not set
++# CONFIG_FB_ATY is not set
++# CONFIG_FB_SAVAGE is not set
++# CONFIG_FB_SIS is not set
++# CONFIG_FB_NEOMAGIC is not set
++# CONFIG_FB_KYRO is not set
++# CONFIG_FB_3DFX is not set
++# CONFIG_FB_VOODOO1 is not set
++# CONFIG_FB_TRIDENT is not set
++# CONFIG_FB_VIRTUAL is not set
++
++#
++# Console display driver support
++#
++CONFIG_VGA_CONSOLE=y
++# CONFIG_VGACON_SOFT_SCROLLBACK is not set
++CONFIG_DUMMY_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE=y
++# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
++# CONFIG_FONTS is not set
++CONFIG_FONT_8x8=y
++CONFIG_FONT_8x16=y
++
++#
++# Logo configuration
++#
++CONFIG_LOGO=y
++# CONFIG_LOGO_LINUX_MONO is not set
++# CONFIG_LOGO_LINUX_VGA16 is not set
++CONFIG_LOGO_LINUX_CLUT224=y
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Sound
++#
++CONFIG_SOUND=y
++
++#
++# Advanced Linux Sound Architecture
++#
++CONFIG_SND=y
++CONFIG_SND_TIMER=y
++CONFIG_SND_PCM=y
++CONFIG_SND_HWDEP=y
++CONFIG_SND_RAWMIDI=y
++CONFIG_SND_SEQUENCER=y
++CONFIG_SND_SEQ_DUMMY=y
++CONFIG_SND_OSSEMUL=y
++CONFIG_SND_MIXER_OSS=y
++CONFIG_SND_PCM_OSS=y
++CONFIG_SND_PCM_OSS_PLUGINS=y
++CONFIG_SND_SEQUENCER_OSS=y
++# CONFIG_SND_DYNAMIC_MINORS is not set
++CONFIG_SND_SUPPORT_OLD_API=y
++CONFIG_SND_VERBOSE_PROCFS=y
++# CONFIG_SND_VERBOSE_PRINTK is not set
++# CONFIG_SND_DEBUG is not set
++
++#
++# Generic devices
++#
++CONFIG_SND_MPU401_UART=y
++CONFIG_SND_OPL3_LIB=y
++CONFIG_SND_AC97_CODEC=y
++CONFIG_SND_AC97_BUS=y
++CONFIG_SND_DUMMY=y
++CONFIG_SND_VIRMIDI=y
++# CONFIG_SND_MTPAV is not set
++CONFIG_SND_SERIAL_U16550=y
++CONFIG_SND_MPU401=y
++
++#
++# PCI devices
++#
++# CONFIG_SND_AD1889 is not set
++# CONFIG_SND_ALS300 is not set
++# CONFIG_SND_ALI5451 is not set
++CONFIG_SND_ATIIXP=y
++# CONFIG_SND_ATIIXP_MODEM is not set
++# CONFIG_SND_AU8810 is not set
++# CONFIG_SND_AU8820 is not set
++# CONFIG_SND_AU8830 is not set
++# CONFIG_SND_AZT3328 is not set
++# CONFIG_SND_BT87X is not set
++# CONFIG_SND_CA0106 is not set
++# CONFIG_SND_CMIPCI is not set
++# CONFIG_SND_CS4281 is not set
++# CONFIG_SND_CS46XX is not set
++# CONFIG_SND_DARLA20 is not set
++# CONFIG_SND_GINA20 is not set
++# CONFIG_SND_LAYLA20 is not set
++# CONFIG_SND_DARLA24 is not set
++# CONFIG_SND_GINA24 is not set
++# CONFIG_SND_LAYLA24 is not set
++# CONFIG_SND_MONA is not set
++# CONFIG_SND_MIA is not set
++# CONFIG_SND_ECHO3G is not set
++# CONFIG_SND_INDIGO is not set
++# CONFIG_SND_INDIGOIO is not set
++# CONFIG_SND_INDIGODJ is not set
++# CONFIG_SND_EMU10K1 is not set
++# CONFIG_SND_EMU10K1X is not set
++# CONFIG_SND_ENS1370 is not set
++# CONFIG_SND_ENS1371 is not set
++# CONFIG_SND_ES1938 is not set
++# CONFIG_SND_ES1968 is not set
++CONFIG_SND_FM801=y
++# CONFIG_SND_FM801_TEA575X_BOOL is not set
++# CONFIG_SND_HDA_INTEL is not set
++# CONFIG_SND_HDSP is not set
++# CONFIG_SND_HDSPM is not set
++# CONFIG_SND_ICE1712 is not set
++# CONFIG_SND_ICE1724 is not set
++# CONFIG_SND_INTEL8X0 is not set
++# CONFIG_SND_INTEL8X0M is not set
++# CONFIG_SND_KORG1212 is not set
++# CONFIG_SND_MAESTRO3 is not set
++# CONFIG_SND_MIXART is not set
++# CONFIG_SND_NM256 is not set
++# CONFIG_SND_PCXHR is not set
++# CONFIG_SND_RIPTIDE is not set
++# CONFIG_SND_RME32 is not set
++# CONFIG_SND_RME96 is not set
++# CONFIG_SND_RME9652 is not set
++# CONFIG_SND_SONICVIBES is not set
++# CONFIG_SND_TRIDENT is not set
++# CONFIG_SND_VIA82XX is not set
++# CONFIG_SND_VIA82XX_MODEM is not set
++# CONFIG_SND_VX222 is not set
++# CONFIG_SND_YMFPCI is not set
++
++#
++# USB devices
++#
++# CONFIG_SND_USB_AUDIO is not set
++
++#
++# Open Sound System
++#
++CONFIG_SOUND_PRIME=y
++# CONFIG_OSS_OBSOLETE_DRIVER is not set
++# CONFIG_SOUND_BT878 is not set
++# CONFIG_SOUND_ES1371 is not set
++# CONFIG_SOUND_ICH is not set
++# CONFIG_SOUND_TRIDENT is not set
++# CONFIG_SOUND_MSNDCLAS is not set
++# CONFIG_SOUND_MSNDPIN is not set
++# CONFIG_SOUND_VIA82CXXX is not set
++# CONFIG_SOUND_TVMIXER is not set
++
++#
++# USB support
++#
++CONFIG_USB_ARCH_HAS_HCD=y
++CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
++CONFIG_USB=y
++# CONFIG_USB_DEBUG is not set
++
++#
++# Miscellaneous USB options
++#
++CONFIG_USB_DEVICEFS=y
++CONFIG_USB_BANDWIDTH=y
++# CONFIG_USB_DYNAMIC_MINORS is not set
++# CONFIG_USB_SUSPEND is not set
++# CONFIG_USB_OTG is not set
++
++#
++# USB Host Controller Drivers
++#
++CONFIG_USB_EHCI_HCD=y
++# CONFIG_USB_EHCI_SPLIT_ISO is not set
++# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
++# CONFIG_USB_EHCI_TT_NEWSCHED is not set
++# CONFIG_USB_ISP116X_HCD is not set
++CONFIG_USB_OHCI_HCD=y
++# CONFIG_USB_OHCI_BIG_ENDIAN is not set
++CONFIG_USB_OHCI_LITTLE_ENDIAN=y
++CONFIG_USB_UHCI_HCD=y
++# CONFIG_USB_SL811_HCD is not set
++
++#
++# USB Device Class drivers
++#
++# CONFIG_USB_ACM is not set
++# CONFIG_USB_PRINTER is not set
++
++#
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
++#
++
++#
++# may also be needed; see USB_STORAGE Help for more information
++#
++CONFIG_USB_STORAGE=y
++# CONFIG_USB_STORAGE_DEBUG is not set
++# CONFIG_USB_STORAGE_DATAFAB is not set
++# CONFIG_USB_STORAGE_FREECOM is not set
++# CONFIG_USB_STORAGE_ISD200 is not set
++# CONFIG_USB_STORAGE_DPCM is not set
++# CONFIG_USB_STORAGE_USBAT is not set
++# CONFIG_USB_STORAGE_SDDR09 is not set
++# CONFIG_USB_STORAGE_SDDR55 is not set
++# CONFIG_USB_STORAGE_JUMPSHOT is not set
++# CONFIG_USB_STORAGE_ALAUDA is not set
++# CONFIG_USB_LIBUSUAL is not set
++
++#
++# USB Input Devices
++#
++CONFIG_USB_HID=y
++CONFIG_USB_HIDINPUT=y
++# CONFIG_USB_HIDINPUT_POWERBOOK is not set
++# CONFIG_HID_FF is not set
++CONFIG_USB_HIDDEV=y
++# CONFIG_USB_AIPTEK is not set
++# CONFIG_USB_WACOM is not set
++# CONFIG_USB_ACECAD is not set
++# CONFIG_USB_KBTAB is not set
++# CONFIG_USB_POWERMATE is not set
++# CONFIG_USB_TOUCHSCREEN is not set
++# CONFIG_USB_YEALINK is not set
++# CONFIG_USB_XPAD is not set
++# CONFIG_USB_ATI_REMOTE is not set
++# CONFIG_USB_ATI_REMOTE2 is not set
++# CONFIG_USB_KEYSPAN_REMOTE is not set
++# CONFIG_USB_APPLETOUCH is not set
++
++#
++# USB Imaging devices
++#
++# CONFIG_USB_MDC800 is not set
++# CONFIG_USB_MICROTEK is not set
++
++#
++# USB Network Adapters
++#
++# CONFIG_USB_CATC is not set
++# CONFIG_USB_KAWETH is not set
++# CONFIG_USB_PEGASUS is not set
++# CONFIG_USB_RTL8150 is not set
++# CONFIG_USB_USBNET is not set
++CONFIG_USB_MON=y
++
++#
++# USB port drivers
++#
++
++#
++# USB Serial Converter support
++#
++# CONFIG_USB_SERIAL is not set
++
++#
++# USB Miscellaneous drivers
++#
++# CONFIG_USB_EMI62 is not set
++# CONFIG_USB_EMI26 is not set
++# CONFIG_USB_AUERSWALD is not set
++# CONFIG_USB_RIO500 is not set
++# CONFIG_USB_LEGOTOWER is not set
++# CONFIG_USB_LCD is not set
++# CONFIG_USB_LED is not set
++# CONFIG_USB_CYPRESS_CY7C63 is not set
++# CONFIG_USB_CYTHERM is not set
++# CONFIG_USB_PHIDGETKIT is not set
++# CONFIG_USB_PHIDGETSERVO is not set
++# CONFIG_USB_IDMOUSE is not set
++# CONFIG_USB_APPLEDISPLAY is not set
++# CONFIG_USB_SISUSBVGA is not set
++# CONFIG_USB_LD is not set
++# CONFIG_USB_TEST is not set
++
++#
++# USB DSL modem support
++#
++
++#
++# USB Gadget Support
++#
++# CONFIG_USB_GADGET is not set
++
++#
++# MMC/SD Card support
++#
++# CONFIG_MMC is not set
++
++#
++# LED devices
++#
++# CONFIG_NEW_LEDS is not set
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++
++#
++# InfiniBand support
++#
++# CONFIG_INFINIBAND is not set
++
++#
++# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
++#
++
++#
++# Real Time Clock
++#
++# CONFIG_RTC_CLASS is not set
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
++#
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++CONFIG_EXT2_FS_XATTR=y
++CONFIG_EXT2_FS_POSIX_ACL=y
++CONFIG_EXT2_FS_SECURITY=y
++# CONFIG_EXT2_FS_XIP is not set
++CONFIG_EXT3_FS=y
++CONFIG_EXT3_FS_XATTR=y
++CONFIG_EXT3_FS_POSIX_ACL=y
++CONFIG_EXT3_FS_SECURITY=y
++CONFIG_JBD=y
++# CONFIG_JBD_DEBUG is not set
++CONFIG_FS_MBCACHE=y
++CONFIG_REISERFS_FS=y
++# CONFIG_REISERFS_CHECK is not set
++# CONFIG_REISERFS_PROC_INFO is not set
++CONFIG_REISERFS_FS_XATTR=y
++CONFIG_REISERFS_FS_POSIX_ACL=y
++CONFIG_REISERFS_FS_SECURITY=y
++# CONFIG_JFS_FS is not set
++CONFIG_FS_POSIX_ACL=y
++CONFIG_XFS_FS=y
++# CONFIG_XFS_QUOTA is not set
++# CONFIG_XFS_SECURITY is not set
++# CONFIG_XFS_POSIX_ACL is not set
++# CONFIG_XFS_RT is not set
++# CONFIG_OCFS2_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_ROMFS_FS is not set
++CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
++# CONFIG_QUOTA is not set
++CONFIG_DNOTIFY=y
++CONFIG_AUTOFS_FS=y
++CONFIG_AUTOFS4_FS=y
++# CONFIG_FUSE_FS is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=y
++CONFIG_JOLIET=y
++# CONFIG_ZISOFS is not set
++CONFIG_UDF_FS=y
++CONFIG_UDF_NLS=y
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=y
++CONFIG_MSDOS_FS=y
++CONFIG_VFAT_FS=y
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_KCORE=y
++CONFIG_PROC_IOMEM_MACHINE=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_RAMFS=y
++# CONFIG_CONFIGFS_FS is not set
++
++#
++# Miscellaneous filesystems
++#
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++# CONFIG_CRAMFS is not set
++# CONFIG_VXFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++
++#
++# Network File Systems
++#
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3=y
++# CONFIG_NFS_V3_ACL is not set
++CONFIG_NFS_V4=y
++CONFIG_NFS_DIRECTIO=y
++CONFIG_NFSD=y
++CONFIG_NFSD_V3=y
++# CONFIG_NFSD_V3_ACL is not set
++CONFIG_NFSD_V4=y
++CONFIG_NFSD_TCP=y
++CONFIG_ROOT_NFS=y
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_EXPORTFS=y
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++CONFIG_SUNRPC_GSS=y
++CONFIG_RPCSEC_GSS_KRB5=y
++# CONFIG_RPCSEC_GSS_SPKM3 is not set
++CONFIG_SMB_FS=y
++CONFIG_SMB_NLS_DEFAULT=y
++CONFIG_SMB_NLS_REMOTE="cp437"
++CONFIG_CIFS=y
++# CONFIG_CIFS_STATS is not set
++# CONFIG_CIFS_WEAK_PW_HASH is not set
++# CONFIG_CIFS_XATTR is not set
++# CONFIG_CIFS_DEBUG2 is not set
++# CONFIG_CIFS_EXPERIMENTAL is not set
++# CONFIG_NCP_FS is not set
++# CONFIG_CODA_FS is not set
++# CONFIG_AFS_FS is not set
++# CONFIG_9P_FS is not set
++
++#
++# Partition Types
++#
++CONFIG_PARTITION_ADVANCED=y
++# CONFIG_ACORN_PARTITION is not set
++# CONFIG_OSF_PARTITION is not set
++# CONFIG_AMIGA_PARTITION is not set
++# CONFIG_ATARI_PARTITION is not set
++# CONFIG_MAC_PARTITION is not set
++CONFIG_MSDOS_PARTITION=y
++# CONFIG_BSD_DISKLABEL is not set
++# CONFIG_MINIX_SUBPARTITION is not set
++# CONFIG_SOLARIS_X86_PARTITION is not set
++# CONFIG_UNIXWARE_DISKLABEL is not set
++# CONFIG_LDM_PARTITION is not set
++CONFIG_SGI_PARTITION=y
++# CONFIG_ULTRIX_PARTITION is not set
++# CONFIG_SUN_PARTITION is not set
++# CONFIG_KARMA_PARTITION is not set
++CONFIG_EFI_PARTITION=y
++
++#
++# Native Language Support
++#
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="iso8859-1"
++CONFIG_NLS_CODEPAGE_437=y
++CONFIG_NLS_CODEPAGE_737=y
++CONFIG_NLS_CODEPAGE_775=y
++CONFIG_NLS_CODEPAGE_850=y
++CONFIG_NLS_CODEPAGE_852=y
++CONFIG_NLS_CODEPAGE_855=y
++CONFIG_NLS_CODEPAGE_857=y
++CONFIG_NLS_CODEPAGE_860=y
++CONFIG_NLS_CODEPAGE_861=y
++CONFIG_NLS_CODEPAGE_862=y
++CONFIG_NLS_CODEPAGE_863=y
++CONFIG_NLS_CODEPAGE_864=y
++CONFIG_NLS_CODEPAGE_865=y
++CONFIG_NLS_CODEPAGE_866=y
++CONFIG_NLS_CODEPAGE_869=y
++CONFIG_NLS_CODEPAGE_936=y
++CONFIG_NLS_CODEPAGE_950=y
++CONFIG_NLS_CODEPAGE_932=y
++CONFIG_NLS_CODEPAGE_949=y
++CONFIG_NLS_CODEPAGE_874=y
++CONFIG_NLS_ISO8859_8=y
++# CONFIG_NLS_CODEPAGE_1250 is not set
++CONFIG_NLS_CODEPAGE_1251=y
++# CONFIG_NLS_ASCII is not set
++CONFIG_NLS_ISO8859_1=y
++CONFIG_NLS_ISO8859_2=y
++CONFIG_NLS_ISO8859_3=y
++CONFIG_NLS_ISO8859_4=y
++CONFIG_NLS_ISO8859_5=y
++CONFIG_NLS_ISO8859_6=y
++CONFIG_NLS_ISO8859_7=y
++CONFIG_NLS_ISO8859_9=y
++CONFIG_NLS_ISO8859_13=y
++CONFIG_NLS_ISO8859_14=y
++CONFIG_NLS_ISO8859_15=y
++CONFIG_NLS_KOI8_R=y
++CONFIG_NLS_KOI8_U=y
++CONFIG_NLS_UTF8=y
++
++#
++# Library routines
++#
++# CONFIG_CRC_CCITT is not set
++# CONFIG_CRC16 is not set
++CONFIG_CRC32=y
++# CONFIG_LIBCRC32C is not set
++CONFIG_PLIST=y
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_GENERIC_PENDING_IRQ=y
++CONFIG_IRQ_PER_CPU=y
++
++#
++# HP Simulator drivers
++#
++# CONFIG_HP_SIMETH is not set
++# CONFIG_HP_SIMSERIAL is not set
++# CONFIG_HP_SIMSCSI is not set
++
++#
++# Instrumentation Support
++#
++# CONFIG_PROFILING is not set
++# CONFIG_KPROBES is not set
++
++#
++# Kernel hacking
++#
++# CONFIG_PRINTK_TIME is not set
++CONFIG_MAGIC_SYSRQ=y
++CONFIG_UNUSED_SYMBOLS=y
++CONFIG_DEBUG_KERNEL=y
++CONFIG_LOG_BUF_SHIFT=20
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_SCHEDSTATS is not set
++# CONFIG_DEBUG_SLAB is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++CONFIG_DEBUG_MUTEXES=y
++# CONFIG_DEBUG_RWSEMS is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++# CONFIG_DEBUG_INFO is not set
++# CONFIG_DEBUG_FS is not set
++# CONFIG_DEBUG_VM is not set
++CONFIG_FORCED_INLINING=y
++# CONFIG_RCU_TORTURE_TEST is not set
++CONFIG_IA64_GRANULE_16MB=y
++# CONFIG_IA64_GRANULE_64MB is not set
++CONFIG_IA64_PRINT_HAZARDS=y
++# CONFIG_DISABLE_VHPT is not set
++# CONFIG_IA64_DEBUG_CMPXCHG is not set
++# CONFIG_IA64_DEBUG_IRQ is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++
++#
++# Cryptographic options
++#
++CONFIG_CRYPTO=y
++# CONFIG_CRYPTO_HMAC is not set
++# CONFIG_CRYPTO_NULL is not set
++# CONFIG_CRYPTO_MD4 is not set
++CONFIG_CRYPTO_MD5=y
++# CONFIG_CRYPTO_SHA1 is not set
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_WP512 is not set
++# CONFIG_CRYPTO_TGR192 is not set
++CONFIG_CRYPTO_DES=y
++# CONFIG_CRYPTO_BLOWFISH is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++# CONFIG_CRYPTO_SERPENT is not set
++# CONFIG_CRYPTO_AES is not set
++# CONFIG_CRYPTO_CAST5 is not set
++# CONFIG_CRYPTO_CAST6 is not set
++# CONFIG_CRYPTO_TEA is not set
++# CONFIG_CRYPTO_ARC4 is not set
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_ANUBIS is not set
++# CONFIG_CRYPTO_DEFLATE is not set
++# CONFIG_CRYPTO_MICHAEL_MIC is not set
++# CONFIG_CRYPTO_CRC32C is not set
++# CONFIG_CRYPTO_TEST is not set
++
++#
++# Hardware crypto devices
++#
++# CONFIG_XEN_SMPBOOT is not set
++# CONFIG_XEN_DEVMEM is not set
++CONFIG_XEN_INTERFACE_VERSION=0x00030207
++
++#
++# XEN
++#
++CONFIG_XEN_PRIVILEGED_GUEST=y
++# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
++CONFIG_XEN_PRIVCMD=y
++CONFIG_XEN_XENBUS_DEV=y
++CONFIG_XEN_BACKEND=y
++CONFIG_XEN_BLKDEV_BACKEND=y
++CONFIG_XEN_BLKDEV_TAP=y
++CONFIG_XEN_NETDEV_BACKEND=y
++# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
++# CONFIG_XEN_NETDEV_LOOPBACK is not set
++CONFIG_XEN_PCIDEV_BACKEND=y
++# CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set
++# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
++# CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
++CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER=y
++# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
++CONFIG_XEN_TPMDEV_BACKEND=m
++CONFIG_XEN_BLKDEV_FRONTEND=y
++CONFIG_XEN_NETDEV_FRONTEND=y
++CONFIG_XEN_GRANT_DEV=y
++CONFIG_XEN_FRAMEBUFFER=y
++CONFIG_XEN_KEYBOARD=y
++# CONFIG_XEN_SCRUB_PAGES is not set
++CONFIG_XEN_DISABLE_SERIAL=y
++CONFIG_XEN_SYSFS=y
++CONFIG_XEN_COMPAT_030002_AND_LATER=y
++# CONFIG_XEN_COMPAT_030004_AND_LATER is not set
++# CONFIG_XEN_COMPAT_030100_AND_LATER is not set
++# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
++CONFIG_XEN_COMPAT=0x030002
++CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
++CONFIG_NO_IDLE_HZ=y
++CONFIG_XEN_BALLOON=y
++CONFIG_XEN_XENCOMM=y
+diff -rpuN linux-2.6.18.8/buildconfigs/linux-defconfig_xen0_x86_32 linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xen0_x86_32
+--- linux-2.6.18.8/buildconfigs/linux-defconfig_xen0_x86_32 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xen0_x86_32 2008-02-15 16:21:56.000000000 -0800
+@@ -0,0 +1,1451 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.18.8
++# Tue Oct 16 09:31:19 2007
++#
++CONFIG_X86_32=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_SEMAPHORE_SLEEPERS=y
++CONFIG_X86=y
++CONFIG_MMU=y
++CONFIG_GENERIC_ISA_DMA=y
++CONFIG_GENERIC_IOMAP=y
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_ARCH_MAY_HAVE_PC_FDC=y
++CONFIG_DMI=y
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# Code maturity level options
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION=""
++# CONFIG_LOCALVERSION_AUTO is not set
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++# CONFIG_POSIX_MQUEUE is not set
++# CONFIG_BSD_PROCESS_ACCT is not set
++# CONFIG_TASKSTATS is not set
++# CONFIG_AUDIT is not set
++# CONFIG_IKCONFIG is not set
++# CONFIG_CPUSETS is not set
++# CONFIG_RELAY is not set
++CONFIG_INITRAMFS_SOURCE=""
++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
++# CONFIG_EMBEDDED is not set
++CONFIG_UID16=y
++CONFIG_SYSCTL=y
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++# CONFIG_KALLSYMS_EXTRA_PASS is not set
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SHMEM=y
++CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_RT_MUTEXES=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++# CONFIG_SLOB is not set
++
++#
++# Loadable module support
++#
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++# CONFIG_MODULE_FORCE_UNLOAD is not set
++# CONFIG_MODVERSIONS is not set
++# CONFIG_MODULE_SRCVERSION_ALL is not set
++CONFIG_KMOD=y
++CONFIG_STOP_MACHINE=y
++
++#
++# Block layer
++#
++# CONFIG_LBD is not set
++# CONFIG_BLK_DEV_IO_TRACE is not set
++CONFIG_LSF=y
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++CONFIG_DEFAULT_AS=y
++# CONFIG_DEFAULT_DEADLINE is not set
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="anticipatory"
++
++#
++# Processor type and features
++#
++CONFIG_SMP=y
++# CONFIG_X86_PC is not set
++CONFIG_X86_XEN=y
++# CONFIG_X86_ELAN is not set
++# CONFIG_X86_VOYAGER is not set
++# CONFIG_X86_NUMAQ is not set
++# CONFIG_X86_SUMMIT is not set
++# CONFIG_X86_BIGSMP is not set
++# CONFIG_X86_VISWS is not set
++# CONFIG_X86_GENERICARCH is not set
++# CONFIG_X86_ES7000 is not set
++# CONFIG_M386 is not set
++# CONFIG_M486 is not set
++# CONFIG_M586 is not set
++# CONFIG_M586TSC is not set
++# CONFIG_M586MMX is not set
++CONFIG_M686=y
++# CONFIG_MPENTIUMII is not set
++# CONFIG_MPENTIUMIII is not set
++# CONFIG_MPENTIUMM is not set
++# CONFIG_MPENTIUM4 is not set
++# CONFIG_MK6 is not set
++# CONFIG_MK7 is not set
++# CONFIG_MK8 is not set
++# CONFIG_MCRUSOE is not set
++# CONFIG_MEFFICEON is not set
++# CONFIG_MWINCHIPC6 is not set
++# CONFIG_MWINCHIP2 is not set
++# CONFIG_MWINCHIP3D is not set
++# CONFIG_MGEODEGX1 is not set
++# CONFIG_MGEODE_LX is not set
++# CONFIG_MCYRIXIII is not set
++# CONFIG_MVIAC3_2 is not set
++# CONFIG_X86_GENERIC is not set
++CONFIG_X86_CMPXCHG=y
++CONFIG_X86_XADD=y
++CONFIG_X86_L1_CACHE_SHIFT=5
++CONFIG_RWSEM_XCHGADD_ALGORITHM=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_X86_PPRO_FENCE=y
++CONFIG_X86_WP_WORKS_OK=y
++CONFIG_X86_INVLPG=y
++CONFIG_X86_BSWAP=y
++CONFIG_X86_POPAD_OK=y
++CONFIG_X86_CMPXCHG64=y
++CONFIG_X86_GOOD_APIC=y
++CONFIG_X86_USE_PPRO_CHECKSUM=y
++CONFIG_NR_CPUS=8
++CONFIG_PREEMPT_NONE=y
++# CONFIG_PREEMPT_VOLUNTARY is not set
++# CONFIG_PREEMPT is not set
++CONFIG_PREEMPT_BKL=y
++CONFIG_X86_LOCAL_APIC=y
++CONFIG_X86_IO_APIC=y
++CONFIG_VM86=y
++# CONFIG_TOSHIBA is not set
++# CONFIG_I8K is not set
++# CONFIG_X86_REBOOTFIXUPS is not set
++CONFIG_MICROCODE=y
++CONFIG_X86_MSR=y
++CONFIG_X86_CPUID=y
++CONFIG_SWIOTLB=y
++
++#
++# Firmware Drivers
++#
++CONFIG_EDD=y
++# CONFIG_DELL_RBU is not set
++# CONFIG_DCDBAS is not set
++# CONFIG_NOHIGHMEM is not set
++CONFIG_HIGHMEM4G=y
++# CONFIG_HIGHMEM64G is not set
++CONFIG_PAGE_OFFSET=0xC0000000
++CONFIG_HIGHMEM=y
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++# CONFIG_SPARSEMEM_STATIC is not set
++CONFIG_SPLIT_PTLOCK_CPUS=4
++CONFIG_RESOURCES_64BIT=y
++# CONFIG_HIGHPTE is not set
++CONFIG_MTRR=y
++# CONFIG_REGPARM is not set
++CONFIG_SECCOMP=y
++CONFIG_HZ_100=y
++# CONFIG_HZ_250 is not set
++# CONFIG_HZ_1000 is not set
++CONFIG_HZ=100
++CONFIG_KEXEC=y
++# CONFIG_CRASH_DUMP is not set
++CONFIG_PHYSICAL_START=0x100000
++CONFIG_HOTPLUG_CPU=y
++CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
++
++#
++# Power management options (ACPI, APM)
++#
++CONFIG_PM=y
++CONFIG_PM_LEGACY=y
++# CONFIG_PM_DEBUG is not set
++# CONFIG_SOFTWARE_SUSPEND is not set
++CONFIG_SUSPEND_SMP=y
++
++#
++# ACPI (Advanced Configuration and Power Interface) Support
++#
++CONFIG_ACPI=y
++CONFIG_ACPI_SLEEP=y
++CONFIG_ACPI_SLEEP_PROC_FS=y
++# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
++CONFIG_ACPI_AC=m
++CONFIG_ACPI_BATTERY=m
++CONFIG_ACPI_BUTTON=m
++CONFIG_ACPI_VIDEO=m
++CONFIG_ACPI_HOTKEY=m
++CONFIG_ACPI_FAN=m
++CONFIG_ACPI_DOCK=m
++CONFIG_ACPI_PROCESSOR=m
++CONFIG_ACPI_HOTPLUG_CPU=y
++CONFIG_ACPI_THERMAL=m
++CONFIG_ACPI_ASUS=m
++CONFIG_ACPI_IBM=m
++CONFIG_ACPI_TOSHIBA=m
++# CONFIG_ACPI_CUSTOM_DSDT is not set
++CONFIG_ACPI_BLACKLIST_YEAR=0
++# CONFIG_ACPI_DEBUG is not set
++CONFIG_ACPI_EC=y
++CONFIG_ACPI_POWER=y
++CONFIG_ACPI_SYSTEM=y
++CONFIG_ACPI_CONTAINER=m
++CONFIG_ACPI_PV_SLEEP=y
++
++#
++# CPU Frequency scaling
++#
++# CONFIG_CPU_FREQ is not set
++
++#
++# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
++#
++CONFIG_PCI=y
++# CONFIG_PCI_GOBIOS is not set
++# CONFIG_PCI_GOMMCONFIG is not set
++# CONFIG_PCI_GODIRECT is not set
++# CONFIG_PCI_GOXEN_FE is not set
++CONFIG_PCI_GOANY=y
++CONFIG_PCI_DIRECT=y
++CONFIG_PCI_MMCONFIG=y
++CONFIG_XEN_PCIDEV_FRONTEND=y
++# CONFIG_XEN_PCIDEV_FE_DEBUG is not set
++# CONFIG_PCIEPORTBUS is not set
++# CONFIG_PCI_DEBUG is not set
++CONFIG_ISA_DMA_API=y
++# CONFIG_SCx200 is not set
++CONFIG_K8_NB=y
++
++#
++# PCCARD (PCMCIA/CardBus) support
++#
++# CONFIG_PCCARD is not set
++
++#
++# PCI Hotplug Support
++#
++# CONFIG_HOTPLUG_PCI is not set
++
++#
++# Executable file formats
++#
++CONFIG_BINFMT_ELF=y
++# CONFIG_BINFMT_AOUT is not set
++# CONFIG_BINFMT_MISC is not set
++
++#
++# Networking
++#
++CONFIG_NET=y
++
++#
++# Networking options
++#
++# CONFIG_NETDEBUG is not set
++CONFIG_PACKET=y
++# CONFIG_PACKET_MMAP is not set
++CONFIG_UNIX=y
++CONFIG_XFRM=y
++# CONFIG_XFRM_USER is not set
++# CONFIG_NET_KEY is not set
++CONFIG_INET=y
++# CONFIG_IP_MULTICAST is not set
++# CONFIG_IP_ADVANCED_ROUTER is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++# CONFIG_IP_PNP_BOOTP is not set
++# CONFIG_IP_PNP_RARP is not set
++# CONFIG_NET_IPIP is not set
++# CONFIG_NET_IPGRE is not set
++# CONFIG_ARPD is not set
++# CONFIG_SYN_COOKIES is not set
++# CONFIG_INET_AH is not set
++# CONFIG_INET_ESP is not set
++# CONFIG_INET_IPCOMP is not set
++# CONFIG_INET_XFRM_TUNNEL is not set
++# CONFIG_INET_TUNNEL is not set
++CONFIG_INET_XFRM_MODE_TRANSPORT=y
++CONFIG_INET_XFRM_MODE_TUNNEL=y
++# CONFIG_INET_DIAG is not set
++# CONFIG_TCP_CONG_ADVANCED is not set
++CONFIG_TCP_CONG_BIC=y
++
++#
++# IP: Virtual Server Configuration
++#
++# CONFIG_IP_VS is not set
++# CONFIG_IPV6 is not set
++# CONFIG_INET6_XFRM_TUNNEL is not set
++# CONFIG_INET6_TUNNEL is not set
++# CONFIG_NETWORK_SECMARK is not set
++CONFIG_NETFILTER=y
++# CONFIG_NETFILTER_DEBUG is not set
++CONFIG_BRIDGE_NETFILTER=y
++
++#
++# Core Netfilter Configuration
++#
++# CONFIG_NETFILTER_NETLINK is not set
++# CONFIG_NETFILTER_XTABLES is not set
++
++#
++# IP: Netfilter Configuration
++#
++CONFIG_IP_NF_CONNTRACK=m
++CONFIG_IP_NF_CT_ACCT=y
++# CONFIG_IP_NF_CONNTRACK_MARK is not set
++# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
++# CONFIG_IP_NF_CT_PROTO_SCTP is not set
++CONFIG_IP_NF_FTP=m
++# CONFIG_IP_NF_IRC is not set
++# CONFIG_IP_NF_NETBIOS_NS is not set
++# CONFIG_IP_NF_TFTP is not set
++# CONFIG_IP_NF_AMANDA is not set
++# CONFIG_IP_NF_PPTP is not set
++# CONFIG_IP_NF_H323 is not set
++# CONFIG_IP_NF_SIP is not set
++# CONFIG_IP_NF_QUEUE is not set
++
++#
++# Bridge: Netfilter Configuration
++#
++# CONFIG_BRIDGE_NF_EBTABLES is not set
++
++#
++# DCCP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_DCCP is not set
++
++#
++# SCTP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_SCTP is not set
++
++#
++# TIPC Configuration (EXPERIMENTAL)
++#
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++CONFIG_BRIDGE=y
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++CONFIG_LLC=y
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++
++#
++# QoS and/or fair queueing
++#
++# CONFIG_NET_SCHED is not set
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++# CONFIG_IEEE80211 is not set
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++# CONFIG_STANDALONE is not set
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++# CONFIG_FW_LOADER is not set
++# CONFIG_DEBUG_DRIVER is not set
++CONFIG_SYS_HYPERVISOR=y
++
++#
++# Connector - unified userspace <-> kernelspace linker
++#
++# CONFIG_CONNECTOR is not set
++
++#
++# Memory Technology Devices (MTD)
++#
++# CONFIG_MTD is not set
++
++#
++# Parallel port support
++#
++# CONFIG_PARPORT is not set
++
++#
++# Plug and Play support
++#
++CONFIG_PNP=y
++CONFIG_PNP_DEBUG=y
++
++#
++# Protocols
++#
++CONFIG_PNPACPI=y
++
++#
++# Block devices
++#
++CONFIG_BLK_DEV_FD=y
++# CONFIG_BLK_CPQ_DA is not set
++CONFIG_BLK_CPQ_CISS_DA=y
++# CONFIG_CISS_SCSI_TAPE is not set
++# CONFIG_BLK_DEV_DAC960 is not set
++# CONFIG_BLK_DEV_UMEM is not set
++# CONFIG_BLK_DEV_COW_COMMON is not set
++CONFIG_BLK_DEV_LOOP=y
++# CONFIG_BLK_DEV_CRYPTOLOOP is not set
++# CONFIG_BLK_DEV_NBD is not set
++# CONFIG_BLK_DEV_SX8 is not set
++# CONFIG_BLK_DEV_UB is not set
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=4096
++CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
++CONFIG_BLK_DEV_INITRD=y
++# CONFIG_CDROM_PKTCDVD is not set
++# CONFIG_ATA_OVER_ETH is not set
++
++#
++# ATA/ATAPI/MFM/RLL support
++#
++CONFIG_IDE=y
++CONFIG_BLK_DEV_IDE=y
++
++#
++# Please see Documentation/ide.txt for help/info on IDE drives
++#
++# CONFIG_BLK_DEV_IDE_SATA is not set
++# CONFIG_BLK_DEV_HD_IDE is not set
++CONFIG_BLK_DEV_IDEDISK=y
++# CONFIG_IDEDISK_MULTI_MODE is not set
++CONFIG_BLK_DEV_IDECD=y
++# CONFIG_BLK_DEV_IDETAPE is not set
++# CONFIG_BLK_DEV_IDEFLOPPY is not set
++# CONFIG_BLK_DEV_IDESCSI is not set
++# CONFIG_IDE_TASK_IOCTL is not set
++
++#
++# IDE chipset support/bugfixes
++#
++CONFIG_IDE_GENERIC=y
++# CONFIG_BLK_DEV_CMD640 is not set
++# CONFIG_BLK_DEV_IDEPNP is not set
++CONFIG_BLK_DEV_IDEPCI=y
++# CONFIG_IDEPCI_SHARE_IRQ is not set
++# CONFIG_BLK_DEV_OFFBOARD is not set
++CONFIG_BLK_DEV_GENERIC=y
++# CONFIG_BLK_DEV_OPTI621 is not set
++# CONFIG_BLK_DEV_RZ1000 is not set
++CONFIG_BLK_DEV_IDEDMA_PCI=y
++# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
++CONFIG_IDEDMA_PCI_AUTO=y
++# CONFIG_IDEDMA_ONLYDISK is not set
++# CONFIG_BLK_DEV_AEC62XX is not set
++# CONFIG_BLK_DEV_ALI15X3 is not set
++# CONFIG_BLK_DEV_AMD74XX is not set
++# CONFIG_BLK_DEV_ATIIXP is not set
++# CONFIG_BLK_DEV_CMD64X is not set
++# CONFIG_BLK_DEV_TRIFLEX is not set
++# CONFIG_BLK_DEV_CY82C693 is not set
++# CONFIG_BLK_DEV_CS5520 is not set
++# CONFIG_BLK_DEV_CS5530 is not set
++# CONFIG_BLK_DEV_CS5535 is not set
++# CONFIG_BLK_DEV_HPT34X is not set
++# CONFIG_BLK_DEV_HPT366 is not set
++# CONFIG_BLK_DEV_SC1200 is not set
++CONFIG_BLK_DEV_PIIX=y
++# CONFIG_BLK_DEV_IT821X is not set
++# CONFIG_BLK_DEV_NS87415 is not set
++# CONFIG_BLK_DEV_PDC202XX_OLD is not set
++# CONFIG_BLK_DEV_PDC202XX_NEW is not set
++CONFIG_BLK_DEV_SVWKS=y
++# CONFIG_BLK_DEV_SIIMAGE is not set
++# CONFIG_BLK_DEV_SIS5513 is not set
++# CONFIG_BLK_DEV_SLC90E66 is not set
++# CONFIG_BLK_DEV_TRM290 is not set
++# CONFIG_BLK_DEV_VIA82CXXX is not set
++# CONFIG_IDE_ARM is not set
++CONFIG_BLK_DEV_IDEDMA=y
++# CONFIG_IDEDMA_IVB is not set
++CONFIG_IDEDMA_AUTO=y
++# CONFIG_BLK_DEV_HD is not set
++
++#
++# SCSI device support
++#
++# CONFIG_RAID_ATTRS is not set
++CONFIG_SCSI=y
++CONFIG_SCSI_PROC_FS=y
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=y
++# CONFIG_CHR_DEV_ST is not set
++# CONFIG_CHR_DEV_OSST is not set
++# CONFIG_BLK_DEV_SR is not set
++# CONFIG_CHR_DEV_SG is not set
++# CONFIG_CHR_DEV_SCH is not set
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++# CONFIG_SCSI_MULTI_LUN is not set
++# CONFIG_SCSI_CONSTANTS is not set
++# CONFIG_SCSI_LOGGING is not set
++
++#
++# SCSI Transport Attributes
++#
++CONFIG_SCSI_SPI_ATTRS=y
++# CONFIG_SCSI_FC_ATTRS is not set
++# CONFIG_SCSI_ISCSI_ATTRS is not set
++# CONFIG_SCSI_SAS_ATTRS is not set
++
++#
++# SCSI low-level drivers
++#
++# CONFIG_ISCSI_TCP is not set
++CONFIG_BLK_DEV_3W_XXXX_RAID=y
++# CONFIG_SCSI_3W_9XXX is not set
++# CONFIG_SCSI_ACARD is not set
++CONFIG_SCSI_AACRAID=y
++CONFIG_SCSI_AIC7XXX=y
++CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
++CONFIG_AIC7XXX_RESET_DELAY_MS=15000
++CONFIG_AIC7XXX_DEBUG_ENABLE=y
++CONFIG_AIC7XXX_DEBUG_MASK=0
++CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
++# CONFIG_SCSI_AIC7XXX_OLD is not set
++CONFIG_SCSI_AIC79XX=y
++CONFIG_AIC79XX_CMDS_PER_DEVICE=32
++CONFIG_AIC79XX_RESET_DELAY_MS=15000
++# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
++CONFIG_AIC79XX_DEBUG_ENABLE=y
++CONFIG_AIC79XX_DEBUG_MASK=0
++CONFIG_AIC79XX_REG_PRETTY_PRINT=y
++# CONFIG_SCSI_DPT_I2O is not set
++CONFIG_SCSI_ADVANSYS=y
++CONFIG_MEGARAID_NEWGEN=y
++# CONFIG_MEGARAID_MM is not set
++# CONFIG_MEGARAID_LEGACY is not set
++# CONFIG_MEGARAID_SAS is not set
++CONFIG_SCSI_SATA=y
++CONFIG_SCSI_SATA_AHCI=y
++# CONFIG_SCSI_SATA_SVW is not set
++CONFIG_SCSI_ATA_PIIX=y
++# CONFIG_SCSI_SATA_MV is not set
++# CONFIG_SCSI_SATA_NV is not set
++# CONFIG_SCSI_PDC_ADMA is not set
++# CONFIG_SCSI_HPTIOP is not set
++# CONFIG_SCSI_SATA_QSTOR is not set
++CONFIG_SCSI_SATA_PROMISE=y
++CONFIG_SCSI_SATA_SX4=y
++CONFIG_SCSI_SATA_SIL=y
++CONFIG_SCSI_SATA_SIL24=y
++# CONFIG_SCSI_SATA_SIS is not set
++# CONFIG_SCSI_SATA_ULI is not set
++# CONFIG_SCSI_SATA_VIA is not set
++# CONFIG_SCSI_SATA_VITESSE is not set
++CONFIG_SCSI_SATA_INTEL_COMBINED=y
++# CONFIG_SCSI_BUSLOGIC is not set
++# CONFIG_SCSI_DMX3191D is not set
++# CONFIG_SCSI_EATA is not set
++# CONFIG_SCSI_FUTURE_DOMAIN is not set
++# CONFIG_SCSI_GDTH is not set
++# CONFIG_SCSI_IPS is not set
++# CONFIG_SCSI_INITIO is not set
++# CONFIG_SCSI_INIA100 is not set
++# CONFIG_SCSI_SYM53C8XX_2 is not set
++# CONFIG_SCSI_IPR is not set
++# CONFIG_SCSI_QLOGIC_1280 is not set
++# CONFIG_SCSI_QLA_FC is not set
++# CONFIG_SCSI_LPFC is not set
++# CONFIG_SCSI_DC395x is not set
++# CONFIG_SCSI_DC390T is not set
++# CONFIG_SCSI_NSP32 is not set
++# CONFIG_SCSI_DEBUG is not set
++
++#
++# Multi-device support (RAID and LVM)
++#
++CONFIG_MD=y
++CONFIG_BLK_DEV_MD=y
++# CONFIG_MD_LINEAR is not set
++CONFIG_MD_RAID0=y
++CONFIG_MD_RAID1=y
++# CONFIG_MD_RAID10 is not set
++# CONFIG_MD_RAID456 is not set
++# CONFIG_MD_MULTIPATH is not set
++# CONFIG_MD_FAULTY is not set
++CONFIG_BLK_DEV_DM=y
++# CONFIG_DM_CRYPT is not set
++CONFIG_DM_SNAPSHOT=y
++CONFIG_DM_MIRROR=y
++# CONFIG_DM_ZERO is not set
++# CONFIG_DM_MULTIPATH is not set
++
++#
++# Fusion MPT device support
++#
++CONFIG_FUSION=y
++CONFIG_FUSION_SPI=y
++# CONFIG_FUSION_FC is not set
++# CONFIG_FUSION_SAS is not set
++CONFIG_FUSION_MAX_SGE=128
++# CONFIG_FUSION_CTL is not set
++
++#
++# IEEE 1394 (FireWire) support
++#
++# CONFIG_IEEE1394 is not set
++
++#
++# I2O device support
++#
++# CONFIG_I2O is not set
++
++#
++# Network device support
++#
++CONFIG_NETDEVICES=y
++# CONFIG_DUMMY is not set
++# CONFIG_BONDING is not set
++# CONFIG_EQUALIZER is not set
++CONFIG_TUN=y
++# CONFIG_NET_SB1000 is not set
++
++#
++# ARCnet devices
++#
++# CONFIG_ARCNET is not set
++
++#
++# PHY device support
++#
++# CONFIG_PHYLIB is not set
++
++#
++# Ethernet (10 or 100Mbit)
++#
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=y
++# CONFIG_HAPPYMEAL is not set
++# CONFIG_SUNGEM is not set
++# CONFIG_CASSINI is not set
++CONFIG_NET_VENDOR_3COM=y
++CONFIG_VORTEX=y
++# CONFIG_TYPHOON is not set
++
++#
++# Tulip family network device support
++#
++CONFIG_NET_TULIP=y
++# CONFIG_DE2104X is not set
++CONFIG_TULIP=y
++# CONFIG_TULIP_MWI is not set
++# CONFIG_TULIP_MMIO is not set
++# CONFIG_TULIP_NAPI is not set
++# CONFIG_DE4X5 is not set
++# CONFIG_WINBOND_840 is not set
++# CONFIG_DM9102 is not set
++# CONFIG_ULI526X is not set
++# CONFIG_HP100 is not set
++CONFIG_NET_PCI=y
++CONFIG_PCNET32=y
++# CONFIG_AMD8111_ETH is not set
++# CONFIG_ADAPTEC_STARFIRE is not set
++# CONFIG_B44 is not set
++# CONFIG_FORCEDETH is not set
++# CONFIG_DGRS is not set
++# CONFIG_EEPRO100 is not set
++CONFIG_E100=y
++# CONFIG_FEALNX is not set
++# CONFIG_NATSEMI is not set
++CONFIG_NE2K_PCI=y
++# CONFIG_8139CP is not set
++CONFIG_8139TOO=y
++CONFIG_8139TOO_PIO=y
++# CONFIG_8139TOO_TUNE_TWISTER is not set
++# CONFIG_8139TOO_8129 is not set
++# CONFIG_8139_OLD_RX_RESET is not set
++# CONFIG_SIS900 is not set
++# CONFIG_EPIC100 is not set
++# CONFIG_SUNDANCE is not set
++# CONFIG_TLAN is not set
++CONFIG_VIA_RHINE=y
++# CONFIG_VIA_RHINE_MMIO is not set
++# CONFIG_VIA_RHINE_NAPI is not set
++
++#
++# Ethernet (1000 Mbit)
++#
++CONFIG_ACENIC=y
++# CONFIG_ACENIC_OMIT_TIGON_I is not set
++# CONFIG_DL2K is not set
++CONFIG_E1000=y
++# CONFIG_E1000_NAPI is not set
++# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
++# CONFIG_NS83820 is not set
++# CONFIG_HAMACHI is not set
++# CONFIG_YELLOWFIN is not set
++# CONFIG_R8169 is not set
++# CONFIG_SIS190 is not set
++# CONFIG_SKGE is not set
++# CONFIG_SKY2 is not set
++CONFIG_SK98LIN=y
++# CONFIG_VIA_VELOCITY is not set
++CONFIG_TIGON3=y
++CONFIG_BNX2=y
++
++#
++# Ethernet (10000 Mbit)
++#
++# CONFIG_CHELSIO_T1 is not set
++# CONFIG_IXGB is not set
++# CONFIG_S2IO is not set
++# CONFIG_MYRI10GE is not set
++
++#
++# Token Ring devices
++#
++# CONFIG_TR is not set
++
++#
++# Wireless LAN (non-hamradio)
++#
++# CONFIG_NET_RADIO is not set
++
++#
++# Wan interfaces
++#
++# CONFIG_WAN is not set
++# CONFIG_FDDI is not set
++# CONFIG_HIPPI is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++# CONFIG_NET_FC is not set
++# CONFIG_SHAPER is not set
++# CONFIG_NETCONSOLE is not set
++# CONFIG_NETPOLL is not set
++# CONFIG_NET_POLL_CONTROLLER is not set
++
++#
++# ISDN subsystem
++#
++# CONFIG_ISDN is not set
++
++#
++# Telephony Support
++#
++# CONFIG_PHONE is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++
++#
++# Userland interfaces
++#
++CONFIG_INPUT_MOUSEDEV=y
++CONFIG_INPUT_MOUSEDEV_PSAUX=y
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++# CONFIG_INPUT_JOYDEV is not set
++# CONFIG_INPUT_TSDEV is not set
++# CONFIG_INPUT_EVDEV is not set
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++CONFIG_INPUT_KEYBOARD=y
++CONFIG_KEYBOARD_ATKBD=y
++# CONFIG_KEYBOARD_SUNKBD is not set
++# CONFIG_KEYBOARD_LKKBD is not set
++# CONFIG_KEYBOARD_XTKBD is not set
++# CONFIG_KEYBOARD_NEWTON is not set
++CONFIG_INPUT_MOUSE=y
++CONFIG_MOUSE_PS2=y
++# CONFIG_MOUSE_SERIAL is not set
++# CONFIG_MOUSE_VSXXXAA is not set
++# CONFIG_INPUT_JOYSTICK is not set
++# CONFIG_INPUT_TOUCHSCREEN is not set
++# CONFIG_INPUT_MISC is not set
++
++#
++# Hardware I/O ports
++#
++CONFIG_SERIO=y
++CONFIG_SERIO_I8042=y
++CONFIG_SERIO_SERPORT=y
++# CONFIG_SERIO_CT82C710 is not set
++# CONFIG_SERIO_PCIPS2 is not set
++CONFIG_SERIO_LIBPS2=y
++# CONFIG_SERIO_RAW is not set
++# CONFIG_GAMEPORT is not set
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++CONFIG_VT_HW_CONSOLE_BINDING=y
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++
++#
++# Non-8250 serial port support
++#
++# CONFIG_SERIAL_JSM is not set
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=256
++
++#
++# IPMI
++#
++# CONFIG_IPMI_HANDLER is not set
++
++#
++# Watchdog Cards
++#
++# CONFIG_WATCHDOG is not set
++# CONFIG_HW_RANDOM is not set
++# CONFIG_NVRAM is not set
++# CONFIG_RTC is not set
++# CONFIG_GEN_RTC is not set
++# CONFIG_DTLK is not set
++# CONFIG_R3964 is not set
++# CONFIG_APPLICOM is not set
++# CONFIG_SONYPI is not set
++
++#
++# Ftape, the floppy tape device driver
++#
++CONFIG_AGP=m
++CONFIG_AGP_ALI=m
++CONFIG_AGP_ATI=m
++CONFIG_AGP_AMD=m
++CONFIG_AGP_AMD64=m
++CONFIG_AGP_INTEL=m
++CONFIG_AGP_NVIDIA=m
++CONFIG_AGP_SIS=m
++CONFIG_AGP_SWORKS=m
++CONFIG_AGP_VIA=m
++# CONFIG_AGP_EFFICEON is not set
++CONFIG_DRM=m
++CONFIG_DRM_TDFX=m
++CONFIG_DRM_R128=m
++CONFIG_DRM_RADEON=m
++CONFIG_DRM_I810=m
++CONFIG_DRM_I830=m
++CONFIG_DRM_I915=m
++CONFIG_DRM_MGA=m
++CONFIG_DRM_SIS=m
++# CONFIG_DRM_VIA is not set
++# CONFIG_DRM_SAVAGE is not set
++# CONFIG_MWAVE is not set
++# CONFIG_PC8736x_GPIO is not set
++# CONFIG_NSC_GPIO is not set
++# CONFIG_CS5535_GPIO is not set
++# CONFIG_RAW_DRIVER is not set
++# CONFIG_HPET is not set
++# CONFIG_HANGCHECK_TIMER is not set
++
++#
++# TPM devices
++#
++# CONFIG_TCG_TPM is not set
++# CONFIG_TELCLOCK is not set
++
++#
++# I2C support
++#
++# CONFIG_I2C is not set
++
++#
++# SPI support
++#
++# CONFIG_SPI is not set
++# CONFIG_SPI_MASTER is not set
++
++#
++# Dallas's 1-wire bus
++#
++
++#
++# Hardware Monitoring support
++#
++# CONFIG_HWMON is not set
++# CONFIG_HWMON_VID is not set
++
++#
++# Misc devices
++#
++# CONFIG_IBM_ASM is not set
++
++#
++# Multimedia devices
++#
++# CONFIG_VIDEO_DEV is not set
++
++#
++# Digital Video Broadcasting Devices
++#
++# CONFIG_DVB is not set
++# CONFIG_USB_DABUSB is not set
++
++#
++# Graphics support
++#
++CONFIG_FIRMWARE_EDID=y
++# CONFIG_FB is not set
++
++#
++# Console display driver support
++#
++CONFIG_VGA_CONSOLE=y
++# CONFIG_VGACON_SOFT_SCROLLBACK is not set
++CONFIG_DUMMY_CONSOLE=y
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Sound
++#
++# CONFIG_SOUND is not set
++
++#
++# USB support
++#
++CONFIG_USB_ARCH_HAS_HCD=y
++CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
++CONFIG_USB=y
++# CONFIG_USB_DEBUG is not set
++
++#
++# Miscellaneous USB options
++#
++# CONFIG_USB_DEVICEFS is not set
++# CONFIG_USB_BANDWIDTH is not set
++# CONFIG_USB_DYNAMIC_MINORS is not set
++# CONFIG_USB_SUSPEND is not set
++# CONFIG_USB_OTG is not set
++
++#
++# USB Host Controller Drivers
++#
++# CONFIG_USB_EHCI_HCD is not set
++# CONFIG_USB_ISP116X_HCD is not set
++CONFIG_USB_OHCI_HCD=y
++# CONFIG_USB_OHCI_BIG_ENDIAN is not set
++CONFIG_USB_OHCI_LITTLE_ENDIAN=y
++CONFIG_USB_UHCI_HCD=y
++# CONFIG_USB_SL811_HCD is not set
++
++#
++# USB Device Class drivers
++#
++# CONFIG_USB_ACM is not set
++# CONFIG_USB_PRINTER is not set
++
++#
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
++#
++
++#
++# may also be needed; see USB_STORAGE Help for more information
++#
++# CONFIG_USB_STORAGE is not set
++# CONFIG_USB_LIBUSUAL is not set
++
++#
++# USB Input Devices
++#
++CONFIG_USB_HID=y
++CONFIG_USB_HIDINPUT=y
++# CONFIG_USB_HIDINPUT_POWERBOOK is not set
++# CONFIG_HID_FF is not set
++# CONFIG_USB_HIDDEV is not set
++# CONFIG_USB_AIPTEK is not set
++# CONFIG_USB_WACOM is not set
++# CONFIG_USB_ACECAD is not set
++# CONFIG_USB_KBTAB is not set
++# CONFIG_USB_POWERMATE is not set
++# CONFIG_USB_TOUCHSCREEN is not set
++# CONFIG_USB_YEALINK is not set
++# CONFIG_USB_XPAD is not set
++# CONFIG_USB_ATI_REMOTE is not set
++# CONFIG_USB_ATI_REMOTE2 is not set
++# CONFIG_USB_KEYSPAN_REMOTE is not set
++# CONFIG_USB_APPLETOUCH is not set
++
++#
++# USB Imaging devices
++#
++# CONFIG_USB_MDC800 is not set
++# CONFIG_USB_MICROTEK is not set
++
++#
++# USB Network Adapters
++#
++# CONFIG_USB_CATC is not set
++# CONFIG_USB_KAWETH is not set
++# CONFIG_USB_PEGASUS is not set
++# CONFIG_USB_RTL8150 is not set
++# CONFIG_USB_USBNET is not set
++CONFIG_USB_MON=y
++
++#
++# USB port drivers
++#
++
++#
++# USB Serial Converter support
++#
++# CONFIG_USB_SERIAL is not set
++
++#
++# USB Miscellaneous drivers
++#
++# CONFIG_USB_EMI62 is not set
++# CONFIG_USB_EMI26 is not set
++# CONFIG_USB_AUERSWALD is not set
++# CONFIG_USB_RIO500 is not set
++# CONFIG_USB_LEGOTOWER is not set
++# CONFIG_USB_LCD is not set
++# CONFIG_USB_LED is not set
++# CONFIG_USB_CYPRESS_CY7C63 is not set
++# CONFIG_USB_CYTHERM is not set
++# CONFIG_USB_PHIDGETKIT is not set
++# CONFIG_USB_PHIDGETSERVO is not set
++# CONFIG_USB_IDMOUSE is not set
++# CONFIG_USB_APPLEDISPLAY is not set
++# CONFIG_USB_LD is not set
++
++#
++# USB DSL modem support
++#
++
++#
++# USB Gadget Support
++#
++# CONFIG_USB_GADGET is not set
++
++#
++# MMC/SD Card support
++#
++# CONFIG_MMC is not set
++
++#
++# LED devices
++#
++# CONFIG_NEW_LEDS is not set
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++
++#
++# InfiniBand support
++#
++# CONFIG_INFINIBAND is not set
++
++#
++# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
++#
++# CONFIG_EDAC is not set
++
++#
++# Real Time Clock
++#
++CONFIG_RTC_LIB=m
++CONFIG_RTC_CLASS=m
++
++#
++# RTC interfaces
++#
++CONFIG_RTC_INTF_SYSFS=m
++CONFIG_RTC_INTF_PROC=m
++CONFIG_RTC_INTF_DEV=m
++# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
++
++#
++# RTC drivers
++#
++# CONFIG_RTC_DRV_DS1553 is not set
++# CONFIG_RTC_DRV_DS1742 is not set
++CONFIG_RTC_DRV_M48T86=m
++CONFIG_RTC_DRV_TEST=m
++# CONFIG_RTC_DRV_V3020 is not set
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
++#
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++# CONFIG_EXT2_FS_XATTR is not set
++# CONFIG_EXT2_FS_XIP is not set
++CONFIG_EXT3_FS=y
++CONFIG_EXT3_FS_XATTR=y
++# CONFIG_EXT3_FS_POSIX_ACL is not set
++# CONFIG_EXT3_FS_SECURITY is not set
++CONFIG_JBD=y
++# CONFIG_JBD_DEBUG is not set
++CONFIG_FS_MBCACHE=y
++CONFIG_REISERFS_FS=y
++# CONFIG_REISERFS_CHECK is not set
++# CONFIG_REISERFS_PROC_INFO is not set
++# CONFIG_REISERFS_FS_XATTR is not set
++# CONFIG_JFS_FS is not set
++# CONFIG_FS_POSIX_ACL is not set
++# CONFIG_XFS_FS is not set
++# CONFIG_OCFS2_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_ROMFS_FS is not set
++CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
++# CONFIG_QUOTA is not set
++CONFIG_DNOTIFY=y
++CONFIG_AUTOFS_FS=y
++CONFIG_AUTOFS4_FS=y
++# CONFIG_FUSE_FS is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=y
++CONFIG_JOLIET=y
++CONFIG_ZISOFS=y
++CONFIG_ZISOFS_FS=y
++# CONFIG_UDF_FS is not set
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=m
++CONFIG_MSDOS_FS=m
++CONFIG_VFAT_FS=m
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_KCORE=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_RAMFS=y
++# CONFIG_CONFIGFS_FS is not set
++
++#
++# Miscellaneous filesystems
++#
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++CONFIG_CRAMFS=y
++# CONFIG_VXFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++
++#
++# Network File Systems
++#
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3=y
++# CONFIG_NFS_V3_ACL is not set
++# CONFIG_NFS_V4 is not set
++# CONFIG_NFS_DIRECTIO is not set
++CONFIG_NFSD=m
++CONFIG_NFSD_V3=y
++# CONFIG_NFSD_V3_ACL is not set
++# CONFIG_NFSD_V4 is not set
++CONFIG_NFSD_TCP=y
++CONFIG_ROOT_NFS=y
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_EXPORTFS=m
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++# CONFIG_RPCSEC_GSS_KRB5 is not set
++# CONFIG_RPCSEC_GSS_SPKM3 is not set
++# CONFIG_SMB_FS is not set
++# CONFIG_CIFS is not set
++# CONFIG_NCP_FS is not set
++# CONFIG_CODA_FS is not set
++# CONFIG_AFS_FS is not set
++# CONFIG_9P_FS is not set
++
++#
++# Partition Types
++#
++# CONFIG_PARTITION_ADVANCED is not set
++CONFIG_MSDOS_PARTITION=y
++
++#
++# Native Language Support
++#
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="iso8859-1"
++CONFIG_NLS_CODEPAGE_437=y
++# CONFIG_NLS_CODEPAGE_737 is not set
++# CONFIG_NLS_CODEPAGE_775 is not set
++# CONFIG_NLS_CODEPAGE_850 is not set
++# CONFIG_NLS_CODEPAGE_852 is not set
++# CONFIG_NLS_CODEPAGE_855 is not set
++# CONFIG_NLS_CODEPAGE_857 is not set
++# CONFIG_NLS_CODEPAGE_860 is not set
++# CONFIG_NLS_CODEPAGE_861 is not set
++# CONFIG_NLS_CODEPAGE_862 is not set
++# CONFIG_NLS_CODEPAGE_863 is not set
++# CONFIG_NLS_CODEPAGE_864 is not set
++# CONFIG_NLS_CODEPAGE_865 is not set
++# CONFIG_NLS_CODEPAGE_866 is not set
++# CONFIG_NLS_CODEPAGE_869 is not set
++# CONFIG_NLS_CODEPAGE_936 is not set
++# CONFIG_NLS_CODEPAGE_950 is not set
++# CONFIG_NLS_CODEPAGE_932 is not set
++# CONFIG_NLS_CODEPAGE_949 is not set
++# CONFIG_NLS_CODEPAGE_874 is not set
++# CONFIG_NLS_ISO8859_8 is not set
++# CONFIG_NLS_CODEPAGE_1250 is not set
++# CONFIG_NLS_CODEPAGE_1251 is not set
++# CONFIG_NLS_ASCII is not set
++CONFIG_NLS_ISO8859_1=y
++# CONFIG_NLS_ISO8859_2 is not set
++# CONFIG_NLS_ISO8859_3 is not set
++# CONFIG_NLS_ISO8859_4 is not set
++# CONFIG_NLS_ISO8859_5 is not set
++# CONFIG_NLS_ISO8859_6 is not set
++# CONFIG_NLS_ISO8859_7 is not set
++# CONFIG_NLS_ISO8859_9 is not set
++# CONFIG_NLS_ISO8859_13 is not set
++# CONFIG_NLS_ISO8859_14 is not set
++# CONFIG_NLS_ISO8859_15 is not set
++# CONFIG_NLS_KOI8_R is not set
++# CONFIG_NLS_KOI8_U is not set
++# CONFIG_NLS_UTF8 is not set
++
++#
++# Instrumentation Support
++#
++# CONFIG_PROFILING is not set
++# CONFIG_KPROBES is not set
++
++#
++# Kernel hacking
++#
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++# CONFIG_PRINTK_TIME is not set
++CONFIG_MAGIC_SYSRQ=y
++CONFIG_UNUSED_SYMBOLS=y
++CONFIG_DEBUG_KERNEL=y
++CONFIG_LOG_BUF_SHIFT=14
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_SCHEDSTATS is not set
++# CONFIG_DEBUG_SLAB is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_RWSEMS is not set
++# CONFIG_DEBUG_LOCK_ALLOC is not set
++# CONFIG_PROVE_LOCKING is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++# CONFIG_DEBUG_HIGHMEM is not set
++CONFIG_DEBUG_BUGVERBOSE=y
++CONFIG_DEBUG_INFO=y
++# CONFIG_DEBUG_FS is not set
++# CONFIG_DEBUG_VM is not set
++CONFIG_FRAME_POINTER=y
++# CONFIG_UNWIND_INFO is not set
++CONFIG_FORCED_INLINING=y
++# CONFIG_RCU_TORTURE_TEST is not set
++CONFIG_EARLY_PRINTK=y
++# CONFIG_DEBUG_STACKOVERFLOW is not set
++# CONFIG_DEBUG_STACK_USAGE is not set
++# CONFIG_DEBUG_PAGEALLOC is not set
++# CONFIG_DEBUG_RODATA is not set
++# CONFIG_4KSTACKS is not set
++CONFIG_X86_FIND_SMP_CONFIG=y
++CONFIG_X86_MPPARSE=y
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++
++#
++# Cryptographic options
++#
++CONFIG_CRYPTO=y
++CONFIG_CRYPTO_HMAC=y
++# CONFIG_CRYPTO_NULL is not set
++# CONFIG_CRYPTO_MD4 is not set
++CONFIG_CRYPTO_MD5=m
++CONFIG_CRYPTO_SHA1=m
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_WP512 is not set
++# CONFIG_CRYPTO_TGR192 is not set
++CONFIG_CRYPTO_DES=m
++# CONFIG_CRYPTO_BLOWFISH is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++# CONFIG_CRYPTO_SERPENT is not set
++# CONFIG_CRYPTO_AES is not set
++# CONFIG_CRYPTO_AES_586 is not set
++# CONFIG_CRYPTO_CAST5 is not set
++# CONFIG_CRYPTO_CAST6 is not set
++# CONFIG_CRYPTO_TEA is not set
++# CONFIG_CRYPTO_ARC4 is not set
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_ANUBIS is not set
++# CONFIG_CRYPTO_DEFLATE is not set
++# CONFIG_CRYPTO_MICHAEL_MIC is not set
++CONFIG_CRYPTO_CRC32C=m
++# CONFIG_CRYPTO_TEST is not set
++
++#
++# Hardware crypto devices
++#
++# CONFIG_CRYPTO_DEV_PADLOCK is not set
++CONFIG_XEN=y
++CONFIG_XEN_INTERFACE_VERSION=0x00030206
++
++#
++# XEN
++#
++CONFIG_XEN_PRIVILEGED_GUEST=y
++# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
++CONFIG_XEN_PRIVCMD=y
++CONFIG_XEN_XENBUS_DEV=y
++CONFIG_XEN_BACKEND=y
++CONFIG_XEN_BLKDEV_BACKEND=y
++CONFIG_XEN_BLKDEV_TAP=y
++CONFIG_XEN_NETDEV_BACKEND=y
++# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
++# CONFIG_XEN_NETDEV_LOOPBACK is not set
++CONFIG_XEN_PCIDEV_BACKEND=y
++# CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set
++CONFIG_XEN_PCIDEV_BACKEND_PASS=y
++# CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
++# CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER is not set
++# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
++CONFIG_XEN_TPMDEV_BACKEND=m
++CONFIG_XEN_BLKDEV_FRONTEND=y
++CONFIG_XEN_NETDEV_FRONTEND=y
++CONFIG_XEN_SCRUB_PAGES=y
++CONFIG_XEN_DISABLE_SERIAL=y
++CONFIG_XEN_SYSFS=y
++CONFIG_XEN_COMPAT_030002_AND_LATER=y
++# CONFIG_XEN_COMPAT_030004_AND_LATER is not set
++# CONFIG_XEN_COMPAT_030100_AND_LATER is not set
++# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
++CONFIG_XEN_COMPAT=0x030002
++CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
++CONFIG_NO_IDLE_HZ=y
++CONFIG_XEN_SMPBOOT=y
++CONFIG_XEN_BALLOON=y
++CONFIG_XEN_DEVMEM=y
++CONFIG_XEN_GRANT_DEV=y
++
++#
++# Library routines
++#
++# CONFIG_CRC_CCITT is not set
++# CONFIG_CRC16 is not set
++CONFIG_CRC32=y
++CONFIG_LIBCRC32C=y
++CONFIG_ZLIB_INFLATE=y
++CONFIG_PLIST=y
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_GENERIC_PENDING_IRQ=y
++CONFIG_X86_SMP=y
++CONFIG_X86_BIOS_REBOOT=y
++CONFIG_X86_TRAMPOLINE=y
++CONFIG_X86_NO_TSS=y
++CONFIG_X86_NO_IDT=y
++CONFIG_KTIME_SCALAR=y
+diff -rpuN linux-2.6.18.8/buildconfigs/linux-defconfig_xen0_x86_64 linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xen0_x86_64
+--- linux-2.6.18.8/buildconfigs/linux-defconfig_xen0_x86_64 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xen0_x86_64 2008-02-15 16:21:56.000000000 -0800
+@@ -0,0 +1,1389 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.18.8
++# Tue Oct 16 09:32:39 2007
++#
++CONFIG_X86_64=y
++CONFIG_64BIT=y
++CONFIG_X86=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_SEMAPHORE_SLEEPERS=y
++CONFIG_MMU=y
++CONFIG_RWSEM_GENERIC_SPINLOCK=y
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_X86_CMPXCHG=y
++CONFIG_EARLY_PRINTK=y
++CONFIG_GENERIC_ISA_DMA=y
++CONFIG_GENERIC_IOMAP=y
++CONFIG_ARCH_MAY_HAVE_PC_FDC=y
++CONFIG_DMI=y
++CONFIG_AUDIT_ARCH=y
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# Code maturity level options
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_BROKEN_ON_SMP=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION=""
++# CONFIG_LOCALVERSION_AUTO is not set
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++# CONFIG_POSIX_MQUEUE is not set
++# CONFIG_BSD_PROCESS_ACCT is not set
++# CONFIG_TASKSTATS is not set
++# CONFIG_AUDIT is not set
++# CONFIG_IKCONFIG is not set
++# CONFIG_RELAY is not set
++CONFIG_INITRAMFS_SOURCE=""
++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
++# CONFIG_EMBEDDED is not set
++CONFIG_UID16=y
++CONFIG_SYSCTL=y
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++# CONFIG_KALLSYMS_EXTRA_PASS is not set
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SHMEM=y
++CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_RT_MUTEXES=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++# CONFIG_SLOB is not set
++
++#
++# Loadable module support
++#
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++# CONFIG_MODULE_FORCE_UNLOAD is not set
++# CONFIG_MODVERSIONS is not set
++# CONFIG_MODULE_SRCVERSION_ALL is not set
++CONFIG_KMOD=y
++
++#
++# Block layer
++#
++# CONFIG_LBD is not set
++# CONFIG_BLK_DEV_IO_TRACE is not set
++CONFIG_LSF=y
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++CONFIG_DEFAULT_AS=y
++# CONFIG_DEFAULT_DEADLINE is not set
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="anticipatory"
++
++#
++# Processor type and features
++#
++CONFIG_X86_PC=y
++# CONFIG_X86_VSMP is not set
++# CONFIG_MK8 is not set
++# CONFIG_MPSC is not set
++CONFIG_GENERIC_CPU=y
++CONFIG_X86_64_XEN=y
++CONFIG_X86_NO_TSS=y
++CONFIG_X86_NO_IDT=y
++CONFIG_X86_L1_CACHE_BYTES=128
++CONFIG_X86_L1_CACHE_SHIFT=7
++CONFIG_X86_INTERNODE_CACHE_BYTES=128
++CONFIG_X86_GOOD_APIC=y
++CONFIG_MICROCODE=y
++# CONFIG_X86_MSR is not set
++# CONFIG_X86_CPUID is not set
++CONFIG_X86_IO_APIC=y
++CONFIG_X86_XEN_GENAPIC=y
++CONFIG_X86_LOCAL_APIC=y
++CONFIG_MTRR=y
++# CONFIG_SMP is not set
++CONFIG_PREEMPT_NONE=y
++# CONFIG_PREEMPT_VOLUNTARY is not set
++# CONFIG_PREEMPT is not set
++CONFIG_ARCH_FLATMEM_ENABLE=y
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++# CONFIG_SPARSEMEM_STATIC is not set
++CONFIG_SPLIT_PTLOCK_CPUS=4
++CONFIG_RESOURCES_64BIT=y
++CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
++CONFIG_SWIOTLB=y
++CONFIG_KEXEC=y
++# CONFIG_CRASH_DUMP is not set
++CONFIG_PHYSICAL_START=0x200000
++CONFIG_SECCOMP=y
++CONFIG_HZ_100=y
++# CONFIG_HZ_250 is not set
++# CONFIG_HZ_1000 is not set
++CONFIG_HZ=100
++# CONFIG_REORDER is not set
++CONFIG_K8_NB=y
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_ISA_DMA_API=y
++
++#
++# Power management options
++#
++CONFIG_PM=y
++CONFIG_PM_LEGACY=y
++# CONFIG_PM_DEBUG is not set
++# CONFIG_SOFTWARE_SUSPEND is not set
++
++#
++# ACPI (Advanced Configuration and Power Interface) Support
++#
++CONFIG_ACPI=y
++CONFIG_ACPI_SLEEP=y
++CONFIG_ACPI_SLEEP_PROC_FS=y
++# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
++CONFIG_ACPI_AC=m
++CONFIG_ACPI_BATTERY=m
++CONFIG_ACPI_BUTTON=m
++CONFIG_ACPI_VIDEO=m
++# CONFIG_ACPI_HOTKEY is not set
++CONFIG_ACPI_FAN=m
++CONFIG_ACPI_DOCK=m
++CONFIG_ACPI_PROCESSOR=m
++CONFIG_ACPI_THERMAL=m
++CONFIG_ACPI_ASUS=m
++CONFIG_ACPI_IBM=m
++CONFIG_ACPI_TOSHIBA=m
++CONFIG_ACPI_BLACKLIST_YEAR=0
++# CONFIG_ACPI_DEBUG is not set
++CONFIG_ACPI_EC=y
++CONFIG_ACPI_POWER=y
++CONFIG_ACPI_SYSTEM=y
++# CONFIG_ACPI_CONTAINER is not set
++CONFIG_ACPI_PV_SLEEP=y
++
++#
++# CPU Frequency scaling
++#
++# CONFIG_CPU_FREQ is not set
++
++#
++# Bus options (PCI etc.)
++#
++CONFIG_PCI=y
++CONFIG_PCI_DIRECT=y
++# CONFIG_PCI_MMCONFIG is not set
++CONFIG_XEN_PCIDEV_FRONTEND=y
++# CONFIG_XEN_PCIDEV_FE_DEBUG is not set
++# CONFIG_PCIEPORTBUS is not set
++# CONFIG_PCI_DEBUG is not set
++
++#
++# PCCARD (PCMCIA/CardBus) support
++#
++# CONFIG_PCCARD is not set
++
++#
++# PCI Hotplug Support
++#
++# CONFIG_HOTPLUG_PCI is not set
++
++#
++# Executable file formats / Emulations
++#
++CONFIG_BINFMT_ELF=y
++CONFIG_BINFMT_MISC=y
++CONFIG_IA32_EMULATION=y
++# CONFIG_IA32_AOUT is not set
++CONFIG_COMPAT=y
++CONFIG_SYSVIPC_COMPAT=y
++
++#
++# Networking
++#
++CONFIG_NET=y
++
++#
++# Networking options
++#
++# CONFIG_NETDEBUG is not set
++CONFIG_PACKET=y
++# CONFIG_PACKET_MMAP is not set
++CONFIG_UNIX=y
++# CONFIG_NET_KEY is not set
++CONFIG_INET=y
++# CONFIG_IP_MULTICAST is not set
++# CONFIG_IP_ADVANCED_ROUTER is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++# CONFIG_IP_PNP_BOOTP is not set
++# CONFIG_IP_PNP_RARP is not set
++# CONFIG_NET_IPIP is not set
++# CONFIG_NET_IPGRE is not set
++# CONFIG_ARPD is not set
++# CONFIG_SYN_COOKIES is not set
++# CONFIG_INET_AH is not set
++# CONFIG_INET_ESP is not set
++# CONFIG_INET_IPCOMP is not set
++# CONFIG_INET_XFRM_TUNNEL is not set
++# CONFIG_INET_TUNNEL is not set
++# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
++# CONFIG_INET_XFRM_MODE_TUNNEL is not set
++# CONFIG_INET_DIAG is not set
++# CONFIG_TCP_CONG_ADVANCED is not set
++CONFIG_TCP_CONG_BIC=y
++
++#
++# IP: Virtual Server Configuration
++#
++# CONFIG_IP_VS is not set
++# CONFIG_IPV6 is not set
++# CONFIG_INET6_XFRM_TUNNEL is not set
++# CONFIG_INET6_TUNNEL is not set
++# CONFIG_NETWORK_SECMARK is not set
++CONFIG_NETFILTER=y
++# CONFIG_NETFILTER_DEBUG is not set
++CONFIG_BRIDGE_NETFILTER=y
++
++#
++# Core Netfilter Configuration
++#
++# CONFIG_NETFILTER_NETLINK is not set
++# CONFIG_NETFILTER_XTABLES is not set
++
++#
++# IP: Netfilter Configuration
++#
++CONFIG_IP_NF_CONNTRACK=m
++CONFIG_IP_NF_CT_ACCT=y
++# CONFIG_IP_NF_CONNTRACK_MARK is not set
++# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
++# CONFIG_IP_NF_CT_PROTO_SCTP is not set
++CONFIG_IP_NF_FTP=m
++# CONFIG_IP_NF_IRC is not set
++# CONFIG_IP_NF_NETBIOS_NS is not set
++# CONFIG_IP_NF_TFTP is not set
++# CONFIG_IP_NF_AMANDA is not set
++# CONFIG_IP_NF_PPTP is not set
++# CONFIG_IP_NF_H323 is not set
++# CONFIG_IP_NF_SIP is not set
++# CONFIG_IP_NF_QUEUE is not set
++
++#
++# Bridge: Netfilter Configuration
++#
++# CONFIG_BRIDGE_NF_EBTABLES is not set
++
++#
++# DCCP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_DCCP is not set
++
++#
++# SCTP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_SCTP is not set
++
++#
++# TIPC Configuration (EXPERIMENTAL)
++#
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++CONFIG_BRIDGE=y
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++CONFIG_LLC=y
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++
++#
++# QoS and/or fair queueing
++#
++# CONFIG_NET_SCHED is not set
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++# CONFIG_IEEE80211 is not set
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_STANDALONE=y
++# CONFIG_PREVENT_FIRMWARE_BUILD is not set
++# CONFIG_FW_LOADER is not set
++# CONFIG_DEBUG_DRIVER is not set
++CONFIG_SYS_HYPERVISOR=y
++
++#
++# Connector - unified userspace <-> kernelspace linker
++#
++# CONFIG_CONNECTOR is not set
++
++#
++# Memory Technology Devices (MTD)
++#
++# CONFIG_MTD is not set
++
++#
++# Parallel port support
++#
++# CONFIG_PARPORT is not set
++
++#
++# Plug and Play support
++#
++CONFIG_PNP=y
++CONFIG_PNP_DEBUG=y
++
++#
++# Protocols
++#
++CONFIG_PNPACPI=y
++
++#
++# Block devices
++#
++CONFIG_BLK_DEV_FD=y
++# CONFIG_BLK_CPQ_DA is not set
++CONFIG_BLK_CPQ_CISS_DA=y
++# CONFIG_CISS_SCSI_TAPE is not set
++# CONFIG_BLK_DEV_DAC960 is not set
++# CONFIG_BLK_DEV_UMEM is not set
++# CONFIG_BLK_DEV_COW_COMMON is not set
++CONFIG_BLK_DEV_LOOP=y
++# CONFIG_BLK_DEV_CRYPTOLOOP is not set
++# CONFIG_BLK_DEV_NBD is not set
++# CONFIG_BLK_DEV_SX8 is not set
++# CONFIG_BLK_DEV_UB is not set
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=16384
++CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
++CONFIG_BLK_DEV_INITRD=y
++# CONFIG_CDROM_PKTCDVD is not set
++# CONFIG_ATA_OVER_ETH is not set
++
++#
++# ATA/ATAPI/MFM/RLL support
++#
++CONFIG_IDE=y
++CONFIG_BLK_DEV_IDE=y
++
++#
++# Please see Documentation/ide.txt for help/info on IDE drives
++#
++# CONFIG_BLK_DEV_IDE_SATA is not set
++# CONFIG_BLK_DEV_HD_IDE is not set
++CONFIG_BLK_DEV_IDEDISK=y
++# CONFIG_IDEDISK_MULTI_MODE is not set
++CONFIG_BLK_DEV_IDECD=y
++# CONFIG_BLK_DEV_IDETAPE is not set
++# CONFIG_BLK_DEV_IDEFLOPPY is not set
++# CONFIG_BLK_DEV_IDESCSI is not set
++# CONFIG_IDE_TASK_IOCTL is not set
++
++#
++# IDE chipset support/bugfixes
++#
++CONFIG_IDE_GENERIC=y
++# CONFIG_BLK_DEV_CMD640 is not set
++# CONFIG_BLK_DEV_IDEPNP is not set
++CONFIG_BLK_DEV_IDEPCI=y
++# CONFIG_IDEPCI_SHARE_IRQ is not set
++# CONFIG_BLK_DEV_OFFBOARD is not set
++CONFIG_BLK_DEV_GENERIC=y
++# CONFIG_BLK_DEV_OPTI621 is not set
++# CONFIG_BLK_DEV_RZ1000 is not set
++CONFIG_BLK_DEV_IDEDMA_PCI=y
++# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
++CONFIG_IDEDMA_PCI_AUTO=y
++# CONFIG_IDEDMA_ONLYDISK is not set
++# CONFIG_BLK_DEV_AEC62XX is not set
++# CONFIG_BLK_DEV_ALI15X3 is not set
++# CONFIG_BLK_DEV_AMD74XX is not set
++# CONFIG_BLK_DEV_ATIIXP is not set
++# CONFIG_BLK_DEV_CMD64X is not set
++# CONFIG_BLK_DEV_TRIFLEX is not set
++# CONFIG_BLK_DEV_CY82C693 is not set
++# CONFIG_BLK_DEV_CS5520 is not set
++# CONFIG_BLK_DEV_CS5530 is not set
++# CONFIG_BLK_DEV_HPT34X is not set
++# CONFIG_BLK_DEV_HPT366 is not set
++# CONFIG_BLK_DEV_SC1200 is not set
++CONFIG_BLK_DEV_PIIX=y
++# CONFIG_BLK_DEV_IT821X is not set
++# CONFIG_BLK_DEV_NS87415 is not set
++# CONFIG_BLK_DEV_PDC202XX_OLD is not set
++# CONFIG_BLK_DEV_PDC202XX_NEW is not set
++CONFIG_BLK_DEV_SVWKS=y
++# CONFIG_BLK_DEV_SIIMAGE is not set
++# CONFIG_BLK_DEV_SIS5513 is not set
++# CONFIG_BLK_DEV_SLC90E66 is not set
++# CONFIG_BLK_DEV_TRM290 is not set
++# CONFIG_BLK_DEV_VIA82CXXX is not set
++# CONFIG_IDE_ARM is not set
++CONFIG_BLK_DEV_IDEDMA=y
++# CONFIG_IDEDMA_IVB is not set
++CONFIG_IDEDMA_AUTO=y
++# CONFIG_BLK_DEV_HD is not set
++
++#
++# SCSI device support
++#
++# CONFIG_RAID_ATTRS is not set
++CONFIG_SCSI=y
++CONFIG_SCSI_PROC_FS=y
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=y
++# CONFIG_CHR_DEV_ST is not set
++# CONFIG_CHR_DEV_OSST is not set
++# CONFIG_BLK_DEV_SR is not set
++# CONFIG_CHR_DEV_SG is not set
++# CONFIG_CHR_DEV_SCH is not set
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++# CONFIG_SCSI_MULTI_LUN is not set
++# CONFIG_SCSI_CONSTANTS is not set
++# CONFIG_SCSI_LOGGING is not set
++
++#
++# SCSI Transport Attributes
++#
++CONFIG_SCSI_SPI_ATTRS=y
++# CONFIG_SCSI_FC_ATTRS is not set
++CONFIG_SCSI_ISCSI_ATTRS=y
++# CONFIG_SCSI_SAS_ATTRS is not set
++
++#
++# SCSI low-level drivers
++#
++# CONFIG_ISCSI_TCP is not set
++CONFIG_BLK_DEV_3W_XXXX_RAID=y
++# CONFIG_SCSI_3W_9XXX is not set
++# CONFIG_SCSI_ACARD is not set
++CONFIG_SCSI_AACRAID=y
++CONFIG_SCSI_AIC7XXX=y
++CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
++CONFIG_AIC7XXX_RESET_DELAY_MS=15000
++# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
++CONFIG_AIC7XXX_DEBUG_ENABLE=y
++CONFIG_AIC7XXX_DEBUG_MASK=0
++CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
++# CONFIG_SCSI_AIC7XXX_OLD is not set
++CONFIG_SCSI_AIC79XX=y
++CONFIG_AIC79XX_CMDS_PER_DEVICE=32
++CONFIG_AIC79XX_RESET_DELAY_MS=15000
++# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
++# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
++CONFIG_AIC79XX_DEBUG_ENABLE=y
++CONFIG_AIC79XX_DEBUG_MASK=0
++CONFIG_AIC79XX_REG_PRETTY_PRINT=y
++CONFIG_MEGARAID_NEWGEN=y
++# CONFIG_MEGARAID_MM is not set
++# CONFIG_MEGARAID_LEGACY is not set
++# CONFIG_MEGARAID_SAS is not set
++CONFIG_SCSI_SATA=y
++CONFIG_SCSI_SATA_AHCI=y
++# CONFIG_SCSI_SATA_SVW is not set
++CONFIG_SCSI_ATA_PIIX=y
++# CONFIG_SCSI_SATA_MV is not set
++# CONFIG_SCSI_SATA_NV is not set
++# CONFIG_SCSI_PDC_ADMA is not set
++# CONFIG_SCSI_HPTIOP is not set
++# CONFIG_SCSI_SATA_QSTOR is not set
++CONFIG_SCSI_SATA_PROMISE=y
++CONFIG_SCSI_SATA_SX4=y
++CONFIG_SCSI_SATA_SIL=y
++CONFIG_SCSI_SATA_SIL24=y
++# CONFIG_SCSI_SATA_SIS is not set
++# CONFIG_SCSI_SATA_ULI is not set
++# CONFIG_SCSI_SATA_VIA is not set
++# CONFIG_SCSI_SATA_VITESSE is not set
++CONFIG_SCSI_SATA_INTEL_COMBINED=y
++CONFIG_SCSI_BUSLOGIC=y
++# CONFIG_SCSI_OMIT_FLASHPOINT is not set
++# CONFIG_SCSI_DMX3191D is not set
++# CONFIG_SCSI_EATA is not set
++# CONFIG_SCSI_FUTURE_DOMAIN is not set
++# CONFIG_SCSI_GDTH is not set
++# CONFIG_SCSI_IPS is not set
++# CONFIG_SCSI_INITIO is not set
++# CONFIG_SCSI_INIA100 is not set
++# CONFIG_SCSI_SYM53C8XX_2 is not set
++# CONFIG_SCSI_IPR is not set
++# CONFIG_SCSI_QLOGIC_1280 is not set
++# CONFIG_SCSI_QLA_FC is not set
++# CONFIG_SCSI_LPFC is not set
++# CONFIG_SCSI_DC395x is not set
++# CONFIG_SCSI_DC390T is not set
++# CONFIG_SCSI_DEBUG is not set
++
++#
++# Multi-device support (RAID and LVM)
++#
++CONFIG_MD=y
++CONFIG_BLK_DEV_MD=y
++CONFIG_MD_LINEAR=y
++CONFIG_MD_RAID0=y
++CONFIG_MD_RAID1=y
++# CONFIG_MD_RAID10 is not set
++CONFIG_MD_RAID456=y
++# CONFIG_MD_RAID5_RESHAPE is not set
++CONFIG_MD_MULTIPATH=y
++# CONFIG_MD_FAULTY is not set
++CONFIG_BLK_DEV_DM=y
++CONFIG_DM_CRYPT=y
++CONFIG_DM_SNAPSHOT=y
++CONFIG_DM_MIRROR=y
++# CONFIG_DM_ZERO is not set
++CONFIG_DM_MULTIPATH=y
++CONFIG_DM_MULTIPATH_EMC=y
++
++#
++# Fusion MPT device support
++#
++CONFIG_FUSION=y
++CONFIG_FUSION_SPI=y
++# CONFIG_FUSION_FC is not set
++# CONFIG_FUSION_SAS is not set
++CONFIG_FUSION_MAX_SGE=128
++# CONFIG_FUSION_CTL is not set
++
++#
++# IEEE 1394 (FireWire) support
++#
++# CONFIG_IEEE1394 is not set
++
++#
++# I2O device support
++#
++# CONFIG_I2O is not set
++
++#
++# Network device support
++#
++CONFIG_NETDEVICES=y
++# CONFIG_DUMMY is not set
++# CONFIG_BONDING is not set
++# CONFIG_EQUALIZER is not set
++CONFIG_TUN=y
++# CONFIG_NET_SB1000 is not set
++
++#
++# ARCnet devices
++#
++# CONFIG_ARCNET is not set
++
++#
++# PHY device support
++#
++# CONFIG_PHYLIB is not set
++
++#
++# Ethernet (10 or 100Mbit)
++#
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=y
++# CONFIG_HAPPYMEAL is not set
++# CONFIG_SUNGEM is not set
++# CONFIG_CASSINI is not set
++CONFIG_NET_VENDOR_3COM=y
++CONFIG_VORTEX=y
++# CONFIG_TYPHOON is not set
++
++#
++# Tulip family network device support
++#
++CONFIG_NET_TULIP=y
++# CONFIG_DE2104X is not set
++CONFIG_TULIP=y
++# CONFIG_TULIP_MWI is not set
++# CONFIG_TULIP_MMIO is not set
++# CONFIG_TULIP_NAPI is not set
++# CONFIG_DE4X5 is not set
++# CONFIG_WINBOND_840 is not set
++# CONFIG_DM9102 is not set
++# CONFIG_ULI526X is not set
++# CONFIG_HP100 is not set
++CONFIG_NET_PCI=y
++CONFIG_PCNET32=y
++# CONFIG_AMD8111_ETH is not set
++# CONFIG_ADAPTEC_STARFIRE is not set
++# CONFIG_B44 is not set
++# CONFIG_FORCEDETH is not set
++# CONFIG_DGRS is not set
++# CONFIG_EEPRO100 is not set
++CONFIG_E100=y
++# CONFIG_FEALNX is not set
++# CONFIG_NATSEMI is not set
++CONFIG_NE2K_PCI=y
++# CONFIG_8139CP is not set
++CONFIG_8139TOO=y
++CONFIG_8139TOO_PIO=y
++# CONFIG_8139TOO_TUNE_TWISTER is not set
++# CONFIG_8139TOO_8129 is not set
++# CONFIG_8139_OLD_RX_RESET is not set
++# CONFIG_SIS900 is not set
++# CONFIG_EPIC100 is not set
++# CONFIG_SUNDANCE is not set
++CONFIG_VIA_RHINE=y
++# CONFIG_VIA_RHINE_MMIO is not set
++# CONFIG_VIA_RHINE_NAPI is not set
++
++#
++# Ethernet (1000 Mbit)
++#
++CONFIG_ACENIC=y
++# CONFIG_ACENIC_OMIT_TIGON_I is not set
++# CONFIG_DL2K is not set
++CONFIG_E1000=y
++# CONFIG_E1000_NAPI is not set
++# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
++# CONFIG_NS83820 is not set
++# CONFIG_HAMACHI is not set
++# CONFIG_YELLOWFIN is not set
++# CONFIG_R8169 is not set
++# CONFIG_SIS190 is not set
++# CONFIG_SKGE is not set
++# CONFIG_SKY2 is not set
++CONFIG_SK98LIN=y
++# CONFIG_VIA_VELOCITY is not set
++CONFIG_TIGON3=y
++CONFIG_BNX2=y
++
++#
++# Ethernet (10000 Mbit)
++#
++# CONFIG_CHELSIO_T1 is not set
++# CONFIG_IXGB is not set
++# CONFIG_S2IO is not set
++# CONFIG_MYRI10GE is not set
++
++#
++# Token Ring devices
++#
++# CONFIG_TR is not set
++
++#
++# Wireless LAN (non-hamradio)
++#
++# CONFIG_NET_RADIO is not set
++
++#
++# Wan interfaces
++#
++# CONFIG_WAN is not set
++# CONFIG_FDDI is not set
++# CONFIG_HIPPI is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++# CONFIG_NET_FC is not set
++# CONFIG_SHAPER is not set
++# CONFIG_NETCONSOLE is not set
++# CONFIG_NETPOLL is not set
++# CONFIG_NET_POLL_CONTROLLER is not set
++
++#
++# ISDN subsystem
++#
++# CONFIG_ISDN is not set
++
++#
++# Telephony Support
++#
++# CONFIG_PHONE is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++
++#
++# Userland interfaces
++#
++CONFIG_INPUT_MOUSEDEV=y
++CONFIG_INPUT_MOUSEDEV_PSAUX=y
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++# CONFIG_INPUT_JOYDEV is not set
++# CONFIG_INPUT_TSDEV is not set
++# CONFIG_INPUT_EVDEV is not set
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++CONFIG_INPUT_KEYBOARD=y
++CONFIG_KEYBOARD_ATKBD=y
++# CONFIG_KEYBOARD_SUNKBD is not set
++# CONFIG_KEYBOARD_LKKBD is not set
++# CONFIG_KEYBOARD_XTKBD is not set
++# CONFIG_KEYBOARD_NEWTON is not set
++CONFIG_INPUT_MOUSE=y
++CONFIG_MOUSE_PS2=y
++# CONFIG_MOUSE_SERIAL is not set
++# CONFIG_MOUSE_VSXXXAA is not set
++# CONFIG_INPUT_JOYSTICK is not set
++# CONFIG_INPUT_TOUCHSCREEN is not set
++# CONFIG_INPUT_MISC is not set
++
++#
++# Hardware I/O ports
++#
++CONFIG_SERIO=y
++CONFIG_SERIO_I8042=y
++CONFIG_SERIO_SERPORT=y
++# CONFIG_SERIO_CT82C710 is not set
++# CONFIG_SERIO_PCIPS2 is not set
++CONFIG_SERIO_LIBPS2=y
++# CONFIG_SERIO_RAW is not set
++# CONFIG_GAMEPORT is not set
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++
++#
++# Non-8250 serial port support
++#
++# CONFIG_SERIAL_JSM is not set
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=256
++
++#
++# IPMI
++#
++# CONFIG_IPMI_HANDLER is not set
++
++#
++# Watchdog Cards
++#
++# CONFIG_WATCHDOG is not set
++# CONFIG_HW_RANDOM is not set
++# CONFIG_NVRAM is not set
++CONFIG_RTC=y
++# CONFIG_DTLK is not set
++# CONFIG_R3964 is not set
++# CONFIG_APPLICOM is not set
++
++#
++# Ftape, the floppy tape device driver
++#
++# CONFIG_FTAPE is not set
++CONFIG_AGP=m
++CONFIG_AGP_AMD64=m
++# CONFIG_AGP_INTEL is not set
++CONFIG_AGP_SIS=m
++CONFIG_AGP_VIA=m
++CONFIG_DRM=m
++CONFIG_DRM_TDFX=m
++CONFIG_DRM_R128=m
++CONFIG_DRM_RADEON=m
++CONFIG_DRM_MGA=m
++CONFIG_DRM_SIS=m
++# CONFIG_DRM_VIA is not set
++# CONFIG_DRM_SAVAGE is not set
++# CONFIG_MWAVE is not set
++# CONFIG_PC8736x_GPIO is not set
++# CONFIG_RAW_DRIVER is not set
++# CONFIG_HPET is not set
++# CONFIG_HANGCHECK_TIMER is not set
++
++#
++# TPM devices
++#
++# CONFIG_TCG_TPM is not set
++# CONFIG_TELCLOCK is not set
++
++#
++# I2C support
++#
++# CONFIG_I2C is not set
++
++#
++# SPI support
++#
++# CONFIG_SPI is not set
++# CONFIG_SPI_MASTER is not set
++
++#
++# Dallas's 1-wire bus
++#
++
++#
++# Hardware Monitoring support
++#
++# CONFIG_HWMON is not set
++# CONFIG_HWMON_VID is not set
++
++#
++# Misc devices
++#
++# CONFIG_IBM_ASM is not set
++
++#
++# Multimedia devices
++#
++# CONFIG_VIDEO_DEV is not set
++
++#
++# Digital Video Broadcasting Devices
++#
++# CONFIG_DVB is not set
++# CONFIG_USB_DABUSB is not set
++
++#
++# Graphics support
++#
++CONFIG_FIRMWARE_EDID=y
++# CONFIG_FB is not set
++
++#
++# Console display driver support
++#
++CONFIG_VGA_CONSOLE=y
++# CONFIG_VGACON_SOFT_SCROLLBACK is not set
++CONFIG_DUMMY_CONSOLE=y
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Sound
++#
++# CONFIG_SOUND is not set
++
++#
++# USB support
++#
++CONFIG_USB_ARCH_HAS_HCD=y
++CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
++CONFIG_USB=y
++# CONFIG_USB_DEBUG is not set
++
++#
++# Miscellaneous USB options
++#
++# CONFIG_USB_DEVICEFS is not set
++# CONFIG_USB_BANDWIDTH is not set
++# CONFIG_USB_DYNAMIC_MINORS is not set
++# CONFIG_USB_SUSPEND is not set
++# CONFIG_USB_OTG is not set
++
++#
++# USB Host Controller Drivers
++#
++# CONFIG_USB_EHCI_HCD is not set
++# CONFIG_USB_ISP116X_HCD is not set
++CONFIG_USB_OHCI_HCD=y
++# CONFIG_USB_OHCI_BIG_ENDIAN is not set
++CONFIG_USB_OHCI_LITTLE_ENDIAN=y
++CONFIG_USB_UHCI_HCD=y
++# CONFIG_USB_SL811_HCD is not set
++
++#
++# USB Device Class drivers
++#
++# CONFIG_USB_ACM is not set
++# CONFIG_USB_PRINTER is not set
++
++#
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
++#
++
++#
++# may also be needed; see USB_STORAGE Help for more information
++#
++# CONFIG_USB_STORAGE is not set
++# CONFIG_USB_LIBUSUAL is not set
++
++#
++# USB Input Devices
++#
++CONFIG_USB_HID=y
++CONFIG_USB_HIDINPUT=y
++# CONFIG_USB_HIDINPUT_POWERBOOK is not set
++# CONFIG_HID_FF is not set
++# CONFIG_USB_HIDDEV is not set
++# CONFIG_USB_AIPTEK is not set
++# CONFIG_USB_WACOM is not set
++# CONFIG_USB_ACECAD is not set
++# CONFIG_USB_KBTAB is not set
++# CONFIG_USB_POWERMATE is not set
++# CONFIG_USB_TOUCHSCREEN is not set
++# CONFIG_USB_YEALINK is not set
++# CONFIG_USB_XPAD is not set
++# CONFIG_USB_ATI_REMOTE is not set
++# CONFIG_USB_ATI_REMOTE2 is not set
++# CONFIG_USB_KEYSPAN_REMOTE is not set
++# CONFIG_USB_APPLETOUCH is not set
++
++#
++# USB Imaging devices
++#
++# CONFIG_USB_MDC800 is not set
++# CONFIG_USB_MICROTEK is not set
++
++#
++# USB Network Adapters
++#
++# CONFIG_USB_CATC is not set
++# CONFIG_USB_KAWETH is not set
++# CONFIG_USB_PEGASUS is not set
++# CONFIG_USB_RTL8150 is not set
++# CONFIG_USB_USBNET is not set
++CONFIG_USB_MON=y
++
++#
++# USB port drivers
++#
++
++#
++# USB Serial Converter support
++#
++# CONFIG_USB_SERIAL is not set
++
++#
++# USB Miscellaneous drivers
++#
++# CONFIG_USB_EMI62 is not set
++# CONFIG_USB_EMI26 is not set
++# CONFIG_USB_AUERSWALD is not set
++# CONFIG_USB_RIO500 is not set
++# CONFIG_USB_LEGOTOWER is not set
++# CONFIG_USB_LCD is not set
++# CONFIG_USB_LED is not set
++# CONFIG_USB_CYPRESS_CY7C63 is not set
++# CONFIG_USB_CYTHERM is not set
++# CONFIG_USB_PHIDGETKIT is not set
++# CONFIG_USB_PHIDGETSERVO is not set
++# CONFIG_USB_IDMOUSE is not set
++# CONFIG_USB_APPLEDISPLAY is not set
++# CONFIG_USB_LD is not set
++
++#
++# USB DSL modem support
++#
++
++#
++# USB Gadget Support
++#
++# CONFIG_USB_GADGET is not set
++
++#
++# MMC/SD Card support
++#
++# CONFIG_MMC is not set
++
++#
++# LED devices
++#
++CONFIG_NEW_LEDS=y
++CONFIG_LEDS_CLASS=m
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++CONFIG_LEDS_TRIGGERS=y
++CONFIG_LEDS_TRIGGER_TIMER=y
++CONFIG_LEDS_TRIGGER_IDE_DISK=y
++CONFIG_LEDS_TRIGGER_HEARTBEAT=y
++
++#
++# InfiniBand support
++#
++CONFIG_INFINIBAND=y
++# CONFIG_INFINIBAND_USER_MAD is not set
++# CONFIG_INFINIBAND_USER_ACCESS is not set
++CONFIG_INFINIBAND_ADDR_TRANS=y
++CONFIG_INFINIBAND_MTHCA=y
++CONFIG_INFINIBAND_MTHCA_DEBUG=y
++CONFIG_INFINIBAND_IPOIB=y
++CONFIG_INFINIBAND_IPOIB_DEBUG=y
++CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
++CONFIG_INFINIBAND_SRP=y
++CONFIG_INFINIBAND_ISER=y
++
++#
++# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
++#
++# CONFIG_EDAC is not set
++
++#
++# Real Time Clock
++#
++CONFIG_RTC_LIB=m
++CONFIG_RTC_CLASS=m
++
++#
++# RTC interfaces
++#
++CONFIG_RTC_INTF_SYSFS=m
++CONFIG_RTC_INTF_PROC=m
++CONFIG_RTC_INTF_DEV=m
++# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
++
++#
++# RTC drivers
++#
++CONFIG_RTC_DRV_DS1553=m
++CONFIG_RTC_DRV_DS1742=m
++CONFIG_RTC_DRV_M48T86=m
++CONFIG_RTC_DRV_TEST=m
++CONFIG_RTC_DRV_V3020=m
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
++#
++
++#
++# Firmware Drivers
++#
++CONFIG_EDD=y
++# CONFIG_DELL_RBU is not set
++# CONFIG_DCDBAS is not set
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++# CONFIG_EXT2_FS_XATTR is not set
++# CONFIG_EXT2_FS_XIP is not set
++CONFIG_EXT3_FS=y
++CONFIG_EXT3_FS_XATTR=y
++# CONFIG_EXT3_FS_POSIX_ACL is not set
++# CONFIG_EXT3_FS_SECURITY is not set
++CONFIG_JBD=y
++# CONFIG_JBD_DEBUG is not set
++CONFIG_FS_MBCACHE=y
++CONFIG_REISERFS_FS=y
++# CONFIG_REISERFS_CHECK is not set
++# CONFIG_REISERFS_PROC_INFO is not set
++# CONFIG_REISERFS_FS_XATTR is not set
++# CONFIG_JFS_FS is not set
++# CONFIG_FS_POSIX_ACL is not set
++# CONFIG_XFS_FS is not set
++# CONFIG_OCFS2_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_ROMFS_FS is not set
++CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
++# CONFIG_QUOTA is not set
++CONFIG_DNOTIFY=y
++CONFIG_AUTOFS_FS=y
++CONFIG_AUTOFS4_FS=y
++# CONFIG_FUSE_FS is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=y
++CONFIG_JOLIET=y
++CONFIG_ZISOFS=y
++CONFIG_ZISOFS_FS=y
++# CONFIG_UDF_FS is not set
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=y
++CONFIG_MSDOS_FS=y
++CONFIG_VFAT_FS=y
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_KCORE=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_RAMFS=y
++# CONFIG_CONFIGFS_FS is not set
++
++#
++# Miscellaneous filesystems
++#
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++CONFIG_CRAMFS=y
++# CONFIG_VXFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++
++#
++# Network File Systems
++#
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3=y
++# CONFIG_NFS_V3_ACL is not set
++# CONFIG_NFS_V4 is not set
++# CONFIG_NFS_DIRECTIO is not set
++CONFIG_NFSD=m
++CONFIG_NFSD_V3=y
++# CONFIG_NFSD_V3_ACL is not set
++# CONFIG_NFSD_V4 is not set
++CONFIG_NFSD_TCP=y
++CONFIG_ROOT_NFS=y
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_EXPORTFS=m
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++# CONFIG_RPCSEC_GSS_KRB5 is not set
++# CONFIG_RPCSEC_GSS_SPKM3 is not set
++# CONFIG_SMB_FS is not set
++# CONFIG_CIFS is not set
++# CONFIG_NCP_FS is not set
++# CONFIG_CODA_FS is not set
++# CONFIG_AFS_FS is not set
++# CONFIG_9P_FS is not set
++
++#
++# Partition Types
++#
++# CONFIG_PARTITION_ADVANCED is not set
++CONFIG_MSDOS_PARTITION=y
++
++#
++# Native Language Support
++#
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="iso8859-1"
++CONFIG_NLS_CODEPAGE_437=y
++# CONFIG_NLS_CODEPAGE_737 is not set
++# CONFIG_NLS_CODEPAGE_775 is not set
++# CONFIG_NLS_CODEPAGE_850 is not set
++# CONFIG_NLS_CODEPAGE_852 is not set
++# CONFIG_NLS_CODEPAGE_855 is not set
++# CONFIG_NLS_CODEPAGE_857 is not set
++# CONFIG_NLS_CODEPAGE_860 is not set
++# CONFIG_NLS_CODEPAGE_861 is not set
++# CONFIG_NLS_CODEPAGE_862 is not set
++# CONFIG_NLS_CODEPAGE_863 is not set
++# CONFIG_NLS_CODEPAGE_864 is not set
++# CONFIG_NLS_CODEPAGE_865 is not set
++# CONFIG_NLS_CODEPAGE_866 is not set
++# CONFIG_NLS_CODEPAGE_869 is not set
++# CONFIG_NLS_CODEPAGE_936 is not set
++# CONFIG_NLS_CODEPAGE_950 is not set
++# CONFIG_NLS_CODEPAGE_932 is not set
++# CONFIG_NLS_CODEPAGE_949 is not set
++# CONFIG_NLS_CODEPAGE_874 is not set
++# CONFIG_NLS_ISO8859_8 is not set
++# CONFIG_NLS_CODEPAGE_1250 is not set
++# CONFIG_NLS_CODEPAGE_1251 is not set
++# CONFIG_NLS_ASCII is not set
++CONFIG_NLS_ISO8859_1=y
++# CONFIG_NLS_ISO8859_2 is not set
++# CONFIG_NLS_ISO8859_3 is not set
++# CONFIG_NLS_ISO8859_4 is not set
++# CONFIG_NLS_ISO8859_5 is not set
++# CONFIG_NLS_ISO8859_6 is not set
++# CONFIG_NLS_ISO8859_7 is not set
++# CONFIG_NLS_ISO8859_9 is not set
++# CONFIG_NLS_ISO8859_13 is not set
++# CONFIG_NLS_ISO8859_14 is not set
++# CONFIG_NLS_ISO8859_15 is not set
++# CONFIG_NLS_KOI8_R is not set
++# CONFIG_NLS_KOI8_U is not set
++# CONFIG_NLS_UTF8 is not set
++
++#
++# Instrumentation Support
++#
++# CONFIG_PROFILING is not set
++# CONFIG_KPROBES is not set
++
++#
++# Kernel hacking
++#
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++# CONFIG_PRINTK_TIME is not set
++CONFIG_MAGIC_SYSRQ=y
++CONFIG_UNUSED_SYMBOLS=y
++CONFIG_DEBUG_KERNEL=y
++CONFIG_LOG_BUF_SHIFT=15
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_SCHEDSTATS is not set
++# CONFIG_DEBUG_SLAB is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_RWSEMS is not set
++# CONFIG_DEBUG_LOCK_ALLOC is not set
++# CONFIG_PROVE_LOCKING is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++# CONFIG_DEBUG_INFO is not set
++# CONFIG_DEBUG_FS is not set
++# CONFIG_DEBUG_VM is not set
++CONFIG_FRAME_POINTER=y
++# CONFIG_UNWIND_INFO is not set
++CONFIG_FORCED_INLINING=y
++# CONFIG_RCU_TORTURE_TEST is not set
++# CONFIG_DEBUG_RODATA is not set
++# CONFIG_DEBUG_STACKOVERFLOW is not set
++# CONFIG_DEBUG_STACK_USAGE is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++
++#
++# Cryptographic options
++#
++CONFIG_CRYPTO=y
++CONFIG_CRYPTO_HMAC=y
++# CONFIG_CRYPTO_NULL is not set
++# CONFIG_CRYPTO_MD4 is not set
++CONFIG_CRYPTO_MD5=m
++CONFIG_CRYPTO_SHA1=m
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_WP512 is not set
++# CONFIG_CRYPTO_TGR192 is not set
++CONFIG_CRYPTO_DES=m
++# CONFIG_CRYPTO_BLOWFISH is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++# CONFIG_CRYPTO_SERPENT is not set
++# CONFIG_CRYPTO_AES is not set
++# CONFIG_CRYPTO_AES_X86_64 is not set
++# CONFIG_CRYPTO_CAST5 is not set
++# CONFIG_CRYPTO_CAST6 is not set
++# CONFIG_CRYPTO_TEA is not set
++# CONFIG_CRYPTO_ARC4 is not set
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_ANUBIS is not set
++# CONFIG_CRYPTO_DEFLATE is not set
++# CONFIG_CRYPTO_MICHAEL_MIC is not set
++CONFIG_CRYPTO_CRC32C=m
++# CONFIG_CRYPTO_TEST is not set
++
++#
++# Hardware crypto devices
++#
++CONFIG_XEN=y
++CONFIG_XEN_INTERFACE_VERSION=0x00030206
++
++#
++# XEN
++#
++CONFIG_XEN_PRIVILEGED_GUEST=y
++# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
++CONFIG_XEN_PRIVCMD=y
++CONFIG_XEN_XENBUS_DEV=y
++CONFIG_XEN_BACKEND=y
++CONFIG_XEN_BLKDEV_BACKEND=y
++CONFIG_XEN_BLKDEV_TAP=y
++CONFIG_XEN_NETDEV_BACKEND=y
++# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
++# CONFIG_XEN_NETDEV_LOOPBACK is not set
++CONFIG_XEN_PCIDEV_BACKEND=y
++# CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set
++CONFIG_XEN_PCIDEV_BACKEND_PASS=y
++# CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
++# CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER is not set
++# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
++CONFIG_XEN_TPMDEV_BACKEND=m
++CONFIG_XEN_BLKDEV_FRONTEND=y
++CONFIG_XEN_NETDEV_FRONTEND=y
++CONFIG_XEN_SCRUB_PAGES=y
++CONFIG_XEN_DISABLE_SERIAL=y
++CONFIG_XEN_SYSFS=y
++CONFIG_XEN_COMPAT_030002_AND_LATER=y
++# CONFIG_XEN_COMPAT_030004_AND_LATER is not set
++# CONFIG_XEN_COMPAT_030100_AND_LATER is not set
++# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
++CONFIG_XEN_COMPAT=0x030002
++CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
++CONFIG_NO_IDLE_HZ=y
++CONFIG_XEN_BALLOON=y
++CONFIG_XEN_DEVMEM=y
++CONFIG_XEN_GRANT_DEV=y
++
++#
++# Library routines
++#
++# CONFIG_CRC_CCITT is not set
++# CONFIG_CRC16 is not set
++CONFIG_CRC32=y
++CONFIG_LIBCRC32C=m
++CONFIG_ZLIB_INFLATE=y
++CONFIG_PLIST=y
+diff -rpuN linux-2.6.18.8/buildconfigs/linux-defconfig_xenU_ia64 linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xenU_ia64
+--- linux-2.6.18.8/buildconfigs/linux-defconfig_xenU_ia64 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xenU_ia64 2008-02-15 16:21:56.000000000 -0800
+@@ -0,0 +1,1507 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.18.8
++# Mon Dec 17 13:38:36 2007
++#
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# Code maturity level options
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION=""
++CONFIG_LOCALVERSION_AUTO=y
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++# CONFIG_POSIX_MQUEUE is not set
++CONFIG_BSD_PROCESS_ACCT=y
++# CONFIG_BSD_PROCESS_ACCT_V3 is not set
++# CONFIG_TASKSTATS is not set
++# CONFIG_AUDIT is not set
++# CONFIG_IKCONFIG is not set
++# CONFIG_CPUSETS is not set
++# CONFIG_RELAY is not set
++CONFIG_INITRAMFS_SOURCE=""
++CONFIG_CC_OPTIMIZE_FOR_SIZE=y
++# CONFIG_EMBEDDED is not set
++CONFIG_SYSCTL=y
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++# CONFIG_KALLSYMS_EXTRA_PASS is not set
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SHMEM=y
++CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_RT_MUTEXES=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++# CONFIG_SLOB is not set
++
++#
++# Loadable module support
++#
++CONFIG_MODULES=y
++# CONFIG_MODULE_UNLOAD is not set
++# CONFIG_MODVERSIONS is not set
++# CONFIG_MODULE_SRCVERSION_ALL is not set
++# CONFIG_KMOD is not set
++CONFIG_STOP_MACHINE=y
++
++#
++# Block layer
++#
++# CONFIG_BLK_DEV_IO_TRACE is not set
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++CONFIG_DEFAULT_AS=y
++# CONFIG_DEFAULT_DEADLINE is not set
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="anticipatory"
++
++#
++# Processor type and features
++#
++CONFIG_IA64=y
++CONFIG_64BIT=y
++CONFIG_MMU=y
++CONFIG_SWIOTLB=y
++CONFIG_RWSEM_XCHGADD_ALGORITHM=y
++CONFIG_GENERIC_FIND_NEXT_BIT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_TIME_INTERPOLATION=y
++CONFIG_DMI=y
++CONFIG_EFI=y
++CONFIG_GENERIC_IOMAP=y
++CONFIG_XEN=y
++CONFIG_XEN_IA64_EXPOSE_P2M=y
++CONFIG_XEN_IA64_EXPOSE_P2M_USE_DTR=y
++CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
++CONFIG_DMA_IS_DMA32=y
++CONFIG_AUDIT_ARCH=y
++# CONFIG_IA64_GENERIC is not set
++# CONFIG_IA64_DIG is not set
++# CONFIG_IA64_HP_ZX1 is not set
++# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
++# CONFIG_IA64_SGI_SN2 is not set
++# CONFIG_IA64_HP_SIM is not set
++CONFIG_IA64_XEN=y
++# CONFIG_ITANIUM is not set
++CONFIG_MCKINLEY=y
++# CONFIG_IA64_PAGE_SIZE_4KB is not set
++# CONFIG_IA64_PAGE_SIZE_8KB is not set
++CONFIG_IA64_PAGE_SIZE_16KB=y
++# CONFIG_IA64_PAGE_SIZE_64KB is not set
++CONFIG_PGTABLE_3=y
++# CONFIG_PGTABLE_4 is not set
++CONFIG_HZ_100=y
++# CONFIG_HZ_250 is not set
++# CONFIG_HZ_1000 is not set
++CONFIG_HZ=100
++CONFIG_IA64_L1_CACHE_SHIFT=7
++# CONFIG_IA64_CYCLONE is not set
++CONFIG_IOSAPIC=y
++CONFIG_FORCE_MAX_ZONEORDER=11
++CONFIG_SMP=y
++CONFIG_NR_CPUS=16
++CONFIG_HOTPLUG_CPU=y
++CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
++# CONFIG_SCHED_SMT is not set
++# CONFIG_PERMIT_BSP_REMOVE is not set
++# CONFIG_PREEMPT is not set
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++# CONFIG_SPARSEMEM_STATIC is not set
++CONFIG_SPLIT_PTLOCK_CPUS=4
++CONFIG_RESOURCES_64BIT=y
++CONFIG_ARCH_SELECT_MEMORY_MODEL=y
++CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
++CONFIG_ARCH_FLATMEM_ENABLE=y
++CONFIG_ARCH_SPARSEMEM_ENABLE=y
++CONFIG_VIRTUAL_MEM_MAP=y
++CONFIG_HOLES_IN_ZONE=y
++# CONFIG_IA32_SUPPORT is not set
++CONFIG_IA64_MCA_RECOVERY=y
++CONFIG_PERFMON=y
++CONFIG_IA64_PALINFO=y
++# CONFIG_KEXEC is not set
++# CONFIG_CRASH_DUMP is not set
++
++#
++# Firmware Drivers
++#
++CONFIG_EFI_VARS=y
++CONFIG_EFI_PCDP=y
++CONFIG_BINFMT_ELF=y
++CONFIG_BINFMT_MISC=y
++
++#
++# Power management and ACPI
++#
++CONFIG_PM=y
++CONFIG_PM_LEGACY=y
++# CONFIG_PM_DEBUG is not set
++
++#
++# ACPI (Advanced Configuration and Power Interface) Support
++#
++CONFIG_ACPI=y
++CONFIG_ACPI_BUTTON=y
++CONFIG_ACPI_FAN=y
++# CONFIG_ACPI_DOCK is not set
++CONFIG_ACPI_PROCESSOR=y
++CONFIG_ACPI_HOTPLUG_CPU=y
++CONFIG_ACPI_THERMAL=y
++CONFIG_ACPI_BLACKLIST_YEAR=0
++# CONFIG_ACPI_DEBUG is not set
++CONFIG_ACPI_EC=y
++CONFIG_ACPI_POWER=y
++CONFIG_ACPI_SYSTEM=y
++CONFIG_ACPI_CONTAINER=y
++
++#
++# CPU Frequency scaling
++#
++# CONFIG_CPU_FREQ is not set
++
++#
++# Bus options (PCI, PCMCIA)
++#
++CONFIG_PCI=y
++CONFIG_PCI_DOMAINS=y
++CONFIG_XEN_PCIDEV_FRONTEND=y
++# CONFIG_XEN_PCIDEV_FE_DEBUG is not set
++# CONFIG_PCIEPORTBUS is not set
++# CONFIG_PCI_DEBUG is not set
++
++#
++# PCI Hotplug Support
++#
++CONFIG_HOTPLUG_PCI=y
++# CONFIG_HOTPLUG_PCI_FAKE is not set
++CONFIG_HOTPLUG_PCI_ACPI=y
++# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
++# CONFIG_HOTPLUG_PCI_CPCI is not set
++# CONFIG_HOTPLUG_PCI_SHPC is not set
++
++#
++# PCCARD (PCMCIA/CardBus) support
++#
++# CONFIG_PCCARD is not set
++
++#
++# Networking
++#
++CONFIG_NET=y
++
++#
++# Networking options
++#
++# CONFIG_NETDEBUG is not set
++CONFIG_PACKET=y
++# CONFIG_PACKET_MMAP is not set
++CONFIG_UNIX=y
++CONFIG_XFRM=y
++# CONFIG_XFRM_USER is not set
++# CONFIG_NET_KEY is not set
++CONFIG_INET=y
++CONFIG_IP_MULTICAST=y
++# CONFIG_IP_ADVANCED_ROUTER is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++# CONFIG_IP_PNP_BOOTP is not set
++# CONFIG_IP_PNP_RARP is not set
++# CONFIG_NET_IPIP is not set
++# CONFIG_NET_IPGRE is not set
++# CONFIG_IP_MROUTE is not set
++# CONFIG_ARPD is not set
++# CONFIG_SYN_COOKIES is not set
++# CONFIG_INET_AH is not set
++# CONFIG_INET_ESP is not set
++# CONFIG_INET_IPCOMP is not set
++# CONFIG_INET_XFRM_TUNNEL is not set
++# CONFIG_INET_TUNNEL is not set
++CONFIG_INET_XFRM_MODE_TRANSPORT=y
++CONFIG_INET_XFRM_MODE_TUNNEL=y
++CONFIG_INET_DIAG=y
++CONFIG_INET_TCP_DIAG=y
++# CONFIG_TCP_CONG_ADVANCED is not set
++CONFIG_TCP_CONG_BIC=y
++
++#
++# IP: Virtual Server Configuration
++#
++# CONFIG_IP_VS is not set
++# CONFIG_IPV6 is not set
++# CONFIG_INET6_XFRM_TUNNEL is not set
++# CONFIG_INET6_TUNNEL is not set
++# CONFIG_NETWORK_SECMARK is not set
++CONFIG_NETFILTER=y
++# CONFIG_NETFILTER_DEBUG is not set
++
++#
++# Core Netfilter Configuration
++#
++# CONFIG_NETFILTER_NETLINK is not set
++# CONFIG_NF_CONNTRACK is not set
++# CONFIG_NETFILTER_XTABLES is not set
++
++#
++# IP: Netfilter Configuration
++#
++# CONFIG_IP_NF_CONNTRACK is not set
++# CONFIG_IP_NF_QUEUE is not set
++
++#
++# DCCP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_DCCP is not set
++
++#
++# SCTP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_SCTP is not set
++
++#
++# TIPC Configuration (EXPERIMENTAL)
++#
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++# CONFIG_BRIDGE is not set
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++
++#
++# QoS and/or fair queueing
++#
++# CONFIG_NET_SCHED is not set
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++# CONFIG_IEEE80211 is not set
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++# CONFIG_FW_LOADER is not set
++# CONFIG_DEBUG_DRIVER is not set
++CONFIG_SYS_HYPERVISOR=y
++
++#
++# Connector - unified userspace <-> kernelspace linker
++#
++# CONFIG_CONNECTOR is not set
++
++#
++# Memory Technology Devices (MTD)
++#
++# CONFIG_MTD is not set
++
++#
++# Parallel port support
++#
++# CONFIG_PARPORT is not set
++
++#
++# Plug and Play support
++#
++# CONFIG_PNP is not set
++
++#
++# Block devices
++#
++# CONFIG_BLK_CPQ_DA is not set
++# CONFIG_BLK_CPQ_CISS_DA is not set
++# CONFIG_BLK_DEV_DAC960 is not set
++# CONFIG_BLK_DEV_UMEM is not set
++# CONFIG_BLK_DEV_COW_COMMON is not set
++CONFIG_BLK_DEV_LOOP=y
++# CONFIG_BLK_DEV_CRYPTOLOOP is not set
++# CONFIG_BLK_DEV_NBD is not set
++# CONFIG_BLK_DEV_SX8 is not set
++# CONFIG_BLK_DEV_UB is not set
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=4096
++CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
++CONFIG_BLK_DEV_INITRD=y
++# CONFIG_CDROM_PKTCDVD is not set
++# CONFIG_ATA_OVER_ETH is not set
++
++#
++# ATA/ATAPI/MFM/RLL support
++#
++# CONFIG_IDE is not set
++
++#
++# SCSI device support
++#
++# CONFIG_RAID_ATTRS is not set
++CONFIG_SCSI=y
++CONFIG_SCSI_PROC_FS=y
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=y
++CONFIG_CHR_DEV_ST=y
++CONFIG_CHR_DEV_OSST=y
++CONFIG_BLK_DEV_SR=y
++CONFIG_BLK_DEV_SR_VENDOR=y
++CONFIG_CHR_DEV_SG=y
++# CONFIG_CHR_DEV_SCH is not set
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++CONFIG_SCSI_MULTI_LUN=y
++CONFIG_SCSI_CONSTANTS=y
++CONFIG_SCSI_LOGGING=y
++
++#
++# SCSI Transport Attributes
++#
++CONFIG_SCSI_SPI_ATTRS=y
++# CONFIG_SCSI_FC_ATTRS is not set
++# CONFIG_SCSI_ISCSI_ATTRS is not set
++CONFIG_SCSI_SAS_ATTRS=y
++
++#
++# SCSI low-level drivers
++#
++# CONFIG_ISCSI_TCP is not set
++# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
++# CONFIG_SCSI_3W_9XXX is not set
++# CONFIG_SCSI_ACARD is not set
++# CONFIG_SCSI_AACRAID is not set
++# CONFIG_SCSI_AIC7XXX is not set
++# CONFIG_SCSI_AIC7XXX_OLD is not set
++# CONFIG_SCSI_AIC79XX is not set
++# CONFIG_MEGARAID_NEWGEN is not set
++# CONFIG_MEGARAID_LEGACY is not set
++# CONFIG_MEGARAID_SAS is not set
++# CONFIG_SCSI_SATA is not set
++# CONFIG_SCSI_HPTIOP is not set
++# CONFIG_SCSI_DMX3191D is not set
++# CONFIG_SCSI_FUTURE_DOMAIN is not set
++# CONFIG_SCSI_IPS is not set
++# CONFIG_SCSI_INITIO is not set
++# CONFIG_SCSI_INIA100 is not set
++CONFIG_SCSI_SYM53C8XX_2=y
++CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
++CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
++CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
++CONFIG_SCSI_SYM53C8XX_MMIO=y
++# CONFIG_SCSI_IPR is not set
++CONFIG_SCSI_QLOGIC_1280=y
++# CONFIG_SCSI_QLA_FC is not set
++# CONFIG_SCSI_LPFC is not set
++# CONFIG_SCSI_DC395x is not set
++# CONFIG_SCSI_DC390T is not set
++# CONFIG_SCSI_DEBUG is not set
++
++#
++# Multi-device support (RAID and LVM)
++#
++# CONFIG_MD is not set
++
++#
++# Fusion MPT device support
++#
++CONFIG_FUSION=y
++CONFIG_FUSION_SPI=y
++# CONFIG_FUSION_FC is not set
++CONFIG_FUSION_SAS=y
++CONFIG_FUSION_MAX_SGE=128
++# CONFIG_FUSION_CTL is not set
++
++#
++# IEEE 1394 (FireWire) support
++#
++# CONFIG_IEEE1394 is not set
++
++#
++# I2O device support
++#
++# CONFIG_I2O is not set
++
++#
++# Network device support
++#
++CONFIG_NETDEVICES=y
++CONFIG_DUMMY=y
++# CONFIG_BONDING is not set
++# CONFIG_EQUALIZER is not set
++# CONFIG_TUN is not set
++
++#
++# ARCnet devices
++#
++# CONFIG_ARCNET is not set
++
++#
++# PHY device support
++#
++# CONFIG_PHYLIB is not set
++
++#
++# Ethernet (10 or 100Mbit)
++#
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=y
++# CONFIG_HAPPYMEAL is not set
++# CONFIG_SUNGEM is not set
++# CONFIG_CASSINI is not set
++# CONFIG_NET_VENDOR_3COM is not set
++
++#
++# Tulip family network device support
++#
++CONFIG_NET_TULIP=y
++# CONFIG_DE2104X is not set
++CONFIG_TULIP=y
++CONFIG_TULIP_MWI=y
++CONFIG_TULIP_MMIO=y
++CONFIG_TULIP_NAPI=y
++CONFIG_TULIP_NAPI_HW_MITIGATION=y
++# CONFIG_DE4X5 is not set
++# CONFIG_WINBOND_840 is not set
++# CONFIG_DM9102 is not set
++# CONFIG_ULI526X is not set
++# CONFIG_HP100 is not set
++CONFIG_NET_PCI=y
++# CONFIG_PCNET32 is not set
++# CONFIG_AMD8111_ETH is not set
++# CONFIG_ADAPTEC_STARFIRE is not set
++# CONFIG_B44 is not set
++# CONFIG_FORCEDETH is not set
++# CONFIG_DGRS is not set
++# CONFIG_EEPRO100 is not set
++CONFIG_E100=y
++# CONFIG_FEALNX is not set
++# CONFIG_NATSEMI is not set
++# CONFIG_NE2K_PCI is not set
++# CONFIG_8139CP is not set
++# CONFIG_8139TOO is not set
++# CONFIG_SIS900 is not set
++# CONFIG_EPIC100 is not set
++# CONFIG_SUNDANCE is not set
++# CONFIG_VIA_RHINE is not set
++
++#
++# Ethernet (1000 Mbit)
++#
++# CONFIG_ACENIC is not set
++# CONFIG_DL2K is not set
++CONFIG_E1000=y
++# CONFIG_E1000_NAPI is not set
++# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
++# CONFIG_NS83820 is not set
++# CONFIG_HAMACHI is not set
++# CONFIG_YELLOWFIN is not set
++# CONFIG_R8169 is not set
++# CONFIG_SIS190 is not set
++# CONFIG_SKGE is not set
++# CONFIG_SKY2 is not set
++# CONFIG_SK98LIN is not set
++# CONFIG_VIA_VELOCITY is not set
++CONFIG_TIGON3=y
++# CONFIG_BNX2 is not set
++
++#
++# Ethernet (10000 Mbit)
++#
++# CONFIG_CHELSIO_T1 is not set
++# CONFIG_IXGB is not set
++# CONFIG_S2IO is not set
++# CONFIG_MYRI10GE is not set
++
++#
++# Token Ring devices
++#
++# CONFIG_TR is not set
++
++#
++# Wireless LAN (non-hamradio)
++#
++# CONFIG_NET_RADIO is not set
++
++#
++# Wan interfaces
++#
++# CONFIG_WAN is not set
++# CONFIG_FDDI is not set
++# CONFIG_HIPPI is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++# CONFIG_NET_FC is not set
++# CONFIG_SHAPER is not set
++# CONFIG_NETCONSOLE is not set
++# CONFIG_NETPOLL is not set
++# CONFIG_NET_POLL_CONTROLLER is not set
++
++#
++# ISDN subsystem
++#
++# CONFIG_ISDN is not set
++
++#
++# Telephony Support
++#
++# CONFIG_PHONE is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++
++#
++# Userland interfaces
++#
++CONFIG_INPUT_MOUSEDEV=y
++CONFIG_INPUT_MOUSEDEV_PSAUX=y
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++CONFIG_INPUT_JOYDEV=y
++# CONFIG_INPUT_TSDEV is not set
++CONFIG_INPUT_EVDEV=y
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++# CONFIG_INPUT_KEYBOARD is not set
++# CONFIG_INPUT_MOUSE is not set
++# CONFIG_INPUT_JOYSTICK is not set
++# CONFIG_INPUT_TOUCHSCREEN is not set
++# CONFIG_INPUT_MISC is not set
++
++#
++# Hardware I/O ports
++#
++CONFIG_SERIO=y
++# CONFIG_SERIO_I8042 is not set
++# CONFIG_SERIO_SERPORT is not set
++# CONFIG_SERIO_PCIPS2 is not set
++# CONFIG_SERIO_RAW is not set
++# CONFIG_GAMEPORT is not set
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++CONFIG_SERIAL_8250=y
++CONFIG_SERIAL_8250_CONSOLE=y
++CONFIG_SERIAL_8250_PCI=y
++CONFIG_SERIAL_8250_NR_UARTS=8
++CONFIG_SERIAL_8250_RUNTIME_UARTS=4
++CONFIG_SERIAL_8250_EXTENDED=y
++CONFIG_SERIAL_8250_SHARE_IRQ=y
++# CONFIG_SERIAL_8250_DETECT_IRQ is not set
++# CONFIG_SERIAL_8250_RSA is not set
++
++#
++# Non-8250 serial port support
++#
++CONFIG_SERIAL_CORE=y
++CONFIG_SERIAL_CORE_CONSOLE=y
++# CONFIG_SERIAL_JSM is not set
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=256
++
++#
++# IPMI
++#
++# CONFIG_IPMI_HANDLER is not set
++
++#
++# Watchdog Cards
++#
++# CONFIG_WATCHDOG is not set
++# CONFIG_HW_RANDOM is not set
++CONFIG_EFI_RTC=y
++# CONFIG_DTLK is not set
++# CONFIG_R3964 is not set
++# CONFIG_APPLICOM is not set
++
++#
++# Ftape, the floppy tape device driver
++#
++CONFIG_AGP=y
++# CONFIG_AGP_SIS is not set
++# CONFIG_AGP_VIA is not set
++CONFIG_DRM=y
++# CONFIG_DRM_TDFX is not set
++# CONFIG_DRM_R128 is not set
++CONFIG_DRM_RADEON=y
++# CONFIG_DRM_MGA is not set
++# CONFIG_DRM_SIS is not set
++# CONFIG_DRM_VIA is not set
++# CONFIG_DRM_SAVAGE is not set
++# CONFIG_RAW_DRIVER is not set
++# CONFIG_HPET is not set
++# CONFIG_HANGCHECK_TIMER is not set
++
++#
++# TPM devices
++#
++# CONFIG_TCG_TPM is not set
++# CONFIG_TELCLOCK is not set
++
++#
++# I2C support
++#
++CONFIG_I2C=y
++CONFIG_I2C_CHARDEV=y
++
++#
++# I2C Algorithms
++#
++CONFIG_I2C_ALGOBIT=y
++CONFIG_I2C_ALGOPCF=y
++# CONFIG_I2C_ALGOPCA is not set
++
++#
++# I2C Hardware Bus support
++#
++# CONFIG_I2C_ALI1535 is not set
++# CONFIG_I2C_ALI1563 is not set
++# CONFIG_I2C_ALI15X3 is not set
++# CONFIG_I2C_AMD756 is not set
++# CONFIG_I2C_AMD8111 is not set
++# CONFIG_I2C_I801 is not set
++# CONFIG_I2C_I810 is not set
++# CONFIG_I2C_PIIX4 is not set
++# CONFIG_I2C_NFORCE2 is not set
++# CONFIG_I2C_OCORES is not set
++# CONFIG_I2C_PARPORT_LIGHT is not set
++# CONFIG_I2C_PROSAVAGE is not set
++# CONFIG_I2C_SAVAGE4 is not set
++# CONFIG_I2C_SIS5595 is not set
++# CONFIG_I2C_SIS630 is not set
++# CONFIG_I2C_SIS96X is not set
++# CONFIG_I2C_STUB is not set
++# CONFIG_I2C_VIA is not set
++# CONFIG_I2C_VIAPRO is not set
++# CONFIG_I2C_VOODOO3 is not set
++# CONFIG_I2C_PCA_ISA is not set
++
++#
++# Miscellaneous I2C Chip support
++#
++# CONFIG_SENSORS_DS1337 is not set
++# CONFIG_SENSORS_DS1374 is not set
++# CONFIG_SENSORS_EEPROM is not set
++# CONFIG_SENSORS_PCF8574 is not set
++# CONFIG_SENSORS_PCA9539 is not set
++# CONFIG_SENSORS_PCF8591 is not set
++# CONFIG_SENSORS_MAX6875 is not set
++# CONFIG_I2C_DEBUG_CORE is not set
++# CONFIG_I2C_DEBUG_ALGO is not set
++# CONFIG_I2C_DEBUG_BUS is not set
++# CONFIG_I2C_DEBUG_CHIP is not set
++
++#
++# SPI support
++#
++# CONFIG_SPI is not set
++# CONFIG_SPI_MASTER is not set
++
++#
++# Dallas's 1-wire bus
++#
++
++#
++# Hardware Monitoring support
++#
++CONFIG_HWMON=y
++# CONFIG_HWMON_VID is not set
++# CONFIG_SENSORS_ABITUGURU is not set
++# CONFIG_SENSORS_ADM1021 is not set
++# CONFIG_SENSORS_ADM1025 is not set
++# CONFIG_SENSORS_ADM1026 is not set
++# CONFIG_SENSORS_ADM1031 is not set
++# CONFIG_SENSORS_ADM9240 is not set
++# CONFIG_SENSORS_ASB100 is not set
++# CONFIG_SENSORS_ATXP1 is not set
++# CONFIG_SENSORS_DS1621 is not set
++# CONFIG_SENSORS_F71805F is not set
++# CONFIG_SENSORS_FSCHER is not set
++# CONFIG_SENSORS_FSCPOS is not set
++# CONFIG_SENSORS_GL518SM is not set
++# CONFIG_SENSORS_GL520SM is not set
++# CONFIG_SENSORS_IT87 is not set
++# CONFIG_SENSORS_LM63 is not set
++# CONFIG_SENSORS_LM75 is not set
++# CONFIG_SENSORS_LM77 is not set
++# CONFIG_SENSORS_LM78 is not set
++# CONFIG_SENSORS_LM80 is not set
++# CONFIG_SENSORS_LM83 is not set
++# CONFIG_SENSORS_LM85 is not set
++# CONFIG_SENSORS_LM87 is not set
++# CONFIG_SENSORS_LM90 is not set
++# CONFIG_SENSORS_LM92 is not set
++# CONFIG_SENSORS_MAX1619 is not set
++# CONFIG_SENSORS_PC87360 is not set
++# CONFIG_SENSORS_SIS5595 is not set
++# CONFIG_SENSORS_SMSC47M1 is not set
++# CONFIG_SENSORS_SMSC47M192 is not set
++# CONFIG_SENSORS_SMSC47B397 is not set
++# CONFIG_SENSORS_VIA686A is not set
++# CONFIG_SENSORS_VT8231 is not set
++# CONFIG_SENSORS_W83781D is not set
++# CONFIG_SENSORS_W83791D is not set
++# CONFIG_SENSORS_W83792D is not set
++# CONFIG_SENSORS_W83L785TS is not set
++# CONFIG_SENSORS_W83627HF is not set
++# CONFIG_SENSORS_W83627EHF is not set
++# CONFIG_HWMON_DEBUG_CHIP is not set
++
++#
++# Misc devices
++#
++
++#
++# Multimedia devices
++#
++CONFIG_VIDEO_DEV=y
++CONFIG_VIDEO_V4L1=y
++CONFIG_VIDEO_V4L1_COMPAT=y
++CONFIG_VIDEO_V4L2=y
++
++#
++# Video Capture Adapters
++#
++
++#
++# Video Capture Adapters
++#
++# CONFIG_VIDEO_ADV_DEBUG is not set
++# CONFIG_VIDEO_VIVI is not set
++# CONFIG_VIDEO_BT848 is not set
++# CONFIG_VIDEO_CPIA is not set
++# CONFIG_VIDEO_CPIA2 is not set
++# CONFIG_VIDEO_SAA5246A is not set
++# CONFIG_VIDEO_SAA5249 is not set
++# CONFIG_TUNER_3036 is not set
++# CONFIG_VIDEO_STRADIS is not set
++# CONFIG_VIDEO_ZORAN is not set
++# CONFIG_VIDEO_SAA7134 is not set
++# CONFIG_VIDEO_MXB is not set
++# CONFIG_VIDEO_DPC is not set
++# CONFIG_VIDEO_HEXIUM_ORION is not set
++# CONFIG_VIDEO_HEXIUM_GEMINI is not set
++# CONFIG_VIDEO_CX88 is not set
++
++#
++# Encoders and Decoders
++#
++# CONFIG_VIDEO_MSP3400 is not set
++# CONFIG_VIDEO_CS53L32A is not set
++# CONFIG_VIDEO_TLV320AIC23B is not set
++# CONFIG_VIDEO_WM8775 is not set
++# CONFIG_VIDEO_WM8739 is not set
++# CONFIG_VIDEO_CX2341X is not set
++# CONFIG_VIDEO_CX25840 is not set
++# CONFIG_VIDEO_SAA711X is not set
++# CONFIG_VIDEO_SAA7127 is not set
++# CONFIG_VIDEO_UPD64031A is not set
++# CONFIG_VIDEO_UPD64083 is not set
++
++#
++# V4L USB devices
++#
++# CONFIG_VIDEO_PVRUSB2 is not set
++# CONFIG_VIDEO_EM28XX is not set
++# CONFIG_USB_VICAM is not set
++# CONFIG_USB_IBMCAM is not set
++# CONFIG_USB_KONICAWC is not set
++# CONFIG_USB_QUICKCAM_MESSENGER is not set
++# CONFIG_USB_ET61X251 is not set
++# CONFIG_VIDEO_OVCAMCHIP is not set
++# CONFIG_USB_W9968CF is not set
++# CONFIG_USB_OV511 is not set
++# CONFIG_USB_SE401 is not set
++# CONFIG_USB_SN9C102 is not set
++# CONFIG_USB_STV680 is not set
++# CONFIG_USB_ZC0301 is not set
++# CONFIG_USB_PWC is not set
++
++#
++# Radio Adapters
++#
++# CONFIG_RADIO_GEMTEK_PCI is not set
++# CONFIG_RADIO_MAXIRADIO is not set
++# CONFIG_RADIO_MAESTRO is not set
++# CONFIG_USB_DSBR is not set
++
++#
++# Digital Video Broadcasting Devices
++#
++# CONFIG_DVB is not set
++# CONFIG_USB_DABUSB is not set
++
++#
++# Graphics support
++#
++CONFIG_FIRMWARE_EDID=y
++CONFIG_FB=y
++CONFIG_FB_CFB_FILLRECT=y
++CONFIG_FB_CFB_COPYAREA=y
++CONFIG_FB_CFB_IMAGEBLIT=y
++# CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
++CONFIG_FB_MODE_HELPERS=y
++# CONFIG_FB_TILEBLITTING is not set
++# CONFIG_FB_CIRRUS is not set
++# CONFIG_FB_PM2 is not set
++# CONFIG_FB_CYBER2000 is not set
++# CONFIG_FB_ASILIANT is not set
++# CONFIG_FB_IMSTT is not set
++# CONFIG_FB_S1D13XXX is not set
++# CONFIG_FB_NVIDIA is not set
++# CONFIG_FB_RIVA is not set
++# CONFIG_FB_MATROX is not set
++# CONFIG_FB_RADEON is not set
++# CONFIG_FB_ATY128 is not set
++# CONFIG_FB_ATY is not set
++# CONFIG_FB_SAVAGE is not set
++# CONFIG_FB_SIS is not set
++# CONFIG_FB_NEOMAGIC is not set
++# CONFIG_FB_KYRO is not set
++# CONFIG_FB_3DFX is not set
++# CONFIG_FB_VOODOO1 is not set
++# CONFIG_FB_TRIDENT is not set
++# CONFIG_FB_VIRTUAL is not set
++
++#
++# Console display driver support
++#
++CONFIG_VGA_CONSOLE=y
++# CONFIG_VGACON_SOFT_SCROLLBACK is not set
++CONFIG_DUMMY_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE=y
++# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
++# CONFIG_FONTS is not set
++CONFIG_FONT_8x8=y
++CONFIG_FONT_8x16=y
++
++#
++# Logo configuration
++#
++CONFIG_LOGO=y
++# CONFIG_LOGO_LINUX_MONO is not set
++# CONFIG_LOGO_LINUX_VGA16 is not set
++CONFIG_LOGO_LINUX_CLUT224=y
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Sound
++#
++CONFIG_SOUND=y
++
++#
++# Advanced Linux Sound Architecture
++#
++CONFIG_SND=y
++CONFIG_SND_TIMER=y
++CONFIG_SND_PCM=y
++CONFIG_SND_HWDEP=y
++CONFIG_SND_RAWMIDI=y
++CONFIG_SND_SEQUENCER=y
++# CONFIG_SND_SEQ_DUMMY is not set
++CONFIG_SND_OSSEMUL=y
++CONFIG_SND_MIXER_OSS=y
++CONFIG_SND_PCM_OSS=y
++CONFIG_SND_PCM_OSS_PLUGINS=y
++CONFIG_SND_SEQUENCER_OSS=y
++# CONFIG_SND_DYNAMIC_MINORS is not set
++CONFIG_SND_SUPPORT_OLD_API=y
++CONFIG_SND_VERBOSE_PROCFS=y
++# CONFIG_SND_VERBOSE_PRINTK is not set
++# CONFIG_SND_DEBUG is not set
++
++#
++# Generic devices
++#
++CONFIG_SND_MPU401_UART=y
++CONFIG_SND_OPL3_LIB=y
++CONFIG_SND_AC97_CODEC=y
++CONFIG_SND_AC97_BUS=y
++# CONFIG_SND_DUMMY is not set
++# CONFIG_SND_VIRMIDI is not set
++# CONFIG_SND_MTPAV is not set
++# CONFIG_SND_SERIAL_U16550 is not set
++# CONFIG_SND_MPU401 is not set
++
++#
++# PCI devices
++#
++# CONFIG_SND_AD1889 is not set
++# CONFIG_SND_ALS300 is not set
++# CONFIG_SND_ALI5451 is not set
++# CONFIG_SND_ATIIXP is not set
++# CONFIG_SND_ATIIXP_MODEM is not set
++# CONFIG_SND_AU8810 is not set
++# CONFIG_SND_AU8820 is not set
++# CONFIG_SND_AU8830 is not set
++# CONFIG_SND_AZT3328 is not set
++# CONFIG_SND_BT87X is not set
++# CONFIG_SND_CA0106 is not set
++# CONFIG_SND_CMIPCI is not set
++# CONFIG_SND_CS4281 is not set
++# CONFIG_SND_CS46XX is not set
++# CONFIG_SND_EMU10K1 is not set
++# CONFIG_SND_EMU10K1X is not set
++# CONFIG_SND_ENS1370 is not set
++# CONFIG_SND_ENS1371 is not set
++# CONFIG_SND_ES1938 is not set
++# CONFIG_SND_ES1968 is not set
++CONFIG_SND_FM801=y
++# CONFIG_SND_FM801_TEA575X_BOOL is not set
++# CONFIG_SND_HDA_INTEL is not set
++# CONFIG_SND_HDSP is not set
++# CONFIG_SND_HDSPM is not set
++# CONFIG_SND_ICE1712 is not set
++# CONFIG_SND_ICE1724 is not set
++# CONFIG_SND_INTEL8X0 is not set
++# CONFIG_SND_INTEL8X0M is not set
++# CONFIG_SND_KORG1212 is not set
++# CONFIG_SND_MAESTRO3 is not set
++# CONFIG_SND_MIXART is not set
++# CONFIG_SND_NM256 is not set
++# CONFIG_SND_PCXHR is not set
++# CONFIG_SND_RME32 is not set
++# CONFIG_SND_RME96 is not set
++# CONFIG_SND_RME9652 is not set
++# CONFIG_SND_SONICVIBES is not set
++# CONFIG_SND_TRIDENT is not set
++# CONFIG_SND_VIA82XX is not set
++# CONFIG_SND_VIA82XX_MODEM is not set
++# CONFIG_SND_VX222 is not set
++# CONFIG_SND_YMFPCI is not set
++
++#
++# USB devices
++#
++# CONFIG_SND_USB_AUDIO is not set
++
++#
++# Open Sound System
++#
++# CONFIG_SOUND_PRIME is not set
++
++#
++# USB support
++#
++CONFIG_USB_ARCH_HAS_HCD=y
++CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
++CONFIG_USB=y
++# CONFIG_USB_DEBUG is not set
++
++#
++# Miscellaneous USB options
++#
++# CONFIG_USB_DEVICEFS is not set
++CONFIG_USB_BANDWIDTH=y
++# CONFIG_USB_DYNAMIC_MINORS is not set
++# CONFIG_USB_SUSPEND is not set
++# CONFIG_USB_OTG is not set
++
++#
++# USB Host Controller Drivers
++#
++CONFIG_USB_EHCI_HCD=y
++# CONFIG_USB_EHCI_SPLIT_ISO is not set
++# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
++# CONFIG_USB_EHCI_TT_NEWSCHED is not set
++# CONFIG_USB_ISP116X_HCD is not set
++CONFIG_USB_OHCI_HCD=y
++# CONFIG_USB_OHCI_BIG_ENDIAN is not set
++CONFIG_USB_OHCI_LITTLE_ENDIAN=y
++CONFIG_USB_UHCI_HCD=y
++# CONFIG_USB_SL811_HCD is not set
++
++#
++# USB Device Class drivers
++#
++# CONFIG_USB_ACM is not set
++# CONFIG_USB_PRINTER is not set
++
++#
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
++#
++
++#
++# may also be needed; see USB_STORAGE Help for more information
++#
++CONFIG_USB_STORAGE=y
++# CONFIG_USB_STORAGE_DEBUG is not set
++# CONFIG_USB_STORAGE_DATAFAB is not set
++# CONFIG_USB_STORAGE_FREECOM is not set
++# CONFIG_USB_STORAGE_DPCM is not set
++# CONFIG_USB_STORAGE_USBAT is not set
++# CONFIG_USB_STORAGE_SDDR09 is not set
++# CONFIG_USB_STORAGE_SDDR55 is not set
++# CONFIG_USB_STORAGE_JUMPSHOT is not set
++# CONFIG_USB_STORAGE_ALAUDA is not set
++# CONFIG_USB_LIBUSUAL is not set
++
++#
++# USB Input Devices
++#
++CONFIG_USB_HID=y
++CONFIG_USB_HIDINPUT=y
++# CONFIG_USB_HIDINPUT_POWERBOOK is not set
++# CONFIG_HID_FF is not set
++CONFIG_USB_HIDDEV=y
++# CONFIG_USB_AIPTEK is not set
++# CONFIG_USB_WACOM is not set
++# CONFIG_USB_ACECAD is not set
++# CONFIG_USB_KBTAB is not set
++# CONFIG_USB_POWERMATE is not set
++# CONFIG_USB_TOUCHSCREEN is not set
++# CONFIG_USB_YEALINK is not set
++# CONFIG_USB_XPAD is not set
++# CONFIG_USB_ATI_REMOTE is not set
++# CONFIG_USB_ATI_REMOTE2 is not set
++# CONFIG_USB_KEYSPAN_REMOTE is not set
++# CONFIG_USB_APPLETOUCH is not set
++
++#
++# USB Imaging devices
++#
++# CONFIG_USB_MDC800 is not set
++# CONFIG_USB_MICROTEK is not set
++
++#
++# USB Network Adapters
++#
++# CONFIG_USB_CATC is not set
++# CONFIG_USB_KAWETH is not set
++# CONFIG_USB_PEGASUS is not set
++# CONFIG_USB_RTL8150 is not set
++# CONFIG_USB_USBNET is not set
++CONFIG_USB_MON=y
++
++#
++# USB port drivers
++#
++
++#
++# USB Serial Converter support
++#
++# CONFIG_USB_SERIAL is not set
++
++#
++# USB Miscellaneous drivers
++#
++# CONFIG_USB_EMI62 is not set
++# CONFIG_USB_EMI26 is not set
++# CONFIG_USB_AUERSWALD is not set
++# CONFIG_USB_RIO500 is not set
++# CONFIG_USB_LEGOTOWER is not set
++# CONFIG_USB_LCD is not set
++# CONFIG_USB_LED is not set
++# CONFIG_USB_CYPRESS_CY7C63 is not set
++# CONFIG_USB_CYTHERM is not set
++# CONFIG_USB_PHIDGETKIT is not set
++# CONFIG_USB_PHIDGETSERVO is not set
++# CONFIG_USB_IDMOUSE is not set
++# CONFIG_USB_APPLEDISPLAY is not set
++# CONFIG_USB_SISUSBVGA is not set
++# CONFIG_USB_LD is not set
++
++#
++# USB DSL modem support
++#
++
++#
++# USB Gadget Support
++#
++# CONFIG_USB_GADGET is not set
++
++#
++# MMC/SD Card support
++#
++# CONFIG_MMC is not set
++
++#
++# LED devices
++#
++# CONFIG_NEW_LEDS is not set
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++
++#
++# InfiniBand support
++#
++# CONFIG_INFINIBAND is not set
++
++#
++# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
++#
++
++#
++# Real Time Clock
++#
++# CONFIG_RTC_CLASS is not set
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
++#
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++CONFIG_EXT2_FS_XATTR=y
++# CONFIG_EXT2_FS_POSIX_ACL is not set
++# CONFIG_EXT2_FS_SECURITY is not set
++# CONFIG_EXT2_FS_XIP is not set
++CONFIG_EXT3_FS=y
++CONFIG_EXT3_FS_XATTR=y
++# CONFIG_EXT3_FS_POSIX_ACL is not set
++# CONFIG_EXT3_FS_SECURITY is not set
++CONFIG_JBD=y
++# CONFIG_JBD_DEBUG is not set
++CONFIG_FS_MBCACHE=y
++# CONFIG_REISERFS_FS is not set
++# CONFIG_JFS_FS is not set
++# CONFIG_FS_POSIX_ACL is not set
++# CONFIG_XFS_FS is not set
++# CONFIG_OCFS2_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_ROMFS_FS is not set
++CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
++# CONFIG_QUOTA is not set
++CONFIG_DNOTIFY=y
++CONFIG_AUTOFS_FS=y
++# CONFIG_AUTOFS4_FS is not set
++# CONFIG_FUSE_FS is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=y
++CONFIG_JOLIET=y
++# CONFIG_ZISOFS is not set
++CONFIG_UDF_FS=y
++CONFIG_UDF_NLS=y
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=y
++CONFIG_MSDOS_FS=y
++CONFIG_VFAT_FS=y
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_KCORE=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_RAMFS=y
++# CONFIG_CONFIGFS_FS is not set
++
++#
++# Miscellaneous filesystems
++#
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++# CONFIG_CRAMFS is not set
++# CONFIG_VXFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++
++#
++# Network File Systems
++#
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3=y
++# CONFIG_NFS_V3_ACL is not set
++CONFIG_NFS_V4=y
++# CONFIG_NFS_DIRECTIO is not set
++CONFIG_NFSD=y
++CONFIG_NFSD_V3=y
++# CONFIG_NFSD_V3_ACL is not set
++# CONFIG_NFSD_V4 is not set
++# CONFIG_NFSD_TCP is not set
++CONFIG_ROOT_NFS=y
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_EXPORTFS=y
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++CONFIG_SUNRPC_GSS=y
++CONFIG_RPCSEC_GSS_KRB5=y
++# CONFIG_RPCSEC_GSS_SPKM3 is not set
++# CONFIG_SMB_FS is not set
++# CONFIG_CIFS is not set
++# CONFIG_NCP_FS is not set
++# CONFIG_CODA_FS is not set
++# CONFIG_AFS_FS is not set
++# CONFIG_9P_FS is not set
++
++#
++# Partition Types
++#
++CONFIG_PARTITION_ADVANCED=y
++# CONFIG_ACORN_PARTITION is not set
++# CONFIG_OSF_PARTITION is not set
++# CONFIG_AMIGA_PARTITION is not set
++# CONFIG_ATARI_PARTITION is not set
++# CONFIG_MAC_PARTITION is not set
++CONFIG_MSDOS_PARTITION=y
++# CONFIG_BSD_DISKLABEL is not set
++# CONFIG_MINIX_SUBPARTITION is not set
++# CONFIG_SOLARIS_X86_PARTITION is not set
++# CONFIG_UNIXWARE_DISKLABEL is not set
++# CONFIG_LDM_PARTITION is not set
++# CONFIG_SGI_PARTITION is not set
++# CONFIG_ULTRIX_PARTITION is not set
++# CONFIG_SUN_PARTITION is not set
++# CONFIG_KARMA_PARTITION is not set
++CONFIG_EFI_PARTITION=y
++
++#
++# Native Language Support
++#
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="iso8859-1"
++CONFIG_NLS_CODEPAGE_437=y
++CONFIG_NLS_CODEPAGE_737=y
++CONFIG_NLS_CODEPAGE_775=y
++CONFIG_NLS_CODEPAGE_850=y
++CONFIG_NLS_CODEPAGE_852=y
++CONFIG_NLS_CODEPAGE_855=y
++CONFIG_NLS_CODEPAGE_857=y
++CONFIG_NLS_CODEPAGE_860=y
++CONFIG_NLS_CODEPAGE_861=y
++CONFIG_NLS_CODEPAGE_862=y
++CONFIG_NLS_CODEPAGE_863=y
++CONFIG_NLS_CODEPAGE_864=y
++CONFIG_NLS_CODEPAGE_865=y
++CONFIG_NLS_CODEPAGE_866=y
++CONFIG_NLS_CODEPAGE_869=y
++CONFIG_NLS_CODEPAGE_936=y
++CONFIG_NLS_CODEPAGE_950=y
++CONFIG_NLS_CODEPAGE_932=y
++CONFIG_NLS_CODEPAGE_949=y
++CONFIG_NLS_CODEPAGE_874=y
++CONFIG_NLS_ISO8859_8=y
++# CONFIG_NLS_CODEPAGE_1250 is not set
++CONFIG_NLS_CODEPAGE_1251=y
++# CONFIG_NLS_ASCII is not set
++CONFIG_NLS_ISO8859_1=y
++CONFIG_NLS_ISO8859_2=y
++CONFIG_NLS_ISO8859_3=y
++CONFIG_NLS_ISO8859_4=y
++CONFIG_NLS_ISO8859_5=y
++CONFIG_NLS_ISO8859_6=y
++CONFIG_NLS_ISO8859_7=y
++CONFIG_NLS_ISO8859_9=y
++CONFIG_NLS_ISO8859_13=y
++CONFIG_NLS_ISO8859_14=y
++CONFIG_NLS_ISO8859_15=y
++CONFIG_NLS_KOI8_R=y
++CONFIG_NLS_KOI8_U=y
++CONFIG_NLS_UTF8=y
++
++#
++# Library routines
++#
++# CONFIG_CRC_CCITT is not set
++# CONFIG_CRC16 is not set
++CONFIG_CRC32=y
++# CONFIG_LIBCRC32C is not set
++CONFIG_PLIST=y
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_GENERIC_PENDING_IRQ=y
++CONFIG_IRQ_PER_CPU=y
++
++#
++# Instrumentation Support
++#
++# CONFIG_PROFILING is not set
++# CONFIG_KPROBES is not set
++
++#
++# Kernel hacking
++#
++# CONFIG_PRINTK_TIME is not set
++CONFIG_MAGIC_SYSRQ=y
++CONFIG_UNUSED_SYMBOLS=y
++CONFIG_DEBUG_KERNEL=y
++CONFIG_LOG_BUF_SHIFT=17
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_SCHEDSTATS is not set
++# CONFIG_DEBUG_SLAB is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++CONFIG_DEBUG_MUTEXES=y
++# CONFIG_DEBUG_RWSEMS is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++# CONFIG_DEBUG_INFO is not set
++# CONFIG_DEBUG_FS is not set
++# CONFIG_DEBUG_VM is not set
++CONFIG_FORCED_INLINING=y
++# CONFIG_RCU_TORTURE_TEST is not set
++CONFIG_IA64_GRANULE_16MB=y
++# CONFIG_IA64_GRANULE_64MB is not set
++CONFIG_IA64_PRINT_HAZARDS=y
++# CONFIG_DISABLE_VHPT is not set
++# CONFIG_IA64_DEBUG_CMPXCHG is not set
++# CONFIG_IA64_DEBUG_IRQ is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++
++#
++# Cryptographic options
++#
++CONFIG_CRYPTO=y
++# CONFIG_CRYPTO_HMAC is not set
++# CONFIG_CRYPTO_NULL is not set
++# CONFIG_CRYPTO_MD4 is not set
++CONFIG_CRYPTO_MD5=y
++# CONFIG_CRYPTO_SHA1 is not set
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_WP512 is not set
++# CONFIG_CRYPTO_TGR192 is not set
++CONFIG_CRYPTO_DES=y
++# CONFIG_CRYPTO_BLOWFISH is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++# CONFIG_CRYPTO_SERPENT is not set
++# CONFIG_CRYPTO_AES is not set
++# CONFIG_CRYPTO_CAST5 is not set
++# CONFIG_CRYPTO_CAST6 is not set
++# CONFIG_CRYPTO_TEA is not set
++# CONFIG_CRYPTO_ARC4 is not set
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_ANUBIS is not set
++# CONFIG_CRYPTO_DEFLATE is not set
++# CONFIG_CRYPTO_MICHAEL_MIC is not set
++# CONFIG_CRYPTO_CRC32C is not set
++# CONFIG_CRYPTO_TEST is not set
++
++#
++# Hardware crypto devices
++#
++# CONFIG_XEN_SMPBOOT is not set
++# CONFIG_XEN_DEVMEM is not set
++CONFIG_XEN_INTERFACE_VERSION=0x00030207
++
++#
++# XEN
++#
++# CONFIG_XEN_PRIVILEGED_GUEST is not set
++CONFIG_XEN_UNPRIVILEGED_GUEST=y
++CONFIG_XEN_PRIVCMD=y
++CONFIG_XEN_XENBUS_DEV=y
++# CONFIG_XEN_BACKEND is not set
++CONFIG_XEN_BLKDEV_FRONTEND=y
++CONFIG_XEN_NETDEV_FRONTEND=y
++# CONFIG_XEN_GRANT_DEV is not set
++CONFIG_XEN_FRAMEBUFFER=y
++CONFIG_XEN_KEYBOARD=y
++# CONFIG_XEN_SCRUB_PAGES is not set
++# CONFIG_XEN_DISABLE_SERIAL is not set
++CONFIG_XEN_SYSFS=y
++CONFIG_XEN_COMPAT_030002_AND_LATER=y
++# CONFIG_XEN_COMPAT_030004_AND_LATER is not set
++# CONFIG_XEN_COMPAT_030100_AND_LATER is not set
++# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
++CONFIG_XEN_COMPAT=0x030002
++CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
++CONFIG_NO_IDLE_HZ=y
++CONFIG_XEN_BALLOON=y
++CONFIG_XEN_XENCOMM=y
+diff -rpuN linux-2.6.18.8/buildconfigs/linux-defconfig_xenU_x86_32 linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xenU_x86_32
+--- linux-2.6.18.8/buildconfigs/linux-defconfig_xenU_x86_32 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xenU_x86_32 2008-02-15 16:21:56.000000000 -0800
+@@ -0,0 +1,950 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.18.8
++# Tue Oct 16 09:31:29 2007
++#
++CONFIG_X86_32=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_SEMAPHORE_SLEEPERS=y
++CONFIG_X86=y
++CONFIG_MMU=y
++CONFIG_GENERIC_ISA_DMA=y
++CONFIG_GENERIC_IOMAP=y
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_ARCH_MAY_HAVE_PC_FDC=y
++CONFIG_DMI=y
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# Code maturity level options
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION=""
++# CONFIG_LOCALVERSION_AUTO is not set
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++# CONFIG_POSIX_MQUEUE is not set
++# CONFIG_BSD_PROCESS_ACCT is not set
++# CONFIG_TASKSTATS is not set
++# CONFIG_AUDIT is not set
++# CONFIG_IKCONFIG is not set
++# CONFIG_CPUSETS is not set
++# CONFIG_RELAY is not set
++CONFIG_INITRAMFS_SOURCE=""
++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
++# CONFIG_EMBEDDED is not set
++CONFIG_UID16=y
++CONFIG_SYSCTL=y
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++# CONFIG_KALLSYMS_EXTRA_PASS is not set
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SHMEM=y
++CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_RT_MUTEXES=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++# CONFIG_SLOB is not set
++
++#
++# Loadable module support
++#
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++# CONFIG_MODULE_FORCE_UNLOAD is not set
++# CONFIG_MODVERSIONS is not set
++# CONFIG_MODULE_SRCVERSION_ALL is not set
++CONFIG_KMOD=y
++CONFIG_STOP_MACHINE=y
++
++#
++# Block layer
++#
++# CONFIG_LBD is not set
++# CONFIG_BLK_DEV_IO_TRACE is not set
++CONFIG_LSF=y
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++CONFIG_DEFAULT_AS=y
++# CONFIG_DEFAULT_DEADLINE is not set
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="anticipatory"
++
++#
++# Processor type and features
++#
++CONFIG_SMP=y
++# CONFIG_X86_PC is not set
++CONFIG_X86_XEN=y
++# CONFIG_X86_ELAN is not set
++# CONFIG_X86_VOYAGER is not set
++# CONFIG_X86_NUMAQ is not set
++# CONFIG_X86_SUMMIT is not set
++# CONFIG_X86_BIGSMP is not set
++# CONFIG_X86_VISWS is not set
++# CONFIG_X86_GENERICARCH is not set
++# CONFIG_X86_ES7000 is not set
++# CONFIG_M386 is not set
++# CONFIG_M486 is not set
++# CONFIG_M586 is not set
++# CONFIG_M586TSC is not set
++# CONFIG_M586MMX is not set
++CONFIG_M686=y
++# CONFIG_MPENTIUMII is not set
++# CONFIG_MPENTIUMIII is not set
++# CONFIG_MPENTIUMM is not set
++# CONFIG_MPENTIUM4 is not set
++# CONFIG_MK6 is not set
++# CONFIG_MK7 is not set
++# CONFIG_MK8 is not set
++# CONFIG_MCRUSOE is not set
++# CONFIG_MEFFICEON is not set
++# CONFIG_MWINCHIPC6 is not set
++# CONFIG_MWINCHIP2 is not set
++# CONFIG_MWINCHIP3D is not set
++# CONFIG_MGEODEGX1 is not set
++# CONFIG_MGEODE_LX is not set
++# CONFIG_MCYRIXIII is not set
++# CONFIG_MVIAC3_2 is not set
++# CONFIG_X86_GENERIC is not set
++CONFIG_X86_CMPXCHG=y
++CONFIG_X86_XADD=y
++CONFIG_X86_L1_CACHE_SHIFT=5
++CONFIG_RWSEM_XCHGADD_ALGORITHM=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_X86_PPRO_FENCE=y
++CONFIG_X86_WP_WORKS_OK=y
++CONFIG_X86_INVLPG=y
++CONFIG_X86_BSWAP=y
++CONFIG_X86_POPAD_OK=y
++CONFIG_X86_CMPXCHG64=y
++CONFIG_X86_GOOD_APIC=y
++CONFIG_X86_USE_PPRO_CHECKSUM=y
++CONFIG_NR_CPUS=8
++CONFIG_PREEMPT_NONE=y
++# CONFIG_PREEMPT_VOLUNTARY is not set
++# CONFIG_PREEMPT is not set
++CONFIG_PREEMPT_BKL=y
++CONFIG_VM86=y
++# CONFIG_TOSHIBA is not set
++# CONFIG_I8K is not set
++# CONFIG_X86_REBOOTFIXUPS is not set
++# CONFIG_X86_MSR is not set
++CONFIG_X86_CPUID=y
++CONFIG_SWIOTLB=y
++
++#
++# Firmware Drivers
++#
++# CONFIG_EDD is not set
++# CONFIG_DELL_RBU is not set
++# CONFIG_DCDBAS is not set
++# CONFIG_NOHIGHMEM is not set
++CONFIG_HIGHMEM4G=y
++# CONFIG_HIGHMEM64G is not set
++CONFIG_PAGE_OFFSET=0xC0000000
++CONFIG_HIGHMEM=y
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++# CONFIG_SPARSEMEM_STATIC is not set
++CONFIG_SPLIT_PTLOCK_CPUS=4
++CONFIG_RESOURCES_64BIT=y
++# CONFIG_HIGHPTE is not set
++# CONFIG_REGPARM is not set
++CONFIG_SECCOMP=y
++CONFIG_HZ_100=y
++# CONFIG_HZ_250 is not set
++# CONFIG_HZ_1000 is not set
++CONFIG_HZ=100
++# CONFIG_CRASH_DUMP is not set
++CONFIG_PHYSICAL_START=0x100000
++CONFIG_HOTPLUG_CPU=y
++CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
++
++#
++# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
++#
++# CONFIG_PCI is not set
++CONFIG_ISA_DMA_API=y
++# CONFIG_SCx200 is not set
++
++#
++# PCCARD (PCMCIA/CardBus) support
++#
++# CONFIG_PCCARD is not set
++
++#
++# PCI Hotplug Support
++#
++
++#
++# Executable file formats
++#
++CONFIG_BINFMT_ELF=y
++# CONFIG_BINFMT_AOUT is not set
++# CONFIG_BINFMT_MISC is not set
++
++#
++# Networking
++#
++CONFIG_NET=y
++
++#
++# Networking options
++#
++# CONFIG_NETDEBUG is not set
++CONFIG_PACKET=y
++# CONFIG_PACKET_MMAP is not set
++CONFIG_UNIX=y
++CONFIG_XFRM=y
++# CONFIG_XFRM_USER is not set
++# CONFIG_NET_KEY is not set
++CONFIG_INET=y
++# CONFIG_IP_MULTICAST is not set
++# CONFIG_IP_ADVANCED_ROUTER is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_PNP=y
++# CONFIG_IP_PNP_DHCP is not set
++# CONFIG_IP_PNP_BOOTP is not set
++# CONFIG_IP_PNP_RARP is not set
++# CONFIG_NET_IPIP is not set
++# CONFIG_NET_IPGRE is not set
++# CONFIG_ARPD is not set
++# CONFIG_SYN_COOKIES is not set
++# CONFIG_INET_AH is not set
++# CONFIG_INET_ESP is not set
++# CONFIG_INET_IPCOMP is not set
++# CONFIG_INET_XFRM_TUNNEL is not set
++# CONFIG_INET_TUNNEL is not set
++CONFIG_INET_XFRM_MODE_TRANSPORT=y
++CONFIG_INET_XFRM_MODE_TUNNEL=y
++# CONFIG_INET_DIAG is not set
++# CONFIG_TCP_CONG_ADVANCED is not set
++CONFIG_TCP_CONG_BIC=y
++# CONFIG_IPV6 is not set
++# CONFIG_INET6_XFRM_TUNNEL is not set
++# CONFIG_INET6_TUNNEL is not set
++# CONFIG_NETWORK_SECMARK is not set
++# CONFIG_NETFILTER is not set
++
++#
++# DCCP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_DCCP is not set
++
++#
++# SCTP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_SCTP is not set
++
++#
++# TIPC Configuration (EXPERIMENTAL)
++#
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++# CONFIG_BRIDGE is not set
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++
++#
++# QoS and/or fair queueing
++#
++# CONFIG_NET_SCHED is not set
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++# CONFIG_IEEE80211 is not set
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++# CONFIG_FW_LOADER is not set
++# CONFIG_DEBUG_DRIVER is not set
++CONFIG_SYS_HYPERVISOR=y
++
++#
++# Connector - unified userspace <-> kernelspace linker
++#
++# CONFIG_CONNECTOR is not set
++
++#
++# Memory Technology Devices (MTD)
++#
++# CONFIG_MTD is not set
++
++#
++# Parallel port support
++#
++# CONFIG_PARPORT is not set
++
++#
++# Plug and Play support
++#
++
++#
++# Block devices
++#
++# CONFIG_BLK_DEV_FD is not set
++# CONFIG_BLK_DEV_COW_COMMON is not set
++CONFIG_BLK_DEV_LOOP=m
++# CONFIG_BLK_DEV_CRYPTOLOOP is not set
++CONFIG_BLK_DEV_NBD=m
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=4096
++CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
++CONFIG_BLK_DEV_INITRD=y
++# CONFIG_CDROM_PKTCDVD is not set
++# CONFIG_ATA_OVER_ETH is not set
++
++#
++# ATA/ATAPI/MFM/RLL support
++#
++# CONFIG_IDE is not set
++
++#
++# SCSI device support
++#
++# CONFIG_RAID_ATTRS is not set
++CONFIG_SCSI=m
++CONFIG_SCSI_PROC_FS=y
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=m
++# CONFIG_CHR_DEV_ST is not set
++# CONFIG_CHR_DEV_OSST is not set
++# CONFIG_BLK_DEV_SR is not set
++# CONFIG_CHR_DEV_SG is not set
++# CONFIG_CHR_DEV_SCH is not set
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++# CONFIG_SCSI_MULTI_LUN is not set
++# CONFIG_SCSI_CONSTANTS is not set
++# CONFIG_SCSI_LOGGING is not set
++
++#
++# SCSI Transport Attributes
++#
++# CONFIG_SCSI_SPI_ATTRS is not set
++# CONFIG_SCSI_FC_ATTRS is not set
++# CONFIG_SCSI_ISCSI_ATTRS is not set
++# CONFIG_SCSI_SAS_ATTRS is not set
++
++#
++# SCSI low-level drivers
++#
++# CONFIG_ISCSI_TCP is not set
++# CONFIG_SCSI_SATA is not set
++# CONFIG_SCSI_DEBUG is not set
++
++#
++# Multi-device support (RAID and LVM)
++#
++# CONFIG_MD is not set
++
++#
++# Fusion MPT device support
++#
++# CONFIG_FUSION is not set
++
++#
++# IEEE 1394 (FireWire) support
++#
++
++#
++# I2O device support
++#
++
++#
++# Network device support
++#
++CONFIG_NETDEVICES=y
++# CONFIG_DUMMY is not set
++# CONFIG_BONDING is not set
++# CONFIG_EQUALIZER is not set
++# CONFIG_TUN is not set
++
++#
++# PHY device support
++#
++
++#
++# Ethernet (10 or 100Mbit)
++#
++# CONFIG_NET_ETHERNET is not set
++
++#
++# Ethernet (1000 Mbit)
++#
++
++#
++# Ethernet (10000 Mbit)
++#
++
++#
++# Token Ring devices
++#
++
++#
++# Wireless LAN (non-hamradio)
++#
++# CONFIG_NET_RADIO is not set
++
++#
++# Wan interfaces
++#
++# CONFIG_WAN is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++# CONFIG_SHAPER is not set
++# CONFIG_NETCONSOLE is not set
++# CONFIG_NETPOLL is not set
++# CONFIG_NET_POLL_CONTROLLER is not set
++
++#
++# ISDN subsystem
++#
++# CONFIG_ISDN is not set
++
++#
++# Telephony Support
++#
++# CONFIG_PHONE is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++
++#
++# Userland interfaces
++#
++CONFIG_INPUT_MOUSEDEV=y
++# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++# CONFIG_INPUT_JOYDEV is not set
++# CONFIG_INPUT_TSDEV is not set
++# CONFIG_INPUT_EVDEV is not set
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++CONFIG_INPUT_KEYBOARD=y
++# CONFIG_KEYBOARD_ATKBD is not set
++# CONFIG_KEYBOARD_SUNKBD is not set
++# CONFIG_KEYBOARD_LKKBD is not set
++# CONFIG_KEYBOARD_XTKBD is not set
++# CONFIG_KEYBOARD_NEWTON is not set
++# CONFIG_INPUT_MOUSE is not set
++# CONFIG_INPUT_JOYSTICK is not set
++# CONFIG_INPUT_TOUCHSCREEN is not set
++# CONFIG_INPUT_MISC is not set
++
++#
++# Hardware I/O ports
++#
++CONFIG_SERIO=y
++CONFIG_SERIO_I8042=y
++CONFIG_SERIO_SERPORT=y
++# CONFIG_SERIO_CT82C710 is not set
++# CONFIG_SERIO_RAW is not set
++# CONFIG_GAMEPORT is not set
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++
++#
++# Non-8250 serial port support
++#
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=256
++
++#
++# IPMI
++#
++# CONFIG_IPMI_HANDLER is not set
++
++#
++# Watchdog Cards
++#
++# CONFIG_WATCHDOG is not set
++CONFIG_HW_RANDOM=y
++CONFIG_HW_RANDOM_VIA=y
++# CONFIG_NVRAM is not set
++# CONFIG_RTC is not set
++# CONFIG_GEN_RTC is not set
++# CONFIG_DTLK is not set
++# CONFIG_R3964 is not set
++
++#
++# Ftape, the floppy tape device driver
++#
++# CONFIG_MWAVE is not set
++# CONFIG_PC8736x_GPIO is not set
++# CONFIG_NSC_GPIO is not set
++# CONFIG_CS5535_GPIO is not set
++# CONFIG_RAW_DRIVER is not set
++# CONFIG_HANGCHECK_TIMER is not set
++
++#
++# TPM devices
++#
++# CONFIG_TCG_TPM is not set
++# CONFIG_TELCLOCK is not set
++
++#
++# I2C support
++#
++# CONFIG_I2C is not set
++
++#
++# SPI support
++#
++# CONFIG_SPI is not set
++# CONFIG_SPI_MASTER is not set
++
++#
++# Dallas's 1-wire bus
++#
++
++#
++# Hardware Monitoring support
++#
++# CONFIG_HWMON is not set
++# CONFIG_HWMON_VID is not set
++
++#
++# Misc devices
++#
++
++#
++# Multimedia devices
++#
++# CONFIG_VIDEO_DEV is not set
++
++#
++# Digital Video Broadcasting Devices
++#
++# CONFIG_DVB is not set
++
++#
++# Graphics support
++#
++CONFIG_FIRMWARE_EDID=y
++# CONFIG_FB is not set
++
++#
++# Console display driver support
++#
++CONFIG_VGA_CONSOLE=y
++# CONFIG_VGACON_SOFT_SCROLLBACK is not set
++CONFIG_DUMMY_CONSOLE=y
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Sound
++#
++# CONFIG_SOUND is not set
++
++#
++# USB support
++#
++# CONFIG_USB_ARCH_HAS_HCD is not set
++# CONFIG_USB_ARCH_HAS_OHCI is not set
++# CONFIG_USB_ARCH_HAS_EHCI is not set
++
++#
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
++#
++
++#
++# USB Gadget Support
++#
++# CONFIG_USB_GADGET is not set
++
++#
++# MMC/SD Card support
++#
++# CONFIG_MMC is not set
++
++#
++# LED devices
++#
++# CONFIG_NEW_LEDS is not set
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++
++#
++# InfiniBand support
++#
++
++#
++# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
++#
++# CONFIG_EDAC is not set
++
++#
++# Real Time Clock
++#
++# CONFIG_RTC_CLASS is not set
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
++#
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++# CONFIG_EXT2_FS_XATTR is not set
++# CONFIG_EXT2_FS_XIP is not set
++CONFIG_EXT3_FS=y
++CONFIG_EXT3_FS_XATTR=y
++# CONFIG_EXT3_FS_POSIX_ACL is not set
++# CONFIG_EXT3_FS_SECURITY is not set
++CONFIG_JBD=y
++# CONFIG_JBD_DEBUG is not set
++CONFIG_FS_MBCACHE=y
++CONFIG_REISERFS_FS=y
++# CONFIG_REISERFS_CHECK is not set
++# CONFIG_REISERFS_PROC_INFO is not set
++# CONFIG_REISERFS_FS_XATTR is not set
++# CONFIG_JFS_FS is not set
++# CONFIG_FS_POSIX_ACL is not set
++# CONFIG_XFS_FS is not set
++# CONFIG_OCFS2_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_ROMFS_FS is not set
++CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
++# CONFIG_QUOTA is not set
++CONFIG_DNOTIFY=y
++CONFIG_AUTOFS_FS=y
++CONFIG_AUTOFS4_FS=y
++# CONFIG_FUSE_FS is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=y
++CONFIG_JOLIET=y
++CONFIG_ZISOFS=y
++CONFIG_ZISOFS_FS=y
++# CONFIG_UDF_FS is not set
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=m
++CONFIG_MSDOS_FS=m
++CONFIG_VFAT_FS=m
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_KCORE=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_RAMFS=y
++# CONFIG_CONFIGFS_FS is not set
++
++#
++# Miscellaneous filesystems
++#
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++CONFIG_CRAMFS=y
++# CONFIG_VXFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++
++#
++# Network File Systems
++#
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3=y
++# CONFIG_NFS_V3_ACL is not set
++# CONFIG_NFS_V4 is not set
++# CONFIG_NFS_DIRECTIO is not set
++# CONFIG_NFSD is not set
++CONFIG_ROOT_NFS=y
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++# CONFIG_RPCSEC_GSS_KRB5 is not set
++# CONFIG_RPCSEC_GSS_SPKM3 is not set
++# CONFIG_SMB_FS is not set
++# CONFIG_CIFS is not set
++# CONFIG_NCP_FS is not set
++# CONFIG_CODA_FS is not set
++# CONFIG_AFS_FS is not set
++# CONFIG_9P_FS is not set
++
++#
++# Partition Types
++#
++# CONFIG_PARTITION_ADVANCED is not set
++CONFIG_MSDOS_PARTITION=y
++
++#
++# Native Language Support
++#
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="iso8859-1"
++CONFIG_NLS_CODEPAGE_437=y
++# CONFIG_NLS_CODEPAGE_737 is not set
++# CONFIG_NLS_CODEPAGE_775 is not set
++# CONFIG_NLS_CODEPAGE_850 is not set
++# CONFIG_NLS_CODEPAGE_852 is not set
++# CONFIG_NLS_CODEPAGE_855 is not set
++# CONFIG_NLS_CODEPAGE_857 is not set
++# CONFIG_NLS_CODEPAGE_860 is not set
++# CONFIG_NLS_CODEPAGE_861 is not set
++# CONFIG_NLS_CODEPAGE_862 is not set
++# CONFIG_NLS_CODEPAGE_863 is not set
++# CONFIG_NLS_CODEPAGE_864 is not set
++# CONFIG_NLS_CODEPAGE_865 is not set
++# CONFIG_NLS_CODEPAGE_866 is not set
++# CONFIG_NLS_CODEPAGE_869 is not set
++# CONFIG_NLS_CODEPAGE_936 is not set
++# CONFIG_NLS_CODEPAGE_950 is not set
++# CONFIG_NLS_CODEPAGE_932 is not set
++# CONFIG_NLS_CODEPAGE_949 is not set
++# CONFIG_NLS_CODEPAGE_874 is not set
++# CONFIG_NLS_ISO8859_8 is not set
++# CONFIG_NLS_CODEPAGE_1250 is not set
++# CONFIG_NLS_CODEPAGE_1251 is not set
++# CONFIG_NLS_ASCII is not set
++CONFIG_NLS_ISO8859_1=y
++# CONFIG_NLS_ISO8859_2 is not set
++# CONFIG_NLS_ISO8859_3 is not set
++# CONFIG_NLS_ISO8859_4 is not set
++# CONFIG_NLS_ISO8859_5 is not set
++# CONFIG_NLS_ISO8859_6 is not set
++# CONFIG_NLS_ISO8859_7 is not set
++# CONFIG_NLS_ISO8859_9 is not set
++# CONFIG_NLS_ISO8859_13 is not set
++# CONFIG_NLS_ISO8859_14 is not set
++# CONFIG_NLS_ISO8859_15 is not set
++# CONFIG_NLS_KOI8_R is not set
++# CONFIG_NLS_KOI8_U is not set
++# CONFIG_NLS_UTF8 is not set
++
++#
++# Instrumentation Support
++#
++# CONFIG_PROFILING is not set
++# CONFIG_KPROBES is not set
++
++#
++# Kernel hacking
++#
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++# CONFIG_PRINTK_TIME is not set
++CONFIG_MAGIC_SYSRQ=y
++CONFIG_UNUSED_SYMBOLS=y
++CONFIG_DEBUG_KERNEL=y
++CONFIG_LOG_BUF_SHIFT=14
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_SCHEDSTATS is not set
++# CONFIG_DEBUG_SLAB is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_RWSEMS is not set
++# CONFIG_DEBUG_LOCK_ALLOC is not set
++# CONFIG_PROVE_LOCKING is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++# CONFIG_DEBUG_HIGHMEM is not set
++CONFIG_DEBUG_BUGVERBOSE=y
++CONFIG_DEBUG_INFO=y
++# CONFIG_DEBUG_FS is not set
++# CONFIG_DEBUG_VM is not set
++CONFIG_FRAME_POINTER=y
++# CONFIG_UNWIND_INFO is not set
++CONFIG_FORCED_INLINING=y
++# CONFIG_RCU_TORTURE_TEST is not set
++CONFIG_EARLY_PRINTK=y
++# CONFIG_DEBUG_STACKOVERFLOW is not set
++# CONFIG_DEBUG_STACK_USAGE is not set
++# CONFIG_DEBUG_PAGEALLOC is not set
++# CONFIG_DEBUG_RODATA is not set
++# CONFIG_4KSTACKS is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++
++#
++# Cryptographic options
++#
++CONFIG_CRYPTO=y
++# CONFIG_CRYPTO_HMAC is not set
++# CONFIG_CRYPTO_NULL is not set
++# CONFIG_CRYPTO_MD4 is not set
++CONFIG_CRYPTO_MD5=m
++# CONFIG_CRYPTO_SHA1 is not set
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_WP512 is not set
++# CONFIG_CRYPTO_TGR192 is not set
++# CONFIG_CRYPTO_DES is not set
++# CONFIG_CRYPTO_BLOWFISH is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++# CONFIG_CRYPTO_SERPENT is not set
++# CONFIG_CRYPTO_AES is not set
++# CONFIG_CRYPTO_AES_586 is not set
++# CONFIG_CRYPTO_CAST5 is not set
++# CONFIG_CRYPTO_CAST6 is not set
++# CONFIG_CRYPTO_TEA is not set
++# CONFIG_CRYPTO_ARC4 is not set
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_ANUBIS is not set
++# CONFIG_CRYPTO_DEFLATE is not set
++# CONFIG_CRYPTO_MICHAEL_MIC is not set
++CONFIG_CRYPTO_CRC32C=m
++# CONFIG_CRYPTO_TEST is not set
++
++#
++# Hardware crypto devices
++#
++# CONFIG_CRYPTO_DEV_PADLOCK is not set
++CONFIG_XEN=y
++CONFIG_XEN_INTERFACE_VERSION=0x00030206
++
++#
++# XEN
++#
++# CONFIG_XEN_PRIVILEGED_GUEST is not set
++CONFIG_XEN_UNPRIVILEGED_GUEST=y
++CONFIG_XEN_PRIVCMD=y
++CONFIG_XEN_XENBUS_DEV=y
++# CONFIG_XEN_BACKEND is not set
++CONFIG_XEN_BLKDEV_FRONTEND=y
++CONFIG_XEN_NETDEV_FRONTEND=y
++CONFIG_XEN_SCRUB_PAGES=y
++CONFIG_XEN_DISABLE_SERIAL=y
++CONFIG_XEN_SYSFS=y
++CONFIG_XEN_COMPAT_030002_AND_LATER=y
++# CONFIG_XEN_COMPAT_030004_AND_LATER is not set
++# CONFIG_XEN_COMPAT_030100_AND_LATER is not set
++# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
++CONFIG_XEN_COMPAT=0x030002
++CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
++CONFIG_NO_IDLE_HZ=y
++CONFIG_XEN_SMPBOOT=y
++CONFIG_XEN_BALLOON=y
++CONFIG_XEN_DEVMEM=y
++# CONFIG_XEN_GRANT_DEV is not set
++
++#
++# Library routines
++#
++# CONFIG_CRC_CCITT is not set
++# CONFIG_CRC16 is not set
++# CONFIG_CRC32 is not set
++CONFIG_LIBCRC32C=m
++CONFIG_ZLIB_INFLATE=y
++CONFIG_PLIST=y
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_GENERIC_PENDING_IRQ=y
++CONFIG_X86_SMP=y
++CONFIG_X86_BIOS_REBOOT=y
++CONFIG_X86_TRAMPOLINE=y
++CONFIG_X86_NO_TSS=y
++CONFIG_X86_NO_IDT=y
++CONFIG_KTIME_SCALAR=y
+diff -rpuN linux-2.6.18.8/buildconfigs/linux-defconfig_xenU_x86_64 linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xenU_x86_64
+--- linux-2.6.18.8/buildconfigs/linux-defconfig_xenU_x86_64 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xenU_x86_64 2008-02-15 16:21:56.000000000 -0800
+@@ -0,0 +1,1241 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.18.8
++# Tue Oct 16 09:32:52 2007
++#
++CONFIG_X86_64=y
++CONFIG_64BIT=y
++CONFIG_X86=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_SEMAPHORE_SLEEPERS=y
++CONFIG_MMU=y
++CONFIG_RWSEM_GENERIC_SPINLOCK=y
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_X86_CMPXCHG=y
++CONFIG_EARLY_PRINTK=y
++CONFIG_GENERIC_ISA_DMA=y
++CONFIG_GENERIC_IOMAP=y
++CONFIG_ARCH_MAY_HAVE_PC_FDC=y
++CONFIG_DMI=y
++CONFIG_AUDIT_ARCH=y
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# Code maturity level options
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION=""
++# CONFIG_LOCALVERSION_AUTO is not set
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++CONFIG_POSIX_MQUEUE=y
++CONFIG_BSD_PROCESS_ACCT=y
++# CONFIG_BSD_PROCESS_ACCT_V3 is not set
++# CONFIG_TASKSTATS is not set
++CONFIG_AUDIT=y
++CONFIG_AUDITSYSCALL=y
++# CONFIG_IKCONFIG is not set
++# CONFIG_CPUSETS is not set
++# CONFIG_RELAY is not set
++CONFIG_INITRAMFS_SOURCE=""
++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
++# CONFIG_EMBEDDED is not set
++CONFIG_UID16=y
++CONFIG_SYSCTL=y
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++CONFIG_KALLSYMS_EXTRA_PASS=y
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SHMEM=y
++CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_RT_MUTEXES=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++# CONFIG_SLOB is not set
++
++#
++# Loadable module support
++#
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++# CONFIG_MODULE_FORCE_UNLOAD is not set
++CONFIG_MODVERSIONS=y
++# CONFIG_MODULE_SRCVERSION_ALL is not set
++CONFIG_KMOD=y
++CONFIG_STOP_MACHINE=y
++
++#
++# Block layer
++#
++CONFIG_LBD=y
++# CONFIG_BLK_DEV_IO_TRACE is not set
++CONFIG_LSF=y
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++CONFIG_DEFAULT_AS=y
++# CONFIG_DEFAULT_DEADLINE is not set
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="anticipatory"
++
++#
++# Processor type and features
++#
++CONFIG_X86_PC=y
++# CONFIG_X86_VSMP is not set
++# CONFIG_MK8 is not set
++CONFIG_MPSC=y
++# CONFIG_GENERIC_CPU is not set
++CONFIG_X86_64_XEN=y
++CONFIG_X86_NO_TSS=y
++CONFIG_X86_NO_IDT=y
++CONFIG_X86_L1_CACHE_BYTES=128
++CONFIG_X86_L1_CACHE_SHIFT=7
++CONFIG_X86_INTERNODE_CACHE_BYTES=128
++CONFIG_X86_GOOD_APIC=y
++# CONFIG_MICROCODE is not set
++# CONFIG_X86_MSR is not set
++CONFIG_X86_CPUID=y
++CONFIG_X86_XEN_GENAPIC=y
++CONFIG_SMP=y
++CONFIG_PREEMPT_NONE=y
++# CONFIG_PREEMPT_VOLUNTARY is not set
++# CONFIG_PREEMPT is not set
++CONFIG_PREEMPT_BKL=y
++CONFIG_ARCH_FLATMEM_ENABLE=y
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++# CONFIG_SPARSEMEM_STATIC is not set
++CONFIG_SPLIT_PTLOCK_CPUS=4
++CONFIG_RESOURCES_64BIT=y
++CONFIG_NR_CPUS=16
++# CONFIG_HOTPLUG_CPU is not set
++CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
++CONFIG_SWIOTLB=y
++# CONFIG_CRASH_DUMP is not set
++CONFIG_PHYSICAL_START=0x200000
++CONFIG_SECCOMP=y
++CONFIG_HZ_100=y
++# CONFIG_HZ_250 is not set
++# CONFIG_HZ_1000 is not set
++CONFIG_HZ=100
++# CONFIG_REORDER is not set
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_ISA_DMA_API=y
++CONFIG_GENERIC_PENDING_IRQ=y
++
++#
++# Bus options (PCI etc.)
++#
++# CONFIG_PCI is not set
++
++#
++# PCCARD (PCMCIA/CardBus) support
++#
++# CONFIG_PCCARD is not set
++
++#
++# PCI Hotplug Support
++#
++
++#
++# Executable file formats / Emulations
++#
++CONFIG_BINFMT_ELF=y
++CONFIG_BINFMT_MISC=y
++CONFIG_IA32_EMULATION=y
++# CONFIG_IA32_AOUT is not set
++CONFIG_COMPAT=y
++CONFIG_SYSVIPC_COMPAT=y
++
++#
++# Networking
++#
++CONFIG_NET=y
++
++#
++# Networking options
++#
++# CONFIG_NETDEBUG is not set
++CONFIG_PACKET=y
++CONFIG_PACKET_MMAP=y
++CONFIG_UNIX=y
++CONFIG_XFRM=y
++CONFIG_XFRM_USER=y
++CONFIG_NET_KEY=m
++CONFIG_INET=y
++CONFIG_IP_MULTICAST=y
++CONFIG_IP_ADVANCED_ROUTER=y
++CONFIG_ASK_IP_FIB_HASH=y
++# CONFIG_IP_FIB_TRIE is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_MULTIPLE_TABLES=y
++CONFIG_IP_ROUTE_FWMARK=y
++CONFIG_IP_ROUTE_MULTIPATH=y
++# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
++CONFIG_IP_ROUTE_VERBOSE=y
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++CONFIG_IP_PNP_BOOTP=y
++CONFIG_IP_PNP_RARP=y
++CONFIG_NET_IPIP=m
++CONFIG_NET_IPGRE=m
++CONFIG_NET_IPGRE_BROADCAST=y
++CONFIG_IP_MROUTE=y
++CONFIG_IP_PIMSM_V1=y
++CONFIG_IP_PIMSM_V2=y
++# CONFIG_ARPD is not set
++CONFIG_SYN_COOKIES=y
++CONFIG_INET_AH=m
++CONFIG_INET_ESP=m
++CONFIG_INET_IPCOMP=m
++CONFIG_INET_XFRM_TUNNEL=m
++CONFIG_INET_TUNNEL=m
++CONFIG_INET_XFRM_MODE_TRANSPORT=y
++CONFIG_INET_XFRM_MODE_TUNNEL=y
++# CONFIG_INET_DIAG is not set
++# CONFIG_TCP_CONG_ADVANCED is not set
++CONFIG_TCP_CONG_BIC=y
++
++#
++# IP: Virtual Server Configuration
++#
++CONFIG_IP_VS=m
++# CONFIG_IP_VS_DEBUG is not set
++CONFIG_IP_VS_TAB_BITS=12
++
++#
++# IPVS transport protocol load balancing support
++#
++CONFIG_IP_VS_PROTO_TCP=y
++CONFIG_IP_VS_PROTO_UDP=y
++CONFIG_IP_VS_PROTO_ESP=y
++CONFIG_IP_VS_PROTO_AH=y
++
++#
++# IPVS scheduler
++#
++CONFIG_IP_VS_RR=m
++CONFIG_IP_VS_WRR=m
++CONFIG_IP_VS_LC=m
++CONFIG_IP_VS_WLC=m
++CONFIG_IP_VS_LBLC=m
++CONFIG_IP_VS_LBLCR=m
++CONFIG_IP_VS_DH=m
++CONFIG_IP_VS_SH=m
++CONFIG_IP_VS_SED=m
++CONFIG_IP_VS_NQ=m
++
++#
++# IPVS application helper
++#
++CONFIG_IP_VS_FTP=m
++CONFIG_IPV6=m
++CONFIG_IPV6_PRIVACY=y
++# CONFIG_IPV6_ROUTER_PREF is not set
++CONFIG_INET6_AH=m
++CONFIG_INET6_ESP=m
++CONFIG_INET6_IPCOMP=m
++CONFIG_INET6_XFRM_TUNNEL=m
++CONFIG_INET6_TUNNEL=m
++CONFIG_INET6_XFRM_MODE_TRANSPORT=m
++CONFIG_INET6_XFRM_MODE_TUNNEL=m
++CONFIG_IPV6_TUNNEL=m
++# CONFIG_NETWORK_SECMARK is not set
++CONFIG_NETFILTER=y
++# CONFIG_NETFILTER_DEBUG is not set
++CONFIG_BRIDGE_NETFILTER=y
++
++#
++# Core Netfilter Configuration
++#
++# CONFIG_NETFILTER_NETLINK is not set
++# CONFIG_NETFILTER_XTABLES is not set
++
++#
++# IP: Netfilter Configuration
++#
++CONFIG_IP_NF_CONNTRACK=m
++CONFIG_IP_NF_CT_ACCT=y
++# CONFIG_IP_NF_CONNTRACK_MARK is not set
++# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
++CONFIG_IP_NF_CT_PROTO_SCTP=m
++CONFIG_IP_NF_FTP=m
++CONFIG_IP_NF_IRC=m
++# CONFIG_IP_NF_NETBIOS_NS is not set
++CONFIG_IP_NF_TFTP=m
++CONFIG_IP_NF_AMANDA=m
++# CONFIG_IP_NF_PPTP is not set
++# CONFIG_IP_NF_H323 is not set
++# CONFIG_IP_NF_SIP is not set
++CONFIG_IP_NF_QUEUE=m
++
++#
++# IPv6: Netfilter Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP6_NF_QUEUE is not set
++
++#
++# Bridge: Netfilter Configuration
++#
++CONFIG_BRIDGE_NF_EBTABLES=m
++CONFIG_BRIDGE_EBT_BROUTE=m
++CONFIG_BRIDGE_EBT_T_FILTER=m
++CONFIG_BRIDGE_EBT_T_NAT=m
++CONFIG_BRIDGE_EBT_802_3=m
++CONFIG_BRIDGE_EBT_AMONG=m
++CONFIG_BRIDGE_EBT_ARP=m
++CONFIG_BRIDGE_EBT_IP=m
++CONFIG_BRIDGE_EBT_LIMIT=m
++CONFIG_BRIDGE_EBT_MARK=m
++CONFIG_BRIDGE_EBT_PKTTYPE=m
++CONFIG_BRIDGE_EBT_STP=m
++CONFIG_BRIDGE_EBT_VLAN=m
++CONFIG_BRIDGE_EBT_ARPREPLY=m
++CONFIG_BRIDGE_EBT_DNAT=m
++CONFIG_BRIDGE_EBT_MARK_T=m
++CONFIG_BRIDGE_EBT_REDIRECT=m
++CONFIG_BRIDGE_EBT_SNAT=m
++CONFIG_BRIDGE_EBT_LOG=m
++# CONFIG_BRIDGE_EBT_ULOG is not set
++
++#
++# DCCP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_DCCP is not set
++
++#
++# SCTP Configuration (EXPERIMENTAL)
++#
++CONFIG_IP_SCTP=m
++# CONFIG_SCTP_DBG_MSG is not set
++# CONFIG_SCTP_DBG_OBJCNT is not set
++# CONFIG_SCTP_HMAC_NONE is not set
++# CONFIG_SCTP_HMAC_SHA1 is not set
++CONFIG_SCTP_HMAC_MD5=y
++
++#
++# TIPC Configuration (EXPERIMENTAL)
++#
++# CONFIG_TIPC is not set
++CONFIG_ATM=m
++CONFIG_ATM_CLIP=m
++# CONFIG_ATM_CLIP_NO_ICMP is not set
++CONFIG_ATM_LANE=m
++# CONFIG_ATM_MPOA is not set
++CONFIG_ATM_BR2684=m
++# CONFIG_ATM_BR2684_IPFILTER is not set
++CONFIG_BRIDGE=m
++CONFIG_VLAN_8021Q=m
++# CONFIG_DECNET is not set
++CONFIG_LLC=m
++# CONFIG_LLC2 is not set
++CONFIG_IPX=m
++# CONFIG_IPX_INTERN is not set
++CONFIG_ATALK=m
++CONFIG_DEV_APPLETALK=m
++CONFIG_IPDDP=m
++CONFIG_IPDDP_ENCAP=y
++CONFIG_IPDDP_DECAP=y
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++CONFIG_WAN_ROUTER=m
++
++#
++# QoS and/or fair queueing
++#
++CONFIG_NET_SCHED=y
++CONFIG_NET_SCH_CLK_JIFFIES=y
++# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
++# CONFIG_NET_SCH_CLK_CPU is not set
++
++#
++# Queueing/Scheduling
++#
++CONFIG_NET_SCH_CBQ=m
++CONFIG_NET_SCH_HTB=m
++CONFIG_NET_SCH_HFSC=m
++CONFIG_NET_SCH_ATM=m
++CONFIG_NET_SCH_PRIO=m
++CONFIG_NET_SCH_RED=m
++CONFIG_NET_SCH_SFQ=m
++CONFIG_NET_SCH_TEQL=m
++CONFIG_NET_SCH_TBF=m
++CONFIG_NET_SCH_GRED=m
++CONFIG_NET_SCH_DSMARK=m
++CONFIG_NET_SCH_NETEM=m
++CONFIG_NET_SCH_INGRESS=m
++
++#
++# Classification
++#
++CONFIG_NET_CLS=y
++# CONFIG_NET_CLS_BASIC is not set
++CONFIG_NET_CLS_TCINDEX=m
++CONFIG_NET_CLS_ROUTE4=m
++CONFIG_NET_CLS_ROUTE=y
++CONFIG_NET_CLS_FW=m
++CONFIG_NET_CLS_U32=m
++CONFIG_CLS_U32_PERF=y
++# CONFIG_CLS_U32_MARK is not set
++CONFIG_NET_CLS_RSVP=m
++CONFIG_NET_CLS_RSVP6=m
++# CONFIG_NET_EMATCH is not set
++# CONFIG_NET_CLS_ACT is not set
++CONFIG_NET_CLS_POLICE=y
++CONFIG_NET_CLS_IND=y
++CONFIG_NET_ESTIMATOR=y
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++CONFIG_IRDA=m
++
++#
++# IrDA protocols
++#
++CONFIG_IRLAN=m
++CONFIG_IRNET=m
++CONFIG_IRCOMM=m
++# CONFIG_IRDA_ULTRA is not set
++
++#
++# IrDA options
++#
++CONFIG_IRDA_CACHE_LAST_LSAP=y
++CONFIG_IRDA_FAST_RR=y
++# CONFIG_IRDA_DEBUG is not set
++
++#
++# Infrared-port device drivers
++#
++
++#
++# SIR device drivers
++#
++CONFIG_IRTTY_SIR=m
++
++#
++# Dongle support
++#
++CONFIG_DONGLE=y
++CONFIG_ESI_DONGLE=m
++CONFIG_ACTISYS_DONGLE=m
++CONFIG_TEKRAM_DONGLE=m
++# CONFIG_TOIM3232_DONGLE is not set
++CONFIG_LITELINK_DONGLE=m
++CONFIG_MA600_DONGLE=m
++CONFIG_GIRBIL_DONGLE=m
++CONFIG_MCP2120_DONGLE=m
++CONFIG_OLD_BELKIN_DONGLE=m
++CONFIG_ACT200L_DONGLE=m
++
++#
++# Old SIR device drivers
++#
++
++#
++# Old Serial dongle support
++#
++
++#
++# FIR device drivers
++#
++# CONFIG_NSC_FIR is not set
++# CONFIG_WINBOND_FIR is not set
++# CONFIG_SMC_IRCC_FIR is not set
++# CONFIG_ALI_FIR is not set
++# CONFIG_VIA_FIR is not set
++CONFIG_BT=m
++CONFIG_BT_L2CAP=m
++CONFIG_BT_SCO=m
++CONFIG_BT_RFCOMM=m
++CONFIG_BT_RFCOMM_TTY=y
++CONFIG_BT_BNEP=m
++CONFIG_BT_BNEP_MC_FILTER=y
++CONFIG_BT_BNEP_PROTO_FILTER=y
++CONFIG_BT_HIDP=m
++
++#
++# Bluetooth device drivers
++#
++CONFIG_BT_HCIUART=m
++CONFIG_BT_HCIUART_H4=y
++CONFIG_BT_HCIUART_BCSP=y
++CONFIG_BT_HCIVHCI=m
++# CONFIG_IEEE80211 is not set
++CONFIG_WIRELESS_EXT=y
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++CONFIG_FW_LOADER=y
++# CONFIG_DEBUG_DRIVER is not set
++CONFIG_SYS_HYPERVISOR=y
++
++#
++# Connector - unified userspace <-> kernelspace linker
++#
++# CONFIG_CONNECTOR is not set
++
++#
++# Memory Technology Devices (MTD)
++#
++# CONFIG_MTD is not set
++
++#
++# Parallel port support
++#
++# CONFIG_PARPORT is not set
++
++#
++# Plug and Play support
++#
++
++#
++# Block devices
++#
++CONFIG_BLK_DEV_FD=m
++# CONFIG_BLK_DEV_COW_COMMON is not set
++CONFIG_BLK_DEV_LOOP=m
++CONFIG_BLK_DEV_CRYPTOLOOP=m
++CONFIG_BLK_DEV_NBD=m
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=16384
++CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
++CONFIG_BLK_DEV_INITRD=y
++# CONFIG_CDROM_PKTCDVD is not set
++# CONFIG_ATA_OVER_ETH is not set
++
++#
++# ATA/ATAPI/MFM/RLL support
++#
++# CONFIG_IDE is not set
++
++#
++# SCSI device support
++#
++# CONFIG_RAID_ATTRS is not set
++CONFIG_SCSI=m
++CONFIG_SCSI_PROC_FS=y
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=m
++CONFIG_CHR_DEV_ST=m
++CONFIG_CHR_DEV_OSST=m
++CONFIG_BLK_DEV_SR=m
++CONFIG_BLK_DEV_SR_VENDOR=y
++CONFIG_CHR_DEV_SG=m
++# CONFIG_CHR_DEV_SCH is not set
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++# CONFIG_SCSI_MULTI_LUN is not set
++CONFIG_SCSI_CONSTANTS=y
++CONFIG_SCSI_LOGGING=y
++
++#
++# SCSI Transport Attributes
++#
++CONFIG_SCSI_SPI_ATTRS=m
++CONFIG_SCSI_FC_ATTRS=m
++# CONFIG_SCSI_ISCSI_ATTRS is not set
++# CONFIG_SCSI_SAS_ATTRS is not set
++
++#
++# SCSI low-level drivers
++#
++# CONFIG_ISCSI_TCP is not set
++CONFIG_SCSI_SATA=m
++# CONFIG_SCSI_DEBUG is not set
++
++#
++# Multi-device support (RAID and LVM)
++#
++CONFIG_MD=y
++CONFIG_BLK_DEV_MD=y
++CONFIG_MD_LINEAR=m
++CONFIG_MD_RAID0=m
++CONFIG_MD_RAID1=m
++CONFIG_MD_RAID10=m
++# CONFIG_MD_RAID456 is not set
++CONFIG_MD_MULTIPATH=m
++# CONFIG_MD_FAULTY is not set
++CONFIG_BLK_DEV_DM=m
++CONFIG_DM_CRYPT=m
++CONFIG_DM_SNAPSHOT=m
++CONFIG_DM_MIRROR=m
++CONFIG_DM_ZERO=m
++# CONFIG_DM_MULTIPATH is not set
++
++#
++# Fusion MPT device support
++#
++# CONFIG_FUSION is not set
++
++#
++# IEEE 1394 (FireWire) support
++#
++
++#
++# I2O device support
++#
++
++#
++# Network device support
++#
++CONFIG_NETDEVICES=y
++CONFIG_DUMMY=m
++CONFIG_BONDING=m
++CONFIG_EQUALIZER=m
++CONFIG_TUN=m
++
++#
++# PHY device support
++#
++# CONFIG_PHYLIB is not set
++
++#
++# Ethernet (10 or 100Mbit)
++#
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=m
++
++#
++# Ethernet (1000 Mbit)
++#
++
++#
++# Ethernet (10000 Mbit)
++#
++
++#
++# Token Ring devices
++#
++
++#
++# Wireless LAN (non-hamradio)
++#
++CONFIG_NET_RADIO=y
++# CONFIG_NET_WIRELESS_RTNETLINK is not set
++
++#
++# Obsolete Wireless cards support (pre-802.11)
++#
++# CONFIG_STRIP is not set
++# CONFIG_HOSTAP is not set
++
++#
++# Wan interfaces
++#
++# CONFIG_WAN is not set
++
++#
++# ATM drivers
++#
++# CONFIG_ATM_DUMMY is not set
++CONFIG_ATM_TCP=m
++CONFIG_PPP=m
++CONFIG_PPP_MULTILINK=y
++CONFIG_PPP_FILTER=y
++CONFIG_PPP_ASYNC=m
++CONFIG_PPP_SYNC_TTY=m
++CONFIG_PPP_DEFLATE=m
++# CONFIG_PPP_BSDCOMP is not set
++# CONFIG_PPP_MPPE is not set
++CONFIG_PPPOE=m
++CONFIG_PPPOATM=m
++# CONFIG_SLIP is not set
++# CONFIG_SHAPER is not set
++CONFIG_NETCONSOLE=m
++CONFIG_NETPOLL=y
++# CONFIG_NETPOLL_RX is not set
++CONFIG_NETPOLL_TRAP=y
++CONFIG_NET_POLL_CONTROLLER=y
++
++#
++# ISDN subsystem
++#
++# CONFIG_ISDN is not set
++
++#
++# Telephony Support
++#
++# CONFIG_PHONE is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++
++#
++# Userland interfaces
++#
++CONFIG_INPUT_MOUSEDEV=y
++# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++# CONFIG_INPUT_JOYDEV is not set
++# CONFIG_INPUT_TSDEV is not set
++# CONFIG_INPUT_EVDEV is not set
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++CONFIG_INPUT_KEYBOARD=y
++CONFIG_KEYBOARD_ATKBD=y
++# CONFIG_KEYBOARD_SUNKBD is not set
++# CONFIG_KEYBOARD_LKKBD is not set
++# CONFIG_KEYBOARD_XTKBD is not set
++# CONFIG_KEYBOARD_NEWTON is not set
++# CONFIG_INPUT_MOUSE is not set
++# CONFIG_INPUT_JOYSTICK is not set
++# CONFIG_INPUT_TOUCHSCREEN is not set
++# CONFIG_INPUT_MISC is not set
++
++#
++# Hardware I/O ports
++#
++CONFIG_SERIO=y
++CONFIG_SERIO_I8042=y
++CONFIG_SERIO_SERPORT=y
++# CONFIG_SERIO_CT82C710 is not set
++CONFIG_SERIO_LIBPS2=y
++# CONFIG_SERIO_RAW is not set
++# CONFIG_GAMEPORT is not set
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++
++#
++# Non-8250 serial port support
++#
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=256
++
++#
++# IPMI
++#
++# CONFIG_IPMI_HANDLER is not set
++
++#
++# Watchdog Cards
++#
++# CONFIG_WATCHDOG is not set
++CONFIG_HW_RANDOM=y
++# CONFIG_NVRAM is not set
++# CONFIG_RTC is not set
++# CONFIG_GEN_RTC is not set
++# CONFIG_DTLK is not set
++# CONFIG_R3964 is not set
++
++#
++# Ftape, the floppy tape device driver
++#
++# CONFIG_MWAVE is not set
++# CONFIG_PC8736x_GPIO is not set
++# CONFIG_RAW_DRIVER is not set
++# CONFIG_HANGCHECK_TIMER is not set
++
++#
++# TPM devices
++#
++# CONFIG_TCG_TPM is not set
++# CONFIG_TELCLOCK is not set
++
++#
++# I2C support
++#
++# CONFIG_I2C is not set
++
++#
++# SPI support
++#
++# CONFIG_SPI is not set
++# CONFIG_SPI_MASTER is not set
++
++#
++# Dallas's 1-wire bus
++#
++
++#
++# Hardware Monitoring support
++#
++# CONFIG_HWMON is not set
++# CONFIG_HWMON_VID is not set
++
++#
++# Misc devices
++#
++
++#
++# Multimedia devices
++#
++# CONFIG_VIDEO_DEV is not set
++
++#
++# Digital Video Broadcasting Devices
++#
++# CONFIG_DVB is not set
++
++#
++# Graphics support
++#
++CONFIG_FIRMWARE_EDID=y
++# CONFIG_FB is not set
++
++#
++# Console display driver support
++#
++CONFIG_VGA_CONSOLE=y
++# CONFIG_VGACON_SOFT_SCROLLBACK is not set
++CONFIG_DUMMY_CONSOLE=y
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Sound
++#
++# CONFIG_SOUND is not set
++
++#
++# USB support
++#
++# CONFIG_USB_ARCH_HAS_HCD is not set
++# CONFIG_USB_ARCH_HAS_OHCI is not set
++# CONFIG_USB_ARCH_HAS_EHCI is not set
++
++#
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
++#
++
++#
++# USB Gadget Support
++#
++# CONFIG_USB_GADGET is not set
++
++#
++# MMC/SD Card support
++#
++# CONFIG_MMC is not set
++
++#
++# LED devices
++#
++# CONFIG_NEW_LEDS is not set
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++
++#
++# InfiniBand support
++#
++
++#
++# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
++#
++# CONFIG_EDAC is not set
++
++#
++# Real Time Clock
++#
++# CONFIG_RTC_CLASS is not set
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
++#
++
++#
++# Firmware Drivers
++#
++# CONFIG_EDD is not set
++# CONFIG_DELL_RBU is not set
++# CONFIG_DCDBAS is not set
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++CONFIG_EXT2_FS_XATTR=y
++CONFIG_EXT2_FS_POSIX_ACL=y
++CONFIG_EXT2_FS_SECURITY=y
++# CONFIG_EXT2_FS_XIP is not set
++CONFIG_EXT3_FS=y
++CONFIG_EXT3_FS_XATTR=y
++# CONFIG_EXT3_FS_POSIX_ACL is not set
++# CONFIG_EXT3_FS_SECURITY is not set
++CONFIG_JBD=y
++# CONFIG_JBD_DEBUG is not set
++CONFIG_FS_MBCACHE=y
++CONFIG_REISERFS_FS=y
++# CONFIG_REISERFS_CHECK is not set
++CONFIG_REISERFS_PROC_INFO=y
++CONFIG_REISERFS_FS_XATTR=y
++CONFIG_REISERFS_FS_POSIX_ACL=y
++CONFIG_REISERFS_FS_SECURITY=y
++CONFIG_JFS_FS=m
++CONFIG_JFS_POSIX_ACL=y
++# CONFIG_JFS_SECURITY is not set
++# CONFIG_JFS_DEBUG is not set
++# CONFIG_JFS_STATISTICS is not set
++CONFIG_FS_POSIX_ACL=y
++CONFIG_XFS_FS=m
++# CONFIG_XFS_QUOTA is not set
++CONFIG_XFS_SECURITY=y
++CONFIG_XFS_POSIX_ACL=y
++# CONFIG_XFS_RT is not set
++# CONFIG_OCFS2_FS is not set
++CONFIG_MINIX_FS=m
++CONFIG_ROMFS_FS=m
++CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
++CONFIG_QUOTA=y
++# CONFIG_QFMT_V1 is not set
++CONFIG_QFMT_V2=y
++CONFIG_QUOTACTL=y
++CONFIG_DNOTIFY=y
++CONFIG_AUTOFS_FS=m
++CONFIG_AUTOFS4_FS=m
++# CONFIG_FUSE_FS is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=y
++CONFIG_JOLIET=y
++CONFIG_ZISOFS=y
++CONFIG_ZISOFS_FS=y
++CONFIG_UDF_FS=m
++CONFIG_UDF_NLS=y
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=m
++CONFIG_MSDOS_FS=m
++CONFIG_VFAT_FS=m
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_KCORE=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_RAMFS=y
++# CONFIG_CONFIGFS_FS is not set
++
++#
++# Miscellaneous filesystems
++#
++# CONFIG_ADFS_FS is not set
++CONFIG_AFFS_FS=m
++CONFIG_HFS_FS=m
++CONFIG_HFSPLUS_FS=m
++CONFIG_BEFS_FS=m
++# CONFIG_BEFS_DEBUG is not set
++CONFIG_BFS_FS=m
++CONFIG_EFS_FS=m
++CONFIG_CRAMFS=y
++CONFIG_VXFS_FS=m
++# CONFIG_HPFS_FS is not set
++CONFIG_QNX4FS_FS=m
++CONFIG_SYSV_FS=m
++CONFIG_UFS_FS=m
++# CONFIG_UFS_FS_WRITE is not set
++# CONFIG_UFS_DEBUG is not set
++
++#
++# Network File Systems
++#
++CONFIG_NFS_FS=m
++CONFIG_NFS_V3=y
++# CONFIG_NFS_V3_ACL is not set
++CONFIG_NFS_V4=y
++CONFIG_NFS_DIRECTIO=y
++CONFIG_NFSD=m
++CONFIG_NFSD_V3=y
++# CONFIG_NFSD_V3_ACL is not set
++CONFIG_NFSD_V4=y
++CONFIG_NFSD_TCP=y
++CONFIG_LOCKD=m
++CONFIG_LOCKD_V4=y
++CONFIG_EXPORTFS=m
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=m
++CONFIG_SUNRPC_GSS=m
++CONFIG_RPCSEC_GSS_KRB5=m
++CONFIG_RPCSEC_GSS_SPKM3=m
++CONFIG_SMB_FS=m
++# CONFIG_SMB_NLS_DEFAULT is not set
++CONFIG_CIFS=m
++# CONFIG_CIFS_STATS is not set
++# CONFIG_CIFS_WEAK_PW_HASH is not set
++CONFIG_CIFS_XATTR=y
++CONFIG_CIFS_POSIX=y
++# CONFIG_CIFS_DEBUG2 is not set
++# CONFIG_CIFS_EXPERIMENTAL is not set
++CONFIG_NCP_FS=m
++CONFIG_NCPFS_PACKET_SIGNING=y
++CONFIG_NCPFS_IOCTL_LOCKING=y
++CONFIG_NCPFS_STRONG=y
++CONFIG_NCPFS_NFS_NS=y
++CONFIG_NCPFS_OS2_NS=y
++CONFIG_NCPFS_SMALLDOS=y
++CONFIG_NCPFS_NLS=y
++CONFIG_NCPFS_EXTRAS=y
++# CONFIG_CODA_FS is not set
++# CONFIG_AFS_FS is not set
++# CONFIG_9P_FS is not set
++
++#
++# Partition Types
++#
++CONFIG_PARTITION_ADVANCED=y
++# CONFIG_ACORN_PARTITION is not set
++CONFIG_OSF_PARTITION=y
++# CONFIG_AMIGA_PARTITION is not set
++# CONFIG_ATARI_PARTITION is not set
++CONFIG_MAC_PARTITION=y
++CONFIG_MSDOS_PARTITION=y
++CONFIG_BSD_DISKLABEL=y
++CONFIG_MINIX_SUBPARTITION=y
++CONFIG_SOLARIS_X86_PARTITION=y
++CONFIG_UNIXWARE_DISKLABEL=y
++# CONFIG_LDM_PARTITION is not set
++CONFIG_SGI_PARTITION=y
++# CONFIG_ULTRIX_PARTITION is not set
++CONFIG_SUN_PARTITION=y
++# CONFIG_KARMA_PARTITION is not set
++CONFIG_EFI_PARTITION=y
++
++#
++# Native Language Support
++#
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="utf8"
++CONFIG_NLS_CODEPAGE_437=y
++CONFIG_NLS_CODEPAGE_737=m
++CONFIG_NLS_CODEPAGE_775=m
++CONFIG_NLS_CODEPAGE_850=m
++CONFIG_NLS_CODEPAGE_852=m
++CONFIG_NLS_CODEPAGE_855=m
++CONFIG_NLS_CODEPAGE_857=m
++CONFIG_NLS_CODEPAGE_860=m
++CONFIG_NLS_CODEPAGE_861=m
++CONFIG_NLS_CODEPAGE_862=m
++CONFIG_NLS_CODEPAGE_863=m
++CONFIG_NLS_CODEPAGE_864=m
++CONFIG_NLS_CODEPAGE_865=m
++CONFIG_NLS_CODEPAGE_866=m
++CONFIG_NLS_CODEPAGE_869=m
++CONFIG_NLS_CODEPAGE_936=m
++CONFIG_NLS_CODEPAGE_950=m
++CONFIG_NLS_CODEPAGE_932=m
++CONFIG_NLS_CODEPAGE_949=m
++CONFIG_NLS_CODEPAGE_874=m
++CONFIG_NLS_ISO8859_8=m
++CONFIG_NLS_CODEPAGE_1250=m
++CONFIG_NLS_CODEPAGE_1251=m
++CONFIG_NLS_ASCII=y
++CONFIG_NLS_ISO8859_1=m
++CONFIG_NLS_ISO8859_2=m
++CONFIG_NLS_ISO8859_3=m
++CONFIG_NLS_ISO8859_4=m
++CONFIG_NLS_ISO8859_5=m
++CONFIG_NLS_ISO8859_6=m
++CONFIG_NLS_ISO8859_7=m
++CONFIG_NLS_ISO8859_9=m
++CONFIG_NLS_ISO8859_13=m
++CONFIG_NLS_ISO8859_14=m
++CONFIG_NLS_ISO8859_15=m
++CONFIG_NLS_KOI8_R=m
++CONFIG_NLS_KOI8_U=m
++CONFIG_NLS_UTF8=m
++
++#
++# Instrumentation Support
++#
++# CONFIG_PROFILING is not set
++# CONFIG_KPROBES is not set
++
++#
++# Kernel hacking
++#
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++# CONFIG_PRINTK_TIME is not set
++CONFIG_MAGIC_SYSRQ=y
++CONFIG_UNUSED_SYMBOLS=y
++CONFIG_DEBUG_KERNEL=y
++CONFIG_LOG_BUF_SHIFT=15
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_SCHEDSTATS is not set
++# CONFIG_DEBUG_SLAB is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_RWSEMS is not set
++# CONFIG_DEBUG_LOCK_ALLOC is not set
++# CONFIG_PROVE_LOCKING is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++CONFIG_DEBUG_INFO=y
++# CONFIG_DEBUG_FS is not set
++# CONFIG_DEBUG_VM is not set
++CONFIG_FRAME_POINTER=y
++# CONFIG_UNWIND_INFO is not set
++CONFIG_FORCED_INLINING=y
++# CONFIG_RCU_TORTURE_TEST is not set
++# CONFIG_DEBUG_RODATA is not set
++# CONFIG_DEBUG_STACKOVERFLOW is not set
++# CONFIG_DEBUG_STACK_USAGE is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++
++#
++# Cryptographic options
++#
++CONFIG_CRYPTO=y
++CONFIG_CRYPTO_HMAC=y
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_MD4=m
++CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_SHA1=y
++CONFIG_CRYPTO_SHA256=m
++CONFIG_CRYPTO_SHA512=m
++CONFIG_CRYPTO_WP512=m
++# CONFIG_CRYPTO_TGR192 is not set
++CONFIG_CRYPTO_DES=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_SERPENT=m
++# CONFIG_CRYPTO_AES is not set
++# CONFIG_CRYPTO_AES_X86_64 is not set
++CONFIG_CRYPTO_CAST5=m
++CONFIG_CRYPTO_CAST6=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_KHAZAD=m
++# CONFIG_CRYPTO_ANUBIS is not set
++CONFIG_CRYPTO_DEFLATE=m
++CONFIG_CRYPTO_MICHAEL_MIC=m
++CONFIG_CRYPTO_CRC32C=m
++# CONFIG_CRYPTO_TEST is not set
++
++#
++# Hardware crypto devices
++#
++CONFIG_XEN=y
++CONFIG_XEN_INTERFACE_VERSION=0x00030206
++
++#
++# XEN
++#
++# CONFIG_XEN_PRIVILEGED_GUEST is not set
++CONFIG_XEN_UNPRIVILEGED_GUEST=y
++CONFIG_XEN_PRIVCMD=y
++CONFIG_XEN_XENBUS_DEV=y
++# CONFIG_XEN_BACKEND is not set
++CONFIG_XEN_BLKDEV_FRONTEND=y
++CONFIG_XEN_NETDEV_FRONTEND=y
++CONFIG_XEN_SCRUB_PAGES=y
++CONFIG_XEN_DISABLE_SERIAL=y
++CONFIG_XEN_SYSFS=y
++CONFIG_XEN_COMPAT_030002_AND_LATER=y
++# CONFIG_XEN_COMPAT_030004_AND_LATER is not set
++# CONFIG_XEN_COMPAT_030100_AND_LATER is not set
++# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
++CONFIG_XEN_COMPAT=0x030002
++CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
++CONFIG_NO_IDLE_HZ=y
++CONFIG_XEN_SMPBOOT=y
++CONFIG_XEN_BALLOON=y
++CONFIG_XEN_DEVMEM=y
++# CONFIG_XEN_GRANT_DEV is not set
++
++#
++# Library routines
++#
++CONFIG_CRC_CCITT=m
++# CONFIG_CRC16 is not set
++CONFIG_CRC32=y
++CONFIG_LIBCRC32C=m
++CONFIG_ZLIB_INFLATE=y
++CONFIG_ZLIB_DEFLATE=m
++CONFIG_TEXTSEARCH=y
++CONFIG_TEXTSEARCH_KMP=m
++CONFIG_PLIST=y
+diff -rpuN linux-2.6.18.8/buildconfigs/linux-defconfig_xen_ia64 linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xen_ia64
+--- linux-2.6.18.8/buildconfigs/linux-defconfig_xen_ia64 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xen_ia64 2008-02-15 16:21:56.000000000 -0800
+@@ -0,0 +1,1697 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.18.8
++# Mon Dec 17 13:38:29 2007
++#
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# Code maturity level options
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION=""
++CONFIG_LOCALVERSION_AUTO=y
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++CONFIG_POSIX_MQUEUE=y
++CONFIG_BSD_PROCESS_ACCT=y
++# CONFIG_BSD_PROCESS_ACCT_V3 is not set
++# CONFIG_TASKSTATS is not set
++# CONFIG_AUDIT is not set
++CONFIG_IKCONFIG=y
++CONFIG_IKCONFIG_PROC=y
++# CONFIG_CPUSETS is not set
++# CONFIG_RELAY is not set
++CONFIG_INITRAMFS_SOURCE=""
++CONFIG_CC_OPTIMIZE_FOR_SIZE=y
++# CONFIG_EMBEDDED is not set
++CONFIG_SYSCTL=y
++CONFIG_KALLSYMS=y
++CONFIG_KALLSYMS_ALL=y
++CONFIG_KALLSYMS_EXTRA_PASS=y
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SHMEM=y
++CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_RT_MUTEXES=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++# CONFIG_SLOB is not set
++
++#
++# Loadable module support
++#
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++# CONFIG_MODULE_FORCE_UNLOAD is not set
++CONFIG_MODVERSIONS=y
++CONFIG_MODULE_SRCVERSION_ALL=y
++CONFIG_KMOD=y
++CONFIG_STOP_MACHINE=y
++
++#
++# Block layer
++#
++# CONFIG_BLK_DEV_IO_TRACE is not set
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++CONFIG_DEFAULT_AS=y
++# CONFIG_DEFAULT_DEADLINE is not set
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="anticipatory"
++
++#
++# Processor type and features
++#
++CONFIG_IA64=y
++CONFIG_64BIT=y
++CONFIG_MMU=y
++CONFIG_SWIOTLB=y
++CONFIG_RWSEM_XCHGADD_ALGORITHM=y
++CONFIG_GENERIC_FIND_NEXT_BIT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_TIME_INTERPOLATION=y
++CONFIG_DMI=y
++CONFIG_EFI=y
++CONFIG_GENERIC_IOMAP=y
++CONFIG_XEN=y
++CONFIG_XEN_IA64_EXPOSE_P2M=y
++CONFIG_XEN_IA64_EXPOSE_P2M_USE_DTR=y
++CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
++CONFIG_DMA_IS_DMA32=y
++CONFIG_AUDIT_ARCH=y
++CONFIG_IA64_GENERIC=y
++# CONFIG_IA64_DIG is not set
++# CONFIG_IA64_HP_ZX1 is not set
++# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
++# CONFIG_IA64_SGI_SN2 is not set
++# CONFIG_IA64_HP_SIM is not set
++# CONFIG_IA64_XEN is not set
++# CONFIG_ITANIUM is not set
++CONFIG_MCKINLEY=y
++# CONFIG_IA64_PAGE_SIZE_4KB is not set
++# CONFIG_IA64_PAGE_SIZE_8KB is not set
++CONFIG_IA64_PAGE_SIZE_16KB=y
++# CONFIG_IA64_PAGE_SIZE_64KB is not set
++CONFIG_PGTABLE_3=y
++# CONFIG_PGTABLE_4 is not set
++CONFIG_HZ_100=y
++# CONFIG_HZ_250 is not set
++# CONFIG_HZ_1000 is not set
++CONFIG_HZ=100
++CONFIG_IA64_L1_CACHE_SHIFT=7
++CONFIG_IA64_CYCLONE=y
++CONFIG_IOSAPIC=y
++# CONFIG_IA64_SGI_SN_XP is not set
++CONFIG_FORCE_MAX_ZONEORDER=11
++CONFIG_SMP=y
++CONFIG_NR_CPUS=16
++CONFIG_HOTPLUG_CPU=y
++CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
++# CONFIG_SCHED_SMT is not set
++# CONFIG_PERMIT_BSP_REMOVE is not set
++# CONFIG_PREEMPT is not set
++CONFIG_SELECT_MEMORY_MODEL=y
++# CONFIG_FLATMEM_MANUAL is not set
++CONFIG_DISCONTIGMEM_MANUAL=y
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_DISCONTIGMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++CONFIG_NEED_MULTIPLE_NODES=y
++# CONFIG_SPARSEMEM_STATIC is not set
++CONFIG_SPLIT_PTLOCK_CPUS=4
++# CONFIG_MIGRATION is not set
++CONFIG_RESOURCES_64BIT=y
++CONFIG_ARCH_SELECT_MEMORY_MODEL=y
++CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
++CONFIG_ARCH_FLATMEM_ENABLE=y
++CONFIG_ARCH_SPARSEMEM_ENABLE=y
++CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
++CONFIG_NUMA=y
++CONFIG_NODES_SHIFT=10
++CONFIG_VIRTUAL_MEM_MAP=y
++CONFIG_HOLES_IN_ZONE=y
++CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
++CONFIG_HAVE_ARCH_NODEDATA_EXTENSION=y
++# CONFIG_IA32_SUPPORT is not set
++# CONFIG_IA64_MCA_RECOVERY is not set
++CONFIG_PERFMON=y
++CONFIG_IA64_PALINFO=y
++CONFIG_SGI_SN=y
++
++#
++# SN Devices
++#
++# CONFIG_SGI_IOC3 is not set
++CONFIG_KEXEC=y
++
++#
++# Firmware Drivers
++#
++CONFIG_EFI_VARS=y
++CONFIG_EFI_PCDP=y
++CONFIG_BINFMT_ELF=y
++CONFIG_BINFMT_MISC=y
++
++#
++# Power management and ACPI
++#
++CONFIG_PM=y
++CONFIG_PM_LEGACY=y
++# CONFIG_PM_DEBUG is not set
++
++#
++# ACPI (Advanced Configuration and Power Interface) Support
++#
++CONFIG_ACPI=y
++CONFIG_ACPI_BUTTON=y
++CONFIG_ACPI_FAN=y
++# CONFIG_ACPI_DOCK is not set
++CONFIG_ACPI_PROCESSOR=y
++CONFIG_ACPI_HOTPLUG_CPU=y
++CONFIG_ACPI_THERMAL=y
++CONFIG_ACPI_NUMA=y
++CONFIG_ACPI_BLACKLIST_YEAR=0
++# CONFIG_ACPI_DEBUG is not set
++CONFIG_ACPI_EC=y
++CONFIG_ACPI_POWER=y
++CONFIG_ACPI_SYSTEM=y
++CONFIG_ACPI_CONTAINER=y
++
++#
++# CPU Frequency scaling
++#
++# CONFIG_CPU_FREQ is not set
++
++#
++# Bus options (PCI, PCMCIA)
++#
++CONFIG_PCI=y
++CONFIG_PCI_DOMAINS=y
++CONFIG_XEN_PCIDEV_FRONTEND=y
++# CONFIG_XEN_PCIDEV_FE_DEBUG is not set
++# CONFIG_PCIEPORTBUS is not set
++# CONFIG_PCI_DEBUG is not set
++
++#
++# PCI Hotplug Support
++#
++CONFIG_HOTPLUG_PCI=y
++# CONFIG_HOTPLUG_PCI_FAKE is not set
++CONFIG_HOTPLUG_PCI_ACPI=y
++# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
++# CONFIG_HOTPLUG_PCI_CPCI is not set
++# CONFIG_HOTPLUG_PCI_SHPC is not set
++# CONFIG_HOTPLUG_PCI_SGI is not set
++
++#
++# PCCARD (PCMCIA/CardBus) support
++#
++# CONFIG_PCCARD is not set
++
++#
++# Networking
++#
++CONFIG_NET=y
++
++#
++# Networking options
++#
++# CONFIG_NETDEBUG is not set
++CONFIG_PACKET=y
++# CONFIG_PACKET_MMAP is not set
++CONFIG_UNIX=y
++CONFIG_XFRM=y
++# CONFIG_XFRM_USER is not set
++# CONFIG_NET_KEY is not set
++CONFIG_INET=y
++CONFIG_IP_MULTICAST=y
++# CONFIG_IP_ADVANCED_ROUTER is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++# CONFIG_IP_PNP_BOOTP is not set
++# CONFIG_IP_PNP_RARP is not set
++# CONFIG_NET_IPIP is not set
++# CONFIG_NET_IPGRE is not set
++# CONFIG_IP_MROUTE is not set
++CONFIG_ARPD=y
++CONFIG_SYN_COOKIES=y
++# CONFIG_INET_AH is not set
++# CONFIG_INET_ESP is not set
++# CONFIG_INET_IPCOMP is not set
++# CONFIG_INET_XFRM_TUNNEL is not set
++# CONFIG_INET_TUNNEL is not set
++CONFIG_INET_XFRM_MODE_TRANSPORT=y
++CONFIG_INET_XFRM_MODE_TUNNEL=y
++CONFIG_INET_DIAG=y
++CONFIG_INET_TCP_DIAG=y
++# CONFIG_TCP_CONG_ADVANCED is not set
++CONFIG_TCP_CONG_BIC=y
++
++#
++# IP: Virtual Server Configuration
++#
++# CONFIG_IP_VS is not set
++# CONFIG_IPV6 is not set
++# CONFIG_INET6_XFRM_TUNNEL is not set
++# CONFIG_INET6_TUNNEL is not set
++# CONFIG_NETWORK_SECMARK is not set
++CONFIG_NETFILTER=y
++# CONFIG_NETFILTER_DEBUG is not set
++CONFIG_BRIDGE_NETFILTER=y
++
++#
++# Core Netfilter Configuration
++#
++# CONFIG_NETFILTER_NETLINK is not set
++# CONFIG_NF_CONNTRACK is not set
++# CONFIG_NETFILTER_XTABLES is not set
++
++#
++# IP: Netfilter Configuration
++#
++# CONFIG_IP_NF_CONNTRACK is not set
++# CONFIG_IP_NF_QUEUE is not set
++
++#
++# Bridge: Netfilter Configuration
++#
++# CONFIG_BRIDGE_NF_EBTABLES is not set
++
++#
++# DCCP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_DCCP is not set
++
++#
++# SCTP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_SCTP is not set
++
++#
++# TIPC Configuration (EXPERIMENTAL)
++#
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++CONFIG_BRIDGE=y
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++CONFIG_LLC=y
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++
++#
++# QoS and/or fair queueing
++#
++# CONFIG_NET_SCHED is not set
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++# CONFIG_IEEE80211 is not set
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++CONFIG_FW_LOADER=y
++# CONFIG_DEBUG_DRIVER is not set
++CONFIG_SYS_HYPERVISOR=y
++
++#
++# Connector - unified userspace <-> kernelspace linker
++#
++# CONFIG_CONNECTOR is not set
++
++#
++# Memory Technology Devices (MTD)
++#
++# CONFIG_MTD is not set
++
++#
++# Parallel port support
++#
++# CONFIG_PARPORT is not set
++
++#
++# Plug and Play support
++#
++# CONFIG_PNP is not set
++
++#
++# Block devices
++#
++# CONFIG_BLK_CPQ_DA is not set
++CONFIG_BLK_CPQ_CISS_DA=y
++# CONFIG_CISS_SCSI_TAPE is not set
++# CONFIG_BLK_DEV_DAC960 is not set
++# CONFIG_BLK_DEV_UMEM is not set
++# CONFIG_BLK_DEV_COW_COMMON is not set
++CONFIG_BLK_DEV_LOOP=y
++CONFIG_BLK_DEV_CRYPTOLOOP=y
++CONFIG_BLK_DEV_NBD=m
++# CONFIG_BLK_DEV_SX8 is not set
++# CONFIG_BLK_DEV_UB is not set
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=4096
++CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
++CONFIG_BLK_DEV_INITRD=y
++# CONFIG_CDROM_PKTCDVD is not set
++# CONFIG_ATA_OVER_ETH is not set
++
++#
++# ATA/ATAPI/MFM/RLL support
++#
++CONFIG_IDE=y
++CONFIG_IDE_MAX_HWIFS=4
++CONFIG_BLK_DEV_IDE=y
++
++#
++# Please see Documentation/ide.txt for help/info on IDE drives
++#
++# CONFIG_BLK_DEV_IDE_SATA is not set
++CONFIG_BLK_DEV_IDEDISK=y
++# CONFIG_IDEDISK_MULTI_MODE is not set
++CONFIG_BLK_DEV_IDECD=y
++# CONFIG_BLK_DEV_IDETAPE is not set
++CONFIG_BLK_DEV_IDEFLOPPY=y
++CONFIG_BLK_DEV_IDESCSI=y
++# CONFIG_IDE_TASK_IOCTL is not set
++
++#
++# IDE chipset support/bugfixes
++#
++# CONFIG_IDE_GENERIC is not set
++CONFIG_BLK_DEV_IDEPCI=y
++# CONFIG_IDEPCI_SHARE_IRQ is not set
++# CONFIG_BLK_DEV_OFFBOARD is not set
++CONFIG_BLK_DEV_GENERIC=y
++# CONFIG_BLK_DEV_OPTI621 is not set
++CONFIG_BLK_DEV_IDEDMA_PCI=y
++# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
++CONFIG_IDEDMA_PCI_AUTO=y
++# CONFIG_IDEDMA_ONLYDISK is not set
++# CONFIG_BLK_DEV_AEC62XX is not set
++# CONFIG_BLK_DEV_ALI15X3 is not set
++# CONFIG_BLK_DEV_AMD74XX is not set
++CONFIG_BLK_DEV_CMD64X=y
++# CONFIG_BLK_DEV_TRIFLEX is not set
++# CONFIG_BLK_DEV_CY82C693 is not set
++# CONFIG_BLK_DEV_CS5520 is not set
++# CONFIG_BLK_DEV_CS5530 is not set
++# CONFIG_BLK_DEV_HPT34X is not set
++# CONFIG_BLK_DEV_HPT366 is not set
++# CONFIG_BLK_DEV_SC1200 is not set
++CONFIG_BLK_DEV_PIIX=y
++# CONFIG_BLK_DEV_IT821X is not set
++# CONFIG_BLK_DEV_NS87415 is not set
++# CONFIG_BLK_DEV_PDC202XX_OLD is not set
++# CONFIG_BLK_DEV_PDC202XX_NEW is not set
++# CONFIG_BLK_DEV_SVWKS is not set
++# CONFIG_BLK_DEV_SIIMAGE is not set
++# CONFIG_BLK_DEV_SLC90E66 is not set
++# CONFIG_BLK_DEV_TRM290 is not set
++# CONFIG_BLK_DEV_VIA82CXXX is not set
++# CONFIG_IDE_ARM is not set
++CONFIG_BLK_DEV_IDEDMA=y
++# CONFIG_IDEDMA_IVB is not set
++CONFIG_IDEDMA_AUTO=y
++# CONFIG_BLK_DEV_HD is not set
++
++#
++# SCSI device support
++#
++# CONFIG_RAID_ATTRS is not set
++CONFIG_SCSI=y
++CONFIG_SCSI_PROC_FS=y
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=y
++CONFIG_CHR_DEV_ST=y
++CONFIG_CHR_DEV_OSST=y
++CONFIG_BLK_DEV_SR=y
++CONFIG_BLK_DEV_SR_VENDOR=y
++CONFIG_CHR_DEV_SG=y
++# CONFIG_CHR_DEV_SCH is not set
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++CONFIG_SCSI_MULTI_LUN=y
++CONFIG_SCSI_CONSTANTS=y
++CONFIG_SCSI_LOGGING=y
++
++#
++# SCSI Transport Attributes
++#
++CONFIG_SCSI_SPI_ATTRS=y
++CONFIG_SCSI_FC_ATTRS=y
++# CONFIG_SCSI_ISCSI_ATTRS is not set
++CONFIG_SCSI_SAS_ATTRS=y
++
++#
++# SCSI low-level drivers
++#
++# CONFIG_ISCSI_TCP is not set
++# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
++# CONFIG_SCSI_3W_9XXX is not set
++# CONFIG_SCSI_ACARD is not set
++# CONFIG_SCSI_AACRAID is not set
++# CONFIG_SCSI_AIC7XXX is not set
++# CONFIG_SCSI_AIC7XXX_OLD is not set
++# CONFIG_SCSI_AIC79XX is not set
++# CONFIG_MEGARAID_NEWGEN is not set
++# CONFIG_MEGARAID_LEGACY is not set
++# CONFIG_MEGARAID_SAS is not set
++# CONFIG_SCSI_SATA is not set
++# CONFIG_SCSI_HPTIOP is not set
++# CONFIG_SCSI_DMX3191D is not set
++# CONFIG_SCSI_FUTURE_DOMAIN is not set
++# CONFIG_SCSI_IPS is not set
++# CONFIG_SCSI_INITIO is not set
++# CONFIG_SCSI_INIA100 is not set
++CONFIG_SCSI_SYM53C8XX_2=y
++CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
++CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
++CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
++CONFIG_SCSI_SYM53C8XX_MMIO=y
++# CONFIG_SCSI_IPR is not set
++CONFIG_SCSI_QLOGIC_1280=y
++# CONFIG_SCSI_QLA_FC is not set
++# CONFIG_SCSI_LPFC is not set
++# CONFIG_SCSI_DC395x is not set
++# CONFIG_SCSI_DC390T is not set
++# CONFIG_SCSI_DEBUG is not set
++
++#
++# Multi-device support (RAID and LVM)
++#
++CONFIG_MD=y
++# CONFIG_BLK_DEV_MD is not set
++CONFIG_BLK_DEV_DM=y
++CONFIG_DM_CRYPT=m
++CONFIG_DM_SNAPSHOT=y
++CONFIG_DM_MIRROR=m
++CONFIG_DM_ZERO=m
++CONFIG_DM_MULTIPATH=m
++CONFIG_DM_MULTIPATH_EMC=m
++
++#
++# Fusion MPT device support
++#
++CONFIG_FUSION=y
++CONFIG_FUSION_SPI=y
++# CONFIG_FUSION_FC is not set
++CONFIG_FUSION_SAS=y
++CONFIG_FUSION_MAX_SGE=128
++# CONFIG_FUSION_CTL is not set
++
++#
++# IEEE 1394 (FireWire) support
++#
++# CONFIG_IEEE1394 is not set
++
++#
++# I2O device support
++#
++# CONFIG_I2O is not set
++
++#
++# Network device support
++#
++CONFIG_NETDEVICES=y
++CONFIG_DUMMY=y
++# CONFIG_BONDING is not set
++# CONFIG_EQUALIZER is not set
++CONFIG_TUN=y
++
++#
++# ARCnet devices
++#
++CONFIG_ARCNET=y
++# CONFIG_ARCNET_1201 is not set
++# CONFIG_ARCNET_1051 is not set
++# CONFIG_ARCNET_RAW is not set
++# CONFIG_ARCNET_CAP is not set
++# CONFIG_ARCNET_COM90xx is not set
++# CONFIG_ARCNET_COM90xxIO is not set
++# CONFIG_ARCNET_RIM_I is not set
++# CONFIG_ARCNET_COM20020 is not set
++
++#
++# PHY device support
++#
++# CONFIG_PHYLIB is not set
++
++#
++# Ethernet (10 or 100Mbit)
++#
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=y
++# CONFIG_HAPPYMEAL is not set
++# CONFIG_SUNGEM is not set
++# CONFIG_CASSINI is not set
++# CONFIG_NET_VENDOR_3COM is not set
++
++#
++# Tulip family network device support
++#
++CONFIG_NET_TULIP=y
++# CONFIG_DE2104X is not set
++CONFIG_TULIP=y
++CONFIG_TULIP_MWI=y
++CONFIG_TULIP_MMIO=y
++CONFIG_TULIP_NAPI=y
++CONFIG_TULIP_NAPI_HW_MITIGATION=y
++# CONFIG_DE4X5 is not set
++# CONFIG_WINBOND_840 is not set
++# CONFIG_DM9102 is not set
++# CONFIG_ULI526X is not set
++# CONFIG_HP100 is not set
++CONFIG_NET_PCI=y
++# CONFIG_PCNET32 is not set
++# CONFIG_AMD8111_ETH is not set
++# CONFIG_ADAPTEC_STARFIRE is not set
++# CONFIG_B44 is not set
++# CONFIG_FORCEDETH is not set
++# CONFIG_DGRS is not set
++CONFIG_EEPRO100=y
++CONFIG_E100=y
++# CONFIG_FEALNX is not set
++# CONFIG_NATSEMI is not set
++# CONFIG_NE2K_PCI is not set
++# CONFIG_8139CP is not set
++# CONFIG_8139TOO is not set
++# CONFIG_SIS900 is not set
++# CONFIG_EPIC100 is not set
++# CONFIG_SUNDANCE is not set
++# CONFIG_VIA_RHINE is not set
++
++#
++# Ethernet (1000 Mbit)
++#
++# CONFIG_ACENIC is not set
++# CONFIG_DL2K is not set
++CONFIG_E1000=y
++# CONFIG_E1000_NAPI is not set
++# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
++# CONFIG_NS83820 is not set
++# CONFIG_HAMACHI is not set
++# CONFIG_YELLOWFIN is not set
++# CONFIG_R8169 is not set
++# CONFIG_SIS190 is not set
++# CONFIG_SKGE is not set
++# CONFIG_SKY2 is not set
++# CONFIG_SK98LIN is not set
++# CONFIG_VIA_VELOCITY is not set
++CONFIG_TIGON3=y
++# CONFIG_BNX2 is not set
++
++#
++# Ethernet (10000 Mbit)
++#
++# CONFIG_CHELSIO_T1 is not set
++# CONFIG_IXGB is not set
++# CONFIG_S2IO is not set
++# CONFIG_MYRI10GE is not set
++
++#
++# Token Ring devices
++#
++# CONFIG_TR is not set
++
++#
++# Wireless LAN (non-hamradio)
++#
++# CONFIG_NET_RADIO is not set
++
++#
++# Wan interfaces
++#
++# CONFIG_WAN is not set
++# CONFIG_FDDI is not set
++# CONFIG_HIPPI is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++# CONFIG_NET_FC is not set
++# CONFIG_SHAPER is not set
++CONFIG_NETCONSOLE=y
++CONFIG_NETPOLL=y
++# CONFIG_NETPOLL_RX is not set
++# CONFIG_NETPOLL_TRAP is not set
++CONFIG_NET_POLL_CONTROLLER=y
++
++#
++# ISDN subsystem
++#
++CONFIG_ISDN=m
++
++#
++# Old ISDN4Linux
++#
++# CONFIG_ISDN_I4L is not set
++
++#
++# CAPI subsystem
++#
++# CONFIG_ISDN_CAPI is not set
++
++#
++# Telephony Support
++#
++# CONFIG_PHONE is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++
++#
++# Userland interfaces
++#
++CONFIG_INPUT_MOUSEDEV=y
++CONFIG_INPUT_MOUSEDEV_PSAUX=y
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++CONFIG_INPUT_JOYDEV=y
++# CONFIG_INPUT_TSDEV is not set
++CONFIG_INPUT_EVDEV=y
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++CONFIG_INPUT_KEYBOARD=y
++CONFIG_KEYBOARD_ATKBD=y
++# CONFIG_KEYBOARD_SUNKBD is not set
++# CONFIG_KEYBOARD_LKKBD is not set
++# CONFIG_KEYBOARD_XTKBD is not set
++# CONFIG_KEYBOARD_NEWTON is not set
++CONFIG_INPUT_MOUSE=y
++CONFIG_MOUSE_PS2=y
++# CONFIG_MOUSE_SERIAL is not set
++# CONFIG_MOUSE_VSXXXAA is not set
++# CONFIG_INPUT_JOYSTICK is not set
++# CONFIG_INPUT_TOUCHSCREEN is not set
++# CONFIG_INPUT_MISC is not set
++
++#
++# Hardware I/O ports
++#
++CONFIG_SERIO=y
++CONFIG_SERIO_I8042=y
++# CONFIG_SERIO_SERPORT is not set
++# CONFIG_SERIO_PCIPS2 is not set
++CONFIG_SERIO_LIBPS2=y
++# CONFIG_SERIO_RAW is not set
++CONFIG_GAMEPORT=y
++# CONFIG_GAMEPORT_NS558 is not set
++# CONFIG_GAMEPORT_L4 is not set
++# CONFIG_GAMEPORT_EMU10K1 is not set
++# CONFIG_GAMEPORT_FM801 is not set
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
++CONFIG_SERIAL_NONSTANDARD=y
++# CONFIG_COMPUTONE is not set
++# CONFIG_ROCKETPORT is not set
++# CONFIG_CYCLADES is not set
++# CONFIG_DIGIEPCA is not set
++# CONFIG_MOXA_INTELLIO is not set
++# CONFIG_MOXA_SMARTIO is not set
++# CONFIG_ISI is not set
++# CONFIG_SYNCLINKMP is not set
++# CONFIG_SYNCLINK_GT is not set
++# CONFIG_N_HDLC is not set
++# CONFIG_SPECIALIX is not set
++# CONFIG_SX is not set
++# CONFIG_RIO is not set
++# CONFIG_STALDRV is not set
++# CONFIG_SGI_SNSC is not set
++# CONFIG_SGI_TIOCX is not set
++
++#
++# Serial drivers
++#
++
++#
++# Non-8250 serial port support
++#
++# CONFIG_SERIAL_SGI_L1_CONSOLE is not set
++# CONFIG_SERIAL_JSM is not set
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=256
++
++#
++# IPMI
++#
++# CONFIG_IPMI_HANDLER is not set
++
++#
++# Watchdog Cards
++#
++# CONFIG_WATCHDOG is not set
++# CONFIG_HW_RANDOM is not set
++CONFIG_EFI_RTC=y
++# CONFIG_DTLK is not set
++# CONFIG_R3964 is not set
++# CONFIG_APPLICOM is not set
++
++#
++# Ftape, the floppy tape device driver
++#
++CONFIG_AGP=y
++# CONFIG_AGP_SIS is not set
++# CONFIG_AGP_VIA is not set
++CONFIG_AGP_I460=y
++# CONFIG_AGP_HP_ZX1 is not set
++# CONFIG_AGP_SGI_TIOCA is not set
++CONFIG_DRM=y
++# CONFIG_DRM_TDFX is not set
++# CONFIG_DRM_R128 is not set
++# CONFIG_DRM_RADEON is not set
++# CONFIG_DRM_MGA is not set
++# CONFIG_DRM_SIS is not set
++# CONFIG_DRM_VIA is not set
++# CONFIG_DRM_SAVAGE is not set
++# CONFIG_RAW_DRIVER is not set
++# CONFIG_HPET is not set
++# CONFIG_HANGCHECK_TIMER is not set
++# CONFIG_MMTIMER is not set
++
++#
++# TPM devices
++#
++# CONFIG_TCG_TPM is not set
++# CONFIG_TELCLOCK is not set
++
++#
++# I2C support
++#
++CONFIG_I2C=y
++CONFIG_I2C_CHARDEV=y
++
++#
++# I2C Algorithms
++#
++CONFIG_I2C_ALGOBIT=y
++CONFIG_I2C_ALGOPCF=y
++# CONFIG_I2C_ALGOPCA is not set
++
++#
++# I2C Hardware Bus support
++#
++# CONFIG_I2C_ALI1535 is not set
++# CONFIG_I2C_ALI1563 is not set
++# CONFIG_I2C_ALI15X3 is not set
++# CONFIG_I2C_AMD756 is not set
++# CONFIG_I2C_AMD8111 is not set
++# CONFIG_I2C_I801 is not set
++# CONFIG_I2C_I810 is not set
++# CONFIG_I2C_PIIX4 is not set
++# CONFIG_I2C_NFORCE2 is not set
++# CONFIG_I2C_OCORES is not set
++# CONFIG_I2C_PARPORT_LIGHT is not set
++# CONFIG_I2C_PROSAVAGE is not set
++# CONFIG_I2C_SAVAGE4 is not set
++# CONFIG_I2C_SIS5595 is not set
++# CONFIG_I2C_SIS630 is not set
++# CONFIG_I2C_SIS96X is not set
++# CONFIG_I2C_STUB is not set
++# CONFIG_I2C_VIA is not set
++# CONFIG_I2C_VIAPRO is not set
++# CONFIG_I2C_VOODOO3 is not set
++# CONFIG_I2C_PCA_ISA is not set
++
++#
++# Miscellaneous I2C Chip support
++#
++# CONFIG_SENSORS_DS1337 is not set
++# CONFIG_SENSORS_DS1374 is not set
++# CONFIG_SENSORS_EEPROM is not set
++# CONFIG_SENSORS_PCF8574 is not set
++# CONFIG_SENSORS_PCA9539 is not set
++# CONFIG_SENSORS_PCF8591 is not set
++# CONFIG_SENSORS_MAX6875 is not set
++# CONFIG_I2C_DEBUG_CORE is not set
++# CONFIG_I2C_DEBUG_ALGO is not set
++# CONFIG_I2C_DEBUG_BUS is not set
++# CONFIG_I2C_DEBUG_CHIP is not set
++
++#
++# SPI support
++#
++# CONFIG_SPI is not set
++# CONFIG_SPI_MASTER is not set
++
++#
++# Dallas's 1-wire bus
++#
++
++#
++# Hardware Monitoring support
++#
++CONFIG_HWMON=y
++# CONFIG_HWMON_VID is not set
++# CONFIG_SENSORS_ABITUGURU is not set
++# CONFIG_SENSORS_ADM1021 is not set
++# CONFIG_SENSORS_ADM1025 is not set
++# CONFIG_SENSORS_ADM1026 is not set
++# CONFIG_SENSORS_ADM1031 is not set
++# CONFIG_SENSORS_ADM9240 is not set
++# CONFIG_SENSORS_ASB100 is not set
++# CONFIG_SENSORS_ATXP1 is not set
++# CONFIG_SENSORS_DS1621 is not set
++# CONFIG_SENSORS_F71805F is not set
++# CONFIG_SENSORS_FSCHER is not set
++# CONFIG_SENSORS_FSCPOS is not set
++# CONFIG_SENSORS_GL518SM is not set
++# CONFIG_SENSORS_GL520SM is not set
++# CONFIG_SENSORS_IT87 is not set
++# CONFIG_SENSORS_LM63 is not set
++# CONFIG_SENSORS_LM75 is not set
++# CONFIG_SENSORS_LM77 is not set
++# CONFIG_SENSORS_LM78 is not set
++# CONFIG_SENSORS_LM80 is not set
++# CONFIG_SENSORS_LM83 is not set
++# CONFIG_SENSORS_LM85 is not set
++# CONFIG_SENSORS_LM87 is not set
++# CONFIG_SENSORS_LM90 is not set
++# CONFIG_SENSORS_LM92 is not set
++# CONFIG_SENSORS_MAX1619 is not set
++# CONFIG_SENSORS_PC87360 is not set
++# CONFIG_SENSORS_SIS5595 is not set
++# CONFIG_SENSORS_SMSC47M1 is not set
++# CONFIG_SENSORS_SMSC47M192 is not set
++# CONFIG_SENSORS_SMSC47B397 is not set
++# CONFIG_SENSORS_VIA686A is not set
++# CONFIG_SENSORS_VT8231 is not set
++# CONFIG_SENSORS_W83781D is not set
++# CONFIG_SENSORS_W83791D is not set
++# CONFIG_SENSORS_W83792D is not set
++# CONFIG_SENSORS_W83L785TS is not set
++# CONFIG_SENSORS_W83627HF is not set
++# CONFIG_SENSORS_W83627EHF is not set
++# CONFIG_HWMON_DEBUG_CHIP is not set
++
++#
++# Misc devices
++#
++
++#
++# Multimedia devices
++#
++CONFIG_VIDEO_DEV=y
++CONFIG_VIDEO_V4L1=y
++CONFIG_VIDEO_V4L1_COMPAT=y
++CONFIG_VIDEO_V4L2=y
++
++#
++# Video Capture Adapters
++#
++
++#
++# Video Capture Adapters
++#
++# CONFIG_VIDEO_ADV_DEBUG is not set
++# CONFIG_VIDEO_VIVI is not set
++# CONFIG_VIDEO_BT848 is not set
++# CONFIG_VIDEO_CPIA is not set
++# CONFIG_VIDEO_CPIA2 is not set
++# CONFIG_VIDEO_SAA5246A is not set
++# CONFIG_VIDEO_SAA5249 is not set
++# CONFIG_TUNER_3036 is not set
++# CONFIG_VIDEO_STRADIS is not set
++# CONFIG_VIDEO_ZORAN is not set
++# CONFIG_VIDEO_SAA7134 is not set
++# CONFIG_VIDEO_MXB is not set
++# CONFIG_VIDEO_DPC is not set
++# CONFIG_VIDEO_HEXIUM_ORION is not set
++# CONFIG_VIDEO_HEXIUM_GEMINI is not set
++# CONFIG_VIDEO_CX88 is not set
++
++#
++# Encoders and Decoders
++#
++# CONFIG_VIDEO_MSP3400 is not set
++# CONFIG_VIDEO_CS53L32A is not set
++# CONFIG_VIDEO_TLV320AIC23B is not set
++# CONFIG_VIDEO_WM8775 is not set
++# CONFIG_VIDEO_WM8739 is not set
++# CONFIG_VIDEO_CX2341X is not set
++# CONFIG_VIDEO_CX25840 is not set
++# CONFIG_VIDEO_SAA711X is not set
++# CONFIG_VIDEO_SAA7127 is not set
++# CONFIG_VIDEO_UPD64031A is not set
++# CONFIG_VIDEO_UPD64083 is not set
++
++#
++# V4L USB devices
++#
++# CONFIG_VIDEO_PVRUSB2 is not set
++# CONFIG_VIDEO_EM28XX is not set
++# CONFIG_USB_VICAM is not set
++# CONFIG_USB_IBMCAM is not set
++# CONFIG_USB_KONICAWC is not set
++# CONFIG_USB_QUICKCAM_MESSENGER is not set
++# CONFIG_USB_ET61X251 is not set
++# CONFIG_VIDEO_OVCAMCHIP is not set
++# CONFIG_USB_W9968CF is not set
++# CONFIG_USB_OV511 is not set
++# CONFIG_USB_SE401 is not set
++# CONFIG_USB_SN9C102 is not set
++# CONFIG_USB_STV680 is not set
++# CONFIG_USB_ZC0301 is not set
++# CONFIG_USB_PWC is not set
++
++#
++# Radio Adapters
++#
++# CONFIG_RADIO_GEMTEK_PCI is not set
++# CONFIG_RADIO_MAXIRADIO is not set
++# CONFIG_RADIO_MAESTRO is not set
++# CONFIG_USB_DSBR is not set
++
++#
++# Digital Video Broadcasting Devices
++#
++# CONFIG_DVB is not set
++# CONFIG_USB_DABUSB is not set
++
++#
++# Graphics support
++#
++CONFIG_FIRMWARE_EDID=y
++CONFIG_FB=y
++CONFIG_FB_CFB_FILLRECT=y
++CONFIG_FB_CFB_COPYAREA=y
++CONFIG_FB_CFB_IMAGEBLIT=y
++# CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
++CONFIG_FB_MODE_HELPERS=y
++# CONFIG_FB_TILEBLITTING is not set
++# CONFIG_FB_CIRRUS is not set
++# CONFIG_FB_PM2 is not set
++# CONFIG_FB_CYBER2000 is not set
++# CONFIG_FB_ASILIANT is not set
++# CONFIG_FB_IMSTT is not set
++# CONFIG_FB_S1D13XXX is not set
++# CONFIG_FB_NVIDIA is not set
++# CONFIG_FB_RIVA is not set
++# CONFIG_FB_MATROX is not set
++# CONFIG_FB_RADEON is not set
++# CONFIG_FB_ATY128 is not set
++# CONFIG_FB_ATY is not set
++# CONFIG_FB_SAVAGE is not set
++# CONFIG_FB_SIS is not set
++# CONFIG_FB_NEOMAGIC is not set
++# CONFIG_FB_KYRO is not set
++# CONFIG_FB_3DFX is not set
++# CONFIG_FB_VOODOO1 is not set
++# CONFIG_FB_TRIDENT is not set
++# CONFIG_FB_VIRTUAL is not set
++
++#
++# Console display driver support
++#
++CONFIG_VGA_CONSOLE=y
++# CONFIG_VGACON_SOFT_SCROLLBACK is not set
++CONFIG_DUMMY_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE=y
++# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
++# CONFIG_FONTS is not set
++CONFIG_FONT_8x8=y
++CONFIG_FONT_8x16=y
++
++#
++# Logo configuration
++#
++CONFIG_LOGO=y
++# CONFIG_LOGO_LINUX_MONO is not set
++# CONFIG_LOGO_LINUX_VGA16 is not set
++CONFIG_LOGO_LINUX_CLUT224=y
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Sound
++#
++CONFIG_SOUND=y
++
++#
++# Advanced Linux Sound Architecture
++#
++CONFIG_SND=y
++CONFIG_SND_TIMER=y
++CONFIG_SND_PCM=y
++CONFIG_SND_HWDEP=y
++CONFIG_SND_RAWMIDI=y
++CONFIG_SND_SEQUENCER=y
++CONFIG_SND_SEQ_DUMMY=y
++CONFIG_SND_OSSEMUL=y
++CONFIG_SND_MIXER_OSS=y
++CONFIG_SND_PCM_OSS=y
++CONFIG_SND_PCM_OSS_PLUGINS=y
++CONFIG_SND_SEQUENCER_OSS=y
++# CONFIG_SND_DYNAMIC_MINORS is not set
++CONFIG_SND_SUPPORT_OLD_API=y
++CONFIG_SND_VERBOSE_PROCFS=y
++# CONFIG_SND_VERBOSE_PRINTK is not set
++# CONFIG_SND_DEBUG is not set
++
++#
++# Generic devices
++#
++CONFIG_SND_MPU401_UART=y
++CONFIG_SND_OPL3_LIB=y
++CONFIG_SND_AC97_CODEC=y
++CONFIG_SND_AC97_BUS=y
++CONFIG_SND_DUMMY=y
++CONFIG_SND_VIRMIDI=y
++# CONFIG_SND_MTPAV is not set
++CONFIG_SND_SERIAL_U16550=y
++CONFIG_SND_MPU401=y
++
++#
++# PCI devices
++#
++# CONFIG_SND_AD1889 is not set
++# CONFIG_SND_ALS300 is not set
++# CONFIG_SND_ALI5451 is not set
++CONFIG_SND_ATIIXP=y
++# CONFIG_SND_ATIIXP_MODEM is not set
++# CONFIG_SND_AU8810 is not set
++# CONFIG_SND_AU8820 is not set
++# CONFIG_SND_AU8830 is not set
++# CONFIG_SND_AZT3328 is not set
++# CONFIG_SND_BT87X is not set
++# CONFIG_SND_CA0106 is not set
++# CONFIG_SND_CMIPCI is not set
++# CONFIG_SND_CS4281 is not set
++# CONFIG_SND_CS46XX is not set
++# CONFIG_SND_DARLA20 is not set
++# CONFIG_SND_GINA20 is not set
++# CONFIG_SND_LAYLA20 is not set
++# CONFIG_SND_DARLA24 is not set
++# CONFIG_SND_GINA24 is not set
++# CONFIG_SND_LAYLA24 is not set
++# CONFIG_SND_MONA is not set
++# CONFIG_SND_MIA is not set
++# CONFIG_SND_ECHO3G is not set
++# CONFIG_SND_INDIGO is not set
++# CONFIG_SND_INDIGOIO is not set
++# CONFIG_SND_INDIGODJ is not set
++# CONFIG_SND_EMU10K1 is not set
++# CONFIG_SND_EMU10K1X is not set
++# CONFIG_SND_ENS1370 is not set
++# CONFIG_SND_ENS1371 is not set
++# CONFIG_SND_ES1938 is not set
++# CONFIG_SND_ES1968 is not set
++CONFIG_SND_FM801=y
++# CONFIG_SND_FM801_TEA575X_BOOL is not set
++# CONFIG_SND_HDA_INTEL is not set
++# CONFIG_SND_HDSP is not set
++# CONFIG_SND_HDSPM is not set
++# CONFIG_SND_ICE1712 is not set
++# CONFIG_SND_ICE1724 is not set
++# CONFIG_SND_INTEL8X0 is not set
++# CONFIG_SND_INTEL8X0M is not set
++# CONFIG_SND_KORG1212 is not set
++# CONFIG_SND_MAESTRO3 is not set
++# CONFIG_SND_MIXART is not set
++# CONFIG_SND_NM256 is not set
++# CONFIG_SND_PCXHR is not set
++# CONFIG_SND_RIPTIDE is not set
++# CONFIG_SND_RME32 is not set
++# CONFIG_SND_RME96 is not set
++# CONFIG_SND_RME9652 is not set
++# CONFIG_SND_SONICVIBES is not set
++# CONFIG_SND_TRIDENT is not set
++# CONFIG_SND_VIA82XX is not set
++# CONFIG_SND_VIA82XX_MODEM is not set
++# CONFIG_SND_VX222 is not set
++# CONFIG_SND_YMFPCI is not set
++
++#
++# USB devices
++#
++# CONFIG_SND_USB_AUDIO is not set
++
++#
++# Open Sound System
++#
++CONFIG_SOUND_PRIME=y
++# CONFIG_OSS_OBSOLETE_DRIVER is not set
++# CONFIG_SOUND_BT878 is not set
++# CONFIG_SOUND_ES1371 is not set
++# CONFIG_SOUND_ICH is not set
++# CONFIG_SOUND_TRIDENT is not set
++# CONFIG_SOUND_MSNDCLAS is not set
++# CONFIG_SOUND_MSNDPIN is not set
++# CONFIG_SOUND_VIA82CXXX is not set
++# CONFIG_SOUND_TVMIXER is not set
++
++#
++# USB support
++#
++CONFIG_USB_ARCH_HAS_HCD=y
++CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
++CONFIG_USB=y
++# CONFIG_USB_DEBUG is not set
++
++#
++# Miscellaneous USB options
++#
++CONFIG_USB_DEVICEFS=y
++CONFIG_USB_BANDWIDTH=y
++# CONFIG_USB_DYNAMIC_MINORS is not set
++# CONFIG_USB_SUSPEND is not set
++# CONFIG_USB_OTG is not set
++
++#
++# USB Host Controller Drivers
++#
++CONFIG_USB_EHCI_HCD=y
++# CONFIG_USB_EHCI_SPLIT_ISO is not set
++# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
++# CONFIG_USB_EHCI_TT_NEWSCHED is not set
++# CONFIG_USB_ISP116X_HCD is not set
++CONFIG_USB_OHCI_HCD=y
++# CONFIG_USB_OHCI_BIG_ENDIAN is not set
++CONFIG_USB_OHCI_LITTLE_ENDIAN=y
++CONFIG_USB_UHCI_HCD=y
++# CONFIG_USB_SL811_HCD is not set
++
++#
++# USB Device Class drivers
++#
++# CONFIG_USB_ACM is not set
++# CONFIG_USB_PRINTER is not set
++
++#
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
++#
++
++#
++# may also be needed; see USB_STORAGE Help for more information
++#
++CONFIG_USB_STORAGE=y
++# CONFIG_USB_STORAGE_DEBUG is not set
++# CONFIG_USB_STORAGE_DATAFAB is not set
++# CONFIG_USB_STORAGE_FREECOM is not set
++# CONFIG_USB_STORAGE_ISD200 is not set
++# CONFIG_USB_STORAGE_DPCM is not set
++# CONFIG_USB_STORAGE_USBAT is not set
++# CONFIG_USB_STORAGE_SDDR09 is not set
++# CONFIG_USB_STORAGE_SDDR55 is not set
++# CONFIG_USB_STORAGE_JUMPSHOT is not set
++# CONFIG_USB_STORAGE_ALAUDA is not set
++# CONFIG_USB_LIBUSUAL is not set
++
++#
++# USB Input Devices
++#
++CONFIG_USB_HID=y
++CONFIG_USB_HIDINPUT=y
++# CONFIG_USB_HIDINPUT_POWERBOOK is not set
++# CONFIG_HID_FF is not set
++CONFIG_USB_HIDDEV=y
++# CONFIG_USB_AIPTEK is not set
++# CONFIG_USB_WACOM is not set
++# CONFIG_USB_ACECAD is not set
++# CONFIG_USB_KBTAB is not set
++# CONFIG_USB_POWERMATE is not set
++# CONFIG_USB_TOUCHSCREEN is not set
++# CONFIG_USB_YEALINK is not set
++# CONFIG_USB_XPAD is not set
++# CONFIG_USB_ATI_REMOTE is not set
++# CONFIG_USB_ATI_REMOTE2 is not set
++# CONFIG_USB_KEYSPAN_REMOTE is not set
++# CONFIG_USB_APPLETOUCH is not set
++
++#
++# USB Imaging devices
++#
++# CONFIG_USB_MDC800 is not set
++# CONFIG_USB_MICROTEK is not set
++
++#
++# USB Network Adapters
++#
++# CONFIG_USB_CATC is not set
++# CONFIG_USB_KAWETH is not set
++# CONFIG_USB_PEGASUS is not set
++# CONFIG_USB_RTL8150 is not set
++# CONFIG_USB_USBNET is not set
++CONFIG_USB_MON=y
++
++#
++# USB port drivers
++#
++
++#
++# USB Serial Converter support
++#
++# CONFIG_USB_SERIAL is not set
++
++#
++# USB Miscellaneous drivers
++#
++# CONFIG_USB_EMI62 is not set
++# CONFIG_USB_EMI26 is not set
++# CONFIG_USB_AUERSWALD is not set
++# CONFIG_USB_RIO500 is not set
++# CONFIG_USB_LEGOTOWER is not set
++# CONFIG_USB_LCD is not set
++# CONFIG_USB_LED is not set
++# CONFIG_USB_CYPRESS_CY7C63 is not set
++# CONFIG_USB_CYTHERM is not set
++# CONFIG_USB_PHIDGETKIT is not set
++# CONFIG_USB_PHIDGETSERVO is not set
++# CONFIG_USB_IDMOUSE is not set
++# CONFIG_USB_APPLEDISPLAY is not set
++# CONFIG_USB_SISUSBVGA is not set
++# CONFIG_USB_LD is not set
++# CONFIG_USB_TEST is not set
++
++#
++# USB DSL modem support
++#
++
++#
++# USB Gadget Support
++#
++# CONFIG_USB_GADGET is not set
++
++#
++# MMC/SD Card support
++#
++# CONFIG_MMC is not set
++
++#
++# LED devices
++#
++# CONFIG_NEW_LEDS is not set
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++
++#
++# InfiniBand support
++#
++# CONFIG_INFINIBAND is not set
++
++#
++# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
++#
++
++#
++# Real Time Clock
++#
++# CONFIG_RTC_CLASS is not set
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
++#
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++CONFIG_EXT2_FS_XATTR=y
++CONFIG_EXT2_FS_POSIX_ACL=y
++CONFIG_EXT2_FS_SECURITY=y
++# CONFIG_EXT2_FS_XIP is not set
++CONFIG_EXT3_FS=y
++CONFIG_EXT3_FS_XATTR=y
++CONFIG_EXT3_FS_POSIX_ACL=y
++CONFIG_EXT3_FS_SECURITY=y
++CONFIG_JBD=y
++# CONFIG_JBD_DEBUG is not set
++CONFIG_FS_MBCACHE=y
++CONFIG_REISERFS_FS=y
++# CONFIG_REISERFS_CHECK is not set
++# CONFIG_REISERFS_PROC_INFO is not set
++CONFIG_REISERFS_FS_XATTR=y
++CONFIG_REISERFS_FS_POSIX_ACL=y
++CONFIG_REISERFS_FS_SECURITY=y
++# CONFIG_JFS_FS is not set
++CONFIG_FS_POSIX_ACL=y
++CONFIG_XFS_FS=y
++# CONFIG_XFS_QUOTA is not set
++# CONFIG_XFS_SECURITY is not set
++# CONFIG_XFS_POSIX_ACL is not set
++# CONFIG_XFS_RT is not set
++# CONFIG_OCFS2_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_ROMFS_FS is not set
++CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
++# CONFIG_QUOTA is not set
++CONFIG_DNOTIFY=y
++CONFIG_AUTOFS_FS=y
++CONFIG_AUTOFS4_FS=y
++# CONFIG_FUSE_FS is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=y
++CONFIG_JOLIET=y
++# CONFIG_ZISOFS is not set
++CONFIG_UDF_FS=y
++CONFIG_UDF_NLS=y
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=y
++CONFIG_MSDOS_FS=y
++CONFIG_VFAT_FS=y
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_KCORE=y
++CONFIG_PROC_IOMEM_MACHINE=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_RAMFS=y
++# CONFIG_CONFIGFS_FS is not set
++
++#
++# Miscellaneous filesystems
++#
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++# CONFIG_CRAMFS is not set
++# CONFIG_VXFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++
++#
++# Network File Systems
++#
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3=y
++# CONFIG_NFS_V3_ACL is not set
++CONFIG_NFS_V4=y
++CONFIG_NFS_DIRECTIO=y
++CONFIG_NFSD=y
++CONFIG_NFSD_V3=y
++# CONFIG_NFSD_V3_ACL is not set
++CONFIG_NFSD_V4=y
++CONFIG_NFSD_TCP=y
++CONFIG_ROOT_NFS=y
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_EXPORTFS=y
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++CONFIG_SUNRPC_GSS=y
++CONFIG_RPCSEC_GSS_KRB5=y
++# CONFIG_RPCSEC_GSS_SPKM3 is not set
++CONFIG_SMB_FS=y
++CONFIG_SMB_NLS_DEFAULT=y
++CONFIG_SMB_NLS_REMOTE="cp437"
++CONFIG_CIFS=y
++# CONFIG_CIFS_STATS is not set
++# CONFIG_CIFS_WEAK_PW_HASH is not set
++# CONFIG_CIFS_XATTR is not set
++# CONFIG_CIFS_DEBUG2 is not set
++# CONFIG_CIFS_EXPERIMENTAL is not set
++# CONFIG_NCP_FS is not set
++# CONFIG_CODA_FS is not set
++# CONFIG_AFS_FS is not set
++# CONFIG_9P_FS is not set
++
++#
++# Partition Types
++#
++CONFIG_PARTITION_ADVANCED=y
++# CONFIG_ACORN_PARTITION is not set
++# CONFIG_OSF_PARTITION is not set
++# CONFIG_AMIGA_PARTITION is not set
++# CONFIG_ATARI_PARTITION is not set
++# CONFIG_MAC_PARTITION is not set
++CONFIG_MSDOS_PARTITION=y
++# CONFIG_BSD_DISKLABEL is not set
++# CONFIG_MINIX_SUBPARTITION is not set
++# CONFIG_SOLARIS_X86_PARTITION is not set
++# CONFIG_UNIXWARE_DISKLABEL is not set
++# CONFIG_LDM_PARTITION is not set
++CONFIG_SGI_PARTITION=y
++# CONFIG_ULTRIX_PARTITION is not set
++# CONFIG_SUN_PARTITION is not set
++# CONFIG_KARMA_PARTITION is not set
++CONFIG_EFI_PARTITION=y
++
++#
++# Native Language Support
++#
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="iso8859-1"
++CONFIG_NLS_CODEPAGE_437=y
++CONFIG_NLS_CODEPAGE_737=y
++CONFIG_NLS_CODEPAGE_775=y
++CONFIG_NLS_CODEPAGE_850=y
++CONFIG_NLS_CODEPAGE_852=y
++CONFIG_NLS_CODEPAGE_855=y
++CONFIG_NLS_CODEPAGE_857=y
++CONFIG_NLS_CODEPAGE_860=y
++CONFIG_NLS_CODEPAGE_861=y
++CONFIG_NLS_CODEPAGE_862=y
++CONFIG_NLS_CODEPAGE_863=y
++CONFIG_NLS_CODEPAGE_864=y
++CONFIG_NLS_CODEPAGE_865=y
++CONFIG_NLS_CODEPAGE_866=y
++CONFIG_NLS_CODEPAGE_869=y
++CONFIG_NLS_CODEPAGE_936=y
++CONFIG_NLS_CODEPAGE_950=y
++CONFIG_NLS_CODEPAGE_932=y
++CONFIG_NLS_CODEPAGE_949=y
++CONFIG_NLS_CODEPAGE_874=y
++CONFIG_NLS_ISO8859_8=y
++# CONFIG_NLS_CODEPAGE_1250 is not set
++CONFIG_NLS_CODEPAGE_1251=y
++# CONFIG_NLS_ASCII is not set
++CONFIG_NLS_ISO8859_1=y
++CONFIG_NLS_ISO8859_2=y
++CONFIG_NLS_ISO8859_3=y
++CONFIG_NLS_ISO8859_4=y
++CONFIG_NLS_ISO8859_5=y
++CONFIG_NLS_ISO8859_6=y
++CONFIG_NLS_ISO8859_7=y
++CONFIG_NLS_ISO8859_9=y
++CONFIG_NLS_ISO8859_13=y
++CONFIG_NLS_ISO8859_14=y
++CONFIG_NLS_ISO8859_15=y
++CONFIG_NLS_KOI8_R=y
++CONFIG_NLS_KOI8_U=y
++CONFIG_NLS_UTF8=y
++
++#
++# Library routines
++#
++# CONFIG_CRC_CCITT is not set
++# CONFIG_CRC16 is not set
++CONFIG_CRC32=y
++# CONFIG_LIBCRC32C is not set
++CONFIG_PLIST=y
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_GENERIC_PENDING_IRQ=y
++CONFIG_IRQ_PER_CPU=y
++
++#
++# HP Simulator drivers
++#
++# CONFIG_HP_SIMETH is not set
++# CONFIG_HP_SIMSERIAL is not set
++# CONFIG_HP_SIMSCSI is not set
++
++#
++# Instrumentation Support
++#
++# CONFIG_PROFILING is not set
++# CONFIG_KPROBES is not set
++
++#
++# Kernel hacking
++#
++# CONFIG_PRINTK_TIME is not set
++CONFIG_MAGIC_SYSRQ=y
++CONFIG_UNUSED_SYMBOLS=y
++CONFIG_DEBUG_KERNEL=y
++CONFIG_LOG_BUF_SHIFT=20
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_SCHEDSTATS is not set
++# CONFIG_DEBUG_SLAB is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++CONFIG_DEBUG_MUTEXES=y
++# CONFIG_DEBUG_RWSEMS is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++# CONFIG_DEBUG_INFO is not set
++# CONFIG_DEBUG_FS is not set
++# CONFIG_DEBUG_VM is not set
++CONFIG_FORCED_INLINING=y
++# CONFIG_RCU_TORTURE_TEST is not set
++CONFIG_IA64_GRANULE_16MB=y
++# CONFIG_IA64_GRANULE_64MB is not set
++CONFIG_IA64_PRINT_HAZARDS=y
++# CONFIG_DISABLE_VHPT is not set
++# CONFIG_IA64_DEBUG_CMPXCHG is not set
++# CONFIG_IA64_DEBUG_IRQ is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++
++#
++# Cryptographic options
++#
++CONFIG_CRYPTO=y
++# CONFIG_CRYPTO_HMAC is not set
++# CONFIG_CRYPTO_NULL is not set
++# CONFIG_CRYPTO_MD4 is not set
++CONFIG_CRYPTO_MD5=y
++# CONFIG_CRYPTO_SHA1 is not set
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_WP512 is not set
++# CONFIG_CRYPTO_TGR192 is not set
++CONFIG_CRYPTO_DES=y
++# CONFIG_CRYPTO_BLOWFISH is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++# CONFIG_CRYPTO_SERPENT is not set
++# CONFIG_CRYPTO_AES is not set
++# CONFIG_CRYPTO_CAST5 is not set
++# CONFIG_CRYPTO_CAST6 is not set
++# CONFIG_CRYPTO_TEA is not set
++# CONFIG_CRYPTO_ARC4 is not set
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_ANUBIS is not set
++# CONFIG_CRYPTO_DEFLATE is not set
++# CONFIG_CRYPTO_MICHAEL_MIC is not set
++# CONFIG_CRYPTO_CRC32C is not set
++# CONFIG_CRYPTO_TEST is not set
++
++#
++# Hardware crypto devices
++#
++# CONFIG_XEN_SMPBOOT is not set
++# CONFIG_XEN_DEVMEM is not set
++CONFIG_XEN_INTERFACE_VERSION=0x00030207
++
++#
++# XEN
++#
++CONFIG_XEN_PRIVILEGED_GUEST=y
++# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
++CONFIG_XEN_PRIVCMD=y
++CONFIG_XEN_XENBUS_DEV=y
++CONFIG_XEN_BACKEND=y
++CONFIG_XEN_BLKDEV_BACKEND=y
++CONFIG_XEN_BLKDEV_TAP=y
++CONFIG_XEN_NETDEV_BACKEND=y
++# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
++# CONFIG_XEN_NETDEV_LOOPBACK is not set
++CONFIG_XEN_PCIDEV_BACKEND=y
++# CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set
++# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
++# CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
++CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER=y
++# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
++CONFIG_XEN_TPMDEV_BACKEND=m
++CONFIG_XEN_BLKDEV_FRONTEND=y
++CONFIG_XEN_NETDEV_FRONTEND=y
++CONFIG_XEN_GRANT_DEV=y
++CONFIG_XEN_FRAMEBUFFER=y
++CONFIG_XEN_KEYBOARD=y
++# CONFIG_XEN_SCRUB_PAGES is not set
++CONFIG_XEN_DISABLE_SERIAL=y
++CONFIG_XEN_SYSFS=y
++CONFIG_XEN_COMPAT_030002_AND_LATER=y
++# CONFIG_XEN_COMPAT_030004_AND_LATER is not set
++# CONFIG_XEN_COMPAT_030100_AND_LATER is not set
++# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
++CONFIG_XEN_COMPAT=0x030002
++CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
++CONFIG_NO_IDLE_HZ=y
++CONFIG_XEN_BALLOON=y
++CONFIG_XEN_XENCOMM=y
+diff -rpuN linux-2.6.18.8/buildconfigs/linux-defconfig_xen_x86_32 linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xen_x86_32
+--- linux-2.6.18.8/buildconfigs/linux-defconfig_xen_x86_32 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xen_x86_32 2008-02-15 16:21:56.000000000 -0800
+@@ -0,0 +1,3318 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.18.8
++# Mon Oct 15 14:37:47 2007
++#
++CONFIG_X86_32=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_SEMAPHORE_SLEEPERS=y
++CONFIG_X86=y
++CONFIG_MMU=y
++CONFIG_GENERIC_ISA_DMA=y
++CONFIG_GENERIC_IOMAP=y
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_ARCH_MAY_HAVE_PC_FDC=y
++CONFIG_DMI=y
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# Code maturity level options
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION=""
++# CONFIG_LOCALVERSION_AUTO is not set
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++CONFIG_POSIX_MQUEUE=y
++CONFIG_BSD_PROCESS_ACCT=y
++CONFIG_BSD_PROCESS_ACCT_V3=y
++CONFIG_TASKSTATS=y
++CONFIG_TASK_DELAY_ACCT=y
++CONFIG_AUDIT=y
++CONFIG_AUDITSYSCALL=y
++CONFIG_IKCONFIG=y
++CONFIG_IKCONFIG_PROC=y
++CONFIG_CPUSETS=y
++# CONFIG_RELAY is not set
++CONFIG_INITRAMFS_SOURCE=""
++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
++# CONFIG_EMBEDDED is not set
++CONFIG_UID16=y
++CONFIG_SYSCTL=y
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++# CONFIG_KALLSYMS_EXTRA_PASS is not set
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SHMEM=y
++CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_RT_MUTEXES=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++# CONFIG_SLOB is not set
++
++#
++# Loadable module support
++#
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++CONFIG_MODULE_FORCE_UNLOAD=y
++CONFIG_MODVERSIONS=y
++CONFIG_MODULE_SRCVERSION_ALL=y
++CONFIG_KMOD=y
++CONFIG_STOP_MACHINE=y
++
++#
++# Block layer
++#
++CONFIG_LBD=y
++# CONFIG_BLK_DEV_IO_TRACE is not set
++CONFIG_LSF=y
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++# CONFIG_DEFAULT_AS is not set
++# CONFIG_DEFAULT_DEADLINE is not set
++CONFIG_DEFAULT_CFQ=y
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="cfq"
++
++#
++# Processor type and features
++#
++CONFIG_SMP=y
++# CONFIG_X86_PC is not set
++CONFIG_X86_XEN=y
++# CONFIG_X86_ELAN is not set
++# CONFIG_X86_VOYAGER is not set
++# CONFIG_X86_NUMAQ is not set
++# CONFIG_X86_SUMMIT is not set
++# CONFIG_X86_BIGSMP is not set
++# CONFIG_X86_VISWS is not set
++# CONFIG_X86_GENERICARCH is not set
++# CONFIG_X86_ES7000 is not set
++# CONFIG_M386 is not set
++# CONFIG_M486 is not set
++# CONFIG_M586 is not set
++# CONFIG_M586TSC is not set
++# CONFIG_M586MMX is not set
++CONFIG_M686=y
++# CONFIG_MPENTIUMII is not set
++# CONFIG_MPENTIUMIII is not set
++# CONFIG_MPENTIUMM is not set
++# CONFIG_MPENTIUM4 is not set
++# CONFIG_MK6 is not set
++# CONFIG_MK7 is not set
++# CONFIG_MK8 is not set
++# CONFIG_MCRUSOE is not set
++# CONFIG_MEFFICEON is not set
++# CONFIG_MWINCHIPC6 is not set
++# CONFIG_MWINCHIP2 is not set
++# CONFIG_MWINCHIP3D is not set
++# CONFIG_MGEODEGX1 is not set
++# CONFIG_MGEODE_LX is not set
++# CONFIG_MCYRIXIII is not set
++# CONFIG_MVIAC3_2 is not set
++CONFIG_X86_GENERIC=y
++CONFIG_X86_CMPXCHG=y
++CONFIG_X86_XADD=y
++CONFIG_X86_L1_CACHE_SHIFT=7
++CONFIG_RWSEM_XCHGADD_ALGORITHM=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_X86_PPRO_FENCE=y
++CONFIG_X86_WP_WORKS_OK=y
++CONFIG_X86_INVLPG=y
++CONFIG_X86_BSWAP=y
++CONFIG_X86_POPAD_OK=y
++CONFIG_X86_CMPXCHG64=y
++CONFIG_X86_GOOD_APIC=y
++CONFIG_X86_INTEL_USERCOPY=y
++CONFIG_X86_USE_PPRO_CHECKSUM=y
++CONFIG_NR_CPUS=32
++# CONFIG_PREEMPT_NONE is not set
++CONFIG_PREEMPT_VOLUNTARY=y
++# CONFIG_PREEMPT is not set
++CONFIG_PREEMPT_BKL=y
++CONFIG_X86_LOCAL_APIC=y
++CONFIG_X86_IO_APIC=y
++CONFIG_VM86=y
++# CONFIG_TOSHIBA is not set
++# CONFIG_I8K is not set
++# CONFIG_X86_REBOOTFIXUPS is not set
++CONFIG_MICROCODE=y
++CONFIG_X86_MSR=y
++CONFIG_X86_CPUID=m
++CONFIG_SWIOTLB=y
++
++#
++# Firmware Drivers
++#
++CONFIG_EDD=y
++CONFIG_DELL_RBU=m
++CONFIG_DCDBAS=m
++# CONFIG_NOHIGHMEM is not set
++CONFIG_HIGHMEM4G=y
++# CONFIG_HIGHMEM64G is not set
++CONFIG_PAGE_OFFSET=0xC0000000
++CONFIG_HIGHMEM=y
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++# CONFIG_SPARSEMEM_STATIC is not set
++CONFIG_SPLIT_PTLOCK_CPUS=4
++CONFIG_RESOURCES_64BIT=y
++# CONFIG_HIGHPTE is not set
++CONFIG_MTRR=y
++CONFIG_REGPARM=y
++CONFIG_SECCOMP=y
++CONFIG_HZ_100=y
++# CONFIG_HZ_250 is not set
++# CONFIG_HZ_1000 is not set
++CONFIG_HZ=100
++CONFIG_KEXEC=y
++# CONFIG_CRASH_DUMP is not set
++CONFIG_PHYSICAL_START=0x100000
++CONFIG_HOTPLUG_CPU=y
++CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
++
++#
++# Power management options (ACPI, APM)
++#
++CONFIG_PM=y
++# CONFIG_PM_LEGACY is not set
++CONFIG_PM_DEBUG=y
++# CONFIG_PM_TRACE is not set
++# CONFIG_SOFTWARE_SUSPEND is not set
++CONFIG_SUSPEND_SMP=y
++
++#
++# ACPI (Advanced Configuration and Power Interface) Support
++#
++CONFIG_ACPI=y
++CONFIG_ACPI_SLEEP=y
++CONFIG_ACPI_SLEEP_PROC_FS=y
++# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
++CONFIG_ACPI_AC=m
++CONFIG_ACPI_BATTERY=m
++CONFIG_ACPI_BUTTON=m
++CONFIG_ACPI_VIDEO=m
++CONFIG_ACPI_HOTKEY=m
++CONFIG_ACPI_FAN=m
++CONFIG_ACPI_DOCK=m
++CONFIG_ACPI_PROCESSOR=m
++CONFIG_ACPI_HOTPLUG_CPU=y
++CONFIG_ACPI_THERMAL=m
++CONFIG_ACPI_ASUS=m
++CONFIG_ACPI_IBM=m
++CONFIG_ACPI_TOSHIBA=m
++CONFIG_ACPI_BLACKLIST_YEAR=0
++# CONFIG_ACPI_DEBUG is not set
++CONFIG_ACPI_EC=y
++CONFIG_ACPI_POWER=y
++CONFIG_ACPI_SYSTEM=y
++CONFIG_ACPI_CONTAINER=m
++CONFIG_ACPI_SBS=m
++CONFIG_ACPI_PV_SLEEP=y
++
++#
++# CPU Frequency scaling
++#
++# CONFIG_CPU_FREQ is not set
++
++#
++# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
++#
++CONFIG_PCI=y
++# CONFIG_PCI_GOBIOS is not set
++# CONFIG_PCI_GOMMCONFIG is not set
++# CONFIG_PCI_GODIRECT is not set
++# CONFIG_PCI_GOXEN_FE is not set
++CONFIG_PCI_GOANY=y
++CONFIG_PCI_DIRECT=y
++CONFIG_PCI_MMCONFIG=y
++CONFIG_XEN_PCIDEV_FRONTEND=y
++# CONFIG_XEN_PCIDEV_FE_DEBUG is not set
++# CONFIG_PCIEPORTBUS is not set
++# CONFIG_PCI_DEBUG is not set
++CONFIG_ISA_DMA_API=y
++CONFIG_SCx200=m
++CONFIG_K8_NB=y
++
++#
++# PCCARD (PCMCIA/CardBus) support
++#
++CONFIG_PCCARD=m
++# CONFIG_PCMCIA_DEBUG is not set
++CONFIG_PCMCIA=m
++CONFIG_PCMCIA_LOAD_CIS=y
++CONFIG_PCMCIA_IOCTL=y
++CONFIG_CARDBUS=y
++
++#
++# PC-card bridges
++#
++CONFIG_YENTA=m
++CONFIG_YENTA_O2=y
++CONFIG_YENTA_RICOH=y
++CONFIG_YENTA_TI=y
++CONFIG_YENTA_ENE_TUNE=y
++CONFIG_YENTA_TOSHIBA=y
++CONFIG_PD6729=m
++CONFIG_I82092=m
++CONFIG_PCCARD_NONSTATIC=m
++
++#
++# PCI Hotplug Support
++#
++CONFIG_HOTPLUG_PCI=m
++CONFIG_HOTPLUG_PCI_FAKE=m
++CONFIG_HOTPLUG_PCI_ACPI=m
++CONFIG_HOTPLUG_PCI_ACPI_IBM=m
++CONFIG_HOTPLUG_PCI_CPCI=y
++CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
++CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
++CONFIG_HOTPLUG_PCI_SHPC=m
++# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
++
++#
++# Executable file formats
++#
++CONFIG_BINFMT_ELF=y
++CONFIG_BINFMT_AOUT=m
++CONFIG_BINFMT_MISC=m
++
++#
++# Networking
++#
++CONFIG_NET=y
++
++#
++# Networking options
++#
++# CONFIG_NETDEBUG is not set
++CONFIG_PACKET=y
++CONFIG_PACKET_MMAP=y
++CONFIG_UNIX=y
++CONFIG_XFRM=y
++CONFIG_XFRM_USER=m
++CONFIG_NET_KEY=m
++CONFIG_INET=y
++CONFIG_IP_MULTICAST=y
++CONFIG_IP_ADVANCED_ROUTER=y
++CONFIG_ASK_IP_FIB_HASH=y
++# CONFIG_IP_FIB_TRIE is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_MULTIPLE_TABLES=y
++CONFIG_IP_ROUTE_FWMARK=y
++CONFIG_IP_ROUTE_MULTIPATH=y
++# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
++CONFIG_IP_ROUTE_VERBOSE=y
++# CONFIG_IP_PNP is not set
++CONFIG_NET_IPIP=m
++CONFIG_NET_IPGRE=m
++CONFIG_NET_IPGRE_BROADCAST=y
++CONFIG_IP_MROUTE=y
++CONFIG_IP_PIMSM_V1=y
++CONFIG_IP_PIMSM_V2=y
++# CONFIG_ARPD is not set
++CONFIG_SYN_COOKIES=y
++CONFIG_INET_AH=m
++CONFIG_INET_ESP=m
++CONFIG_INET_IPCOMP=m
++CONFIG_INET_XFRM_TUNNEL=m
++CONFIG_INET_TUNNEL=m
++CONFIG_INET_XFRM_MODE_TRANSPORT=m
++CONFIG_INET_XFRM_MODE_TUNNEL=m
++CONFIG_INET_DIAG=m
++CONFIG_INET_TCP_DIAG=m
++CONFIG_TCP_CONG_ADVANCED=y
++
++#
++# TCP congestion control
++#
++CONFIG_TCP_CONG_BIC=m
++CONFIG_TCP_CONG_CUBIC=m
++CONFIG_TCP_CONG_WESTWOOD=m
++CONFIG_TCP_CONG_HTCP=m
++CONFIG_TCP_CONG_HSTCP=m
++CONFIG_TCP_CONG_HYBLA=m
++CONFIG_TCP_CONG_VEGAS=m
++CONFIG_TCP_CONG_SCALABLE=m
++CONFIG_TCP_CONG_LP=m
++CONFIG_TCP_CONG_VENO=m
++
++#
++# IP: Virtual Server Configuration
++#
++CONFIG_IP_VS=m
++# CONFIG_IP_VS_DEBUG is not set
++CONFIG_IP_VS_TAB_BITS=12
++
++#
++# IPVS transport protocol load balancing support
++#
++CONFIG_IP_VS_PROTO_TCP=y
++CONFIG_IP_VS_PROTO_UDP=y
++CONFIG_IP_VS_PROTO_ESP=y
++CONFIG_IP_VS_PROTO_AH=y
++
++#
++# IPVS scheduler
++#
++CONFIG_IP_VS_RR=m
++CONFIG_IP_VS_WRR=m
++CONFIG_IP_VS_LC=m
++CONFIG_IP_VS_WLC=m
++CONFIG_IP_VS_LBLC=m
++CONFIG_IP_VS_LBLCR=m
++CONFIG_IP_VS_DH=m
++CONFIG_IP_VS_SH=m
++CONFIG_IP_VS_SED=m
++CONFIG_IP_VS_NQ=m
++
++#
++# IPVS application helper
++#
++CONFIG_IP_VS_FTP=m
++CONFIG_IPV6=m
++CONFIG_IPV6_PRIVACY=y
++# CONFIG_IPV6_ROUTER_PREF is not set
++CONFIG_INET6_AH=m
++CONFIG_INET6_ESP=m
++CONFIG_INET6_IPCOMP=m
++CONFIG_INET6_XFRM_TUNNEL=m
++CONFIG_INET6_TUNNEL=m
++CONFIG_INET6_XFRM_MODE_TRANSPORT=m
++CONFIG_INET6_XFRM_MODE_TUNNEL=m
++CONFIG_IPV6_TUNNEL=m
++CONFIG_NETWORK_SECMARK=y
++CONFIG_NETFILTER=y
++# CONFIG_NETFILTER_DEBUG is not set
++CONFIG_BRIDGE_NETFILTER=y
++
++#
++# Core Netfilter Configuration
++#
++CONFIG_NETFILTER_NETLINK=m
++CONFIG_NETFILTER_NETLINK_QUEUE=m
++CONFIG_NETFILTER_NETLINK_LOG=m
++CONFIG_NETFILTER_XTABLES=m
++CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
++CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
++CONFIG_NETFILTER_XT_TARGET_MARK=m
++CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
++CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
++CONFIG_NETFILTER_XT_TARGET_SECMARK=m
++# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set
++CONFIG_NETFILTER_XT_MATCH_COMMENT=m
++CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
++CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
++CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
++CONFIG_NETFILTER_XT_MATCH_DCCP=m
++CONFIG_NETFILTER_XT_MATCH_ESP=m
++CONFIG_NETFILTER_XT_MATCH_HELPER=m
++CONFIG_NETFILTER_XT_MATCH_LENGTH=m
++CONFIG_NETFILTER_XT_MATCH_LIMIT=m
++CONFIG_NETFILTER_XT_MATCH_MAC=m
++CONFIG_NETFILTER_XT_MATCH_MARK=m
++CONFIG_NETFILTER_XT_MATCH_POLICY=m
++CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
++CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
++CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
++CONFIG_NETFILTER_XT_MATCH_QUOTA=m
++CONFIG_NETFILTER_XT_MATCH_REALM=m
++CONFIG_NETFILTER_XT_MATCH_SCTP=m
++CONFIG_NETFILTER_XT_MATCH_STATE=m
++CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
++CONFIG_NETFILTER_XT_MATCH_STRING=m
++CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
++
++#
++# IP: Netfilter Configuration
++#
++CONFIG_IP_NF_CONNTRACK=m
++CONFIG_IP_NF_CT_ACCT=y
++CONFIG_IP_NF_CONNTRACK_MARK=y
++CONFIG_IP_NF_CONNTRACK_SECMARK=y
++CONFIG_IP_NF_CONNTRACK_EVENTS=y
++CONFIG_IP_NF_CONNTRACK_NETLINK=m
++CONFIG_IP_NF_CT_PROTO_SCTP=m
++CONFIG_IP_NF_FTP=m
++CONFIG_IP_NF_IRC=m
++CONFIG_IP_NF_NETBIOS_NS=m
++CONFIG_IP_NF_TFTP=m
++CONFIG_IP_NF_AMANDA=m
++CONFIG_IP_NF_PPTP=m
++CONFIG_IP_NF_H323=m
++CONFIG_IP_NF_SIP=m
++CONFIG_IP_NF_QUEUE=m
++CONFIG_IP_NF_IPTABLES=m
++CONFIG_IP_NF_MATCH_IPRANGE=m
++CONFIG_IP_NF_MATCH_TOS=m
++CONFIG_IP_NF_MATCH_RECENT=m
++CONFIG_IP_NF_MATCH_ECN=m
++CONFIG_IP_NF_MATCH_DSCP=m
++CONFIG_IP_NF_MATCH_AH=m
++CONFIG_IP_NF_MATCH_TTL=m
++CONFIG_IP_NF_MATCH_OWNER=m
++CONFIG_IP_NF_MATCH_ADDRTYPE=m
++CONFIG_IP_NF_MATCH_HASHLIMIT=m
++CONFIG_IP_NF_FILTER=m
++CONFIG_IP_NF_TARGET_REJECT=m
++CONFIG_IP_NF_TARGET_LOG=m
++CONFIG_IP_NF_TARGET_ULOG=m
++CONFIG_IP_NF_TARGET_TCPMSS=m
++CONFIG_IP_NF_NAT=m
++CONFIG_IP_NF_NAT_NEEDED=y
++CONFIG_IP_NF_TARGET_MASQUERADE=m
++CONFIG_IP_NF_TARGET_REDIRECT=m
++CONFIG_IP_NF_TARGET_NETMAP=m
++CONFIG_IP_NF_TARGET_SAME=m
++CONFIG_IP_NF_NAT_SNMP_BASIC=m
++CONFIG_IP_NF_NAT_IRC=m
++CONFIG_IP_NF_NAT_FTP=m
++CONFIG_IP_NF_NAT_TFTP=m
++CONFIG_IP_NF_NAT_AMANDA=m
++CONFIG_IP_NF_NAT_PPTP=m
++CONFIG_IP_NF_NAT_H323=m
++CONFIG_IP_NF_NAT_SIP=m
++CONFIG_IP_NF_MANGLE=m
++CONFIG_IP_NF_TARGET_TOS=m
++CONFIG_IP_NF_TARGET_ECN=m
++CONFIG_IP_NF_TARGET_DSCP=m
++CONFIG_IP_NF_TARGET_TTL=m
++CONFIG_IP_NF_TARGET_CLUSTERIP=m
++CONFIG_IP_NF_RAW=m
++CONFIG_IP_NF_ARPTABLES=m
++CONFIG_IP_NF_ARPFILTER=m
++CONFIG_IP_NF_ARP_MANGLE=m
++
++#
++# IPv6: Netfilter Configuration (EXPERIMENTAL)
++#
++CONFIG_IP6_NF_QUEUE=m
++CONFIG_IP6_NF_IPTABLES=m
++CONFIG_IP6_NF_MATCH_RT=m
++CONFIG_IP6_NF_MATCH_OPTS=m
++CONFIG_IP6_NF_MATCH_FRAG=m
++CONFIG_IP6_NF_MATCH_HL=m
++CONFIG_IP6_NF_MATCH_OWNER=m
++CONFIG_IP6_NF_MATCH_IPV6HEADER=m
++CONFIG_IP6_NF_MATCH_AH=m
++CONFIG_IP6_NF_MATCH_EUI64=m
++CONFIG_IP6_NF_FILTER=m
++CONFIG_IP6_NF_TARGET_LOG=m
++CONFIG_IP6_NF_TARGET_REJECT=m
++CONFIG_IP6_NF_MANGLE=m
++CONFIG_IP6_NF_TARGET_HL=m
++CONFIG_IP6_NF_RAW=m
++
++#
++# DECnet: Netfilter Configuration
++#
++CONFIG_DECNET_NF_GRABULATOR=m
++
++#
++# Bridge: Netfilter Configuration
++#
++CONFIG_BRIDGE_NF_EBTABLES=m
++CONFIG_BRIDGE_EBT_BROUTE=m
++CONFIG_BRIDGE_EBT_T_FILTER=m
++CONFIG_BRIDGE_EBT_T_NAT=m
++CONFIG_BRIDGE_EBT_802_3=m
++CONFIG_BRIDGE_EBT_AMONG=m
++CONFIG_BRIDGE_EBT_ARP=m
++CONFIG_BRIDGE_EBT_IP=m
++CONFIG_BRIDGE_EBT_LIMIT=m
++CONFIG_BRIDGE_EBT_MARK=m
++CONFIG_BRIDGE_EBT_PKTTYPE=m
++CONFIG_BRIDGE_EBT_STP=m
++CONFIG_BRIDGE_EBT_VLAN=m
++CONFIG_BRIDGE_EBT_ARPREPLY=m
++CONFIG_BRIDGE_EBT_DNAT=m
++CONFIG_BRIDGE_EBT_MARK_T=m
++CONFIG_BRIDGE_EBT_REDIRECT=m
++CONFIG_BRIDGE_EBT_SNAT=m
++CONFIG_BRIDGE_EBT_LOG=m
++CONFIG_BRIDGE_EBT_ULOG=m
++
++#
++# DCCP Configuration (EXPERIMENTAL)
++#
++CONFIG_IP_DCCP=m
++CONFIG_INET_DCCP_DIAG=m
++CONFIG_IP_DCCP_ACKVEC=y
++
++#
++# DCCP CCIDs Configuration (EXPERIMENTAL)
++#
++CONFIG_IP_DCCP_CCID2=m
++CONFIG_IP_DCCP_CCID3=m
++CONFIG_IP_DCCP_TFRC_LIB=m
++
++#
++# DCCP Kernel Hacking
++#
++# CONFIG_IP_DCCP_DEBUG is not set
++
++#
++# SCTP Configuration (EXPERIMENTAL)
++#
++CONFIG_IP_SCTP=m
++# CONFIG_SCTP_DBG_MSG is not set
++# CONFIG_SCTP_DBG_OBJCNT is not set
++# CONFIG_SCTP_HMAC_NONE is not set
++# CONFIG_SCTP_HMAC_SHA1 is not set
++CONFIG_SCTP_HMAC_MD5=y
++
++#
++# TIPC Configuration (EXPERIMENTAL)
++#
++# CONFIG_TIPC is not set
++CONFIG_ATM=m
++CONFIG_ATM_CLIP=m
++CONFIG_ATM_CLIP_NO_ICMP=y
++CONFIG_ATM_LANE=m
++CONFIG_ATM_MPOA=m
++CONFIG_ATM_BR2684=m
++# CONFIG_ATM_BR2684_IPFILTER is not set
++CONFIG_BRIDGE=m
++CONFIG_VLAN_8021Q=m
++CONFIG_DECNET=m
++CONFIG_DECNET_ROUTER=y
++CONFIG_DECNET_ROUTE_FWMARK=y
++CONFIG_LLC=y
++CONFIG_LLC2=m
++CONFIG_IPX=m
++# CONFIG_IPX_INTERN is not set
++CONFIG_ATALK=m
++CONFIG_DEV_APPLETALK=m
++CONFIG_IPDDP=m
++CONFIG_IPDDP_ENCAP=y
++CONFIG_IPDDP_DECAP=y
++CONFIG_X25=m
++CONFIG_LAPB=m
++CONFIG_ECONET=m
++CONFIG_ECONET_AUNUDP=y
++CONFIG_ECONET_NATIVE=y
++CONFIG_WAN_ROUTER=m
++
++#
++# QoS and/or fair queueing
++#
++CONFIG_NET_SCHED=y
++CONFIG_NET_SCH_CLK_JIFFIES=y
++# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
++# CONFIG_NET_SCH_CLK_CPU is not set
++
++#
++# Queueing/Scheduling
++#
++CONFIG_NET_SCH_CBQ=m
++CONFIG_NET_SCH_HTB=m
++CONFIG_NET_SCH_HFSC=m
++CONFIG_NET_SCH_ATM=m
++CONFIG_NET_SCH_PRIO=m
++CONFIG_NET_SCH_RED=m
++CONFIG_NET_SCH_SFQ=m
++CONFIG_NET_SCH_TEQL=m
++CONFIG_NET_SCH_TBF=m
++CONFIG_NET_SCH_GRED=m
++CONFIG_NET_SCH_DSMARK=m
++CONFIG_NET_SCH_NETEM=m
++CONFIG_NET_SCH_INGRESS=m
++
++#
++# Classification
++#
++CONFIG_NET_CLS=y
++CONFIG_NET_CLS_BASIC=m
++CONFIG_NET_CLS_TCINDEX=m
++CONFIG_NET_CLS_ROUTE4=m
++CONFIG_NET_CLS_ROUTE=y
++CONFIG_NET_CLS_FW=m
++CONFIG_NET_CLS_U32=m
++CONFIG_CLS_U32_PERF=y
++CONFIG_CLS_U32_MARK=y
++CONFIG_NET_CLS_RSVP=m
++CONFIG_NET_CLS_RSVP6=m
++CONFIG_NET_EMATCH=y
++CONFIG_NET_EMATCH_STACK=32
++CONFIG_NET_EMATCH_CMP=m
++CONFIG_NET_EMATCH_NBYTE=m
++CONFIG_NET_EMATCH_U32=m
++CONFIG_NET_EMATCH_META=m
++CONFIG_NET_EMATCH_TEXT=m
++# CONFIG_NET_CLS_ACT is not set
++CONFIG_NET_CLS_POLICE=y
++# CONFIG_NET_CLS_IND is not set
++CONFIG_NET_ESTIMATOR=y
++
++#
++# Network testing
++#
++CONFIG_NET_PKTGEN=m
++CONFIG_HAMRADIO=y
++
++#
++# Packet Radio protocols
++#
++CONFIG_AX25=m
++# CONFIG_AX25_DAMA_SLAVE is not set
++CONFIG_NETROM=m
++CONFIG_ROSE=m
++
++#
++# AX.25 network device drivers
++#
++CONFIG_MKISS=m
++CONFIG_6PACK=m
++CONFIG_BPQETHER=m
++CONFIG_BAYCOM_SER_FDX=m
++CONFIG_BAYCOM_SER_HDX=m
++CONFIG_BAYCOM_PAR=m
++CONFIG_BAYCOM_EPP=m
++CONFIG_YAM=m
++CONFIG_IRDA=m
++
++#
++# IrDA protocols
++#
++CONFIG_IRLAN=m
++CONFIG_IRNET=m
++CONFIG_IRCOMM=m
++# CONFIG_IRDA_ULTRA is not set
++
++#
++# IrDA options
++#
++CONFIG_IRDA_CACHE_LAST_LSAP=y
++CONFIG_IRDA_FAST_RR=y
++CONFIG_IRDA_DEBUG=y
++
++#
++# Infrared-port device drivers
++#
++
++#
++# SIR device drivers
++#
++CONFIG_IRTTY_SIR=m
++
++#
++# Dongle support
++#
++CONFIG_DONGLE=y
++CONFIG_ESI_DONGLE=m
++CONFIG_ACTISYS_DONGLE=m
++CONFIG_TEKRAM_DONGLE=m
++CONFIG_TOIM3232_DONGLE=m
++CONFIG_LITELINK_DONGLE=m
++CONFIG_MA600_DONGLE=m
++CONFIG_GIRBIL_DONGLE=m
++CONFIG_MCP2120_DONGLE=m
++CONFIG_OLD_BELKIN_DONGLE=m
++CONFIG_ACT200L_DONGLE=m
++
++#
++# Old SIR device drivers
++#
++
++#
++# Old Serial dongle support
++#
++
++#
++# FIR device drivers
++#
++CONFIG_USB_IRDA=m
++CONFIG_SIGMATEL_FIR=m
++CONFIG_NSC_FIR=m
++CONFIG_WINBOND_FIR=m
++CONFIG_TOSHIBA_FIR=m
++CONFIG_SMC_IRCC_FIR=m
++CONFIG_ALI_FIR=m
++CONFIG_VLSI_FIR=m
++CONFIG_VIA_FIR=m
++CONFIG_MCS_FIR=m
++CONFIG_BT=m
++CONFIG_BT_L2CAP=m
++CONFIG_BT_SCO=m
++CONFIG_BT_RFCOMM=m
++CONFIG_BT_RFCOMM_TTY=y
++CONFIG_BT_BNEP=m
++CONFIG_BT_BNEP_MC_FILTER=y
++CONFIG_BT_BNEP_PROTO_FILTER=y
++CONFIG_BT_CMTP=m
++CONFIG_BT_HIDP=m
++
++#
++# Bluetooth device drivers
++#
++CONFIG_BT_HCIUSB=m
++CONFIG_BT_HCIUSB_SCO=y
++CONFIG_BT_HCIUART=m
++CONFIG_BT_HCIUART_H4=y
++CONFIG_BT_HCIUART_BCSP=y
++CONFIG_BT_HCIBCM203X=m
++CONFIG_BT_HCIBPA10X=m
++CONFIG_BT_HCIBFUSB=m
++CONFIG_BT_HCIDTL1=m
++CONFIG_BT_HCIBT3C=m
++CONFIG_BT_HCIBLUECARD=m
++CONFIG_BT_HCIBTUART=m
++CONFIG_BT_HCIVHCI=m
++CONFIG_IEEE80211=m
++# CONFIG_IEEE80211_DEBUG is not set
++CONFIG_IEEE80211_CRYPT_WEP=m
++CONFIG_IEEE80211_CRYPT_CCMP=m
++CONFIG_IEEE80211_CRYPT_TKIP=m
++CONFIG_IEEE80211_SOFTMAC=m
++# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
++CONFIG_WIRELESS_EXT=y
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++CONFIG_FW_LOADER=m
++# CONFIG_DEBUG_DRIVER is not set
++CONFIG_SYS_HYPERVISOR=y
++
++#
++# Connector - unified userspace <-> kernelspace linker
++#
++CONFIG_CONNECTOR=m
++
++#
++# Memory Technology Devices (MTD)
++#
++CONFIG_MTD=m
++# CONFIG_MTD_DEBUG is not set
++CONFIG_MTD_CONCAT=m
++CONFIG_MTD_PARTITIONS=y
++CONFIG_MTD_REDBOOT_PARTS=m
++CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
++# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
++# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
++# CONFIG_MTD_CMDLINE_PARTS is not set
++
++#
++# User Modules And Translation Layers
++#
++CONFIG_MTD_CHAR=m
++CONFIG_MTD_BLOCK=m
++CONFIG_MTD_BLOCK_RO=m
++CONFIG_FTL=m
++CONFIG_NFTL=m
++CONFIG_NFTL_RW=y
++CONFIG_INFTL=m
++CONFIG_RFD_FTL=m
++
++#
++# RAM/ROM/Flash chip drivers
++#
++CONFIG_MTD_CFI=m
++CONFIG_MTD_JEDECPROBE=m
++CONFIG_MTD_GEN_PROBE=m
++CONFIG_MTD_CFI_ADV_OPTIONS=y
++CONFIG_MTD_CFI_NOSWAP=y
++# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
++# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
++# CONFIG_MTD_CFI_GEOMETRY is not set
++CONFIG_MTD_MAP_BANK_WIDTH_1=y
++CONFIG_MTD_MAP_BANK_WIDTH_2=y
++CONFIG_MTD_MAP_BANK_WIDTH_4=y
++# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
++CONFIG_MTD_CFI_I1=y
++CONFIG_MTD_CFI_I2=y
++# CONFIG_MTD_CFI_I4 is not set
++# CONFIG_MTD_CFI_I8 is not set
++# CONFIG_MTD_OTP is not set
++CONFIG_MTD_CFI_INTELEXT=m
++CONFIG_MTD_CFI_AMDSTD=m
++CONFIG_MTD_CFI_STAA=m
++CONFIG_MTD_CFI_UTIL=m
++CONFIG_MTD_RAM=m
++CONFIG_MTD_ROM=m
++CONFIG_MTD_ABSENT=m
++# CONFIG_MTD_OBSOLETE_CHIPS is not set
++
++#
++# Mapping drivers for chip access
++#
++CONFIG_MTD_COMPLEX_MAPPINGS=y
++CONFIG_MTD_PHYSMAP=m
++CONFIG_MTD_PHYSMAP_START=0x8000000
++CONFIG_MTD_PHYSMAP_LEN=0x4000000
++CONFIG_MTD_PHYSMAP_BANKWIDTH=2
++CONFIG_MTD_PNC2000=m
++CONFIG_MTD_SC520CDP=m
++CONFIG_MTD_NETSC520=m
++CONFIG_MTD_TS5500=m
++CONFIG_MTD_SBC_GXX=m
++CONFIG_MTD_SCx200_DOCFLASH=m
++CONFIG_MTD_AMD76XROM=m
++CONFIG_MTD_ICHXROM=m
++CONFIG_MTD_SCB2_FLASH=m
++CONFIG_MTD_NETtel=m
++CONFIG_MTD_DILNETPC=m
++CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000
++CONFIG_MTD_L440GX=m
++CONFIG_MTD_PCI=m
++CONFIG_MTD_PLATRAM=m
++
++#
++# Self-contained MTD device drivers
++#
++CONFIG_MTD_PMC551=m
++# CONFIG_MTD_PMC551_BUGFIX is not set
++# CONFIG_MTD_PMC551_DEBUG is not set
++CONFIG_MTD_DATAFLASH=m
++CONFIG_MTD_M25P80=m
++CONFIG_MTD_SLRAM=m
++CONFIG_MTD_PHRAM=m
++CONFIG_MTD_MTDRAM=m
++CONFIG_MTDRAM_TOTAL_SIZE=4096
++CONFIG_MTDRAM_ERASE_SIZE=128
++CONFIG_MTD_BLOCK2MTD=m
++
++#
++# Disk-On-Chip Device Drivers
++#
++CONFIG_MTD_DOC2000=m
++CONFIG_MTD_DOC2001=m
++CONFIG_MTD_DOC2001PLUS=m
++CONFIG_MTD_DOCPROBE=m
++CONFIG_MTD_DOCECC=m
++# CONFIG_MTD_DOCPROBE_ADVANCED is not set
++CONFIG_MTD_DOCPROBE_ADDRESS=0
++
++#
++# NAND Flash Device Drivers
++#
++CONFIG_MTD_NAND=m
++# CONFIG_MTD_NAND_VERIFY_WRITE is not set
++# CONFIG_MTD_NAND_ECC_SMC is not set
++CONFIG_MTD_NAND_IDS=m
++CONFIG_MTD_NAND_DISKONCHIP=m
++# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
++CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
++CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
++CONFIG_MTD_NAND_NANDSIM=m
++
++#
++# OneNAND Flash Device Drivers
++#
++CONFIG_MTD_ONENAND=m
++# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
++# CONFIG_MTD_ONENAND_OTP is not set
++
++#
++# Parallel port support
++#
++CONFIG_PARPORT=m
++CONFIG_PARPORT_PC=m
++CONFIG_PARPORT_SERIAL=m
++CONFIG_PARPORT_PC_FIFO=y
++CONFIG_PARPORT_PC_SUPERIO=y
++CONFIG_PARPORT_PC_PCMCIA=m
++CONFIG_PARPORT_NOT_PC=y
++# CONFIG_PARPORT_GSC is not set
++CONFIG_PARPORT_AX88796=m
++CONFIG_PARPORT_1284=y
++
++#
++# Plug and Play support
++#
++CONFIG_PNP=y
++# CONFIG_PNP_DEBUG is not set
++
++#
++# Protocols
++#
++CONFIG_PNPACPI=y
++
++#
++# Block devices
++#
++CONFIG_BLK_DEV_FD=y
++CONFIG_PARIDE=m
++CONFIG_PARIDE_PARPORT=m
++
++#
++# Parallel IDE high-level drivers
++#
++CONFIG_PARIDE_PD=m
++CONFIG_PARIDE_PCD=m
++CONFIG_PARIDE_PF=m
++CONFIG_PARIDE_PT=m
++CONFIG_PARIDE_PG=m
++
++#
++# Parallel IDE protocol modules
++#
++CONFIG_PARIDE_ATEN=m
++CONFIG_PARIDE_BPCK=m
++CONFIG_PARIDE_BPCK6=m
++CONFIG_PARIDE_COMM=m
++CONFIG_PARIDE_DSTR=m
++CONFIG_PARIDE_FIT2=m
++CONFIG_PARIDE_FIT3=m
++CONFIG_PARIDE_EPAT=m
++CONFIG_PARIDE_EPATC8=y
++CONFIG_PARIDE_EPIA=m
++CONFIG_PARIDE_FRIQ=m
++CONFIG_PARIDE_FRPW=m
++CONFIG_PARIDE_KBIC=m
++CONFIG_PARIDE_KTTI=m
++CONFIG_PARIDE_ON20=m
++CONFIG_PARIDE_ON26=m
++CONFIG_BLK_CPQ_DA=m
++CONFIG_BLK_CPQ_CISS_DA=m
++CONFIG_CISS_SCSI_TAPE=y
++CONFIG_BLK_DEV_DAC960=m
++CONFIG_BLK_DEV_UMEM=m
++# CONFIG_BLK_DEV_COW_COMMON is not set
++CONFIG_BLK_DEV_LOOP=y
++CONFIG_BLK_DEV_CRYPTOLOOP=m
++CONFIG_BLK_DEV_NBD=m
++CONFIG_BLK_DEV_SX8=m
++# CONFIG_BLK_DEV_UB is not set
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=16384
++CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
++CONFIG_BLK_DEV_INITRD=y
++CONFIG_CDROM_PKTCDVD=m
++CONFIG_CDROM_PKTCDVD_BUFFERS=8
++CONFIG_CDROM_PKTCDVD_WCACHE=y
++CONFIG_ATA_OVER_ETH=m
++
++#
++# ATA/ATAPI/MFM/RLL support
++#
++CONFIG_IDE=y
++CONFIG_BLK_DEV_IDE=y
++
++#
++# Please see Documentation/ide.txt for help/info on IDE drives
++#
++# CONFIG_BLK_DEV_IDE_SATA is not set
++# CONFIG_BLK_DEV_HD_IDE is not set
++CONFIG_BLK_DEV_IDEDISK=m
++CONFIG_IDEDISK_MULTI_MODE=y
++CONFIG_BLK_DEV_IDECS=m
++CONFIG_BLK_DEV_IDECD=m
++CONFIG_BLK_DEV_IDETAPE=m
++CONFIG_BLK_DEV_IDEFLOPPY=m
++CONFIG_BLK_DEV_IDESCSI=m
++# CONFIG_IDE_TASK_IOCTL is not set
++
++#
++# IDE chipset support/bugfixes
++#
++CONFIG_IDE_GENERIC=m
++CONFIG_BLK_DEV_CMD640=y
++CONFIG_BLK_DEV_CMD640_ENHANCED=y
++CONFIG_BLK_DEV_IDEPNP=y
++CONFIG_BLK_DEV_IDEPCI=y
++CONFIG_IDEPCI_SHARE_IRQ=y
++CONFIG_BLK_DEV_OFFBOARD=y
++CONFIG_BLK_DEV_GENERIC=y
++CONFIG_BLK_DEV_OPTI621=m
++CONFIG_BLK_DEV_RZ1000=m
++CONFIG_BLK_DEV_IDEDMA_PCI=y
++# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
++CONFIG_IDEDMA_PCI_AUTO=y
++# CONFIG_IDEDMA_ONLYDISK is not set
++CONFIG_BLK_DEV_AEC62XX=m
++CONFIG_BLK_DEV_ALI15X3=m
++# CONFIG_WDC_ALI15X3 is not set
++CONFIG_BLK_DEV_AMD74XX=m
++CONFIG_BLK_DEV_ATIIXP=m
++CONFIG_BLK_DEV_CMD64X=m
++CONFIG_BLK_DEV_TRIFLEX=m
++CONFIG_BLK_DEV_CY82C693=m
++CONFIG_BLK_DEV_CS5520=m
++CONFIG_BLK_DEV_CS5530=m
++CONFIG_BLK_DEV_CS5535=m
++CONFIG_BLK_DEV_HPT34X=m
++CONFIG_HPT34X_AUTODMA=y
++CONFIG_BLK_DEV_HPT366=m
++CONFIG_BLK_DEV_SC1200=m
++CONFIG_BLK_DEV_PIIX=m
++CONFIG_BLK_DEV_IT821X=m
++CONFIG_BLK_DEV_NS87415=m
++CONFIG_BLK_DEV_PDC202XX_OLD=m
++CONFIG_PDC202XX_BURST=y
++CONFIG_BLK_DEV_PDC202XX_NEW=m
++CONFIG_BLK_DEV_SVWKS=m
++CONFIG_BLK_DEV_SIIMAGE=m
++CONFIG_BLK_DEV_SIS5513=m
++CONFIG_BLK_DEV_SLC90E66=m
++CONFIG_BLK_DEV_TRM290=m
++CONFIG_BLK_DEV_VIA82CXXX=m
++# CONFIG_IDE_ARM is not set
++CONFIG_BLK_DEV_IDEDMA=y
++# CONFIG_IDEDMA_IVB is not set
++CONFIG_IDEDMA_AUTO=y
++# CONFIG_BLK_DEV_HD is not set
++
++#
++# SCSI device support
++#
++CONFIG_RAID_ATTRS=m
++CONFIG_SCSI=m
++CONFIG_SCSI_PROC_FS=y
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=m
++CONFIG_CHR_DEV_ST=m
++CONFIG_CHR_DEV_OSST=m
++CONFIG_BLK_DEV_SR=m
++# CONFIG_BLK_DEV_SR_VENDOR is not set
++CONFIG_CHR_DEV_SG=m
++CONFIG_CHR_DEV_SCH=m
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++CONFIG_SCSI_MULTI_LUN=y
++CONFIG_SCSI_CONSTANTS=y
++CONFIG_SCSI_LOGGING=y
++
++#
++# SCSI Transport Attributes
++#
++CONFIG_SCSI_SPI_ATTRS=m
++CONFIG_SCSI_FC_ATTRS=m
++CONFIG_SCSI_ISCSI_ATTRS=m
++CONFIG_SCSI_SAS_ATTRS=m
++
++#
++# SCSI low-level drivers
++#
++CONFIG_ISCSI_TCP=m
++CONFIG_BLK_DEV_3W_XXXX_RAID=m
++CONFIG_SCSI_3W_9XXX=m
++CONFIG_SCSI_ACARD=m
++CONFIG_SCSI_AACRAID=m
++CONFIG_SCSI_AIC7XXX=m
++CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
++CONFIG_AIC7XXX_RESET_DELAY_MS=15000
++CONFIG_AIC7XXX_DEBUG_ENABLE=y
++CONFIG_AIC7XXX_DEBUG_MASK=0
++CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
++CONFIG_SCSI_AIC7XXX_OLD=m
++CONFIG_SCSI_AIC79XX=m
++CONFIG_AIC79XX_CMDS_PER_DEVICE=32
++CONFIG_AIC79XX_RESET_DELAY_MS=15000
++CONFIG_AIC79XX_ENABLE_RD_STRM=y
++CONFIG_AIC79XX_DEBUG_ENABLE=y
++CONFIG_AIC79XX_DEBUG_MASK=0
++CONFIG_AIC79XX_REG_PRETTY_PRINT=y
++CONFIG_SCSI_DPT_I2O=m
++CONFIG_SCSI_ADVANSYS=m
++CONFIG_MEGARAID_NEWGEN=y
++CONFIG_MEGARAID_MM=m
++CONFIG_MEGARAID_MAILBOX=m
++CONFIG_MEGARAID_LEGACY=m
++CONFIG_MEGARAID_SAS=m
++CONFIG_SCSI_SATA=m
++CONFIG_SCSI_SATA_AHCI=m
++CONFIG_SCSI_SATA_SVW=m
++CONFIG_SCSI_ATA_PIIX=m
++CONFIG_SCSI_SATA_MV=m
++CONFIG_SCSI_SATA_NV=m
++CONFIG_SCSI_PDC_ADMA=m
++CONFIG_SCSI_HPTIOP=m
++CONFIG_SCSI_SATA_QSTOR=m
++CONFIG_SCSI_SATA_PROMISE=m
++CONFIG_SCSI_SATA_SX4=m
++CONFIG_SCSI_SATA_SIL=m
++CONFIG_SCSI_SATA_SIL24=m
++CONFIG_SCSI_SATA_SIS=m
++CONFIG_SCSI_SATA_ULI=m
++CONFIG_SCSI_SATA_VIA=m
++CONFIG_SCSI_SATA_VITESSE=m
++CONFIG_SCSI_SATA_INTEL_COMBINED=y
++CONFIG_SCSI_BUSLOGIC=m
++# CONFIG_SCSI_OMIT_FLASHPOINT is not set
++CONFIG_SCSI_DMX3191D=m
++CONFIG_SCSI_EATA=m
++CONFIG_SCSI_EATA_TAGGED_QUEUE=y
++CONFIG_SCSI_EATA_LINKED_COMMANDS=y
++CONFIG_SCSI_EATA_MAX_TAGS=16
++CONFIG_SCSI_FUTURE_DOMAIN=m
++CONFIG_SCSI_GDTH=m
++CONFIG_SCSI_IPS=m
++CONFIG_SCSI_INITIO=m
++CONFIG_SCSI_INIA100=m
++CONFIG_SCSI_PPA=m
++CONFIG_SCSI_IMM=m
++# CONFIG_SCSI_IZIP_EPP16 is not set
++# CONFIG_SCSI_IZIP_SLOW_CTR is not set
++CONFIG_SCSI_SYM53C8XX_2=m
++CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
++CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
++CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
++CONFIG_SCSI_SYM53C8XX_MMIO=y
++CONFIG_SCSI_IPR=m
++CONFIG_SCSI_IPR_TRACE=y
++CONFIG_SCSI_IPR_DUMP=y
++CONFIG_SCSI_QLOGIC_1280=m
++CONFIG_SCSI_QLA_FC=m
++CONFIG_SCSI_LPFC=m
++CONFIG_SCSI_DC395x=m
++CONFIG_SCSI_DC390T=m
++CONFIG_SCSI_NSP32=m
++CONFIG_SCSI_DEBUG=m
++
++#
++# PCMCIA SCSI adapter support
++#
++CONFIG_PCMCIA_AHA152X=m
++CONFIG_PCMCIA_FDOMAIN=m
++CONFIG_PCMCIA_NINJA_SCSI=m
++CONFIG_PCMCIA_QLOGIC=m
++CONFIG_PCMCIA_SYM53C500=m
++
++#
++# Multi-device support (RAID and LVM)
++#
++CONFIG_MD=y
++CONFIG_BLK_DEV_MD=y
++CONFIG_MD_LINEAR=m
++CONFIG_MD_RAID0=m
++CONFIG_MD_RAID1=m
++CONFIG_MD_RAID10=m
++CONFIG_MD_RAID456=m
++CONFIG_MD_RAID5_RESHAPE=y
++CONFIG_MD_MULTIPATH=m
++CONFIG_MD_FAULTY=m
++CONFIG_BLK_DEV_DM=m
++CONFIG_DM_CRYPT=m
++CONFIG_DM_SNAPSHOT=m
++CONFIG_DM_MIRROR=m
++CONFIG_DM_ZERO=m
++CONFIG_DM_MULTIPATH=m
++CONFIG_DM_MULTIPATH_EMC=m
++
++#
++# Fusion MPT device support
++#
++CONFIG_FUSION=y
++CONFIG_FUSION_SPI=m
++CONFIG_FUSION_FC=m
++CONFIG_FUSION_SAS=m
++CONFIG_FUSION_MAX_SGE=128
++CONFIG_FUSION_CTL=m
++CONFIG_FUSION_LAN=m
++
++#
++# IEEE 1394 (FireWire) support
++#
++CONFIG_IEEE1394=m
++
++#
++# Subsystem Options
++#
++# CONFIG_IEEE1394_VERBOSEDEBUG is not set
++# CONFIG_IEEE1394_OUI_DB is not set
++CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
++CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
++CONFIG_IEEE1394_EXPORT_FULL_API=y
++
++#
++# Device Drivers
++#
++CONFIG_IEEE1394_PCILYNX=m
++CONFIG_IEEE1394_OHCI1394=m
++
++#
++# Protocol Drivers
++#
++CONFIG_IEEE1394_VIDEO1394=m
++CONFIG_IEEE1394_SBP2=m
++# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
++CONFIG_IEEE1394_ETH1394=m
++CONFIG_IEEE1394_DV1394=m
++CONFIG_IEEE1394_RAWIO=m
++
++#
++# I2O device support
++#
++CONFIG_I2O=m
++CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
++CONFIG_I2O_EXT_ADAPTEC=y
++CONFIG_I2O_CONFIG=m
++CONFIG_I2O_CONFIG_OLD_IOCTL=y
++CONFIG_I2O_BUS=m
++CONFIG_I2O_BLOCK=m
++CONFIG_I2O_SCSI=m
++CONFIG_I2O_PROC=m
++
++#
++# Network device support
++#
++CONFIG_NETDEVICES=y
++CONFIG_DUMMY=m
++CONFIG_BONDING=m
++CONFIG_EQUALIZER=m
++CONFIG_TUN=m
++CONFIG_NET_SB1000=m
++
++#
++# ARCnet devices
++#
++CONFIG_ARCNET=m
++CONFIG_ARCNET_1201=m
++CONFIG_ARCNET_1051=m
++CONFIG_ARCNET_RAW=m
++CONFIG_ARCNET_CAP=m
++CONFIG_ARCNET_COM90xx=m
++CONFIG_ARCNET_COM90xxIO=m
++CONFIG_ARCNET_RIM_I=m
++# CONFIG_ARCNET_COM20020 is not set
++
++#
++# PHY device support
++#
++CONFIG_PHYLIB=m
++
++#
++# MII PHY device drivers
++#
++CONFIG_MARVELL_PHY=m
++CONFIG_DAVICOM_PHY=m
++CONFIG_QSEMI_PHY=m
++CONFIG_LXT_PHY=m
++CONFIG_CICADA_PHY=m
++CONFIG_VITESSE_PHY=m
++CONFIG_SMSC_PHY=m
++CONFIG_FIXED_PHY=m
++# CONFIG_FIXED_MII_10_FDX is not set
++# CONFIG_FIXED_MII_100_FDX is not set
++
++#
++# Ethernet (10 or 100Mbit)
++#
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=m
++CONFIG_HAPPYMEAL=m
++CONFIG_SUNGEM=m
++CONFIG_CASSINI=m
++CONFIG_NET_VENDOR_3COM=y
++CONFIG_VORTEX=m
++CONFIG_TYPHOON=m
++
++#
++# Tulip family network device support
++#
++CONFIG_NET_TULIP=y
++CONFIG_DE2104X=m
++CONFIG_TULIP=m
++# CONFIG_TULIP_MWI is not set
++# CONFIG_TULIP_MMIO is not set
++CONFIG_TULIP_NAPI=y
++CONFIG_TULIP_NAPI_HW_MITIGATION=y
++CONFIG_DE4X5=m
++CONFIG_WINBOND_840=m
++CONFIG_DM9102=m
++CONFIG_ULI526X=m
++CONFIG_PCMCIA_XIRCOM=m
++CONFIG_HP100=m
++CONFIG_NET_PCI=y
++CONFIG_PCNET32=m
++CONFIG_AMD8111_ETH=m
++# CONFIG_AMD8111E_NAPI is not set
++CONFIG_ADAPTEC_STARFIRE=m
++CONFIG_ADAPTEC_STARFIRE_NAPI=y
++CONFIG_B44=m
++CONFIG_FORCEDETH=m
++CONFIG_DGRS=m
++CONFIG_EEPRO100=m
++CONFIG_E100=m
++CONFIG_FEALNX=m
++CONFIG_NATSEMI=m
++CONFIG_NE2K_PCI=m
++CONFIG_8139CP=m
++CONFIG_8139TOO=m
++# CONFIG_8139TOO_PIO is not set
++# CONFIG_8139TOO_TUNE_TWISTER is not set
++CONFIG_8139TOO_8129=y
++# CONFIG_8139_OLD_RX_RESET is not set
++CONFIG_SIS900=m
++CONFIG_EPIC100=m
++CONFIG_SUNDANCE=m
++# CONFIG_SUNDANCE_MMIO is not set
++CONFIG_TLAN=m
++CONFIG_VIA_RHINE=m
++# CONFIG_VIA_RHINE_MMIO is not set
++# CONFIG_VIA_RHINE_NAPI is not set
++CONFIG_NET_POCKET=y
++CONFIG_ATP=m
++CONFIG_DE600=m
++CONFIG_DE620=m
++
++#
++# Ethernet (1000 Mbit)
++#
++CONFIG_ACENIC=m
++# CONFIG_ACENIC_OMIT_TIGON_I is not set
++CONFIG_DL2K=m
++CONFIG_E1000=m
++CONFIG_E1000_NAPI=y
++# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
++CONFIG_NS83820=m
++CONFIG_HAMACHI=m
++CONFIG_YELLOWFIN=m
++CONFIG_R8169=m
++# CONFIG_R8169_NAPI is not set
++CONFIG_R8169_VLAN=y
++CONFIG_SIS190=m
++CONFIG_SKGE=m
++CONFIG_SKY2=m
++CONFIG_SK98LIN=m
++CONFIG_VIA_VELOCITY=m
++CONFIG_TIGON3=m
++CONFIG_BNX2=m
++
++#
++# Ethernet (10000 Mbit)
++#
++CONFIG_CHELSIO_T1=m
++CONFIG_IXGB=m
++CONFIG_IXGB_NAPI=y
++CONFIG_S2IO=m
++CONFIG_S2IO_NAPI=y
++CONFIG_MYRI10GE=m
++
++#
++# Token Ring devices
++#
++CONFIG_TR=y
++CONFIG_IBMOL=m
++CONFIG_IBMLS=m
++CONFIG_3C359=m
++CONFIG_TMS380TR=m
++CONFIG_TMSPCI=m
++CONFIG_ABYSS=m
++
++#
++# Wireless LAN (non-hamradio)
++#
++CONFIG_NET_RADIO=y
++CONFIG_NET_WIRELESS_RTNETLINK=y
++
++#
++# Obsolete Wireless cards support (pre-802.11)
++#
++CONFIG_STRIP=m
++CONFIG_PCMCIA_WAVELAN=m
++CONFIG_PCMCIA_NETWAVE=m
++
++#
++# Wireless 802.11 Frequency Hopping cards support
++#
++CONFIG_PCMCIA_RAYCS=m
++
++#
++# Wireless 802.11b ISA/PCI cards support
++#
++CONFIG_IPW2100=m
++CONFIG_IPW2100_MONITOR=y
++# CONFIG_IPW2100_DEBUG is not set
++CONFIG_IPW2200=m
++CONFIG_IPW2200_MONITOR=y
++CONFIG_IPW2200_RADIOTAP=y
++CONFIG_IPW2200_PROMISCUOUS=y
++CONFIG_IPW2200_QOS=y
++# CONFIG_IPW2200_DEBUG is not set
++CONFIG_AIRO=m
++CONFIG_HERMES=m
++CONFIG_PLX_HERMES=m
++CONFIG_TMD_HERMES=m
++CONFIG_NORTEL_HERMES=m
++CONFIG_PCI_HERMES=m
++CONFIG_ATMEL=m
++CONFIG_PCI_ATMEL=m
++
++#
++# Wireless 802.11b Pcmcia/Cardbus cards support
++#
++CONFIG_PCMCIA_HERMES=m
++CONFIG_PCMCIA_SPECTRUM=m
++CONFIG_AIRO_CS=m
++CONFIG_PCMCIA_ATMEL=m
++CONFIG_PCMCIA_WL3501=m
++
++#
++# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
++#
++CONFIG_PRISM54=m
++CONFIG_USB_ZD1201=m
++CONFIG_HOSTAP=m
++CONFIG_HOSTAP_FIRMWARE=y
++CONFIG_HOSTAP_FIRMWARE_NVRAM=y
++CONFIG_HOSTAP_PLX=m
++CONFIG_HOSTAP_PCI=m
++CONFIG_HOSTAP_CS=m
++CONFIG_BCM43XX=m
++CONFIG_BCM43XX_DEBUG=y
++CONFIG_BCM43XX_DMA=y
++CONFIG_BCM43XX_PIO=y
++CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
++# CONFIG_BCM43XX_DMA_MODE is not set
++# CONFIG_BCM43XX_PIO_MODE is not set
++CONFIG_ZD1211RW=m
++# CONFIG_ZD1211RW_DEBUG is not set
++CONFIG_NET_WIRELESS=y
++
++#
++# PCMCIA network device support
++#
++CONFIG_NET_PCMCIA=y
++CONFIG_PCMCIA_3C589=m
++CONFIG_PCMCIA_3C574=m
++CONFIG_PCMCIA_FMVJ18X=m
++CONFIG_PCMCIA_PCNET=m
++CONFIG_PCMCIA_NMCLAN=m
++CONFIG_PCMCIA_SMC91C92=m
++CONFIG_PCMCIA_XIRC2PS=m
++CONFIG_PCMCIA_AXNET=m
++CONFIG_PCMCIA_IBMTR=m
++
++#
++# Wan interfaces
++#
++CONFIG_WAN=y
++CONFIG_DSCC4=m
++CONFIG_DSCC4_PCISYNC=y
++CONFIG_DSCC4_PCI_RST=y
++CONFIG_LANMEDIA=m
++CONFIG_HDLC=m
++CONFIG_HDLC_RAW=y
++CONFIG_HDLC_RAW_ETH=y
++CONFIG_HDLC_CISCO=y
++CONFIG_HDLC_FR=y
++CONFIG_HDLC_PPP=y
++CONFIG_HDLC_X25=y
++CONFIG_PCI200SYN=m
++CONFIG_WANXL=m
++CONFIG_PC300=m
++CONFIG_PC300_MLPPP=y
++CONFIG_FARSYNC=m
++CONFIG_DLCI=m
++CONFIG_DLCI_COUNT=24
++CONFIG_DLCI_MAX=8
++CONFIG_WAN_ROUTER_DRIVERS=y
++CONFIG_CYCLADES_SYNC=m
++CONFIG_CYCLOMX_X25=y
++CONFIG_LAPBETHER=m
++CONFIG_X25_ASY=m
++CONFIG_SBNI=m
++# CONFIG_SBNI_MULTILINE is not set
++
++#
++# ATM drivers
++#
++CONFIG_ATM_DUMMY=m
++CONFIG_ATM_TCP=m
++CONFIG_ATM_LANAI=m
++CONFIG_ATM_ENI=m
++# CONFIG_ATM_ENI_DEBUG is not set
++# CONFIG_ATM_ENI_TUNE_BURST is not set
++CONFIG_ATM_FIRESTREAM=m
++CONFIG_ATM_ZATM=m
++# CONFIG_ATM_ZATM_DEBUG is not set
++CONFIG_ATM_NICSTAR=m
++CONFIG_ATM_NICSTAR_USE_SUNI=y
++CONFIG_ATM_NICSTAR_USE_IDT77105=y
++CONFIG_ATM_IDT77252=m
++# CONFIG_ATM_IDT77252_DEBUG is not set
++CONFIG_ATM_IDT77252_RCV_ALL=y
++CONFIG_ATM_IDT77252_USE_SUNI=y
++CONFIG_ATM_AMBASSADOR=m
++# CONFIG_ATM_AMBASSADOR_DEBUG is not set
++CONFIG_ATM_HORIZON=m
++# CONFIG_ATM_HORIZON_DEBUG is not set
++CONFIG_ATM_IA=m
++# CONFIG_ATM_IA_DEBUG is not set
++CONFIG_ATM_FORE200E_MAYBE=m
++CONFIG_ATM_FORE200E_PCA=y
++CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
++CONFIG_ATM_FORE200E_USE_TASKLET=y
++CONFIG_ATM_FORE200E_TX_RETRY=16
++CONFIG_ATM_FORE200E_DEBUG=0
++CONFIG_ATM_FORE200E=m
++CONFIG_ATM_HE=m
++CONFIG_ATM_HE_USE_SUNI=y
++CONFIG_FDDI=y
++# CONFIG_DEFXX is not set
++CONFIG_SKFP=m
++CONFIG_HIPPI=y
++CONFIG_ROADRUNNER=m
++CONFIG_ROADRUNNER_LARGE_RINGS=y
++CONFIG_PLIP=m
++CONFIG_PPP=m
++CONFIG_PPP_MULTILINK=y
++CONFIG_PPP_FILTER=y
++CONFIG_PPP_ASYNC=m
++CONFIG_PPP_SYNC_TTY=m
++CONFIG_PPP_DEFLATE=m
++CONFIG_PPP_BSDCOMP=m
++CONFIG_PPP_MPPE=m
++CONFIG_PPPOE=m
++CONFIG_PPPOATM=m
++CONFIG_SLIP=m
++CONFIG_SLIP_COMPRESSED=y
++CONFIG_SLIP_SMART=y
++CONFIG_SLIP_MODE_SLIP6=y
++CONFIG_NET_FC=y
++CONFIG_SHAPER=m
++CONFIG_NETCONSOLE=m
++CONFIG_NETPOLL=y
++CONFIG_NETPOLL_RX=y
++CONFIG_NETPOLL_TRAP=y
++CONFIG_NET_POLL_CONTROLLER=y
++
++#
++# ISDN subsystem
++#
++CONFIG_ISDN=m
++
++#
++# Old ISDN4Linux
++#
++CONFIG_ISDN_I4L=m
++CONFIG_ISDN_PPP=y
++CONFIG_ISDN_PPP_VJ=y
++CONFIG_ISDN_MPP=y
++CONFIG_IPPP_FILTER=y
++CONFIG_ISDN_PPP_BSDCOMP=m
++CONFIG_ISDN_AUDIO=y
++CONFIG_ISDN_TTY_FAX=y
++CONFIG_ISDN_X25=y
++
++#
++# ISDN feature submodules
++#
++CONFIG_ISDN_DIVERSION=m
++
++#
++# ISDN4Linux hardware drivers
++#
++
++#
++# Passive cards
++#
++CONFIG_ISDN_DRV_HISAX=m
++
++#
++# D-channel protocol features
++#
++CONFIG_HISAX_EURO=y
++CONFIG_DE_AOC=y
++# CONFIG_HISAX_NO_SENDCOMPLETE is not set
++# CONFIG_HISAX_NO_LLC is not set
++# CONFIG_HISAX_NO_KEYPAD is not set
++CONFIG_HISAX_1TR6=y
++CONFIG_HISAX_NI1=y
++CONFIG_HISAX_MAX_CARDS=8
++
++#
++# HiSax supported cards
++#
++CONFIG_HISAX_16_3=y
++CONFIG_HISAX_TELESPCI=y
++CONFIG_HISAX_S0BOX=y
++CONFIG_HISAX_FRITZPCI=y
++CONFIG_HISAX_AVM_A1_PCMCIA=y
++CONFIG_HISAX_ELSA=y
++CONFIG_HISAX_DIEHLDIVA=y
++CONFIG_HISAX_SEDLBAUER=y
++CONFIG_HISAX_NETJET=y
++CONFIG_HISAX_NETJET_U=y
++CONFIG_HISAX_NICCY=y
++CONFIG_HISAX_BKM_A4T=y
++CONFIG_HISAX_SCT_QUADRO=y
++CONFIG_HISAX_GAZEL=y
++CONFIG_HISAX_HFC_PCI=y
++CONFIG_HISAX_W6692=y
++CONFIG_HISAX_HFC_SX=y
++CONFIG_HISAX_ENTERNOW_PCI=y
++# CONFIG_HISAX_DEBUG is not set
++
++#
++# HiSax PCMCIA card service modules
++#
++CONFIG_HISAX_SEDLBAUER_CS=m
++CONFIG_HISAX_ELSA_CS=m
++CONFIG_HISAX_AVM_A1_CS=m
++CONFIG_HISAX_TELES_CS=m
++
++#
++# HiSax sub driver modules
++#
++CONFIG_HISAX_ST5481=m
++CONFIG_HISAX_HFCUSB=m
++CONFIG_HISAX_HFC4S8S=m
++CONFIG_HISAX_FRITZ_PCIPNP=m
++CONFIG_HISAX_HDLC=y
++
++#
++# Active cards
++#
++
++#
++# Siemens Gigaset
++#
++CONFIG_ISDN_DRV_GIGASET=m
++CONFIG_GIGASET_BASE=m
++CONFIG_GIGASET_M105=m
++# CONFIG_GIGASET_DEBUG is not set
++# CONFIG_GIGASET_UNDOCREQ is not set
++
++#
++# CAPI subsystem
++#
++CONFIG_ISDN_CAPI=m
++CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
++CONFIG_ISDN_CAPI_MIDDLEWARE=y
++CONFIG_ISDN_CAPI_CAPI20=m
++CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
++CONFIG_ISDN_CAPI_CAPIFS=m
++CONFIG_ISDN_CAPI_CAPIDRV=m
++
++#
++# CAPI hardware drivers
++#
++
++#
++# Active AVM cards
++#
++CONFIG_CAPI_AVM=y
++CONFIG_ISDN_DRV_AVMB1_B1PCI=m
++CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
++CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
++CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
++CONFIG_ISDN_DRV_AVMB1_T1PCI=m
++CONFIG_ISDN_DRV_AVMB1_C4=m
++
++#
++# Active Eicon DIVA Server cards
++#
++CONFIG_CAPI_EICON=y
++CONFIG_ISDN_DIVAS=m
++CONFIG_ISDN_DIVAS_BRIPCI=y
++CONFIG_ISDN_DIVAS_PRIPCI=y
++CONFIG_ISDN_DIVAS_DIVACAPI=m
++CONFIG_ISDN_DIVAS_USERIDI=m
++CONFIG_ISDN_DIVAS_MAINT=m
++
++#
++# Telephony Support
++#
++CONFIG_PHONE=m
++CONFIG_PHONE_IXJ=m
++CONFIG_PHONE_IXJ_PCMCIA=m
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++
++#
++# Userland interfaces
++#
++CONFIG_INPUT_MOUSEDEV=y
++CONFIG_INPUT_MOUSEDEV_PSAUX=y
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++CONFIG_INPUT_JOYDEV=m
++CONFIG_INPUT_TSDEV=m
++CONFIG_INPUT_TSDEV_SCREEN_X=240
++CONFIG_INPUT_TSDEV_SCREEN_Y=320
++CONFIG_INPUT_EVDEV=m
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++CONFIG_INPUT_KEYBOARD=y
++CONFIG_KEYBOARD_ATKBD=y
++CONFIG_KEYBOARD_SUNKBD=m
++CONFIG_KEYBOARD_LKKBD=m
++CONFIG_KEYBOARD_XTKBD=m
++CONFIG_KEYBOARD_NEWTON=m
++CONFIG_INPUT_MOUSE=y
++CONFIG_MOUSE_PS2=y
++CONFIG_MOUSE_SERIAL=m
++CONFIG_MOUSE_VSXXXAA=m
++CONFIG_INPUT_JOYSTICK=y
++CONFIG_JOYSTICK_ANALOG=m
++CONFIG_JOYSTICK_A3D=m
++CONFIG_JOYSTICK_ADI=m
++CONFIG_JOYSTICK_COBRA=m
++CONFIG_JOYSTICK_GF2K=m
++CONFIG_JOYSTICK_GRIP=m
++CONFIG_JOYSTICK_GRIP_MP=m
++CONFIG_JOYSTICK_GUILLEMOT=m
++CONFIG_JOYSTICK_INTERACT=m
++CONFIG_JOYSTICK_SIDEWINDER=m
++CONFIG_JOYSTICK_TMDC=m
++CONFIG_JOYSTICK_IFORCE=m
++CONFIG_JOYSTICK_IFORCE_USB=y
++CONFIG_JOYSTICK_IFORCE_232=y
++CONFIG_JOYSTICK_WARRIOR=m
++CONFIG_JOYSTICK_MAGELLAN=m
++CONFIG_JOYSTICK_SPACEORB=m
++CONFIG_JOYSTICK_SPACEBALL=m
++CONFIG_JOYSTICK_STINGER=m
++CONFIG_JOYSTICK_TWIDJOY=m
++CONFIG_JOYSTICK_DB9=m
++CONFIG_JOYSTICK_GAMECON=m
++CONFIG_JOYSTICK_TURBOGRAFX=m
++CONFIG_JOYSTICK_JOYDUMP=m
++CONFIG_INPUT_TOUCHSCREEN=y
++CONFIG_TOUCHSCREEN_ADS7846=m
++CONFIG_TOUCHSCREEN_GUNZE=m
++CONFIG_TOUCHSCREEN_ELO=m
++CONFIG_TOUCHSCREEN_MTOUCH=m
++CONFIG_TOUCHSCREEN_MK712=m
++CONFIG_INPUT_MISC=y
++CONFIG_INPUT_PCSPKR=m
++CONFIG_INPUT_WISTRON_BTNS=m
++CONFIG_INPUT_UINPUT=m
++
++#
++# Hardware I/O ports
++#
++CONFIG_SERIO=y
++CONFIG_SERIO_I8042=y
++CONFIG_SERIO_SERPORT=m
++CONFIG_SERIO_CT82C710=m
++CONFIG_SERIO_PARKBD=m
++CONFIG_SERIO_PCIPS2=m
++CONFIG_SERIO_LIBPS2=y
++CONFIG_SERIO_RAW=m
++CONFIG_GAMEPORT=m
++CONFIG_GAMEPORT_NS558=m
++CONFIG_GAMEPORT_L4=m
++CONFIG_GAMEPORT_EMU10K1=m
++CONFIG_GAMEPORT_FM801=m
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++CONFIG_VT_HW_CONSOLE_BINDING=y
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++CONFIG_SERIAL_8250=m
++CONFIG_SERIAL_8250_PCI=m
++CONFIG_SERIAL_8250_PNP=m
++# CONFIG_SERIAL_8250_CS is not set
++CONFIG_SERIAL_8250_NR_UARTS=4
++CONFIG_SERIAL_8250_RUNTIME_UARTS=4
++# CONFIG_SERIAL_8250_EXTENDED is not set
++
++#
++# Non-8250 serial port support
++#
++CONFIG_SERIAL_CORE=m
++CONFIG_SERIAL_JSM=m
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=256
++CONFIG_PRINTER=m
++# CONFIG_LP_CONSOLE is not set
++CONFIG_PPDEV=m
++CONFIG_TIPAR=m
++
++#
++# IPMI
++#
++CONFIG_IPMI_HANDLER=m
++# CONFIG_IPMI_PANIC_EVENT is not set
++CONFIG_IPMI_DEVICE_INTERFACE=m
++CONFIG_IPMI_SI=m
++CONFIG_IPMI_WATCHDOG=m
++CONFIG_IPMI_POWEROFF=m
++
++#
++# Watchdog Cards
++#
++CONFIG_WATCHDOG=y
++# CONFIG_WATCHDOG_NOWAYOUT is not set
++
++#
++# Watchdog Device Drivers
++#
++CONFIG_SOFT_WATCHDOG=m
++CONFIG_ACQUIRE_WDT=m
++CONFIG_ADVANTECH_WDT=m
++CONFIG_ALIM1535_WDT=m
++CONFIG_ALIM7101_WDT=m
++CONFIG_SC520_WDT=m
++CONFIG_EUROTECH_WDT=m
++CONFIG_IB700_WDT=m
++CONFIG_IBMASR=m
++CONFIG_WAFER_WDT=m
++CONFIG_I6300ESB_WDT=m
++CONFIG_I8XX_TCO=m
++CONFIG_SC1200_WDT=m
++CONFIG_SCx200_WDT=m
++CONFIG_60XX_WDT=m
++CONFIG_SBC8360_WDT=m
++CONFIG_CPU5_WDT=m
++CONFIG_W83627HF_WDT=m
++CONFIG_W83877F_WDT=m
++CONFIG_W83977F_WDT=m
++CONFIG_MACHZ_WDT=m
++CONFIG_SBC_EPX_C3_WATCHDOG=m
++
++#
++# PCI-based Watchdog Cards
++#
++CONFIG_PCIPCWATCHDOG=m
++CONFIG_WDTPCI=m
++CONFIG_WDT_501_PCI=y
++
++#
++# USB-based Watchdog Cards
++#
++CONFIG_USBPCWATCHDOG=m
++CONFIG_HW_RANDOM=y
++CONFIG_HW_RANDOM_INTEL=m
++CONFIG_HW_RANDOM_AMD=m
++CONFIG_HW_RANDOM_GEODE=m
++CONFIG_HW_RANDOM_VIA=m
++CONFIG_NVRAM=m
++CONFIG_RTC=m
++CONFIG_GEN_RTC=m
++CONFIG_GEN_RTC_X=y
++CONFIG_DTLK=m
++CONFIG_R3964=m
++CONFIG_APPLICOM=m
++CONFIG_SONYPI=m
++
++#
++# Ftape, the floppy tape device driver
++#
++CONFIG_AGP=m
++CONFIG_AGP_ALI=m
++CONFIG_AGP_ATI=m
++CONFIG_AGP_AMD=m
++CONFIG_AGP_AMD64=m
++CONFIG_AGP_INTEL=m
++CONFIG_AGP_NVIDIA=m
++CONFIG_AGP_SIS=m
++CONFIG_AGP_SWORKS=m
++CONFIG_AGP_VIA=m
++CONFIG_AGP_EFFICEON=m
++CONFIG_DRM=m
++CONFIG_DRM_TDFX=m
++CONFIG_DRM_R128=m
++CONFIG_DRM_RADEON=m
++CONFIG_DRM_I810=m
++CONFIG_DRM_I830=m
++CONFIG_DRM_I915=m
++CONFIG_DRM_MGA=m
++CONFIG_DRM_SIS=m
++CONFIG_DRM_VIA=m
++CONFIG_DRM_SAVAGE=m
++
++#
++# PCMCIA character devices
++#
++CONFIG_SYNCLINK_CS=m
++CONFIG_CARDMAN_4000=m
++CONFIG_CARDMAN_4040=m
++CONFIG_MWAVE=m
++CONFIG_SCx200_GPIO=m
++CONFIG_PC8736x_GPIO=m
++CONFIG_NSC_GPIO=m
++CONFIG_CS5535_GPIO=m
++CONFIG_RAW_DRIVER=m
++CONFIG_MAX_RAW_DEVS=256
++# CONFIG_HPET is not set
++CONFIG_HANGCHECK_TIMER=m
++
++#
++# TPM devices
++#
++CONFIG_TCG_TPM=m
++CONFIG_TCG_TIS=m
++CONFIG_TCG_NSC=m
++CONFIG_TCG_ATMEL=m
++CONFIG_TCG_INFINEON=m
++CONFIG_TCG_XEN=m
++CONFIG_TELCLOCK=m
++
++#
++# I2C support
++#
++CONFIG_I2C=m
++CONFIG_I2C_CHARDEV=m
++
++#
++# I2C Algorithms
++#
++CONFIG_I2C_ALGOBIT=m
++CONFIG_I2C_ALGOPCF=m
++CONFIG_I2C_ALGOPCA=m
++
++#
++# I2C Hardware Bus support
++#
++CONFIG_I2C_ALI1535=m
++CONFIG_I2C_ALI1563=m
++CONFIG_I2C_ALI15X3=m
++CONFIG_I2C_AMD756=m
++CONFIG_I2C_AMD756_S4882=m
++CONFIG_I2C_AMD8111=m
++CONFIG_I2C_I801=m
++CONFIG_I2C_I810=m
++CONFIG_I2C_PIIX4=m
++CONFIG_I2C_ISA=m
++CONFIG_I2C_NFORCE2=m
++CONFIG_I2C_OCORES=m
++CONFIG_I2C_PARPORT=m
++CONFIG_I2C_PARPORT_LIGHT=m
++CONFIG_I2C_PROSAVAGE=m
++CONFIG_I2C_SAVAGE4=m
++CONFIG_SCx200_I2C=m
++CONFIG_SCx200_I2C_SCL=12
++CONFIG_SCx200_I2C_SDA=13
++CONFIG_SCx200_ACB=m
++CONFIG_I2C_SIS5595=m
++CONFIG_I2C_SIS630=m
++CONFIG_I2C_SIS96X=m
++CONFIG_I2C_STUB=m
++CONFIG_I2C_VIA=m
++CONFIG_I2C_VIAPRO=m
++CONFIG_I2C_VOODOO3=m
++CONFIG_I2C_PCA_ISA=m
++
++#
++# Miscellaneous I2C Chip support
++#
++CONFIG_SENSORS_DS1337=m
++CONFIG_SENSORS_DS1374=m
++CONFIG_SENSORS_EEPROM=m
++CONFIG_SENSORS_PCF8574=m
++CONFIG_SENSORS_PCA9539=m
++CONFIG_SENSORS_PCF8591=m
++CONFIG_SENSORS_MAX6875=m
++# CONFIG_I2C_DEBUG_CORE is not set
++# CONFIG_I2C_DEBUG_ALGO is not set
++# CONFIG_I2C_DEBUG_BUS is not set
++# CONFIG_I2C_DEBUG_CHIP is not set
++
++#
++# SPI support
++#
++CONFIG_SPI=y
++# CONFIG_SPI_DEBUG is not set
++CONFIG_SPI_MASTER=y
++
++#
++# SPI Master Controller Drivers
++#
++CONFIG_SPI_BITBANG=m
++CONFIG_SPI_BUTTERFLY=m
++
++#
++# SPI Protocol Masters
++#
++
++#
++# Dallas's 1-wire bus
++#
++CONFIG_W1=m
++CONFIG_W1_CON=y
++
++#
++# 1-wire Bus Masters
++#
++CONFIG_W1_MASTER_MATROX=m
++CONFIG_W1_MASTER_DS2490=m
++CONFIG_W1_MASTER_DS2482=m
++
++#
++# 1-wire Slaves
++#
++CONFIG_W1_SLAVE_THERM=m
++CONFIG_W1_SLAVE_SMEM=m
++CONFIG_W1_SLAVE_DS2433=m
++# CONFIG_W1_SLAVE_DS2433_CRC is not set
++
++#
++# Hardware Monitoring support
++#
++CONFIG_HWMON=m
++CONFIG_HWMON_VID=m
++CONFIG_SENSORS_ABITUGURU=m
++CONFIG_SENSORS_ADM1021=m
++CONFIG_SENSORS_ADM1025=m
++CONFIG_SENSORS_ADM1026=m
++CONFIG_SENSORS_ADM1031=m
++CONFIG_SENSORS_ADM9240=m
++CONFIG_SENSORS_ASB100=m
++CONFIG_SENSORS_ATXP1=m
++CONFIG_SENSORS_DS1621=m
++CONFIG_SENSORS_F71805F=m
++CONFIG_SENSORS_FSCHER=m
++CONFIG_SENSORS_FSCPOS=m
++CONFIG_SENSORS_GL518SM=m
++CONFIG_SENSORS_GL520SM=m
++CONFIG_SENSORS_IT87=m
++CONFIG_SENSORS_LM63=m
++CONFIG_SENSORS_LM70=m
++CONFIG_SENSORS_LM75=m
++CONFIG_SENSORS_LM77=m
++CONFIG_SENSORS_LM78=m
++CONFIG_SENSORS_LM80=m
++CONFIG_SENSORS_LM83=m
++CONFIG_SENSORS_LM85=m
++CONFIG_SENSORS_LM87=m
++CONFIG_SENSORS_LM90=m
++CONFIG_SENSORS_LM92=m
++CONFIG_SENSORS_MAX1619=m
++CONFIG_SENSORS_PC87360=m
++CONFIG_SENSORS_SIS5595=m
++CONFIG_SENSORS_SMSC47M1=m
++CONFIG_SENSORS_SMSC47M192=m
++CONFIG_SENSORS_SMSC47B397=m
++CONFIG_SENSORS_VIA686A=m
++CONFIG_SENSORS_VT8231=m
++CONFIG_SENSORS_W83781D=m
++CONFIG_SENSORS_W83791D=m
++CONFIG_SENSORS_W83792D=m
++CONFIG_SENSORS_W83L785TS=m
++CONFIG_SENSORS_W83627HF=m
++CONFIG_SENSORS_W83627EHF=m
++CONFIG_SENSORS_HDAPS=m
++# CONFIG_HWMON_DEBUG_CHIP is not set
++
++#
++# Misc devices
++#
++CONFIG_IBM_ASM=m
++
++#
++# Multimedia devices
++#
++CONFIG_VIDEO_DEV=m
++CONFIG_VIDEO_V4L1=y
++CONFIG_VIDEO_V4L1_COMPAT=y
++CONFIG_VIDEO_V4L2=y
++
++#
++# Video Capture Adapters
++#
++
++#
++# Video Capture Adapters
++#
++# CONFIG_VIDEO_ADV_DEBUG is not set
++CONFIG_VIDEO_VIVI=m
++CONFIG_VIDEO_BT848=m
++CONFIG_VIDEO_BT848_DVB=y
++CONFIG_VIDEO_SAA6588=m
++CONFIG_VIDEO_BWQCAM=m
++CONFIG_VIDEO_CQCAM=m
++CONFIG_VIDEO_W9966=m
++CONFIG_VIDEO_CPIA=m
++CONFIG_VIDEO_CPIA_PP=m
++CONFIG_VIDEO_CPIA_USB=m
++CONFIG_VIDEO_CPIA2=m
++CONFIG_VIDEO_SAA5246A=m
++CONFIG_VIDEO_SAA5249=m
++CONFIG_TUNER_3036=m
++CONFIG_VIDEO_STRADIS=m
++CONFIG_VIDEO_ZORAN=m
++CONFIG_VIDEO_ZORAN_BUZ=m
++CONFIG_VIDEO_ZORAN_DC10=m
++CONFIG_VIDEO_ZORAN_DC30=m
++CONFIG_VIDEO_ZORAN_LML33=m
++CONFIG_VIDEO_ZORAN_LML33R10=m
++CONFIG_VIDEO_ZORAN_AVS6EYES=m
++CONFIG_VIDEO_MEYE=m
++CONFIG_VIDEO_SAA7134=m
++CONFIG_VIDEO_SAA7134_ALSA=m
++# CONFIG_VIDEO_SAA7134_OSS is not set
++CONFIG_VIDEO_SAA7134_DVB=m
++CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y
++CONFIG_VIDEO_MXB=m
++CONFIG_VIDEO_DPC=m
++CONFIG_VIDEO_HEXIUM_ORION=m
++CONFIG_VIDEO_HEXIUM_GEMINI=m
++CONFIG_VIDEO_CX88_VP3054=m
++CONFIG_VIDEO_CX88=m
++CONFIG_VIDEO_CX88_ALSA=m
++CONFIG_VIDEO_CX88_BLACKBIRD=m
++CONFIG_VIDEO_CX88_DVB=m
++CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y
++
++#
++# Encoders and Decoders
++#
++CONFIG_VIDEO_MSP3400=m
++CONFIG_VIDEO_CS53L32A=m
++CONFIG_VIDEO_TLV320AIC23B=m
++CONFIG_VIDEO_WM8775=m
++CONFIG_VIDEO_WM8739=m
++CONFIG_VIDEO_CX2341X=m
++CONFIG_VIDEO_CX25840=m
++CONFIG_VIDEO_SAA711X=m
++CONFIG_VIDEO_SAA7127=m
++CONFIG_VIDEO_UPD64031A=m
++CONFIG_VIDEO_UPD64083=m
++
++#
++# V4L USB devices
++#
++CONFIG_VIDEO_PVRUSB2=m
++CONFIG_VIDEO_PVRUSB2_24XXX=y
++CONFIG_VIDEO_PVRUSB2_SYSFS=y
++# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
++CONFIG_VIDEO_EM28XX=m
++CONFIG_VIDEO_USBVIDEO=m
++CONFIG_USB_VICAM=m
++CONFIG_USB_IBMCAM=m
++CONFIG_USB_KONICAWC=m
++CONFIG_USB_QUICKCAM_MESSENGER=m
++CONFIG_USB_ET61X251=m
++CONFIG_VIDEO_OVCAMCHIP=m
++CONFIG_USB_W9968CF=m
++CONFIG_USB_OV511=m
++CONFIG_USB_SE401=m
++CONFIG_USB_SN9C102=m
++CONFIG_USB_STV680=m
++CONFIG_USB_ZC0301=m
++CONFIG_USB_PWC=m
++# CONFIG_USB_PWC_DEBUG is not set
++
++#
++# Radio Adapters
++#
++CONFIG_RADIO_GEMTEK_PCI=m
++CONFIG_RADIO_MAXIRADIO=m
++CONFIG_RADIO_MAESTRO=m
++CONFIG_USB_DSBR=m
++
++#
++# Digital Video Broadcasting Devices
++#
++CONFIG_DVB=y
++CONFIG_DVB_CORE=m
++
++#
++# Supported SAA7146 based PCI Adapters
++#
++CONFIG_DVB_AV7110=m
++CONFIG_DVB_AV7110_OSD=y
++CONFIG_DVB_BUDGET=m
++CONFIG_DVB_BUDGET_CI=m
++CONFIG_DVB_BUDGET_AV=m
++CONFIG_DVB_BUDGET_PATCH=m
++
++#
++# Supported USB Adapters
++#
++CONFIG_DVB_USB=m
++# CONFIG_DVB_USB_DEBUG is not set
++CONFIG_DVB_USB_A800=m
++CONFIG_DVB_USB_DIBUSB_MB=m
++# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
++CONFIG_DVB_USB_DIBUSB_MC=m
++CONFIG_DVB_USB_UMT_010=m
++CONFIG_DVB_USB_CXUSB=m
++CONFIG_DVB_USB_DIGITV=m
++CONFIG_DVB_USB_VP7045=m
++CONFIG_DVB_USB_VP702X=m
++CONFIG_DVB_USB_GP8PSK=m
++CONFIG_DVB_USB_NOVA_T_USB2=m
++CONFIG_DVB_USB_DTT200U=m
++CONFIG_DVB_TTUSB_BUDGET=m
++CONFIG_DVB_TTUSB_DEC=m
++CONFIG_DVB_CINERGYT2=m
++# CONFIG_DVB_CINERGYT2_TUNING is not set
++
++#
++# Supported FlexCopII (B2C2) Adapters
++#
++CONFIG_DVB_B2C2_FLEXCOP=m
++CONFIG_DVB_B2C2_FLEXCOP_PCI=m
++CONFIG_DVB_B2C2_FLEXCOP_USB=m
++# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
++
++#
++# Supported BT878 Adapters
++#
++CONFIG_DVB_BT8XX=m
++
++#
++# Supported Pluto2 Adapters
++#
++CONFIG_DVB_PLUTO2=m
++
++#
++# Supported DVB Frontends
++#
++
++#
++# Customise DVB Frontends
++#
++
++#
++# DVB-S (satellite) frontends
++#
++CONFIG_DVB_STV0299=m
++CONFIG_DVB_CX24110=m
++CONFIG_DVB_CX24123=m
++CONFIG_DVB_TDA8083=m
++CONFIG_DVB_MT312=m
++CONFIG_DVB_VES1X93=m
++CONFIG_DVB_S5H1420=m
++
++#
++# DVB-T (terrestrial) frontends
++#
++CONFIG_DVB_SP8870=m
++CONFIG_DVB_SP887X=m
++CONFIG_DVB_CX22700=m
++CONFIG_DVB_CX22702=m
++CONFIG_DVB_L64781=m
++CONFIG_DVB_TDA1004X=m
++CONFIG_DVB_NXT6000=m
++CONFIG_DVB_MT352=m
++CONFIG_DVB_ZL10353=m
++CONFIG_DVB_DIB3000MB=m
++CONFIG_DVB_DIB3000MC=m
++
++#
++# DVB-C (cable) frontends
++#
++CONFIG_DVB_VES1820=m
++CONFIG_DVB_TDA10021=m
++CONFIG_DVB_STV0297=m
++
++#
++# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
++#
++CONFIG_DVB_NXT200X=m
++CONFIG_DVB_OR51211=m
++CONFIG_DVB_OR51132=m
++CONFIG_DVB_BCM3510=m
++CONFIG_DVB_LGDT330X=m
++
++#
++# Miscellaneous devices
++#
++CONFIG_DVB_PLL=m
++CONFIG_DVB_LNBP21=m
++CONFIG_DVB_ISL6421=m
++CONFIG_VIDEO_SAA7146=m
++CONFIG_VIDEO_SAA7146_VV=m
++CONFIG_VIDEO_VIDEOBUF=m
++CONFIG_VIDEO_TUNER=m
++CONFIG_VIDEO_BUF=m
++CONFIG_VIDEO_BUF_DVB=m
++CONFIG_VIDEO_BTCX=m
++CONFIG_VIDEO_IR=m
++CONFIG_VIDEO_TVEEPROM=m
++CONFIG_USB_DABUSB=m
++
++#
++# Graphics support
++#
++CONFIG_FIRMWARE_EDID=y
++CONFIG_FB=y
++CONFIG_FB_CFB_FILLRECT=y
++CONFIG_FB_CFB_COPYAREA=y
++CONFIG_FB_CFB_IMAGEBLIT=y
++# CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
++CONFIG_FB_MODE_HELPERS=y
++CONFIG_FB_TILEBLITTING=y
++CONFIG_FB_CIRRUS=m
++CONFIG_FB_PM2=m
++CONFIG_FB_PM2_FIFO_DISCONNECT=y
++CONFIG_FB_CYBER2000=m
++CONFIG_FB_ARC=m
++# CONFIG_FB_ASILIANT is not set
++# CONFIG_FB_IMSTT is not set
++CONFIG_FB_VGA16=m
++CONFIG_FB_VESA=y
++CONFIG_FB_HGA=m
++# CONFIG_FB_HGA_ACCEL is not set
++CONFIG_FB_S1D13XXX=m
++CONFIG_FB_NVIDIA=m
++CONFIG_FB_NVIDIA_I2C=y
++CONFIG_FB_RIVA=m
++CONFIG_FB_RIVA_I2C=y
++CONFIG_FB_RIVA_DEBUG=y
++CONFIG_FB_I810=m
++# CONFIG_FB_I810_GTF is not set
++CONFIG_FB_INTEL=m
++# CONFIG_FB_INTEL_DEBUG is not set
++CONFIG_FB_MATROX=m
++CONFIG_FB_MATROX_MILLENIUM=y
++CONFIG_FB_MATROX_MYSTIQUE=y
++CONFIG_FB_MATROX_G=y
++# CONFIG_FB_MATROX_I2C is not set
++CONFIG_FB_MATROX_MULTIHEAD=y
++CONFIG_FB_RADEON=m
++CONFIG_FB_RADEON_I2C=y
++# CONFIG_FB_RADEON_DEBUG is not set
++CONFIG_FB_ATY128=m
++CONFIG_FB_ATY=m
++CONFIG_FB_ATY_CT=y
++CONFIG_FB_ATY_GENERIC_LCD=y
++CONFIG_FB_ATY_GX=y
++CONFIG_FB_SAVAGE=m
++CONFIG_FB_SAVAGE_I2C=y
++CONFIG_FB_SAVAGE_ACCEL=y
++CONFIG_FB_SIS=m
++CONFIG_FB_SIS_300=y
++CONFIG_FB_SIS_315=y
++CONFIG_FB_NEOMAGIC=m
++CONFIG_FB_KYRO=m
++CONFIG_FB_3DFX=m
++# CONFIG_FB_3DFX_ACCEL is not set
++CONFIG_FB_VOODOO1=m
++CONFIG_FB_CYBLA=m
++CONFIG_FB_TRIDENT=m
++# CONFIG_FB_TRIDENT_ACCEL is not set
++CONFIG_FB_GEODE=y
++CONFIG_FB_GEODE_GX=m
++CONFIG_FB_GEODE_GX1=m
++CONFIG_FB_VIRTUAL=m
++
++#
++# Console display driver support
++#
++CONFIG_VGA_CONSOLE=y
++# CONFIG_VGACON_SOFT_SCROLLBACK is not set
++CONFIG_VIDEO_SELECT=y
++CONFIG_DUMMY_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE=m
++# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
++# CONFIG_FONTS is not set
++CONFIG_FONT_8x8=y
++CONFIG_FONT_8x16=y
++
++#
++# Logo configuration
++#
++# CONFIG_LOGO is not set
++CONFIG_BACKLIGHT_LCD_SUPPORT=y
++CONFIG_BACKLIGHT_CLASS_DEVICE=m
++CONFIG_BACKLIGHT_DEVICE=y
++CONFIG_LCD_CLASS_DEVICE=m
++CONFIG_LCD_DEVICE=y
++
++#
++# Sound
++#
++CONFIG_SOUND=m
++
++#
++# Advanced Linux Sound Architecture
++#
++CONFIG_SND=m
++CONFIG_SND_TIMER=m
++CONFIG_SND_PCM=m
++CONFIG_SND_HWDEP=m
++CONFIG_SND_RAWMIDI=m
++CONFIG_SND_SEQUENCER=m
++CONFIG_SND_SEQ_DUMMY=m
++CONFIG_SND_OSSEMUL=y
++CONFIG_SND_MIXER_OSS=m
++CONFIG_SND_PCM_OSS=m
++CONFIG_SND_PCM_OSS_PLUGINS=y
++CONFIG_SND_SEQUENCER_OSS=y
++CONFIG_SND_RTCTIMER=m
++CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
++# CONFIG_SND_DYNAMIC_MINORS is not set
++CONFIG_SND_SUPPORT_OLD_API=y
++CONFIG_SND_VERBOSE_PROCFS=y
++# CONFIG_SND_VERBOSE_PRINTK is not set
++# CONFIG_SND_DEBUG is not set
++
++#
++# Generic devices
++#
++CONFIG_SND_MPU401_UART=m
++CONFIG_SND_OPL3_LIB=m
++CONFIG_SND_VX_LIB=m
++CONFIG_SND_AC97_CODEC=m
++CONFIG_SND_AC97_BUS=m
++CONFIG_SND_DUMMY=m
++CONFIG_SND_VIRMIDI=m
++CONFIG_SND_MTPAV=m
++CONFIG_SND_SERIAL_U16550=m
++CONFIG_SND_MPU401=m
++
++#
++# PCI devices
++#
++CONFIG_SND_AD1889=m
++CONFIG_SND_ALS300=m
++CONFIG_SND_ALS4000=m
++CONFIG_SND_ALI5451=m
++CONFIG_SND_ATIIXP=m
++CONFIG_SND_ATIIXP_MODEM=m
++CONFIG_SND_AU8810=m
++CONFIG_SND_AU8820=m
++CONFIG_SND_AU8830=m
++CONFIG_SND_AZT3328=m
++CONFIG_SND_BT87X=m
++# CONFIG_SND_BT87X_OVERCLOCK is not set
++CONFIG_SND_CA0106=m
++CONFIG_SND_CMIPCI=m
++CONFIG_SND_CS4281=m
++CONFIG_SND_CS46XX=m
++CONFIG_SND_CS46XX_NEW_DSP=y
++CONFIG_SND_CS5535AUDIO=m
++CONFIG_SND_DARLA20=m
++CONFIG_SND_GINA20=m
++CONFIG_SND_LAYLA20=m
++CONFIG_SND_DARLA24=m
++CONFIG_SND_GINA24=m
++CONFIG_SND_LAYLA24=m
++CONFIG_SND_MONA=m
++CONFIG_SND_MIA=m
++CONFIG_SND_ECHO3G=m
++CONFIG_SND_INDIGO=m
++CONFIG_SND_INDIGOIO=m
++CONFIG_SND_INDIGODJ=m
++CONFIG_SND_EMU10K1=m
++CONFIG_SND_EMU10K1X=m
++CONFIG_SND_ENS1370=m
++CONFIG_SND_ENS1371=m
++CONFIG_SND_ES1938=m
++CONFIG_SND_ES1968=m
++CONFIG_SND_FM801=m
++# CONFIG_SND_FM801_TEA575X_BOOL is not set
++CONFIG_SND_HDA_INTEL=m
++CONFIG_SND_HDSP=m
++CONFIG_SND_HDSPM=m
++CONFIG_SND_ICE1712=m
++CONFIG_SND_ICE1724=m
++CONFIG_SND_INTEL8X0=m
++CONFIG_SND_INTEL8X0M=m
++CONFIG_SND_KORG1212=m
++CONFIG_SND_MAESTRO3=m
++CONFIG_SND_MIXART=m
++CONFIG_SND_NM256=m
++CONFIG_SND_PCXHR=m
++CONFIG_SND_RIPTIDE=m
++CONFIG_SND_RME32=m
++CONFIG_SND_RME96=m
++CONFIG_SND_RME9652=m
++CONFIG_SND_SONICVIBES=m
++CONFIG_SND_TRIDENT=m
++CONFIG_SND_VIA82XX=m
++# CONFIG_SND_VIA82XX_MODEM is not set
++CONFIG_SND_VX222=m
++CONFIG_SND_YMFPCI=m
++
++#
++# USB devices
++#
++CONFIG_SND_USB_AUDIO=m
++CONFIG_SND_USB_USX2Y=m
++
++#
++# PCMCIA devices
++#
++CONFIG_SND_VXPOCKET=m
++CONFIG_SND_PDAUDIOCF=m
++
++#
++# Open Sound System
++#
++CONFIG_SOUND_PRIME=m
++# CONFIG_OSS_OBSOLETE_DRIVER is not set
++CONFIG_SOUND_BT878=m
++CONFIG_SOUND_ES1371=m
++CONFIG_SOUND_ICH=m
++CONFIG_SOUND_TRIDENT=m
++# CONFIG_SOUND_MSNDCLAS is not set
++# CONFIG_SOUND_MSNDPIN is not set
++CONFIG_SOUND_VIA82CXXX=m
++# CONFIG_MIDI_VIA82CXXX is not set
++# CONFIG_SOUND_OSS is not set
++CONFIG_SOUND_TVMIXER=m
++
++#
++# USB support
++#
++CONFIG_USB_ARCH_HAS_HCD=y
++CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
++CONFIG_USB=m
++# CONFIG_USB_DEBUG is not set
++
++#
++# Miscellaneous USB options
++#
++CONFIG_USB_DEVICEFS=y
++CONFIG_USB_BANDWIDTH=y
++# CONFIG_USB_DYNAMIC_MINORS is not set
++# CONFIG_USB_SUSPEND is not set
++# CONFIG_USB_OTG is not set
++
++#
++# USB Host Controller Drivers
++#
++CONFIG_USB_EHCI_HCD=m
++CONFIG_USB_EHCI_SPLIT_ISO=y
++CONFIG_USB_EHCI_ROOT_HUB_TT=y
++CONFIG_USB_EHCI_TT_NEWSCHED=y
++CONFIG_USB_ISP116X_HCD=m
++CONFIG_USB_OHCI_HCD=m
++# CONFIG_USB_OHCI_BIG_ENDIAN is not set
++CONFIG_USB_OHCI_LITTLE_ENDIAN=y
++CONFIG_USB_UHCI_HCD=m
++CONFIG_USB_SL811_HCD=m
++CONFIG_USB_SL811_CS=m
++
++#
++# USB Device Class drivers
++#
++CONFIG_USB_ACM=m
++CONFIG_USB_PRINTER=m
++
++#
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
++#
++
++#
++# may also be needed; see USB_STORAGE Help for more information
++#
++CONFIG_USB_STORAGE=m
++# CONFIG_USB_STORAGE_DEBUG is not set
++CONFIG_USB_STORAGE_DATAFAB=y
++CONFIG_USB_STORAGE_FREECOM=y
++CONFIG_USB_STORAGE_ISD200=y
++CONFIG_USB_STORAGE_DPCM=y
++CONFIG_USB_STORAGE_USBAT=y
++CONFIG_USB_STORAGE_SDDR09=y
++CONFIG_USB_STORAGE_SDDR55=y
++CONFIG_USB_STORAGE_JUMPSHOT=y
++CONFIG_USB_STORAGE_ALAUDA=y
++CONFIG_USB_LIBUSUAL=y
++
++#
++# USB Input Devices
++#
++CONFIG_USB_HID=m
++CONFIG_USB_HIDINPUT=y
++# CONFIG_USB_HIDINPUT_POWERBOOK is not set
++CONFIG_HID_FF=y
++CONFIG_HID_PID=y
++CONFIG_LOGITECH_FF=y
++CONFIG_THRUSTMASTER_FF=y
++CONFIG_USB_HIDDEV=y
++
++#
++# USB HID Boot Protocol drivers
++#
++# CONFIG_USB_KBD is not set
++# CONFIG_USB_MOUSE is not set
++CONFIG_USB_AIPTEK=m
++CONFIG_USB_WACOM=m
++CONFIG_USB_ACECAD=m
++CONFIG_USB_KBTAB=m
++CONFIG_USB_POWERMATE=m
++CONFIG_USB_TOUCHSCREEN=m
++CONFIG_USB_TOUCHSCREEN_EGALAX=y
++CONFIG_USB_TOUCHSCREEN_PANJIT=y
++CONFIG_USB_TOUCHSCREEN_3M=y
++CONFIG_USB_TOUCHSCREEN_ITM=y
++CONFIG_USB_YEALINK=m
++CONFIG_USB_XPAD=m
++CONFIG_USB_ATI_REMOTE=m
++CONFIG_USB_ATI_REMOTE2=m
++CONFIG_USB_KEYSPAN_REMOTE=m
++CONFIG_USB_APPLETOUCH=m
++
++#
++# USB Imaging devices
++#
++CONFIG_USB_MDC800=m
++CONFIG_USB_MICROTEK=m
++
++#
++# USB Network Adapters
++#
++CONFIG_USB_CATC=m
++CONFIG_USB_KAWETH=m
++CONFIG_USB_PEGASUS=m
++CONFIG_USB_RTL8150=m
++CONFIG_USB_USBNET=m
++CONFIG_USB_NET_AX8817X=m
++CONFIG_USB_NET_CDCETHER=m
++CONFIG_USB_NET_GL620A=m
++CONFIG_USB_NET_NET1080=m
++CONFIG_USB_NET_PLUSB=m
++CONFIG_USB_NET_RNDIS_HOST=m
++CONFIG_USB_NET_CDC_SUBSET=m
++CONFIG_USB_ALI_M5632=y
++CONFIG_USB_AN2720=y
++CONFIG_USB_BELKIN=y
++CONFIG_USB_ARMLINUX=y
++# CONFIG_USB_EPSON2888 is not set
++CONFIG_USB_NET_ZAURUS=m
++CONFIG_USB_MON=y
++
++#
++# USB port drivers
++#
++CONFIG_USB_USS720=m
++
++#
++# USB Serial Converter support
++#
++CONFIG_USB_SERIAL=m
++CONFIG_USB_SERIAL_GENERIC=y
++CONFIG_USB_SERIAL_AIRPRIME=m
++CONFIG_USB_SERIAL_ARK3116=m
++CONFIG_USB_SERIAL_BELKIN=m
++CONFIG_USB_SERIAL_WHITEHEAT=m
++CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
++CONFIG_USB_SERIAL_CP2101=m
++CONFIG_USB_SERIAL_CYPRESS_M8=m
++CONFIG_USB_SERIAL_EMPEG=m
++CONFIG_USB_SERIAL_FTDI_SIO=m
++CONFIG_USB_SERIAL_FUNSOFT=m
++CONFIG_USB_SERIAL_VISOR=m
++CONFIG_USB_SERIAL_IPAQ=m
++CONFIG_USB_SERIAL_IR=m
++CONFIG_USB_SERIAL_EDGEPORT=m
++CONFIG_USB_SERIAL_EDGEPORT_TI=m
++CONFIG_USB_SERIAL_GARMIN=m
++CONFIG_USB_SERIAL_IPW=m
++CONFIG_USB_SERIAL_KEYSPAN_PDA=m
++CONFIG_USB_SERIAL_KEYSPAN=m
++CONFIG_USB_SERIAL_KEYSPAN_MPR=y
++CONFIG_USB_SERIAL_KEYSPAN_USA28=y
++CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
++CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
++CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
++CONFIG_USB_SERIAL_KEYSPAN_USA19=y
++CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
++CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
++CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
++CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
++CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
++CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
++CONFIG_USB_SERIAL_KLSI=m
++CONFIG_USB_SERIAL_KOBIL_SCT=m
++CONFIG_USB_SERIAL_MCT_U232=m
++CONFIG_USB_SERIAL_NAVMAN=m
++CONFIG_USB_SERIAL_PL2303=m
++CONFIG_USB_SERIAL_HP4X=m
++CONFIG_USB_SERIAL_SAFE=m
++CONFIG_USB_SERIAL_SAFE_PADDED=y
++CONFIG_USB_SERIAL_SIERRAWIRELESS=m
++CONFIG_USB_SERIAL_TI=m
++CONFIG_USB_SERIAL_CYBERJACK=m
++CONFIG_USB_SERIAL_XIRCOM=m
++CONFIG_USB_SERIAL_OPTION=m
++CONFIG_USB_SERIAL_OMNINET=m
++CONFIG_USB_EZUSB=y
++
++#
++# USB Miscellaneous drivers
++#
++CONFIG_USB_EMI62=m
++CONFIG_USB_EMI26=m
++CONFIG_USB_AUERSWALD=m
++CONFIG_USB_RIO500=m
++CONFIG_USB_LEGOTOWER=m
++CONFIG_USB_LCD=m
++CONFIG_USB_LED=m
++CONFIG_USB_CYPRESS_CY7C63=m
++CONFIG_USB_CYTHERM=m
++CONFIG_USB_PHIDGETKIT=m
++CONFIG_USB_PHIDGETSERVO=m
++CONFIG_USB_IDMOUSE=m
++CONFIG_USB_APPLEDISPLAY=m
++CONFIG_USB_SISUSBVGA=m
++CONFIG_USB_SISUSBVGA_CON=y
++CONFIG_USB_LD=m
++CONFIG_USB_TEST=m
++
++#
++# USB DSL modem support
++#
++CONFIG_USB_ATM=m
++CONFIG_USB_SPEEDTOUCH=m
++CONFIG_USB_CXACRU=m
++CONFIG_USB_UEAGLEATM=m
++CONFIG_USB_XUSBATM=m
++
++#
++# USB Gadget Support
++#
++CONFIG_USB_GADGET=m
++# CONFIG_USB_GADGET_DEBUG_FILES is not set
++CONFIG_USB_GADGET_SELECTED=y
++CONFIG_USB_GADGET_NET2280=y
++CONFIG_USB_NET2280=m
++# CONFIG_USB_GADGET_PXA2XX is not set
++# CONFIG_USB_GADGET_GOKU is not set
++# CONFIG_USB_GADGET_LH7A40X is not set
++# CONFIG_USB_GADGET_OMAP is not set
++# CONFIG_USB_GADGET_AT91 is not set
++# CONFIG_USB_GADGET_DUMMY_HCD is not set
++CONFIG_USB_GADGET_DUALSPEED=y
++CONFIG_USB_ZERO=m
++CONFIG_USB_ETH=m
++CONFIG_USB_ETH_RNDIS=y
++CONFIG_USB_GADGETFS=m
++CONFIG_USB_FILE_STORAGE=m
++# CONFIG_USB_FILE_STORAGE_TEST is not set
++CONFIG_USB_G_SERIAL=m
++
++#
++# MMC/SD Card support
++#
++CONFIG_MMC=m
++# CONFIG_MMC_DEBUG is not set
++CONFIG_MMC_BLOCK=m
++CONFIG_MMC_SDHCI=m
++CONFIG_MMC_WBSD=m
++
++#
++# LED devices
++#
++CONFIG_NEW_LEDS=y
++CONFIG_LEDS_CLASS=m
++
++#
++# LED drivers
++#
++CONFIG_LEDS_NET48XX=m
++
++#
++# LED Triggers
++#
++CONFIG_LEDS_TRIGGERS=y
++CONFIG_LEDS_TRIGGER_TIMER=m
++CONFIG_LEDS_TRIGGER_IDE_DISK=y
++CONFIG_LEDS_TRIGGER_HEARTBEAT=m
++
++#
++# InfiniBand support
++#
++CONFIG_INFINIBAND=m
++CONFIG_INFINIBAND_USER_MAD=m
++CONFIG_INFINIBAND_USER_ACCESS=m
++CONFIG_INFINIBAND_ADDR_TRANS=y
++CONFIG_INFINIBAND_MTHCA=m
++CONFIG_INFINIBAND_MTHCA_DEBUG=y
++CONFIG_INFINIBAND_IPOIB=m
++CONFIG_INFINIBAND_IPOIB_DEBUG=y
++# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
++CONFIG_INFINIBAND_SRP=m
++CONFIG_INFINIBAND_ISER=m
++
++#
++# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
++#
++CONFIG_EDAC=m
++
++#
++# Reporting subsystems
++#
++# CONFIG_EDAC_DEBUG is not set
++CONFIG_EDAC_MM_EDAC=m
++CONFIG_EDAC_AMD76X=m
++CONFIG_EDAC_E7XXX=m
++CONFIG_EDAC_E752X=m
++CONFIG_EDAC_I82875P=m
++CONFIG_EDAC_I82860=m
++CONFIG_EDAC_R82600=m
++CONFIG_EDAC_POLL=y
++
++#
++# Real Time Clock
++#
++CONFIG_RTC_LIB=m
++CONFIG_RTC_CLASS=m
++
++#
++# RTC interfaces
++#
++CONFIG_RTC_INTF_SYSFS=m
++CONFIG_RTC_INTF_PROC=m
++CONFIG_RTC_INTF_DEV=m
++CONFIG_RTC_INTF_DEV_UIE_EMUL=y
++
++#
++# RTC drivers
++#
++CONFIG_RTC_DRV_X1205=m
++CONFIG_RTC_DRV_DS1307=m
++CONFIG_RTC_DRV_DS1553=m
++CONFIG_RTC_DRV_ISL1208=m
++CONFIG_RTC_DRV_DS1672=m
++CONFIG_RTC_DRV_DS1742=m
++CONFIG_RTC_DRV_PCF8563=m
++CONFIG_RTC_DRV_PCF8583=m
++CONFIG_RTC_DRV_RS5C348=m
++CONFIG_RTC_DRV_RS5C372=m
++CONFIG_RTC_DRV_M48T86=m
++CONFIG_RTC_DRV_TEST=m
++CONFIG_RTC_DRV_MAX6902=m
++CONFIG_RTC_DRV_V3020=m
++
++#
++# DMA Engine support
++#
++CONFIG_DMA_ENGINE=y
++
++#
++# DMA Clients
++#
++CONFIG_NET_DMA=y
++
++#
++# DMA Devices
++#
++CONFIG_INTEL_IOATDMA=m
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++CONFIG_EXT2_FS_XATTR=y
++CONFIG_EXT2_FS_POSIX_ACL=y
++CONFIG_EXT2_FS_SECURITY=y
++CONFIG_EXT2_FS_XIP=y
++CONFIG_FS_XIP=y
++CONFIG_EXT3_FS=m
++CONFIG_EXT3_FS_XATTR=y
++CONFIG_EXT3_FS_POSIX_ACL=y
++CONFIG_EXT3_FS_SECURITY=y
++CONFIG_JBD=m
++# CONFIG_JBD_DEBUG is not set
++CONFIG_FS_MBCACHE=y
++CONFIG_REISERFS_FS=m
++# CONFIG_REISERFS_CHECK is not set
++# CONFIG_REISERFS_PROC_INFO is not set
++CONFIG_REISERFS_FS_XATTR=y
++CONFIG_REISERFS_FS_POSIX_ACL=y
++CONFIG_REISERFS_FS_SECURITY=y
++CONFIG_JFS_FS=m
++CONFIG_JFS_POSIX_ACL=y
++# CONFIG_JFS_SECURITY is not set
++# CONFIG_JFS_DEBUG is not set
++CONFIG_JFS_STATISTICS=y
++CONFIG_FS_POSIX_ACL=y
++CONFIG_XFS_FS=m
++CONFIG_XFS_QUOTA=y
++CONFIG_XFS_SECURITY=y
++CONFIG_XFS_POSIX_ACL=y
++CONFIG_XFS_RT=y
++CONFIG_OCFS2_FS=m
++CONFIG_OCFS2_DEBUG_MASKLOG=y
++CONFIG_MINIX_FS=m
++CONFIG_ROMFS_FS=m
++CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
++CONFIG_QUOTA=y
++CONFIG_QFMT_V1=m
++CONFIG_QFMT_V2=m
++CONFIG_QUOTACTL=y
++CONFIG_DNOTIFY=y
++CONFIG_AUTOFS_FS=m
++CONFIG_AUTOFS4_FS=m
++CONFIG_FUSE_FS=m
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=m
++CONFIG_JOLIET=y
++CONFIG_ZISOFS=y
++CONFIG_ZISOFS_FS=m
++CONFIG_UDF_FS=m
++CONFIG_UDF_NLS=y
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=m
++CONFIG_MSDOS_FS=m
++CONFIG_VFAT_FS=m
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++CONFIG_NTFS_FS=m
++# CONFIG_NTFS_DEBUG is not set
++# CONFIG_NTFS_RW is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_KCORE=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_RAMFS=y
++CONFIG_CONFIGFS_FS=m
++
++#
++# Miscellaneous filesystems
++#
++CONFIG_ADFS_FS=m
++# CONFIG_ADFS_FS_RW is not set
++CONFIG_AFFS_FS=m
++CONFIG_HFS_FS=m
++CONFIG_HFSPLUS_FS=m
++CONFIG_BEFS_FS=m
++# CONFIG_BEFS_DEBUG is not set
++CONFIG_BFS_FS=m
++CONFIG_EFS_FS=m
++CONFIG_JFFS_FS=m
++CONFIG_JFFS_FS_VERBOSE=0
++CONFIG_JFFS_PROC_FS=y
++CONFIG_JFFS2_FS=m
++CONFIG_JFFS2_FS_DEBUG=0
++CONFIG_JFFS2_FS_WRITEBUFFER=y
++# CONFIG_JFFS2_SUMMARY is not set
++# CONFIG_JFFS2_FS_XATTR is not set
++# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
++CONFIG_JFFS2_ZLIB=y
++CONFIG_JFFS2_RTIME=y
++# CONFIG_JFFS2_RUBIN is not set
++CONFIG_CRAMFS=m
++CONFIG_VXFS_FS=m
++CONFIG_HPFS_FS=m
++CONFIG_QNX4FS_FS=m
++CONFIG_SYSV_FS=m
++CONFIG_UFS_FS=m
++# CONFIG_UFS_FS_WRITE is not set
++# CONFIG_UFS_DEBUG is not set
++
++#
++# Network File Systems
++#
++CONFIG_NFS_FS=m
++CONFIG_NFS_V3=y
++CONFIG_NFS_V3_ACL=y
++CONFIG_NFS_V4=y
++CONFIG_NFS_DIRECTIO=y
++CONFIG_NFSD=m
++CONFIG_NFSD_V2_ACL=y
++CONFIG_NFSD_V3=y
++CONFIG_NFSD_V3_ACL=y
++CONFIG_NFSD_V4=y
++CONFIG_NFSD_TCP=y
++CONFIG_LOCKD=m
++CONFIG_LOCKD_V4=y
++CONFIG_EXPORTFS=m
++CONFIG_NFS_ACL_SUPPORT=m
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=m
++CONFIG_SUNRPC_GSS=m
++CONFIG_RPCSEC_GSS_KRB5=m
++CONFIG_RPCSEC_GSS_SPKM3=m
++CONFIG_SMB_FS=m
++CONFIG_SMB_NLS_DEFAULT=y
++CONFIG_SMB_NLS_REMOTE="cp850"
++CONFIG_CIFS=m
++CONFIG_CIFS_STATS=y
++CONFIG_CIFS_STATS2=y
++# CONFIG_CIFS_WEAK_PW_HASH is not set
++CONFIG_CIFS_XATTR=y
++# CONFIG_CIFS_POSIX is not set
++# CONFIG_CIFS_DEBUG2 is not set
++# CONFIG_CIFS_EXPERIMENTAL is not set
++CONFIG_NCP_FS=m
++CONFIG_NCPFS_PACKET_SIGNING=y
++CONFIG_NCPFS_IOCTL_LOCKING=y
++CONFIG_NCPFS_STRONG=y
++CONFIG_NCPFS_NFS_NS=y
++CONFIG_NCPFS_OS2_NS=y
++# CONFIG_NCPFS_SMALLDOS is not set
++CONFIG_NCPFS_NLS=y
++CONFIG_NCPFS_EXTRAS=y
++CONFIG_CODA_FS=m
++# CONFIG_CODA_FS_OLD_API is not set
++CONFIG_AFS_FS=m
++CONFIG_RXRPC=m
++CONFIG_9P_FS=m
++
++#
++# Partition Types
++#
++CONFIG_PARTITION_ADVANCED=y
++# CONFIG_ACORN_PARTITION is not set
++CONFIG_OSF_PARTITION=y
++# CONFIG_AMIGA_PARTITION is not set
++CONFIG_ATARI_PARTITION=y
++CONFIG_MAC_PARTITION=y
++CONFIG_MSDOS_PARTITION=y
++CONFIG_BSD_DISKLABEL=y
++# CONFIG_MINIX_SUBPARTITION is not set
++CONFIG_SOLARIS_X86_PARTITION=y
++CONFIG_UNIXWARE_DISKLABEL=y
++CONFIG_LDM_PARTITION=y
++# CONFIG_LDM_DEBUG is not set
++CONFIG_SGI_PARTITION=y
++CONFIG_ULTRIX_PARTITION=y
++CONFIG_SUN_PARTITION=y
++CONFIG_KARMA_PARTITION=y
++CONFIG_EFI_PARTITION=y
++
++#
++# Native Language Support
++#
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="utf8"
++CONFIG_NLS_CODEPAGE_437=m
++CONFIG_NLS_CODEPAGE_737=m
++CONFIG_NLS_CODEPAGE_775=m
++CONFIG_NLS_CODEPAGE_850=m
++CONFIG_NLS_CODEPAGE_852=m
++CONFIG_NLS_CODEPAGE_855=m
++CONFIG_NLS_CODEPAGE_857=m
++CONFIG_NLS_CODEPAGE_860=m
++CONFIG_NLS_CODEPAGE_861=m
++CONFIG_NLS_CODEPAGE_862=m
++CONFIG_NLS_CODEPAGE_863=m
++CONFIG_NLS_CODEPAGE_864=m
++CONFIG_NLS_CODEPAGE_865=m
++CONFIG_NLS_CODEPAGE_866=m
++CONFIG_NLS_CODEPAGE_869=m
++CONFIG_NLS_CODEPAGE_936=m
++CONFIG_NLS_CODEPAGE_950=m
++CONFIG_NLS_CODEPAGE_932=m
++CONFIG_NLS_CODEPAGE_949=m
++CONFIG_NLS_CODEPAGE_874=m
++CONFIG_NLS_ISO8859_8=m
++CONFIG_NLS_CODEPAGE_1250=m
++CONFIG_NLS_CODEPAGE_1251=m
++CONFIG_NLS_ASCII=m
++CONFIG_NLS_ISO8859_1=m
++CONFIG_NLS_ISO8859_2=m
++CONFIG_NLS_ISO8859_3=m
++CONFIG_NLS_ISO8859_4=m
++CONFIG_NLS_ISO8859_5=m
++CONFIG_NLS_ISO8859_6=m
++CONFIG_NLS_ISO8859_7=m
++CONFIG_NLS_ISO8859_9=m
++CONFIG_NLS_ISO8859_13=m
++CONFIG_NLS_ISO8859_14=m
++CONFIG_NLS_ISO8859_15=m
++CONFIG_NLS_KOI8_R=m
++CONFIG_NLS_KOI8_U=m
++CONFIG_NLS_UTF8=m
++
++#
++# Instrumentation Support
++#
++# CONFIG_PROFILING is not set
++# CONFIG_KPROBES is not set
++
++#
++# Kernel hacking
++#
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++# CONFIG_PRINTK_TIME is not set
++CONFIG_MAGIC_SYSRQ=y
++CONFIG_UNUSED_SYMBOLS=y
++CONFIG_DEBUG_KERNEL=y
++CONFIG_LOG_BUF_SHIFT=14
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_SCHEDSTATS is not set
++# CONFIG_DEBUG_SLAB is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_RWSEMS is not set
++# CONFIG_DEBUG_LOCK_ALLOC is not set
++# CONFIG_PROVE_LOCKING is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++# CONFIG_DEBUG_HIGHMEM is not set
++CONFIG_DEBUG_BUGVERBOSE=y
++# CONFIG_DEBUG_INFO is not set
++# CONFIG_DEBUG_FS is not set
++# CONFIG_DEBUG_VM is not set
++# CONFIG_FRAME_POINTER is not set
++# CONFIG_UNWIND_INFO is not set
++CONFIG_FORCED_INLINING=y
++# CONFIG_RCU_TORTURE_TEST is not set
++CONFIG_EARLY_PRINTK=y
++CONFIG_DEBUG_STACKOVERFLOW=y
++# CONFIG_DEBUG_STACK_USAGE is not set
++# CONFIG_DEBUG_PAGEALLOC is not set
++# CONFIG_DEBUG_RODATA is not set
++# CONFIG_4KSTACKS is not set
++CONFIG_X86_FIND_SMP_CONFIG=y
++CONFIG_X86_MPPARSE=y
++
++#
++# Security options
++#
++CONFIG_KEYS=y
++# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
++CONFIG_SECURITY=y
++CONFIG_SECURITY_NETWORK=y
++# CONFIG_SECURITY_NETWORK_XFRM is not set
++CONFIG_SECURITY_CAPABILITIES=y
++CONFIG_SECURITY_ROOTPLUG=m
++CONFIG_SECURITY_SECLVL=m
++# CONFIG_SECURITY_SELINUX is not set
++
++#
++# Cryptographic options
++#
++CONFIG_CRYPTO=y
++CONFIG_CRYPTO_HMAC=y
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_MD4=m
++CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_SHA1=m
++CONFIG_CRYPTO_SHA256=m
++CONFIG_CRYPTO_SHA512=m
++CONFIG_CRYPTO_WP512=m
++CONFIG_CRYPTO_TGR192=m
++CONFIG_CRYPTO_DES=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_AES_586=m
++CONFIG_CRYPTO_CAST5=m
++CONFIG_CRYPTO_CAST6=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_KHAZAD=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_DEFLATE=m
++CONFIG_CRYPTO_MICHAEL_MIC=m
++CONFIG_CRYPTO_CRC32C=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Hardware crypto devices
++#
++# CONFIG_CRYPTO_DEV_PADLOCK is not set
++CONFIG_XEN=y
++CONFIG_XEN_INTERFACE_VERSION=0x00030206
++
++#
++# XEN
++#
++CONFIG_XEN_PRIVILEGED_GUEST=y
++# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
++CONFIG_XEN_PRIVCMD=y
++CONFIG_XEN_XENBUS_DEV=y
++CONFIG_XEN_BACKEND=y
++CONFIG_XEN_BLKDEV_BACKEND=y
++CONFIG_XEN_BLKDEV_TAP=y
++CONFIG_XEN_NETDEV_BACKEND=y
++# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
++# CONFIG_XEN_NETDEV_LOOPBACK is not set
++CONFIG_XEN_PCIDEV_BACKEND=m
++CONFIG_XEN_PCIDEV_BACKEND_VPCI=y
++# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
++# CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
++# CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER is not set
++# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
++CONFIG_XEN_TPMDEV_BACKEND=m
++CONFIG_XEN_BLKDEV_FRONTEND=y
++CONFIG_XEN_NETDEV_FRONTEND=y
++CONFIG_XEN_FRAMEBUFFER=y
++CONFIG_XEN_GRANT_DEV=y
++CONFIG_XEN_KEYBOARD=y
++CONFIG_XEN_SCRUB_PAGES=y
++CONFIG_XEN_DISABLE_SERIAL=y
++CONFIG_XEN_SYSFS=y
++CONFIG_XEN_COMPAT_030002_AND_LATER=y
++# CONFIG_XEN_COMPAT_030004_AND_LATER is not set
++# CONFIG_XEN_COMPAT_030100_AND_LATER is not set
++# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
++CONFIG_XEN_COMPAT=0x030002
++CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
++CONFIG_NO_IDLE_HZ=y
++CONFIG_XEN_SMPBOOT=y
++CONFIG_XEN_BALLOON=y
++CONFIG_XEN_DEVMEM=y
++
++#
++# Library routines
++#
++CONFIG_CRC_CCITT=m
++CONFIG_CRC16=m
++CONFIG_CRC32=y
++CONFIG_LIBCRC32C=m
++CONFIG_AUDIT_GENERIC=y
++CONFIG_ZLIB_INFLATE=m
++CONFIG_ZLIB_DEFLATE=m
++CONFIG_REED_SOLOMON=m
++CONFIG_REED_SOLOMON_DEC16=y
++CONFIG_TEXTSEARCH=y
++CONFIG_TEXTSEARCH_KMP=m
++CONFIG_TEXTSEARCH_BM=m
++CONFIG_TEXTSEARCH_FSM=m
++CONFIG_PLIST=y
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_GENERIC_PENDING_IRQ=y
++CONFIG_X86_SMP=y
++CONFIG_X86_BIOS_REBOOT=y
++CONFIG_X86_TRAMPOLINE=y
++CONFIG_X86_NO_TSS=y
++CONFIG_X86_NO_IDT=y
++CONFIG_KTIME_SCALAR=y
+diff -rpuN linux-2.6.18.8/buildconfigs/linux-defconfig_xen_x86_64 linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xen_x86_64
+--- linux-2.6.18.8/buildconfigs/linux-defconfig_xen_x86_64 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/buildconfigs/linux-defconfig_xen_x86_64 2008-02-15 16:21:56.000000000 -0800
+@@ -0,0 +1,3139 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.18.8
++# Tue Oct 16 09:32:25 2007
++#
++CONFIG_X86_64=y
++CONFIG_64BIT=y
++CONFIG_X86=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_SEMAPHORE_SLEEPERS=y
++CONFIG_MMU=y
++CONFIG_RWSEM_GENERIC_SPINLOCK=y
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_X86_CMPXCHG=y
++CONFIG_EARLY_PRINTK=y
++CONFIG_GENERIC_ISA_DMA=y
++CONFIG_GENERIC_IOMAP=y
++CONFIG_ARCH_MAY_HAVE_PC_FDC=y
++CONFIG_DMI=y
++CONFIG_AUDIT_ARCH=y
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# Code maturity level options
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION=""
++# CONFIG_LOCALVERSION_AUTO is not set
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++CONFIG_POSIX_MQUEUE=y
++CONFIG_BSD_PROCESS_ACCT=y
++CONFIG_BSD_PROCESS_ACCT_V3=y
++CONFIG_TASKSTATS=y
++CONFIG_TASK_DELAY_ACCT=y
++CONFIG_AUDIT=y
++CONFIG_AUDITSYSCALL=y
++CONFIG_IKCONFIG=y
++CONFIG_IKCONFIG_PROC=y
++CONFIG_CPUSETS=y
++# CONFIG_RELAY is not set
++CONFIG_INITRAMFS_SOURCE=""
++CONFIG_CC_OPTIMIZE_FOR_SIZE=y
++# CONFIG_EMBEDDED is not set
++CONFIG_UID16=y
++CONFIG_SYSCTL=y
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++CONFIG_KALLSYMS_EXTRA_PASS=y
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SHMEM=y
++CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_RT_MUTEXES=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++# CONFIG_SLOB is not set
++
++#
++# Loadable module support
++#
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++CONFIG_MODULE_FORCE_UNLOAD=y
++CONFIG_MODVERSIONS=y
++CONFIG_MODULE_SRCVERSION_ALL=y
++CONFIG_KMOD=y
++CONFIG_STOP_MACHINE=y
++
++#
++# Block layer
++#
++CONFIG_LBD=y
++# CONFIG_BLK_DEV_IO_TRACE is not set
++CONFIG_LSF=y
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++# CONFIG_DEFAULT_AS is not set
++# CONFIG_DEFAULT_DEADLINE is not set
++CONFIG_DEFAULT_CFQ=y
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="cfq"
++
++#
++# Processor type and features
++#
++CONFIG_X86_PC=y
++# CONFIG_X86_VSMP is not set
++# CONFIG_MK8 is not set
++# CONFIG_MPSC is not set
++CONFIG_GENERIC_CPU=y
++CONFIG_X86_64_XEN=y
++CONFIG_X86_NO_TSS=y
++CONFIG_X86_NO_IDT=y
++CONFIG_X86_L1_CACHE_BYTES=128
++CONFIG_X86_L1_CACHE_SHIFT=7
++CONFIG_X86_INTERNODE_CACHE_BYTES=128
++CONFIG_X86_GOOD_APIC=y
++CONFIG_MICROCODE=y
++CONFIG_X86_MSR=m
++CONFIG_X86_CPUID=m
++CONFIG_X86_IO_APIC=y
++CONFIG_X86_XEN_GENAPIC=y
++CONFIG_X86_LOCAL_APIC=y
++CONFIG_MTRR=y
++CONFIG_SMP=y
++# CONFIG_PREEMPT_NONE is not set
++CONFIG_PREEMPT_VOLUNTARY=y
++# CONFIG_PREEMPT is not set
++CONFIG_PREEMPT_BKL=y
++CONFIG_ARCH_FLATMEM_ENABLE=y
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++# CONFIG_SPARSEMEM_STATIC is not set
++CONFIG_SPLIT_PTLOCK_CPUS=4
++CONFIG_RESOURCES_64BIT=y
++CONFIG_NR_CPUS=32
++CONFIG_HOTPLUG_CPU=y
++CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
++CONFIG_SWIOTLB=y
++CONFIG_KEXEC=y
++# CONFIG_CRASH_DUMP is not set
++CONFIG_PHYSICAL_START=0x200000
++CONFIG_SECCOMP=y
++CONFIG_HZ_100=y
++# CONFIG_HZ_250 is not set
++# CONFIG_HZ_1000 is not set
++CONFIG_HZ=100
++# CONFIG_REORDER is not set
++CONFIG_K8_NB=y
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_ISA_DMA_API=y
++CONFIG_GENERIC_PENDING_IRQ=y
++
++#
++# Power management options
++#
++CONFIG_PM=y
++# CONFIG_PM_LEGACY is not set
++CONFIG_PM_DEBUG=y
++# CONFIG_SOFTWARE_SUSPEND is not set
++CONFIG_SUSPEND_SMP=y
++
++#
++# ACPI (Advanced Configuration and Power Interface) Support
++#
++CONFIG_ACPI=y
++CONFIG_ACPI_SLEEP=y
++CONFIG_ACPI_SLEEP_PROC_FS=y
++# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
++CONFIG_ACPI_AC=m
++CONFIG_ACPI_BATTERY=m
++CONFIG_ACPI_BUTTON=m
++CONFIG_ACPI_VIDEO=m
++CONFIG_ACPI_HOTKEY=m
++CONFIG_ACPI_FAN=m
++CONFIG_ACPI_DOCK=m
++CONFIG_ACPI_PROCESSOR=m
++CONFIG_ACPI_HOTPLUG_CPU=y
++CONFIG_ACPI_THERMAL=m
++CONFIG_ACPI_ASUS=m
++CONFIG_ACPI_IBM=m
++CONFIG_ACPI_TOSHIBA=m
++CONFIG_ACPI_BLACKLIST_YEAR=0
++# CONFIG_ACPI_DEBUG is not set
++CONFIG_ACPI_EC=y
++CONFIG_ACPI_POWER=y
++CONFIG_ACPI_SYSTEM=y
++CONFIG_ACPI_CONTAINER=m
++CONFIG_ACPI_SBS=m
++CONFIG_ACPI_PV_SLEEP=y
++
++#
++# CPU Frequency scaling
++#
++# CONFIG_CPU_FREQ is not set
++
++#
++# Bus options (PCI etc.)
++#
++CONFIG_PCI=y
++CONFIG_PCI_DIRECT=y
++# CONFIG_PCI_MMCONFIG is not set
++CONFIG_XEN_PCIDEV_FRONTEND=y
++# CONFIG_XEN_PCIDEV_FE_DEBUG is not set
++# CONFIG_PCIEPORTBUS is not set
++# CONFIG_PCI_DEBUG is not set
++
++#
++# PCCARD (PCMCIA/CardBus) support
++#
++CONFIG_PCCARD=m
++# CONFIG_PCMCIA_DEBUG is not set
++CONFIG_PCMCIA=m
++CONFIG_PCMCIA_LOAD_CIS=y
++CONFIG_PCMCIA_IOCTL=y
++CONFIG_CARDBUS=y
++
++#
++# PC-card bridges
++#
++CONFIG_YENTA=m
++CONFIG_YENTA_O2=y
++CONFIG_YENTA_RICOH=y
++CONFIG_YENTA_TI=y
++CONFIG_YENTA_ENE_TUNE=y
++CONFIG_YENTA_TOSHIBA=y
++CONFIG_PD6729=m
++CONFIG_I82092=m
++CONFIG_PCCARD_NONSTATIC=m
++
++#
++# PCI Hotplug Support
++#
++CONFIG_HOTPLUG_PCI=m
++# CONFIG_HOTPLUG_PCI_FAKE is not set
++# CONFIG_HOTPLUG_PCI_ACPI is not set
++# CONFIG_HOTPLUG_PCI_CPCI is not set
++# CONFIG_HOTPLUG_PCI_SHPC is not set
++
++#
++# Executable file formats / Emulations
++#
++CONFIG_BINFMT_ELF=y
++CONFIG_BINFMT_MISC=m
++CONFIG_IA32_EMULATION=y
++CONFIG_IA32_AOUT=y
++CONFIG_COMPAT=y
++CONFIG_SYSVIPC_COMPAT=y
++
++#
++# Networking
++#
++CONFIG_NET=y
++
++#
++# Networking options
++#
++# CONFIG_NETDEBUG is not set
++CONFIG_PACKET=y
++CONFIG_PACKET_MMAP=y
++CONFIG_UNIX=y
++CONFIG_XFRM=y
++CONFIG_XFRM_USER=m
++CONFIG_NET_KEY=m
++CONFIG_INET=y
++CONFIG_IP_MULTICAST=y
++CONFIG_IP_ADVANCED_ROUTER=y
++CONFIG_ASK_IP_FIB_HASH=y
++# CONFIG_IP_FIB_TRIE is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_MULTIPLE_TABLES=y
++CONFIG_IP_ROUTE_FWMARK=y
++CONFIG_IP_ROUTE_MULTIPATH=y
++# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
++CONFIG_IP_ROUTE_VERBOSE=y
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++CONFIG_IP_PNP_BOOTP=y
++CONFIG_IP_PNP_RARP=y
++CONFIG_NET_IPIP=m
++CONFIG_NET_IPGRE=m
++CONFIG_NET_IPGRE_BROADCAST=y
++CONFIG_IP_MROUTE=y
++CONFIG_IP_PIMSM_V1=y
++CONFIG_IP_PIMSM_V2=y
++# CONFIG_ARPD is not set
++CONFIG_SYN_COOKIES=y
++CONFIG_INET_AH=m
++CONFIG_INET_ESP=m
++CONFIG_INET_IPCOMP=m
++CONFIG_INET_XFRM_TUNNEL=m
++CONFIG_INET_TUNNEL=m
++CONFIG_INET_XFRM_MODE_TRANSPORT=m
++CONFIG_INET_XFRM_MODE_TUNNEL=m
++CONFIG_INET_DIAG=m
++CONFIG_INET_TCP_DIAG=m
++CONFIG_TCP_CONG_ADVANCED=y
++
++#
++# TCP congestion control
++#
++CONFIG_TCP_CONG_BIC=m
++CONFIG_TCP_CONG_CUBIC=m
++CONFIG_TCP_CONG_WESTWOOD=m
++CONFIG_TCP_CONG_HTCP=m
++CONFIG_TCP_CONG_HSTCP=m
++CONFIG_TCP_CONG_HYBLA=m
++CONFIG_TCP_CONG_VEGAS=m
++CONFIG_TCP_CONG_SCALABLE=m
++CONFIG_TCP_CONG_LP=m
++CONFIG_TCP_CONG_VENO=m
++
++#
++# IP: Virtual Server Configuration
++#
++CONFIG_IP_VS=m
++# CONFIG_IP_VS_DEBUG is not set
++CONFIG_IP_VS_TAB_BITS=12
++
++#
++# IPVS transport protocol load balancing support
++#
++CONFIG_IP_VS_PROTO_TCP=y
++CONFIG_IP_VS_PROTO_UDP=y
++CONFIG_IP_VS_PROTO_ESP=y
++CONFIG_IP_VS_PROTO_AH=y
++
++#
++# IPVS scheduler
++#
++CONFIG_IP_VS_RR=m
++CONFIG_IP_VS_WRR=m
++CONFIG_IP_VS_LC=m
++CONFIG_IP_VS_WLC=m
++CONFIG_IP_VS_LBLC=m
++CONFIG_IP_VS_LBLCR=m
++CONFIG_IP_VS_DH=m
++CONFIG_IP_VS_SH=m
++CONFIG_IP_VS_SED=m
++CONFIG_IP_VS_NQ=m
++
++#
++# IPVS application helper
++#
++CONFIG_IP_VS_FTP=m
++CONFIG_IPV6=m
++CONFIG_IPV6_PRIVACY=y
++# CONFIG_IPV6_ROUTER_PREF is not set
++CONFIG_INET6_AH=m
++CONFIG_INET6_ESP=m
++CONFIG_INET6_IPCOMP=m
++CONFIG_INET6_XFRM_TUNNEL=m
++CONFIG_INET6_TUNNEL=m
++CONFIG_INET6_XFRM_MODE_TRANSPORT=m
++CONFIG_INET6_XFRM_MODE_TUNNEL=m
++CONFIG_IPV6_TUNNEL=m
++CONFIG_NETWORK_SECMARK=y
++CONFIG_NETFILTER=y
++# CONFIG_NETFILTER_DEBUG is not set
++CONFIG_BRIDGE_NETFILTER=y
++
++#
++# Core Netfilter Configuration
++#
++CONFIG_NETFILTER_NETLINK=m
++CONFIG_NETFILTER_NETLINK_QUEUE=m
++CONFIG_NETFILTER_NETLINK_LOG=m
++CONFIG_NETFILTER_XTABLES=m
++CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
++CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
++CONFIG_NETFILTER_XT_TARGET_MARK=m
++CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
++CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
++CONFIG_NETFILTER_XT_TARGET_SECMARK=m
++CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
++CONFIG_NETFILTER_XT_MATCH_COMMENT=m
++CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
++CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
++CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
++CONFIG_NETFILTER_XT_MATCH_DCCP=m
++CONFIG_NETFILTER_XT_MATCH_ESP=m
++CONFIG_NETFILTER_XT_MATCH_HELPER=m
++CONFIG_NETFILTER_XT_MATCH_LENGTH=m
++CONFIG_NETFILTER_XT_MATCH_LIMIT=m
++CONFIG_NETFILTER_XT_MATCH_MAC=m
++CONFIG_NETFILTER_XT_MATCH_MARK=m
++CONFIG_NETFILTER_XT_MATCH_POLICY=m
++CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
++CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
++CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
++CONFIG_NETFILTER_XT_MATCH_QUOTA=m
++CONFIG_NETFILTER_XT_MATCH_REALM=m
++CONFIG_NETFILTER_XT_MATCH_SCTP=m
++CONFIG_NETFILTER_XT_MATCH_STATE=m
++CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
++CONFIG_NETFILTER_XT_MATCH_STRING=m
++CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
++
++#
++# IP: Netfilter Configuration
++#
++CONFIG_IP_NF_CONNTRACK=m
++CONFIG_IP_NF_CT_ACCT=y
++CONFIG_IP_NF_CONNTRACK_MARK=y
++CONFIG_IP_NF_CONNTRACK_SECMARK=y
++CONFIG_IP_NF_CONNTRACK_EVENTS=y
++CONFIG_IP_NF_CONNTRACK_NETLINK=m
++CONFIG_IP_NF_CT_PROTO_SCTP=m
++CONFIG_IP_NF_FTP=m
++CONFIG_IP_NF_IRC=m
++CONFIG_IP_NF_NETBIOS_NS=m
++CONFIG_IP_NF_TFTP=m
++CONFIG_IP_NF_AMANDA=m
++CONFIG_IP_NF_PPTP=m
++CONFIG_IP_NF_H323=m
++CONFIG_IP_NF_SIP=m
++CONFIG_IP_NF_QUEUE=m
++CONFIG_IP_NF_IPTABLES=m
++CONFIG_IP_NF_MATCH_IPRANGE=m
++CONFIG_IP_NF_MATCH_TOS=m
++CONFIG_IP_NF_MATCH_RECENT=m
++CONFIG_IP_NF_MATCH_ECN=m
++CONFIG_IP_NF_MATCH_DSCP=m
++CONFIG_IP_NF_MATCH_AH=m
++CONFIG_IP_NF_MATCH_TTL=m
++CONFIG_IP_NF_MATCH_OWNER=m
++CONFIG_IP_NF_MATCH_ADDRTYPE=m
++CONFIG_IP_NF_MATCH_HASHLIMIT=m
++CONFIG_IP_NF_FILTER=m
++CONFIG_IP_NF_TARGET_REJECT=m
++CONFIG_IP_NF_TARGET_LOG=m
++CONFIG_IP_NF_TARGET_ULOG=m
++CONFIG_IP_NF_TARGET_TCPMSS=m
++CONFIG_IP_NF_NAT=m
++CONFIG_IP_NF_NAT_NEEDED=y
++CONFIG_IP_NF_TARGET_MASQUERADE=m
++CONFIG_IP_NF_TARGET_REDIRECT=m
++CONFIG_IP_NF_TARGET_NETMAP=m
++CONFIG_IP_NF_TARGET_SAME=m
++CONFIG_IP_NF_NAT_SNMP_BASIC=m
++CONFIG_IP_NF_NAT_IRC=m
++CONFIG_IP_NF_NAT_FTP=m
++CONFIG_IP_NF_NAT_TFTP=m
++CONFIG_IP_NF_NAT_AMANDA=m
++CONFIG_IP_NF_NAT_PPTP=m
++CONFIG_IP_NF_NAT_H323=m
++CONFIG_IP_NF_NAT_SIP=m
++CONFIG_IP_NF_MANGLE=m
++CONFIG_IP_NF_TARGET_TOS=m
++CONFIG_IP_NF_TARGET_ECN=m
++CONFIG_IP_NF_TARGET_DSCP=m
++CONFIG_IP_NF_TARGET_TTL=m
++CONFIG_IP_NF_TARGET_CLUSTERIP=m
++CONFIG_IP_NF_RAW=m
++CONFIG_IP_NF_ARPTABLES=m
++CONFIG_IP_NF_ARPFILTER=m
++CONFIG_IP_NF_ARP_MANGLE=m
++
++#
++# IPv6: Netfilter Configuration (EXPERIMENTAL)
++#
++CONFIG_IP6_NF_QUEUE=m
++CONFIG_IP6_NF_IPTABLES=m
++CONFIG_IP6_NF_MATCH_RT=m
++CONFIG_IP6_NF_MATCH_OPTS=m
++CONFIG_IP6_NF_MATCH_FRAG=m
++CONFIG_IP6_NF_MATCH_HL=m
++CONFIG_IP6_NF_MATCH_OWNER=m
++CONFIG_IP6_NF_MATCH_IPV6HEADER=m
++CONFIG_IP6_NF_MATCH_AH=m
++CONFIG_IP6_NF_MATCH_EUI64=m
++CONFIG_IP6_NF_FILTER=m
++CONFIG_IP6_NF_TARGET_LOG=m
++CONFIG_IP6_NF_TARGET_REJECT=m
++CONFIG_IP6_NF_MANGLE=m
++CONFIG_IP6_NF_TARGET_HL=m
++CONFIG_IP6_NF_RAW=m
++
++#
++# DECnet: Netfilter Configuration
++#
++# CONFIG_DECNET_NF_GRABULATOR is not set
++
++#
++# Bridge: Netfilter Configuration
++#
++CONFIG_BRIDGE_NF_EBTABLES=m
++CONFIG_BRIDGE_EBT_BROUTE=m
++CONFIG_BRIDGE_EBT_T_FILTER=m
++CONFIG_BRIDGE_EBT_T_NAT=m
++CONFIG_BRIDGE_EBT_802_3=m
++CONFIG_BRIDGE_EBT_AMONG=m
++CONFIG_BRIDGE_EBT_ARP=m
++CONFIG_BRIDGE_EBT_IP=m
++CONFIG_BRIDGE_EBT_LIMIT=m
++CONFIG_BRIDGE_EBT_MARK=m
++CONFIG_BRIDGE_EBT_PKTTYPE=m
++CONFIG_BRIDGE_EBT_STP=m
++CONFIG_BRIDGE_EBT_VLAN=m
++CONFIG_BRIDGE_EBT_ARPREPLY=m
++CONFIG_BRIDGE_EBT_DNAT=m
++CONFIG_BRIDGE_EBT_MARK_T=m
++CONFIG_BRIDGE_EBT_REDIRECT=m
++CONFIG_BRIDGE_EBT_SNAT=m
++CONFIG_BRIDGE_EBT_LOG=m
++CONFIG_BRIDGE_EBT_ULOG=m
++
++#
++# DCCP Configuration (EXPERIMENTAL)
++#
++CONFIG_IP_DCCP=m
++CONFIG_INET_DCCP_DIAG=m
++CONFIG_IP_DCCP_ACKVEC=y
++
++#
++# DCCP CCIDs Configuration (EXPERIMENTAL)
++#
++CONFIG_IP_DCCP_CCID2=m
++CONFIG_IP_DCCP_CCID3=m
++CONFIG_IP_DCCP_TFRC_LIB=m
++
++#
++# DCCP Kernel Hacking
++#
++# CONFIG_IP_DCCP_DEBUG is not set
++
++#
++# SCTP Configuration (EXPERIMENTAL)
++#
++CONFIG_IP_SCTP=m
++# CONFIG_SCTP_DBG_MSG is not set
++# CONFIG_SCTP_DBG_OBJCNT is not set
++# CONFIG_SCTP_HMAC_NONE is not set
++# CONFIG_SCTP_HMAC_SHA1 is not set
++CONFIG_SCTP_HMAC_MD5=y
++
++#
++# TIPC Configuration (EXPERIMENTAL)
++#
++CONFIG_TIPC=m
++# CONFIG_TIPC_ADVANCED is not set
++# CONFIG_TIPC_DEBUG is not set
++CONFIG_ATM=m
++CONFIG_ATM_CLIP=m
++# CONFIG_ATM_CLIP_NO_ICMP is not set
++CONFIG_ATM_LANE=m
++# CONFIG_ATM_MPOA is not set
++CONFIG_ATM_BR2684=m
++# CONFIG_ATM_BR2684_IPFILTER is not set
++CONFIG_BRIDGE=m
++CONFIG_VLAN_8021Q=m
++CONFIG_DECNET=m
++# CONFIG_DECNET_ROUTER is not set
++CONFIG_LLC=y
++CONFIG_LLC2=m
++CONFIG_IPX=m
++CONFIG_IPX_INTERN=y
++CONFIG_ATALK=m
++CONFIG_DEV_APPLETALK=m
++CONFIG_IPDDP=m
++CONFIG_IPDDP_ENCAP=y
++CONFIG_IPDDP_DECAP=y
++CONFIG_X25=m
++CONFIG_LAPB=m
++CONFIG_ECONET=m
++# CONFIG_ECONET_AUNUDP is not set
++# CONFIG_ECONET_NATIVE is not set
++CONFIG_WAN_ROUTER=m
++
++#
++# QoS and/or fair queueing
++#
++CONFIG_NET_SCHED=y
++CONFIG_NET_SCH_CLK_JIFFIES=y
++# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
++# CONFIG_NET_SCH_CLK_CPU is not set
++
++#
++# Queueing/Scheduling
++#
++CONFIG_NET_SCH_CBQ=m
++CONFIG_NET_SCH_HTB=m
++CONFIG_NET_SCH_HFSC=m
++CONFIG_NET_SCH_ATM=m
++CONFIG_NET_SCH_PRIO=m
++CONFIG_NET_SCH_RED=m
++CONFIG_NET_SCH_SFQ=m
++CONFIG_NET_SCH_TEQL=m
++CONFIG_NET_SCH_TBF=m
++CONFIG_NET_SCH_GRED=m
++CONFIG_NET_SCH_DSMARK=m
++CONFIG_NET_SCH_NETEM=m
++CONFIG_NET_SCH_INGRESS=m
++
++#
++# Classification
++#
++CONFIG_NET_CLS=y
++CONFIG_NET_CLS_BASIC=m
++CONFIG_NET_CLS_TCINDEX=m
++CONFIG_NET_CLS_ROUTE4=m
++CONFIG_NET_CLS_ROUTE=y
++CONFIG_NET_CLS_FW=m
++CONFIG_NET_CLS_U32=m
++CONFIG_CLS_U32_PERF=y
++CONFIG_CLS_U32_MARK=y
++CONFIG_NET_CLS_RSVP=m
++CONFIG_NET_CLS_RSVP6=m
++CONFIG_NET_EMATCH=y
++CONFIG_NET_EMATCH_STACK=32
++CONFIG_NET_EMATCH_CMP=m
++CONFIG_NET_EMATCH_NBYTE=m
++CONFIG_NET_EMATCH_U32=m
++CONFIG_NET_EMATCH_META=m
++CONFIG_NET_EMATCH_TEXT=m
++# CONFIG_NET_CLS_ACT is not set
++CONFIG_NET_CLS_POLICE=y
++CONFIG_NET_CLS_IND=y
++CONFIG_NET_ESTIMATOR=y
++
++#
++# Network testing
++#
++CONFIG_NET_PKTGEN=m
++CONFIG_HAMRADIO=y
++
++#
++# Packet Radio protocols
++#
++CONFIG_AX25=m
++CONFIG_AX25_DAMA_SLAVE=y
++CONFIG_NETROM=m
++CONFIG_ROSE=m
++
++#
++# AX.25 network device drivers
++#
++CONFIG_MKISS=m
++CONFIG_6PACK=m
++CONFIG_BPQETHER=m
++CONFIG_BAYCOM_SER_FDX=m
++CONFIG_BAYCOM_SER_HDX=m
++CONFIG_BAYCOM_PAR=m
++CONFIG_YAM=m
++CONFIG_IRDA=m
++
++#
++# IrDA protocols
++#
++CONFIG_IRLAN=m
++CONFIG_IRNET=m
++CONFIG_IRCOMM=m
++CONFIG_IRDA_ULTRA=y
++
++#
++# IrDA options
++#
++CONFIG_IRDA_CACHE_LAST_LSAP=y
++CONFIG_IRDA_FAST_RR=y
++# CONFIG_IRDA_DEBUG is not set
++
++#
++# Infrared-port device drivers
++#
++
++#
++# SIR device drivers
++#
++CONFIG_IRTTY_SIR=m
++
++#
++# Dongle support
++#
++CONFIG_DONGLE=y
++CONFIG_ESI_DONGLE=m
++CONFIG_ACTISYS_DONGLE=m
++CONFIG_TEKRAM_DONGLE=m
++CONFIG_TOIM3232_DONGLE=m
++CONFIG_LITELINK_DONGLE=m
++CONFIG_MA600_DONGLE=m
++CONFIG_GIRBIL_DONGLE=m
++CONFIG_MCP2120_DONGLE=m
++CONFIG_OLD_BELKIN_DONGLE=m
++CONFIG_ACT200L_DONGLE=m
++
++#
++# Old SIR device drivers
++#
++
++#
++# Old Serial dongle support
++#
++
++#
++# FIR device drivers
++#
++CONFIG_USB_IRDA=m
++CONFIG_SIGMATEL_FIR=m
++CONFIG_NSC_FIR=m
++CONFIG_WINBOND_FIR=m
++CONFIG_SMC_IRCC_FIR=m
++CONFIG_ALI_FIR=m
++CONFIG_VLSI_FIR=m
++CONFIG_VIA_FIR=m
++CONFIG_MCS_FIR=m
++CONFIG_BT=m
++CONFIG_BT_L2CAP=m
++CONFIG_BT_SCO=m
++CONFIG_BT_RFCOMM=m
++CONFIG_BT_RFCOMM_TTY=y
++CONFIG_BT_BNEP=m
++CONFIG_BT_BNEP_MC_FILTER=y
++CONFIG_BT_BNEP_PROTO_FILTER=y
++CONFIG_BT_CMTP=m
++CONFIG_BT_HIDP=m
++
++#
++# Bluetooth device drivers
++#
++CONFIG_BT_HCIUSB=m
++CONFIG_BT_HCIUSB_SCO=y
++CONFIG_BT_HCIUART=m
++CONFIG_BT_HCIUART_H4=y
++CONFIG_BT_HCIUART_BCSP=y
++CONFIG_BT_HCIBCM203X=m
++CONFIG_BT_HCIBPA10X=m
++CONFIG_BT_HCIBFUSB=m
++# CONFIG_BT_HCIDTL1 is not set
++# CONFIG_BT_HCIBT3C is not set
++# CONFIG_BT_HCIBLUECARD is not set
++# CONFIG_BT_HCIBTUART is not set
++CONFIG_BT_HCIVHCI=m
++CONFIG_IEEE80211=m
++# CONFIG_IEEE80211_DEBUG is not set
++CONFIG_IEEE80211_CRYPT_WEP=m
++CONFIG_IEEE80211_CRYPT_CCMP=m
++CONFIG_IEEE80211_CRYPT_TKIP=m
++CONFIG_IEEE80211_SOFTMAC=m
++# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
++CONFIG_WIRELESS_EXT=y
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++CONFIG_FW_LOADER=m
++# CONFIG_DEBUG_DRIVER is not set
++CONFIG_SYS_HYPERVISOR=y
++
++#
++# Connector - unified userspace <-> kernelspace linker
++#
++CONFIG_CONNECTOR=y
++CONFIG_PROC_EVENTS=y
++
++#
++# Memory Technology Devices (MTD)
++#
++CONFIG_MTD=m
++# CONFIG_MTD_DEBUG is not set
++CONFIG_MTD_CONCAT=m
++CONFIG_MTD_PARTITIONS=y
++CONFIG_MTD_REDBOOT_PARTS=m
++CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
++# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
++# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
++CONFIG_MTD_CMDLINE_PARTS=y
++
++#
++# User Modules And Translation Layers
++#
++CONFIG_MTD_CHAR=m
++CONFIG_MTD_BLOCK=m
++CONFIG_MTD_BLOCK_RO=m
++CONFIG_FTL=m
++CONFIG_NFTL=m
++CONFIG_NFTL_RW=y
++CONFIG_INFTL=m
++CONFIG_RFD_FTL=m
++
++#
++# RAM/ROM/Flash chip drivers
++#
++CONFIG_MTD_CFI=m
++CONFIG_MTD_JEDECPROBE=m
++CONFIG_MTD_GEN_PROBE=m
++CONFIG_MTD_CFI_ADV_OPTIONS=y
++CONFIG_MTD_CFI_NOSWAP=y
++# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
++# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
++# CONFIG_MTD_CFI_GEOMETRY is not set
++CONFIG_MTD_MAP_BANK_WIDTH_1=y
++CONFIG_MTD_MAP_BANK_WIDTH_2=y
++CONFIG_MTD_MAP_BANK_WIDTH_4=y
++# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
++CONFIG_MTD_CFI_I1=y
++CONFIG_MTD_CFI_I2=y
++# CONFIG_MTD_CFI_I4 is not set
++# CONFIG_MTD_CFI_I8 is not set
++# CONFIG_MTD_OTP is not set
++CONFIG_MTD_CFI_INTELEXT=m
++CONFIG_MTD_CFI_AMDSTD=m
++CONFIG_MTD_CFI_STAA=m
++CONFIG_MTD_CFI_UTIL=m
++CONFIG_MTD_RAM=m
++# CONFIG_MTD_ROM is not set
++CONFIG_MTD_ABSENT=m
++# CONFIG_MTD_OBSOLETE_CHIPS is not set
++
++#
++# Mapping drivers for chip access
++#
++CONFIG_MTD_COMPLEX_MAPPINGS=y
++CONFIG_MTD_PHYSMAP=m
++CONFIG_MTD_PHYSMAP_START=0x8000000
++CONFIG_MTD_PHYSMAP_LEN=0x4000000
++CONFIG_MTD_PHYSMAP_BANKWIDTH=2
++# CONFIG_MTD_PNC2000 is not set
++CONFIG_MTD_SC520CDP=m
++CONFIG_MTD_NETSC520=m
++CONFIG_MTD_TS5500=m
++CONFIG_MTD_SBC_GXX=m
++# CONFIG_MTD_AMD76XROM is not set
++# CONFIG_MTD_ICHXROM is not set
++CONFIG_MTD_SCB2_FLASH=m
++# CONFIG_MTD_NETtel is not set
++# CONFIG_MTD_DILNETPC is not set
++# CONFIG_MTD_L440GX is not set
++CONFIG_MTD_PCI=m
++CONFIG_MTD_PLATRAM=m
++
++#
++# Self-contained MTD device drivers
++#
++CONFIG_MTD_PMC551=m
++# CONFIG_MTD_PMC551_BUGFIX is not set
++# CONFIG_MTD_PMC551_DEBUG is not set
++CONFIG_MTD_DATAFLASH=m
++CONFIG_MTD_M25P80=m
++# CONFIG_MTD_SLRAM is not set
++# CONFIG_MTD_PHRAM is not set
++CONFIG_MTD_MTDRAM=m
++CONFIG_MTDRAM_TOTAL_SIZE=4096
++CONFIG_MTDRAM_ERASE_SIZE=128
++CONFIG_MTD_BLOCK2MTD=m
++
++#
++# Disk-On-Chip Device Drivers
++#
++CONFIG_MTD_DOC2000=m
++CONFIG_MTD_DOC2001=m
++CONFIG_MTD_DOC2001PLUS=m
++CONFIG_MTD_DOCPROBE=m
++CONFIG_MTD_DOCECC=m
++CONFIG_MTD_DOCPROBE_ADVANCED=y
++CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
++CONFIG_MTD_DOCPROBE_HIGH=y
++CONFIG_MTD_DOCPROBE_55AA=y
++
++#
++# NAND Flash Device Drivers
++#
++CONFIG_MTD_NAND=m
++# CONFIG_MTD_NAND_VERIFY_WRITE is not set
++# CONFIG_MTD_NAND_ECC_SMC is not set
++CONFIG_MTD_NAND_IDS=m
++CONFIG_MTD_NAND_DISKONCHIP=m
++# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
++CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
++CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
++CONFIG_MTD_NAND_NANDSIM=m
++
++#
++# OneNAND Flash Device Drivers
++#
++CONFIG_MTD_ONENAND=m
++# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
++# CONFIG_MTD_ONENAND_OTP is not set
++
++#
++# Parallel port support
++#
++CONFIG_PARPORT=m
++CONFIG_PARPORT_PC=m
++# CONFIG_PARPORT_PC_FIFO is not set
++# CONFIG_PARPORT_PC_SUPERIO is not set
++# CONFIG_PARPORT_PC_PCMCIA is not set
++CONFIG_PARPORT_NOT_PC=y
++# CONFIG_PARPORT_GSC is not set
++CONFIG_PARPORT_AX88796=m
++CONFIG_PARPORT_1284=y
++
++#
++# Plug and Play support
++#
++CONFIG_PNP=y
++CONFIG_PNP_DEBUG=y
++
++#
++# Protocols
++#
++CONFIG_PNPACPI=y
++
++#
++# Block devices
++#
++CONFIG_BLK_DEV_FD=m
++CONFIG_PARIDE=m
++CONFIG_PARIDE_PARPORT=m
++
++#
++# Parallel IDE high-level drivers
++#
++CONFIG_PARIDE_PD=m
++CONFIG_PARIDE_PCD=m
++CONFIG_PARIDE_PF=m
++CONFIG_PARIDE_PT=m
++CONFIG_PARIDE_PG=m
++
++#
++# Parallel IDE protocol modules
++#
++CONFIG_PARIDE_ATEN=m
++CONFIG_PARIDE_BPCK=m
++CONFIG_PARIDE_COMM=m
++CONFIG_PARIDE_DSTR=m
++CONFIG_PARIDE_FIT2=m
++CONFIG_PARIDE_FIT3=m
++CONFIG_PARIDE_EPAT=m
++CONFIG_PARIDE_EPATC8=y
++CONFIG_PARIDE_EPIA=m
++CONFIG_PARIDE_FRIQ=m
++CONFIG_PARIDE_FRPW=m
++CONFIG_PARIDE_KBIC=m
++CONFIG_PARIDE_KTTI=m
++CONFIG_PARIDE_ON20=m
++CONFIG_PARIDE_ON26=m
++CONFIG_BLK_CPQ_DA=m
++CONFIG_BLK_CPQ_CISS_DA=m
++CONFIG_CISS_SCSI_TAPE=y
++CONFIG_BLK_DEV_DAC960=m
++CONFIG_BLK_DEV_UMEM=m
++# CONFIG_BLK_DEV_COW_COMMON is not set
++CONFIG_BLK_DEV_LOOP=y
++CONFIG_BLK_DEV_CRYPTOLOOP=m
++CONFIG_BLK_DEV_NBD=m
++CONFIG_BLK_DEV_SX8=m
++# CONFIG_BLK_DEV_UB is not set
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=16384
++CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
++CONFIG_BLK_DEV_INITRD=y
++CONFIG_CDROM_PKTCDVD=m
++CONFIG_CDROM_PKTCDVD_BUFFERS=8
++# CONFIG_CDROM_PKTCDVD_WCACHE is not set
++CONFIG_ATA_OVER_ETH=m
++
++#
++# ATA/ATAPI/MFM/RLL support
++#
++CONFIG_IDE=y
++CONFIG_BLK_DEV_IDE=y
++
++#
++# Please see Documentation/ide.txt for help/info on IDE drives
++#
++# CONFIG_BLK_DEV_IDE_SATA is not set
++# CONFIG_BLK_DEV_HD_IDE is not set
++CONFIG_BLK_DEV_IDEDISK=m
++CONFIG_IDEDISK_MULTI_MODE=y
++# CONFIG_BLK_DEV_IDECS is not set
++CONFIG_BLK_DEV_IDECD=m
++CONFIG_BLK_DEV_IDETAPE=m
++CONFIG_BLK_DEV_IDEFLOPPY=m
++CONFIG_BLK_DEV_IDESCSI=m
++# CONFIG_IDE_TASK_IOCTL is not set
++
++#
++# IDE chipset support/bugfixes
++#
++CONFIG_IDE_GENERIC=m
++CONFIG_BLK_DEV_CMD640=y
++CONFIG_BLK_DEV_CMD640_ENHANCED=y
++CONFIG_BLK_DEV_IDEPNP=y
++CONFIG_BLK_DEV_IDEPCI=y
++CONFIG_IDEPCI_SHARE_IRQ=y
++CONFIG_BLK_DEV_OFFBOARD=y
++CONFIG_BLK_DEV_GENERIC=y
++# CONFIG_BLK_DEV_OPTI621 is not set
++CONFIG_BLK_DEV_RZ1000=m
++CONFIG_BLK_DEV_IDEDMA_PCI=y
++# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
++CONFIG_IDEDMA_PCI_AUTO=y
++# CONFIG_IDEDMA_ONLYDISK is not set
++CONFIG_BLK_DEV_AEC62XX=m
++CONFIG_BLK_DEV_ALI15X3=m
++# CONFIG_WDC_ALI15X3 is not set
++CONFIG_BLK_DEV_AMD74XX=m
++CONFIG_BLK_DEV_ATIIXP=m
++CONFIG_BLK_DEV_CMD64X=m
++CONFIG_BLK_DEV_TRIFLEX=m
++CONFIG_BLK_DEV_CY82C693=m
++CONFIG_BLK_DEV_CS5520=m
++CONFIG_BLK_DEV_CS5530=m
++CONFIG_BLK_DEV_HPT34X=m
++CONFIG_HPT34X_AUTODMA=y
++CONFIG_BLK_DEV_HPT366=m
++CONFIG_BLK_DEV_SC1200=m
++CONFIG_BLK_DEV_PIIX=m
++CONFIG_BLK_DEV_IT821X=m
++CONFIG_BLK_DEV_NS87415=m
++CONFIG_BLK_DEV_PDC202XX_OLD=m
++CONFIG_PDC202XX_BURST=y
++CONFIG_BLK_DEV_PDC202XX_NEW=m
++CONFIG_BLK_DEV_SVWKS=m
++CONFIG_BLK_DEV_SIIMAGE=m
++CONFIG_BLK_DEV_SIS5513=m
++CONFIG_BLK_DEV_SLC90E66=m
++# CONFIG_BLK_DEV_TRM290 is not set
++CONFIG_BLK_DEV_VIA82CXXX=m
++# CONFIG_IDE_ARM is not set
++CONFIG_BLK_DEV_IDEDMA=y
++# CONFIG_IDEDMA_IVB is not set
++CONFIG_IDEDMA_AUTO=y
++# CONFIG_BLK_DEV_HD is not set
++
++#
++# SCSI device support
++#
++CONFIG_RAID_ATTRS=m
++CONFIG_SCSI=m
++CONFIG_SCSI_PROC_FS=y
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=m
++CONFIG_CHR_DEV_ST=m
++CONFIG_CHR_DEV_OSST=m
++CONFIG_BLK_DEV_SR=m
++CONFIG_BLK_DEV_SR_VENDOR=y
++CONFIG_CHR_DEV_SG=m
++CONFIG_CHR_DEV_SCH=m
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++CONFIG_SCSI_MULTI_LUN=y
++CONFIG_SCSI_CONSTANTS=y
++CONFIG_SCSI_LOGGING=y
++
++#
++# SCSI Transport Attributes
++#
++CONFIG_SCSI_SPI_ATTRS=m
++CONFIG_SCSI_FC_ATTRS=m
++CONFIG_SCSI_ISCSI_ATTRS=m
++CONFIG_SCSI_SAS_ATTRS=m
++
++#
++# SCSI low-level drivers
++#
++CONFIG_ISCSI_TCP=m
++CONFIG_BLK_DEV_3W_XXXX_RAID=m
++CONFIG_SCSI_3W_9XXX=m
++CONFIG_SCSI_ACARD=m
++CONFIG_SCSI_AACRAID=m
++CONFIG_SCSI_AIC7XXX=m
++CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
++CONFIG_AIC7XXX_RESET_DELAY_MS=15000
++# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
++CONFIG_AIC7XXX_DEBUG_MASK=0
++# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
++CONFIG_SCSI_AIC7XXX_OLD=m
++CONFIG_SCSI_AIC79XX=m
++CONFIG_AIC79XX_CMDS_PER_DEVICE=4
++CONFIG_AIC79XX_RESET_DELAY_MS=15000
++# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
++# CONFIG_AIC79XX_DEBUG_ENABLE is not set
++CONFIG_AIC79XX_DEBUG_MASK=0
++# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
++CONFIG_MEGARAID_NEWGEN=y
++CONFIG_MEGARAID_MM=m
++CONFIG_MEGARAID_MAILBOX=m
++CONFIG_MEGARAID_LEGACY=m
++CONFIG_MEGARAID_SAS=m
++CONFIG_SCSI_SATA=m
++CONFIG_SCSI_SATA_AHCI=m
++CONFIG_SCSI_SATA_SVW=m
++CONFIG_SCSI_ATA_PIIX=m
++CONFIG_SCSI_SATA_MV=m
++CONFIG_SCSI_SATA_NV=m
++CONFIG_SCSI_PDC_ADMA=m
++CONFIG_SCSI_HPTIOP=m
++CONFIG_SCSI_SATA_QSTOR=m
++CONFIG_SCSI_SATA_PROMISE=m
++CONFIG_SCSI_SATA_SX4=m
++CONFIG_SCSI_SATA_SIL=m
++CONFIG_SCSI_SATA_SIL24=m
++CONFIG_SCSI_SATA_SIS=m
++CONFIG_SCSI_SATA_ULI=m
++CONFIG_SCSI_SATA_VIA=m
++CONFIG_SCSI_SATA_VITESSE=m
++CONFIG_SCSI_SATA_INTEL_COMBINED=y
++CONFIG_SCSI_BUSLOGIC=m
++# CONFIG_SCSI_OMIT_FLASHPOINT is not set
++CONFIG_SCSI_DMX3191D=m
++CONFIG_SCSI_EATA=m
++CONFIG_SCSI_EATA_TAGGED_QUEUE=y
++CONFIG_SCSI_EATA_LINKED_COMMANDS=y
++CONFIG_SCSI_EATA_MAX_TAGS=16
++CONFIG_SCSI_FUTURE_DOMAIN=m
++CONFIG_SCSI_GDTH=m
++CONFIG_SCSI_IPS=m
++CONFIG_SCSI_INITIO=m
++CONFIG_SCSI_INIA100=m
++CONFIG_SCSI_PPA=m
++CONFIG_SCSI_IMM=m
++# CONFIG_SCSI_IZIP_EPP16 is not set
++# CONFIG_SCSI_IZIP_SLOW_CTR is not set
++CONFIG_SCSI_SYM53C8XX_2=m
++CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
++CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
++CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
++CONFIG_SCSI_SYM53C8XX_MMIO=y
++# CONFIG_SCSI_IPR is not set
++CONFIG_SCSI_QLOGIC_1280=m
++CONFIG_SCSI_QLA_FC=m
++CONFIG_SCSI_LPFC=m
++CONFIG_SCSI_DC395x=m
++CONFIG_SCSI_DC390T=m
++# CONFIG_SCSI_DEBUG is not set
++
++#
++# PCMCIA SCSI adapter support
++#
++# CONFIG_PCMCIA_FDOMAIN is not set
++# CONFIG_PCMCIA_QLOGIC is not set
++# CONFIG_PCMCIA_SYM53C500 is not set
++
++#
++# Multi-device support (RAID and LVM)
++#
++CONFIG_MD=y
++CONFIG_BLK_DEV_MD=y
++CONFIG_MD_LINEAR=m
++CONFIG_MD_RAID0=m
++CONFIG_MD_RAID1=m
++CONFIG_MD_RAID10=m
++CONFIG_MD_RAID456=m
++CONFIG_MD_RAID5_RESHAPE=y
++CONFIG_MD_MULTIPATH=m
++CONFIG_MD_FAULTY=m
++CONFIG_BLK_DEV_DM=m
++CONFIG_DM_CRYPT=m
++CONFIG_DM_SNAPSHOT=m
++CONFIG_DM_MIRROR=m
++CONFIG_DM_ZERO=m
++CONFIG_DM_MULTIPATH=m
++CONFIG_DM_MULTIPATH_EMC=m
++
++#
++# Fusion MPT device support
++#
++CONFIG_FUSION=y
++CONFIG_FUSION_SPI=m
++CONFIG_FUSION_FC=m
++CONFIG_FUSION_SAS=m
++CONFIG_FUSION_MAX_SGE=128
++CONFIG_FUSION_CTL=m
++CONFIG_FUSION_LAN=m
++
++#
++# IEEE 1394 (FireWire) support
++#
++CONFIG_IEEE1394=m
++
++#
++# Subsystem Options
++#
++# CONFIG_IEEE1394_VERBOSEDEBUG is not set
++CONFIG_IEEE1394_OUI_DB=y
++CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
++CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
++# CONFIG_IEEE1394_EXPORT_FULL_API is not set
++
++#
++# Device Drivers
++#
++CONFIG_IEEE1394_PCILYNX=m
++CONFIG_IEEE1394_OHCI1394=m
++
++#
++# Protocol Drivers
++#
++CONFIG_IEEE1394_VIDEO1394=m
++CONFIG_IEEE1394_SBP2=m
++CONFIG_IEEE1394_ETH1394=m
++CONFIG_IEEE1394_DV1394=m
++CONFIG_IEEE1394_RAWIO=m
++
++#
++# I2O device support
++#
++CONFIG_I2O=m
++CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
++CONFIG_I2O_EXT_ADAPTEC=y
++CONFIG_I2O_EXT_ADAPTEC_DMA64=y
++CONFIG_I2O_CONFIG=m
++CONFIG_I2O_CONFIG_OLD_IOCTL=y
++CONFIG_I2O_BUS=m
++CONFIG_I2O_BLOCK=m
++CONFIG_I2O_SCSI=m
++CONFIG_I2O_PROC=m
++
++#
++# Network device support
++#
++CONFIG_NETDEVICES=y
++CONFIG_DUMMY=m
++CONFIG_BONDING=m
++CONFIG_EQUALIZER=m
++CONFIG_TUN=m
++CONFIG_NET_SB1000=m
++
++#
++# ARCnet devices
++#
++CONFIG_ARCNET=m
++CONFIG_ARCNET_1201=m
++CONFIG_ARCNET_1051=m
++CONFIG_ARCNET_RAW=m
++CONFIG_ARCNET_CAP=m
++CONFIG_ARCNET_COM90xx=m
++CONFIG_ARCNET_COM90xxIO=m
++CONFIG_ARCNET_RIM_I=m
++# CONFIG_ARCNET_COM20020 is not set
++
++#
++# PHY device support
++#
++CONFIG_PHYLIB=m
++
++#
++# MII PHY device drivers
++#
++CONFIG_MARVELL_PHY=m
++CONFIG_DAVICOM_PHY=m
++CONFIG_QSEMI_PHY=m
++CONFIG_LXT_PHY=m
++CONFIG_CICADA_PHY=m
++CONFIG_VITESSE_PHY=m
++CONFIG_SMSC_PHY=m
++CONFIG_FIXED_PHY=m
++# CONFIG_FIXED_MII_10_FDX is not set
++# CONFIG_FIXED_MII_100_FDX is not set
++
++#
++# Ethernet (10 or 100Mbit)
++#
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=m
++CONFIG_HAPPYMEAL=m
++CONFIG_SUNGEM=m
++CONFIG_CASSINI=m
++CONFIG_NET_VENDOR_3COM=y
++CONFIG_VORTEX=m
++CONFIG_TYPHOON=m
++
++#
++# Tulip family network device support
++#
++CONFIG_NET_TULIP=y
++CONFIG_DE2104X=m
++CONFIG_TULIP=m
++# CONFIG_TULIP_MWI is not set
++# CONFIG_TULIP_MMIO is not set
++CONFIG_TULIP_NAPI=y
++CONFIG_TULIP_NAPI_HW_MITIGATION=y
++CONFIG_DE4X5=m
++CONFIG_WINBOND_840=m
++CONFIG_DM9102=m
++CONFIG_ULI526X=m
++CONFIG_PCMCIA_XIRCOM=m
++CONFIG_HP100=m
++CONFIG_NET_PCI=y
++CONFIG_PCNET32=m
++CONFIG_AMD8111_ETH=m
++CONFIG_AMD8111E_NAPI=y
++CONFIG_ADAPTEC_STARFIRE=m
++CONFIG_ADAPTEC_STARFIRE_NAPI=y
++CONFIG_B44=m
++CONFIG_FORCEDETH=m
++CONFIG_DGRS=m
++CONFIG_EEPRO100=m
++CONFIG_E100=m
++CONFIG_FEALNX=m
++CONFIG_NATSEMI=m
++CONFIG_NE2K_PCI=m
++CONFIG_8139CP=m
++CONFIG_8139TOO=m
++# CONFIG_8139TOO_PIO is not set
++# CONFIG_8139TOO_TUNE_TWISTER is not set
++CONFIG_8139TOO_8129=y
++# CONFIG_8139_OLD_RX_RESET is not set
++CONFIG_SIS900=m
++CONFIG_EPIC100=m
++CONFIG_SUNDANCE=m
++# CONFIG_SUNDANCE_MMIO is not set
++CONFIG_VIA_RHINE=m
++# CONFIG_VIA_RHINE_MMIO is not set
++# CONFIG_VIA_RHINE_NAPI is not set
++# CONFIG_NET_POCKET is not set
++
++#
++# Ethernet (1000 Mbit)
++#
++CONFIG_ACENIC=m
++# CONFIG_ACENIC_OMIT_TIGON_I is not set
++CONFIG_DL2K=m
++CONFIG_E1000=m
++CONFIG_E1000_NAPI=y
++# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
++CONFIG_NS83820=m
++CONFIG_HAMACHI=m
++CONFIG_YELLOWFIN=m
++CONFIG_R8169=m
++CONFIG_R8169_NAPI=y
++CONFIG_R8169_VLAN=y
++CONFIG_SIS190=m
++CONFIG_SKGE=m
++CONFIG_SKY2=m
++CONFIG_SK98LIN=m
++CONFIG_VIA_VELOCITY=m
++CONFIG_TIGON3=m
++CONFIG_BNX2=m
++
++#
++# Ethernet (10000 Mbit)
++#
++CONFIG_CHELSIO_T1=m
++CONFIG_IXGB=m
++CONFIG_IXGB_NAPI=y
++CONFIG_S2IO=m
++CONFIG_S2IO_NAPI=y
++CONFIG_MYRI10GE=m
++
++#
++# Token Ring devices
++#
++CONFIG_TR=y
++CONFIG_IBMOL=m
++CONFIG_3C359=m
++CONFIG_TMS380TR=m
++CONFIG_TMSPCI=m
++CONFIG_ABYSS=m
++
++#
++# Wireless LAN (non-hamradio)
++#
++CONFIG_NET_RADIO=y
++CONFIG_NET_WIRELESS_RTNETLINK=y
++
++#
++# Obsolete Wireless cards support (pre-802.11)
++#
++CONFIG_STRIP=m
++CONFIG_PCMCIA_WAVELAN=m
++CONFIG_PCMCIA_NETWAVE=m
++
++#
++# Wireless 802.11 Frequency Hopping cards support
++#
++CONFIG_PCMCIA_RAYCS=m
++
++#
++# Wireless 802.11b ISA/PCI cards support
++#
++CONFIG_IPW2100=m
++CONFIG_IPW2100_MONITOR=y
++# CONFIG_IPW2100_DEBUG is not set
++CONFIG_IPW2200=m
++CONFIG_IPW2200_MONITOR=y
++# CONFIG_IPW2200_RADIOTAP is not set
++# CONFIG_IPW2200_PROMISCUOUS is not set
++CONFIG_IPW2200_QOS=y
++# CONFIG_IPW2200_DEBUG is not set
++CONFIG_AIRO=m
++CONFIG_HERMES=m
++CONFIG_PLX_HERMES=m
++CONFIG_TMD_HERMES=m
++CONFIG_NORTEL_HERMES=m
++CONFIG_PCI_HERMES=m
++CONFIG_ATMEL=m
++CONFIG_PCI_ATMEL=m
++
++#
++# Wireless 802.11b Pcmcia/Cardbus cards support
++#
++# CONFIG_PCMCIA_HERMES is not set
++# CONFIG_PCMCIA_SPECTRUM is not set
++# CONFIG_AIRO_CS is not set
++# CONFIG_PCMCIA_ATMEL is not set
++# CONFIG_PCMCIA_WL3501 is not set
++
++#
++# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
++#
++CONFIG_PRISM54=m
++CONFIG_USB_ZD1201=m
++CONFIG_HOSTAP=m
++CONFIG_HOSTAP_FIRMWARE=y
++CONFIG_HOSTAP_FIRMWARE_NVRAM=y
++CONFIG_HOSTAP_PLX=m
++CONFIG_HOSTAP_PCI=m
++# CONFIG_HOSTAP_CS is not set
++CONFIG_BCM43XX=m
++CONFIG_BCM43XX_DEBUG=y
++CONFIG_BCM43XX_DMA=y
++CONFIG_BCM43XX_PIO=y
++CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
++# CONFIG_BCM43XX_DMA_MODE is not set
++# CONFIG_BCM43XX_PIO_MODE is not set
++CONFIG_ZD1211RW=m
++# CONFIG_ZD1211RW_DEBUG is not set
++CONFIG_NET_WIRELESS=y
++
++#
++# PCMCIA network device support
++#
++# CONFIG_NET_PCMCIA is not set
++
++#
++# Wan interfaces
++#
++# CONFIG_WAN is not set
++
++#
++# ATM drivers
++#
++CONFIG_ATM_DUMMY=m
++CONFIG_ATM_TCP=m
++CONFIG_ATM_LANAI=m
++CONFIG_ATM_ENI=m
++# CONFIG_ATM_ENI_DEBUG is not set
++# CONFIG_ATM_ENI_TUNE_BURST is not set
++CONFIG_ATM_FIRESTREAM=m
++# CONFIG_ATM_ZATM is not set
++CONFIG_ATM_IDT77252=m
++# CONFIG_ATM_IDT77252_DEBUG is not set
++# CONFIG_ATM_IDT77252_RCV_ALL is not set
++CONFIG_ATM_IDT77252_USE_SUNI=y
++CONFIG_ATM_AMBASSADOR=m
++# CONFIG_ATM_AMBASSADOR_DEBUG is not set
++CONFIG_ATM_HORIZON=m
++# CONFIG_ATM_HORIZON_DEBUG is not set
++CONFIG_ATM_FORE200E_MAYBE=m
++# CONFIG_ATM_FORE200E_PCA is not set
++CONFIG_ATM_HE=m
++# CONFIG_ATM_HE_USE_SUNI is not set
++CONFIG_FDDI=y
++# CONFIG_DEFXX is not set
++CONFIG_SKFP=m
++CONFIG_HIPPI=y
++CONFIG_ROADRUNNER=m
++CONFIG_ROADRUNNER_LARGE_RINGS=y
++CONFIG_PLIP=m
++CONFIG_PPP=m
++CONFIG_PPP_MULTILINK=y
++CONFIG_PPP_FILTER=y
++CONFIG_PPP_ASYNC=m
++CONFIG_PPP_SYNC_TTY=m
++CONFIG_PPP_DEFLATE=m
++CONFIG_PPP_BSDCOMP=m
++CONFIG_PPP_MPPE=m
++CONFIG_PPPOE=m
++CONFIG_PPPOATM=m
++CONFIG_SLIP=m
++CONFIG_SLIP_COMPRESSED=y
++CONFIG_SLIP_SMART=y
++CONFIG_SLIP_MODE_SLIP6=y
++CONFIG_NET_FC=y
++CONFIG_SHAPER=m
++CONFIG_NETCONSOLE=m
++CONFIG_NETPOLL=y
++CONFIG_NETPOLL_RX=y
++CONFIG_NETPOLL_TRAP=y
++CONFIG_NET_POLL_CONTROLLER=y
++
++#
++# ISDN subsystem
++#
++CONFIG_ISDN=m
++
++#
++# Old ISDN4Linux
++#
++CONFIG_ISDN_I4L=m
++CONFIG_ISDN_PPP=y
++CONFIG_ISDN_PPP_VJ=y
++CONFIG_ISDN_MPP=y
++CONFIG_IPPP_FILTER=y
++CONFIG_ISDN_PPP_BSDCOMP=m
++CONFIG_ISDN_AUDIO=y
++CONFIG_ISDN_TTY_FAX=y
++CONFIG_ISDN_X25=y
++
++#
++# ISDN feature submodules
++#
++CONFIG_ISDN_DIVERSION=m
++
++#
++# ISDN4Linux hardware drivers
++#
++
++#
++# Passive cards
++#
++CONFIG_ISDN_DRV_HISAX=m
++
++#
++# D-channel protocol features
++#
++CONFIG_HISAX_EURO=y
++CONFIG_DE_AOC=y
++CONFIG_HISAX_NO_SENDCOMPLETE=y
++CONFIG_HISAX_NO_LLC=y
++CONFIG_HISAX_NO_KEYPAD=y
++CONFIG_HISAX_1TR6=y
++CONFIG_HISAX_NI1=y
++CONFIG_HISAX_MAX_CARDS=8
++
++#
++# HiSax supported cards
++#
++CONFIG_HISAX_16_3=y
++CONFIG_HISAX_TELESPCI=y
++CONFIG_HISAX_S0BOX=y
++CONFIG_HISAX_FRITZPCI=y
++CONFIG_HISAX_AVM_A1_PCMCIA=y
++CONFIG_HISAX_ELSA=y
++CONFIG_HISAX_DIEHLDIVA=y
++CONFIG_HISAX_SEDLBAUER=y
++CONFIG_HISAX_NETJET=y
++CONFIG_HISAX_NETJET_U=y
++CONFIG_HISAX_NICCY=y
++CONFIG_HISAX_BKM_A4T=y
++CONFIG_HISAX_SCT_QUADRO=y
++CONFIG_HISAX_GAZEL=y
++CONFIG_HISAX_HFC_PCI=y
++CONFIG_HISAX_W6692=y
++CONFIG_HISAX_HFC_SX=y
++CONFIG_HISAX_ENTERNOW_PCI=y
++# CONFIG_HISAX_DEBUG is not set
++
++#
++# HiSax PCMCIA card service modules
++#
++# CONFIG_HISAX_SEDLBAUER_CS is not set
++# CONFIG_HISAX_ELSA_CS is not set
++# CONFIG_HISAX_AVM_A1_CS is not set
++# CONFIG_HISAX_TELES_CS is not set
++
++#
++# HiSax sub driver modules
++#
++CONFIG_HISAX_ST5481=m
++CONFIG_HISAX_HFCUSB=m
++CONFIG_HISAX_HFC4S8S=m
++CONFIG_HISAX_FRITZ_PCIPNP=m
++CONFIG_HISAX_HDLC=y
++
++#
++# Active cards
++#
++
++#
++# Siemens Gigaset
++#
++CONFIG_ISDN_DRV_GIGASET=m
++CONFIG_GIGASET_BASE=m
++CONFIG_GIGASET_M105=m
++# CONFIG_GIGASET_DEBUG is not set
++# CONFIG_GIGASET_UNDOCREQ is not set
++
++#
++# CAPI subsystem
++#
++CONFIG_ISDN_CAPI=m
++CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
++CONFIG_ISDN_CAPI_MIDDLEWARE=y
++CONFIG_ISDN_CAPI_CAPI20=m
++CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
++CONFIG_ISDN_CAPI_CAPIFS=m
++CONFIG_ISDN_CAPI_CAPIDRV=m
++
++#
++# CAPI hardware drivers
++#
++
++#
++# Active AVM cards
++#
++CONFIG_CAPI_AVM=y
++CONFIG_ISDN_DRV_AVMB1_B1PCI=m
++CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
++CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
++# CONFIG_ISDN_DRV_AVMB1_AVM_CS is not set
++CONFIG_ISDN_DRV_AVMB1_T1PCI=m
++CONFIG_ISDN_DRV_AVMB1_C4=m
++
++#
++# Active Eicon DIVA Server cards
++#
++# CONFIG_CAPI_EICON is not set
++
++#
++# Telephony Support
++#
++CONFIG_PHONE=m
++CONFIG_PHONE_IXJ=m
++CONFIG_PHONE_IXJ_PCMCIA=m
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++
++#
++# Userland interfaces
++#
++CONFIG_INPUT_MOUSEDEV=y
++CONFIG_INPUT_MOUSEDEV_PSAUX=y
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++CONFIG_INPUT_JOYDEV=m
++CONFIG_INPUT_TSDEV=m
++CONFIG_INPUT_TSDEV_SCREEN_X=240
++CONFIG_INPUT_TSDEV_SCREEN_Y=320
++CONFIG_INPUT_EVDEV=y
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++CONFIG_INPUT_KEYBOARD=y
++CONFIG_KEYBOARD_ATKBD=y
++CONFIG_KEYBOARD_SUNKBD=m
++# CONFIG_KEYBOARD_LKKBD is not set
++CONFIG_KEYBOARD_XTKBD=m
++CONFIG_KEYBOARD_NEWTON=m
++CONFIG_INPUT_MOUSE=y
++CONFIG_MOUSE_PS2=y
++CONFIG_MOUSE_SERIAL=m
++# CONFIG_MOUSE_VSXXXAA is not set
++CONFIG_INPUT_JOYSTICK=y
++CONFIG_JOYSTICK_ANALOG=m
++CONFIG_JOYSTICK_A3D=m
++CONFIG_JOYSTICK_ADI=m
++CONFIG_JOYSTICK_COBRA=m
++CONFIG_JOYSTICK_GF2K=m
++CONFIG_JOYSTICK_GRIP=m
++CONFIG_JOYSTICK_GRIP_MP=m
++CONFIG_JOYSTICK_GUILLEMOT=m
++CONFIG_JOYSTICK_INTERACT=m
++CONFIG_JOYSTICK_SIDEWINDER=m
++CONFIG_JOYSTICK_TMDC=m
++CONFIG_JOYSTICK_IFORCE=m
++CONFIG_JOYSTICK_IFORCE_USB=y
++CONFIG_JOYSTICK_IFORCE_232=y
++CONFIG_JOYSTICK_WARRIOR=m
++CONFIG_JOYSTICK_MAGELLAN=m
++CONFIG_JOYSTICK_SPACEORB=m
++CONFIG_JOYSTICK_SPACEBALL=m
++CONFIG_JOYSTICK_STINGER=m
++CONFIG_JOYSTICK_TWIDJOY=m
++CONFIG_JOYSTICK_DB9=m
++CONFIG_JOYSTICK_GAMECON=m
++CONFIG_JOYSTICK_TURBOGRAFX=m
++CONFIG_JOYSTICK_JOYDUMP=m
++CONFIG_INPUT_TOUCHSCREEN=y
++CONFIG_TOUCHSCREEN_ADS7846=m
++CONFIG_TOUCHSCREEN_GUNZE=m
++CONFIG_TOUCHSCREEN_ELO=m
++CONFIG_TOUCHSCREEN_MTOUCH=m
++CONFIG_TOUCHSCREEN_MK712=m
++CONFIG_INPUT_MISC=y
++CONFIG_INPUT_PCSPKR=m
++CONFIG_INPUT_UINPUT=m
++
++#
++# Hardware I/O ports
++#
++CONFIG_SERIO=y
++CONFIG_SERIO_I8042=y
++CONFIG_SERIO_SERPORT=m
++CONFIG_SERIO_CT82C710=m
++CONFIG_SERIO_PARKBD=m
++CONFIG_SERIO_PCIPS2=m
++CONFIG_SERIO_LIBPS2=y
++CONFIG_SERIO_RAW=m
++CONFIG_GAMEPORT=m
++CONFIG_GAMEPORT_NS558=m
++CONFIG_GAMEPORT_L4=m
++CONFIG_GAMEPORT_EMU10K1=m
++CONFIG_GAMEPORT_FM801=m
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++CONFIG_VT_HW_CONSOLE_BINDING=y
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++
++#
++# Non-8250 serial port support
++#
++# CONFIG_SERIAL_JSM is not set
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=64
++CONFIG_PRINTER=m
++CONFIG_LP_CONSOLE=y
++CONFIG_PPDEV=m
++CONFIG_TIPAR=m
++
++#
++# IPMI
++#
++CONFIG_IPMI_HANDLER=m
++CONFIG_IPMI_PANIC_EVENT=y
++# CONFIG_IPMI_PANIC_STRING is not set
++CONFIG_IPMI_DEVICE_INTERFACE=m
++CONFIG_IPMI_SI=m
++CONFIG_IPMI_WATCHDOG=m
++CONFIG_IPMI_POWEROFF=m
++
++#
++# Watchdog Cards
++#
++CONFIG_WATCHDOG=y
++# CONFIG_WATCHDOG_NOWAYOUT is not set
++
++#
++# Watchdog Device Drivers
++#
++CONFIG_SOFT_WATCHDOG=m
++CONFIG_ACQUIRE_WDT=m
++CONFIG_ADVANTECH_WDT=m
++CONFIG_ALIM1535_WDT=m
++CONFIG_ALIM7101_WDT=m
++CONFIG_SC520_WDT=m
++CONFIG_EUROTECH_WDT=m
++CONFIG_IB700_WDT=m
++CONFIG_IBMASR=m
++CONFIG_WAFER_WDT=m
++CONFIG_I6300ESB_WDT=m
++CONFIG_I8XX_TCO=m
++CONFIG_SC1200_WDT=m
++CONFIG_60XX_WDT=m
++CONFIG_SBC8360_WDT=m
++CONFIG_CPU5_WDT=m
++CONFIG_W83627HF_WDT=m
++CONFIG_W83877F_WDT=m
++CONFIG_W83977F_WDT=m
++CONFIG_MACHZ_WDT=m
++CONFIG_SBC_EPX_C3_WATCHDOG=m
++
++#
++# PCI-based Watchdog Cards
++#
++CONFIG_PCIPCWATCHDOG=m
++CONFIG_WDTPCI=m
++CONFIG_WDT_501_PCI=y
++
++#
++# USB-based Watchdog Cards
++#
++CONFIG_USBPCWATCHDOG=m
++CONFIG_HW_RANDOM=y
++CONFIG_HW_RANDOM_INTEL=m
++CONFIG_HW_RANDOM_AMD=m
++CONFIG_HW_RANDOM_GEODE=m
++CONFIG_NVRAM=y
++CONFIG_RTC=y
++CONFIG_DTLK=m
++CONFIG_R3964=m
++CONFIG_APPLICOM=m
++
++#
++# Ftape, the floppy tape device driver
++#
++CONFIG_AGP=m
++CONFIG_AGP_AMD64=m
++CONFIG_AGP_INTEL=m
++CONFIG_AGP_SIS=m
++CONFIG_AGP_VIA=m
++CONFIG_DRM=m
++CONFIG_DRM_TDFX=m
++CONFIG_DRM_R128=m
++CONFIG_DRM_RADEON=m
++CONFIG_DRM_I810=m
++# CONFIG_DRM_I830 is not set
++CONFIG_DRM_I915=m
++CONFIG_DRM_MGA=m
++# CONFIG_DRM_SIS is not set
++CONFIG_DRM_VIA=m
++CONFIG_DRM_SAVAGE=m
++
++#
++# PCMCIA character devices
++#
++# CONFIG_SYNCLINK_CS is not set
++# CONFIG_CARDMAN_4000 is not set
++# CONFIG_CARDMAN_4040 is not set
++# CONFIG_MWAVE is not set
++CONFIG_PC8736x_GPIO=m
++CONFIG_NSC_GPIO=m
++# CONFIG_RAW_DRIVER is not set
++# CONFIG_HPET is not set
++CONFIG_HANGCHECK_TIMER=m
++
++#
++# TPM devices
++#
++CONFIG_TCG_TPM=m
++CONFIG_TCG_TIS=m
++CONFIG_TCG_NSC=m
++CONFIG_TCG_ATMEL=m
++CONFIG_TCG_INFINEON=m
++CONFIG_TCG_XEN=m
++CONFIG_TELCLOCK=m
++
++#
++# I2C support
++#
++CONFIG_I2C=m
++CONFIG_I2C_CHARDEV=m
++
++#
++# I2C Algorithms
++#
++CONFIG_I2C_ALGOBIT=m
++CONFIG_I2C_ALGOPCF=m
++CONFIG_I2C_ALGOPCA=m
++
++#
++# I2C Hardware Bus support
++#
++CONFIG_I2C_ALI1535=m
++CONFIG_I2C_ALI1563=m
++CONFIG_I2C_ALI15X3=m
++CONFIG_I2C_AMD756=m
++CONFIG_I2C_AMD756_S4882=m
++CONFIG_I2C_AMD8111=m
++CONFIG_I2C_I801=m
++CONFIG_I2C_I810=m
++CONFIG_I2C_PIIX4=m
++CONFIG_I2C_ISA=m
++CONFIG_I2C_NFORCE2=m
++CONFIG_I2C_OCORES=m
++CONFIG_I2C_PARPORT=m
++CONFIG_I2C_PARPORT_LIGHT=m
++CONFIG_I2C_PROSAVAGE=m
++CONFIG_I2C_SAVAGE4=m
++CONFIG_I2C_SIS5595=m
++CONFIG_I2C_SIS630=m
++CONFIG_I2C_SIS96X=m
++CONFIG_I2C_STUB=m
++CONFIG_I2C_VIA=m
++CONFIG_I2C_VIAPRO=m
++CONFIG_I2C_VOODOO3=m
++CONFIG_I2C_PCA_ISA=m
++
++#
++# Miscellaneous I2C Chip support
++#
++CONFIG_SENSORS_DS1337=m
++CONFIG_SENSORS_DS1374=m
++CONFIG_SENSORS_EEPROM=m
++CONFIG_SENSORS_PCF8574=m
++CONFIG_SENSORS_PCA9539=m
++CONFIG_SENSORS_PCF8591=m
++CONFIG_SENSORS_MAX6875=m
++# CONFIG_I2C_DEBUG_CORE is not set
++# CONFIG_I2C_DEBUG_ALGO is not set
++# CONFIG_I2C_DEBUG_BUS is not set
++# CONFIG_I2C_DEBUG_CHIP is not set
++
++#
++# SPI support
++#
++CONFIG_SPI=y
++# CONFIG_SPI_DEBUG is not set
++CONFIG_SPI_MASTER=y
++
++#
++# SPI Master Controller Drivers
++#
++CONFIG_SPI_BITBANG=m
++CONFIG_SPI_BUTTERFLY=m
++
++#
++# SPI Protocol Masters
++#
++
++#
++# Dallas's 1-wire bus
++#
++CONFIG_W1=m
++CONFIG_W1_CON=y
++
++#
++# 1-wire Bus Masters
++#
++CONFIG_W1_MASTER_MATROX=m
++CONFIG_W1_MASTER_DS2490=m
++CONFIG_W1_MASTER_DS2482=m
++
++#
++# 1-wire Slaves
++#
++CONFIG_W1_SLAVE_THERM=m
++CONFIG_W1_SLAVE_SMEM=m
++CONFIG_W1_SLAVE_DS2433=m
++# CONFIG_W1_SLAVE_DS2433_CRC is not set
++
++#
++# Hardware Monitoring support
++#
++CONFIG_HWMON=m
++CONFIG_HWMON_VID=m
++CONFIG_SENSORS_ABITUGURU=m
++CONFIG_SENSORS_ADM1021=m
++CONFIG_SENSORS_ADM1025=m
++CONFIG_SENSORS_ADM1026=m
++CONFIG_SENSORS_ADM1031=m
++CONFIG_SENSORS_ADM9240=m
++CONFIG_SENSORS_ASB100=m
++CONFIG_SENSORS_ATXP1=m
++CONFIG_SENSORS_DS1621=m
++CONFIG_SENSORS_F71805F=m
++CONFIG_SENSORS_FSCHER=m
++CONFIG_SENSORS_FSCPOS=m
++CONFIG_SENSORS_GL518SM=m
++CONFIG_SENSORS_GL520SM=m
++CONFIG_SENSORS_IT87=m
++CONFIG_SENSORS_LM63=m
++CONFIG_SENSORS_LM70=m
++CONFIG_SENSORS_LM75=m
++CONFIG_SENSORS_LM77=m
++CONFIG_SENSORS_LM78=m
++CONFIG_SENSORS_LM80=m
++CONFIG_SENSORS_LM83=m
++CONFIG_SENSORS_LM85=m
++CONFIG_SENSORS_LM87=m
++CONFIG_SENSORS_LM90=m
++CONFIG_SENSORS_LM92=m
++CONFIG_SENSORS_MAX1619=m
++CONFIG_SENSORS_PC87360=m
++CONFIG_SENSORS_SIS5595=m
++CONFIG_SENSORS_SMSC47M1=m
++CONFIG_SENSORS_SMSC47M192=m
++CONFIG_SENSORS_SMSC47B397=m
++CONFIG_SENSORS_VIA686A=m
++CONFIG_SENSORS_VT8231=m
++CONFIG_SENSORS_W83781D=m
++CONFIG_SENSORS_W83791D=m
++CONFIG_SENSORS_W83792D=m
++CONFIG_SENSORS_W83L785TS=m
++CONFIG_SENSORS_W83627HF=m
++CONFIG_SENSORS_W83627EHF=m
++CONFIG_SENSORS_HDAPS=m
++# CONFIG_HWMON_DEBUG_CHIP is not set
++
++#
++# Misc devices
++#
++CONFIG_IBM_ASM=m
++
++#
++# Multimedia devices
++#
++CONFIG_VIDEO_DEV=m
++CONFIG_VIDEO_V4L1=y
++CONFIG_VIDEO_V4L1_COMPAT=y
++CONFIG_VIDEO_V4L2=y
++
++#
++# Video Capture Adapters
++#
++
++#
++# Video Capture Adapters
++#
++# CONFIG_VIDEO_ADV_DEBUG is not set
++CONFIG_VIDEO_VIVI=m
++CONFIG_VIDEO_BT848=m
++CONFIG_VIDEO_BT848_DVB=y
++CONFIG_VIDEO_SAA6588=m
++CONFIG_VIDEO_BWQCAM=m
++CONFIG_VIDEO_CQCAM=m
++CONFIG_VIDEO_W9966=m
++CONFIG_VIDEO_CPIA=m
++CONFIG_VIDEO_CPIA_PP=m
++CONFIG_VIDEO_CPIA_USB=m
++CONFIG_VIDEO_CPIA2=m
++CONFIG_VIDEO_SAA5246A=m
++CONFIG_VIDEO_SAA5249=m
++CONFIG_TUNER_3036=m
++CONFIG_VIDEO_STRADIS=m
++CONFIG_VIDEO_ZORAN=m
++CONFIG_VIDEO_ZORAN_BUZ=m
++CONFIG_VIDEO_ZORAN_DC10=m
++CONFIG_VIDEO_ZORAN_DC30=m
++CONFIG_VIDEO_ZORAN_LML33=m
++CONFIG_VIDEO_ZORAN_LML33R10=m
++CONFIG_VIDEO_ZORAN_AVS6EYES=m
++CONFIG_VIDEO_SAA7134=m
++CONFIG_VIDEO_SAA7134_ALSA=m
++CONFIG_VIDEO_SAA7134_DVB=m
++CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y
++CONFIG_VIDEO_MXB=m
++CONFIG_VIDEO_DPC=m
++CONFIG_VIDEO_HEXIUM_ORION=m
++CONFIG_VIDEO_HEXIUM_GEMINI=m
++CONFIG_VIDEO_CX88_VP3054=m
++CONFIG_VIDEO_CX88=m
++CONFIG_VIDEO_CX88_ALSA=m
++CONFIG_VIDEO_CX88_BLACKBIRD=m
++CONFIG_VIDEO_CX88_DVB=m
++CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y
++
++#
++# Encoders and Decoders
++#
++CONFIG_VIDEO_MSP3400=m
++CONFIG_VIDEO_CS53L32A=m
++CONFIG_VIDEO_TLV320AIC23B=m
++CONFIG_VIDEO_WM8775=m
++CONFIG_VIDEO_WM8739=m
++CONFIG_VIDEO_CX2341X=m
++CONFIG_VIDEO_CX25840=m
++CONFIG_VIDEO_SAA711X=m
++CONFIG_VIDEO_SAA7127=m
++CONFIG_VIDEO_UPD64031A=m
++CONFIG_VIDEO_UPD64083=m
++
++#
++# V4L USB devices
++#
++CONFIG_VIDEO_PVRUSB2=m
++CONFIG_VIDEO_PVRUSB2_24XXX=y
++CONFIG_VIDEO_PVRUSB2_SYSFS=y
++# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
++CONFIG_VIDEO_EM28XX=m
++CONFIG_VIDEO_USBVIDEO=m
++CONFIG_USB_VICAM=m
++CONFIG_USB_IBMCAM=m
++CONFIG_USB_KONICAWC=m
++CONFIG_USB_QUICKCAM_MESSENGER=m
++CONFIG_USB_ET61X251=m
++CONFIG_VIDEO_OVCAMCHIP=m
++CONFIG_USB_W9968CF=m
++CONFIG_USB_OV511=m
++CONFIG_USB_SE401=m
++CONFIG_USB_SN9C102=m
++CONFIG_USB_STV680=m
++CONFIG_USB_ZC0301=m
++CONFIG_USB_PWC=m
++# CONFIG_USB_PWC_DEBUG is not set
++
++#
++# Radio Adapters
++#
++CONFIG_RADIO_GEMTEK_PCI=m
++CONFIG_RADIO_MAXIRADIO=m
++CONFIG_RADIO_MAESTRO=m
++CONFIG_USB_DSBR=m
++
++#
++# Digital Video Broadcasting Devices
++#
++CONFIG_DVB=y
++CONFIG_DVB_CORE=m
++
++#
++# Supported SAA7146 based PCI Adapters
++#
++CONFIG_DVB_AV7110=m
++CONFIG_DVB_AV7110_OSD=y
++CONFIG_DVB_BUDGET=m
++CONFIG_DVB_BUDGET_CI=m
++CONFIG_DVB_BUDGET_AV=m
++CONFIG_DVB_BUDGET_PATCH=m
++
++#
++# Supported USB Adapters
++#
++CONFIG_DVB_USB=m
++# CONFIG_DVB_USB_DEBUG is not set
++CONFIG_DVB_USB_A800=m
++CONFIG_DVB_USB_DIBUSB_MB=m
++# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
++CONFIG_DVB_USB_DIBUSB_MC=m
++CONFIG_DVB_USB_UMT_010=m
++CONFIG_DVB_USB_CXUSB=m
++CONFIG_DVB_USB_DIGITV=m
++CONFIG_DVB_USB_VP7045=m
++CONFIG_DVB_USB_VP702X=m
++CONFIG_DVB_USB_GP8PSK=m
++CONFIG_DVB_USB_NOVA_T_USB2=m
++CONFIG_DVB_USB_DTT200U=m
++CONFIG_DVB_TTUSB_BUDGET=m
++CONFIG_DVB_TTUSB_DEC=m
++CONFIG_DVB_CINERGYT2=m
++CONFIG_DVB_CINERGYT2_TUNING=y
++CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT=32
++CONFIG_DVB_CINERGYT2_STREAM_BUF_SIZE=512
++CONFIG_DVB_CINERGYT2_QUERY_INTERVAL=250
++CONFIG_DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE=y
++CONFIG_DVB_CINERGYT2_RC_QUERY_INTERVAL=100
++
++#
++# Supported FlexCopII (B2C2) Adapters
++#
++CONFIG_DVB_B2C2_FLEXCOP=m
++CONFIG_DVB_B2C2_FLEXCOP_PCI=m
++CONFIG_DVB_B2C2_FLEXCOP_USB=m
++# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
++
++#
++# Supported BT878 Adapters
++#
++CONFIG_DVB_BT8XX=m
++
++#
++# Supported Pluto2 Adapters
++#
++CONFIG_DVB_PLUTO2=m
++
++#
++# Supported DVB Frontends
++#
++
++#
++# Customise DVB Frontends
++#
++
++#
++# DVB-S (satellite) frontends
++#
++CONFIG_DVB_STV0299=m
++CONFIG_DVB_CX24110=m
++CONFIG_DVB_CX24123=m
++CONFIG_DVB_TDA8083=m
++CONFIG_DVB_MT312=m
++CONFIG_DVB_VES1X93=m
++CONFIG_DVB_S5H1420=m
++
++#
++# DVB-T (terrestrial) frontends
++#
++CONFIG_DVB_SP8870=m
++CONFIG_DVB_SP887X=m
++CONFIG_DVB_CX22700=m
++CONFIG_DVB_CX22702=m
++CONFIG_DVB_L64781=m
++CONFIG_DVB_TDA1004X=m
++CONFIG_DVB_NXT6000=m
++CONFIG_DVB_MT352=m
++CONFIG_DVB_ZL10353=m
++CONFIG_DVB_DIB3000MB=m
++CONFIG_DVB_DIB3000MC=m
++
++#
++# DVB-C (cable) frontends
++#
++CONFIG_DVB_VES1820=m
++CONFIG_DVB_TDA10021=m
++CONFIG_DVB_STV0297=m
++
++#
++# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
++#
++CONFIG_DVB_NXT200X=m
++CONFIG_DVB_OR51211=m
++CONFIG_DVB_OR51132=m
++CONFIG_DVB_BCM3510=m
++CONFIG_DVB_LGDT330X=m
++
++#
++# Miscellaneous devices
++#
++CONFIG_DVB_PLL=m
++CONFIG_DVB_LNBP21=m
++CONFIG_DVB_ISL6421=m
++CONFIG_VIDEO_SAA7146=m
++CONFIG_VIDEO_SAA7146_VV=m
++CONFIG_VIDEO_VIDEOBUF=m
++CONFIG_VIDEO_TUNER=m
++CONFIG_VIDEO_BUF=m
++CONFIG_VIDEO_BUF_DVB=m
++CONFIG_VIDEO_BTCX=m
++CONFIG_VIDEO_IR=m
++CONFIG_VIDEO_TVEEPROM=m
++CONFIG_USB_DABUSB=m
++
++#
++# Graphics support
++#
++CONFIG_FIRMWARE_EDID=y
++CONFIG_FB=y
++CONFIG_FB_CFB_FILLRECT=y
++CONFIG_FB_CFB_COPYAREA=y
++CONFIG_FB_CFB_IMAGEBLIT=y
++# CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
++CONFIG_FB_MODE_HELPERS=y
++CONFIG_FB_TILEBLITTING=y
++CONFIG_FB_CIRRUS=m
++# CONFIG_FB_PM2 is not set
++CONFIG_FB_CYBER2000=m
++CONFIG_FB_ARC=m
++# CONFIG_FB_ASILIANT is not set
++# CONFIG_FB_IMSTT is not set
++CONFIG_FB_VGA16=m
++CONFIG_FB_VESA=y
++CONFIG_FB_HGA=m
++CONFIG_FB_HGA_ACCEL=y
++CONFIG_FB_S1D13XXX=m
++CONFIG_FB_NVIDIA=m
++CONFIG_FB_NVIDIA_I2C=y
++CONFIG_FB_RIVA=m
++CONFIG_FB_RIVA_I2C=y
++# CONFIG_FB_RIVA_DEBUG is not set
++CONFIG_FB_INTEL=m
++# CONFIG_FB_INTEL_DEBUG is not set
++CONFIG_FB_MATROX=m
++CONFIG_FB_MATROX_MILLENIUM=y
++CONFIG_FB_MATROX_MYSTIQUE=y
++CONFIG_FB_MATROX_G=y
++CONFIG_FB_MATROX_I2C=m
++CONFIG_FB_MATROX_MAVEN=m
++CONFIG_FB_MATROX_MULTIHEAD=y
++CONFIG_FB_RADEON=m
++CONFIG_FB_RADEON_I2C=y
++# CONFIG_FB_RADEON_DEBUG is not set
++CONFIG_FB_ATY128=m
++CONFIG_FB_ATY=m
++CONFIG_FB_ATY_CT=y
++CONFIG_FB_ATY_GENERIC_LCD=y
++CONFIG_FB_ATY_GX=y
++CONFIG_FB_SAVAGE=m
++CONFIG_FB_SAVAGE_I2C=y
++CONFIG_FB_SAVAGE_ACCEL=y
++CONFIG_FB_SIS=m
++CONFIG_FB_SIS_300=y
++CONFIG_FB_SIS_315=y
++CONFIG_FB_NEOMAGIC=m
++CONFIG_FB_KYRO=m
++CONFIG_FB_3DFX=m
++CONFIG_FB_3DFX_ACCEL=y
++CONFIG_FB_VOODOO1=m
++CONFIG_FB_TRIDENT=m
++CONFIG_FB_TRIDENT_ACCEL=y
++CONFIG_FB_GEODE=y
++CONFIG_FB_GEODE_GX=m
++CONFIG_FB_GEODE_GX1=m
++CONFIG_FB_VIRTUAL=m
++
++#
++# Console display driver support
++#
++CONFIG_VGA_CONSOLE=y
++# CONFIG_VGACON_SOFT_SCROLLBACK is not set
++CONFIG_DUMMY_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
++# CONFIG_FONTS is not set
++CONFIG_FONT_8x8=y
++CONFIG_FONT_8x16=y
++
++#
++# Logo configuration
++#
++CONFIG_LOGO=y
++# CONFIG_LOGO_LINUX_MONO is not set
++# CONFIG_LOGO_LINUX_VGA16 is not set
++CONFIG_LOGO_LINUX_CLUT224=y
++CONFIG_BACKLIGHT_LCD_SUPPORT=y
++CONFIG_BACKLIGHT_CLASS_DEVICE=m
++CONFIG_BACKLIGHT_DEVICE=y
++CONFIG_LCD_CLASS_DEVICE=m
++CONFIG_LCD_DEVICE=y
++
++#
++# Sound
++#
++CONFIG_SOUND=m
++
++#
++# Advanced Linux Sound Architecture
++#
++CONFIG_SND=m
++CONFIG_SND_TIMER=m
++CONFIG_SND_PCM=m
++CONFIG_SND_HWDEP=m
++CONFIG_SND_RAWMIDI=m
++CONFIG_SND_SEQUENCER=m
++CONFIG_SND_SEQ_DUMMY=m
++CONFIG_SND_OSSEMUL=y
++CONFIG_SND_MIXER_OSS=m
++CONFIG_SND_PCM_OSS=m
++CONFIG_SND_PCM_OSS_PLUGINS=y
++CONFIG_SND_SEQUENCER_OSS=y
++CONFIG_SND_RTCTIMER=m
++CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
++CONFIG_SND_DYNAMIC_MINORS=y
++CONFIG_SND_SUPPORT_OLD_API=y
++CONFIG_SND_VERBOSE_PROCFS=y
++# CONFIG_SND_VERBOSE_PRINTK is not set
++# CONFIG_SND_DEBUG is not set
++
++#
++# Generic devices
++#
++CONFIG_SND_MPU401_UART=m
++CONFIG_SND_OPL3_LIB=m
++CONFIG_SND_VX_LIB=m
++CONFIG_SND_AC97_CODEC=m
++CONFIG_SND_AC97_BUS=m
++CONFIG_SND_DUMMY=m
++CONFIG_SND_VIRMIDI=m
++CONFIG_SND_MTPAV=m
++CONFIG_SND_SERIAL_U16550=m
++CONFIG_SND_MPU401=m
++
++#
++# PCI devices
++#
++CONFIG_SND_AD1889=m
++CONFIG_SND_ALS300=m
++CONFIG_SND_ALS4000=m
++CONFIG_SND_ALI5451=m
++CONFIG_SND_ATIIXP=m
++CONFIG_SND_ATIIXP_MODEM=m
++CONFIG_SND_AU8810=m
++CONFIG_SND_AU8820=m
++CONFIG_SND_AU8830=m
++CONFIG_SND_AZT3328=m
++CONFIG_SND_BT87X=m
++# CONFIG_SND_BT87X_OVERCLOCK is not set
++CONFIG_SND_CA0106=m
++CONFIG_SND_CMIPCI=m
++CONFIG_SND_CS4281=m
++CONFIG_SND_CS46XX=m
++CONFIG_SND_CS46XX_NEW_DSP=y
++CONFIG_SND_DARLA20=m
++CONFIG_SND_GINA20=m
++CONFIG_SND_LAYLA20=m
++CONFIG_SND_DARLA24=m
++CONFIG_SND_GINA24=m
++CONFIG_SND_LAYLA24=m
++CONFIG_SND_MONA=m
++CONFIG_SND_MIA=m
++CONFIG_SND_ECHO3G=m
++CONFIG_SND_INDIGO=m
++CONFIG_SND_INDIGOIO=m
++CONFIG_SND_INDIGODJ=m
++CONFIG_SND_EMU10K1=m
++CONFIG_SND_EMU10K1X=m
++CONFIG_SND_ENS1370=m
++CONFIG_SND_ENS1371=m
++CONFIG_SND_ES1938=m
++CONFIG_SND_ES1968=m
++CONFIG_SND_FM801=m
++CONFIG_SND_FM801_TEA575X_BOOL=y
++CONFIG_SND_FM801_TEA575X=m
++CONFIG_SND_HDA_INTEL=m
++CONFIG_SND_HDSP=m
++CONFIG_SND_HDSPM=m
++CONFIG_SND_ICE1712=m
++CONFIG_SND_ICE1724=m
++CONFIG_SND_INTEL8X0=m
++CONFIG_SND_INTEL8X0M=m
++CONFIG_SND_KORG1212=m
++CONFIG_SND_MAESTRO3=m
++CONFIG_SND_MIXART=m
++CONFIG_SND_NM256=m
++CONFIG_SND_PCXHR=m
++CONFIG_SND_RIPTIDE=m
++CONFIG_SND_RME32=m
++CONFIG_SND_RME96=m
++CONFIG_SND_RME9652=m
++CONFIG_SND_SONICVIBES=m
++CONFIG_SND_TRIDENT=m
++CONFIG_SND_VIA82XX=m
++CONFIG_SND_VIA82XX_MODEM=m
++CONFIG_SND_VX222=m
++CONFIG_SND_YMFPCI=m
++
++#
++# USB devices
++#
++CONFIG_SND_USB_AUDIO=m
++CONFIG_SND_USB_USX2Y=m
++
++#
++# PCMCIA devices
++#
++CONFIG_SND_VXPOCKET=m
++CONFIG_SND_PDAUDIOCF=m
++
++#
++# Open Sound System
++#
++# CONFIG_SOUND_PRIME is not set
++
++#
++# USB support
++#
++CONFIG_USB_ARCH_HAS_HCD=y
++CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
++CONFIG_USB=m
++# CONFIG_USB_DEBUG is not set
++
++#
++# Miscellaneous USB options
++#
++CONFIG_USB_DEVICEFS=y
++# CONFIG_USB_BANDWIDTH is not set
++# CONFIG_USB_DYNAMIC_MINORS is not set
++# CONFIG_USB_SUSPEND is not set
++# CONFIG_USB_OTG is not set
++
++#
++# USB Host Controller Drivers
++#
++CONFIG_USB_EHCI_HCD=m
++CONFIG_USB_EHCI_SPLIT_ISO=y
++CONFIG_USB_EHCI_ROOT_HUB_TT=y
++CONFIG_USB_EHCI_TT_NEWSCHED=y
++CONFIG_USB_ISP116X_HCD=m
++CONFIG_USB_OHCI_HCD=m
++# CONFIG_USB_OHCI_BIG_ENDIAN is not set
++CONFIG_USB_OHCI_LITTLE_ENDIAN=y
++CONFIG_USB_UHCI_HCD=m
++CONFIG_USB_SL811_HCD=m
++# CONFIG_USB_SL811_CS is not set
++
++#
++# USB Device Class drivers
++#
++CONFIG_USB_ACM=m
++CONFIG_USB_PRINTER=m
++
++#
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
++#
++
++#
++# may also be needed; see USB_STORAGE Help for more information
++#
++CONFIG_USB_STORAGE=m
++# CONFIG_USB_STORAGE_DEBUG is not set
++CONFIG_USB_STORAGE_DATAFAB=y
++CONFIG_USB_STORAGE_FREECOM=y
++CONFIG_USB_STORAGE_ISD200=y
++CONFIG_USB_STORAGE_DPCM=y
++CONFIG_USB_STORAGE_USBAT=y
++CONFIG_USB_STORAGE_SDDR09=y
++CONFIG_USB_STORAGE_SDDR55=y
++CONFIG_USB_STORAGE_JUMPSHOT=y
++# CONFIG_USB_STORAGE_ALAUDA is not set
++# CONFIG_USB_LIBUSUAL is not set
++
++#
++# USB Input Devices
++#
++CONFIG_USB_HID=m
++CONFIG_USB_HIDINPUT=y
++# CONFIG_USB_HIDINPUT_POWERBOOK is not set
++CONFIG_HID_FF=y
++CONFIG_HID_PID=y
++CONFIG_LOGITECH_FF=y
++CONFIG_THRUSTMASTER_FF=y
++CONFIG_USB_HIDDEV=y
++
++#
++# USB HID Boot Protocol drivers
++#
++CONFIG_USB_KBD=m
++CONFIG_USB_MOUSE=m
++CONFIG_USB_AIPTEK=m
++CONFIG_USB_WACOM=m
++CONFIG_USB_ACECAD=m
++CONFIG_USB_KBTAB=m
++CONFIG_USB_POWERMATE=m
++CONFIG_USB_TOUCHSCREEN=m
++CONFIG_USB_TOUCHSCREEN_EGALAX=y
++CONFIG_USB_TOUCHSCREEN_PANJIT=y
++CONFIG_USB_TOUCHSCREEN_3M=y
++CONFIG_USB_TOUCHSCREEN_ITM=y
++CONFIG_USB_YEALINK=m
++CONFIG_USB_XPAD=m
++CONFIG_USB_ATI_REMOTE=m
++CONFIG_USB_ATI_REMOTE2=m
++CONFIG_USB_KEYSPAN_REMOTE=m
++CONFIG_USB_APPLETOUCH=m
++
++#
++# USB Imaging devices
++#
++CONFIG_USB_MDC800=m
++CONFIG_USB_MICROTEK=m
++
++#
++# USB Network Adapters
++#
++CONFIG_USB_CATC=m
++CONFIG_USB_KAWETH=m
++CONFIG_USB_PEGASUS=m
++CONFIG_USB_RTL8150=m
++CONFIG_USB_USBNET=m
++CONFIG_USB_NET_AX8817X=m
++CONFIG_USB_NET_CDCETHER=m
++CONFIG_USB_NET_GL620A=m
++CONFIG_USB_NET_NET1080=m
++CONFIG_USB_NET_PLUSB=m
++CONFIG_USB_NET_RNDIS_HOST=m
++CONFIG_USB_NET_CDC_SUBSET=m
++CONFIG_USB_ALI_M5632=y
++CONFIG_USB_AN2720=y
++CONFIG_USB_BELKIN=y
++CONFIG_USB_ARMLINUX=y
++CONFIG_USB_EPSON2888=y
++CONFIG_USB_NET_ZAURUS=m
++CONFIG_USB_MON=y
++
++#
++# USB port drivers
++#
++CONFIG_USB_USS720=m
++
++#
++# USB Serial Converter support
++#
++CONFIG_USB_SERIAL=m
++CONFIG_USB_SERIAL_GENERIC=y
++CONFIG_USB_SERIAL_AIRPRIME=m
++CONFIG_USB_SERIAL_ARK3116=m
++CONFIG_USB_SERIAL_BELKIN=m
++CONFIG_USB_SERIAL_WHITEHEAT=m
++CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
++CONFIG_USB_SERIAL_CP2101=m
++CONFIG_USB_SERIAL_CYPRESS_M8=m
++CONFIG_USB_SERIAL_EMPEG=m
++CONFIG_USB_SERIAL_FTDI_SIO=m
++CONFIG_USB_SERIAL_FUNSOFT=m
++CONFIG_USB_SERIAL_VISOR=m
++CONFIG_USB_SERIAL_IPAQ=m
++CONFIG_USB_SERIAL_IR=m
++CONFIG_USB_SERIAL_EDGEPORT=m
++CONFIG_USB_SERIAL_EDGEPORT_TI=m
++CONFIG_USB_SERIAL_GARMIN=m
++CONFIG_USB_SERIAL_IPW=m
++CONFIG_USB_SERIAL_KEYSPAN_PDA=m
++CONFIG_USB_SERIAL_KEYSPAN=m
++CONFIG_USB_SERIAL_KEYSPAN_MPR=y
++CONFIG_USB_SERIAL_KEYSPAN_USA28=y
++CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
++CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
++CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
++CONFIG_USB_SERIAL_KEYSPAN_USA19=y
++CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
++CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
++CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
++CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
++CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
++CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
++CONFIG_USB_SERIAL_KLSI=m
++CONFIG_USB_SERIAL_KOBIL_SCT=m
++CONFIG_USB_SERIAL_MCT_U232=m
++CONFIG_USB_SERIAL_NAVMAN=m
++CONFIG_USB_SERIAL_PL2303=m
++CONFIG_USB_SERIAL_HP4X=m
++CONFIG_USB_SERIAL_SAFE=m
++CONFIG_USB_SERIAL_SAFE_PADDED=y
++CONFIG_USB_SERIAL_SIERRAWIRELESS=m
++CONFIG_USB_SERIAL_TI=m
++CONFIG_USB_SERIAL_CYBERJACK=m
++CONFIG_USB_SERIAL_XIRCOM=m
++# CONFIG_USB_SERIAL_OPTION is not set
++CONFIG_USB_SERIAL_OMNINET=m
++CONFIG_USB_EZUSB=y
++
++#
++# USB Miscellaneous drivers
++#
++CONFIG_USB_EMI62=m
++CONFIG_USB_EMI26=m
++CONFIG_USB_AUERSWALD=m
++CONFIG_USB_RIO500=m
++CONFIG_USB_LEGOTOWER=m
++CONFIG_USB_LCD=m
++CONFIG_USB_LED=m
++CONFIG_USB_CYPRESS_CY7C63=m
++CONFIG_USB_CYTHERM=m
++CONFIG_USB_PHIDGETKIT=m
++CONFIG_USB_PHIDGETSERVO=m
++CONFIG_USB_IDMOUSE=m
++CONFIG_USB_APPLEDISPLAY=m
++CONFIG_USB_SISUSBVGA=m
++CONFIG_USB_SISUSBVGA_CON=y
++CONFIG_USB_LD=m
++CONFIG_USB_TEST=m
++
++#
++# USB DSL modem support
++#
++CONFIG_USB_ATM=m
++CONFIG_USB_SPEEDTOUCH=m
++CONFIG_USB_CXACRU=m
++CONFIG_USB_UEAGLEATM=m
++CONFIG_USB_XUSBATM=m
++
++#
++# USB Gadget Support
++#
++# CONFIG_USB_GADGET is not set
++
++#
++# MMC/SD Card support
++#
++CONFIG_MMC=m
++# CONFIG_MMC_DEBUG is not set
++CONFIG_MMC_BLOCK=m
++CONFIG_MMC_SDHCI=m
++CONFIG_MMC_WBSD=m
++
++#
++# LED devices
++#
++CONFIG_NEW_LEDS=y
++CONFIG_LEDS_CLASS=m
++
++#
++# LED drivers
++#
++
++#
++# LED Triggers
++#
++CONFIG_LEDS_TRIGGERS=y
++CONFIG_LEDS_TRIGGER_TIMER=m
++CONFIG_LEDS_TRIGGER_IDE_DISK=y
++CONFIG_LEDS_TRIGGER_HEARTBEAT=m
++
++#
++# InfiniBand support
++#
++CONFIG_INFINIBAND=m
++CONFIG_INFINIBAND_USER_MAD=m
++CONFIG_INFINIBAND_USER_ACCESS=m
++CONFIG_INFINIBAND_ADDR_TRANS=y
++CONFIG_INFINIBAND_MTHCA=m
++CONFIG_INFINIBAND_MTHCA_DEBUG=y
++CONFIG_INFINIBAND_IPOIB=m
++CONFIG_INFINIBAND_IPOIB_DEBUG=y
++# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
++CONFIG_INFINIBAND_SRP=m
++CONFIG_INFINIBAND_ISER=m
++
++#
++# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
++#
++CONFIG_EDAC=m
++
++#
++# Reporting subsystems
++#
++# CONFIG_EDAC_DEBUG is not set
++CONFIG_EDAC_MM_EDAC=m
++CONFIG_EDAC_E752X=m
++CONFIG_EDAC_POLL=y
++
++#
++# Real Time Clock
++#
++CONFIG_RTC_LIB=m
++CONFIG_RTC_CLASS=m
++
++#
++# RTC interfaces
++#
++CONFIG_RTC_INTF_SYSFS=m
++CONFIG_RTC_INTF_PROC=m
++CONFIG_RTC_INTF_DEV=m
++CONFIG_RTC_INTF_DEV_UIE_EMUL=y
++
++#
++# RTC drivers
++#
++CONFIG_RTC_DRV_X1205=m
++CONFIG_RTC_DRV_DS1307=m
++CONFIG_RTC_DRV_DS1553=m
++CONFIG_RTC_DRV_ISL1208=m
++CONFIG_RTC_DRV_DS1672=m
++CONFIG_RTC_DRV_DS1742=m
++CONFIG_RTC_DRV_PCF8563=m
++CONFIG_RTC_DRV_PCF8583=m
++CONFIG_RTC_DRV_RS5C348=m
++CONFIG_RTC_DRV_RS5C372=m
++CONFIG_RTC_DRV_M48T86=m
++CONFIG_RTC_DRV_TEST=m
++CONFIG_RTC_DRV_MAX6902=m
++CONFIG_RTC_DRV_V3020=m
++
++#
++# DMA Engine support
++#
++CONFIG_DMA_ENGINE=y
++
++#
++# DMA Clients
++#
++CONFIG_NET_DMA=y
++
++#
++# DMA Devices
++#
++CONFIG_INTEL_IOATDMA=m
++
++#
++# Firmware Drivers
++#
++CONFIG_EDD=y
++CONFIG_DELL_RBU=m
++CONFIG_DCDBAS=m
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++CONFIG_EXT2_FS_XATTR=y
++CONFIG_EXT2_FS_POSIX_ACL=y
++CONFIG_EXT2_FS_SECURITY=y
++CONFIG_EXT2_FS_XIP=y
++CONFIG_FS_XIP=y
++CONFIG_EXT3_FS=m
++CONFIG_EXT3_FS_XATTR=y
++CONFIG_EXT3_FS_POSIX_ACL=y
++CONFIG_EXT3_FS_SECURITY=y
++CONFIG_JBD=m
++# CONFIG_JBD_DEBUG is not set
++CONFIG_FS_MBCACHE=y
++CONFIG_REISERFS_FS=m
++# CONFIG_REISERFS_CHECK is not set
++CONFIG_REISERFS_PROC_INFO=y
++CONFIG_REISERFS_FS_XATTR=y
++CONFIG_REISERFS_FS_POSIX_ACL=y
++CONFIG_REISERFS_FS_SECURITY=y
++CONFIG_JFS_FS=m
++CONFIG_JFS_POSIX_ACL=y
++CONFIG_JFS_SECURITY=y
++# CONFIG_JFS_DEBUG is not set
++# CONFIG_JFS_STATISTICS is not set
++CONFIG_FS_POSIX_ACL=y
++CONFIG_XFS_FS=m
++CONFIG_XFS_QUOTA=y
++CONFIG_XFS_SECURITY=y
++CONFIG_XFS_POSIX_ACL=y
++CONFIG_XFS_RT=y
++CONFIG_OCFS2_FS=m
++CONFIG_OCFS2_DEBUG_MASKLOG=y
++CONFIG_MINIX_FS=m
++CONFIG_ROMFS_FS=m
++CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
++CONFIG_QUOTA=y
++# CONFIG_QFMT_V1 is not set
++CONFIG_QFMT_V2=m
++CONFIG_QUOTACTL=y
++CONFIG_DNOTIFY=y
++CONFIG_AUTOFS_FS=m
++CONFIG_AUTOFS4_FS=m
++CONFIG_FUSE_FS=m
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=y
++CONFIG_JOLIET=y
++CONFIG_ZISOFS=y
++CONFIG_ZISOFS_FS=y
++CONFIG_UDF_FS=m
++CONFIG_UDF_NLS=y
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=m
++CONFIG_MSDOS_FS=m
++CONFIG_VFAT_FS=m
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++CONFIG_NTFS_FS=m
++# CONFIG_NTFS_DEBUG is not set
++# CONFIG_NTFS_RW is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_KCORE=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_RAMFS=y
++CONFIG_CONFIGFS_FS=m
++
++#
++# Miscellaneous filesystems
++#
++CONFIG_ADFS_FS=m
++# CONFIG_ADFS_FS_RW is not set
++CONFIG_AFFS_FS=m
++CONFIG_HFS_FS=m
++CONFIG_HFSPLUS_FS=m
++CONFIG_BEFS_FS=m
++# CONFIG_BEFS_DEBUG is not set
++CONFIG_BFS_FS=m
++CONFIG_EFS_FS=m
++CONFIG_JFFS_FS=m
++CONFIG_JFFS_FS_VERBOSE=0
++CONFIG_JFFS_PROC_FS=y
++CONFIG_JFFS2_FS=m
++CONFIG_JFFS2_FS_DEBUG=0
++CONFIG_JFFS2_FS_WRITEBUFFER=y
++CONFIG_JFFS2_SUMMARY=y
++CONFIG_JFFS2_FS_XATTR=y
++CONFIG_JFFS2_FS_POSIX_ACL=y
++CONFIG_JFFS2_FS_SECURITY=y
++CONFIG_JFFS2_COMPRESSION_OPTIONS=y
++CONFIG_JFFS2_ZLIB=y
++CONFIG_JFFS2_RTIME=y
++# CONFIG_JFFS2_RUBIN is not set
++# CONFIG_JFFS2_CMODE_NONE is not set
++CONFIG_JFFS2_CMODE_PRIORITY=y
++# CONFIG_JFFS2_CMODE_SIZE is not set
++CONFIG_CRAMFS=m
++CONFIG_VXFS_FS=m
++CONFIG_HPFS_FS=m
++CONFIG_QNX4FS_FS=m
++CONFIG_SYSV_FS=m
++CONFIG_UFS_FS=m
++# CONFIG_UFS_FS_WRITE is not set
++# CONFIG_UFS_DEBUG is not set
++
++#
++# Network File Systems
++#
++CONFIG_NFS_FS=m
++CONFIG_NFS_V3=y
++CONFIG_NFS_V3_ACL=y
++CONFIG_NFS_V4=y
++CONFIG_NFS_DIRECTIO=y
++CONFIG_NFSD=m
++CONFIG_NFSD_V2_ACL=y
++CONFIG_NFSD_V3=y
++CONFIG_NFSD_V3_ACL=y
++CONFIG_NFSD_V4=y
++CONFIG_NFSD_TCP=y
++CONFIG_LOCKD=m
++CONFIG_LOCKD_V4=y
++CONFIG_EXPORTFS=m
++CONFIG_NFS_ACL_SUPPORT=m
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=m
++CONFIG_SUNRPC_GSS=m
++CONFIG_RPCSEC_GSS_KRB5=m
++CONFIG_RPCSEC_GSS_SPKM3=m
++CONFIG_SMB_FS=m
++CONFIG_SMB_NLS_DEFAULT=y
++CONFIG_SMB_NLS_REMOTE="cp850"
++CONFIG_CIFS=m
++CONFIG_CIFS_STATS=y
++# CONFIG_CIFS_STATS2 is not set
++# CONFIG_CIFS_WEAK_PW_HASH is not set
++CONFIG_CIFS_XATTR=y
++CONFIG_CIFS_POSIX=y
++# CONFIG_CIFS_DEBUG2 is not set
++# CONFIG_CIFS_EXPERIMENTAL is not set
++CONFIG_NCP_FS=m
++CONFIG_NCPFS_PACKET_SIGNING=y
++CONFIG_NCPFS_IOCTL_LOCKING=y
++CONFIG_NCPFS_STRONG=y
++CONFIG_NCPFS_NFS_NS=y
++CONFIG_NCPFS_OS2_NS=y
++CONFIG_NCPFS_SMALLDOS=y
++CONFIG_NCPFS_NLS=y
++CONFIG_NCPFS_EXTRAS=y
++CONFIG_CODA_FS=m
++# CONFIG_CODA_FS_OLD_API is not set
++CONFIG_AFS_FS=m
++CONFIG_RXRPC=m
++CONFIG_9P_FS=m
++
++#
++# Partition Types
++#
++CONFIG_PARTITION_ADVANCED=y
++# CONFIG_ACORN_PARTITION is not set
++CONFIG_OSF_PARTITION=y
++CONFIG_AMIGA_PARTITION=y
++# CONFIG_ATARI_PARTITION is not set
++CONFIG_MAC_PARTITION=y
++CONFIG_MSDOS_PARTITION=y
++CONFIG_BSD_DISKLABEL=y
++CONFIG_MINIX_SUBPARTITION=y
++CONFIG_SOLARIS_X86_PARTITION=y
++CONFIG_UNIXWARE_DISKLABEL=y
++# CONFIG_LDM_PARTITION is not set
++CONFIG_SGI_PARTITION=y
++# CONFIG_ULTRIX_PARTITION is not set
++CONFIG_SUN_PARTITION=y
++# CONFIG_KARMA_PARTITION is not set
++CONFIG_EFI_PARTITION=y
++
++#
++# Native Language Support
++#
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="utf8"
++CONFIG_NLS_CODEPAGE_437=m
++CONFIG_NLS_CODEPAGE_737=m
++CONFIG_NLS_CODEPAGE_775=m
++CONFIG_NLS_CODEPAGE_850=m
++CONFIG_NLS_CODEPAGE_852=m
++CONFIG_NLS_CODEPAGE_855=m
++CONFIG_NLS_CODEPAGE_857=m
++CONFIG_NLS_CODEPAGE_860=m
++CONFIG_NLS_CODEPAGE_861=m
++CONFIG_NLS_CODEPAGE_862=m
++CONFIG_NLS_CODEPAGE_863=m
++CONFIG_NLS_CODEPAGE_864=m
++CONFIG_NLS_CODEPAGE_865=m
++CONFIG_NLS_CODEPAGE_866=m
++CONFIG_NLS_CODEPAGE_869=m
++CONFIG_NLS_CODEPAGE_936=m
++CONFIG_NLS_CODEPAGE_950=m
++CONFIG_NLS_CODEPAGE_932=m
++CONFIG_NLS_CODEPAGE_949=m
++CONFIG_NLS_CODEPAGE_874=m
++CONFIG_NLS_ISO8859_8=m
++CONFIG_NLS_CODEPAGE_1250=m
++CONFIG_NLS_CODEPAGE_1251=m
++CONFIG_NLS_ASCII=m
++CONFIG_NLS_ISO8859_1=m
++CONFIG_NLS_ISO8859_2=m
++CONFIG_NLS_ISO8859_3=m
++CONFIG_NLS_ISO8859_4=m
++CONFIG_NLS_ISO8859_5=m
++CONFIG_NLS_ISO8859_6=m
++CONFIG_NLS_ISO8859_7=m
++CONFIG_NLS_ISO8859_9=m
++CONFIG_NLS_ISO8859_13=m
++CONFIG_NLS_ISO8859_14=m
++CONFIG_NLS_ISO8859_15=m
++CONFIG_NLS_KOI8_R=m
++CONFIG_NLS_KOI8_U=m
++CONFIG_NLS_UTF8=m
++
++#
++# Instrumentation Support
++#
++# CONFIG_PROFILING is not set
++# CONFIG_KPROBES is not set
++
++#
++# Kernel hacking
++#
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++# CONFIG_PRINTK_TIME is not set
++CONFIG_MAGIC_SYSRQ=y
++CONFIG_UNUSED_SYMBOLS=y
++CONFIG_DEBUG_KERNEL=y
++CONFIG_LOG_BUF_SHIFT=15
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_SCHEDSTATS is not set
++# CONFIG_DEBUG_SLAB is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_RWSEMS is not set
++# CONFIG_DEBUG_LOCK_ALLOC is not set
++# CONFIG_PROVE_LOCKING is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++# CONFIG_DEBUG_INFO is not set
++# CONFIG_DEBUG_FS is not set
++# CONFIG_DEBUG_VM is not set
++# CONFIG_FRAME_POINTER is not set
++# CONFIG_UNWIND_INFO is not set
++CONFIG_FORCED_INLINING=y
++# CONFIG_RCU_TORTURE_TEST is not set
++# CONFIG_DEBUG_RODATA is not set
++# CONFIG_DEBUG_STACKOVERFLOW is not set
++# CONFIG_DEBUG_STACK_USAGE is not set
++
++#
++# Security options
++#
++CONFIG_KEYS=y
++CONFIG_KEYS_DEBUG_PROC_KEYS=y
++CONFIG_SECURITY=y
++CONFIG_SECURITY_NETWORK=y
++# CONFIG_SECURITY_NETWORK_XFRM is not set
++CONFIG_SECURITY_CAPABILITIES=y
++CONFIG_SECURITY_ROOTPLUG=m
++CONFIG_SECURITY_SECLVL=m
++# CONFIG_SECURITY_SELINUX is not set
++
++#
++# Cryptographic options
++#
++CONFIG_CRYPTO=y
++CONFIG_CRYPTO_HMAC=y
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_MD4=m
++CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_SHA1=m
++CONFIG_CRYPTO_SHA256=m
++CONFIG_CRYPTO_SHA512=m
++CONFIG_CRYPTO_WP512=m
++CONFIG_CRYPTO_TGR192=m
++CONFIG_CRYPTO_DES=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_AES_X86_64=m
++CONFIG_CRYPTO_CAST5=m
++CONFIG_CRYPTO_CAST6=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_KHAZAD=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_DEFLATE=m
++CONFIG_CRYPTO_MICHAEL_MIC=m
++CONFIG_CRYPTO_CRC32C=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Hardware crypto devices
++#
++CONFIG_XEN=y
++CONFIG_XEN_INTERFACE_VERSION=0x00030206
++
++#
++# XEN
++#
++CONFIG_XEN_PRIVILEGED_GUEST=y
++# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
++CONFIG_XEN_PRIVCMD=y
++CONFIG_XEN_XENBUS_DEV=y
++CONFIG_XEN_BACKEND=y
++CONFIG_XEN_BLKDEV_BACKEND=y
++CONFIG_XEN_BLKDEV_TAP=y
++CONFIG_XEN_NETDEV_BACKEND=y
++# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
++# CONFIG_XEN_NETDEV_LOOPBACK is not set
++CONFIG_XEN_PCIDEV_BACKEND=m
++# CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set
++CONFIG_XEN_PCIDEV_BACKEND_PASS=y
++# CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
++# CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER is not set
++# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
++CONFIG_XEN_TPMDEV_BACKEND=m
++CONFIG_XEN_BLKDEV_FRONTEND=y
++CONFIG_XEN_NETDEV_FRONTEND=y
++CONFIG_XEN_FRAMEBUFFER=y
++CONFIG_XEN_GRANT_DEV=y
++CONFIG_XEN_KEYBOARD=y
++CONFIG_XEN_SCRUB_PAGES=y
++CONFIG_XEN_DISABLE_SERIAL=y
++CONFIG_XEN_SYSFS=y
++CONFIG_XEN_COMPAT_030002_AND_LATER=y
++# CONFIG_XEN_COMPAT_030004_AND_LATER is not set
++# CONFIG_XEN_COMPAT_030100_AND_LATER is not set
++# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
++CONFIG_XEN_COMPAT=0x030002
++CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
++CONFIG_NO_IDLE_HZ=y
++CONFIG_XEN_SMPBOOT=y
++CONFIG_XEN_BALLOON=y
++CONFIG_XEN_DEVMEM=y
++
++#
++# Library routines
++#
++CONFIG_CRC_CCITT=m
++CONFIG_CRC16=m
++CONFIG_CRC32=y
++CONFIG_LIBCRC32C=m
++CONFIG_ZLIB_INFLATE=y
++CONFIG_ZLIB_DEFLATE=m
++CONFIG_REED_SOLOMON=m
++CONFIG_REED_SOLOMON_DEC16=y
++CONFIG_TEXTSEARCH=y
++CONFIG_TEXTSEARCH_KMP=m
++CONFIG_TEXTSEARCH_BM=m
++CONFIG_TEXTSEARCH_FSM=m
++CONFIG_PLIST=y
+diff -rpuN linux-2.6.18.8/drivers/Makefile linux-2.6.18-xen-3.2.0/drivers/Makefile
+--- linux-2.6.18.8/drivers/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/Makefile 2008-02-15 16:21:56.000000000 -0800
@@ -31,6 +31,7 @@ obj-y += base/ block/ misc/ mfd/ net/
obj-$(CONFIG_NUBUS) += nubus/
obj-$(CONFIG_ATM) += atm/
@@ -48135,18 +73050,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/Makefile tmp-linux-2.6-xen.patch/driver
obj-$(CONFIG_IDE) += ide/
obj-$(CONFIG_FC4) += fc4/
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-11-14 15:35:27.000000000 -0800
-@@ -45,7 +45,7 @@ if ACPI
-
- config ACPI_SLEEP
- bool "Sleep States"
-- depends on X86 && (!SMP || SUSPEND_SMP)
-+ depends on X86 && (!SMP || SUSPEND_SMP) && !XEN
- depends on PM
- default y
- ---help---
+diff -rpuN linux-2.6.18.8/drivers/acpi/Kconfig linux-2.6.18-xen-3.2.0/drivers/acpi/Kconfig
+--- linux-2.6.18.8/drivers/acpi/Kconfig 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/acpi/Kconfig 2008-02-15 16:21:56.000000000 -0800
@@ -305,6 +305,7 @@ config ACPI_SYSTEM
config X86_PM_TIMER
bool "Power Management Timer Support" if EMBEDDED
@@ -48155,9 +73061,226 @@ diff -Nurp pristine-linux-2.6.18/drivers/acpi/Kconfig tmp-linux-2.6-xen.patch/dr
default y
help
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-11-14 15:35:27.000000000 -0800
+@@ -362,6 +363,10 @@ config ACPI_SBS
+ A "Smart Battery" is quite old and quite rare compared
+ to today's ACPI "Control Method" battery.
+
++config ACPI_PV_SLEEP
++ bool
++ depends on X86 && XEN && ACPI_SLEEP
++ default y
+ endif # ACPI
+
+ endmenu
+diff -rpuN linux-2.6.18.8/drivers/acpi/hardware/hwsleep.c linux-2.6.18-xen-3.2.0/drivers/acpi/hardware/hwsleep.c
+--- linux-2.6.18.8/drivers/acpi/hardware/hwsleep.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/acpi/hardware/hwsleep.c 2008-02-15 16:21:57.000000000 -0800
+@@ -327,6 +327,7 @@ acpi_status asmlinkage acpi_enter_sleep_
+
+ ACPI_FLUSH_CPU_CACHE();
+
++#ifndef CONFIG_ACPI_PV_SLEEP
+ status = acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK,
+ ACPI_REGISTER_PM1A_CONTROL,
+ PM1Acontrol);
+@@ -378,6 +379,15 @@ acpi_status asmlinkage acpi_enter_sleep_
+ } while (!in_value);
+
+ return_ACPI_STATUS(AE_OK);
++#else
++ /* PV ACPI just need check hypercall return value */
++ status = acpi_notify_hypervisor_state(sleep_state,
++ PM1Acontrol, PM1Bcontrol);
++ if (ACPI_FAILURE(status))
++ return_ACPI_STATUS(status);
++ else
++ return_ACPI_STATUS(AE_OK);
++#endif
+ }
+
+ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state)
+diff -rpuN linux-2.6.18.8/drivers/acpi/sleep/main.c linux-2.6.18-xen-3.2.0/drivers/acpi/sleep/main.c
+--- linux-2.6.18.8/drivers/acpi/sleep/main.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/acpi/sleep/main.c 2008-02-15 16:21:57.000000000 -0800
+@@ -91,7 +91,14 @@ static int acpi_pm_enter(suspend_state_t
+ break;
+
+ case PM_SUSPEND_MEM:
++#ifdef CONFIG_ACPI_PV_SLEEP
++ /* Hyperviosr will save and restore CPU context
++ * and then we can skip low level housekeeping here.
++ */
++ acpi_enter_sleep_state(acpi_state);
++#else
+ do_suspend_lowlevel();
++#endif
+ break;
+
+ case PM_SUSPEND_DISK:
+@@ -145,10 +152,12 @@ static int acpi_pm_finish(suspend_state_
+ /* reset firmware waking vector */
+ acpi_set_firmware_waking_vector((acpi_physical_address) 0);
+
++#ifndef CONFIG_ACPI_PV_SLEEP
+ if (init_8259A_after_S1) {
+ printk("Broken toshiba laptop -> kicking interrupts\n");
+ init_8259A(0);
+ }
++#endif
+ return 0;
+ }
+
+diff -rpuN linux-2.6.18.8/drivers/acpi/sleep/poweroff.c linux-2.6.18-xen-3.2.0/drivers/acpi/sleep/poweroff.c
+--- linux-2.6.18.8/drivers/acpi/sleep/poweroff.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/acpi/sleep/poweroff.c 2008-02-15 16:21:57.000000000 -0800
+@@ -20,6 +20,7 @@
+ int acpi_sleep_prepare(u32 acpi_state)
+ {
+ #ifdef CONFIG_ACPI_SLEEP
++#ifndef CONFIG_ACPI_PV_SLEEP
+ /* do we have a wakeup address for S2 and S3? */
+ if (acpi_state == ACPI_STATE_S3) {
+ if (!acpi_wakeup_address) {
+@@ -30,6 +31,7 @@ int acpi_sleep_prepare(u32 acpi_state)
+ acpi_wakeup_address));
+
+ }
++#endif
+ ACPI_FLUSH_CPU_CACHE();
+ acpi_enable_wakeup_device_prep(acpi_state);
+ #endif
+diff -rpuN linux-2.6.18.8/drivers/block/floppy.c linux-2.6.18-xen-3.2.0/drivers/block/floppy.c
+--- linux-2.6.18.8/drivers/block/floppy.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/block/floppy.c 2008-02-15 16:21:57.000000000 -0800
+@@ -4392,11 +4392,15 @@ static int floppy_grab_irq_and_dma(void)
+ if (fd_request_dma()) {
+ DPRINT("Unable to grab DMA%d for the floppy driver\n",
+ FLOPPY_DMA);
+- fd_free_irq();
+- spin_lock_irqsave(&floppy_usage_lock, flags);
+- usage_count--;
+- spin_unlock_irqrestore(&floppy_usage_lock, flags);
+- return -1;
++ if (can_use_virtual_dma & 2)
++ use_virtual_dma = can_use_virtual_dma = 1;
++ if (!(can_use_virtual_dma & 1)) {
++ fd_free_irq();
++ spin_lock_irqsave(&floppy_usage_lock, flags);
++ usage_count--;
++ spin_unlock_irqrestore(&floppy_usage_lock, flags);
++ return -1;
++ }
+ }
+
+ for (fdc = 0; fdc < N_FDC; fdc++) {
+diff -rpuN linux-2.6.18.8/drivers/char/agp/amd64-agp.c linux-2.6.18-xen-3.2.0/drivers/char/agp/amd64-agp.c
+--- linux-2.6.18.8/drivers/char/agp/amd64-agp.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/char/agp/amd64-agp.c 2008-02-15 16:21:57.000000000 -0800
+@@ -15,6 +15,7 @@
+ #include <linux/mmzone.h>
+ #include <asm/page.h> /* PAGE_SIZE */
+ #include <asm/k8.h>
++#include <asm/e820.h>
+ #include "agp.h"
+
+ /* PTE bits. */
+@@ -252,7 +253,6 @@ static struct agp_bridge_driver amd_8151
+ /* Some basic sanity checks for the aperture. */
+ static int __devinit aperture_valid(u64 aper, u32 size)
+ {
+- u32 pfn, c;
+ if (aper == 0) {
+ printk(KERN_ERR PFX "No aperture\n");
+ return 0;
+@@ -265,14 +265,9 @@ static int __devinit aperture_valid(u64
+ printk(KERN_ERR PFX "Aperture out of bounds\n");
+ return 0;
+ }
+- pfn = aper >> PAGE_SHIFT;
+- for (c = 0; c < size/PAGE_SIZE; c++) {
+- if (!pfn_valid(pfn + c))
+- break;
+- if (!PageReserved(pfn_to_page(pfn + c))) {
+- printk(KERN_ERR PFX "Aperture pointing to RAM\n");
+- return 0;
+- }
++ if (e820_any_mapped(aper, aper + size, E820_RAM)) {
++ printk(KERN_ERR PFX "Aperture pointing to RAM\n");
++ return 0;
+ }
+
+ /* Request the Aperture. This catches cases when someone else
+diff -rpuN linux-2.6.18.8/drivers/char/agp/generic.c linux-2.6.18-xen-3.2.0/drivers/char/agp/generic.c
+--- linux-2.6.18.8/drivers/char/agp/generic.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/char/agp/generic.c 2008-02-15 16:21:57.000000000 -0800
+@@ -51,28 +51,6 @@ int agp_memory_reserved;
+ */
+ EXPORT_SYMBOL_GPL(agp_memory_reserved);
+
+-#if defined(CONFIG_X86)
+-int map_page_into_agp(struct page *page)
+-{
+- int i;
+- i = change_page_attr(page, 1, PAGE_KERNEL_NOCACHE);
+- /* Caller's responsibility to call global_flush_tlb() for
+- * performance reasons */
+- return i;
+-}
+-EXPORT_SYMBOL_GPL(map_page_into_agp);
+-
+-int unmap_page_from_agp(struct page *page)
+-{
+- int i;
+- i = change_page_attr(page, 1, PAGE_KERNEL);
+- /* Caller's responsibility to call global_flush_tlb() for
+- * performance reasons */
+- return i;
+-}
+-EXPORT_SYMBOL_GPL(unmap_page_from_agp);
+-#endif
+-
+ /*
+ * Generic routines for handling agp_memory structures -
+ * They use the basic page allocation routines to do the brunt of the work.
+diff -rpuN linux-2.6.18.8/drivers/char/agp/intel-agp.c linux-2.6.18-xen-3.2.0/drivers/char/agp/intel-agp.c
+--- linux-2.6.18.8/drivers/char/agp/intel-agp.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/char/agp/intel-agp.c 2008-02-15 16:21:57.000000000 -0800
+@@ -164,9 +164,17 @@ static void *i8xx_alloc_pages(void)
+ if (page == NULL)
+ return NULL;
+
++#ifdef CONFIG_XEN
++ if (xen_create_contiguous_region((unsigned long)page_address(page), 2, 32)) {
++ __free_pages(page, 2);
++ return NULL;
++ }
++#endif
++
+ if (change_page_attr(page, 4, PAGE_KERNEL_NOCACHE) < 0) {
++ change_page_attr(page, 4, PAGE_KERNEL);
+ global_flush_tlb();
+- __free_page(page);
++ __free_pages(page, 2);
+ return NULL;
+ }
+ global_flush_tlb();
+@@ -186,9 +194,12 @@ static void i8xx_destroy_pages(void *add
+ page = virt_to_page(addr);
+ change_page_attr(page, 4, PAGE_KERNEL);
+ global_flush_tlb();
++#ifdef CONFIG_XEN
++ xen_destroy_contiguous_region((unsigned long)page_address(page), 2);
++#endif
+ put_page(page);
+ unlock_page(page);
+- free_pages((unsigned long)addr, 2);
++ __free_pages(page, 2);
+ atomic_dec(&agp_bridge->current_memory_agp);
+ }
+
+diff -rpuN linux-2.6.18.8/drivers/char/mem.c linux-2.6.18-xen-3.2.0/drivers/char/mem.c
+--- linux-2.6.18.8/drivers/char/mem.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/char/mem.c 2008-02-15 16:21:57.000000000 -0800
@@ -101,6 +101,7 @@ static inline int valid_mmap_phys_addr_r
}
#endif
@@ -48174,7 +73297,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/mem.c tmp-linux-2.6-xen.patch/driv
#ifndef __HAVE_PHYS_MEM_ACCESS_PROT
static pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
-@@ -776,6 +778,7 @@ static int open_port(struct inode * inod
+@@ -780,6 +782,7 @@ static int open_port(struct inode * inod
#define open_kmem open_mem
#define open_oldmem open_mem
@@ -48182,7 +73305,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/mem.c tmp-linux-2.6-xen.patch/driv
static const struct file_operations mem_fops = {
.llseek = memory_lseek,
.read = read_mem,
-@@ -783,6 +786,9 @@ static const struct file_operations mem_
+@@ -787,6 +790,9 @@ static const struct file_operations mem_
.mmap = mmap_mem,
.open = open_mem,
};
@@ -48192,9 +73315,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/mem.c tmp-linux-2.6-xen.patch/driv
static const struct file_operations kmem_fops = {
.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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/char/tpm/Kconfig linux-2.6.18-xen-3.2.0/drivers/char/tpm/Kconfig
+--- linux-2.6.18.8/drivers/char/tpm/Kconfig 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/char/tpm/Kconfig 2008-02-15 16:21:57.000000000 -0800
@@ -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
@@ -48210,18 +73333,18 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/Kconfig tmp-linux-2.6-xen.patc
+ will be called tpm_xenu.
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/char/tpm/Makefile linux-2.6.18-xen-3.2.0/drivers/char/tpm/Makefile
+--- linux-2.6.18.8/drivers/char/tpm/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/char/tpm/Makefile 2008-02-15 16:21:57.000000000 -0800
@@ -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
obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o
+obj-$(CONFIG_TCG_XEN) += tpm_xenu.o
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/char/tpm/tpm.h linux-2.6.18-xen-3.2.0/drivers/char/tpm/tpm.h
+--- linux-2.6.18.8/drivers/char/tpm/tpm.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/char/tpm/tpm.h 2008-02-15 16:21:57.000000000 -0800
@@ -105,6 +105,9 @@ struct tpm_chip {
struct dentry **bios_dir;
@@ -48251,9 +73374,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/tpm.h tmp-linux-2.6-xen.patch/
extern void tpm_get_timeouts(struct tpm_chip *);
extern void tpm_gen_interrupt(struct tpm_chip *);
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/char/tpm/tpm_vtpm.c linux-2.6.18-xen-3.2.0/drivers/char/tpm/tpm_vtpm.c
+--- linux-2.6.18.8/drivers/char/tpm/tpm_vtpm.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/char/tpm/tpm_vtpm.c 2008-02-15 16:21:57.000000000 -0800
@@ -0,0 +1,542 @@
+/*
+ * Copyright (C) 2006 IBM Corporation
@@ -48797,9 +73920,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/tpm_vtpm.c tmp-linux-2.6-xen.p
+ tpm_remove_hardware(dev);
+ kfree(vtpms);
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/char/tpm/tpm_vtpm.h linux-2.6.18-xen-3.2.0/drivers/char/tpm/tpm_vtpm.h
+--- linux-2.6.18.8/drivers/char/tpm/tpm_vtpm.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/char/tpm/tpm_vtpm.h 2008-02-15 16:21:57.000000000 -0800
@@ -0,0 +1,55 @@
+#ifndef TPM_VTPM_H
+#define TPM_VTPM_H
@@ -48856,9 +73979,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/char/tpm/tpm_xen.c linux-2.6.18-xen-3.2.0/drivers/char/tpm/tpm_xen.c
+--- linux-2.6.18.8/drivers/char/tpm/tpm_xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/char/tpm/tpm_xen.c 2008-02-15 16:21:57.000000000 -0800
@@ -0,0 +1,720 @@
+/*
+ * Copyright (c) 2005, IBM Corporation
@@ -49128,8 +74251,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/tpm_xen.c tmp-linux-2.6-xen.pa
+ tpmif_set_connected_state(tp, 0);
+
+ if (tp->ring_ref != GRANT_INVALID_REF) {
-+ gnttab_end_foreign_access(tp->ring_ref, 0,
-+ (unsigned long)tp->tx);
++ gnttab_end_foreign_access(tp->ring_ref, (unsigned long)tp->tx);
+ tp->ring_ref = GRANT_INVALID_REF;
+ tp->tx = NULL;
+ }
@@ -49480,6 +74602,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/tpm_xen.c tmp-linux-2.6-xen.pa
+ tx = &tp->tx->ring[i].req;
+ tx->addr = virt_to_machine(txb->data);
+ tx->size = txb->len;
++ tx->unused = 0;
+
+ DPRINTK("First 4 characters sent by TPM-FE are "
+ "0x%02x 0x%02x 0x%02x 0x%02x\n",
@@ -49580,9 +74703,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tpm/tpm_xen.c tmp-linux-2.6-xen.pa
+module_init(tpmif_init);
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/char/tty_io.c linux-2.6.18-xen-3.2.0/drivers/char/tty_io.c
+--- linux-2.6.18.8/drivers/char/tty_io.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/char/tty_io.c 2008-02-15 16:21:57.000000000 -0800
@@ -130,6 +130,8 @@ LIST_HEAD(tty_drivers); /* linked list
vt.c for deeply disgusting hack reasons */
DEFINE_MUTEX(tty_mutex);
@@ -49618,20 +74741,177 @@ diff -Nurp pristine-linux-2.6.18/drivers/char/tty_io.c tmp-linux-2.6-xen.patch/d
#endif
return 0;
}
-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-11-14 15:35:27.000000000 -0800
-@@ -8,6 +8,7 @@ menu "Firmware Drivers"
- config EDD
- tristate "BIOS Enhanced Disk Drive calls determine boot disk"
- depends on !IA64
-+ depends on !XEN
- help
- Say Y or M here if you want to enable BIOS Enhanced Disk Drive
- Services real mode BIOS calls to determine which disk
-diff -Nurp 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-11-16 16:18:12.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/cpufreq/cpufreq_ondemand.c linux-2.6.18-xen-3.2.0/drivers/cpufreq/cpufreq_ondemand.c
+--- linux-2.6.18.8/drivers/cpufreq/cpufreq_ondemand.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/cpufreq/cpufreq_ondemand.c 2008-02-15 16:21:58.000000000 -0800
+@@ -96,6 +96,7 @@ static inline cputime64_t get_cpu_idle_t
+ return retval;
+ }
+
++
+ /************************** sysfs interface ************************/
+ static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf)
+ {
+@@ -222,17 +223,14 @@ static struct attribute_group dbs_attr_g
+
+ /************************** sysfs end ************************/
+
+-static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
++#ifndef CONFIG_XEN
++static int dbs_calc_load(struct cpu_dbs_info_s *this_dbs_info)
+ {
+- unsigned int idle_ticks, total_ticks;
+- unsigned int load;
+- cputime64_t cur_jiffies;
+-
+ struct cpufreq_policy *policy;
++ cputime64_t cur_jiffies;
++ cputime64_t total_ticks, idle_ticks;
+ unsigned int j;
+-
+- if (!this_dbs_info->enable)
+- return;
++ int load;
+
+ policy = this_dbs_info->cur_policy;
+ cur_jiffies = jiffies64_to_cputime64(get_jiffies_64());
+@@ -240,7 +238,7 @@ static void dbs_check_cpu(struct cpu_dbs
+ this_dbs_info->prev_cpu_wall);
+ this_dbs_info->prev_cpu_wall = cur_jiffies;
+ if (!total_ticks)
+- return;
++ return 200;
+ /*
+ * Every sampling_rate, we check, if current idle time is less
+ * than 20% (default), then we try to increase frequency
+@@ -270,6 +268,81 @@ static void dbs_check_cpu(struct cpu_dbs
+ idle_ticks = tmp_idle_ticks;
+ }
+ load = (100 * (total_ticks - idle_ticks)) / total_ticks;
++ return load;
++}
++#else
++
++#include <xen/interface/platform.h>
++static int dbs_calc_load(struct cpu_dbs_info_s *this_dbs_info)
++{
++ int load = 0;
++ struct xen_platform_op op;
++ uint64_t idletime[NR_CPUS];
++ struct cpufreq_policy *policy;
++ unsigned int j;
++ cpumask_t cpumap;
++
++ policy = this_dbs_info->cur_policy;
++ cpumap = policy->cpus;
++
++ op.cmd = XENPF_getidletime;
++ set_xen_guest_handle(op.u.getidletime.cpumap_bitmap, (uint8_t *) cpus_addr(cpumap));
++ op.u.getidletime.cpumap_nr_cpus = NR_CPUS;
++ set_xen_guest_handle(op.u.getidletime.idletime, idletime);
++ if (HYPERVISOR_platform_op(&op))
++ return 200;
++
++ for_each_cpu_mask(j, cpumap) {
++ cputime64_t total_idle_nsecs, tmp_idle_nsecs;
++ cputime64_t total_wall_nsecs, tmp_wall_nsecs;
++ struct cpu_dbs_info_s *j_dbs_info;
++ unsigned long tmp_load, tmp_wall_msecs, tmp_idle_msecs;
++
++ j_dbs_info = &per_cpu(cpu_dbs_info, j);
++ total_idle_nsecs = idletime[j];
++ tmp_idle_nsecs = cputime64_sub(total_idle_nsecs,
++ j_dbs_info->prev_cpu_idle);
++ total_wall_nsecs = op.u.getidletime.now;
++ tmp_wall_nsecs = cputime64_sub(total_wall_nsecs,
++ j_dbs_info->prev_cpu_wall);
++
++ if (tmp_wall_nsecs == 0)
++ return 200;
++
++ j_dbs_info->prev_cpu_wall = total_wall_nsecs;
++ j_dbs_info->prev_cpu_idle = total_idle_nsecs;
++
++ /* Convert nsecs to msecs and clamp times to sane values. */
++ do_div(tmp_wall_nsecs, 1000000);
++ tmp_wall_msecs = tmp_wall_nsecs;
++ do_div(tmp_idle_nsecs, 1000000);
++ tmp_idle_msecs = tmp_idle_nsecs;
++ if (tmp_wall_msecs == 0)
++ tmp_wall_msecs = 1;
++ if (tmp_idle_msecs > tmp_wall_msecs)
++ tmp_idle_msecs = tmp_wall_msecs;
++
++ tmp_load = (100 * (tmp_wall_msecs - tmp_idle_msecs)) /
++ tmp_wall_msecs;
++ load = max(load, min(100, (int) tmp_load));
++ }
++ return load;
++}
++#endif
++
++static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
++{
++ int load;
++
++ struct cpufreq_policy *policy;
++
++ if (!this_dbs_info->enable)
++ return;
++
++ policy = this_dbs_info->cur_policy;
++ load = dbs_calc_load(this_dbs_info);
++ if (load > 100)
++ return;
+
+ /* Check for frequency increase */
+ if (load > dbs_tuners_ins.up_threshold) {
+diff -rpuN linux-2.6.18.8/drivers/cpufreq/cpufreq_stats.c linux-2.6.18-xen-3.2.0/drivers/cpufreq/cpufreq_stats.c
+--- linux-2.6.18.8/drivers/cpufreq/cpufreq_stats.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/cpufreq/cpufreq_stats.c 2008-02-15 16:21:58.000000000 -0800
+@@ -292,6 +292,9 @@ cpufreq_stat_notifier_trans (struct noti
+ if (old_index == new_index)
+ return 0;
+
++ if ((old_index < 0) || (new_index < 0))
++ return 0;
++
+ spin_lock(&cpufreq_stats_lock);
+ stat->last_index = new_index;
+ #ifdef CONFIG_CPU_FREQ_STAT_DETAILS
+diff -rpuN linux-2.6.18.8/drivers/i2c/busses/Kconfig linux-2.6.18-xen-3.2.0/drivers/i2c/busses/Kconfig
+--- linux-2.6.18.8/drivers/i2c/busses/Kconfig 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/i2c/busses/Kconfig 2008-02-15 16:21:58.000000000 -0800
+@@ -125,6 +125,7 @@ config I2C_I801
+ ICH7
+ ESB2
+ ICH8
++ ICH9
+
+ This driver can also be built as a module. If so, the module
+ will be called i2c-i801.
+diff -rpuN linux-2.6.18.8/drivers/i2c/busses/i2c-i801.c linux-2.6.18-xen-3.2.0/drivers/i2c/busses/i2c-i801.c
+--- linux-2.6.18.8/drivers/i2c/busses/i2c-i801.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/i2c/busses/i2c-i801.c 2008-02-15 16:21:58.000000000 -0800
+@@ -33,6 +33,7 @@
+ ICH7 27DA
+ ESB2 269B
+ ICH8 283E
++ ICH9 2930
+ This driver supports several versions of Intel's I/O Controller Hubs (ICH).
+ For SMBus support, they are similar to the PIIX4 and are part
+ of Intel's '810' and other chipsets.
+@@ -457,6 +458,7 @@ static struct pci_device_id i801_ids[] =
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_17) },
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_17) },
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_5) },
++ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_6) },
+ { 0, }
+ };
+
+diff -rpuN linux-2.6.18.8/drivers/ide/ide-lib.c linux-2.6.18-xen-3.2.0/drivers/ide/ide-lib.c
+--- linux-2.6.18.8/drivers/ide/ide-lib.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/ide/ide-lib.c 2008-02-15 16:21:58.000000000 -0800
@@ -408,10 +408,10 @@ void ide_toggle_bounce(ide_drive_t *driv
{
u64 addr = BLK_BOUNCE_HIGH; /* dma64_addr_t */
@@ -49647,9 +74927,1323 @@ diff -Nurp pristine-linux-2.6.18/drivers/ide/ide-lib.c tmp-linux-2.6-xen.patch/d
addr = HWIF(drive)->pci_dev->dma_mask;
}
-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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/net/r8169.c linux-2.6.18-xen-3.2.0/drivers/net/r8169.c
+--- linux-2.6.18.8/drivers/net/r8169.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/net/r8169.c 2008-02-15 16:22:00.000000000 -0800
+@@ -6,26 +6,26 @@
+ History:
+ Feb 4 2002 - created initially by ShuChen <shuchen@realtek.com.tw>.
+ May 20 2002 - Add link status force-mode and TBI mode support.
+- 2004 - Massive updates. See kernel SCM system for details.
++ 2004 - Massive updates. See kernel SCM system for details.
+ =========================================================================
+ 1. [DEPRECATED: use ethtool instead] The media can be forced in 5 modes.
+ Command: 'insmod r8169 media = SET_MEDIA'
+ Ex: 'insmod r8169 media = 0x04' will force PHY to operate in 100Mpbs Half-duplex.
+-
++
+ SET_MEDIA can be:
+ _10_Half = 0x01
+ _10_Full = 0x02
+ _100_Half = 0x04
+ _100_Full = 0x08
+ _1000_Full = 0x10
+-
++
+ 2. Support TBI mode.
+ =========================================================================
+ VERSION 1.1 <2002/10/4>
+
+ The bit4:0 of MII register 4 is called "selector field", and have to be
+ 00001b to indicate support of IEEE std 802.3 during NWay process of
+- exchanging Link Code Word (FLP).
++ exchanging Link Code Word (FLP).
+
+ VERSION 1.2 <2002/11/30>
+
+@@ -81,10 +81,10 @@ VERSION 2.2LK <2005/01/25>
+
+ #ifdef RTL8169_DEBUG
+ #define assert(expr) \
+- if(!(expr)) { \
+- printk( "Assertion failed! %s,%s,%s,line=%d\n", \
+- #expr,__FILE__,__FUNCTION__,__LINE__); \
+- }
++ if (!(expr)) { \
++ printk( "Assertion failed! %s,%s,%s,line=%d\n", \
++ #expr,__FILE__,__FUNCTION__,__LINE__); \
++ }
+ #define dprintk(fmt, args...) do { printk(PFX fmt, ## args); } while (0)
+ #else
+ #define assert(expr) do {} while (0)
+@@ -150,11 +150,16 @@ static const int multicast_filter_limit
+ #define RTL_R32(reg) ((unsigned long) readl (ioaddr + (reg)))
+
+ enum mac_version {
+- RTL_GIGA_MAC_VER_B = 0x00,
+- /* RTL_GIGA_MAC_VER_C = 0x03, */
+- RTL_GIGA_MAC_VER_D = 0x01,
+- RTL_GIGA_MAC_VER_E = 0x02,
+- RTL_GIGA_MAC_VER_X = 0x04 /* Greater than RTL_GIGA_MAC_VER_E */
++ RTL_GIGA_MAC_VER_01 = 0x00,
++ RTL_GIGA_MAC_VER_02 = 0x01,
++ RTL_GIGA_MAC_VER_03 = 0x02,
++ RTL_GIGA_MAC_VER_04 = 0x03,
++ RTL_GIGA_MAC_VER_05 = 0x04,
++ RTL_GIGA_MAC_VER_11 = 0x0b,
++ RTL_GIGA_MAC_VER_12 = 0x0c,
++ RTL_GIGA_MAC_VER_13 = 0x0d,
++ RTL_GIGA_MAC_VER_14 = 0x0e,
++ RTL_GIGA_MAC_VER_15 = 0x0f
+ };
+
+ enum phy_version {
+@@ -166,7 +171,6 @@ enum phy_version {
+ RTL_GIGA_PHY_VER_H = 0x08, /* PHY Reg 0x03 bit0-3 == 0x0003 */
+ };
+
+-
+ #define _R(NAME,MAC,MASK) \
+ { .name = NAME, .mac_version = MAC, .RxConfigMask = MASK }
+
+@@ -175,19 +179,45 @@ static const struct {
+ u8 mac_version;
+ u32 RxConfigMask; /* Clears the bits supported by this chip */
+ } rtl_chip_info[] = {
+- _R("RTL8169", RTL_GIGA_MAC_VER_B, 0xff7e1880),
+- _R("RTL8169s/8110s", RTL_GIGA_MAC_VER_D, 0xff7e1880),
+- _R("RTL8169s/8110s", RTL_GIGA_MAC_VER_E, 0xff7e1880),
+- _R("RTL8169s/8110s", RTL_GIGA_MAC_VER_X, 0xff7e1880),
++ _R("RTL8169", RTL_GIGA_MAC_VER_01, 0xff7e1880),
++ _R("RTL8169s/8110s", RTL_GIGA_MAC_VER_02, 0xff7e1880),
++ _R("RTL8169s/8110s", RTL_GIGA_MAC_VER_03, 0xff7e1880),
++ _R("RTL8169sb/8110sb", RTL_GIGA_MAC_VER_04, 0xff7e1880),
++ _R("RTL8169sc/8110sc", RTL_GIGA_MAC_VER_05, 0xff7e1880),
++ _R("RTL8168b/8111b", RTL_GIGA_MAC_VER_11, 0xff7e1880), // PCI-E
++ _R("RTL8168b/8111b", RTL_GIGA_MAC_VER_12, 0xff7e1880), // PCI-E
++ _R("RTL8101e", RTL_GIGA_MAC_VER_13, 0xff7e1880), // PCI-E 8139
++ _R("RTL8100e", RTL_GIGA_MAC_VER_14, 0xff7e1880), // PCI-E 8139
++ _R("RTL8100e", RTL_GIGA_MAC_VER_15, 0xff7e1880) // PCI-E 8139
+ };
+ #undef _R
+
++enum cfg_version {
++ RTL_CFG_0 = 0x00,
++ RTL_CFG_1,
++ RTL_CFG_2
++};
++
++static const struct {
++ unsigned int region;
++ unsigned int align;
++} rtl_cfg_info[] = {
++ [RTL_CFG_0] = { 1, NET_IP_ALIGN },
++ [RTL_CFG_1] = { 2, NET_IP_ALIGN },
++ [RTL_CFG_2] = { 2, 8 }
++};
++
+ static struct pci_device_id rtl8169_pci_tbl[] = {
+- { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), },
+- { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8129), },
+- { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4300), },
+- { PCI_DEVICE(0x16ec, 0x0116), },
+- { PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, 0x0024, },
++ { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8129), 0, 0, RTL_CFG_0 },
++ { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8136), 0, 0, RTL_CFG_2 },
++ { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8167), 0, 0, RTL_CFG_0 },
++ { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8168), 0, 0, RTL_CFG_2 },
++ { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), 0, 0, RTL_CFG_0 },
++ { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4300), 0, 0, RTL_CFG_0 },
++ { PCI_DEVICE(0x1259, 0xc107), 0, 0, RTL_CFG_0 },
++ { PCI_DEVICE(0x16ec, 0x0116), 0, 0, RTL_CFG_0 },
++ { PCI_VENDOR_ID_LINKSYS, 0x1032,
++ PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 },
+ {0,},
+ };
+
+@@ -257,10 +287,11 @@ enum RTL8169_register_content {
+ RxOK = 0x01,
+
+ /* RxStatusDesc */
+- RxRES = 0x00200000,
+- RxCRC = 0x00080000,
+- RxRUNT = 0x00100000,
+- RxRWT = 0x00400000,
++ RxFOVF = (1 << 23),
++ RxRWT = (1 << 22),
++ RxRES = (1 << 21),
++ RxRUNT = (1 << 20),
++ RxCRC = (1 << 19),
+
+ /* ChipCmdBits */
+ CmdReset = 0x10,
+@@ -326,30 +357,6 @@ enum RTL8169_register_content {
+ LinkStatus = 0x02,
+ FullDup = 0x01,
+
+- /* GIGABIT_PHY_registers */
+- PHY_CTRL_REG = 0,
+- PHY_STAT_REG = 1,
+- PHY_AUTO_NEGO_REG = 4,
+- PHY_1000_CTRL_REG = 9,
+-
+- /* GIGABIT_PHY_REG_BIT */
+- PHY_Restart_Auto_Nego = 0x0200,
+- PHY_Enable_Auto_Nego = 0x1000,
+-
+- /* PHY_STAT_REG = 1 */
+- PHY_Auto_Neco_Comp = 0x0020,
+-
+- /* PHY_AUTO_NEGO_REG = 4 */
+- PHY_Cap_10_Half = 0x0020,
+- PHY_Cap_10_Full = 0x0040,
+- PHY_Cap_100_Half = 0x0080,
+- PHY_Cap_100_Full = 0x0100,
+-
+- /* PHY_1000_CTRL_REG = 9 */
+- PHY_Cap_1000_Full = 0x0200,
+-
+- PHY_Cap_Null = 0x0,
+-
+ /* _MediaType */
+ _10_Half = 0x01,
+ _10_Full = 0x02,
+@@ -417,6 +424,7 @@ struct ring_info {
+ struct rtl8169_private {
+ void __iomem *mmio_addr; /* memory map physical address */
+ struct pci_dev *pci_dev; /* Index of PCI device */
++ struct net_device *dev;
+ struct net_device_stats stats; /* statistics of net device */
+ spinlock_t lock; /* spin lock flag */
+ u32 msg_enable;
+@@ -433,6 +441,7 @@ struct rtl8169_private {
+ dma_addr_t RxPhyAddr;
+ struct sk_buff *Rx_skbuff[NUM_RX_DESC]; /* Rx data buffers */
+ struct ring_info tx_skb[NUM_TX_DESC]; /* Tx data buffers */
++ unsigned align;
+ unsigned rx_buf_sz;
+ struct timer_list timer;
+ u16 cp_cmd;
+@@ -466,8 +475,7 @@ MODULE_VERSION(RTL8169_VERSION);
+
+ static int rtl8169_open(struct net_device *dev);
+ static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev);
+-static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance,
+- struct pt_regs *regs);
++static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
+ static int rtl8169_init_ring(struct net_device *dev);
+ static void rtl8169_hw_start(struct net_device *dev);
+ static int rtl8169_close(struct net_device *dev);
+@@ -488,12 +496,7 @@ static const u16 rtl8169_intr_mask =
+ static const u16 rtl8169_napi_event =
+ RxOK | RxOverflow | RxFIFOOver | TxOK | TxErr;
+ static const unsigned int rtl8169_rx_config =
+- (RX_FIFO_THRESH << RxCfgFIFOShift) | (RX_DMA_BURST << RxCfgDMAShift);
+-
+-#define PHY_Cap_10_Half_Or_Less PHY_Cap_10_Half
+-#define PHY_Cap_10_Full_Or_Less PHY_Cap_10_Full | PHY_Cap_10_Half_Or_Less
+-#define PHY_Cap_100_Half_Or_Less PHY_Cap_100_Half | PHY_Cap_10_Full_Or_Less
+-#define PHY_Cap_100_Full_Or_Less PHY_Cap_100_Full | PHY_Cap_100_Half_Or_Less
++ (RX_FIFO_THRESH << RxCfgFIFOShift) | (RX_DMA_BURST << RxCfgDMAShift);
+
+ static void mdio_write(void __iomem *ioaddr, int RegAddr, int value)
+ {
+@@ -503,7 +506,7 @@ static void mdio_write(void __iomem *ioa
+
+ for (i = 20; i > 0; i--) {
+ /* Check if the RTL8169 has completed writing to the specified MII register */
+- if (!(RTL_R32(PHYAR) & 0x80000000))
++ if (!(RTL_R32(PHYAR) & 0x80000000))
+ break;
+ udelay(25);
+ }
+@@ -547,7 +550,7 @@ static unsigned int rtl8169_tbi_reset_pe
+
+ static unsigned int rtl8169_xmii_reset_pending(void __iomem *ioaddr)
+ {
+- return mdio_read(ioaddr, 0) & 0x8000;
++ return mdio_read(ioaddr, MII_BMCR) & BMCR_RESET;
+ }
+
+ static unsigned int rtl8169_tbi_link_ok(void __iomem *ioaddr)
+@@ -569,8 +572,8 @@ static void rtl8169_xmii_reset_enable(vo
+ {
+ unsigned int val;
+
+- val = (mdio_read(ioaddr, PHY_CTRL_REG) | 0x8000) & 0xffff;
+- mdio_write(ioaddr, PHY_CTRL_REG, val);
++ mdio_write(ioaddr, MII_BMCR, BMCR_RESET);
++ val = mdio_read(ioaddr, MII_BMCR);
+ }
+
+ static void rtl8169_check_link_status(struct net_device *dev,
+@@ -608,7 +611,7 @@ static void rtl8169_link_option(int idx,
+ { SPEED_1000, DUPLEX_FULL, AUTONEG_ENABLE, 0xff }
+ }, *p;
+ unsigned char option;
+-
++
+ option = ((idx < MAX_UNITS) && (idx >= 0)) ? media[idx] : 0xff;
+
+ if ((option != 0xff) && !idx && netif_msg_drv(&debug))
+@@ -650,9 +653,9 @@ static void rtl8169_get_wol(struct net_d
+ if (options & UWF)
+ wol->wolopts |= WAKE_UCAST;
+ if (options & BWF)
+- wol->wolopts |= WAKE_BCAST;
++ wol->wolopts |= WAKE_BCAST;
+ if (options & MWF)
+- wol->wolopts |= WAKE_MCAST;
++ wol->wolopts |= WAKE_MCAST;
+
+ out_unlock:
+ spin_unlock_irq(&tp->lock);
+@@ -745,38 +748,57 @@ static int rtl8169_set_speed_xmii(struct
+ void __iomem *ioaddr = tp->mmio_addr;
+ int auto_nego, giga_ctrl;
+
+- auto_nego = mdio_read(ioaddr, PHY_AUTO_NEGO_REG);
+- auto_nego &= ~(PHY_Cap_10_Half | PHY_Cap_10_Full |
+- PHY_Cap_100_Half | PHY_Cap_100_Full);
+- giga_ctrl = mdio_read(ioaddr, PHY_1000_CTRL_REG);
+- giga_ctrl &= ~(PHY_Cap_1000_Full | PHY_Cap_Null);
++ auto_nego = mdio_read(ioaddr, MII_ADVERTISE);
++ auto_nego &= ~(ADVERTISE_10HALF | ADVERTISE_10FULL |
++ ADVERTISE_100HALF | ADVERTISE_100FULL);
++ giga_ctrl = mdio_read(ioaddr, MII_CTRL1000);
++ giga_ctrl &= ~(ADVERTISE_1000FULL | ADVERTISE_1000HALF);
+
+ if (autoneg == AUTONEG_ENABLE) {
+- auto_nego |= (PHY_Cap_10_Half | PHY_Cap_10_Full |
+- PHY_Cap_100_Half | PHY_Cap_100_Full);
+- giga_ctrl |= PHY_Cap_1000_Full;
++ auto_nego |= (ADVERTISE_10HALF | ADVERTISE_10FULL |
++ ADVERTISE_100HALF | ADVERTISE_100FULL);
++ giga_ctrl |= ADVERTISE_1000FULL | ADVERTISE_1000HALF;
+ } else {
+ if (speed == SPEED_10)
+- auto_nego |= PHY_Cap_10_Half | PHY_Cap_10_Full;
++ auto_nego |= ADVERTISE_10HALF | ADVERTISE_10FULL;
+ else if (speed == SPEED_100)
+- auto_nego |= PHY_Cap_100_Half | PHY_Cap_100_Full;
++ auto_nego |= ADVERTISE_100HALF | ADVERTISE_100FULL;
+ else if (speed == SPEED_1000)
+- giga_ctrl |= PHY_Cap_1000_Full;
++ giga_ctrl |= ADVERTISE_1000FULL | ADVERTISE_1000HALF;
+
+ if (duplex == DUPLEX_HALF)
+- auto_nego &= ~(PHY_Cap_10_Full | PHY_Cap_100_Full);
++ auto_nego &= ~(ADVERTISE_10FULL | ADVERTISE_100FULL);
+
+ if (duplex == DUPLEX_FULL)
+- auto_nego &= ~(PHY_Cap_10_Half | PHY_Cap_100_Half);
++ auto_nego &= ~(ADVERTISE_10HALF | ADVERTISE_100HALF);
++
++ /* This tweak comes straight from Realtek's driver. */
++ if ((speed == SPEED_100) && (duplex == DUPLEX_HALF) &&
++ (tp->mac_version == RTL_GIGA_MAC_VER_13)) {
++ auto_nego = ADVERTISE_100HALF | ADVERTISE_CSMA;
++ }
+ }
+
++ /* The 8100e/8101e do Fast Ethernet only. */
++ if ((tp->mac_version == RTL_GIGA_MAC_VER_13) ||
++ (tp->mac_version == RTL_GIGA_MAC_VER_14) ||
++ (tp->mac_version == RTL_GIGA_MAC_VER_15)) {
++ if ((giga_ctrl & (ADVERTISE_1000FULL | ADVERTISE_1000HALF)) &&
++ netif_msg_link(tp)) {
++ printk(KERN_INFO "%s: PHY does not support 1000Mbps.\n",
++ dev->name);
++ }
++ giga_ctrl &= ~(ADVERTISE_1000FULL | ADVERTISE_1000HALF);
++ }
++
++ auto_nego |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
++
+ tp->phy_auto_nego_reg = auto_nego;
+ tp->phy_1000_ctrl_reg = giga_ctrl;
+
+- mdio_write(ioaddr, PHY_AUTO_NEGO_REG, auto_nego);
+- mdio_write(ioaddr, PHY_1000_CTRL_REG, giga_ctrl);
+- mdio_write(ioaddr, PHY_CTRL_REG, PHY_Enable_Auto_Nego |
+- PHY_Restart_Auto_Nego);
++ mdio_write(ioaddr, MII_ADVERTISE, auto_nego);
++ mdio_write(ioaddr, MII_CTRL1000, giga_ctrl);
++ mdio_write(ioaddr, MII_BMCR, BMCR_ANENABLE | BMCR_ANRESTART);
+ return 0;
+ }
+
+@@ -788,7 +810,7 @@ static int rtl8169_set_speed(struct net_
+
+ ret = tp->set_speed(dev, autoneg, speed, duplex);
+
+- if (netif_running(dev) && (tp->phy_1000_ctrl_reg & PHY_Cap_1000_Full))
++ if (netif_running(dev) && (tp->phy_1000_ctrl_reg & ADVERTISE_1000FULL))
+ mod_timer(&tp->timer, jiffies + RTL8169_PHY_TIMEOUT);
+
+ return ret;
+@@ -803,7 +825,7 @@ static int rtl8169_set_settings(struct n
+ spin_lock_irqsave(&tp->lock, flags);
+ ret = rtl8169_set_speed(dev, cmd->autoneg, cmd->speed, cmd->duplex);
+ spin_unlock_irqrestore(&tp->lock, flags);
+-
++
+ return ret;
+ }
+
+@@ -936,20 +958,20 @@ static void rtl8169_gset_xmii(struct net
+ SUPPORTED_100baseT_Full |
+ SUPPORTED_1000baseT_Full |
+ SUPPORTED_Autoneg |
+- SUPPORTED_TP;
++ SUPPORTED_TP;
+
+ cmd->autoneg = 1;
+ cmd->advertising = ADVERTISED_TP | ADVERTISED_Autoneg;
+
+- if (tp->phy_auto_nego_reg & PHY_Cap_10_Half)
++ if (tp->phy_auto_nego_reg & ADVERTISE_10HALF)
+ cmd->advertising |= ADVERTISED_10baseT_Half;
+- if (tp->phy_auto_nego_reg & PHY_Cap_10_Full)
++ if (tp->phy_auto_nego_reg & ADVERTISE_10FULL)
+ cmd->advertising |= ADVERTISED_10baseT_Full;
+- if (tp->phy_auto_nego_reg & PHY_Cap_100_Half)
++ if (tp->phy_auto_nego_reg & ADVERTISE_100HALF)
+ cmd->advertising |= ADVERTISED_100baseT_Half;
+- if (tp->phy_auto_nego_reg & PHY_Cap_100_Full)
++ if (tp->phy_auto_nego_reg & ADVERTISE_100FULL)
+ cmd->advertising |= ADVERTISED_100baseT_Full;
+- if (tp->phy_1000_ctrl_reg & PHY_Cap_1000_Full)
++ if (tp->phy_1000_ctrl_reg & ADVERTISE_1000FULL)
+ cmd->advertising |= ADVERTISED_1000baseT_Full;
+
+ status = RTL_R8(PHYstatus);
+@@ -961,6 +983,11 @@ static void rtl8169_gset_xmii(struct net
+ else if (status & _10bps)
+ cmd->speed = SPEED_10;
+
++ if (status & TxFlowCtrl)
++ cmd->advertising |= ADVERTISED_Asym_Pause;
++ if (status & RxFlowCtrl)
++ cmd->advertising |= ADVERTISED_Pause;
++
+ cmd->duplex = ((status & _1000bpsF) || (status & FullDup)) ?
+ DUPLEX_FULL : DUPLEX_HALF;
+ }
+@@ -981,15 +1008,15 @@ static int rtl8169_get_settings(struct n
+ static void rtl8169_get_regs(struct net_device *dev, struct ethtool_regs *regs,
+ void *p)
+ {
+- struct rtl8169_private *tp = netdev_priv(dev);
+- unsigned long flags;
++ struct rtl8169_private *tp = netdev_priv(dev);
++ unsigned long flags;
+
+- if (regs->len > R8169_REGS_SIZE)
+- regs->len = R8169_REGS_SIZE;
++ if (regs->len > R8169_REGS_SIZE)
++ regs->len = R8169_REGS_SIZE;
+
+- spin_lock_irqsave(&tp->lock, flags);
+- memcpy_fromio(p, tp->mmio_addr, regs->len);
+- spin_unlock_irqrestore(&tp->lock, flags);
++ spin_lock_irqsave(&tp->lock, flags);
++ memcpy_fromio(p, tp->mmio_addr, regs->len);
++ spin_unlock_irqrestore(&tp->lock, flags);
+ }
+
+ static u32 rtl8169_get_msglevel(struct net_device *dev)
+@@ -1071,7 +1098,7 @@ static void rtl8169_get_ethtool_stats(st
+ RTL_W32(CounterAddrLow, 0);
+ RTL_W32(CounterAddrHigh, 0);
+
+- data[0] = le64_to_cpu(counters->tx_packets);
++ data[0] = le64_to_cpu(counters->tx_packets);
+ data[1] = le64_to_cpu(counters->rx_packets);
+ data[2] = le64_to_cpu(counters->tx_errors);
+ data[3] = le32_to_cpu(counters->rx_errors);
+@@ -1098,7 +1125,7 @@ static void rtl8169_get_strings(struct n
+ }
+
+
+-static struct ethtool_ops rtl8169_ethtool_ops = {
++static /*const*/ struct ethtool_ops rtl8169_ethtool_ops = {
+ .get_drvinfo = rtl8169_get_drvinfo,
+ .get_regs_len = rtl8169_get_regs_len,
+ .get_link = ethtool_op_get_link,
+@@ -1131,7 +1158,7 @@ static void rtl8169_write_gmii_reg_bit(v
+ val = mdio_read(ioaddr, reg);
+ val = (bitval == 1) ?
+ val | (bitval << bitnum) : val & ~(0x0001 << bitnum);
+- mdio_write(ioaddr, reg, val & 0xffff);
++ mdio_write(ioaddr, reg, val & 0xffff);
+ }
+
+ static void rtl8169_get_mac_version(struct rtl8169_private *tp, void __iomem *ioaddr)
+@@ -1140,10 +1167,16 @@ static void rtl8169_get_mac_version(stru
+ u32 mask;
+ int mac_version;
+ } mac_info[] = {
+- { 0x1 << 28, RTL_GIGA_MAC_VER_X },
+- { 0x1 << 26, RTL_GIGA_MAC_VER_E },
+- { 0x1 << 23, RTL_GIGA_MAC_VER_D },
+- { 0x00000000, RTL_GIGA_MAC_VER_B } /* Catch-all */
++ { 0x38800000, RTL_GIGA_MAC_VER_15 },
++ { 0x38000000, RTL_GIGA_MAC_VER_12 },
++ { 0x34000000, RTL_GIGA_MAC_VER_13 },
++ { 0x30800000, RTL_GIGA_MAC_VER_14 },
++ { 0x30000000, RTL_GIGA_MAC_VER_11 },
++ { 0x18000000, RTL_GIGA_MAC_VER_05 },
++ { 0x10000000, RTL_GIGA_MAC_VER_04 },
++ { 0x04000000, RTL_GIGA_MAC_VER_03 },
++ { 0x00800000, RTL_GIGA_MAC_VER_02 },
++ { 0x00000000, RTL_GIGA_MAC_VER_01 } /* Catch-all */
+ }, *p = mac_info;
+ u32 reg;
+
+@@ -1155,24 +1188,7 @@ static void rtl8169_get_mac_version(stru
+
+ static void rtl8169_print_mac_version(struct rtl8169_private *tp)
+ {
+- struct {
+- int version;
+- char *msg;
+- } mac_print[] = {
+- { RTL_GIGA_MAC_VER_E, "RTL_GIGA_MAC_VER_E" },
+- { RTL_GIGA_MAC_VER_D, "RTL_GIGA_MAC_VER_D" },
+- { RTL_GIGA_MAC_VER_B, "RTL_GIGA_MAC_VER_B" },
+- { 0, NULL }
+- }, *p;
+-
+- for (p = mac_print; p->msg; p++) {
+- if (tp->mac_version == p->version) {
+- dprintk("mac_version == %s (%04d)\n", p->msg,
+- p->version);
+- return;
+- }
+- }
+- dprintk("mac_version == Unknown\n");
++ dprintk("mac_version = 0x%02x\n", tp->mac_version);
+ }
+
+ static void rtl8169_get_phy_version(struct rtl8169_private *tp, void __iomem *ioaddr)
+@@ -1189,7 +1205,7 @@ static void rtl8169_get_phy_version(stru
+ }, *p = phy_info;
+ u16 reg;
+
+- reg = mdio_read(ioaddr, 3) & 0xffff;
++ reg = mdio_read(ioaddr, MII_PHYSID2) & 0xffff;
+ while ((reg & p->mask) != p->set)
+ p++;
+ tp->phy_version = p->phy_version;
+@@ -1257,7 +1273,7 @@ static void rtl8169_hw_phy_config(struct
+ rtl8169_print_mac_version(tp);
+ rtl8169_print_phy_version(tp);
+
+- if (tp->mac_version <= RTL_GIGA_MAC_VER_B)
++ if (tp->mac_version <= RTL_GIGA_MAC_VER_01)
+ return;
+ if (tp->phy_version >= RTL_GIGA_PHY_VER_H)
+ return;
+@@ -1267,12 +1283,7 @@ static void rtl8169_hw_phy_config(struct
+
+ /* Shazam ! */
+
+- if (tp->mac_version == RTL_GIGA_MAC_VER_X) {
+- mdio_write(ioaddr, 31, 0x0001);
+- mdio_write(ioaddr, 9, 0x273a);
+- mdio_write(ioaddr, 14, 0x7bfb);
+- mdio_write(ioaddr, 27, 0x841e);
+-
++ if (tp->mac_version == RTL_GIGA_MAC_VER_04) {
+ mdio_write(ioaddr, 31, 0x0002);
+ mdio_write(ioaddr, 1, 0x90d0);
+ mdio_write(ioaddr, 31, 0x0000);
+@@ -1306,16 +1317,16 @@ static void rtl8169_phy_timer(unsigned l
+ void __iomem *ioaddr = tp->mmio_addr;
+ unsigned long timeout = RTL8169_PHY_TIMEOUT;
+
+- assert(tp->mac_version > RTL_GIGA_MAC_VER_B);
++ assert(tp->mac_version > RTL_GIGA_MAC_VER_01);
+ assert(tp->phy_version < RTL_GIGA_PHY_VER_H);
+
+- if (!(tp->phy_1000_ctrl_reg & PHY_Cap_1000_Full))
++ if (!(tp->phy_1000_ctrl_reg & ADVERTISE_1000FULL))
+ return;
+
+ spin_lock_irq(&tp->lock);
+
+ if (tp->phy_reset_pending(ioaddr)) {
+- /*
++ /*
+ * A busy loop could burn quite a few cycles on nowadays CPU.
+ * Let's delay the execution of the timer for a few ticks.
+ */
+@@ -1342,7 +1353,7 @@ static inline void rtl8169_delete_timer(
+ struct rtl8169_private *tp = netdev_priv(dev);
+ struct timer_list *timer = &tp->timer;
+
+- if ((tp->mac_version <= RTL_GIGA_MAC_VER_B) ||
++ if ((tp->mac_version <= RTL_GIGA_MAC_VER_01) ||
+ (tp->phy_version >= RTL_GIGA_PHY_VER_H))
+ return;
+
+@@ -1354,7 +1365,7 @@ static inline void rtl8169_request_timer
+ struct rtl8169_private *tp = netdev_priv(dev);
+ struct timer_list *timer = &tp->timer;
+
+- if ((tp->mac_version <= RTL_GIGA_MAC_VER_B) ||
++ if ((tp->mac_version <= RTL_GIGA_MAC_VER_01) ||
+ (tp->phy_version >= RTL_GIGA_PHY_VER_H))
+ return;
+
+@@ -1391,28 +1402,111 @@ static void rtl8169_release_board(struct
+ free_netdev(dev);
+ }
+
++static void rtl8169_phy_reset(struct net_device *dev,
++ struct rtl8169_private *tp)
++{
++ void __iomem *ioaddr = tp->mmio_addr;
++ int i;
++
++ tp->phy_reset_enable(ioaddr);
++ for (i = 0; i < 100; i++) {
++ if (!tp->phy_reset_pending(ioaddr))
++ return;
++ msleep(1);
++ }
++ if (netif_msg_link(tp))
++ printk(KERN_ERR "%s: PHY reset failed.\n", dev->name);
++}
++
++static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp)
++{
++ void __iomem *ioaddr = tp->mmio_addr;
++ static int board_idx = -1;
++ u8 autoneg, duplex;
++ u16 speed;
++
++ board_idx++;
++
++ rtl8169_hw_phy_config(dev);
++
++ dprintk("Set MAC Reg C+CR Offset 0x82h = 0x01h\n");
++ RTL_W8(0x82, 0x01);
++
++ if (tp->mac_version < RTL_GIGA_MAC_VER_03) {
++ dprintk("Set PCI Latency=0x40\n");
++ pci_write_config_byte(tp->pci_dev, PCI_LATENCY_TIMER, 0x40);
++ }
++
++ if (tp->mac_version == RTL_GIGA_MAC_VER_02) {
++ dprintk("Set MAC Reg C+CR Offset 0x82h = 0x01h\n");
++ RTL_W8(0x82, 0x01);
++ dprintk("Set PHY Reg 0x0bh = 0x00h\n");
++ mdio_write(ioaddr, 0x0b, 0x0000); //w 0x0b 15 0 0
++ }
++
++ rtl8169_link_option(board_idx, &autoneg, &speed, &duplex);
++
++ rtl8169_phy_reset(dev, tp);
++
++ rtl8169_set_speed(dev, autoneg, speed, duplex);
++
++ if ((RTL_R8(PHYstatus) & TBI_Enable) && netif_msg_link(tp))
++ printk(KERN_INFO PFX "%s: TBI auto-negotiating\n", dev->name);
++}
++
++static int rtl8169_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
++{
++ struct rtl8169_private *tp = netdev_priv(dev);
++ struct mii_ioctl_data *data = if_mii(ifr);
++
++ if (!netif_running(dev))
++ return -ENODEV;
++
++ switch (cmd) {
++ case SIOCGMIIPHY:
++ data->phy_id = 32; /* Internal PHY */
++ return 0;
++
++ case SIOCGMIIREG:
++ data->val_out = mdio_read(tp->mmio_addr, data->reg_num & 0x1f);
++ return 0;
++
++ case SIOCSMIIREG:
++ if (!capable(CAP_NET_ADMIN))
++ return -EPERM;
++ mdio_write(tp->mmio_addr, data->reg_num & 0x1f, data->val_in);
++ return 0;
++ }
++ return -EOPNOTSUPP;
++}
++
+ static int __devinit
+-rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out,
+- void __iomem **ioaddr_out)
++rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
+ {
+- void __iomem *ioaddr;
+- struct net_device *dev;
++ const unsigned int region = rtl_cfg_info[ent->driver_data].region;
+ struct rtl8169_private *tp;
+- int rc = -ENOMEM, i, acpi_idle_state = 0, pm_cap;
++ struct net_device *dev;
++ void __iomem *ioaddr;
++ unsigned int pm_cap;
++ int i, rc;
+
+- assert(ioaddr_out != NULL);
++ if (netif_msg_drv(&debug)) {
++ printk(KERN_INFO "%s Gigabit Ethernet driver %s loaded\n",
++ MODULENAME, RTL8169_VERSION);
++ }
+
+- /* dev zeroed in alloc_etherdev */
+ dev = alloc_etherdev(sizeof (*tp));
+- if (dev == NULL) {
++ if (!dev) {
+ if (netif_msg_drv(&debug))
+ dev_err(&pdev->dev, "unable to alloc new ethernet\n");
+- goto err_out;
++ rc = -ENOMEM;
++ goto out;
+ }
+
+ SET_MODULE_OWNER(dev);
+ SET_NETDEV_DEV(dev, &pdev->dev);
+ tp = netdev_priv(dev);
++ tp->dev = dev;
+ tp->msg_enable = netif_msg_init(debug.msg_enable, R8169_MSG_DEFAULT);
+
+ /* enable device (incl. PCI PM wakeup and hotplug setup) */
+@@ -1420,48 +1514,53 @@ rtl8169_init_board(struct pci_dev *pdev,
+ if (rc < 0) {
+ if (netif_msg_probe(tp))
+ dev_err(&pdev->dev, "enable failure\n");
+- goto err_out_free_dev;
++ goto err_out_free_dev_1;
+ }
+
+ rc = pci_set_mwi(pdev);
+ if (rc < 0)
+- goto err_out_disable;
++ goto err_out_disable_2;
+
+ /* save power state before pci_enable_device overwrites it */
+ pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
+ if (pm_cap) {
+- u16 pwr_command;
++ u16 pwr_command, acpi_idle_state;
+
+ pci_read_config_word(pdev, pm_cap + PCI_PM_CTRL, &pwr_command);
+ acpi_idle_state = pwr_command & PCI_PM_CTRL_STATE_MASK;
+ } else {
+- if (netif_msg_probe(tp))
++ if (netif_msg_probe(tp)) {
+ dev_err(&pdev->dev,
+- "PowerManagement capability not found.\n");
++ "PowerManagement capability not found.\n");
++ }
+ }
+
+ /* make sure PCI base addr 1 is MMIO */
+- if (!(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
+- if (netif_msg_probe(tp))
++ if (!(pci_resource_flags(pdev, region) & IORESOURCE_MEM)) {
++ if (netif_msg_probe(tp)) {
+ dev_err(&pdev->dev,
+- "region #1 not an MMIO resource, aborting\n");
++ "region #%d not an MMIO resource, aborting\n",
++ region);
++ }
+ rc = -ENODEV;
+- goto err_out_mwi;
++ goto err_out_mwi_3;
+ }
++
+ /* check for weird/broken PCI region reporting */
+- if (pci_resource_len(pdev, 1) < R8169_REGS_SIZE) {
+- if (netif_msg_probe(tp))
++ if (pci_resource_len(pdev, region) < R8169_REGS_SIZE) {
++ if (netif_msg_probe(tp)) {
+ dev_err(&pdev->dev,
+- "Invalid PCI region size(s), aborting\n");
++ "Invalid PCI region size(s), aborting\n");
++ }
+ rc = -ENODEV;
+- goto err_out_mwi;
++ goto err_out_mwi_3;
+ }
+
+ rc = pci_request_regions(pdev, MODULENAME);
+ if (rc < 0) {
+ if (netif_msg_probe(tp))
+ dev_err(&pdev->dev, "could not request regions.\n");
+- goto err_out_mwi;
++ goto err_out_mwi_3;
+ }
+
+ tp->cp_cmd = PCIMulRW | RxChkSum;
+@@ -1473,22 +1572,23 @@ rtl8169_init_board(struct pci_dev *pdev,
+ } else {
+ rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+ if (rc < 0) {
+- if (netif_msg_probe(tp))
++ if (netif_msg_probe(tp)) {
+ dev_err(&pdev->dev,
+- "DMA configuration failed.\n");
+- goto err_out_free_res;
++ "DMA configuration failed.\n");
++ }
++ goto err_out_free_res_4;
+ }
+ }
+
+ pci_set_master(pdev);
+
+ /* ioremap MMIO region */
+- ioaddr = ioremap(pci_resource_start(pdev, 1), R8169_REGS_SIZE);
+- if (ioaddr == NULL) {
++ ioaddr = ioremap(pci_resource_start(pdev, region), R8169_REGS_SIZE);
++ if (!ioaddr) {
+ if (netif_msg_probe(tp))
+ dev_err(&pdev->dev, "cannot remap MMIO, aborting\n");
+ rc = -EIO;
+- goto err_out_free_res;
++ goto err_out_free_res_4;
+ }
+
+ /* Unneeded ? Don't mess with Mrs. Murphy. */
+@@ -1498,10 +1598,10 @@ rtl8169_init_board(struct pci_dev *pdev,
+ RTL_W8(ChipCmd, CmdReset);
+
+ /* Check that the chip has finished the reset. */
+- for (i = 1000; i > 0; i--) {
++ for (i = 100; i > 0; i--) {
+ if ((RTL_R8(ChipCmd) & CmdReset) == 0)
+ break;
+- udelay(10);
++ msleep_interruptible(1);
+ }
+
+ /* Identify chip attached to board */
+@@ -1519,8 +1619,8 @@ rtl8169_init_board(struct pci_dev *pdev,
+ /* Unknown chip: assume array element #0, original RTL-8169 */
+ if (netif_msg_probe(tp)) {
+ dev_printk(KERN_DEBUG, &pdev->dev,
+- "unknown chip version, assuming %s\n",
+- rtl_chip_info[0].name);
++ "unknown chip version, assuming %s\n",
++ rtl_chip_info[0].name);
+ }
+ i++;
+ }
+@@ -1531,56 +1631,6 @@ rtl8169_init_board(struct pci_dev *pdev,
+ RTL_W8(Config5, RTL_R8(Config5) & PMEStatus);
+ RTL_W8(Cfg9346, Cfg9346_Lock);
+
+- *ioaddr_out = ioaddr;
+- *dev_out = dev;
+-out:
+- return rc;
+-
+-err_out_free_res:
+- pci_release_regions(pdev);
+-
+-err_out_mwi:
+- pci_clear_mwi(pdev);
+-
+-err_out_disable:
+- pci_disable_device(pdev);
+-
+-err_out_free_dev:
+- free_netdev(dev);
+-err_out:
+- *ioaddr_out = NULL;
+- *dev_out = NULL;
+- goto out;
+-}
+-
+-static int __devinit
+-rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
+-{
+- struct net_device *dev = NULL;
+- struct rtl8169_private *tp;
+- void __iomem *ioaddr = NULL;
+- static int board_idx = -1;
+- u8 autoneg, duplex;
+- u16 speed;
+- int i, rc;
+-
+- assert(pdev != NULL);
+- assert(ent != NULL);
+-
+- board_idx++;
+-
+- if (netif_msg_drv(&debug)) {
+- printk(KERN_INFO "%s Gigabit Ethernet driver %s loaded\n",
+- MODULENAME, RTL8169_VERSION);
+- }
+-
+- rc = rtl8169_init_board(pdev, &dev, &ioaddr);
+- if (rc)
+- return rc;
+-
+- tp = netdev_priv(dev);
+- assert(ioaddr != NULL);
+-
+ if (RTL_R8(PHYstatus) & TBI_Enable) {
+ tp->set_speed = rtl8169_set_speed_tbi;
+ tp->get_settings = rtl8169_gset_tbi;
+@@ -1588,13 +1638,15 @@ rtl8169_init_one(struct pci_dev *pdev, c
+ tp->phy_reset_pending = rtl8169_tbi_reset_pending;
+ tp->link_ok = rtl8169_tbi_link_ok;
+
+- tp->phy_1000_ctrl_reg = PHY_Cap_1000_Full; /* Implied by TBI */
++ tp->phy_1000_ctrl_reg = ADVERTISE_1000FULL; /* Implied by TBI */
+ } else {
+ tp->set_speed = rtl8169_set_speed_xmii;
+ tp->get_settings = rtl8169_gset_xmii;
+ tp->phy_reset_enable = rtl8169_xmii_reset_enable;
+ tp->phy_reset_pending = rtl8169_xmii_reset_pending;
+ tp->link_ok = rtl8169_xmii_link_ok;
++
++ dev->do_ioctl = rtl8169_ioctl;
+ }
+
+ /* Get MAC address. FIXME: read EEPROM */
+@@ -1632,19 +1684,13 @@ rtl8169_init_one(struct pci_dev *pdev, c
+ tp->intr_mask = 0xffff;
+ tp->pci_dev = pdev;
+ tp->mmio_addr = ioaddr;
++ tp->align = rtl_cfg_info[ent->driver_data].align;
+
+ spin_lock_init(&tp->lock);
+
+ rc = register_netdev(dev);
+- if (rc) {
+- rtl8169_release_board(pdev, dev, ioaddr);
+- return rc;
+- }
+-
+- if (netif_msg_probe(tp)) {
+- printk(KERN_DEBUG "%s: Identified chip type is '%s'.\n",
+- dev->name, rtl_chip_info[tp->chipset].name);
+- }
++ if (rc < 0)
++ goto err_out_unmap_5;
+
+ pci_set_drvdata(pdev, dev);
+
+@@ -1653,38 +1699,29 @@ rtl8169_init_one(struct pci_dev *pdev, c
+ "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, "
+ "IRQ %d\n",
+ dev->name,
+- rtl_chip_info[ent->driver_data].name,
++ rtl_chip_info[tp->chipset].name,
+ dev->base_addr,
+ dev->dev_addr[0], dev->dev_addr[1],
+ dev->dev_addr[2], dev->dev_addr[3],
+ dev->dev_addr[4], dev->dev_addr[5], dev->irq);
+ }
+
+- rtl8169_hw_phy_config(dev);
+-
+- dprintk("Set MAC Reg C+CR Offset 0x82h = 0x01h\n");
+- RTL_W8(0x82, 0x01);
+-
+- if (tp->mac_version < RTL_GIGA_MAC_VER_E) {
+- dprintk("Set PCI Latency=0x40\n");
+- pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x40);
+- }
+-
+- if (tp->mac_version == RTL_GIGA_MAC_VER_D) {
+- dprintk("Set MAC Reg C+CR Offset 0x82h = 0x01h\n");
+- RTL_W8(0x82, 0x01);
+- dprintk("Set PHY Reg 0x0bh = 0x00h\n");
+- mdio_write(ioaddr, 0x0b, 0x0000); //w 0x0b 15 0 0
+- }
+-
+- rtl8169_link_option(board_idx, &autoneg, &speed, &duplex);
++ rtl8169_init_phy(dev, tp);
+
+- rtl8169_set_speed(dev, autoneg, speed, duplex);
+-
+- if ((RTL_R8(PHYstatus) & TBI_Enable) && netif_msg_link(tp))
+- printk(KERN_INFO PFX "%s: TBI auto-negotiating\n", dev->name);
++out:
++ return rc;
+
+- return 0;
++err_out_unmap_5:
++ iounmap(ioaddr);
++err_out_free_res_4:
++ pci_release_regions(pdev);
++err_out_mwi_3:
++ pci_clear_mwi(pdev);
++err_out_disable_2:
++ pci_disable_device(pdev);
++err_out_free_dev_1:
++ free_netdev(dev);
++ goto out;
+ }
+
+ static void __devexit
+@@ -1775,62 +1812,120 @@ static void rtl8169_hw_reset(void __iome
+ RTL_R8(ChipCmd);
+ }
+
+-static void
+-rtl8169_hw_start(struct net_device *dev)
++static void rtl8169_set_rx_tx_config_registers(struct rtl8169_private *tp)
++{
++ void __iomem *ioaddr = tp->mmio_addr;
++ u32 cfg = rtl8169_rx_config;
++
++ cfg |= (RTL_R32(RxConfig) & rtl_chip_info[tp->chipset].RxConfigMask);
++ RTL_W32(RxConfig, cfg);
++
++ /* Set DMA burst size and Interframe Gap Time */
++ RTL_W32(TxConfig, (TX_DMA_BURST << TxDMAShift) |
++ (InterFrameGap << TxInterFrameGapShift));
++}
++
++static void rtl8169_hw_start(struct net_device *dev)
+ {
+ struct rtl8169_private *tp = netdev_priv(dev);
+ void __iomem *ioaddr = tp->mmio_addr;
++ struct pci_dev *pdev = tp->pci_dev;
++ u16 cmd;
+ u32 i;
+
+ /* Soft reset the chip. */
+ RTL_W8(ChipCmd, CmdReset);
+
+ /* Check that the chip has finished the reset. */
+- for (i = 1000; i > 0; i--) {
++ for (i = 100; i > 0; i--) {
+ if ((RTL_R8(ChipCmd) & CmdReset) == 0)
+ break;
+- udelay(10);
++ msleep_interruptible(1);
++ }
++
++ if (tp->mac_version == RTL_GIGA_MAC_VER_05) {
++ RTL_W16(CPlusCmd, RTL_R16(CPlusCmd) | PCIMulRW);
++ pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, 0x08);
++ }
++
++ if (tp->mac_version == RTL_GIGA_MAC_VER_13) {
++ pci_write_config_word(pdev, 0x68, 0x00);
++ pci_write_config_word(pdev, 0x69, 0x08);
++ }
++
++ /* Undocumented stuff. */
++ if (tp->mac_version == RTL_GIGA_MAC_VER_05) {
++ /* Realtek's r1000_n.c driver uses '&& 0x01' here. Well... */
++ if ((RTL_R8(Config2) & 0x07) & 0x01)
++ RTL_W32(0x7c, 0x0007ffff);
++
++ RTL_W32(0x7c, 0x0007ff00);
++
++ pci_read_config_word(pdev, PCI_COMMAND, &cmd);
++ cmd = cmd & 0xef;
++ pci_write_config_word(pdev, PCI_COMMAND, cmd);
+ }
+
+ RTL_W8(Cfg9346, Cfg9346_Unlock);
+- RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
++ if ((tp->mac_version == RTL_GIGA_MAC_VER_01) ||
++ (tp->mac_version == RTL_GIGA_MAC_VER_02) ||
++ (tp->mac_version == RTL_GIGA_MAC_VER_03) ||
++ (tp->mac_version == RTL_GIGA_MAC_VER_04))
++ RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
++
+ RTL_W8(EarlyTxThres, EarlyTxThld);
+
+ /* Low hurts. Let's disable the filtering. */
+ RTL_W16(RxMaxSize, 16383);
+
+- /* Set Rx Config register */
+- i = rtl8169_rx_config |
+- (RTL_R32(RxConfig) & rtl_chip_info[tp->chipset].RxConfigMask);
+- RTL_W32(RxConfig, i);
++ if ((tp->mac_version == RTL_GIGA_MAC_VER_01) ||
++ (tp->mac_version == RTL_GIGA_MAC_VER_02) ||
++ (tp->mac_version == RTL_GIGA_MAC_VER_03) ||
++ (tp->mac_version == RTL_GIGA_MAC_VER_04))
++ rtl8169_set_rx_tx_config_registers(tp);
+
+- /* Set DMA burst size and Interframe Gap Time */
+- RTL_W32(TxConfig,
+- (TX_DMA_BURST << TxDMAShift) | (InterFrameGap <<
+- TxInterFrameGapShift));
+- tp->cp_cmd |= RTL_R16(CPlusCmd);
+- RTL_W16(CPlusCmd, tp->cp_cmd);
++ cmd = RTL_R16(CPlusCmd);
++ RTL_W16(CPlusCmd, cmd);
+
+- if ((tp->mac_version == RTL_GIGA_MAC_VER_D) ||
+- (tp->mac_version == RTL_GIGA_MAC_VER_E)) {
++ tp->cp_cmd |= cmd | PCIMulRW;
++
++ if ((tp->mac_version == RTL_GIGA_MAC_VER_02) ||
++ (tp->mac_version == RTL_GIGA_MAC_VER_03)) {
+ dprintk(KERN_INFO PFX "Set MAC Reg C+CR Offset 0xE0. "
+ "Bit-3 and bit-14 MUST be 1\n");
+- tp->cp_cmd |= (1 << 14) | PCIMulRW;
+- RTL_W16(CPlusCmd, tp->cp_cmd);
++ tp->cp_cmd |= (1 << 14);
+ }
+
++ RTL_W16(CPlusCmd, tp->cp_cmd);
++
+ /*
+ * Undocumented corner. Supposedly:
+ * (TxTimer << 12) | (TxPackets << 8) | (RxTimer << 4) | RxPackets
+ */
+ RTL_W16(IntrMitigate, 0x0000);
+
+- RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr & DMA_32BIT_MASK));
++ /*
++ * Magic spell: some iop3xx ARM board needs the TxDescAddrHigh
++ * register to be written before TxDescAddrLow to work.
++ * Switching from MMIO to I/O access fixes the issue as well.
++ */
+ RTL_W32(TxDescStartAddrHigh, ((u64) tp->TxPhyAddr >> 32));
+- RTL_W32(RxDescAddrLow, ((u64) tp->RxPhyAddr & DMA_32BIT_MASK));
++ RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr & DMA_32BIT_MASK));
+ RTL_W32(RxDescAddrHigh, ((u64) tp->RxPhyAddr >> 32));
++ RTL_W32(RxDescAddrLow, ((u64) tp->RxPhyAddr & DMA_32BIT_MASK));
++
++ if ((tp->mac_version != RTL_GIGA_MAC_VER_01) &&
++ (tp->mac_version != RTL_GIGA_MAC_VER_02) &&
++ (tp->mac_version != RTL_GIGA_MAC_VER_03) &&
++ (tp->mac_version != RTL_GIGA_MAC_VER_04)) {
++ RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
++ rtl8169_set_rx_tx_config_registers(tp);
++ }
++
+ RTL_W8(Cfg9346, Cfg9346_Lock);
+- udelay(10);
++
++ /* Initially a 10 us delay. Turned it into a PCI commit. - FR */
++ RTL_R8(IntrMask);
+
+ RTL_W32(RxMissed, 0);
+
+@@ -1910,17 +2005,18 @@ static inline void rtl8169_map_to_asic(s
+ }
+
+ static int rtl8169_alloc_rx_skb(struct pci_dev *pdev, struct sk_buff **sk_buff,
+- struct RxDesc *desc, int rx_buf_sz)
++ struct RxDesc *desc, int rx_buf_sz,
++ unsigned int align)
+ {
+ struct sk_buff *skb;
+ dma_addr_t mapping;
+ int ret = 0;
+
+- skb = dev_alloc_skb(rx_buf_sz + NET_IP_ALIGN);
++ skb = dev_alloc_skb(rx_buf_sz + align);
+ if (!skb)
+ goto err_out;
+
+- skb_reserve(skb, NET_IP_ALIGN);
++ skb_reserve(skb, (align - 1) & (u32)skb->data);
+ *sk_buff = skb;
+
+ mapping = pci_map_single(pdev, skb->data, rx_buf_sz,
+@@ -1953,15 +2049,15 @@ static u32 rtl8169_rx_fill(struct rtl816
+ u32 start, u32 end)
+ {
+ u32 cur;
+-
++
+ for (cur = start; end - cur > 0; cur++) {
+ int ret, i = cur % NUM_RX_DESC;
+
+ if (tp->Rx_skbuff[i])
+ continue;
+-
++
+ ret = rtl8169_alloc_rx_skb(tp->pci_dev, tp->Rx_skbuff + i,
+- tp->RxDescArray + i, tp->rx_buf_sz);
++ tp->RxDescArray + i, tp->rx_buf_sz, tp->align);
+ if (ret < 0)
+ break;
+ }
+@@ -2190,8 +2286,8 @@ static int rtl8169_start_xmit(struct sk_
+ dma_addr_t mapping;
+ u32 status, len;
+ u32 opts1;
+- int ret = 0;
+-
++ int ret = NETDEV_TX_OK;
++
+ if (unlikely(TX_BUFFS_AVAIL(tp) < skb_shinfo(skb)->nr_frags)) {
+ if (netif_msg_drv(tp)) {
+ printk(KERN_ERR
+@@ -2255,7 +2351,7 @@ out:
+
+ err_stop:
+ netif_stop_queue(dev);
+- ret = 1;
++ ret = NETDEV_TX_BUSY;
+ err_update_stats:
+ tp->stats.tx_dropped++;
+ goto out;
+@@ -2280,12 +2376,17 @@ static void rtl8169_pcierr_interrupt(str
+ /*
+ * The recovery sequence below admits a very elaborated explanation:
+ * - it seems to work;
+- * - I did not see what else could be done.
++ * - I did not see what else could be done;
++ * - it makes iop3xx happy.
+ *
+ * Feel free to adjust to your needs.
+ */
+- pci_write_config_word(pdev, PCI_COMMAND,
+- pci_cmd | PCI_COMMAND_SERR | PCI_COMMAND_PARITY);
++ if (pdev->broken_parity_status)
++ pci_cmd &= ~PCI_COMMAND_PARITY;
++ else
++ pci_cmd |= PCI_COMMAND_SERR | PCI_COMMAND_PARITY;
++
++ pci_write_config_word(pdev, PCI_COMMAND, pci_cmd);
+
+ pci_write_config_word(pdev, PCI_STATUS,
+ pci_status & (PCI_STATUS_DETECTED_PARITY |
+@@ -2299,10 +2400,11 @@ static void rtl8169_pcierr_interrupt(str
+ tp->cp_cmd &= ~PCIDAC;
+ RTL_W16(CPlusCmd, tp->cp_cmd);
+ dev->features &= ~NETIF_F_HIGHDMA;
+- rtl8169_schedule_work(dev, rtl8169_reinit_task);
+ }
+
+ rtl8169_hw_reset(ioaddr);
++
++ rtl8169_schedule_work(dev, rtl8169_reinit_task);
+ }
+
+ static void
+@@ -2372,16 +2474,17 @@ static inline void rtl8169_rx_csum(struc
+ }
+
+ static inline int rtl8169_try_rx_copy(struct sk_buff **sk_buff, int pkt_size,
+- struct RxDesc *desc, int rx_buf_sz)
++ struct RxDesc *desc, int rx_buf_sz,
++ unsigned int align)
+ {
+ int ret = -1;
+
+ if (pkt_size < rx_copybreak) {
+ struct sk_buff *skb;
+
+- skb = dev_alloc_skb(pkt_size + NET_IP_ALIGN);
++ skb = dev_alloc_skb(pkt_size + align);
+ if (skb) {
+- skb_reserve(skb, NET_IP_ALIGN);
++ skb_reserve(skb, (align - 1) & (u32)skb->data);
+ eth_copy_and_sum(skb, sk_buff[0]->data, pkt_size, 0);
+ *sk_buff = skb;
+ rtl8169_mark_to_asic(desc, rx_buf_sz);
+@@ -2427,6 +2530,10 @@ rtl8169_rx_interrupt(struct net_device *
+ tp->stats.rx_length_errors++;
+ if (status & RxCRC)
+ tp->stats.rx_crc_errors++;
++ if (status & RxFOVF) {
++ rtl8169_schedule_work(dev, rtl8169_reset_task);
++ tp->stats.rx_fifo_errors++;
++ }
+ rtl8169_mark_to_asic(desc, tp->rx_buf_sz);
+ } else {
+ struct sk_buff *skb = tp->Rx_skbuff[entry];
+@@ -2447,13 +2554,13 @@ rtl8169_rx_interrupt(struct net_device *
+ }
+
+ rtl8169_rx_csum(skb, desc);
+-
++
+ pci_dma_sync_single_for_cpu(tp->pci_dev,
+ le64_to_cpu(desc->addr), tp->rx_buf_sz,
+ PCI_DMA_FROMDEVICE);
+
+ if (rtl8169_try_rx_copy(&skb, pkt_size, desc,
+- tp->rx_buf_sz)) {
++ tp->rx_buf_sz, tp->align)) {
+ pci_action = pci_unmap_single;
+ tp->Rx_skbuff[entry] = NULL;
+ }
+@@ -2543,7 +2650,7 @@ rtl8169_interrupt(int irq, void *dev_ins
+ __netif_rx_schedule(dev);
+ else if (netif_msg_intr(tp)) {
+ printk(KERN_INFO "%s: interrupt %04x taken in poll\n",
+- dev->name, status);
++ dev->name, status);
+ }
+ break;
+ #else
+@@ -2606,6 +2713,7 @@ static void rtl8169_down(struct net_devi
+ struct rtl8169_private *tp = netdev_priv(dev);
+ void __iomem *ioaddr = tp->mmio_addr;
+ unsigned int poll_locked = 0;
++ unsigned int intrmask;
+
+ rtl8169_delete_timer(dev);
+
+@@ -2644,8 +2752,11 @@ core_down:
+ * 2) dev->change_mtu
+ * -> rtl8169_poll can not be issued again and re-enable the
+ * interruptions. Let's simply issue the IRQ down sequence again.
++ *
++ * No loop if hotpluged or major error (0xffff).
+ */
+- if (RTL_R16(IntrMask))
++ intrmask = RTL_R16(IntrMask);
++ if (intrmask && (intrmask != 0xffff))
+ goto core_down;
+
+ rtl8169_tx_clear(tp);
+@@ -2716,6 +2827,15 @@ rtl8169_set_rx_mode(struct net_device *d
+ tmp = rtl8169_rx_config | rx_mode |
+ (RTL_R32(RxConfig) & rtl_chip_info[tp->chipset].RxConfigMask);
+
++ if ((tp->mac_version == RTL_GIGA_MAC_VER_11) ||
++ (tp->mac_version == RTL_GIGA_MAC_VER_12) ||
++ (tp->mac_version == RTL_GIGA_MAC_VER_13) ||
++ (tp->mac_version == RTL_GIGA_MAC_VER_14) ||
++ (tp->mac_version == RTL_GIGA_MAC_VER_15)) {
++ mc_filter[0] = 0xffffffff;
++ mc_filter[1] = 0xffffffff;
++ }
++
+ RTL_W32(RxConfig, tmp);
+ RTL_W32(MAR0 + 0, mc_filter[0]);
+ RTL_W32(MAR0 + 4, mc_filter[1]);
+@@ -2741,7 +2861,7 @@ static struct net_device_stats *rtl8169_
+ RTL_W32(RxMissed, 0);
+ spin_unlock_irqrestore(&tp->lock, flags);
+ }
+-
++
+ return &tp->stats;
+ }
+
+@@ -2809,7 +2929,7 @@ static struct pci_driver rtl8169_pci_dri
+ static int __init
+ rtl8169_init_module(void)
+ {
+- return pci_module_init(&rtl8169_pci_driver);
++ return pci_register_driver(&rtl8169_pci_driver);
+ }
+
+ static void __exit
+diff -rpuN linux-2.6.18.8/drivers/oprofile/buffer_sync.c linux-2.6.18-xen-3.2.0/drivers/oprofile/buffer_sync.c
+--- linux-2.6.18.8/drivers/oprofile/buffer_sync.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/oprofile/buffer_sync.c 2008-02-15 16:22:00.000000000 -0800
@@ -6,6 +6,10 @@
*
* @author John Levon <levon@movementarian.org>
@@ -49817,9 +76411,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/buffer_sync.c tmp-linux-2.6-xe
mark_done(cpu);
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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/oprofile/cpu_buffer.c linux-2.6.18-xen-3.2.0/drivers/oprofile/cpu_buffer.c
+--- linux-2.6.18.8/drivers/oprofile/cpu_buffer.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/oprofile/cpu_buffer.c 2008-02-15 16:22:00.000000000 -0800
@@ -6,6 +6,10 @@
*
* @author John Levon <levon@movementarian.org>
@@ -49928,9 +76522,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/cpu_buffer.c tmp-linux-2.6-xen
/*
* This serves to avoid cpu buffer overflow, and makes sure
* 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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/oprofile/cpu_buffer.h linux-2.6.18-xen-3.2.0/drivers/oprofile/cpu_buffer.h
+--- linux-2.6.18.8/drivers/oprofile/cpu_buffer.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/oprofile/cpu_buffer.h 2008-02-15 16:22:00.000000000 -0800
@@ -36,7 +36,7 @@ struct oprofile_cpu_buffer {
volatile unsigned long tail_pos;
unsigned long buffer_size;
@@ -49953,9 +76547,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/cpu_buffer.h tmp-linux-2.6-xen
+#define CPU_DOMAIN_SWITCH 4
#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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/oprofile/event_buffer.h linux-2.6.18-xen-3.2.0/drivers/oprofile/event_buffer.h
+--- linux-2.6.18.8/drivers/oprofile/event_buffer.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/oprofile/event_buffer.h 2008-02-15 16:22:00.000000000 -0800
@@ -29,15 +29,20 @@ void wake_up_buffer_waiter(void);
#define CPU_SWITCH_CODE 2
#define COOKIE_SWITCH_CODE 3
@@ -49978,9 +76572,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/event_buffer.h tmp-linux-2.6-x
/* add data to the event buffer */
void add_event_entry(unsigned long data);
-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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/oprofile/oprof.c linux-2.6.18-xen-3.2.0/drivers/oprofile/oprof.c
+--- linux-2.6.18.8/drivers/oprofile/oprof.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/oprofile/oprof.c 2008-02-15 16:22:00.000000000 -0800
@@ -5,6 +5,10 @@
* @remark Read the file COPYING
*
@@ -50034,9 +76628,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/oprof.c tmp-linux-2.6-xen.patc
int oprofile_setup(void)
{
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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/oprofile/oprof.h linux-2.6.18-xen-3.2.0/drivers/oprofile/oprof.h
+--- linux-2.6.18.8/drivers/oprofile/oprof.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/oprofile/oprof.h 2008-02-15 16:22:00.000000000 -0800
@@ -35,5 +35,8 @@ void oprofile_create_files(struct super_
void oprofile_timer_init(struct oprofile_operations * ops);
@@ -50046,9 +76640,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/oprof.h tmp-linux-2.6-xen.patc
+int oprofile_set_passive(int passive_domains[], unsigned int pdomains);
#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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/oprofile/oprofile_files.c linux-2.6.18-xen-3.2.0/drivers/oprofile/oprofile_files.c
+--- linux-2.6.18.8/drivers/oprofile/oprofile_files.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/oprofile/oprofile_files.c 2008-02-15 16:22:00.000000000 -0800
@@ -5,15 +5,21 @@
* @remark Read the file COPYING
*
@@ -50276,9 +76870,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/oprofile/oprofile_files.c tmp-linux-2.6
oprofilefs_create_file(sb, root, "buffer", &event_buffer_fops);
oprofilefs_create_ulong(sb, root, "buffer_size", &fs_buffer_size);
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/pci/Kconfig linux-2.6.18-xen-3.2.0/drivers/pci/Kconfig
+--- linux-2.6.18.8/drivers/pci/Kconfig 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/pci/Kconfig 2008-02-15 16:22:00.000000000 -0800
@@ -5,6 +5,7 @@ config PCI_MSI
bool "Message Signaled Interrupts (MSI and MSI-X)"
depends on PCI
@@ -50287,9 +76881,269 @@ diff -Nurp pristine-linux-2.6.18/drivers/pci/Kconfig tmp-linux-2.6-xen.patch/dri
help
This allows device drivers to enable MSI (Message Signaled
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/pci/bus.c linux-2.6.18-xen-3.2.0/drivers/pci/bus.c
+--- linux-2.6.18.8/drivers/pci/bus.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/pci/bus.c 2008-02-15 16:22:00.000000000 -0800
+@@ -17,6 +17,8 @@
+
+ #include "pci.h"
+
++extern int pci_mem_align;
++
+ /**
+ * pci_bus_alloc_resource - allocate a resource from a parent bus
+ * @bus: PCI bus
+@@ -44,6 +46,11 @@ pci_bus_alloc_resource(struct pci_bus *b
+
+ type_mask |= IORESOURCE_IO | IORESOURCE_MEM;
+
++ /* If the boot parameter 'pci-mem-align' was specified then we need to
++ align the memory addresses, at page size alignment. */
++ if (pci_mem_align && (align < (PAGE_SIZE-1)))
++ align = PAGE_SIZE - 1;
++
+ for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
+ struct resource *r = bus->resource[i];
+ if (!r)
+diff -rpuN linux-2.6.18.8/drivers/pci/quirks.c linux-2.6.18-xen-3.2.0/drivers/pci/quirks.c
+--- linux-2.6.18.8/drivers/pci/quirks.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/pci/quirks.c 2008-02-15 16:22:01.000000000 -0800
+@@ -23,6 +23,40 @@
+ #include <linux/acpi.h>
+ #include "pci.h"
+
++/* A global flag which signals if we should page-align PCI mem windows. */
++int pci_mem_align = 0;
++
++static int __init set_pci_mem_align(char *str)
++{
++ pci_mem_align = 1;
++ return 1;
++}
++__setup("pci-mem-align", set_pci_mem_align);
++
++/* This quirk function enables us to force all memory resources which are
++ * assigned to PCI devices, to be page-aligned.
++ */
++static void __devinit quirk_align_mem_resources(struct pci_dev *dev)
++{
++ int i;
++ struct resource *r;
++ resource_size_t old_start;
++
++ if (!pci_mem_align)
++ return;
++
++ for (i=0; i < DEVICE_COUNT_RESOURCE; i++) {
++ r = &dev->resource[i];
++ if ((r == NULL) || !(r->flags & IORESOURCE_MEM))
++ continue;
++
++ old_start = r->start;
++ r->start = (r->start + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
++ r->end = r->end - (old_start - r->start);
++ }
++}
++DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_align_mem_resources);
++
+ /* The Mellanox Tavor device gives false positive parity errors
+ * Mark this device with a broken_parity_status, to allow
+ * PCI scanning code to "skip" this now blacklisted device.
+diff -rpuN linux-2.6.18.8/drivers/pnp/manager.c linux-2.6.18-xen-3.2.0/drivers/pnp/manager.c
+--- linux-2.6.18.8/drivers/pnp/manager.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/pnp/manager.c 2008-02-15 16:22:01.000000000 -0800
+@@ -168,7 +168,7 @@ static int pnp_assign_irq(struct pnp_dev
+ return 0;
+ }
+
+-static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx)
++static void pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx)
+ {
+ resource_size_t *start, *end;
+ unsigned long *flags;
+@@ -179,18 +179,14 @@ static int pnp_assign_dma(struct pnp_dev
+ 1, 3, 5, 6, 7, 0, 2, 4
+ };
+
+- if (!dev || !rule)
+- return -EINVAL;
+-
+ if (idx >= PNP_MAX_DMA) {
+ pnp_err("More than 2 dmas is incompatible with pnp specifications.");
+- /* pretend we were successful so at least the manager won't try again */
+- return 1;
++ return;
+ }
+
+ /* check if this resource has been manually set, if so skip */
+ if (!(dev->res.dma_resource[idx].flags & IORESOURCE_AUTO))
+- return 1;
++ return;
+
+ start = &dev->res.dma_resource[idx].start;
+ end = &dev->res.dma_resource[idx].end;
+@@ -200,19 +196,17 @@ static int pnp_assign_dma(struct pnp_dev
+ *flags |= rule->flags | IORESOURCE_DMA;
+ *flags &= ~IORESOURCE_UNSET;
+
+- if (!rule->map) {
+- *flags |= IORESOURCE_DISABLED;
+- return 1; /* skip disabled resource requests */
+- }
+-
+ for (i = 0; i < 8; i++) {
+ if(rule->map & (1<<xtab[i])) {
+ *start = *end = xtab[i];
+ if(pnp_check_dma(dev, idx))
+- return 1;
++ return;
+ }
+ }
+- return 0;
++#ifdef MAX_DMA_CHANNELS
++ *start = *end = MAX_DMA_CHANNELS;
++#endif
++ *flags |= IORESOURCE_UNSET | IORESOURCE_DISABLED;
+ }
+
+ /**
+@@ -331,8 +325,7 @@ static int pnp_assign_resources(struct p
+ irq = irq->next;
+ }
+ while (dma) {
+- if (!pnp_assign_dma(dev, dma, ndma))
+- goto fail;
++ pnp_assign_dma(dev, dma, ndma);
+ ndma++;
+ dma = dma->next;
+ }
+@@ -367,8 +360,7 @@ static int pnp_assign_resources(struct p
+ irq = irq->next;
+ }
+ while (dma) {
+- if (!pnp_assign_dma(dev, dma, ndma))
+- goto fail;
++ pnp_assign_dma(dev, dma, ndma);
+ ndma++;
+ dma = dma->next;
+ }
+diff -rpuN linux-2.6.18.8/drivers/scsi/ahci.c linux-2.6.18-xen-3.2.0/drivers/scsi/ahci.c
+--- linux-2.6.18.8/drivers/scsi/ahci.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/scsi/ahci.c 2008-02-15 16:22:04.000000000 -0800
+@@ -317,6 +317,28 @@ static const struct pci_device_id ahci_p
+ board_ahci }, /* ICH8M */
+ { PCI_VENDOR_ID_INTEL, 0x282a, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci }, /* ICH8M */
++ { PCI_VENDOR_ID_INTEL, 0x2922, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
++ board_ahci }, /* ICH9 */
++ { PCI_VENDOR_ID_INTEL, 0x2923, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
++ board_ahci }, /* ICH9 */
++ { PCI_VENDOR_ID_INTEL, 0x2924, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
++ board_ahci }, /* ICH9 */
++ { PCI_VENDOR_ID_INTEL, 0x2925, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
++ board_ahci }, /* ICH9 */
++ { PCI_VENDOR_ID_INTEL, 0x2927, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
++ board_ahci }, /* ICH9 */
++ { PCI_VENDOR_ID_INTEL, 0x2929, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
++ board_ahci }, /* ICH9M */
++ { PCI_VENDOR_ID_INTEL, 0x292a, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
++ board_ahci }, /* ICH9M */
++ { PCI_VENDOR_ID_INTEL, 0x292b, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
++ board_ahci }, /* ICH9M */
++ { PCI_VENDOR_ID_INTEL, 0x292f, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
++ board_ahci }, /* ICH9M */
++ { PCI_VENDOR_ID_INTEL, 0x294d, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
++ board_ahci }, /* ICH9 */
++ { PCI_VENDOR_ID_INTEL, 0x294e, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
++ board_ahci }, /* ICH9M */
+
+ /* JMicron */
+ { 0x197b, 0x2360, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+diff -rpuN linux-2.6.18.8/drivers/scsi/ata_piix.c linux-2.6.18-xen-3.2.0/drivers/scsi/ata_piix.c
+--- linux-2.6.18.8/drivers/scsi/ata_piix.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/scsi/ata_piix.c 2008-02-15 16:22:04.000000000 -0800
+@@ -125,6 +125,7 @@ enum {
+ ich6m_sata_ahci = 6,
+ ich7m_sata_ahci = 7,
+ ich8_sata_ahci = 8,
++ ich9_sata_ahci = 9,
+
+ /* constants for mapping table */
+ P0 = 0, /* port 0 */
+@@ -198,6 +199,18 @@ static const struct pci_device_id piix_p
+ { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
+ /* Mobile SATA Controller IDE (ICH8M, ditto) */
+ { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
++ /* SATA Controller 1 IDE (ICH9) */
++ { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_sata_ahci },
++ /* SATA Controller 1 IDE (ICH9) */
++ { 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_sata_ahci },
++ /* SATA Controller 2 IDE (ICH9) */
++ { 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_sata_ahci },
++ /* Mobile SATA Controller 1 IDE (ICH9M) */
++ { 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_sata_ahci },
++ /* Mobile SATA Controller 2 IDE (ICH9M) */
++ { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_sata_ahci },
++ /* Mobile SATA Controller 2 IDE (ICH9M) */
++ { 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_sata_ahci },
+
+ { } /* terminate list */
+ };
+@@ -361,9 +374,22 @@ static const struct piix_map_db ich8_map
+ .present_shift = 8,
+ .map = {
+ /* PM PS SM SS MAP */
+- { P0, NA, P1, NA }, /* 00b (hardwired) */
++ { P0, P2, P1, P3 }, /* 00b (hardwired when in AHCI) */
+ { RV, RV, RV, RV },
+- { RV, RV, RV, RV }, /* 10b (never) */
++ { IDE, IDE, NA, NA }, /* 10b (IDE mode) */
++ { RV, RV, RV, RV },
++ },
++};
++
++static const struct piix_map_db ich9_map_db = {
++ .mask = 0x3,
++ .port_enable = 0x3,
++ .present_shift = 8,
++ .map = {
++ /* PM PS SM SS MAP */
++ { P0, P2, P1, P3 }, /* 00b (hardwired when in AHCI) */
++ { RV, RV, RV, RV },
++ { IDE, IDE, NA, NA }, /* 10b (IDE mode) */
+ { RV, RV, RV, RV },
+ },
+ };
+@@ -376,6 +402,7 @@ static const struct piix_map_db *piix_ma
+ [ich6m_sata_ahci] = &ich6m_map_db,
+ [ich7m_sata_ahci] = &ich7m_map_db,
+ [ich8_sata_ahci] = &ich8_map_db,
++ [ich9_sata_ahci] = &ich9_map_db,
+ };
+
+ static struct ata_port_info piix_port_info[] = {
+@@ -487,6 +514,18 @@ static struct ata_port_info piix_port_in
+ .udma_mask = 0x7f, /* udma0-6 */
+ .port_ops = &piix_sata_ops,
+ },
++
++ /* ich9_sata_ahci */
++ {
++ .sht = &piix_sht,
++ .host_flags = ATA_FLAG_SATA |
++ PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR |
++ PIIX_FLAG_AHCI,
++ .pio_mask = 0x1f, /* pio0-4 */
++ .mwdma_mask = 0x07, /* mwdma0-2 */
++ .udma_mask = 0x7f, /* udma0-6 */
++ .port_ops = &piix_sata_ops,
++ },
+ };
+
+ static struct pci_bits piix_enable_bits[] = {
+diff -rpuN linux-2.6.18.8/drivers/serial/Kconfig linux-2.6.18-xen-3.2.0/drivers/serial/Kconfig
+--- linux-2.6.18.8/drivers/serial/Kconfig 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/serial/Kconfig 2008-02-15 16:22:05.000000000 -0800
@@ -11,6 +11,7 @@ menu "Serial drivers"
config SERIAL_8250
tristate "8250/16550 and compatible serial support"
@@ -50298,9 +77152,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/serial/Kconfig tmp-linux-2.6-xen.patch/
select SERIAL_CORE
---help---
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/video/console/Kconfig linux-2.6.18-xen-3.2.0/drivers/video/console/Kconfig
+--- linux-2.6.18.8/drivers/video/console/Kconfig 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/video/console/Kconfig 2008-02-15 16:22:05.000000000 -0800
@@ -53,6 +53,7 @@ config VGACON_SOFT_SCROLLBACK_SIZE
config VIDEO_SELECT
bool "Video mode selection support"
@@ -50309,10 +77163,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/video/console/Kconfig tmp-linux-2.6-xen
---help---
This enables support for text mode selection on kernel startup. If
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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,277 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/Kconfig linux-2.6.18-xen-3.2.0/drivers/xen/Kconfig
+--- linux-2.6.18.8/drivers/xen/Kconfig 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/Kconfig 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,282 @@
+#
+# This Kconfig describe xen options
+#
@@ -50321,41 +77175,33 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+
+config XEN
+ bool
-+ default y if X86_XEN || X86_64_XEN
-+ help
-+ This is the Linux Xen port.
+
+if XEN
+config XEN_INTERFACE_VERSION
+ hex
-+ default 0x00030205
++ default 0x00030207
+
+menu "XEN"
+
+config XEN_PRIVILEGED_GUEST
+ bool "Privileged Guest (domain 0)"
-+ depends XEN
-+ default n
+ help
+ Support for privileged operation (domain 0)
+
+config XEN_UNPRIVILEGED_GUEST
-+ bool
-+ default !XEN_PRIVILEGED_GUEST
++ def_bool !XEN_PRIVILEGED_GUEST
+
+config XEN_PRIVCMD
-+ bool
++ def_bool y
+ depends on PROC_FS
-+ default y
+
+config XEN_XENBUS_DEV
-+ bool
++ def_bool y
+ depends on PROC_FS
-+ default y
+
+config XEN_BACKEND
+ tristate "Backend driver support"
-+ default y
++ default XEN_PRIVILEGED_GUEST
+ help
+ Support for backend device drivers that provide I/O services
+ to other virtual machines.
@@ -50363,7 +77209,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+config XEN_BLKDEV_BACKEND
+ tristate "Block-device backend driver"
+ depends on XEN_BACKEND
-+ default y
++ default XEN_BACKEND
+ help
+ The block-device backend driver allows the kernel to export its
+ block devices to other guests via a high-performance shared-memory
@@ -50372,7 +77218,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+config XEN_BLKDEV_TAP
+ tristate "Block-device tap backend driver"
+ depends on XEN_BACKEND
-+ default XEN_PRIVILEGED_GUEST
++ default XEN_BACKEND
+ help
+ The block tap driver is an alternative to the block back driver
+ and allows VM block requests to be redirected to userspace through
@@ -50384,7 +77230,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+config XEN_NETDEV_BACKEND
+ tristate "Network-device backend driver"
+ depends on XEN_BACKEND && NET
-+ default y
++ default XEN_BACKEND
+ help
+ The network-device backend driver allows the kernel to export its
+ network devices to other guests via a high-performance shared-memory
@@ -50393,7 +77239,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+config XEN_NETDEV_PIPELINED_TRANSMITTER
+ bool "Pipelined transmitter (DANGEROUS)"
+ depends on XEN_NETDEV_BACKEND
-+ default n
+ help
+ If the net backend is a dumb domain, such as a transparent Ethernet
+ bridge with no local IP interface, it is safe to say Y here to get
@@ -50406,15 +77251,14 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+config XEN_NETDEV_LOOPBACK
+ tristate "Network-device loopback driver"
+ depends on XEN_NETDEV_BACKEND
-+ default y
+ help
+ A two-interface loopback device to emulate a local netfront-netback
-+ connection.
++ connection. If unsure, it is probably safe to say N here.
+
+config XEN_PCIDEV_BACKEND
+ tristate "PCI-device backend driver"
+ depends on PCI && XEN_BACKEND
-+ default XEN_PRIVILEGED_GUEST
++ default XEN_BACKEND
+ help
+ The PCI device backend driver allows the kernel to export arbitrary
+ PCI devices to other guests. If you select this to be a module, you
@@ -50474,18 +77318,15 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+config XEN_PCIDEV_BE_DEBUG
+ bool "PCI Backend Debugging"
+ depends on XEN_PCIDEV_BACKEND
-+ default n
+
+config XEN_TPMDEV_BACKEND
+ tristate "TPM-device backend driver"
+ depends on XEN_BACKEND
-+ default n
+ help
+ The TPM-device backend driver
+
+config XEN_BLKDEV_FRONTEND
+ tristate "Block-device frontend driver"
-+ depends on XEN
+ default y
+ help
+ The block-device frontend driver allows the kernel to access block
@@ -50495,7 +77336,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+
+config XEN_NETDEV_FRONTEND
+ tristate "Network-device frontend driver"
-+ depends on XEN && NET
++ depends on NET
+ default y
+ help
+ The network-device frontend driver allows the kernel to access
@@ -50503,9 +77344,16 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+ dedicated device-driver domain, or your master control domain
+ (domain 0), then you almost certainly want to say Y here.
+
++config XEN_GRANT_DEV
++ tristate "User-space granted page access driver"
++ default XEN_PRIVILEGED_GUEST
++ help
++ Device for accessing (in user-space) pages that have been granted
++ by other domains.
++
+config XEN_FRAMEBUFFER
+ tristate "Framebuffer-device frontend driver"
-+ depends on XEN && FB
++ depends on FB
+ select FB_CFB_FILLRECT
+ select FB_CFB_COPYAREA
+ select FB_CFB_IMAGEBLIT
@@ -50518,7 +77366,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+
+config XEN_KEYBOARD
+ tristate "Keyboard-device frontend driver"
-+ depends on XEN && XEN_FRAMEBUFFER && INPUT
++ depends on XEN_FRAMEBUFFER && INPUT
+ default y
+ help
+ The keyboard-device frontend driver allows the kernel to create a
@@ -50562,6 +77410,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+ config XEN_COMPAT_030004_AND_LATER
+ bool "3.0.4 and later"
+
++ config XEN_COMPAT_030100_AND_LATER
++ bool "3.1.0 and later"
++
+ config XEN_COMPAT_LATEST_ONLY
+ bool "no compatibility code"
+
@@ -50570,6 +77421,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+config XEN_COMPAT
+ hex
+ default 0xffffff if XEN_COMPAT_LATEST_ONLY
++ default 0x030100 if XEN_COMPAT_030100_AND_LATER
+ default 0x030004 if XEN_COMPAT_030004_AND_LATER
+ default 0x030002 if XEN_COMPAT_030002_AND_LATER
+ default 0
@@ -50577,33 +77429,38 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Kconfig tmp-linux-2.6-xen.patch/dri
+endmenu
+
+config HAVE_IRQ_IGNORE_UNHANDLED
-+ bool
-+ default y
++ def_bool y
+
+config NO_IDLE_HZ
-+ bool
-+ default y
++ def_bool y
+
+config XEN_SMPBOOT
++ def_bool y
++ depends on SMP && !PPC_XEN
++
++config XEN_BALLOON
++ def_bool y
++ depends on !PPC_XEN
++
++config XEN_XENCOMM
+ bool
-+ default y
-+ depends on SMP
++
++config XEN_DEVMEM
++ def_bool y
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/Makefile
+--- linux-2.6.18.8/drivers/xen/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,20 @@
+obj-y += core/
+obj-y += console/
+obj-y += evtchn/
-+obj-y += privcmd/
+obj-y += xenbus/
-+obj-y += gntdev/
-+obj-y += balloon/
+obj-y += char/
+
+obj-y += util.o
++obj-$(CONFIG_XEN_BALLOON) += balloon/
+obj-$(CONFIG_XEN_BLKDEV_BACKEND) += blkback/
+obj-$(CONFIG_XEN_BLKDEV_TAP) += blktap/
+obj-$(CONFIG_XEN_NETDEV_BACKEND) += netback/
@@ -50614,16 +77471,18 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/Makefile tmp-linux-2.6-xen.patch/dr
+obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += pcifront/
+obj-$(CONFIG_XEN_FRAMEBUFFER) += fbfront/
+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-11-14 15:35:27.000000000 -0800
++obj-$(CONFIG_XEN_PRIVCMD) += privcmd/
++obj-$(CONFIG_XEN_GRANT_DEV) += gntdev/
+diff -rpuN linux-2.6.18.8/drivers/xen/balloon/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/balloon/Makefile
+--- linux-2.6.18.8/drivers/xen/balloon/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/balloon/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,663 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/balloon/balloon.c linux-2.6.18-xen-3.2.0/drivers/xen/balloon/balloon.c
+--- linux-2.6.18.8/drivers/xen/balloon/balloon.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/balloon/balloon.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,687 @@
+/******************************************************************************
+ * balloon.c
+ *
@@ -50710,6 +77569,15 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen
+/* VM /proc information for memory */
+extern unsigned long totalram_pages;
+
++#ifndef MODULE
++extern unsigned long totalhigh_pages;
++#define inc_totalhigh_pages() (totalhigh_pages++)
++#define dec_totalhigh_pages() (totalhigh_pages--)
++#else
++#define inc_totalhigh_pages() ((void)0)
++#define dec_totalhigh_pages() ((void)0)
++#endif
++
+/* List of ballooned pages, threaded through the mem_map array. */
+static LIST_HEAD(ballooned_pages);
+
@@ -50721,7 +77589,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen
+/* When ballooning out (allocating memory to return to Xen) we don't really
+ want the kernel to try too hard since that can trigger the oom killer. */
+#define GFP_BALLOON \
-+ (GFP_HIGHUSER | __GFP_NOWARN | __GFP_NORETRY | __GFP_NOMEMALLOC)
++ (GFP_HIGHUSER|__GFP_NOWARN|__GFP_NORETRY|__GFP_NOMEMALLOC|__GFP_COLD)
+
+#define PAGE_TO_LIST(p) (&(p)->lru)
+#define LIST_TO_PAGE(l) list_entry((l), struct page, lru)
@@ -50744,6 +77612,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen
+ if (PageHighMem(page)) {
+ list_add_tail(PAGE_TO_LIST(page), &ballooned_pages);
+ bs.balloon_high++;
++ dec_totalhigh_pages();
+ } else {
+ list_add(PAGE_TO_LIST(page), &ballooned_pages);
+ bs.balloon_low++;
@@ -50761,8 +77630,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen
+ page = LIST_TO_PAGE(ballooned_pages.next);
+ UNLIST_PAGE(page);
+
-+ if (PageHighMem(page))
++ if (PageHighMem(page)) {
+ bs.balloon_high--;
++ inc_totalhigh_pages();
++ }
+ else
+ bs.balloon_low--;
+
@@ -50784,6 +77655,17 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen
+ return LIST_TO_PAGE(next);
+}
+
++static inline void balloon_free_page(struct page *page)
++{
++#ifndef MODULE
++ if (put_page_testzero(page))
++ free_cold_page(page);
++#else
++ /* free_cold_page() is not being exported. */
++ __free_page(page);
++#endif
++}
++
+static void balloon_alarm(unsigned long unused)
+{
+ schedule_work(&balloon_worker);
@@ -50865,7 +77747,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen
+ /* Relinquish the page back to the allocator. */
+ ClearPageReserved(page);
+ init_page_count(page);
-+ __free_page(page);
++ balloon_free_page(page);
+ }
+
+ bs.current_pages += nr_pages;
@@ -51141,7 +78023,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen
+
+subsys_initcall(balloon_init);
+
-+static void balloon_exit(void)
++static void __exit balloon_exit(void)
+{
+ /* XXX - release balloon here */
+ return;
@@ -51180,7 +78062,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen
+
+struct page **alloc_empty_pages_and_pagevec(int nr_pages)
+{
-+ unsigned long vaddr, flags;
++ unsigned long flags;
++ void *v;
+ struct page *page, **pagevec;
+ int i, ret;
+
@@ -51189,13 +78072,12 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen
+ return NULL;
+
+ for (i = 0; i < nr_pages; i++) {
-+ page = pagevec[i] = alloc_page(GFP_KERNEL);
++ page = pagevec[i] = alloc_page(GFP_KERNEL|__GFP_COLD);
+ if (page == NULL)
+ goto err;
+
-+ vaddr = (unsigned long)page_address(page);
-+
-+ scrub_pages(vaddr, 1);
++ v = page_address(page);
++ scrub_pages(v, 1);
+
+ balloon_lock(flags);
+
@@ -51213,8 +78095,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen
+ ret = 0; /* success */
+ } else {
+#ifdef CONFIG_XEN
-+ ret = apply_to_page_range(&init_mm, vaddr, PAGE_SIZE,
-+ dealloc_pte_fn, NULL);
++ ret = apply_to_page_range(&init_mm, (unsigned long)v,
++ PAGE_SIZE, dealloc_pte_fn,
++ NULL);
+#else
+ /* Cannot handle non-auto translate mode. */
+ ret = 1;
@@ -51223,7 +78106,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen
+
+ if (ret != 0) {
+ balloon_unlock(flags);
-+ __free_page(page);
++ balloon_free_page(page);
+ goto err;
+ }
+
@@ -51287,9 +78170,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen
+EXPORT_SYMBOL_GPL(balloon_release_driver_page);
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/balloon/common.h linux-2.6.18-xen-3.2.0/drivers/xen/balloon/common.h
+--- linux-2.6.18.8/drivers/xen/balloon/common.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/balloon/common.h 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * balloon/common.h
@@ -51349,9 +78232,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/common.h tmp-linux-2.6-xen.
+void balloon_set_new_target(unsigned long target);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/balloon/sysfs.c linux-2.6.18-xen-3.2.0/drivers/xen/balloon/sysfs.c
+--- linux-2.6.18.8/drivers/xen/balloon/sysfs.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/balloon/sysfs.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,170 @@
+/******************************************************************************
+ * balloon/sysfs.c
@@ -51523,17 +78406,17 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/balloon/sysfs.c tmp-linux-2.6-xen.p
+{
+ unregister_balloon(&balloon_sysdev);
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/blkback/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/blkback/Makefile
+--- linux-2.6.18.8/drivers/xen/blkback/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blkback/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,617 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/blkback/blkback.c linux-2.6.18-xen-3.2.0/drivers/xen/blkback/blkback.c
+--- linux-2.6.18.8/drivers/xen/blkback/blkback.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blkback/blkback.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,643 @@
+/******************************************************************************
+ * arch/xen/drivers/blkif/backend/main.c
+ *
@@ -51574,6 +78457,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen
+#include <linux/spinlock.h>
+#include <linux/kthread.h>
+#include <linux/list.h>
++#include <linux/delay.h>
+#include <xen/balloon.h>
+#include <asm/hypervisor.h>
+#include "common.h"
@@ -51847,7 +78731,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen
+ rp = blk_rings->common.sring->req_prod;
+ rmb(); /* Ensure we see queued requests up to 'rp'. */
+
-+ while ((rc != rp)) {
++ while (rc != rp) {
+
+ if (RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rc))
+ break;
@@ -51859,6 +78743,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen
+ break;
+ }
+
++ if (kthread_should_stop()) {
++ more_to_do = 1;
++ break;
++ }
++
+ switch (blkif->blk_protocol) {
+ case BLKIF_PROTOCOL_NATIVE:
+ memcpy(&req, RING_GET_REQUEST(&blk_rings->native, rc), sizeof(req));
@@ -51887,6 +78776,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen
+ dispatch_rw_block_io(blkif, &req, pending_req);
+ break;
+ default:
++ /* A good sign something is wrong: sleep for a while to
++ * avoid excessive CPU consumption by a bad guest. */
++ msleep(1);
+ DPRINTK("error: unknown block io operation [%d]\n",
+ req.operation);
+ make_response(blkif, req.id, req.operation,
@@ -51894,7 +78786,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen
+ free_req(pending_req);
+ break;
+ }
++
++ /* Yield point for this unbounded loop. */
++ cond_resched();
+ }
++
+ return more_to_do;
+}
+
@@ -51930,7 +78826,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen
+
+ /* Check that number of segments is sane. */
+ nseg = req->nr_segments;
-+ if (unlikely(nseg == 0) ||
++ if (unlikely(nseg == 0 && operation != WRITE_BARRIER) ||
+ unlikely(nseg > BLKIF_MAX_SEGMENTS_PER_REQUEST)) {
+ DPRINTK("Bad number of segments in request (%d)\n", nseg);
+ goto fail_response;
@@ -52023,6 +78919,18 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen
+ preq.sector_number += seg[i].nsec;
+ }
+
++ if (!bio) {
++ BUG_ON(operation != WRITE_BARRIER);
++ bio = biolist[nbio++] = bio_alloc(GFP_KERNEL, 0);
++ if (unlikely(bio == NULL))
++ goto fail_put_bio;
++
++ bio->bi_bdev = preq.bdev;
++ bio->bi_private = pending_req;
++ bio->bi_end_io = end_block_io_op;
++ bio->bi_sector = -1;
++ }
++
+ plug_queue(blkif, bio);
+ atomic_set(&pending_req->pendcnt, nbio);
+ blkif_get(blkif);
@@ -52032,7 +78940,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen
+
+ if (operation == READ)
+ blkif->st_rd_sect += preq.nr_sects;
-+ else if (operation == WRITE)
++ else if (operation == WRITE || operation == WRITE_BARRIER)
+ blkif->st_wr_sect += preq.nr_sects;
+
+ return;
@@ -52045,6 +78953,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen
+ fail_response:
+ make_response(blkif, req->id, req->operation, BLKIF_RSP_ERROR);
+ free_req(pending_req);
++ msleep(1); /* back off a bit */
+}
+
+
@@ -52151,9 +79060,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen
+module_init(blkif_init);
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/blkback/common.h linux-2.6.18-xen-3.2.0/drivers/xen/blkback/common.h
+--- linux-2.6.18.8/drivers/xen/blkback/common.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blkback/common.h 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,139 @@
+/*
+ * This program is free software; you can redistribute it and/or
@@ -52294,9 +79203,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/common.h tmp-linux-2.6-xen.
+ struct backend_info *be, int state);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/blkback/interface.c linux-2.6.18-xen-3.2.0/drivers/xen/blkback/interface.c
+--- linux-2.6.18.8/drivers/xen/blkback/interface.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blkback/interface.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,181 @@
+/******************************************************************************
+ * arch/xen/drivers/blkif/backend/interface.c
@@ -52479,9 +79388,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/interface.c tmp-linux-2.6-x
+ blkif_cachep = kmem_cache_create("blkif_cache", sizeof(blkif_t),
+ 0, 0, NULL, NULL);
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/blkback/vbd.c linux-2.6.18-xen-3.2.0/drivers/xen/blkback/vbd.c
+--- linux-2.6.18.8/drivers/xen/blkback/vbd.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blkback/vbd.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,118 @@
+/******************************************************************************
+ * blkback/vbd.c
@@ -52601,9 +79510,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/vbd.c tmp-linux-2.6-xen.pat
+ out:
+ return rc;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/blkback/xenbus.c linux-2.6.18-xen-3.2.0/drivers/xen/blkback/xenbus.c
+--- linux-2.6.18.8/drivers/xen/blkback/xenbus.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blkback/xenbus.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,533 @@
+/* Xenbus code for blkif backend
+ Copyright (C) 2005 Rusty Russell <rusty@rustcorp.com.au>
@@ -53138,19 +80047,19 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkback/xenbus.c tmp-linux-2.6-xen.
+{
+ xenbus_register_backend(&blkback);
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/blkfront/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/blkfront/Makefile
+--- linux-2.6.18.8/drivers/xen/blkfront/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blkfront/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,5 @@
+
+obj-$(CONFIG_XEN_BLKDEV_FRONTEND) := xenblk.o
+
+xenblk-objs := blkfront.o vbd.o
+
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,912 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/blkfront/blkfront.c linux-2.6.18-xen-3.2.0/drivers/xen/blkfront/blkfront.c
+--- linux-2.6.18.8/drivers/xen/blkfront/blkfront.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blkfront/blkfront.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,920 @@
+/******************************************************************************
+ * blkfront.c
+ *
@@ -53372,7 +80281,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-x
+
+ info->ring_ref = GRANT_INVALID_REF;
+
-+ sring = (blkif_sring_t *)__get_free_page(GFP_KERNEL);
++ sring = (blkif_sring_t *)__get_free_page(GFP_KERNEL|__GFP_HIGH);
+ if (!sring) {
+ xenbus_dev_fatal(dev, -ENOMEM, "allocating shared ring");
+ return -ENOMEM;
@@ -53630,7 +80539,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-x
+ struct xenbus_device * dev = info->xbdev;
+ enum xenbus_state state = xenbus_read_driver_state(dev->otherend);
+
-+ if (state == XenbusStateClosing)
++ if (state == XenbusStateClosing && info->is_ready)
+ blkfront_closing(dev);
+ }
+ return 0;
@@ -53674,6 +80583,14 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-x
+ return -EFAULT;
+ return 0;
+
++ case CDROM_GET_CAPABILITY: {
++ struct blkfront_info *info =
++ inode->i_bdev->bd_disk->private_data;
++ struct gendisk *gd = info->gd;
++ if (gd->flags & GENHD_FL_CD)
++ return 0;
++ return -EINVAL;
++ }
+ default:
+ /*printk(KERN_ALERT "ioctl %08x not supported by Xen blkdev\n",
+ command);*/
@@ -53767,7 +80684,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-x
+ ref,
+ info->xbdev->otherend_id,
+ buffer_mfn,
-+ rq_data_dir(req) );
++ rq_data_dir(req) ? GTF_readonly : 0 );
+
+ info->shadow[id].frame[ring_req->nr_segments] =
+ mfn_to_pfn(buffer_mfn);
@@ -53935,7 +80852,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-x
+
+ /* Free resources associated with old device channel. */
+ if (info->ring_ref != GRANT_INVALID_REF) {
-+ gnttab_end_foreign_access(info->ring_ref, 0,
++ gnttab_end_foreign_access(info->ring_ref,
+ (unsigned long)info->ring.sring);
+ info->ring_ref = GRANT_INVALID_REF;
+ info->ring.sring = NULL;
@@ -53949,7 +80866,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-x
+{
+ int i;
+ for (i = 0; i < s->req.nr_segments; i++)
-+ gnttab_end_foreign_access(s->req.seg[i].gref, 0, 0UL);
++ gnttab_end_foreign_access(s->req.seg[i].gref, 0UL);
+}
+
+static void blkif_recover(struct blkfront_info *info)
@@ -53991,9 +80908,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-x
+ req->seg[j].gref,
+ info->xbdev->otherend_id,
+ pfn_to_mfn(info->shadow[req->id].frame[j]),
-+ rq_data_dir(
-+ (struct request *)
-+ info->shadow[req->id].request));
++ rq_data_dir((struct request *)
++ info->shadow[req->id].request) ?
++ GTF_readonly : 0);
+ info->shadow[req->id].req = *req;
+
+ info->ring.req_prod_pvt++;
@@ -54056,16 +80973,16 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-x
+module_init(xlblk_init);
+
+
-+static void xlblk_exit(void)
++static void __exit xlblk_exit(void)
+{
+ return xenbus_unregister_driver(&blkfront);
+}
+module_exit(xlblk_exit);
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/blkfront/block.h linux-2.6.18-xen-3.2.0/drivers/xen/blkfront/block.h
+--- linux-2.6.18.8/drivers/xen/blkfront/block.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blkfront/block.h 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,143 @@
+/******************************************************************************
+ * block.h
@@ -54210,9 +81127,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/block.h tmp-linux-2.6-xen.
+int xlvbd_barrier(struct blkfront_info *info);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/blkfront/vbd.c linux-2.6.18-xen-3.2.0/drivers/xen/blkfront/vbd.c
+--- linux-2.6.18.8/drivers/xen/blkfront/vbd.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blkfront/vbd.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,375 @@
+/******************************************************************************
+ * vbd.c
@@ -54577,7 +81494,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/vbd.c tmp-linux-2.6-xen.pa
+ info->feature_barrier ? QUEUE_ORDERED_DRAIN : QUEUE_ORDERED_NONE, NULL);
+ if (err)
+ return err;
-+ printk("blkfront: %s: barriers %s\n",
++ printk(KERN_INFO "blkfront: %s: barriers %s\n",
+ info->gd->disk_name, info->feature_barrier ? "enabled" : "disabled");
+ return 0;
+}
@@ -54585,23 +81502,23 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blkfront/vbd.c tmp-linux-2.6-xen.pa
+int
+xlvbd_barrier(struct blkfront_info *info)
+{
-+ printk("blkfront: %s: barriers disabled\n", info->gd->disk_name);
++ printk(KERN_INFO "blkfront: %s: barriers disabled\n", info->gd->disk_name);
+ return -ENOSYS;
+}
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/blktap/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/blktap/Makefile
+--- linux-2.6.18.8/drivers/xen/blktap/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blktap/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,5 @@
+LINUXINCLUDE += -I../xen/include/public/io
+
+obj-$(CONFIG_XEN_BLKDEV_TAP) := xenblktap.o
+
+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,1632 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/blktap/blktap.c linux-2.6.18-xen-3.2.0/drivers/xen/blktap/blktap.c
+--- linux-2.6.18.8/drivers/xen/blktap/blktap.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blktap/blktap.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,1645 @@
+/******************************************************************************
+ * drivers/xen/blktap/blktap.c
+ *
@@ -54656,6 +81573,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+#include <linux/major.h>
+#include <linux/gfp.h>
+#include <linux/poll.h>
++#include <linux/delay.h>
+#include <asm/tlbflush.h>
+
+#define MAX_TAP_DEV 256 /*the maximum number of tapdisk ring devices */
@@ -54719,13 +81637,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+static struct tap_blkif *tapfds[MAX_TAP_DEV];
+static int blktap_next_minor;
+
-+static int __init set_blkif_reqs(char *str)
-+{
-+ get_option(&str, &blkif_reqs);
-+ return 1;
-+}
-+__setup("blkif_reqs=", set_blkif_reqs);
-+
++module_param(blkif_reqs, int, 0);
+/* Run-time switchable: /sys/module/blktap/parameters/ */
+static unsigned int log_stats = 0;
+static unsigned int debug_lvl = 0;
@@ -55257,6 +82169,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ struct page **map;
+ int i;
+ tap_blkif_t *info = filp->private_data;
++ int ret;
+
+ if (info == NULL) {
+ WPRINTK("blktap: mmap, retrieving idx failed\n");
@@ -55278,9 +82191,14 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ info->user_vstart = info->rings_vstart + (RING_PAGES << PAGE_SHIFT);
+
+ /* Map the ring pages to the start of the region and reserve it. */
-+ if (remap_pfn_range(vma, vma->vm_start,
-+ __pa(info->ufe_ring.sring) >> PAGE_SHIFT,
-+ PAGE_SIZE, vma->vm_page_prot)) {
++ if (xen_feature(XENFEAT_auto_translated_physmap))
++ ret = vm_insert_page(vma, vma->vm_start,
++ virt_to_page(info->ufe_ring.sring));
++ else
++ ret = remap_pfn_range(vma, vma->vm_start,
++ __pa(info->ufe_ring.sring) >> PAGE_SHIFT,
++ PAGE_SIZE, vma->vm_page_prot);
++ if (ret) {
+ WPRINTK("Mapping user ring failed!\n");
+ goto fail;
+ }
@@ -55846,6 +82764,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ break;
+ }
+
++ if (kthread_should_stop()) {
++ more_to_do = 1;
++ break;
++ }
++
+ switch (blkif->blk_protocol) {
+ case BLKIF_PROTOCOL_NATIVE:
+ memcpy(&req, RING_GET_REQUEST(&blk_rings->native, rc),
@@ -55874,6 +82797,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ break;
+
+ default:
++ /* A good sign something is wrong: sleep for a while to
++ * avoid excessive CPU consumption by a bad guest. */
++ msleep(1);
+ WPRINTK("unknown operation [%d]\n",
+ req.operation);
+ make_response(blkif, req.id, req.operation,
@@ -55881,6 +82807,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ free_req(pending_req);
+ break;
+ }
++
++ /* Yield point for this unbounded loop. */
++ cond_resched();
+ }
+
+ blktap_kick_user(blkif->dev_num);
@@ -56107,7 +83036,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+ fail_response:
+ make_response(blkif, req->id, req->operation, BLKIF_RSP_ERROR);
+ free_req(pending_req);
-+}
++ msleep(1); /* back off a bit */
++}
+
+
+
@@ -56234,9 +83164,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.p
+module_init(blkif_init);
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/blktap/common.h linux-2.6.18-xen-3.2.0/drivers/xen/blktap/common.h
+--- linux-2.6.18.8/drivers/xen/blktap/common.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blktap/common.h 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,121 @@
+/*
+ * This program is free software; you can redistribute it and/or
@@ -56359,9 +83289,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/common.h tmp-linux-2.6-xen.p
+void signal_tapdisk(int idx);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/blktap/interface.c linux-2.6.18-xen-3.2.0/drivers/xen/blktap/interface.c
+--- linux-2.6.18.8/drivers/xen/blktap/interface.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blktap/interface.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,174 @@
+/******************************************************************************
+ * drivers/xen/blktap/interface.c
@@ -56537,9 +83467,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/interface.c tmp-linux-2.6-xe
+ blkif_cachep = kmem_cache_create("blktapif_cache", sizeof(blkif_t),
+ 0, 0, NULL, NULL);
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/blktap/xenbus.c linux-2.6.18-xen-3.2.0/drivers/xen/blktap/xenbus.c
+--- linux-2.6.18.8/drivers/xen/blktap/xenbus.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/blktap/xenbus.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,477 @@
+/* drivers/xen/blktap/xenbus.c
+ *
@@ -57018,16 +83948,15 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/blktap/xenbus.c tmp-linux-2.6-xen.p
+{
+ xenbus_register_backend(&blktap);
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,203 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/char/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/char/Makefile
+--- linux-2.6.18.8/drivers/xen/char/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/char/Makefile 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1 @@
++obj-$(CONFIG_XEN_DEVMEM) := mem.o
+diff -rpuN linux-2.6.18.8/drivers/xen/char/mem.c linux-2.6.18-xen-3.2.0/drivers/xen/char/mem.c
+--- linux-2.6.18.8/drivers/xen/char/mem.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/char/mem.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,190 @@
+/*
+ * Originally from linux/drivers/char/mem.c
+ *
@@ -57056,12 +83985,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/char/mem.c tmp-linux-2.6-xen.patch/
+#include <asm/io.h>
+#include <asm/hypervisor.h>
+
-+#ifndef ARCH_HAS_VALID_PHYS_ADDR_RANGE
-+static inline int valid_phys_addr_range(unsigned long addr, size_t count)
++static inline int uncached_access(struct file *file)
+{
-+ return 1;
++ if (file->f_flags & O_SYNC)
++ return 1;
++ /* Xen sets correct MTRR type on non-RAM for us. */
++ return 0;
+}
-+#endif
+
+/*
+ * This funcion reads the *physical* memory. The f_pos points directly to the
@@ -57074,9 +84004,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/char/mem.c tmp-linux-2.6-xen.patch/
+ ssize_t read = 0, sz;
+ void __iomem *v;
+
-+ if (!valid_phys_addr_range(p, count))
-+ return -EFAULT;
-+
+ while (count > 0) {
+ /*
+ * Handle first page in case it's not aligned
@@ -57088,7 +84015,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/char/mem.c tmp-linux-2.6-xen.patch/
+
+ sz = min_t(unsigned long, sz, count);
+
-+ v = xlate_dev_mem_ptr(p, sz);
++ v = ioremap(p, sz);
+ if (IS_ERR(v) || v == NULL) {
+ /*
+ * Some programs (e.g., dmidecode) groove off into
@@ -57105,7 +84032,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/char/mem.c tmp-linux-2.6-xen.patch/
+ }
+
+ ignored = copy_to_user(buf, v, sz);
-+ xlate_dev_mem_ptr_unmap(v);
++ iounmap(v);
+ if (ignored)
+ return -EFAULT;
+ buf += sz;
@@ -57125,9 +84052,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/char/mem.c tmp-linux-2.6-xen.patch/
+ ssize_t written = 0, sz;
+ void __iomem *v;
+
-+ if (!valid_phys_addr_range(p, count))
-+ return -EFAULT;
-+
+ while (count > 0) {
+ /*
+ * Handle first page in case it's not aligned
@@ -57139,7 +84063,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/char/mem.c tmp-linux-2.6-xen.patch/
+
+ sz = min_t(unsigned long, sz, count);
+
-+ v = xlate_dev_mem_ptr(p, sz);
++ v = ioremap(p, sz);
+ if (v == NULL)
+ break;
+ if (IS_ERR(v)) {
@@ -57149,7 +84073,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/char/mem.c tmp-linux-2.6-xen.patch/
+ }
+
+ ignored = copy_from_user(v, buf, sz);
-+ xlate_dev_mem_ptr_unmap(v);
++ iounmap(v);
+ if (ignored) {
+ written += sz - ignored;
+ if (written)
@@ -57167,14 +84091,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/char/mem.c tmp-linux-2.6-xen.patch/
+}
+
+#ifndef ARCH_HAS_DEV_MEM_MMAP_MEM
-+static inline int uncached_access(struct file *file)
-+{
-+ if (file->f_flags & O_SYNC)
-+ return 1;
-+ /* Xen sets correct MTRR type on non-RAM for us. */
-+ return 0;
-+}
-+
+static int xen_mmap_mem(struct file * file, struct vm_area_struct * vma)
+{
+ size_t size = vma->vm_end - vma->vm_start;
@@ -57231,16 +84147,16 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/char/mem.c tmp-linux-2.6-xen.patch/
+ .mmap = xen_mmap_mem,
+ .open = open_mem,
+};
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/console/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/console/Makefile
+--- linux-2.6.18.8/drivers/xen/console/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/console/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,721 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/console/console.c linux-2.6.18-xen-3.2.0/drivers/xen/console/console.c
+--- linux-2.6.18.8/drivers/xen/console/console.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/console/console.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,731 @@
+/******************************************************************************
+ * console.c
+ *
@@ -57309,14 +84225,14 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/console/console.c tmp-linux-2.6-xen
+ * 'xencons=tty' [XC_TTY]: Console attached to '/dev/tty[0-9]+'.
+ * 'xencons=ttyS' [XC_SERIAL]: Console attached to '/dev/ttyS[0-9]+'.
+ * 'xencons=xvc' [XC_XVC]: Console attached to '/dev/xvc0'.
-+ * default: DOM0 -> XC_SERIAL ; all others -> XC_TTY.
++ * default: XC_XVC
+ *
+ * NB. In mode XC_TTY, we create dummy consoles for tty2-63. This suppresses
+ * warnings from standard distro startup scripts.
+ */
+static enum {
+ XC_OFF, XC_TTY, XC_SERIAL, XC_XVC
-+} xc_mode;
++} xc_mode = XC_XVC;
+static int xc_num = -1;
+
+/* /dev/xvc0 device number allocated by lanana.org. */
@@ -57328,18 +84244,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/console/console.c tmp-linux-2.6-xen
+extern int sysrq_enabled;
+#endif
+
-+void xencons_early_setup(void)
-+{
-+ extern int console_use_vt;
-+
-+ if (is_initial_xendomain()) {
-+ xc_mode = XC_SERIAL;
-+ } else {
-+ xc_mode = XC_TTY;
-+ console_use_vt = 0;
-+ }
-+}
-+
+static int __init xencons_setup(char *str)
+{
+ char *q;
@@ -57531,13 +84435,23 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/console/console.c tmp-linux-2.6-xen
+}
+
+
-+void dom0_init_screen_info(const struct dom0_vga_console_info *info)
++void __init dom0_init_screen_info(const struct dom0_vga_console_info *info, size_t size)
+{
++ /* This is drawn from a dump from vgacon:startup in
++ * standard Linux. */
++ screen_info.orig_video_mode = 3;
++ screen_info.orig_video_isVGA = 1;
++ screen_info.orig_video_lines = 25;
++ screen_info.orig_video_cols = 80;
++ screen_info.orig_video_ega_bx = 3;
++ screen_info.orig_video_points = 16;
++ screen_info.orig_y = screen_info.orig_video_lines - 1;
++
+ switch (info->video_type) {
+ case XEN_VGATYPE_TEXT_MODE_3:
-+ screen_info.orig_video_mode = 3;
-+ screen_info.orig_video_ega_bx = 3;
-+ screen_info.orig_video_isVGA = 1;
++ if (size < offsetof(struct dom0_vga_console_info, u.text_mode_3)
++ + sizeof(info->u.text_mode_3))
++ break;
+ screen_info.orig_video_lines = info->u.text_mode_3.rows;
+ screen_info.orig_video_cols = info->u.text_mode_3.columns;
+ screen_info.orig_x = info->u.text_mode_3.cursor_x;
@@ -57545,7 +84459,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/console/console.c tmp-linux-2.6-xen
+ screen_info.orig_video_points =
+ info->u.text_mode_3.font_height;
+ break;
++
+ case XEN_VGATYPE_VESA_LFB:
++ if (size < offsetof(struct dom0_vga_console_info,
++ u.vesa_lfb.gbl_caps))
++ break;
+ screen_info.orig_video_isVGA = VIDEO_TYPE_VLFB;
+ screen_info.lfb_width = info->u.vesa_lfb.width;
+ screen_info.lfb_height = info->u.vesa_lfb.height;
@@ -57561,6 +84479,14 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/console/console.c tmp-linux-2.6-xen
+ screen_info.blue_pos = info->u.vesa_lfb.blue_pos;
+ screen_info.rsvd_size = info->u.vesa_lfb.rsvd_size;
+ screen_info.rsvd_pos = info->u.vesa_lfb.rsvd_pos;
++ if (size >= offsetof(struct dom0_vga_console_info,
++ u.vesa_lfb.gbl_caps)
++ + sizeof(info->u.vesa_lfb.gbl_caps))
++ screen_info.capabilities = info->u.vesa_lfb.gbl_caps;
++ if (size >= offsetof(struct dom0_vga_console_info,
++ u.vesa_lfb.mode_attrs)
++ + sizeof(info->u.vesa_lfb.mode_attrs))
++ screen_info.vesa_attributes = info->u.vesa_lfb.mode_attrs;
+ break;
+ }
+}
@@ -57962,9 +84888,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/console/console.c tmp-linux-2.6-xen
+module_init(xencons_init);
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/console/xencons_ring.c linux-2.6.18-xen-3.2.0/drivers/xen/console/xencons_ring.c
+--- linux-2.6.18.8/drivers/xen/console/xencons_ring.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/console/xencons_ring.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,143 @@
+/*
+ * This program is free software; you can redistribute it and/or
@@ -58109,15 +85035,15 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/console/xencons_ring.c tmp-linux-2.
+{
+ (void)xencons_ring_init();
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,12 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/core/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/core/Makefile
+--- linux-2.6.18.8/drivers/xen/core/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/Makefile 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,13 @@
+#
+# Makefile for the linux kernel.
+#
+
-+obj-y := evtchn.o gnttab.o features.o reboot.o machine_reboot.o
++obj-y := evtchn.o gnttab.o features.o reboot.o machine_reboot.o firmware.o
+
+obj-$(CONFIG_PROC_FS) += xen_proc.o
+obj-$(CONFIG_SYS_HYPERVISOR) += hypervisor_sysfs.o
@@ -58125,10 +85051,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/Makefile tmp-linux-2.6-xen.pat
+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,172 @@
++obj-$(CONFIG_XEN_XENCOMM) += xencomm.o
+diff -rpuN linux-2.6.18.8/drivers/xen/core/cpu_hotplug.c linux-2.6.18-xen-3.2.0/drivers/xen/core/cpu_hotplug.c
+--- linux-2.6.18.8/drivers/xen/core/cpu_hotplug.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/cpu_hotplug.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,173 @@
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -58163,7 +85090,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/cpu_hotplug.c tmp-linux-2.6-xe
+ if ((cpu >= NR_CPUS) || !cpu_possible(cpu))
+ return;
+
-+ sprintf(dir, "cpu/%d", cpu);
++ sprintf(dir, "cpu/%u", cpu);
+ err = xenbus_scanf(XBT_NIL, dir, "availability", "%s", state);
+ if (err != 1) {
+ printk(KERN_ERR "XENBUS: Unable to read cpu state\n");
@@ -58185,12 +85112,12 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/cpu_hotplug.c tmp-linux-2.6-xe
+static void handle_vcpu_hotplug_event(
+ struct xenbus_watch *watch, const char **vec, unsigned int len)
+{
-+ int cpu;
++ unsigned int cpu;
+ char *cpustr;
+ const char *node = vec[XS_WATCH_PATH];
+
+ if ((cpustr = strstr(node, "cpu/")) != NULL) {
-+ sscanf(cpustr, "cpu/%d", &cpu);
++ sscanf(cpustr, "cpu/%u", &cpu);
+ vcpu_hotplug(cpu);
+ }
+}
@@ -58198,7 +85125,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/cpu_hotplug.c tmp-linux-2.6-xe
+static int smpboot_cpu_notify(struct notifier_block *notifier,
+ unsigned long action, void *hcpu)
+{
-+ int cpu = (long)hcpu;
++ unsigned int cpu = (long)hcpu;
+
+ /*
+ * We do this in a callback notifier rather than __cpu_disable()
@@ -58214,7 +85141,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/cpu_hotplug.c tmp-linux-2.6-xe
+static int setup_cpu_watcher(struct notifier_block *notifier,
+ unsigned long event, void *data)
+{
-+ int i;
++ unsigned int i;
+
+ static struct xenbus_watch cpu_watch = {
+ .node = "cpu",
@@ -58252,7 +85179,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/cpu_hotplug.c tmp-linux-2.6-xe
+
+int smp_suspend(void)
+{
-+ int cpu, err;
++ unsigned int cpu;
++ int err;
+
+ for_each_online_cpu(cpu) {
+ if (cpu == 0)
@@ -58272,7 +85200,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/cpu_hotplug.c tmp-linux-2.6-xe
+
+void smp_resume(void)
+{
-+ int cpu;
++ unsigned int cpu;
+
+ for_each_possible_cpu(cpu)
+ vcpu_hotplug(cpu);
@@ -58301,10 +85229,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/cpu_hotplug.c tmp-linux-2.6-xe
+{
+ xenbus_allowed_cpumask = cpu_present_map;
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,1015 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/core/evtchn.c linux-2.6.18-xen-3.2.0/drivers/xen/core/evtchn.c
+--- linux-2.6.18.8/drivers/xen/core/evtchn.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/evtchn.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,1064 @@
+/******************************************************************************
+ * evtchn.c
+ *
@@ -58434,10 +85362,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+
+static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu)
+{
++ shared_info_t *s = HYPERVISOR_shared_info;
+ int irq = evtchn_to_irq[chn];
+
-+ BUG_ON(irq == -1);
-+ set_native_irq_info(irq, cpumask_of_cpu(cpu));
++ BUG_ON(!test_bit(chn, s->evtchn_mask));
++
++ if (irq != -1)
++ set_native_irq_info(irq, cpumask_of_cpu(cpu));
+
+ clear_bit(chn, (unsigned long *)cpu_evtchn_mask[cpu_evtchn[chn]]);
+ set_bit(chn, (unsigned long *)cpu_evtchn_mask[cpu]);
@@ -58504,6 +85435,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+ (regs)->IRQ_REG = ~(irq); \
+ do_IRQ((regs)); \
+} while (0)
++#elif defined (__powerpc__)
++#define do_IRQ(irq, regs) __do_IRQ(irq, regs)
++static inline void exit_idle(void) {}
+#endif
+
+/* Xen will never allocate port zero for any purpose. */
@@ -58516,21 +85450,26 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+ */
+void force_evtchn_callback(void)
+{
-+ (void)HYPERVISOR_xen_version(0, NULL);
++ VOID(HYPERVISOR_xen_version(0, NULL));
+}
+/* Not a GPL symbol: used in ubiquitous macros, so too restrictive. */
+EXPORT_SYMBOL(force_evtchn_callback);
+
+static DEFINE_PER_CPU(unsigned int, upcall_count) = { 0 };
++static DEFINE_PER_CPU(unsigned int, last_processed_l1i) = { BITS_PER_LONG - 1 };
++static DEFINE_PER_CPU(unsigned int, last_processed_l2i) = { BITS_PER_LONG - 1 };
+
+/* NB. Interrupts are disabled on entry. */
+asmlinkage void evtchn_do_upcall(struct pt_regs *regs)
+{
-+ unsigned long l1, l2;
-+ unsigned int l1i, l2i, port, count;
-+ int irq, cpu = smp_processor_id();
-+ shared_info_t *s = HYPERVISOR_shared_info;
-+ vcpu_info_t *vcpu_info = &s->vcpu_info[cpu];
++ unsigned long l1, l2;
++ unsigned long masked_l1, masked_l2;
++ unsigned int l1i, l2i, port, count;
++ int irq;
++ unsigned int cpu = smp_processor_id();
++ shared_info_t *s = HYPERVISOR_shared_info;
++ vcpu_info_t *vcpu_info = &s->vcpu_info[cpu];
++
+
+ do {
+ /* Avoid a callback storm when we reenable delivery. */
@@ -58545,13 +85484,36 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+ rmb();
+#endif
+ l1 = xchg(&vcpu_info->evtchn_pending_sel, 0);
++
++ l1i = per_cpu(last_processed_l1i, cpu);
++ l2i = per_cpu(last_processed_l2i, cpu);
++
+ while (l1 != 0) {
-+ l1i = __ffs(l1);
-+ l1 &= ~(1UL << l1i);
+
-+ while ((l2 = active_evtchns(cpu, s, l1i)) != 0) {
-+ l2i = __ffs(l2);
++ l1i = (l1i + 1) % BITS_PER_LONG;
++ masked_l1 = l1 & ((~0UL) << l1i);
++
++ if (masked_l1 == 0) { /* if we masked out all events, wrap around to the beginning */
++ l1i = BITS_PER_LONG - 1;
++ l2i = BITS_PER_LONG - 1;
++ continue;
++ }
++ l1i = __ffs(masked_l1);
++
++ do {
++ l2 = active_evtchns(cpu, s, l1i);
++
++ l2i = (l2i + 1) % BITS_PER_LONG;
++ masked_l2 = l2 & ((~0UL) << l2i);
++
++ if (masked_l2 == 0) { /* if we masked out all events, move on */
++ l2i = BITS_PER_LONG - 1;
++ break;
++ }
++
++ l2i = __ffs(masked_l2);
+
++ /* process port */
+ port = (l1i * BITS_PER_LONG) + l2i;
+ if ((irq = evtchn_to_irq[port]) != -1)
+ do_IRQ(irq, regs);
@@ -58559,7 +85521,17 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+ exit_idle();
+ evtchn_device_upcall(port);
+ }
-+ }
++
++ /* if this is the final port processed, we'll pick up here+1 next time */
++ per_cpu(last_processed_l1i, cpu) = l1i;
++ per_cpu(last_processed_l2i, cpu) = l2i;
++
++ } while (l2i != BITS_PER_LONG - 1);
++
++ l2 = active_evtchns(cpu, s, l1i);
++ if (l2 == 0) /* we handled all ports, so we can clear the selector bit */
++ l1 &= ~(1UL << l1i);
++
+ }
+
+ /* If there were nested callbacks then we have more to do. */
@@ -58730,7 +85702,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+static void unbind_from_irq(unsigned int irq)
+{
+ struct evtchn_close close;
-+ int cpu, evtchn = evtchn_from_irq(irq);
++ unsigned int cpu;
++ int evtchn = evtchn_from_irq(irq);
+
+ spin_lock(&irq_mapping_update_lock);
+
@@ -58893,29 +85866,27 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+EXPORT_SYMBOL_GPL(unbind_from_irqhandler);
+
+#ifdef CONFIG_SMP
-+/* Rebind an evtchn so that it gets delivered to a specific cpu */
-+static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
++void rebind_evtchn_to_cpu(int port, unsigned int cpu)
+{
-+ struct evtchn_bind_vcpu bind_vcpu;
-+ int evtchn = evtchn_from_irq(irq);
++ struct evtchn_bind_vcpu ebv = { .port = port, .vcpu = cpu };
++ int masked;
+
-+ if (!VALID_EVTCHN(evtchn))
-+ return;
++ masked = test_and_set_evtchn_mask(port);
++ if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &ebv) == 0)
++ bind_evtchn_to_cpu(port, cpu);
++ if (!masked)
++ unmask_evtchn(port);
++}
+
-+ /* Send future instances of this interrupt to other vcpu. */
-+ bind_vcpu.port = evtchn;
-+ bind_vcpu.vcpu = tcpu;
++static void rebind_irq_to_cpu(unsigned int irq, unsigned int tcpu)
++{
++ int evtchn = evtchn_from_irq(irq);
+
-+ /*
-+ * If this fails, it usually just indicates that we're dealing with a
-+ * virq or IPI channel, which don't actually need to be rebound. Ignore
-+ * it, but don't do the xenlinux-level rebind in that case.
-+ */
-+ if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0)
-+ bind_evtchn_to_cpu(evtchn, tcpu);
++ if (VALID_EVTCHN(evtchn))
++ rebind_evtchn_to_cpu(evtchn, tcpu);
+}
+
-+static void set_affinity_irq(unsigned irq, cpumask_t dest)
++static void set_affinity_irq(unsigned int irq, cpumask_t dest)
+{
+ unsigned tcpu = first_cpu(dest);
+ rebind_irq_to_cpu(irq, tcpu);
@@ -58930,7 +85901,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+ if (!VALID_EVTCHN(evtchn))
+ return 1;
+
-+ masked = synch_test_and_set_bit(evtchn, s->evtchn_mask);
++ masked = test_and_set_evtchn_mask(evtchn);
+ synch_set_bit(evtchn, s->evtchn_pending);
+ if (!masked)
+ unmask_evtchn(evtchn);
@@ -59013,14 +85984,15 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+{
+ struct physdev_eoi eoi = { .irq = pirq };
+ if (unlikely(test_bit(pirq, pirq_needs_eoi)))
-+ (void)HYPERVISOR_physdev_op(PHYSDEVOP_eoi, &eoi);
++ VOID(HYPERVISOR_physdev_op(PHYSDEVOP_eoi, &eoi));
+}
+
+static inline void pirq_query_unmask(int pirq)
+{
+ struct physdev_irq_status_query irq_status;
+ irq_status.irq = pirq;
-+ (void)HYPERVISOR_physdev_op(PHYSDEVOP_irq_status_query, &irq_status);
++ if (HYPERVISOR_physdev_op(PHYSDEVOP_irq_status_query, &irq_status))
++ irq_status.flags = 0;
+ clear_bit(pirq, pirq_needs_eoi);
+ if (irq_status.flags & XENIRQSTAT_needs_eoi)
+ set_bit(pirq, pirq_needs_eoi);
@@ -59085,20 +86057,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+
+static void enable_pirq(unsigned int irq)
+{
-+ int evtchn = evtchn_from_irq(irq);
-+
-+ if (VALID_EVTCHN(evtchn)) {
-+ unmask_evtchn(evtchn);
-+ pirq_unmask_notify(irq_to_pirq(irq));
-+ }
++ startup_pirq(irq);
+}
+
+static void disable_pirq(unsigned int irq)
+{
-+ int evtchn = evtchn_from_irq(irq);
-+
-+ if (VALID_EVTCHN(evtchn))
-+ mask_evtchn(evtchn);
+}
+
+static void ack_pirq(unsigned int irq)
@@ -59117,7 +86080,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+{
+ int evtchn = evtchn_from_irq(irq);
+
-+ if (VALID_EVTCHN(evtchn) && !(irq_desc[irq].status & IRQ_DISABLED)) {
++ if ((irq_desc[irq].status & (IRQ_DISABLED|IRQ_PENDING)) ==
++ (IRQ_DISABLED|IRQ_PENDING)) {
++ shutdown_pirq(irq);
++ } else if (VALID_EVTCHN(evtchn)) {
+ unmask_evtchn(evtchn);
+ pirq_unmask_notify(irq_to_pirq(irq));
+ }
@@ -59144,7 +86110,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+ if (!is_running_on_xen())
+ return 0;
+
-+ (void)HYPERVISOR_physdev_op(PHYSDEVOP_irq_status_query, &irq_status);
++ if (HYPERVISOR_physdev_op(PHYSDEVOP_irq_status_query, &irq_status))
++ return 0;
+ return !!(irq_status.flags & XENIRQSTAT_shared);
+}
+
@@ -59181,7 +86148,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+ /* Slow path (hypercall) if this is a non-local port. */
+ if (unlikely(cpu != cpu_from_evtchn(port))) {
+ struct evtchn_unmask unmask = { .port = port };
-+ (void)HYPERVISOR_event_channel_op(EVTCHNOP_unmask, &unmask);
++ VOID(HYPERVISOR_event_channel_op(EVTCHNOP_unmask, &unmask));
+ return;
+ }
+
@@ -59195,7 +86162,17 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+}
+EXPORT_SYMBOL_GPL(unmask_evtchn);
+
-+static void restore_cpu_virqs(int cpu)
++void disable_all_local_evtchn(void)
++{
++ unsigned i, cpu = smp_processor_id();
++ shared_info_t *s = HYPERVISOR_shared_info;
++
++ for (i = 0; i < NR_EVENT_CHANNELS; ++i)
++ if (cpu_from_evtchn(i) == cpu)
++ synch_set_bit(i, &s->evtchn_mask[0]);
++}
++
++static void restore_cpu_virqs(unsigned int cpu)
+{
+ struct evtchn_bind_virq bind_virq;
+ int virq, irq, evtchn;
@@ -59224,7 +86201,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+ }
+}
+
-+static void restore_cpu_ipis(int cpu)
++static void restore_cpu_ipis(unsigned int cpu)
+{
+ struct evtchn_bind_ipi bind_ipi;
+ int ipi, irq, evtchn;
@@ -59255,7 +86232,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+
+void irq_resume(void)
+{
-+ int cpu, pirq, irq, evtchn;
++ unsigned int cpu, pirq, irq, evtchn;
+
+ init_evtchn_cpu_bindings();
+
@@ -59282,7 +86259,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+
+void __init xen_init_IRQ(void)
+{
-+ int i;
++ unsigned int i;
+
+ init_evtchn_cpu_bindings();
+
@@ -59320,9 +86297,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.pat
+ irq_desc[pirq_to_irq(i)].chip = &pirq_type;
+ }
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/core/features.c linux-2.6.18-xen-3.2.0/drivers/xen/core/features.c
+--- linux-2.6.18.8/drivers/xen/core/features.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/features.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,34 @@
+/******************************************************************************
+ * features.c
@@ -59358,10 +86335,88 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/features.c tmp-linux-2.6-xen.p
+ xen_features[i*32+j] = !!(fi.submap & 1<<j);
+ }
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,631 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/core/firmware.c linux-2.6.18-xen-3.2.0/drivers/xen/core/firmware.c
+--- linux-2.6.18.8/drivers/xen/core/firmware.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/firmware.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,74 @@
++#include <linux/kernel.h>
++#include <linux/errno.h>
++#include <linux/init.h>
++#include <linux/edd.h>
++#include <video/edid.h>
++#include <xen/interface/platform.h>
++#include <asm/hypervisor.h>
++
++#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
++void __init copy_edd(void)
++{
++ int ret;
++ struct xen_platform_op op;
++
++ if (!is_initial_xendomain())
++ return;
++
++ op.cmd = XENPF_firmware_info;
++
++ op.u.firmware_info.type = XEN_FW_DISK_INFO;
++ for (op.u.firmware_info.index = 0;
++ edd.edd_info_nr < EDDMAXNR;
++ op.u.firmware_info.index++) {
++ struct edd_info *info = edd.edd_info + edd.edd_info_nr;
++
++ info->params.length = sizeof(info->params);
++ set_xen_guest_handle(op.u.firmware_info.u.disk_info.edd_params,
++ &info->params);
++ ret = HYPERVISOR_platform_op(&op);
++ if (ret)
++ break;
++
++#define C(x) info->x = op.u.firmware_info.u.disk_info.x
++ C(device);
++ C(version);
++ C(interface_support);
++ C(legacy_max_cylinder);
++ C(legacy_max_head);
++ C(legacy_sectors_per_track);
++#undef C
++
++ edd.edd_info_nr++;
++ }
++
++ op.u.firmware_info.type = XEN_FW_DISK_MBR_SIGNATURE;
++ for (op.u.firmware_info.index = 0;
++ edd.mbr_signature_nr < EDD_MBR_SIG_MAX;
++ op.u.firmware_info.index++) {
++ ret = HYPERVISOR_platform_op(&op);
++ if (ret)
++ break;
++ edd.mbr_signature[edd.mbr_signature_nr++] =
++ op.u.firmware_info.u.disk_mbr_signature.mbr_signature;
++ }
++}
++#endif
++
++void __init copy_edid(void)
++{
++#if defined(CONFIG_FIRMWARE_EDID) && defined(CONFIG_X86)
++ struct xen_platform_op op;
++
++ if (!is_initial_xendomain())
++ return;
++
++ op.cmd = XENPF_firmware_info;
++ op.u.firmware_info.index = 0;
++ op.u.firmware_info.type = XEN_FW_VBEDDC_INFO;
++ set_xen_guest_handle(op.u.firmware_info.u.vbeddc_info.edid,
++ edid_info.dummy);
++ if (HYPERVISOR_platform_op(&op) != 0)
++ memset(edid_info.dummy, 0x13, sizeof(edid_info.dummy));
++#endif
++}
+diff -rpuN linux-2.6.18.8/drivers/xen/core/gnttab.c linux-2.6.18-xen-3.2.0/drivers/xen/core/gnttab.c
+--- linux-2.6.18.8/drivers/xen/core/gnttab.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/gnttab.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,766 @@
+/******************************************************************************
+ * gnttab.c
+ *
@@ -59398,6 +86453,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
++#include <linux/seqlock.h>
+#include <xen/interface/xen.h>
+#include <xen/gnttab.h>
+#include <asm/pgtable.h>
@@ -59406,6 +86462,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+#include <asm/io.h>
+#include <xen/interface/memory.h>
+#include <xen/driver_util.h>
++#include <asm/gnttab_dma.h>
+
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
+#include <xen/platform-compat.h>
@@ -59502,7 +86559,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+ */
+
+int gnttab_grant_foreign_access(domid_t domid, unsigned long frame,
-+ int readonly)
++ int flags)
+{
+ int ref;
+
@@ -59512,19 +86569,21 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+ shared[ref].frame = frame;
+ shared[ref].domid = domid;
+ wmb();
-+ shared[ref].flags = GTF_permit_access | (readonly ? GTF_readonly : 0);
++ BUG_ON(flags & (GTF_accept_transfer | GTF_reading | GTF_writing));
++ shared[ref].flags = GTF_permit_access | flags;
+
+ return ref;
+}
+EXPORT_SYMBOL_GPL(gnttab_grant_foreign_access);
+
+void gnttab_grant_foreign_access_ref(grant_ref_t ref, domid_t domid,
-+ unsigned long frame, int readonly)
++ unsigned long frame, int flags)
+{
+ shared[ref].frame = frame;
+ shared[ref].domid = domid;
+ wmb();
-+ shared[ref].flags = GTF_permit_access | (readonly ? GTF_readonly : 0);
++ BUG_ON(flags & (GTF_accept_transfer | GTF_reading | GTF_writing));
++ shared[ref].flags = GTF_permit_access | flags;
+}
+EXPORT_SYMBOL_GPL(gnttab_grant_foreign_access_ref);
+
@@ -59539,7 +86598,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+}
+EXPORT_SYMBOL_GPL(gnttab_query_foreign_access);
+
-+int gnttab_end_foreign_access_ref(grant_ref_t ref, int readonly)
++int gnttab_end_foreign_access_ref(grant_ref_t ref)
+{
+ u16 flags, nflags;
+
@@ -59556,10 +86615,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+}
+EXPORT_SYMBOL_GPL(gnttab_end_foreign_access_ref);
+
-+void gnttab_end_foreign_access(grant_ref_t ref, int readonly,
-+ unsigned long page)
++void gnttab_end_foreign_access(grant_ref_t ref, unsigned long page)
+{
-+ if (gnttab_end_foreign_access_ref(ref, readonly)) {
++ if (gnttab_end_foreign_access_ref(ref)) {
+ put_free_entry(ref);
+ if (page != 0)
+ free_page(page);
@@ -59790,7 +86848,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+
+#ifdef CONFIG_XEN
+
-+#ifndef __ia64__
++static DEFINE_SEQLOCK(gnttab_dma_lock);
++
++#ifdef CONFIG_X86
+static int map_pte_fn(pte_t *pte, struct page *pmd_page,
+ unsigned long addr, void *data)
+{
@@ -59808,7 +86868,15 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+ set_pte_at(&init_mm, addr, pte, __pte(0));
+ return 0;
+}
-+#endif
++
++void *arch_gnttab_alloc_shared(unsigned long *frames)
++{
++ struct vm_struct *area;
++ area = alloc_vm_area(PAGE_SIZE * max_nr_grant_frames());
++ BUG_ON(area == NULL);
++ return area->addr;
++}
++#endif /* CONFIG_X86 */
+
+static int gnttab_map(unsigned int start_idx, unsigned int end_idx)
+{
@@ -59833,27 +86901,149 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+
+ BUG_ON(rc || setup.status);
+
-+#ifndef __ia64__
-+ if (shared == NULL) {
-+ struct vm_struct *area;
-+ area = alloc_vm_area(PAGE_SIZE * max_nr_grant_frames());
-+ BUG_ON(area == NULL);
-+ shared = area->addr;
-+ }
++ if (shared == NULL)
++ shared = arch_gnttab_alloc_shared(frames);
++
++#ifdef CONFIG_X86
+ rc = apply_to_page_range(&init_mm, (unsigned long)shared,
+ PAGE_SIZE * nr_gframes,
+ map_pte_fn, &frames);
+ BUG_ON(rc);
-+ frames -= nr_gframes; /* adjust after map_pte_fn() */
-+#else
-+ shared = __va(frames[0] << PAGE_SHIFT);
-+#endif
++ frames -= nr_gframes; /* adjust after map_pte_fn() */
++#endif /* CONFIG_X86 */
+
+ kfree(frames);
+
+ return 0;
+}
+
++static void gnttab_page_free(struct page *page)
++{
++ ClearPageForeign(page);
++ gnttab_reset_grant_page(page);
++ put_page(page);
++}
++
++/*
++ * Must not be called with IRQs off. This should only be used on the
++ * slow path.
++ *
++ * Copy a foreign granted page to local memory.
++ */
++int gnttab_copy_grant_page(grant_ref_t ref, struct page **pagep)
++{
++ struct gnttab_unmap_and_replace unmap;
++ mmu_update_t mmu;
++ struct page *page;
++ struct page *new_page;
++ void *new_addr;
++ void *addr;
++ paddr_t pfn;
++ maddr_t mfn;
++ maddr_t new_mfn;
++ int err;
++
++ page = *pagep;
++ if (!get_page_unless_zero(page))
++ return -ENOENT;
++
++ err = -ENOMEM;
++ new_page = alloc_page(GFP_ATOMIC | __GFP_NOWARN);
++ if (!new_page)
++ goto out;
++
++ new_addr = page_address(new_page);
++ addr = page_address(page);
++ memcpy(new_addr, addr, PAGE_SIZE);
++
++ pfn = page_to_pfn(page);
++ mfn = pfn_to_mfn(pfn);
++ new_mfn = virt_to_mfn(new_addr);
++
++ write_seqlock(&gnttab_dma_lock);
++
++ /* Make seq visible before checking page_mapped. */
++ smp_mb();
++
++ /* Has the page been DMA-mapped? */
++ if (unlikely(page_mapped(page))) {
++ write_sequnlock(&gnttab_dma_lock);
++ put_page(new_page);
++ err = -EBUSY;
++ goto out;
++ }
++
++ if (!xen_feature(XENFEAT_auto_translated_physmap))
++ set_phys_to_machine(pfn, new_mfn);
++
++ gnttab_set_replace_op(&unmap, (unsigned long)addr,
++ (unsigned long)new_addr, ref);
++
++ err = HYPERVISOR_grant_table_op(GNTTABOP_unmap_and_replace,
++ &unmap, 1);
++ BUG_ON(err);
++ BUG_ON(unmap.status);
++
++ write_sequnlock(&gnttab_dma_lock);
++
++ if (!xen_feature(XENFEAT_auto_translated_physmap)) {
++ set_phys_to_machine(page_to_pfn(new_page), INVALID_P2M_ENTRY);
++
++ mmu.ptr = (new_mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE;
++ mmu.val = pfn;
++ err = HYPERVISOR_mmu_update(&mmu, 1, NULL, DOMID_SELF);
++ BUG_ON(err);
++ }
++
++ new_page->mapping = page->mapping;
++ new_page->index = page->index;
++ set_bit(PG_foreign, &new_page->flags);
++ *pagep = new_page;
++
++ SetPageForeign(page, gnttab_page_free);
++ page->mapping = NULL;
++
++out:
++ put_page(page);
++ return err;
++}
++EXPORT_SYMBOL_GPL(gnttab_copy_grant_page);
++
++void gnttab_reset_grant_page(struct page *page)
++{
++ init_page_count(page);
++ reset_page_mapcount(page);
++}
++EXPORT_SYMBOL_GPL(gnttab_reset_grant_page);
++
++/*
++ * Keep track of foreign pages marked as PageForeign so that we don't
++ * return them to the remote domain prematurely.
++ *
++ * PageForeign pages are pinned down by increasing their mapcount.
++ *
++ * All other pages are simply returned as is.
++ */
++void __gnttab_dma_map_page(struct page *page)
++{
++ unsigned int seq;
++
++ if (!is_running_on_xen() || !PageForeign(page))
++ return;
++
++ do {
++ seq = read_seqbegin(&gnttab_dma_lock);
++
++ if (gnttab_dma_local_pfn(page))
++ break;
++
++ atomic_set(&page->_mapcount, 0);
++
++ /* Make _mapcount visible before read_seqretry. */
++ smp_mb();
++ } while (unlikely(read_seqretry(&gnttab_dma_lock, seq)));
++}
++
+int gnttab_resume(void)
+{
+ if (max_nr_grant_frames() < nr_grant_frames)
@@ -59863,7 +87053,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+
+int gnttab_suspend(void)
+{
-+#ifndef __ia64__
++#ifdef CONFIG_X86
+ apply_to_page_range(&init_mm, (unsigned long)shared,
+ PAGE_SIZE * nr_grant_frames,
+ unmap_pte_fn, NULL);
@@ -59993,10 +87183,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.pat
+#ifdef CONFIG_XEN
+core_initcall(gnttab_init);
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,56 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/core/hypervisor_sysfs.c linux-2.6.18-xen-3.2.0/drivers/xen/core/hypervisor_sysfs.c
+--- linux-2.6.18.8/drivers/xen/core/hypervisor_sysfs.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/hypervisor_sysfs.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,57 @@
+/*
+ * copyright (c) 2006 IBM Corporation
+ * Authored by: Mike D. Day <ncmike@us.ibm.com>
@@ -60010,6 +87200,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/hypervisor_sysfs.c tmp-linux-2
+#include <linux/module.h>
+#include <linux/kobject.h>
+#include <xen/hypervisor_sysfs.h>
++#include <asm/hypervisor.h>
+
+static ssize_t hyp_sysfs_show(struct kobject *kobj,
+ struct attribute *attr,
@@ -60053,9 +87244,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/hypervisor_sysfs.c tmp-linux-2
+}
+
+device_initcall(hypervisor_subsys_init);
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/core/machine_kexec.c linux-2.6.18-xen-3.2.0/drivers/xen/core/machine_kexec.c
+--- linux-2.6.18.8/drivers/xen/core/machine_kexec.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/machine_kexec.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,189 @@
+/*
+ * drivers/xen/core/machine_kexec.c
@@ -60210,7 +87401,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/machine_kexec.c tmp-linux-2.6-
+
+ memset(&xkl, 0, sizeof(xkl));
+ xkl.type = image->type;
-+ HYPERVISOR_kexec_op(KEXEC_CMD_kexec_unload, &xkl);
++ WARN_ON(HYPERVISOR_kexec_op(KEXEC_CMD_kexec_unload, &xkl));
+}
+
+/*
@@ -60227,7 +87418,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/machine_kexec.c tmp-linux-2.6-
+
+ memset(&xke, 0, sizeof(xke));
+ xke.type = image->type;
-+ HYPERVISOR_kexec_op(KEXEC_CMD_kexec, &xke);
++ VOID(HYPERVISOR_kexec_op(KEXEC_CMD_kexec, &xke));
+ panic("KEXEC_CMD_kexec hypercall should not return\n");
+}
+
@@ -60246,10 +87437,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/machine_kexec.c tmp-linux-2.6-
+ * tab-width: 8
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,241 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/core/machine_reboot.c linux-2.6.18-xen-3.2.0/drivers/xen/core/machine_reboot.c
+--- linux-2.6.18.8/drivers/xen/core/machine_reboot.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/machine_reboot.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,242 @@
+#include <linux/version.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
@@ -60265,7 +87456,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/machine_reboot.c tmp-linux-2.6
+#include <asm/hypervisor.h>
+#include <xen/xenbus.h>
+#include <linux/cpu.h>
-+#include <linux/kthread.h>
+#include <xen/gnttab.h>
+#include <xen/xencons.h>
+#include <xen/cpu_hotplug.h>
@@ -60313,8 +87503,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/machine_reboot.c tmp-linux-2.6
+static void pre_suspend(void)
+{
+ HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
-+ HYPERVISOR_update_va_mapping(fix_to_virt(FIX_SHARED_INFO),
-+ __pte_ma(0), 0);
++ WARN_ON(HYPERVISOR_update_va_mapping(fix_to_virt(FIX_SHARED_INFO),
++ __pte_ma(0), 0));
+
+ xen_start_info->store_mfn = mfn_to_pfn(xen_start_info->store_mfn);
+ xen_start_info->console.domU.mfn =
@@ -60341,8 +87531,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/machine_reboot.c tmp-linux-2.6
+ }
+
+ shinfo_mfn = xen_start_info->shared_info >> PAGE_SHIFT;
-+ HYPERVISOR_update_va_mapping(fix_to_virt(FIX_SHARED_INFO),
-+ pfn_pte_ma(shinfo_mfn, PAGE_KERNEL), 0);
++ if (HYPERVISOR_update_va_mapping(fix_to_virt(FIX_SHARED_INFO),
++ pfn_pte_ma(shinfo_mfn, PAGE_KERNEL),
++ 0))
++ BUG();
+ HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
+
+ memset(empty_zero_page, 0, PAGE_SIZE);
@@ -60491,10 +87683,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/machine_reboot.c tmp-linux-2.6
+
+ return 0;
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,243 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/core/reboot.c linux-2.6.18-xen-3.2.0/drivers/xen/core/reboot.c
+--- linux-2.6.18.8/drivers/xen/core/reboot.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/reboot.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,246 @@
+#define __KERNEL_SYSCALLS__
+#include <linux/version.h>
+#include <linux/kernel.h>
@@ -60504,6 +87696,9 @@ 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/kmod.h>
++#include <linux/slab.h>
++#include <linux/workqueue.h>
+
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
+#include <xen/platform-compat.h>
@@ -60738,10 +87933,10 @@ 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,452 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/core/smpboot.c linux-2.6.18-xen-3.2.0/drivers/xen/core/smpboot.c
+--- linux-2.6.18.8/drivers/xen/core/smpboot.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/smpboot.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,444 @@
+/*
+ * Xen SMP booting functions
+ *
@@ -60782,10 +87977,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.pa
+
+/* Number of siblings per CPU package */
+int smp_num_siblings = 1;
-+int phys_proc_id[NR_CPUS]; /* Package ID of each logical CPU */
-+EXPORT_SYMBOL(phys_proc_id);
-+int cpu_core_id[NR_CPUS]; /* Core ID of each logical CPU */
-+EXPORT_SYMBOL(cpu_core_id);
+
+cpumask_t cpu_online_map;
+EXPORT_SYMBOL(cpu_online_map);
@@ -60807,8 +87998,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.pa
+
+u8 cpu_2_logical_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
+
-+void *xquad_portio;
-+
+cpumask_t cpu_sibling_map[NR_CPUS] __cacheline_aligned;
+cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned;
+EXPORT_SYMBOL(cpu_core_map);
@@ -60840,10 +88029,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.pa
+}
+
+static inline void
-+set_cpu_sibling_map(int cpu)
++set_cpu_sibling_map(unsigned int cpu)
+{
-+ phys_proc_id[cpu] = cpu;
-+ cpu_core_id[cpu] = 0;
++ cpu_data[cpu].phys_proc_id = cpu;
++ cpu_data[cpu].cpu_core_id = 0;
+
+ cpu_sibling_map[cpu] = cpumask_of_cpu(cpu);
+ cpu_core_map[cpu] = cpumask_of_cpu(cpu);
@@ -60852,10 +88041,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.pa
+}
+
+static void
-+remove_siblinginfo(int cpu)
++remove_siblinginfo(unsigned int cpu)
+{
-+ phys_proc_id[cpu] = BAD_APICID;
-+ cpu_core_id[cpu] = BAD_APICID;
++ cpu_data[cpu].phys_proc_id = BAD_APICID;
++ cpu_data[cpu].cpu_core_id = BAD_APICID;
+
+ cpus_clear(cpu_sibling_map[cpu]);
+ cpus_clear(cpu_core_map[cpu]);
@@ -60863,13 +88052,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.pa
+ cpu_data[cpu].booted_cores = 0;
+}
+
-+static int xen_smp_intr_init(unsigned int cpu)
++static int __cpuinit xen_smp_intr_init(unsigned int cpu)
+{
+ int rc;
+
+ per_cpu(resched_irq, cpu) = per_cpu(callfunc_irq, cpu) = -1;
+
-+ sprintf(resched_name[cpu], "resched%d", cpu);
++ sprintf(resched_name[cpu], "resched%u", cpu);
+ rc = bind_ipi_to_irqhandler(RESCHEDULE_VECTOR,
+ cpu,
+ smp_reschedule_interrupt,
@@ -60880,7 +88069,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.pa
+ goto fail;
+ per_cpu(resched_irq, cpu) = rc;
+
-+ sprintf(callfunc_name[cpu], "callfunc%d", cpu);
++ sprintf(callfunc_name[cpu], "callfunc%u", cpu);
+ rc = bind_ipi_to_irqhandler(CALL_FUNCTION_VECTOR,
+ cpu,
+ smp_call_function_interrupt,
@@ -60915,23 +88104,28 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.pa
+}
+#endif
+
-+void cpu_bringup(void)
++void __cpuinit cpu_bringup(void)
+{
+ cpu_init();
++ identify_cpu(cpu_data + smp_processor_id());
+ touch_softlockup_watchdog();
+ preempt_disable();
+ local_irq_enable();
+}
+
-+static void cpu_bringup_and_idle(void)
++static void __cpuinit cpu_bringup_and_idle(void)
+{
+ cpu_bringup();
+ cpu_idle();
+}
+
-+static void cpu_initialize_context(unsigned int cpu)
++static void __cpuinit cpu_initialize_context(unsigned int cpu)
+{
-+ vcpu_guest_context_t ctxt;
++ /* vcpu_guest_context_t is too large to allocate on the stack.
++ * Hence we allocate statically and protect it with a lock */
++ static vcpu_guest_context_t ctxt;
++ static DEFINE_SPINLOCK(ctxt_lock);
++
+ struct task_struct *idle = idle_task(cpu);
+#ifdef __x86_64__
+ struct desc_ptr *gdt_descr = &cpu_gdt_descr[cpu];
@@ -60942,6 +88136,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.pa
+ if (cpu_test_and_set(cpu, cpu_initialized_map))
+ return;
+
++ spin_lock(&ctxt_lock);
++
+ memset(&ctxt, 0, sizeof(ctxt));
+
+ ctxt.flags = VGCF_IN_KERNEL;
@@ -60991,12 +88187,15 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.pa
+ ctxt.gs_base_kernel = (unsigned long)(cpu_pda(cpu));
+#endif
+
-+ BUG_ON(HYPERVISOR_vcpu_op(VCPUOP_initialise, cpu, &ctxt));
++ if (HYPERVISOR_vcpu_op(VCPUOP_initialise, cpu, &ctxt))
++ BUG();
++
++ spin_unlock(&ctxt_lock);
+}
+
+void __init smp_prepare_cpus(unsigned int max_cpus)
+{
-+ int cpu;
++ unsigned int cpu;
+ struct task_struct *idle;
+#ifdef __x86_64__
+ struct desc_ptr *gdt_descr;
@@ -61112,7 +88311,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.pa
+int __cpu_disable(void)
+{
+ cpumask_t map = cpu_online_map;
-+ int cpu = smp_processor_id();
++ unsigned int cpu = smp_processor_id();
+
+ if (cpu == 0)
+ return -EBUSY;
@@ -61139,21 +88338,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.pa
+ alternatives_smp_switch(0);
+}
+
-+#else /* !CONFIG_HOTPLUG_CPU */
-+
-+int __cpu_disable(void)
-+{
-+ return -ENOSYS;
-+}
-+
-+void __cpu_die(unsigned int cpu)
-+{
-+ BUG();
-+}
-+
+#endif /* CONFIG_HOTPLUG_CPU */
+
-+int __devinit __cpu_up(unsigned int cpu)
++int __cpuinit __cpu_up(unsigned int cpu)
+{
+ int rc;
+
@@ -61194,9 +88381,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.pa
+ return -EINVAL;
+}
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/core/xen_proc.c linux-2.6.18-xen-3.2.0/drivers/xen/core/xen_proc.c
+--- linux-2.6.18.8/drivers/xen/core/xen_proc.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/xen_proc.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,23 @@
+
+#include <linux/module.h>
@@ -61221,9 +88408,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/core/xen_sysfs.c linux-2.6.18-xen-3.2.0/drivers/xen/core/xen_sysfs.c
+--- linux-2.6.18.8/drivers/xen/core/xen_sysfs.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/xen_sysfs.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,378 @@
+/*
+ * copyright (c) 2006 IBM Corporation
@@ -61591,7 +88778,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/xen_sysfs.c tmp-linux-2.6-xen.
+ return ret;
+}
+
-+static void hyper_sysfs_exit(void)
++static void __exit hyper_sysfs_exit(void)
+{
+ xen_properties_destroy();
+ xen_compilation_destroy();
@@ -61603,16 +88790,249 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/core/xen_sysfs.c tmp-linux-2.6-xen.
+
+module_init(hyper_sysfs_init);
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/core/xencomm.c linux-2.6.18-xen-3.2.0/drivers/xen/core/xencomm.c
+--- linux-2.6.18.8/drivers/xen/core/xencomm.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/core/xencomm.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,229 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Hollis Blanchard <hollisb@us.ibm.com>
++ */
++
++#include <linux/gfp.h>
++#include <linux/mm.h>
++#include <asm/page.h>
++#include <xen/xencomm.h>
++#include <xen/interface/xen.h>
++#ifdef __ia64__
++#include <asm/xen/xencomm.h> /* for is_kern_addr() */
++#endif
++
++#ifdef HAVE_XEN_PLATFORM_COMPAT_H
++#include <xen/platform-compat.h>
++#endif
++
++static int xencomm_init(struct xencomm_desc *desc,
++ void *buffer, unsigned long bytes)
++{
++ unsigned long recorded = 0;
++ int i = 0;
++
++ while ((recorded < bytes) && (i < desc->nr_addrs)) {
++ unsigned long vaddr = (unsigned long)buffer + recorded;
++ unsigned long paddr;
++ int offset;
++ int chunksz;
++
++ offset = vaddr % PAGE_SIZE; /* handle partial pages */
++ chunksz = min(PAGE_SIZE - offset, bytes - recorded);
++
++ paddr = xencomm_vtop(vaddr);
++ if (paddr == ~0UL) {
++ printk("%s: couldn't translate vaddr %lx\n",
++ __func__, vaddr);
++ return -EINVAL;
++ }
++
++ desc->address[i++] = paddr;
++ recorded += chunksz;
++ }
++
++ if (recorded < bytes) {
++ printk("%s: could only translate %ld of %ld bytes\n",
++ __func__, recorded, bytes);
++ return -ENOSPC;
++ }
++
++ /* mark remaining addresses invalid (just for safety) */
++ while (i < desc->nr_addrs)
++ desc->address[i++] = XENCOMM_INVALID;
++
++ desc->magic = XENCOMM_MAGIC;
++
++ return 0;
++}
++
++static struct xencomm_desc *xencomm_alloc(gfp_t gfp_mask,
++ void *buffer, unsigned long bytes)
++{
++ struct xencomm_desc *desc;
++ unsigned long buffer_ulong = (unsigned long)buffer;
++ unsigned long start = buffer_ulong & PAGE_MASK;
++ unsigned long end = (buffer_ulong + bytes) | ~PAGE_MASK;
++ unsigned long nr_addrs = (end - start + 1) >> PAGE_SHIFT;
++ unsigned long size = sizeof(*desc) +
++ sizeof(desc->address[0]) * nr_addrs;
++
++ /*
++ * slab allocator returns at least sizeof(void*) aligned pointer.
++ * When sizeof(*desc) > sizeof(void*), struct xencomm_desc might
++ * cross page boundary.
++ */
++ if (sizeof(*desc) > sizeof(void*)) {
++ unsigned long order = get_order(size);
++ desc = (struct xencomm_desc *)__get_free_pages(gfp_mask,
++ order);
++ if (desc == NULL)
++ return NULL;
++
++ desc->nr_addrs =
++ ((PAGE_SIZE << order) - sizeof(struct xencomm_desc)) /
++ sizeof(*desc->address);
++ } else {
++ desc = kmalloc(size, gfp_mask);
++ if (desc == NULL)
++ return NULL;
++
++ desc->nr_addrs = nr_addrs;
++ }
++ return desc;
++}
++
++void xencomm_free(struct xencomm_handle *desc)
++{
++ if (desc && !((ulong)desc & XENCOMM_INLINE_FLAG)) {
++ struct xencomm_desc *desc__ = (struct xencomm_desc*)desc;
++ if (sizeof(*desc__) > sizeof(void*)) {
++ unsigned long size = sizeof(*desc__) +
++ sizeof(desc__->address[0]) * desc__->nr_addrs;
++ unsigned long order = get_order(size);
++ free_pages((unsigned long)__va(desc), order);
++ } else
++ kfree(__va(desc));
++ }
++}
++
++static int xencomm_create(void *buffer, unsigned long bytes, struct xencomm_desc **ret, gfp_t gfp_mask)
++{
++ struct xencomm_desc *desc;
++ int rc;
++
++ pr_debug("%s: %p[%ld]\n", __func__, buffer, bytes);
++
++ if (bytes == 0) {
++ /* don't create a descriptor; Xen recognizes NULL. */
++ BUG_ON(buffer != NULL);
++ *ret = NULL;
++ return 0;
++ }
++
++ BUG_ON(buffer == NULL); /* 'bytes' is non-zero */
++
++ desc = xencomm_alloc(gfp_mask, buffer, bytes);
++ if (!desc) {
++ printk("%s failure\n", "xencomm_alloc");
++ return -ENOMEM;
++ }
++
++ rc = xencomm_init(desc, buffer, bytes);
++ if (rc) {
++ printk("%s failure: %d\n", "xencomm_init", rc);
++ xencomm_free((struct xencomm_handle *)__pa(desc));
++ return rc;
++ }
++
++ *ret = desc;
++ return 0;
++}
++
++/* check if memory address is within VMALLOC region */
++static int is_phys_contiguous(unsigned long addr)
++{
++ if (!is_kernel_addr(addr))
++ return 0;
++
++ return (addr < VMALLOC_START) || (addr >= VMALLOC_END);
++}
++
++static struct xencomm_handle *xencomm_create_inline(void *ptr)
++{
++ unsigned long paddr;
++
++ BUG_ON(!is_phys_contiguous((unsigned long)ptr));
++
++ paddr = (unsigned long)xencomm_pa(ptr);
++ BUG_ON(paddr & XENCOMM_INLINE_FLAG);
++ return (struct xencomm_handle *)(paddr | XENCOMM_INLINE_FLAG);
++}
++
++/* "mini" routine, for stack-based communications: */
++static int xencomm_create_mini(void *buffer,
++ unsigned long bytes, struct xencomm_mini *xc_desc,
++ struct xencomm_desc **ret)
++{
++ int rc = 0;
++ struct xencomm_desc *desc;
++ BUG_ON(((unsigned long)xc_desc) % sizeof(*xc_desc) != 0);
++
++ desc = (void *)xc_desc;
++
++ desc->nr_addrs = XENCOMM_MINI_ADDRS;
++
++ if (!(rc = xencomm_init(desc, buffer, bytes)))
++ *ret = desc;
++
++ return rc;
++}
++
++struct xencomm_handle *xencomm_map(void *ptr, unsigned long bytes)
++{
++ int rc;
++ struct xencomm_desc *desc;
++
++ if (is_phys_contiguous((unsigned long)ptr))
++ return xencomm_create_inline(ptr);
++
++ rc = xencomm_create(ptr, bytes, &desc, GFP_KERNEL);
++
++ if (rc || desc == NULL)
++ return NULL;
++
++ return xencomm_pa(desc);
++}
++
++struct xencomm_handle *__xencomm_map_no_alloc(void *ptr, unsigned long bytes,
++ struct xencomm_mini *xc_desc)
++{
++ int rc;
++ struct xencomm_desc *desc = NULL;
++
++ if (is_phys_contiguous((unsigned long)ptr))
++ return xencomm_create_inline(ptr);
++
++ rc = xencomm_create_mini(ptr, bytes, xc_desc,
++ &desc);
++
++ if (rc)
++ return NULL;
++
++ return xencomm_pa(desc);
++}
+diff -rpuN linux-2.6.18.8/drivers/xen/evtchn/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/evtchn/Makefile
+--- linux-2.6.18.8/drivers/xen/evtchn/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/evtchn/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,469 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/evtchn/evtchn.c linux-2.6.18-xen-3.2.0/drivers/xen/evtchn/evtchn.c
+--- linux-2.6.18.8/drivers/xen/evtchn/evtchn.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/evtchn/evtchn.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,556 @@
+/******************************************************************************
+ * evtchn.c
+ *
@@ -61663,6 +89083,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.p
+#include <linux/init.h>
+#include <linux/gfp.h>
+#include <linux/mutex.h>
++#include <linux/cpu.h>
+#include <xen/evtchn.h>
+#include <xen/public/evtchn.h>
+
@@ -61677,6 +89098,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.p
+ /* Processes wait on this queue when ring is empty. */
+ wait_queue_head_t evtchn_wait;
+ struct fasync_struct *evtchn_async_queue;
++
++ int bind_cpu;
++ int nr_event_wrong_delivery;
+};
+
+/* Who's bound to each port? */
@@ -61708,6 +89132,33 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.p
+ spin_unlock(&port_user_lock);
+}
+
++static void evtchn_check_wrong_delivery(struct per_user_data *u)
++{
++ evtchn_port_t port;
++ unsigned int current_cpu = smp_processor_id();
++
++ /* Delivered to correct CPU? All is good. */
++ if (u->bind_cpu == current_cpu) {
++ u->nr_event_wrong_delivery = 0;
++ return;
++ }
++
++ /* Tolerate up to 100 consecutive misdeliveries. */
++ if (++u->nr_event_wrong_delivery < 100)
++ return;
++
++ spin_lock_irq(&port_user_lock);
++
++ for (port = 0; port < NR_EVENT_CHANNELS; port++)
++ if (port_user[port] == u)
++ rebind_evtchn_to_cpu(port, current_cpu);
++
++ u->bind_cpu = current_cpu;
++ u->nr_event_wrong_delivery = 0;
++
++ spin_unlock_irq(&port_user_lock);
++}
++
+static ssize_t evtchn_read(struct file *file, char __user *buf,
+ size_t count, loff_t *ppos)
+{
@@ -61768,6 +89219,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.p
+ ((bytes2 != 0) &&
+ copy_to_user(&buf[bytes1], &u->ring[0], bytes2)))
+ goto unlock_out;
++
++ evtchn_check_wrong_delivery(u);
+
+ u->ring_cons += (bytes1 + bytes2) / sizeof(evtchn_port_t);
+ rc = bytes1 + bytes2;
@@ -61814,12 +89267,29 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.p
+ return rc;
+}
+
++static unsigned int next_bind_cpu(cpumask_t map)
++{
++ static unsigned int bind_cpu;
++ bind_cpu = next_cpu(bind_cpu, map);
++ if (bind_cpu >= NR_CPUS)
++ bind_cpu = first_cpu(map);
++ return bind_cpu;
++}
++
+static void evtchn_bind_to_user(struct per_user_data *u, int port)
+{
+ spin_lock_irq(&port_user_lock);
++
+ BUG_ON(port_user[port] != NULL);
+ port_user[port] = u;
++
++ if (u->bind_cpu == -1)
++ u->bind_cpu = next_bind_cpu(cpu_online_map);
++
++ rebind_evtchn_to_cpu(port, u->bind_cpu);
++
+ unmask_evtchn(port);
++
+ spin_unlock_irq(&port_user_lock);
+}
+
@@ -62001,6 +89471,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.p
+
+ filp->private_data = u;
+
++ u->bind_cpu = -1;
++
+ return 0;
+}
+
@@ -62051,6 +89523,38 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.p
+ .fops = &evtchn_fops,
+};
+
++static int __cpuinit evtchn_cpu_notify(struct notifier_block *nfb,
++ unsigned long action, void *hcpu)
++{
++ int hotcpu = (unsigned long)hcpu;
++ cpumask_t map = cpu_online_map;
++ int port, newcpu;
++ struct per_user_data *u;
++
++ switch (action) {
++ case CPU_DOWN_PREPARE:
++ cpu_clear(hotcpu, map);
++ spin_lock_irq(&port_user_lock);
++ for (port = 0; port < NR_EVENT_CHANNELS; port++) {
++ if ((u = port_user[port]) != NULL &&
++ u->bind_cpu == hotcpu &&
++ (newcpu = next_bind_cpu(map)) < NR_CPUS) {
++ rebind_evtchn_to_cpu(port, newcpu);
++ u->bind_cpu = newcpu;
++ }
++ }
++ spin_unlock_irq(&port_user_lock);
++ break;
++ default:
++ return NOTIFY_DONE;
++ }
++ return NOTIFY_OK;
++}
++
++static struct notifier_block __cpuinitdata evtchn_cpu_nfb = {
++ .notifier_call = evtchn_cpu_notify
++};
++
+static int __init evtchn_init(void)
+{
+ int err;
@@ -62068,30 +89572,33 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.p
+ return err;
+ }
+
++ register_cpu_notifier(&evtchn_cpu_nfb);
++
+ printk("Event-channel device installed.\n");
+
+ return 0;
+}
+
-+static void evtchn_cleanup(void)
++static void __exit evtchn_cleanup(void)
+{
+ misc_deregister(&evtchn_miscdev);
++ unregister_cpu_notifier(&evtchn_cpu_nfb);
+}
+
+module_init(evtchn_init);
+module_exit(evtchn_cleanup);
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/fbfront/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/fbfront/Makefile
+--- linux-2.6.18.8/drivers/xen/fbfront/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/fbfront/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,753 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/fbfront/xenfb.c linux-2.6.18-xen-3.2.0/drivers/xen/fbfront/xenfb.c
+--- linux-2.6.18.8/drivers/xen/fbfront/xenfb.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/fbfront/xenfb.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,758 @@
+/*
+ * linux/drivers/video/xenfb.c -- Xen para-virtual frame buffer device
+ *
@@ -62295,6 +89802,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenfb.c tmp-linux-2.6-xen.p
+
+ mutex_unlock(&info->mm_lock);
+
++ if (x2 < x1 || y2 < y1) {
++ printk("xenfb_update_screen bogus rect %d %d %d %d\n",
++ x1, x2, y1, y2);
++ WARN_ON(1);
++ }
+ xenfb_do_update(info, x1, y1, x2 - x1, y2 - y1);
+}
+
@@ -62346,7 +89858,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenfb.c tmp-linux-2.6-xen.p
+static void xenfb_timer(unsigned long data)
+{
+ struct xenfb_info *info = (struct xenfb_info *)data;
-+ info->dirty = 1;
+ wake_up(&info->wq);
+}
+
@@ -62366,6 +89877,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenfb.c tmp-linux-2.6-xen.p
+ info->x1 = x1;
+ if (info->x2 < x2)
+ info->x2 = x2;
++ info->dirty = 1;
+
+ if (timer_pending(&info->refresh))
+ return;
@@ -62845,10 +90357,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenfb.c tmp-linux-2.6-xen.p
+module_exit(xenfb_cleanup);
+
+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,334 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/fbfront/xenkbd.c linux-2.6.18-xen-3.2.0/drivers/xen/fbfront/xenkbd.c
+--- linux-2.6.18.8/drivers/xen/fbfront/xenkbd.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/fbfront/xenkbd.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,346 @@
+/*
+ * linux/drivers/input/keyboard/xenkbd.c -- Xen para-virtual input device
+ *
@@ -62915,8 +90427,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenkbd.c tmp-linux-2.6-xen.
+ dev = info->ptr;
+ switch (event->type) {
+ case XENKBD_TYPE_MOTION:
-+ input_report_rel(dev, REL_X, event->motion.rel_x);
-+ input_report_rel(dev, REL_Y, event->motion.rel_y);
++ if ( event->motion.rel_z == 1 || event->motion.rel_z == -1 ) {
++ input_report_rel(dev, REL_WHEEL, 0 - event->motion.rel_z);
++ }
++ else {
++ input_report_rel(dev, REL_X, event->motion.rel_x);
++ input_report_rel(dev, REL_Y, event->motion.rel_y);
++ }
+ break;
+ case XENKBD_TYPE_KEY:
+ dev = NULL;
@@ -62932,8 +90449,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenkbd.c tmp-linux-2.6-xen.
+ event->key.keycode);
+ break;
+ case XENKBD_TYPE_POS:
-+ input_report_abs(dev, ABS_X, event->pos.abs_x);
-+ input_report_abs(dev, ABS_Y, event->pos.abs_y);
++ if ( event->pos.abs_z == 1 || event->pos.abs_z == -1 ) {
++ input_report_rel(dev, REL_WHEEL, 0 - event->pos.abs_z);
++ }
++ else {
++ input_report_abs(dev, ABS_X, event->pos.abs_x);
++ input_report_abs(dev, ABS_Y, event->pos.abs_y);
++ }
+ break;
+ }
+ if (dev)
@@ -63003,7 +90525,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenkbd.c tmp-linux-2.6-xen.
+ ptr->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS);
+ for (i = BTN_LEFT; i <= BTN_TASK; i++)
+ set_bit(i, ptr->keybit);
-+ ptr->relbit[0] = BIT(REL_X) | BIT(REL_Y);
++ ptr->relbit[0] = BIT(REL_X) | BIT(REL_Y) | BIT(REL_WHEEL);
+ input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0);
+ input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0);
+
@@ -63034,6 +90556,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenkbd.c tmp-linux-2.6-xen.
+ struct xenkbd_info *info = dev->dev.driver_data;
+
+ xenkbd_disconnect_backend(info);
++ info->page->in_cons = info->page->in_prod = 0;
++ info->page->out_cons = info->page->out_prod = 0;
+ return xenkbd_connect_backend(dev, info);
+}
+
@@ -63183,15 +90707,15 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/fbfront/xenkbd.c tmp-linux-2.6-xen.
+module_exit(xenkbd_cleanup);
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/gntdev/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/gntdev/Makefile
+--- linux-2.6.18.8/drivers/xen/gntdev/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/gntdev/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,973 @@
++obj-$(CONFIG_XEN_GRANT_DEV) := gntdev.o
+diff -rpuN linux-2.6.18.8/drivers/xen/gntdev/gntdev.c linux-2.6.18-xen-3.2.0/drivers/xen/gntdev/gntdev.c
+--- linux-2.6.18.8/drivers/xen/gntdev/gntdev.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/gntdev/gntdev.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,980 @@
+/******************************************************************************
+ * gntdev.c
+ *
@@ -63330,7 +90854,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/gntdev/gntdev.c tmp-linux-2.6-xen.p
+static long gntdev_ioctl(struct file *flip,
+ unsigned int cmd, unsigned long arg);
+
-+static struct file_operations gntdev_fops = {
++static const struct file_operations gntdev_fops = {
+ .owner = THIS_MODULE,
+ .open = gntdev_open,
+ .release = gntdev_release,
@@ -63409,6 +90933,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/gntdev/gntdev.c tmp-linux-2.6-xen.p
+ }
+
+ slot_index = private_data->free_list[--private_data->free_list_size];
++ private_data->free_list[private_data->free_list_size]
++ = GNTDEV_FREE_LIST_INVALID;
+
+ /* Copy the grant information into file's private data. */
+ private_data->grants[slot_index].state = GNTDEV_SLOT_NOT_YET_MAPPED;
@@ -63465,13 +90991,19 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/gntdev/gntdev.c tmp-linux-2.6-xen.p
+{
+ gntdev_file_private_data_t *private_data
+ = (gntdev_file_private_data_t *) flip->private_data;
-+ int i, j = 0, old_size;
++ int i, j = 0, old_size, slot_index;
+
+ old_size = private_data->free_list_size;
+ for (i = 0; i < old_size; ++i) {
+ if (private_data->free_list[i] != GNTDEV_FREE_LIST_INVALID) {
-+ private_data->free_list[j] =
-+ private_data->free_list[i];
++ if (i > j) {
++ slot_index = private_data->free_list[i];
++ private_data->free_list[j] = slot_index;
++ private_data->grants[slot_index].u
++ .free_list_index = j;
++ private_data->free_list[i]
++ = GNTDEV_FREE_LIST_INVALID;
++ }
+ ++j;
+ } else {
+ --private_data->free_list_size;
@@ -64102,7 +91634,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/gntdev/gntdev.c tmp-linux-2.6-xen.p
+ start_index + i;
+ ++private_data->free_list_size;
+ }
-+ compress_free_list(flip);
+
+ unmap_out:
+ up_write(&private_data->grants_sem);
@@ -64165,19 +91696,292 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/gntdev/gntdev.c tmp-linux-2.6-xen.p
+
+ return 0;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/netback/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/netback/Makefile
+--- linux-2.6.18.8/drivers/xen/netback/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/netback/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,5 @@
+obj-$(CONFIG_XEN_NETDEV_BACKEND) := netbk.o
+obj-$(CONFIG_XEN_NETDEV_LOOPBACK) += netloop.o
+
-+netbk-y := netback.o xenbus.o interface.o
++netbk-y := netback.o xenbus.o interface.o accel.o
+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,157 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/netback/accel.c linux-2.6.18-xen-3.2.0/drivers/xen/netback/accel.c
+--- linux-2.6.18.8/drivers/xen/netback/accel.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/netback/accel.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,269 @@
++/******************************************************************************
++ * drivers/xen/netback/accel.c
++ *
++ * Interface between backend virtual network device and accelerated plugin.
++ *
++ * Copyright (C) 2007 Solarflare Communications, Inc
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License version 2
++ * as published by the Free Software Foundation; or, when distributed
++ * separately from the Linux kernel or incorporated into other
++ * software packages, subject to the following license:
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this source file (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use, copy, modify,
++ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
++ */
++
++#include <linux/list.h>
++#include <asm/atomic.h>
++#include <xen/xenbus.h>
++#include <linux/mutex.h>
++
++#include "common.h"
++
++#if 0
++#undef DPRINTK
++#define DPRINTK(fmt, args...) \
++ printk("netback/accel (%s:%d) " fmt ".\n", __FUNCTION__, __LINE__, ##args)
++#endif
++
++/*
++ * A list of available netback accelerator plugin modules (each list
++ * entry is of type struct netback_accelerator)
++ */
++static struct list_head accelerators_list;
++/* Lock used to protect access to accelerators_list */
++DEFINE_MUTEX(accelerators_mutex);
++
++/*
++ * Compare a backend to an accelerator, and decide if they are
++ * compatible (i.e. if the accelerator should be used by the
++ * backend)
++ */
++static int match_accelerator(struct xenbus_device *xendev,
++ struct backend_info *be,
++ struct netback_accelerator *accelerator)
++{
++ int rc = 0;
++ char *eth_name = xenbus_read(XBT_NIL, xendev->nodename, "accel", NULL);
++
++ if (IS_ERR(eth_name)) {
++ /* Probably means not present */
++ DPRINTK("%s: no match due to xenbus_read accel error %d\n",
++ __FUNCTION__, PTR_ERR(eth_name));
++ return 0;
++ } else {
++ if (!strcmp(eth_name, accelerator->eth_name))
++ rc = 1;
++ kfree(eth_name);
++ return rc;
++ }
++}
++
++
++static void do_probe(struct backend_info *be,
++ struct netback_accelerator *accelerator,
++ struct xenbus_device *xendev)
++{
++ be->accelerator = accelerator;
++ atomic_inc(&be->accelerator->use_count);
++ if (be->accelerator->hooks->probe(xendev) != 0) {
++ atomic_dec(&be->accelerator->use_count);
++ module_put(be->accelerator->hooks->owner);
++ be->accelerator = NULL;
++ }
++}
++
++
++/*
++ * Notify suitable backends that a new accelerator is available and
++ * connected. This will also notify the accelerator plugin module
++ * that it is being used for a device through the probe hook.
++ */
++static int netback_accelerator_probe_backend(struct device *dev, void *arg)
++{
++ struct netback_accelerator *accelerator =
++ (struct netback_accelerator *)arg;
++ struct xenbus_device *xendev = to_xenbus_device(dev);
++
++ if (!strcmp("vif", xendev->devicetype)) {
++ struct backend_info *be = xendev->dev.driver_data;
++
++ if (match_accelerator(xendev, be, accelerator) &&
++ try_module_get(accelerator->hooks->owner)) {
++ do_probe(be, accelerator, xendev);
++ }
++ }
++ return 0;
++}
++
++
++/*
++ * Notify suitable backends that an accelerator is unavailable.
++ */
++static int netback_accelerator_remove_backend(struct device *dev, void *arg)
++{
++ struct xenbus_device *xendev = to_xenbus_device(dev);
++ struct netback_accelerator *accelerator =
++ (struct netback_accelerator *)arg;
++
++ if (!strcmp("vif", xendev->devicetype)) {
++ struct backend_info *be = xendev->dev.driver_data;
++
++ if (be->accelerator == accelerator) {
++ be->accelerator->hooks->remove(xendev);
++ atomic_dec(&be->accelerator->use_count);
++ module_put(be->accelerator->hooks->owner);
++ be->accelerator = NULL;
++ }
++ }
++ return 0;
++}
++
++
++
++/*
++ * Entry point for an netback accelerator plugin module. Called to
++ * advertise its presence, and connect to any suitable backends.
++ */
++int netback_connect_accelerator(unsigned version, int id, const char *eth_name,
++ struct netback_accel_hooks *hooks)
++{
++ struct netback_accelerator *new_accelerator;
++ unsigned eth_name_len;
++
++ if (version != NETBACK_ACCEL_VERSION) {
++ if (version > NETBACK_ACCEL_VERSION) {
++ /* Caller has higher version number, leave it
++ up to them to decide whether to continue.
++ They can recall with a lower number if
++ they're happy to be compatible with us */
++ return NETBACK_ACCEL_VERSION;
++ } else {
++ /* We have a more recent version than caller.
++ Currently reject, but may in future be able
++ to be backwardly compatible */
++ return -EPROTO;
++ }
++ }
++
++ new_accelerator =
++ kmalloc(sizeof(struct netback_accelerator), GFP_KERNEL);
++ if (!new_accelerator) {
++ DPRINTK("%s: failed to allocate memory for accelerator\n",
++ __FUNCTION__);
++ return -ENOMEM;
++ }
++
++ new_accelerator->id = id;
++
++ eth_name_len = strlen(eth_name)+1;
++ new_accelerator->eth_name = kmalloc(eth_name_len, GFP_KERNEL);
++ if (!new_accelerator->eth_name) {
++ DPRINTK("%s: failed to allocate memory for eth_name string\n",
++ __FUNCTION__);
++ kfree(new_accelerator);
++ return -ENOMEM;
++ }
++ strlcpy(new_accelerator->eth_name, eth_name, eth_name_len);
++
++ new_accelerator->hooks = hooks;
++
++ atomic_set(&new_accelerator->use_count, 0);
++
++ mutex_lock(&accelerators_mutex);
++ list_add(&new_accelerator->link, &accelerators_list);
++
++ /* tell existing backends about new plugin */
++ xenbus_for_each_backend(new_accelerator,
++ netback_accelerator_probe_backend);
++
++ mutex_unlock(&accelerators_mutex);
++
++ return 0;
++
++}
++EXPORT_SYMBOL_GPL(netback_connect_accelerator);
++
++
++/*
++ * Disconnect an accelerator plugin module that has previously been
++ * connected.
++ */
++void netback_disconnect_accelerator(int id, const char *eth_name)
++{
++ struct netback_accelerator *accelerator, *next;
++
++ mutex_lock(&accelerators_mutex);
++ list_for_each_entry_safe(accelerator, next, &accelerators_list, link) {
++ if (!strcmp(eth_name, accelerator->eth_name)) {
++ xenbus_for_each_backend
++ (accelerator, netback_accelerator_remove_backend);
++ BUG_ON(atomic_read(&accelerator->use_count) != 0);
++ list_del(&accelerator->link);
++ kfree(accelerator->eth_name);
++ kfree(accelerator);
++ break;
++ }
++ }
++ mutex_unlock(&accelerators_mutex);
++}
++EXPORT_SYMBOL_GPL(netback_disconnect_accelerator);
++
++
++void netback_probe_accelerators(struct backend_info *be,
++ struct xenbus_device *dev)
++{
++ struct netback_accelerator *accelerator;
++
++ /*
++ * Check list of accelerators to see if any is suitable, and
++ * use it if it is.
++ */
++ mutex_lock(&accelerators_mutex);
++ list_for_each_entry(accelerator, &accelerators_list, link) {
++ if (match_accelerator(dev, be, accelerator) &&
++ try_module_get(accelerator->hooks->owner)) {
++ do_probe(be, accelerator, dev);
++ break;
++ }
++ }
++ mutex_unlock(&accelerators_mutex);
++}
++
++
++void netback_remove_accelerators(struct backend_info *be,
++ struct xenbus_device *dev)
++{
++ mutex_lock(&accelerators_mutex);
++ /* Notify the accelerator (if any) of this device's removal */
++ if (be->accelerator != NULL) {
++ be->accelerator->hooks->remove(dev);
++ atomic_dec(&be->accelerator->use_count);
++ module_put(be->accelerator->hooks->owner);
++ be->accelerator = NULL;
++ }
++ mutex_unlock(&accelerators_mutex);
++}
++
++
++void netif_accel_init(void)
++{
++ INIT_LIST_HEAD(&accelerators_list);
++}
+diff -rpuN linux-2.6.18.8/drivers/xen/netback/common.h linux-2.6.18-xen-3.2.0/drivers/xen/netback/common.h
+--- linux-2.6.18.8/drivers/xen/netback/common.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/netback/common.h 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,217 @@
+/******************************************************************************
+ * arch/xen/drivers/netif/backend/common.h
+ *
@@ -64225,6 +92029,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/common.h tmp-linux-2.6-xen.
+#include <xen/interface/grant_table.h>
+#include <xen/gnttab.h>
+#include <xen/driver_util.h>
++#include <xen/xenbus.h>
+
+#define DPRINTK(_f, _a...) \
+ pr_debug("(file=%s, line=%d) " _f, \
@@ -64294,6 +92099,65 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/common.h tmp-linux-2.6-xen.
+#define netback_carrier_off(netif) ((netif)->carrier = 0)
+#define netback_carrier_ok(netif) ((netif)->carrier)
+
++enum {
++ NETBK_DONT_COPY_SKB,
++ NETBK_DELAYED_COPY_SKB,
++ NETBK_ALWAYS_COPY_SKB,
++};
++
++extern int netbk_copy_skb_mode;
++
++/* Function pointers into netback accelerator plugin modules */
++struct netback_accel_hooks {
++ struct module *owner;
++ int (*probe)(struct xenbus_device *dev);
++ int (*remove)(struct xenbus_device *dev);
++};
++
++/* Structure to track the state of a netback accelerator plugin */
++struct netback_accelerator {
++ struct list_head link;
++ int id;
++ char *eth_name;
++ atomic_t use_count;
++ struct netback_accel_hooks *hooks;
++};
++
++struct backend_info {
++ struct xenbus_device *dev;
++ netif_t *netif;
++ enum xenbus_state frontend_state;
++
++ /* State relating to the netback accelerator */
++ void *netback_accel_priv;
++ /* The accelerator that this backend is currently using */
++ struct netback_accelerator *accelerator;
++};
++
++#define NETBACK_ACCEL_VERSION 0x00010001
++
++/*
++ * Connect an accelerator plugin module to netback. Returns zero on
++ * success, < 0 on error, > 0 (with highest version number supported)
++ * if version mismatch.
++ */
++extern int netback_connect_accelerator(unsigned version,
++ int id, const char *eth_name,
++ struct netback_accel_hooks *hooks);
++/* Disconnect a previously connected accelerator plugin module */
++extern void netback_disconnect_accelerator(int id, const char *eth_name);
++
++
++extern
++void netback_probe_accelerators(struct backend_info *be,
++ struct xenbus_device *dev);
++extern
++void netback_remove_accelerators(struct backend_info *be,
++ struct xenbus_device *dev);
++extern
++void netif_accel_init(void);
++
++
+#define NET_TX_RING_SIZE __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE)
+#define NET_RX_RING_SIZE __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE)
+
@@ -64335,9 +92199,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/netback/interface.c linux-2.6.18-xen-3.2.0/drivers/xen/netback/interface.c
+--- linux-2.6.18.8/drivers/xen/netback/interface.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/netback/interface.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,336 @@
+/******************************************************************************
+ * arch/xen/drivers/netif/backend/interface.c
@@ -64675,9 +92539,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/interface.c tmp-linux-2.6-x
+
+ free_netdev(netif->dev);
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/netback/loopback.c linux-2.6.18-xen-3.2.0/drivers/xen/netback/loopback.c
+--- linux-2.6.18.8/drivers/xen/netback/loopback.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/netback/loopback.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,324 @@
+/******************************************************************************
+ * netback/loopback.c
@@ -65003,10 +92867,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/loopback.c tmp-linux-2.6-xe
+module_exit(loopback_exit);
+
+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,1496 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/netback/netback.c linux-2.6.18-xen-3.2.0/drivers/xen/netback/netback.c
+--- linux-2.6.18.8/drivers/xen/netback/netback.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/netback/netback.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,1614 @@
+/******************************************************************************
+ * drivers/xen/netback/netback.c
+ *
@@ -65058,6 +92922,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+ u8 copy:1;
+};
+
++struct netbk_tx_pending_inuse {
++ struct list_head list;
++ unsigned long alloc_time;
++};
++
+static void netif_idx_release(u16 pending_idx);
+static void netif_page_release(struct page *page);
+static void make_tx_response(netif_t *netif,
@@ -65077,15 +92946,21 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+static DECLARE_TASKLET(net_rx_tasklet, net_rx_action, 0);
+
+static struct timer_list net_timer;
++static struct timer_list netbk_tx_pending_timer;
+
+#define MAX_PENDING_REQS 256
+
+static struct sk_buff_head rx_queue;
+
+static struct page **mmap_pages;
++static inline unsigned long idx_to_pfn(unsigned int idx)
++{
++ return page_to_pfn(mmap_pages[idx]);
++}
++
+static inline unsigned long idx_to_kaddr(unsigned int idx)
+{
-+ return (unsigned long)pfn_to_kaddr(page_to_pfn(mmap_pages[idx]));
++ return (unsigned long)pfn_to_kaddr(idx_to_pfn(idx));
+}
+
+#define PKT_PROT_LEN 64
@@ -65104,6 +92979,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+static u16 dealloc_ring[MAX_PENDING_REQS];
+static PEND_RING_IDX dealloc_prod, dealloc_cons;
+
++/* Doubly-linked list of in-use pending entries. */
++static struct netbk_tx_pending_inuse pending_inuse[MAX_PENDING_REQS];
++static LIST_HEAD(pending_inuse_head);
++
+static struct sk_buff_head tx_queue;
+
+static grant_handle_t grant_tx_handle[MAX_PENDING_REQS];
@@ -65117,6 +92996,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+static unsigned long mfn_list[MAX_MFN_ALLOC];
+static unsigned int alloc_index = 0;
+
++/* Setting this allows the safe use of this driver without netloop. */
++static int MODPARM_copy_skb = 1;
++module_param_named(copy_skb, MODPARM_copy_skb, bool, 0);
++MODULE_PARM_DESC(copy_skb, "Copy data received from netfront without netloop");
++
++int netbk_copy_skb_mode;
++
+static inline unsigned long alloc_mfn(void)
+{
+ BUG_ON(alloc_index == 0);
@@ -65129,14 +93015,16 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+ .extent_order = 0,
+ .domid = DOMID_SELF
+ };
++ int rc;
+
+ if (likely(alloc_index >= nr))
+ return 0;
+
+ set_xen_guest_handle(reservation.extent_start, mfn_list + alloc_index);
+ reservation.nr_extents = MAX_MFN_ALLOC - alloc_index;
-+ alloc_index += HYPERVISOR_memory_op(XENMEM_increase_reservation,
-+ &reservation);
++ rc = HYPERVISOR_memory_op(XENMEM_increase_reservation, &reservation);
++ if (likely(rc > 0))
++ alloc_index += rc;
+
+ return alloc_index >= nr ? 0 : -ENOMEM;
+}
@@ -65332,7 +93220,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+
+struct netrx_pending_operations {
+ unsigned trans_prod, trans_cons;
-+ unsigned mmu_prod, mmu_cons;
++ unsigned mmu_prod, mmu_mcl;
+ unsigned mcl_prod, mcl_cons;
+ unsigned copy_prod, copy_cons;
+ unsigned meta_prod, meta_cons;
@@ -65588,8 +93476,12 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+ break;
+ }
+
-+ if (npo.mcl_prod &&
-+ !xen_feature(XENFEAT_auto_translated_physmap)) {
++ BUG_ON(npo.meta_prod > ARRAY_SIZE(meta));
++
++ npo.mmu_mcl = npo.mcl_prod;
++ if (npo.mcl_prod) {
++ BUG_ON(xen_feature(XENFEAT_auto_translated_physmap));
++ BUG_ON(npo.mmu_prod > ARRAY_SIZE(rx_mmu));
+ mcl = npo.mcl + npo.mcl_prod++;
+
+ BUG_ON(mcl[-1].op != __HYPERVISOR_update_va_mapping);
@@ -65603,6 +93495,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+ }
+
+ if (npo.trans_prod) {
++ BUG_ON(npo.trans_prod > ARRAY_SIZE(grant_trans_op));
+ mcl = npo.mcl + npo.mcl_prod++;
+ mcl->op = __HYPERVISOR_grant_table_op;
+ mcl->args[0] = GNTTABOP_transfer;
@@ -65611,6 +93504,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+ }
+
+ if (npo.copy_prod) {
++ BUG_ON(npo.copy_prod > ARRAY_SIZE(grant_copy_op));
+ mcl = npo.mcl + npo.mcl_prod++;
+ mcl->op = __HYPERVISOR_grant_table_op;
+ mcl->args[0] = GNTTABOP_copy;
@@ -65622,14 +93516,12 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+ if (!npo.mcl_prod)
+ return;
+
-+ BUG_ON(npo.copy_prod > NET_RX_RING_SIZE);
-+ BUG_ON(npo.mmu_prod > NET_RX_RING_SIZE);
-+ BUG_ON(npo.trans_prod > NET_RX_RING_SIZE);
-+ BUG_ON(npo.mcl_prod > NET_RX_RING_SIZE+3);
-+ BUG_ON(npo.meta_prod > NET_RX_RING_SIZE);
++ BUG_ON(npo.mcl_prod > ARRAY_SIZE(rx_mcl));
+
+ ret = HYPERVISOR_multicall(npo.mcl, npo.mcl_prod);
+ BUG_ON(ret != 0);
++ /* The mmu_machphys_update() must not fail. */
++ BUG_ON(npo.mmu_mcl && npo.mcl[npo.mmu_mcl].result != 0);
+
+ while ((skb = __skb_dequeue(&rxq)) != NULL) {
+ nr_frags = *(int *)skb->cb;
@@ -65728,6 +93620,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+ tasklet_schedule(&net_rx_tasklet);
+}
+
++static void netbk_tx_pending_timeout(unsigned long unused)
++{
++ tasklet_schedule(&net_tx_tasklet);
++}
++
+struct net_device_stats *netif_be_get_stats(struct net_device *dev)
+{
+ netif_t *netif = netdev_priv(dev);
@@ -65821,46 +93718,97 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+ netif_schedule_work(netif);
+}
+
++static inline int copy_pending_req(PEND_RING_IDX pending_idx)
++{
++ return gnttab_copy_grant_page(grant_tx_handle[pending_idx],
++ &mmap_pages[pending_idx]);
++}
++
+inline static void net_tx_action_dealloc(void)
+{
++ struct netbk_tx_pending_inuse *inuse, *n;
+ gnttab_unmap_grant_ref_t *gop;
+ u16 pending_idx;
+ PEND_RING_IDX dc, dp;
+ netif_t *netif;
+ int ret;
++ LIST_HEAD(list);
+
+ dc = dealloc_cons;
-+ dp = dealloc_prod;
-+
-+ /* Ensure we see all indexes enqueued by netif_idx_release(). */
-+ smp_rmb();
++ gop = tx_unmap_ops;
+
+ /*
+ * Free up any grants we have finished using
+ */
-+ gop = tx_unmap_ops;
-+ while (dc != dp) {
-+ pending_idx = dealloc_ring[MASK_PEND_IDX(dc++)];
-+ gnttab_set_unmap_op(gop, idx_to_kaddr(pending_idx),
-+ GNTMAP_host_map,
-+ grant_tx_handle[pending_idx]);
-+ gop++;
-+ }
++ do {
++ dp = dealloc_prod;
++
++ /* Ensure we see all indices enqueued by netif_idx_release(). */
++ smp_rmb();
++
++ while (dc != dp) {
++ unsigned long pfn;
++
++ pending_idx = dealloc_ring[MASK_PEND_IDX(dc++)];
++ list_move_tail(&pending_inuse[pending_idx].list, &list);
++
++ pfn = idx_to_pfn(pending_idx);
++ /* Already unmapped? */
++ if (!phys_to_machine_mapping_valid(pfn))
++ continue;
++
++ gnttab_set_unmap_op(gop, idx_to_kaddr(pending_idx),
++ GNTMAP_host_map,
++ grant_tx_handle[pending_idx]);
++ gop++;
++ }
++
++ if (netbk_copy_skb_mode != NETBK_DELAYED_COPY_SKB ||
++ list_empty(&pending_inuse_head))
++ break;
++
++ /* Copy any entries that have been pending for too long. */
++ list_for_each_entry_safe(inuse, n, &pending_inuse_head, list) {
++ if (time_after(inuse->alloc_time + HZ / 2, jiffies))
++ break;
++
++ switch (copy_pending_req(inuse - pending_inuse)) {
++ case 0:
++ list_move_tail(&inuse->list, &list);
++ continue;
++ case -EBUSY:
++ list_del_init(&inuse->list);
++ continue;
++ case -ENOENT:
++ continue;
++ }
++
++ break;
++ }
++ } while (dp != dealloc_prod);
++
++ dealloc_cons = dc;
++
+ ret = HYPERVISOR_grant_table_op(
+ GNTTABOP_unmap_grant_ref, tx_unmap_ops, gop - tx_unmap_ops);
+ BUG_ON(ret);
+
-+ while (dealloc_cons != dp) {
-+ pending_idx = dealloc_ring[MASK_PEND_IDX(dealloc_cons++)];
++ list_for_each_entry_safe(inuse, n, &list, list) {
++ pending_idx = inuse - pending_inuse;
+
+ netif = pending_tx_info[pending_idx].netif;
+
+ make_tx_response(netif, &pending_tx_info[pending_idx].req,
+ NETIF_RSP_OKAY);
+
++ /* Ready for next use. */
++ gnttab_reset_grant_page(mmap_pages[pending_idx]);
++
+ pending_ring[MASK_PEND_IDX(pending_prod++)] = pending_idx;
+
+ netif_put(netif);
++
++ list_del_init(&inuse->list);
+ }
+}
+
@@ -66032,6 +93980,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+ unsigned long pending_idx;
+
+ pending_idx = (unsigned long)frag->page;
++
++ pending_inuse[pending_idx].alloc_time = jiffies;
++ list_add_tail(&pending_inuse[pending_idx].list,
++ &pending_inuse_head);
++
+ txp = &pending_tx_info[pending_idx].req;
+ frag->page = virt_to_page(idx_to_kaddr(pending_idx));
+ frag->size = txp->size;
@@ -66320,9 +94273,25 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+ netif->stats.rx_bytes += skb->len;
+ netif->stats.rx_packets++;
+
++ if (unlikely(netbk_copy_skb_mode == NETBK_ALWAYS_COPY_SKB) &&
++ unlikely(skb_linearize(skb))) {
++ DPRINTK("Can't linearize skb in net_tx_action.\n");
++ kfree_skb(skb);
++ continue;
++ }
++
+ netif_rx(skb);
+ netif->dev->last_rx = jiffies;
+ }
++
++ if (netbk_copy_skb_mode == NETBK_DELAYED_COPY_SKB &&
++ !list_empty(&pending_inuse_head)) {
++ struct netbk_tx_pending_inuse *oldest;
++
++ oldest = list_entry(pending_inuse_head.next,
++ struct netbk_tx_pending_inuse, list);
++ mod_timer(&netbk_tx_pending_timer, oldest->alloc_time + HZ);
++ }
+}
+
+static void netif_idx_release(u16 pending_idx)
@@ -66342,9 +94311,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+
+static void netif_page_release(struct page *page)
+{
-+ /* Ready for next use. */
-+ init_page_count(page);
-+
+ netif_idx_release(netif_page_index(page));
+}
+
@@ -66466,6 +94432,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+ net_timer.data = 0;
+ net_timer.function = net_alarm;
+
++ init_timer(&netbk_tx_pending_timer);
++ netbk_tx_pending_timer.data = 0;
++ netbk_tx_pending_timer.function = netbk_tx_pending_timeout;
++
+ mmap_pages = alloc_empty_pages_and_pagevec(MAX_PENDING_REQS);
+ if (mmap_pages == NULL) {
+ printk("%s: out of memory\n", __FUNCTION__);
@@ -66476,6 +94446,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+ page = mmap_pages[i];
+ SetPageForeign(page, netif_page_release);
+ netif_page_index(page) = i;
++ INIT_LIST_HEAD(&pending_inuse[i].list);
+ }
+
+ pending_cons = 0;
@@ -66486,6 +94457,17 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+ spin_lock_init(&net_schedule_list_lock);
+ INIT_LIST_HEAD(&net_schedule_list);
+
++ netbk_copy_skb_mode = NETBK_DONT_COPY_SKB;
++ if (MODPARM_copy_skb) {
++ if (HYPERVISOR_grant_table_op(GNTTABOP_unmap_and_replace,
++ NULL, 0))
++ netbk_copy_skb_mode = NETBK_ALWAYS_COPY_SKB;
++ else
++ netbk_copy_skb_mode = NETBK_DELAYED_COPY_SKB;
++ }
++
++ netif_accel_init();
++
+ netif_xenbus_init();
+
+#ifdef NETBE_DEBUG_INTERRUPT
@@ -66503,10 +94485,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/netback.c tmp-linux-2.6-xen
+module_init(netback_init);
+
+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,448 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/netback/xenbus.c linux-2.6.18-xen-3.2.0/drivers/xen/netback/xenbus.c
+--- linux-2.6.18.8/drivers/xen/netback/xenbus.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/netback/xenbus.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,452 @@
+/* Xenbus code for netif backend
+ Copyright (C) 2005 Rusty Russell <rusty@rustcorp.com.au>
+ Copyright (C) 2005 XenSource Ltd
@@ -66537,11 +94519,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/xenbus.c tmp-linux-2.6-xen.
+ printk("netback/xenbus (%s:%d) " fmt ".\n", __FUNCTION__, __LINE__, ##args)
+#endif
+
-+struct backend_info {
-+ struct xenbus_device *dev;
-+ netif_t *netif;
-+ enum xenbus_state frontend_state;
-+};
+
+static int connect_rings(struct backend_info *);
+static void connect(struct backend_info *);
@@ -66551,6 +94528,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/xenbus.c tmp-linux-2.6-xen.
+{
+ struct backend_info *be = dev->dev.driver_data;
+
++ netback_remove_accelerators(be, dev);
++
+ if (be->netif) {
+ netif_disconnect(be->netif);
+ be->netif = NULL;
@@ -66571,6 +94550,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/xenbus.c tmp-linux-2.6-xen.
+ const char *message;
+ struct xenbus_transaction xbt;
+ int err;
++ int sg;
+ struct backend_info *be = kzalloc(sizeof(struct backend_info),
+ GFP_KERNEL);
+ if (!be) {
@@ -66582,6 +94562,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/xenbus.c tmp-linux-2.6-xen.
+ be->dev = dev;
+ dev->dev.driver_data = be;
+
++ sg = 1;
++ if (netbk_copy_skb_mode == NETBK_ALWAYS_COPY_SKB)
++ sg = 0;
++
+ do {
+ err = xenbus_transaction_start(&xbt);
+ if (err) {
@@ -66589,14 +94573,14 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/xenbus.c tmp-linux-2.6-xen.
+ goto fail;
+ }
+
-+ err = xenbus_printf(xbt, dev->nodename, "feature-sg", "%d", 1);
++ err = xenbus_printf(xbt, dev->nodename, "feature-sg", "%d", sg);
+ if (err) {
+ message = "writing feature-sg";
+ goto abort_transaction;
+ }
+
+ err = xenbus_printf(xbt, dev->nodename, "feature-gso-tcpv4",
-+ "%d", 1);
++ "%d", sg);
+ if (err) {
+ message = "writing feature-gso-tcpv4";
+ goto abort_transaction;
@@ -66629,6 +94613,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/xenbus.c tmp-linux-2.6-xen.
+ goto fail;
+ }
+
++ netback_probe_accelerators(be, dev);
++
+ err = xenbus_switch_state(dev, XenbusStateInitWait);
+ if (err)
+ goto fail;
@@ -66728,10 +94714,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/xenbus.c tmp-linux-2.6-xen.
+ if (dev->state == XenbusStateClosed) {
+ printk(KERN_INFO "%s: %s: prepare for reconnect\n",
+ __FUNCTION__, dev->nodename);
-+ if (be->netif) {
-+ netif_disconnect(be->netif);
-+ be->netif = NULL;
-+ }
+ xenbus_switch_state(dev, XenbusStateInitWait);
+ }
+ break;
@@ -66746,6 +94728,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/xenbus.c tmp-linux-2.6-xen.
+ break;
+
+ case XenbusStateClosing:
++ if (be->netif) {
++ netif_disconnect(be->netif);
++ be->netif = NULL;
++ }
+ xenbus_switch_state(dev, XenbusStateClosing);
+ break;
+
@@ -66955,23 +94941,843 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netback/xenbus.c tmp-linux-2.6-xen.
+{
+ xenbus_register_backend(&netback);
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/netfront/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/netfront/Makefile
+--- linux-2.6.18.8/drivers/xen/netfront/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/netfront/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,4 @@
+
+obj-$(CONFIG_XEN_NETDEV_FRONTEND) := xennet.o
+
-+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,2172 @@
++xennet-objs := netfront.o accel.o
+diff -rpuN linux-2.6.18.8/drivers/xen/netfront/accel.c linux-2.6.18-xen-3.2.0/drivers/xen/netfront/accel.c
+--- linux-2.6.18.8/drivers/xen/netfront/accel.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/netfront/accel.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,815 @@
++/******************************************************************************
++ * Virtual network driver for conversing with remote driver backends.
++ *
++ * Copyright (C) 2007 Solarflare Communications, Inc.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License version 2
++ * as published by the Free Software Foundation; or, when distributed
++ * separately from the Linux kernel or incorporated into other
++ * software packages, subject to the following license:
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this source file (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use, copy, modify,
++ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
++ */
++
++#include <linux/netdevice.h>
++#include <linux/skbuff.h>
++#include <linux/list.h>
++#include <linux/mutex.h>
++
++#include <xen/xenbus.h>
++
++#include "netfront.h"
++
++#define DPRINTK(fmt, args...) \
++ pr_debug("netfront/accel (%s:%d) " fmt, \
++ __FUNCTION__, __LINE__, ##args)
++#define IPRINTK(fmt, args...) \
++ printk(KERN_INFO "netfront/accel: " fmt, ##args)
++#define WPRINTK(fmt, args...) \
++ printk(KERN_WARNING "netfront/accel: " fmt, ##args)
++
++static int netfront_remove_accelerator(struct netfront_info *np,
++ struct xenbus_device *dev);
++static int netfront_load_accelerator(struct netfront_info *np,
++ struct xenbus_device *dev,
++ const char *frontend);
++
++/*
++ * List of all netfront accelerator plugin modules available. Each
++ * list entry is of type struct netfront_accelerator.
++ */
++static struct list_head accelerators_list;
++
++/* Lock to protect access to accelerators_list */
++static spinlock_t accelerators_lock;
++
++/* Mutex to prevent concurrent loads and suspends, etc. */
++DEFINE_MUTEX(accelerator_mutex);
++
++void netif_init_accel(void)
++{
++ INIT_LIST_HEAD(&accelerators_list);
++ spin_lock_init(&accelerators_lock);
++}
++
++void netif_exit_accel(void)
++{
++ struct netfront_accelerator *accelerator, *tmp;
++ unsigned long flags;
++
++ spin_lock_irqsave(&accelerators_lock, flags);
++
++ list_for_each_entry_safe(accelerator, tmp, &accelerators_list, link) {
++ BUG_ON(!list_empty(&accelerator->vif_states));
++
++ list_del(&accelerator->link);
++ kfree(accelerator->frontend);
++ kfree(accelerator);
++ }
++
++ spin_unlock_irqrestore(&accelerators_lock, flags);
++}
++
++
++/*
++ * Watch the configured accelerator and change plugin if it's modified
++ */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
++static void accel_watch_work(struct work_struct *context)
++#else
++static void accel_watch_work(void *context)
++#endif
++{
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
++ struct netfront_accel_vif_state *vif_state =
++ container_of(context, struct netfront_accel_vif_state,
++ accel_work);
++#else
++ struct netfront_accel_vif_state *vif_state =
++ (struct netfront_accel_vif_state *)context;
++#endif
++ struct netfront_info *np = vif_state->np;
++ char *accel_frontend;
++ int accel_len, rc = -1;
++
++ mutex_lock(&accelerator_mutex);
++
++ accel_frontend = xenbus_read(XBT_NIL, np->xbdev->otherend,
++ "accel-frontend", &accel_len);
++ if (IS_ERR(accel_frontend)) {
++ accel_frontend = NULL;
++ netfront_remove_accelerator(np, np->xbdev);
++ } else {
++ /* If this is the first time, request the accelerator,
++ otherwise only request one if it has changed */
++ if (vif_state->accel_frontend == NULL) {
++ rc = netfront_load_accelerator(np, np->xbdev,
++ accel_frontend);
++ } else {
++ if (strncmp(vif_state->accel_frontend, accel_frontend,
++ accel_len)) {
++ netfront_remove_accelerator(np, np->xbdev);
++ rc = netfront_load_accelerator(np, np->xbdev,
++ accel_frontend);
++ }
++ }
++ }
++
++ /* Get rid of previous state and replace with the new name */
++ if (vif_state->accel_frontend != NULL)
++ kfree(vif_state->accel_frontend);
++ vif_state->accel_frontend = accel_frontend;
++
++ mutex_unlock(&accelerator_mutex);
++
++ if (rc == 0) {
++ DPRINTK("requesting module %s\n", accel_frontend);
++ request_module("%s", accel_frontend);
++ /*
++ * Module should now call netfront_accelerator_loaded() once
++ * it's up and running, and we can continue from there
++ */
++ }
++}
++
++
++static void accel_watch_changed(struct xenbus_watch *watch,
++ const char **vec, unsigned int len)
++{
++ struct netfront_accel_vif_state *vif_state =
++ container_of(watch, struct netfront_accel_vif_state,
++ accel_watch);
++ schedule_work(&vif_state->accel_work);
++}
++
++
++void netfront_accelerator_add_watch(struct netfront_info *np)
++{
++ int err;
++
++ /* Check we're not trying to overwrite an existing watch */
++ BUG_ON(np->accel_vif_state.accel_watch.node != NULL);
++
++ /* Get a watch on the accelerator plugin */
++ err = xenbus_watch_path2(np->xbdev, np->xbdev->otherend,
++ "accel-frontend",
++ &np->accel_vif_state.accel_watch,
++ accel_watch_changed);
++ if (err) {
++ DPRINTK("%s: Failed to register accel watch: %d\n",
++ __FUNCTION__, err);
++ np->accel_vif_state.accel_watch.node = NULL;
++ }
++}
++
++
++static
++void netfront_accelerator_remove_watch(struct netfront_info *np)
++{
++ struct netfront_accel_vif_state *vif_state = &np->accel_vif_state;
++
++ /* Get rid of watch on accelerator plugin */
++ if (vif_state->accel_watch.node != NULL) {
++ unregister_xenbus_watch(&vif_state->accel_watch);
++ kfree(vif_state->accel_watch.node);
++ vif_state->accel_watch.node = NULL;
++
++ flush_scheduled_work();
++
++ /* Clean up any state left from watch */
++ if (vif_state->accel_frontend != NULL) {
++ kfree(vif_state->accel_frontend);
++ vif_state->accel_frontend = NULL;
++ }
++ }
++}
++
++
++/*
++ * Initialise the accel_vif_state field in the netfront state
++ */
++void init_accelerator_vif(struct netfront_info *np,
++ struct xenbus_device *dev)
++{
++ np->accelerator = NULL;
++
++ /* It's assumed that these things don't change */
++ np->accel_vif_state.np = np;
++ np->accel_vif_state.dev = dev;
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
++ INIT_WORK(&np->accel_vif_state.accel_work, accel_watch_work);
++#else
++ INIT_WORK(&np->accel_vif_state.accel_work, accel_watch_work,
++ &np->accel_vif_state);
++#endif
++}
++
++
++/*
++ * Compare a frontend description string against an accelerator to see
++ * if they match. Would ultimately be nice to replace the string with
++ * a unique numeric identifier for each accelerator.
++ */
++static int match_accelerator(const char *frontend,
++ struct netfront_accelerator *accelerator)
++{
++ return strcmp(frontend, accelerator->frontend) == 0;
++}
++
++
++/*
++ * Add a frontend vif to the list of vifs that is using a netfront
++ * accelerator plugin module.
++ */
++static void add_accelerator_vif(struct netfront_accelerator *accelerator,
++ struct netfront_info *np)
++{
++ unsigned long flags;
++
++ /* Need lock to write list */
++ spin_lock_irqsave(&accelerator->vif_states_lock, flags);
++
++ if (np->accelerator == NULL) {
++ np->accelerator = accelerator;
++
++ list_add(&np->accel_vif_state.link, &accelerator->vif_states);
++ } else {
++ /*
++ * May get here legitimately if suspend_cancel is
++ * called, but in that case configuration should not
++ * have changed
++ */
++ BUG_ON(np->accelerator != accelerator);
++ }
++
++ spin_unlock_irqrestore(&accelerator->vif_states_lock, flags);
++}
++
++
++/*
++ * Initialise the state to track an accelerator plugin module.
++ */
++static int init_accelerator(const char *frontend,
++ struct netfront_accelerator **result,
++ struct netfront_accel_hooks *hooks)
++{
++ struct netfront_accelerator *accelerator =
++ kmalloc(sizeof(struct netfront_accelerator), GFP_KERNEL);
++ unsigned long flags;
++ int frontend_len;
++
++ if (!accelerator) {
++ DPRINTK("no memory for accelerator\n");
++ return -ENOMEM;
++ }
++
++ frontend_len = strlen(frontend) + 1;
++ accelerator->frontend = kmalloc(frontend_len, GFP_KERNEL);
++ if (!accelerator->frontend) {
++ DPRINTK("no memory for accelerator\n");
++ kfree(accelerator);
++ return -ENOMEM;
++ }
++ strlcpy(accelerator->frontend, frontend, frontend_len);
++
++ INIT_LIST_HEAD(&accelerator->vif_states);
++ spin_lock_init(&accelerator->vif_states_lock);
++
++ accelerator->hooks = hooks;
++
++ spin_lock_irqsave(&accelerators_lock, flags);
++ list_add(&accelerator->link, &accelerators_list);
++ spin_unlock_irqrestore(&accelerators_lock, flags);
++
++ *result = accelerator;
++
++ return 0;
++}
++
++
++/*
++ * Modify the hooks stored in the per-vif state to match that in the
++ * netfront accelerator's state.
++ */
++static void
++accelerator_set_vif_state_hooks(struct netfront_accel_vif_state *vif_state)
++{
++ /* This function must be called with the vif_states_lock held */
++
++ DPRINTK("%p\n",vif_state);
++
++ /* Make sure there are no data path operations going on */
++ netif_poll_disable(vif_state->np->netdev);
++ netif_tx_lock_bh(vif_state->np->netdev);
++
++ vif_state->hooks = vif_state->np->accelerator->hooks;
++
++ netif_tx_unlock_bh(vif_state->np->netdev);
++ netif_poll_enable(vif_state->np->netdev);
++}
++
++
++static void accelerator_probe_new_vif(struct netfront_info *np,
++ struct xenbus_device *dev,
++ struct netfront_accelerator *accelerator)
++{
++ struct netfront_accel_hooks *hooks;
++ unsigned long flags;
++
++ DPRINTK("\n");
++
++ /* Include this frontend device on the accelerator's list */
++ add_accelerator_vif(accelerator, np);
++
++ hooks = accelerator->hooks;
++
++ if (hooks) {
++ if (hooks->new_device(np->netdev, dev) == 0) {
++ spin_lock_irqsave
++ (&accelerator->vif_states_lock, flags);
++
++ accelerator_set_vif_state_hooks(&np->accel_vif_state);
++
++ spin_unlock_irqrestore
++ (&accelerator->vif_states_lock, flags);
++ }
++ }
++
++ return;
++}
++
++
++/*
++ * Request that a particular netfront accelerator plugin is loaded.
++ * Usually called as a result of the vif configuration specifying
++ * which one to use. Must be called with accelerator_mutex held
++ */
++static int netfront_load_accelerator(struct netfront_info *np,
++ struct xenbus_device *dev,
++ const char *frontend)
++{
++ struct netfront_accelerator *accelerator;
++ int rc = 0;
++
++ DPRINTK(" %s\n", frontend);
++
++ /*
++ * Look at list of loaded accelerators to see if the requested
++ * one is already there
++ */
++ list_for_each_entry(accelerator, &accelerators_list, link) {
++ if (match_accelerator(frontend, accelerator)) {
++ accelerator_probe_new_vif(np, dev, accelerator);
++ return 0;
++ }
++ }
++
++ /* Couldn't find it, so create a new one and load the module */
++ if ((rc = init_accelerator(frontend, &accelerator, NULL)) < 0) {
++ return rc;
++ }
++
++ /* Include this frontend device on the accelerator's list */
++ add_accelerator_vif(accelerator, np);
++
++ return rc;
++}
++
++
++/*
++ * Go through all the netfront vifs and see if they have requested
++ * this accelerator. Notify the accelerator plugin of the relevant
++ * device if so. Called when an accelerator plugin module is first
++ * loaded and connects to netfront.
++ */
++static void
++accelerator_probe_vifs(struct netfront_accelerator *accelerator,
++ struct netfront_accel_hooks *hooks)
++{
++ struct netfront_accel_vif_state *vif_state, *tmp;
++ unsigned long flags;
++
++ DPRINTK("%p\n", accelerator);
++
++ /*
++ * Store the hooks for future calls to probe a new device, and
++ * to wire into the vif_state once the accelerator plugin is
++ * ready to accelerate each vif
++ */
++ BUG_ON(hooks == NULL);
++ accelerator->hooks = hooks;
++
++ /*
++ * currently hold accelerator_mutex, so don't need
++ * vif_states_lock to read the list
++ */
++ list_for_each_entry_safe(vif_state, tmp, &accelerator->vif_states,
++ link) {
++ struct netfront_info *np = vif_state->np;
++
++ if (hooks->new_device(np->netdev, vif_state->dev) == 0) {
++ spin_lock_irqsave
++ (&accelerator->vif_states_lock, flags);
++
++ accelerator_set_vif_state_hooks(vif_state);
++
++ spin_unlock_irqrestore
++ (&accelerator->vif_states_lock, flags);
++ }
++ }
++}
++
++
++/*
++ * Called by the netfront accelerator plugin module when it has loaded
++ */
++int netfront_accelerator_loaded(int version, const char *frontend,
++ struct netfront_accel_hooks *hooks)
++{
++ struct netfront_accelerator *accelerator;
++
++ if (is_initial_xendomain())
++ return -EINVAL;
++
++ if (version != NETFRONT_ACCEL_VERSION) {
++ if (version > NETFRONT_ACCEL_VERSION) {
++ /* Caller has higher version number, leave it
++ up to them to decide whether to continue.
++ They can re-call with a lower number if
++ they're happy to be compatible with us */
++ return NETFRONT_ACCEL_VERSION;
++ } else {
++ /* We have a more recent version than caller.
++ Currently reject, but may in future be able
++ to be backwardly compatible */
++ return -EPROTO;
++ }
++ }
++
++ mutex_lock(&accelerator_mutex);
++
++ /*
++ * Look through list of accelerators to see if it has already
++ * been requested
++ */
++ list_for_each_entry(accelerator, &accelerators_list, link) {
++ if (match_accelerator(frontend, accelerator)) {
++ accelerator_probe_vifs(accelerator, hooks);
++ goto out;
++ }
++ }
++
++ /*
++ * If it wasn't in the list, add it now so that when it is
++ * requested the caller will find it
++ */
++ DPRINTK("Couldn't find matching accelerator (%s)\n",
++ frontend);
++
++ init_accelerator(frontend, &accelerator, hooks);
++
++ out:
++ mutex_unlock(&accelerator_mutex);
++ return 0;
++}
++EXPORT_SYMBOL_GPL(netfront_accelerator_loaded);
++
++
++/*
++ * Remove the hooks from a single vif state.
++ */
++static void
++accelerator_remove_single_hook(struct netfront_accelerator *accelerator,
++ struct netfront_accel_vif_state *vif_state)
++{
++ /* Make sure there are no data path operations going on */
++ netif_poll_disable(vif_state->np->netdev);
++ netif_tx_lock_bh(vif_state->np->netdev);
++
++ /*
++ * Remove the hooks, but leave the vif_state on the
++ * accelerator's list as that signifies this vif is
++ * interested in using that accelerator if it becomes
++ * available again
++ */
++ vif_state->hooks = NULL;
++
++ netif_tx_unlock_bh(vif_state->np->netdev);
++ netif_poll_enable(vif_state->np->netdev);
++}
++
++
++/*
++ * Safely remove the accelerator function hooks from a netfront state.
++ */
++static void accelerator_remove_hooks(struct netfront_accelerator *accelerator)
++{
++ struct netfront_accel_hooks *hooks;
++ struct netfront_accel_vif_state *vif_state, *tmp;
++ unsigned long flags;
++
++ /* Mutex is held so don't need vif_states_lock to iterate list */
++ list_for_each_entry_safe(vif_state, tmp,
++ &accelerator->vif_states,
++ link) {
++ spin_lock_irqsave(&accelerator->vif_states_lock, flags);
++
++ if(vif_state->hooks) {
++ hooks = vif_state->hooks;
++
++ /* Last chance to get statistics from the accelerator */
++ hooks->get_stats(vif_state->np->netdev,
++ &vif_state->np->stats);
++
++ spin_unlock_irqrestore(&accelerator->vif_states_lock,
++ flags);
++
++ accelerator_remove_single_hook(accelerator, vif_state);
++
++ accelerator->hooks->remove(vif_state->dev);
++ } else {
++ spin_unlock_irqrestore(&accelerator->vif_states_lock,
++ flags);
++ }
++ }
++
++ accelerator->hooks = NULL;
++}
++
++
++/*
++ * Called by a netfront accelerator when it is unloaded. This safely
++ * removes the hooks into the plugin and blocks until all devices have
++ * finished using it, so on return it is safe to unload.
++ */
++void netfront_accelerator_stop(const char *frontend)
++{
++ struct netfront_accelerator *accelerator;
++ unsigned long flags;
++
++ mutex_lock(&accelerator_mutex);
++ spin_lock_irqsave(&accelerators_lock, flags);
++
++ list_for_each_entry(accelerator, &accelerators_list, link) {
++ if (match_accelerator(frontend, accelerator)) {
++ spin_unlock_irqrestore(&accelerators_lock, flags);
++
++ accelerator_remove_hooks(accelerator);
++
++ goto out;
++ }
++ }
++ spin_unlock_irqrestore(&accelerators_lock, flags);
++ out:
++ mutex_unlock(&accelerator_mutex);
++}
++EXPORT_SYMBOL_GPL(netfront_accelerator_stop);
++
++
++/* Helper for call_remove and do_suspend */
++static int do_remove(struct netfront_info *np, struct xenbus_device *dev,
++ unsigned long *lock_flags)
++{
++ struct netfront_accelerator *accelerator = np->accelerator;
++ struct netfront_accel_hooks *hooks;
++ int rc = 0;
++
++ if (np->accel_vif_state.hooks) {
++ hooks = np->accel_vif_state.hooks;
++
++ /* Last chance to get statistics from the accelerator */
++ hooks->get_stats(np->netdev, &np->stats);
++
++ spin_unlock_irqrestore(&accelerator->vif_states_lock,
++ *lock_flags);
++
++ /*
++ * Try and do the opposite of accelerator_probe_new_vif
++ * to ensure there's no state pointing back at the
++ * netdev
++ */
++ accelerator_remove_single_hook(accelerator,
++ &np->accel_vif_state);
++
++ rc = accelerator->hooks->remove(dev);
++
++ spin_lock_irqsave(&accelerator->vif_states_lock, *lock_flags);
++ }
++
++ return rc;
++}
++
++
++static int netfront_remove_accelerator(struct netfront_info *np,
++ struct xenbus_device *dev)
++{
++ struct netfront_accelerator *accelerator;
++ struct netfront_accel_vif_state *tmp_vif_state;
++ unsigned long flags;
++ int rc = 0;
++
++ /* Check that we've got a device that was accelerated */
++ if (np->accelerator == NULL)
++ return rc;
++
++ accelerator = np->accelerator;
++
++ spin_lock_irqsave(&accelerator->vif_states_lock, flags);
++
++ list_for_each_entry(tmp_vif_state, &accelerator->vif_states,
++ link) {
++ if (tmp_vif_state == &np->accel_vif_state) {
++ list_del(&np->accel_vif_state.link);
++ break;
++ }
++ }
++
++ rc = do_remove(np, dev, &flags);
++
++ np->accelerator = NULL;
++
++ spin_unlock_irqrestore(&accelerator->vif_states_lock, flags);
++
++ return rc;
++}
++
++
++int netfront_accelerator_call_remove(struct netfront_info *np,
++ struct xenbus_device *dev)
++{
++ int rc;
++ netfront_accelerator_remove_watch(np);
++ mutex_lock(&accelerator_mutex);
++ rc = netfront_remove_accelerator(np, dev);
++ mutex_unlock(&accelerator_mutex);
++ return rc;
++}
++
++
++int netfront_accelerator_suspend(struct netfront_info *np,
++ struct xenbus_device *dev)
++{
++ unsigned long flags;
++ int rc = 0;
++
++ netfront_accelerator_remove_watch(np);
++
++ mutex_lock(&accelerator_mutex);
++
++ /* Check that we've got a device that was accelerated */
++ if (np->accelerator == NULL)
++ goto out;
++
++ /*
++ * Call the remove accelerator hook, but leave the vif_state
++ * on the accelerator's list in case there is a suspend_cancel.
++ */
++ spin_lock_irqsave(&np->accelerator->vif_states_lock, flags);
++
++ rc = do_remove(np, dev, &flags);
++
++ spin_unlock_irqrestore(&np->accelerator->vif_states_lock, flags);
++ out:
++ mutex_unlock(&accelerator_mutex);
++ return rc;
++}
++
++
++int netfront_accelerator_suspend_cancel(struct netfront_info *np,
++ struct xenbus_device *dev)
++{
++ /*
++ * Setting the watch will cause it to fire and probe the
++ * accelerator, so no need to call accelerator_probe_new_vif()
++ * directly here
++ */
++ netfront_accelerator_add_watch(np);
++ return 0;
++}
++
++
++void netfront_accelerator_resume(struct netfront_info *np,
++ struct xenbus_device *dev)
++{
++ struct netfront_accel_vif_state *accel_vif_state = NULL;
++ spinlock_t *vif_states_lock;
++ unsigned long flags;
++
++ mutex_lock(&accelerator_mutex);
++
++ /* Check that we've got a device that was accelerated */
++ if(np->accelerator == NULL)
++ goto out;
++
++ /* Find the vif_state from the accelerator's list */
++ list_for_each_entry(accel_vif_state, &np->accelerator->vif_states,
++ link) {
++ if (accel_vif_state->dev == dev) {
++ BUG_ON(accel_vif_state != &np->accel_vif_state);
++
++ vif_states_lock = &np->accelerator->vif_states_lock;
++ spin_lock_irqsave(vif_states_lock, flags);
++
++ /*
++ * Remove it from the accelerator's list so
++ * state is consistent for probing new vifs
++ * when they get connected
++ */
++ list_del(&accel_vif_state->link);
++ np->accelerator = NULL;
++
++ spin_unlock_irqrestore(vif_states_lock, flags);
++
++ break;
++ }
++ }
++
++ out:
++ mutex_unlock(&accelerator_mutex);
++ return;
++}
++
++
++int netfront_check_accelerator_queue_ready(struct net_device *dev,
++ struct netfront_info *np)
++{
++ struct netfront_accelerator *accelerator;
++ struct netfront_accel_hooks *hooks;
++ int rc = 1;
++ unsigned long flags;
++
++ accelerator = np->accelerator;
++
++ /* Call the check_ready accelerator hook. */
++ if (np->accel_vif_state.hooks && accelerator) {
++ spin_lock_irqsave(&accelerator->vif_states_lock, flags);
++ hooks = np->accel_vif_state.hooks;
++ if (hooks && np->accelerator == accelerator)
++ rc = np->accel_vif_state.hooks->check_ready(dev);
++ spin_unlock_irqrestore(&accelerator->vif_states_lock, flags);
++ }
++
++ return rc;
++}
++
++
++void netfront_accelerator_call_stop_napi_irq(struct netfront_info *np,
++ struct net_device *dev)
++{
++ struct netfront_accelerator *accelerator;
++ struct netfront_accel_hooks *hooks;
++ unsigned long flags;
++
++ accelerator = np->accelerator;
++
++ /* Call the stop_napi_interrupts accelerator hook. */
++ if (np->accel_vif_state.hooks && accelerator != NULL) {
++ spin_lock_irqsave(&accelerator->vif_states_lock, flags);
++ hooks = np->accel_vif_state.hooks;
++ if (hooks && np->accelerator == accelerator)
++ np->accel_vif_state.hooks->stop_napi_irq(dev);
++ spin_unlock_irqrestore(&accelerator->vif_states_lock, flags);
++ }
++}
++
++
++int netfront_accelerator_call_get_stats(struct netfront_info *np,
++ struct net_device *dev)
++{
++ struct netfront_accelerator *accelerator;
++ struct netfront_accel_hooks *hooks;
++ unsigned long flags;
++ int rc = 0;
++
++ accelerator = np->accelerator;
++
++ /* Call the get_stats accelerator hook. */
++ if (np->accel_vif_state.hooks && accelerator != NULL) {
++ spin_lock_irqsave(&accelerator->vif_states_lock, flags);
++ hooks = np->accel_vif_state.hooks;
++ if (hooks && np->accelerator == accelerator)
++ rc = np->accel_vif_state.hooks->get_stats(dev,
++ &np->stats);
++ spin_unlock_irqrestore(&accelerator->vif_states_lock, flags);
++ }
++ return rc;
++}
++
+diff -rpuN linux-2.6.18.8/drivers/xen/netfront/netfront.c linux-2.6.18-xen-3.2.0/drivers/xen/netfront/netfront.c
+--- linux-2.6.18.8/drivers/xen/netfront/netfront.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/netfront/netfront.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,2222 @@
+/******************************************************************************
+ * Virtual network driver for conversing with remote driver backends.
+ *
+ * Copyright (c) 2002-2005, K A Fraser
+ * Copyright (c) 2005, XenSource Ltd
++ * Copyright (C) 2007 Solarflare Communications, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version 2
@@ -67031,10 +95837,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+#include <asm/uaccess.h>
+#include <xen/interface/grant_table.h>
+#include <xen/gnttab.h>
-+
-+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
-+#include <xen/platform-compat.h>
-+#endif
++#include <xen/hypercall.h>
+
+struct netfront_cb {
+ struct page *page;
@@ -67043,6 +95846,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+
+#define NETFRONT_SKB_CB(skb) ((struct netfront_cb *)((skb)->cb))
+
++#include "netfront.h"
++
+/*
+ * Mutually-exclusive module options to select receive data path:
+ * rx_copy : Packets are copied by network backend into local memory
@@ -67068,6 +95873,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+#if defined(NETIF_F_GSO)
+#define HAVE_GSO 1
+#define HAVE_TSO 1 /* TSO is a subset of GSO */
++#define HAVE_CSUM_OFFLOAD 1
+static inline void dev_disable_gso_features(struct net_device *dev)
+{
+ /* Turn off all GSO bits except ROBUST. */
@@ -67075,6 +95881,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ dev->features |= NETIF_F_GSO_ROBUST;
+}
+#elif defined(NETIF_F_TSO)
++#define HAVE_GSO 0
+#define HAVE_TSO 1
+
+/* Some older kernels cannot cope with incorrect checksums,
@@ -67082,7 +95889,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ * with the presence of NETIF_F_TSO but it appears to be a good first
+ * approximiation.
+ */
-+#define HAVE_NO_CSUM_OFFLOAD 1
++#define HAVE_CSUM_OFFLOAD 0
+
+#define gso_size tso_size
+#define gso_segs tso_segs
@@ -67107,63 +95914,16 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ unlikely(skb->ip_summed != CHECKSUM_HW));
+}
+#else
++#define HAVE_GSO 0
++#define HAVE_TSO 0
++#define HAVE_CSUM_OFFLOAD 0
+#define netif_needs_gso(dev, skb) 0
+#define dev_disable_gso_features(dev) ((void)0)
++#define ethtool_op_set_tso(dev, data) (-ENOSYS)
+#endif
+
+#define GRANT_INVALID_REF 0
+
-+#define NET_TX_RING_SIZE __RING_SIZE((struct netif_tx_sring *)0, PAGE_SIZE)
-+#define NET_RX_RING_SIZE __RING_SIZE((struct netif_rx_sring *)0, PAGE_SIZE)
-+
-+struct netfront_info {
-+ struct list_head list;
-+ struct net_device *netdev;
-+
-+ struct net_device_stats stats;
-+
-+ struct netif_tx_front_ring tx;
-+ struct netif_rx_front_ring rx;
-+
-+ spinlock_t tx_lock;
-+ spinlock_t rx_lock;
-+
-+ unsigned int irq;
-+ unsigned int copying_receiver;
-+ unsigned int carrier;
-+
-+ /* Receive-ring batched refills. */
-+#define RX_MIN_TARGET 8
-+#define RX_DFL_MIN_TARGET 64
-+#define RX_MAX_TARGET min_t(int, NET_RX_RING_SIZE, 256)
-+ unsigned rx_min_target, rx_max_target, rx_target;
-+ struct sk_buff_head rx_batch;
-+
-+ struct timer_list rx_refill_timer;
-+
-+ /*
-+ * {tx,rx}_skbs store outstanding skbuffs. The first entry in tx_skbs
-+ * is an index into a chain of free entries.
-+ */
-+ struct sk_buff *tx_skbs[NET_TX_RING_SIZE+1];
-+ struct sk_buff *rx_skbs[NET_RX_RING_SIZE];
-+
-+#define TX_MAX_TARGET min_t(int, NET_RX_RING_SIZE, 256)
-+ grant_ref_t gref_tx_head;
-+ grant_ref_t grant_tx_ref[NET_TX_RING_SIZE + 1];
-+ grant_ref_t gref_rx_head;
-+ grant_ref_t grant_rx_ref[NET_RX_RING_SIZE];
-+
-+ struct xenbus_device *xbdev;
-+ int tx_ring_ref;
-+ int rx_ring_ref;
-+ u8 mac[ETH_ALEN];
-+
-+ unsigned long rx_pfn_array[NET_RX_RING_SIZE];
-+ struct multicall_entry rx_mcl[NET_RX_RING_SIZE+1];
-+ struct mmu_update rx_mmu[NET_RX_RING_SIZE];
-+};
-+
+struct netfront_rx_info {
+ struct netif_rx_response rx;
+ struct netif_extra_info extras[XEN_NETIF_EXTRA_TYPE_MAX - 1];
@@ -67235,7 +95995,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+static int network_connect(struct net_device *);
+static void network_tx_buf_gc(struct net_device *);
+static void network_alloc_rx_buffers(struct net_device *);
-+static int send_fake_arp(struct net_device *);
++static void send_fake_arp(struct net_device *);
+
+static irqreturn_t netif_int(int irq, void *dev_id, struct pt_regs *ptregs);
+
@@ -67303,6 +96063,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+
+ DPRINTK("%s\n", dev->nodename);
+
++ netfront_accelerator_call_remove(info, dev);
++
+ netif_disconnect_backend(info);
+
+ del_timer_sync(&info->rx_refill_timer);
@@ -67316,6 +96078,21 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ return 0;
+}
+
++
++static int netfront_suspend(struct xenbus_device *dev)
++{
++ struct netfront_info *info = dev->dev.driver_data;
++ return netfront_accelerator_suspend(info, dev);
++}
++
++
++static int netfront_suspend_cancel(struct xenbus_device *dev)
++{
++ struct netfront_info *info = dev->dev.driver_data;
++ return netfront_accelerator_suspend_cancel(info, dev);
++}
++
++
+/**
+ * We are reconnecting to the backend, due to a suspend/resume, or a backend
+ * driver restart. We tear down our netif structure and recreate it, but
@@ -67328,6 +96105,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+
+ DPRINTK("%s\n", dev->nodename);
+
++ netfront_accelerator_resume(info, dev);
++
+ netif_disconnect_backend(info);
+ return 0;
+}
@@ -67373,6 +96152,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ if (err)
+ goto out;
+
++ /* This will load an accelerator if one is configured when the
++ * watch fires */
++ netfront_accelerator_add_watch(info);
++
+again:
+ err = xenbus_transaction_start(&xbt);
+ if (err) {
@@ -67413,13 +96196,12 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ goto abort_transaction;
+ }
+
-+#ifdef HAVE_NO_CSUM_OFFLOAD
-+ err = xenbus_printf(xbt, dev->nodename, "feature-no-csum-offload", "%d", 1);
++ err = xenbus_printf(xbt, dev->nodename, "feature-no-csum-offload",
++ "%d", !HAVE_CSUM_OFFLOAD);
+ if (err) {
+ message = "writing feature-no-csum-offload";
+ goto abort_transaction;
+ }
-+#endif
+
+ err = xenbus_printf(xbt, dev->nodename, "feature-sg", "%d", 1);
+ if (err) {
@@ -67427,13 +96209,12 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ goto abort_transaction;
+ }
+
-+#ifdef HAVE_TSO
-+ err = xenbus_printf(xbt, dev->nodename, "feature-gso-tcpv4", "%d", 1);
++ err = xenbus_printf(xbt, dev->nodename, "feature-gso-tcpv4", "%d",
++ HAVE_TSO);
+ if (err) {
+ message = "writing feature-gso-tcpv4";
+ goto abort_transaction;
+ }
-+#endif
+
+ err = xenbus_transaction_end(xbt, 0);
+ if (err) {
@@ -67449,6 +96230,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ xenbus_transaction_end(xbt, 1);
+ xenbus_dev_fatal(dev, err, "%s", message);
+ destroy_ring:
++ netfront_accelerator_call_remove(info, dev);
+ netif_disconnect_backend(info);
+ out:
+ return err;
@@ -67467,7 +96249,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ info->tx.sring = NULL;
+ info->irq = 0;
+
-+ txs = (struct netif_tx_sring *)get_zeroed_page(GFP_KERNEL);
++ txs = (struct netif_tx_sring *)get_zeroed_page(GFP_KERNEL|__GFP_HIGH);
+ if (!txs) {
+ err = -ENOMEM;
+ xenbus_dev_fatal(dev, err, "allocating tx ring page");
@@ -67483,7 +96265,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ }
+ info->tx_ring_ref = err;
+
-+ rxs = (struct netif_rx_sring *)get_zeroed_page(GFP_KERNEL);
++ rxs = (struct netif_rx_sring *)get_zeroed_page(GFP_KERNEL|__GFP_HIGH);
+ if (!rxs) {
+ err = -ENOMEM;
+ xenbus_dev_fatal(dev, err, "allocating rx ring page");
@@ -67539,7 +96321,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ if (network_connect(netdev) != 0)
+ break;
+ xenbus_switch_state(dev, XenbusStateConnected);
-+ (void)send_fake_arp(netdev);
++ send_fake_arp(netdev);
+ break;
+
+ case XenbusStateClosing:
@@ -67554,8 +96336,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ * @param dev device
+ * @return 0 on success, error code otherwise
+ */
-+static int send_fake_arp(struct net_device *dev)
++static void send_fake_arp(struct net_device *dev)
+{
++#ifdef CONFIG_INET
+ struct sk_buff *skb;
+ u32 src_ip, dst_ip;
+
@@ -67564,16 +96347,17 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+
+ /* No IP? Then nothing to do. */
+ if (src_ip == 0)
-+ return 0;
++ return;
+
+ skb = arp_create(ARPOP_REPLY, ETH_P_ARP,
+ dst_ip, dev, src_ip,
+ /*dst_hw*/ NULL, /*src_hw*/ NULL,
+ /*target_hw*/ dev->dev_addr);
+ if (skb == NULL)
-+ return -ENOMEM;
++ return;
+
-+ return dev_queue_xmit(skb);
++ dev_queue_xmit(skb);
++#endif
+}
+
+static inline int netfront_tx_slot_available(struct netfront_info *np)
@@ -67582,16 +96366,30 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ (TX_MAX_TARGET - MAX_SKB_FRAGS - 2));
+}
+
++
+static inline void network_maybe_wake_tx(struct net_device *dev)
+{
+ struct netfront_info *np = netdev_priv(dev);
+
+ if (unlikely(netif_queue_stopped(dev)) &&
+ netfront_tx_slot_available(np) &&
-+ likely(netif_running(dev)))
++ likely(netif_running(dev)) &&
++ netfront_check_accelerator_queue_ready(dev, np))
+ netif_wake_queue(dev);
+}
+
++
++int netfront_check_queue_ready(struct net_device *dev)
++{
++ struct netfront_info *np = netdev_priv(dev);
++
++ return unlikely(netif_queue_stopped(dev)) &&
++ netfront_tx_slot_available(np) &&
++ likely(netif_running(dev));
++}
++EXPORT_SYMBOL(netfront_check_queue_ready);
++
++
+static int network_open(struct net_device *dev)
+{
+ struct netfront_info *np = netdev_priv(dev);
@@ -67602,8 +96400,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ if (netfront_carrier_ok(np)) {
+ network_alloc_rx_buffers(dev);
+ np->rx.sring->rsp_event = np->rx.rsp_cons + 1;
-+ if (RING_HAS_UNCONSUMED_RESPONSES(&np->rx))
++ if (RING_HAS_UNCONSUMED_RESPONSES(&np->rx)){
++ netfront_accelerator_call_stop_napi_irq(np, dev);
++
+ netif_rx_schedule(dev);
++ }
+ }
+ spin_unlock_bh(&np->rx_lock);
+
@@ -67641,8 +96442,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ "domain.\n");
+ BUG();
+ }
-+ gnttab_end_foreign_access_ref(
-+ np->grant_tx_ref[id], GNTMAP_readonly);
++ gnttab_end_foreign_access_ref(np->grant_tx_ref[id]);
+ gnttab_release_grant_reference(
+ &np->gref_tx_head, np->grant_tx_ref[id]);
+ np->grant_tx_ref[id] = GRANT_INVALID_REF;
@@ -67671,6 +96471,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+static void rx_refill_timeout(unsigned long data)
+{
+ struct net_device *dev = (struct net_device *)data;
++ struct netfront_info *np = netdev_priv(dev);
++
++ netfront_accelerator_call_stop_napi_irq(np, dev);
++
+ netif_rx_schedule(dev);
+}
+
@@ -67810,11 +96614,14 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+
+ /* Zap PTEs and give away pages in one big
+ * multicall. */
-+ (void)HYPERVISOR_multicall(np->rx_mcl, i+1);
++ if (unlikely(HYPERVISOR_multicall(np->rx_mcl, i+1)))
++ BUG();
+
+ /* Check return status of HYPERVISOR_memory_op(). */
+ if (unlikely(np->rx_mcl[i].result != i))
+ panic("Unable to reduce memory reservation\n");
++ while (i--)
++ BUG_ON(np->rx_mcl[i].result);
+ } else {
+ if (HYPERVISOR_memory_op(XENMEM_decrease_reservation,
+ &reservation) != i)
@@ -67862,7 +96669,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+
+ mfn = virt_to_mfn(data);
+ gnttab_grant_foreign_access_ref(ref, np->xbdev->otherend_id,
-+ mfn, GNTMAP_readonly);
++ mfn, GTF_readonly);
+
+ tx->gref = np->grant_tx_ref[id] = ref;
+ tx->offset = offset;
@@ -67884,7 +96691,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+
+ mfn = pfn_to_mfn(page_to_pfn(frag->page));
+ gnttab_grant_foreign_access_ref(ref, np->xbdev->otherend_id,
-+ mfn, GNTMAP_readonly);
++ mfn, GTF_readonly);
+
+ tx->gref = np->grant_tx_ref[id] = ref;
+ tx->offset = frag->page_offset;
@@ -67910,6 +96717,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ unsigned int offset = offset_in_page(data);
+ unsigned int len = skb_headlen(skb);
+
++ /* Check the fast path, if hooks are available */
++ if (np->accel_vif_state.hooks &&
++ np->accel_vif_state.hooks->start_xmit(skb, dev)) {
++ /* Fast path has sent this packet */
++ return 0;
++ }
++
+ frags += (offset + len + PAGE_SIZE - 1) / PAGE_SIZE;
+ if (unlikely(frags > MAX_SKB_FRAGS + 1)) {
+ printk(KERN_ALERT "xennet: skb rides the rocket: %d frags\n",
@@ -67939,7 +96753,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ BUG_ON((signed short)ref < 0);
+ mfn = virt_to_mfn(data);
+ gnttab_grant_foreign_access_ref(
-+ ref, np->xbdev->otherend_id, mfn, GNTMAP_readonly);
++ ref, np->xbdev->otherend_id, mfn, GTF_readonly);
+ tx->gref = np->grant_tx_ref[id] = ref;
+ tx->offset = offset;
+ tx->size = len;
@@ -67954,7 +96768,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ tx->flags |= NETTXF_data_validated;
+#endif
+
-+#ifdef HAVE_TSO
++#if HAVE_TSO
+ if (skb_shinfo(skb)->gso_size) {
+ struct netif_extra_info *gso = (struct netif_extra_info *)
+ RING_GET_REQUEST(&np->tx, ++i);
@@ -68014,8 +96828,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ if (likely(netfront_carrier_ok(np))) {
+ network_tx_buf_gc(dev);
+ /* Under tx_lock: protects access to rx shared-ring indexes. */
-+ if (RING_HAS_UNCONSUMED_RESPONSES(&np->rx))
++ if (RING_HAS_UNCONSUMED_RESPONSES(&np->rx)) {
++ netfront_accelerator_call_stop_napi_irq(np, dev);
++
+ netif_rx_schedule(dev);
++ }
+ }
+
+ spin_unlock_irqrestore(&np->tx_lock, flags);
@@ -68162,7 +96979,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ }
+ pages_flipped++;
+ } else {
-+ ret = gnttab_end_foreign_access_ref(ref, 0);
++ ret = gnttab_end_foreign_access_ref(ref);
+ BUG_ON(!ret);
+ }
+
@@ -68248,9 +97065,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ return -EINVAL;
+ }
+
-+#ifdef HAVE_TSO
++#if HAVE_TSO
+ skb_shinfo(skb)->gso_size = gso->u.gso.size;
-+#ifdef HAVE_GSO
++#if HAVE_GSO
+ skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4;
+
+ /* Header must be checked, and gso_segs computed. */
@@ -68275,7 +97092,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ struct netif_extra_info *extras = rinfo.extras;
+ RING_IDX i, rp;
+ struct multicall_entry *mcl;
-+ int work_done, budget, more_to_do = 1;
++ int work_done, budget, more_to_do = 1, accel_more_to_do = 1;
+ struct sk_buff_head rxq;
+ struct sk_buff_head errq;
+ struct sk_buff_head tmpq;
@@ -68407,8 +97224,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ mcl->args[1] = pages_flipped;
+ mcl->args[2] = 0;
+ mcl->args[3] = DOMID_SELF;
-+ (void)HYPERVISOR_multicall(np->rx_mcl,
-+ pages_flipped + 1);
++ err = HYPERVISOR_multicall_check(np->rx_mcl,
++ pages_flipped + 1,
++ NULL);
++ BUG_ON(err);
+ }
+ }
+
@@ -68442,6 +97261,20 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+
+ network_alloc_rx_buffers(dev);
+
++ if (work_done < budget) {
++ /* there's some spare capacity, try the accelerated path */
++ int accel_budget = budget - work_done;
++ int accel_budget_start = accel_budget;
++
++ if (np->accel_vif_state.hooks) {
++ accel_more_to_do =
++ np->accel_vif_state.hooks->netdev_poll
++ (dev, &accel_budget);
++ work_done += (accel_budget_start - accel_budget);
++ } else
++ accel_more_to_do = 0;
++ }
++
+ *pbudget -= work_done;
+ dev->quota -= work_done;
+
@@ -68449,15 +97282,26 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ local_irq_save(flags);
+
+ RING_FINAL_CHECK_FOR_RESPONSES(&np->rx, more_to_do);
-+ if (!more_to_do)
++
++ if (!more_to_do && !accel_more_to_do &&
++ np->accel_vif_state.hooks) {
++ /*
++ * Slow path has nothing more to do, see if
++ * fast path is likewise
++ */
++ accel_more_to_do =
++ np->accel_vif_state.hooks->start_napi_irq(dev);
++ }
++
++ if (!more_to_do && !accel_more_to_do)
+ __netif_rx_complete(dev);
+
+ local_irq_restore(flags);
+ }
+
+ spin_unlock(&np->rx_lock);
-+
-+ return more_to_do;
++
++ return more_to_do | accel_more_to_do;
+}
+
+static void netif_release_tx_bufs(struct netfront_info *np)
@@ -68470,8 +97314,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ continue;
+
+ skb = np->tx_skbs[i];
-+ gnttab_end_foreign_access_ref(
-+ np->grant_tx_ref[i], GNTMAP_readonly);
++ gnttab_end_foreign_access_ref(np->grant_tx_ref[i]);
+ gnttab_release_grant_reference(
+ &np->gref_tx_head, np->grant_tx_ref[i]);
+ np->grant_tx_ref[i] = GRANT_INVALID_REF;
@@ -68581,7 +97424,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+
+ skb = np->rx_skbs[i];
+
-+ if (!gnttab_end_foreign_access_ref(ref, 0))
++ if (!gnttab_end_foreign_access_ref(ref))
+ {
+ busy++;
+ continue;
@@ -68613,6 +97456,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+static struct net_device_stats *network_get_stats(struct net_device *dev)
+{
+ struct netfront_info *np = netdev_priv(dev);
++
++ netfront_accelerator_call_get_stats(np, dev);
+ return &np->stats;
+}
+
@@ -68645,7 +97490,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+
+static int xennet_set_tso(struct net_device *dev, u32 data)
+{
-+#ifdef HAVE_TSO
+ if (data) {
+ struct netfront_info *np = netdev_priv(dev);
+ int val;
@@ -68658,9 +97502,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ }
+
+ return ethtool_op_set_tso(dev, data);
-+#else
-+ return -ENOSYS;
-+#endif
+}
+
+static void xennet_set_features(struct net_device *dev)
@@ -68678,10 +97519,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ /* Before 2.6.9 TSO seems to be unreliable so do not enable it
+ * on older kernels.
+ */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
-+ xennet_set_tso(dev, 1);
-+#endif
-+
++ if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9))
++ xennet_set_tso(dev, 1);
+}
+
+static int network_connect(struct net_device *dev)
@@ -68796,8 +97635,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ .set_tx_csum = ethtool_op_set_tx_csum,
+ .get_sg = ethtool_op_get_sg,
+ .set_sg = xennet_set_sg,
++#if HAVE_TSO
+ .get_tso = ethtool_op_get_tso,
+ .set_tso = xennet_set_tso,
++#endif
+ .get_link = ethtool_op_get_link,
+};
+
@@ -68963,6 +97804,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ spin_lock_init(&np->tx_lock);
+ spin_lock_init(&np->rx_lock);
+
++ init_accelerator_vif(np, dev);
++
+ skb_queue_head_init(&np->rx_batch);
+ np->rx_target = RX_DFL_MIN_TARGET;
+ np->rx_min_target = RX_DFL_MIN_TARGET;
@@ -69026,6 +97869,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ return ERR_PTR(err);
+}
+
++#ifdef CONFIG_INET
+/*
+ * We use this notifier to send out a fake ARP reply to reset switches and
+ * router ARP caches when an IP interface is brought up on a VIF.
@@ -69038,11 +97882,18 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+
+ /* UP event and is it one of our devices? */
+ if (event == NETDEV_UP && dev->open == network_open)
-+ (void)send_fake_arp(dev);
++ send_fake_arp(dev);
+
+ return NOTIFY_DONE;
+}
+
++static struct notifier_block notifier_inetdev = {
++ .notifier_call = inetdev_notify,
++ .next = NULL,
++ .priority = 0
++};
++#endif
++
+
+static void netif_disconnect_backend(struct netfront_info *info)
+{
@@ -69069,7 +97920,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+static void end_access(int ref, void *page)
+{
+ if (ref != GRANT_INVALID_REF)
-+ gnttab_end_foreign_access(ref, 0, (unsigned long)page);
++ gnttab_end_foreign_access(ref, (unsigned long)page);
+}
+
+
@@ -69089,17 +97940,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ .ids = netfront_ids,
+ .probe = netfront_probe,
+ .remove = __devexit_p(netfront_remove),
++ .suspend = netfront_suspend,
++ .suspend_cancel = netfront_suspend_cancel,
+ .resume = netfront_resume,
+ .otherend_changed = backend_changed,
+};
+
+
-+static struct notifier_block notifier_inetdev = {
-+ .notifier_call = inetdev_notify,
-+ .next = NULL,
-+ .priority = 0
-+};
-+
+static int __init netif_init(void)
+{
+ if (!is_running_on_xen())
@@ -69118,9 +97965,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ if (is_initial_xendomain())
+ return 0;
+
++ netif_init_accel();
++
+ IPRINTK("Initialising virtual ethernet driver.\n");
+
++#ifdef CONFIG_INET
+ (void)register_inetaddr_notifier(&notifier_inetdev);
++#endif
+
+ return xenbus_register_frontend(&netfront);
+}
@@ -69132,16 +97983,298 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/netfront/netfront.c tmp-linux-2.6-x
+ if (is_initial_xendomain())
+ return;
+
++#ifdef CONFIG_INET
+ unregister_inetaddr_notifier(&notifier_inetdev);
++#endif
++
++ netif_exit_accel();
+
+ return xenbus_unregister_driver(&netfront);
+}
+module_exit(netif_exit);
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/netfront/netfront.h linux-2.6.18-xen-3.2.0/drivers/xen/netfront/netfront.h
+--- linux-2.6.18.8/drivers/xen/netfront/netfront.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/netfront/netfront.h 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,274 @@
++/******************************************************************************
++ * Virtual network driver for conversing with remote driver backends.
++ *
++ * Copyright (c) 2002-2005, K A Fraser
++ * Copyright (c) 2005, XenSource Ltd
++ * Copyright (C) 2007 Solarflare Communications, Inc.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License version 2
++ * as published by the Free Software Foundation; or, when distributed
++ * separately from the Linux kernel or incorporated into other
++ * software packages, subject to the following license:
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this source file (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use, copy, modify,
++ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
++ */
++
++#ifndef NETFRONT_H
++#define NETFRONT_H
++
++#include <xen/interface/io/netif.h>
++#include <linux/netdevice.h>
++#include <linux/skbuff.h>
++#include <linux/list.h>
++
++#define NET_TX_RING_SIZE __RING_SIZE((struct netif_tx_sring *)0, PAGE_SIZE)
++#define NET_RX_RING_SIZE __RING_SIZE((struct netif_rx_sring *)0, PAGE_SIZE)
++
++#include <xen/xenbus.h>
++
++#ifdef HAVE_XEN_PLATFORM_COMPAT_H
++#include <xen/platform-compat.h>
++#endif
++
++/*
++ * Function pointer table for hooks into a network acceleration
++ * plugin. These are called at appropriate points from the netfront
++ * driver
++ */
++struct netfront_accel_hooks {
++ /*
++ * new_device: Accelerator hook to ask the plugin to support a
++ * new network interface
++ */
++ int (*new_device)(struct net_device *net_dev, struct xenbus_device *dev);
++ /*
++ * remove: Opposite of new_device
++ */
++ int (*remove)(struct xenbus_device *dev);
++ /*
++ * The net_device is being polled, check the accelerated
++ * hardware for any pending packets
++ */
++ int (*netdev_poll)(struct net_device *dev, int *pbudget);
++ /*
++ * start_xmit: Used to give the accelerated plugin the option
++ * of sending a packet. Returns non-zero if has done so, or
++ * zero to decline and force the packet onto normal send
++ * path
++ */
++ int (*start_xmit)(struct sk_buff *skb, struct net_device *dev);
++ /*
++ * start/stop_napi_interrupts Used by netfront to indicate
++ * when napi interrupts should be enabled or disabled
++ */
++ int (*start_napi_irq)(struct net_device *dev);
++ void (*stop_napi_irq)(struct net_device *dev);
++ /*
++ * Called before re-enabling the TX queue to check the fast
++ * path has slots too
++ */
++ int (*check_ready)(struct net_device *dev);
++ /*
++ * Get the fastpath network statistics
++ */
++ int (*get_stats)(struct net_device *dev,
++ struct net_device_stats *stats);
++};
++
++
++/* Version of API/protocol for communication between netfront and
++ acceleration plugin supported */
++#define NETFRONT_ACCEL_VERSION 0x00010003
++
++/*
++ * Per-netfront device state for the accelerator. This is used to
++ * allow efficient per-netfront device access to the accelerator
++ * hooks
++ */
++struct netfront_accel_vif_state {
++ struct list_head link;
++
++ struct xenbus_device *dev;
++ struct netfront_info *np;
++ struct netfront_accel_hooks *hooks;
++
++ /* Watch on the accelerator configuration value */
++ struct xenbus_watch accel_watch;
++ /* Work item to process change in accelerator */
++ struct work_struct accel_work;
++ /* The string from xenbus last time accel_watch fired */
++ char *accel_frontend;
++};
++
++/*
++ * Per-accelerator state stored in netfront. These form a list that
++ * is used to track which devices are accelerated by which plugins,
++ * and what plugins are available/have been requested
++ */
++struct netfront_accelerator {
++ /* Used to make a list */
++ struct list_head link;
++ /* ID of the accelerator */
++ int id;
++ /*
++ * String describing the accelerator. Currently this is the
++ * name of the accelerator module. This is provided by the
++ * backend accelerator through xenstore
++ */
++ char *frontend;
++ /* The hooks into the accelerator plugin module */
++ struct netfront_accel_hooks *hooks;
++
++ /*
++ * List of per-netfront device state (struct
++ * netfront_accel_vif_state) for each netfront device that is
++ * using this accelerator
++ */
++ struct list_head vif_states;
++ spinlock_t vif_states_lock;
++};
++
++struct netfront_info {
++ struct list_head list;
++ struct net_device *netdev;
++
++ struct net_device_stats stats;
++
++ struct netif_tx_front_ring tx;
++ struct netif_rx_front_ring rx;
++
++ spinlock_t tx_lock;
++ spinlock_t rx_lock;
++
++ unsigned int irq;
++ unsigned int copying_receiver;
++ unsigned int carrier;
++
++ /* Receive-ring batched refills. */
++#define RX_MIN_TARGET 8
++#define RX_DFL_MIN_TARGET 64
++#define RX_MAX_TARGET min_t(int, NET_RX_RING_SIZE, 256)
++ unsigned rx_min_target, rx_max_target, rx_target;
++ struct sk_buff_head rx_batch;
++
++ struct timer_list rx_refill_timer;
++
++ /*
++ * {tx,rx}_skbs store outstanding skbuffs. The first entry in tx_skbs
++ * is an index into a chain of free entries.
++ */
++ struct sk_buff *tx_skbs[NET_TX_RING_SIZE+1];
++ struct sk_buff *rx_skbs[NET_RX_RING_SIZE];
++
++#define TX_MAX_TARGET min_t(int, NET_RX_RING_SIZE, 256)
++ grant_ref_t gref_tx_head;
++ grant_ref_t grant_tx_ref[NET_TX_RING_SIZE + 1];
++ grant_ref_t gref_rx_head;
++ grant_ref_t grant_rx_ref[NET_RX_RING_SIZE];
++
++ struct xenbus_device *xbdev;
++ int tx_ring_ref;
++ int rx_ring_ref;
++ u8 mac[ETH_ALEN];
++
++ unsigned long rx_pfn_array[NET_RX_RING_SIZE];
++ struct multicall_entry rx_mcl[NET_RX_RING_SIZE+1];
++ struct mmu_update rx_mmu[NET_RX_RING_SIZE];
++
++ /* Private pointer to state internal to accelerator module */
++ void *accel_priv;
++ /* The accelerator used by this netfront device */
++ struct netfront_accelerator *accelerator;
++ /* The accelerator state for this netfront device */
++ struct netfront_accel_vif_state accel_vif_state;
++};
++
++
++/* Exported Functions */
++
++/*
++ * Called by an accelerator plugin module when it has loaded.
++ *
++ * frontend: the string describing the accelerator, currently the module name
++ * hooks: the hooks for netfront to use to call into the accelerator
++ * version: the version of API between frontend and plugin requested
++ *
++ * return: 0 on success, <0 on error, >0 (with version supported) on
++ * version mismatch
++ */
++extern int netfront_accelerator_loaded(int version, const char *frontend,
++ struct netfront_accel_hooks *hooks);
++
++/*
++ * Called by an accelerator plugin module when it is about to unload.
++ *
++ * frontend: the string describing the accelerator. Must match the
++ * one passed to netfront_accelerator_loaded()
++ */
++extern void netfront_accelerator_stop(const char *frontend);
++
++/*
++ * Called by an accelerator before waking the net device's TX queue to
++ * ensure the slow path has available slots. Returns true if OK to
++ * wake, false if still busy
++ */
++extern int netfront_check_queue_ready(struct net_device *net_dev);
++
++
++/* Internal-to-netfront Functions */
++
++/*
++ * Call into accelerator and check to see if it has tx space before we
++ * wake the net device's TX queue. Returns true if OK to wake, false
++ * if still busy
++ */
++extern
++int netfront_check_accelerator_queue_ready(struct net_device *dev,
++ struct netfront_info *np);
++extern
++int netfront_accelerator_call_remove(struct netfront_info *np,
++ struct xenbus_device *dev);
++extern
++int netfront_accelerator_suspend(struct netfront_info *np,
++ struct xenbus_device *dev);
++extern
++int netfront_accelerator_suspend_cancel(struct netfront_info *np,
++ struct xenbus_device *dev);
++extern
++void netfront_accelerator_resume(struct netfront_info *np,
++ struct xenbus_device *dev);
++extern
++void netfront_accelerator_call_stop_napi_irq(struct netfront_info *np,
++ struct net_device *dev);
++extern
++int netfront_accelerator_call_get_stats(struct netfront_info *np,
++ struct net_device *dev);
++extern
++void netfront_accelerator_add_watch(struct netfront_info *np);
++
++extern
++void netif_init_accel(void);
++extern
++void netif_exit_accel(void);
++
++extern
++void init_accelerator_vif(struct netfront_info *np,
++ struct xenbus_device *dev);
++#endif /* NETFRONT_H */
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/pciback/Makefile
+--- linux-2.6.18.8/drivers/xen/pciback/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,16 @@
+obj-$(CONFIG_XEN_PCIDEV_BACKEND) += pciback.o
+
@@ -69159,9 +98292,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/Makefile tmp-linux-2.6-xen.
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/conf_space.c linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space.c
+--- linux-2.6.18.8/drivers/xen/pciback/conf_space.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,426 @@
+/*
+ * PCI Backend - Functions for creating a virtual configuration space for
@@ -69589,9 +98722,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space.c tmp-linux-2.6-
+{
+ return pciback_config_capability_init();
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/conf_space.h linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space.h
+--- linux-2.6.18.8/drivers/xen/pciback/conf_space.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space.h 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,126 @@
+/*
+ * PCI Backend - Common data structures for overriding the configuration space
@@ -69719,9 +98852,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space.h tmp-linux-2.6-
+int pciback_config_capability_add_fields(struct pci_dev *dev);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/conf_space_capability.c linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_capability.c
+--- linux-2.6.18.8/drivers/xen/pciback/conf_space_capability.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_capability.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,71 @@
+/*
+ * PCI Backend - Handles the virtual fields found on the capability lists
@@ -69794,9 +98927,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability.c tmp
+
+ return 0;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/conf_space_capability.h linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_capability.h
+--- linux-2.6.18.8/drivers/xen/pciback/conf_space_capability.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_capability.h 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,23 @@
+/*
+ * PCI Backend - Data structures for special overlays for structures on
@@ -69821,9 +98954,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/conf_space_capability_pm.c linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_capability_pm.c
+--- linux-2.6.18.8/drivers/xen/pciback/conf_space_capability_pm.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_capability_pm.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,128 @@
+/*
+ * PCI Backend - Configuration space overlay for power management
@@ -69953,9 +99086,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability_pm.c
+ .capability = PCI_CAP_ID_PM,
+ .fields = caplist_pm,
+};
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/conf_space_capability_vpd.c linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_capability_vpd.c
+--- linux-2.6.18.8/drivers/xen/pciback/conf_space_capability_vpd.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_capability_vpd.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,42 @@
+/*
+ * PCI Backend - Configuration space overlay for Vital Product Data
@@ -69999,9 +99132,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_capability_vpd.c
+ .capability = PCI_CAP_ID_VPD,
+ .fields = caplist_vpd,
+};
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/conf_space_header.c linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_header.c
+--- linux-2.6.18.8/drivers/xen/pciback/conf_space_header.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_header.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,323 @@
+/*
+ * PCI Backend - Handles the virtual fields in the configuration space headers.
@@ -70326,9 +99459,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_header.c tmp-lin
+ out:
+ return err;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/conf_space_quirks.c linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_quirks.c
+--- linux-2.6.18.8/drivers/xen/pciback/conf_space_quirks.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_quirks.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,126 @@
+/*
+ * PCI Backend - Handle special overlays for broken devices.
@@ -70456,9 +99589,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/conf_space_quirks.c tmp-lin
+ out:
+ return ret;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/conf_space_quirks.h linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_quirks.h
+--- linux-2.6.18.8/drivers/xen/pciback/conf_space_quirks.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/conf_space_quirks.h 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,35 @@
+/*
+ * PCI Backend - Data structures for special overlays for broken devices.
@@ -70495,9 +99628,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/controller.c linux-2.6.18-xen-3.2.0/drivers/xen/pciback/controller.c
+--- linux-2.6.18.8/drivers/xen/pciback/controller.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/controller.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,404 @@
+/*
+ * Copyright (C) 2007 Hewlett-Packard Development Company, L.P.
@@ -70903,9 +100036,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/controller.c tmp-linux-2.6-
+ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/passthrough.c linux-2.6.18-xen-3.2.0/drivers/xen/pciback/passthrough.c
+--- linux-2.6.18.8/drivers/xen/pciback/passthrough.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/passthrough.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,157 @@
+/*
+ * PCI Backend - Provides restricted access to the real PCI bus topology
@@ -71064,9 +100197,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/passthrough.c tmp-linux-2.6
+ kfree(dev_data);
+ pdev->pci_dev_data = NULL;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/pci_stub.c linux-2.6.18-xen-3.2.0/drivers/xen/pciback/pci_stub.c
+--- linux-2.6.18.8/drivers/xen/pciback/pci_stub.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/pci_stub.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,929 @@
+/*
+ * PCI Stub Driver - Grabs devices in backend to be exported later
@@ -71997,9 +101130,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/pci_stub.c tmp-linux-2.6-xe
+module_exit(pciback_cleanup);
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/pciback.h linux-2.6.18-xen-3.2.0/drivers/xen/pciback/pciback.h
+--- linux-2.6.18.8/drivers/xen/pciback/pciback.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/pciback.h 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,93 @@
+/*
+ * PCI Backend Common Data Structures & Function Declarations
@@ -72094,9 +101227,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/pciback.h tmp-linux-2.6-xen
+
+extern int verbose_request;
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/pciback_ops.c linux-2.6.18-xen-3.2.0/drivers/xen/pciback/pciback_ops.c
+--- linux-2.6.18.8/drivers/xen/pciback/pciback_ops.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/pciback_ops.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,95 @@
+/*
+ * PCI Backend Operations - respond to PCI requests from Frontend
@@ -72193,9 +101326,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/pciback_ops.c tmp-linux-2.6
+
+ return IRQ_HANDLED;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/slot.c linux-2.6.18-xen-3.2.0/drivers/xen/pciback/slot.c
+--- linux-2.6.18.8/drivers/xen/pciback/slot.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/slot.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,151 @@
+/*
+ * PCI Backend - Provides a Virtual PCI bus (with real devices)
@@ -72348,9 +101481,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/slot.c tmp-linux-2.6-xen.pa
+ kfree(slot_dev);
+ pdev->pci_dev_data = NULL;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/vpci.c linux-2.6.18-xen-3.2.0/drivers/xen/pciback/vpci.c
+--- linux-2.6.18.8/drivers/xen/pciback/vpci.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/vpci.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,204 @@
+/*
+ * PCI Backend - Provides a Virtual PCI bus (with real devices)
@@ -72556,9 +101689,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/vpci.c tmp-linux-2.6-xen.pa
+ kfree(vpci_dev);
+ pdev->pci_dev_data = NULL;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pciback/xenbus.c linux-2.6.18-xen-3.2.0/drivers/xen/pciback/xenbus.c
+--- linux-2.6.18.8/drivers/xen/pciback/xenbus.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pciback/xenbus.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,454 @@
+/*
+ * PCI Backend Xenbus Setup - handles setup with frontend and xend
@@ -73014,9 +102147,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pciback/xenbus.c tmp-linux-2.6-xen.
+{
+ xenbus_unregister_driver(&xenbus_pciback_driver);
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pcifront/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/pcifront/Makefile
+--- linux-2.6.18.8/drivers/xen/pcifront/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pcifront/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,7 @@
+obj-y += pcifront.o
+
@@ -73025,9 +102158,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/Makefile tmp-linux-2.6-xen
+ifeq ($(CONFIG_XEN_PCIDEV_FE_DEBUG),y)
+EXTRA_CFLAGS += -DDEBUG
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pcifront/pci.c linux-2.6.18-xen-3.2.0/drivers/xen/pcifront/pci.c
+--- linux-2.6.18.8/drivers/xen/pcifront/pci.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pcifront/pci.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,46 @@
+/*
+ * PCI Frontend Operations - ensure only one PCI frontend runs at a time
@@ -73075,9 +102208,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/pci.c tmp-linux-2.6-xen.pa
+
+ spin_unlock(&pcifront_dev_lock);
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pcifront/pci_op.c linux-2.6.18-xen-3.2.0/drivers/xen/pcifront/pci_op.c
+--- linux-2.6.18.8/drivers/xen/pcifront/pci_op.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pcifront/pci_op.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,386 @@
+/*
+ * PCI Frontend Operations - Communicates with frontend
@@ -73465,9 +102598,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/pci_op.c tmp-linux-2.6-xen
+ kfree(bus_entry);
+ }
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pcifront/pcifront.h linux-2.6.18-xen-3.2.0/drivers/xen/pcifront/pcifront.h
+--- linux-2.6.18.8/drivers/xen/pcifront/pcifront.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pcifront/pcifront.h 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,40 @@
+/*
+ * PCI Frontend - Common data structures & function declarations
@@ -73509,9 +102642,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/pcifront.h tmp-linux-2.6-x
+void pcifront_free_roots(struct pcifront_device *pdev);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/pcifront/xenbus.c linux-2.6.18-xen-3.2.0/drivers/xen/pcifront/xenbus.c
+--- linux-2.6.18.8/drivers/xen/pcifront/xenbus.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/pcifront/xenbus.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,296 @@
+/*
+ * PCI Frontend Xenbus Setup - handles setup with backend (imports page/evtchn)
@@ -73572,7 +102705,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/xenbus.c tmp-linux-2.6-xen
+ xenbus_free_evtchn(pdev->xdev, pdev->evtchn);
+
+ if (pdev->gnt_ref != INVALID_GRANT_REF)
-+ gnttab_end_foreign_access(pdev->gnt_ref, 0,
++ gnttab_end_foreign_access(pdev->gnt_ref,
+ (unsigned long)pdev->sh_info);
+
+ pdev->xdev->dev.driver_data = NULL;
@@ -73809,15 +102942,93 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/pcifront/xenbus.c tmp-linux-2.6-xen
+
+/* Initialize after the Xen PCI Frontend Stub is initialized */
+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,2 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/privcmd/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/privcmd/Makefile
+--- linux-2.6.18.8/drivers/xen/privcmd/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/privcmd/Makefile 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,3 @@
++
++obj-y += privcmd.o
++obj-$(CONFIG_COMPAT) += compat_privcmd.o
+diff -rpuN linux-2.6.18.8/drivers/xen/privcmd/compat_privcmd.c linux-2.6.18-xen-3.2.0/drivers/xen/privcmd/compat_privcmd.c
+--- linux-2.6.18.8/drivers/xen/privcmd/compat_privcmd.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/privcmd/compat_privcmd.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,73 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Jimi Xenidis <jimix@watson.ibm.com>
++ */
+
-+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-11-14 15:35:27.000000000 -0800
++#include <linux/config.h>
++#include <linux/compat.h>
++#include <linux/ioctl.h>
++#include <linux/syscalls.h>
++#include <asm/hypervisor.h>
++#include <asm/uaccess.h>
++#include <xen/public/privcmd.h>
++#include <xen/compat_ioctl.h>
++
++int privcmd_ioctl_32(int fd, unsigned int cmd, unsigned long arg)
++{
++ int ret;
++
++ switch (cmd) {
++ case IOCTL_PRIVCMD_MMAP_32: {
++ struct privcmd_mmap *p;
++ struct privcmd_mmap_32 *p32;
++ struct privcmd_mmap_32 n32;
++
++ p32 = compat_ptr(arg);
++ p = compat_alloc_user_space(sizeof(*p));
++ if (copy_from_user(&n32, p32, sizeof(n32)) ||
++ put_user(n32.num, &p->num) ||
++ put_user(n32.dom, &p->dom) ||
++ put_user(compat_ptr(n32.entry), &p->entry))
++ return -EFAULT;
++
++ ret = sys_ioctl(fd, IOCTL_PRIVCMD_MMAP, (unsigned long)p);
++ }
++ break;
++ case IOCTL_PRIVCMD_MMAPBATCH_32: {
++ struct privcmd_mmapbatch *p;
++ struct privcmd_mmapbatch_32 *p32;
++ struct privcmd_mmapbatch_32 n32;
++
++ p32 = compat_ptr(arg);
++ p = compat_alloc_user_space(sizeof(*p));
++ if (copy_from_user(&n32, p32, sizeof(n32)) ||
++ put_user(n32.num, &p->num) ||
++ put_user(n32.dom, &p->dom) ||
++ put_user(n32.addr, &p->addr) ||
++ put_user(compat_ptr(n32.arr), &p->arr))
++ return -EFAULT;
++
++ ret = sys_ioctl(fd, IOCTL_PRIVCMD_MMAPBATCH, (unsigned long)p);
++ }
++ break;
++ default:
++ ret = -EINVAL;
++ break;
++ }
++ return ret;
++}
+diff -rpuN linux-2.6.18.8/drivers/xen/privcmd/privcmd.c linux-2.6.18-xen-3.2.0/drivers/xen/privcmd/privcmd.c
+--- linux-2.6.18.8/drivers/xen/privcmd/privcmd.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/privcmd/privcmd.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,286 @@
+/******************************************************************************
+ * privcmd.c
@@ -73839,7 +103050,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen
+#include <linux/highmem.h>
+#include <linux/pagemap.h>
+#include <linux/seq_file.h>
-+#include <linux/kthread.h>
+#include <asm/hypervisor.h>
+
+#include <asm/pgalloc.h>
@@ -73850,6 +103060,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen
+#include <xen/public/privcmd.h>
+#include <xen/interface/xen.h>
+#include <xen/xen_proc.h>
++#include <xen/features.h>
+
+static struct proc_dir_entry *privcmd_intf;
+static struct proc_dir_entry *capabilities_intf;
@@ -73907,7 +103118,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen
+ "g" (hypercall.arg[4])
+ : "r8", "r10", "memory" );
+ }
-+#elif defined (__ia64__)
++#else
+ ret = privcmd_hypercall(&hypercall);
+#endif
+ }
@@ -73932,7 +103143,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen
+ if (copy_from_user(&msg, p, sizeof(msg)))
+ return -EFAULT;
+
-+ down_read(&mm->mmap_sem);
++ down_write(&mm->mmap_sem);
+
+ vma = find_vma(mm, msg.va);
+ rc = -EINVAL;
@@ -73974,7 +103185,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen
+ rc = 0;
+
+ mmap_out:
-+ up_read(&mm->mmap_sem);
++ up_write(&mm->mmap_sem);
+ ret = rc;
+ }
+ break;
@@ -73997,14 +103208,14 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen
+ if ((m.num <= 0) || (nr_pages > (LONG_MAX >> PAGE_SHIFT)))
+ return -EINVAL;
+
-+ down_read(&mm->mmap_sem);
++ down_write(&mm->mmap_sem);
+
+ vma = find_vma(mm, m.addr);
+ if (!vma ||
+ (m.addr != vma->vm_start) ||
+ ((m.addr + (nr_pages << PAGE_SHIFT)) != vma->vm_end) ||
+ !privcmd_enforce_singleshot_mapping(vma)) {
-+ up_read(&mm->mmap_sem);
++ up_write(&mm->mmap_sem);
+ return -EINVAL;
+ }
+
@@ -74012,7 +103223,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen
+ addr = m.addr;
+ for (i = 0; i < nr_pages; i++, addr += PAGE_SIZE, p++) {
+ if (get_user(mfn, p)) {
-+ up_read(&mm->mmap_sem);
++ up_write(&mm->mmap_sem);
+ return -EFAULT;
+ }
+
@@ -74023,7 +103234,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen
+ put_user(0xF0000000 | mfn, p);
+ }
+
-+ up_read(&mm->mmap_sem);
++ up_write(&mm->mmap_sem);
+ ret = 0;
+ }
+ break;
@@ -74105,17 +103316,17 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/tpmback/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/tpmback/Makefile
+--- linux-2.6.18.8/drivers/xen/tpmback/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/tpmback/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,4 @@
+
+obj-$(CONFIG_XEN_TPMDEV_BACKEND) += tpmbk.o
+
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/tpmback/common.h linux-2.6.18-xen-3.2.0/drivers/xen/tpmback/common.h
+--- linux-2.6.18.8/drivers/xen/tpmback/common.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/tpmback/common.h 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,85 @@
+/******************************************************************************
+ * drivers/xen/tpmback/common.h
@@ -74202,10 +103413,10 @@ 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,167 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/tpmback/interface.c linux-2.6.18-xen-3.2.0/drivers/xen/tpmback/interface.c
+--- linux-2.6.18.8/drivers/xen/tpmback/interface.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/tpmback/interface.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,168 @@
+ /*****************************************************************************
+ * drivers/xen/tpmback/interface.c
+ *
@@ -74334,6 +103545,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/tpmback/interface.c tmp-linux-2.6-x
+ }
+
+ tpmif->tx = (tpmif_tx_interface_t *)tpmif->tx_area->addr;
++ memset(tpmif->tx, 0, PAGE_SIZE);
+
+ err = bind_interdomain_evtchn_to_irqhandler(
+ tpmif->domid, evtchn, tpmif_be_int, 0, tpmif->devname, tpmif);
@@ -74373,9 +103585,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/tpmback/interface.c tmp-linux-2.6-x
+{
+ kmem_cache_destroy(tpmif_cachep);
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/tpmback/tpmback.c linux-2.6.18-xen-3.2.0/drivers/xen/tpmback/tpmback.c
+--- linux-2.6.18.8/drivers/xen/tpmback/tpmback.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/tpmback/tpmback.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,944 @@
+/******************************************************************************
+ * drivers/xen/tpmback/tpmback.c
@@ -75321,9 +104533,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/tpmback/xenbus.c linux-2.6.18-xen-3.2.0/drivers/xen/tpmback/xenbus.c
+--- linux-2.6.18.8/drivers/xen/tpmback/xenbus.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/tpmback/xenbus.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,289 @@
+/* Xenbus code for tpmif backend
+ Copyright (C) 2005 IBM Corporation
@@ -75614,10 +104826,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/tpmback/xenbus.c tmp-linux-2.6-xen.
+{
+ xenbus_unregister_driver(&tpmback);
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,70 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/util.c linux-2.6.18-xen-3.2.0/drivers/xen/util.c
+--- linux-2.6.18.8/drivers/xen/util.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/util.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,65 @@
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/slab.h>
@@ -75642,9 +104854,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/util.c tmp-linux-2.6-xen.patch/driv
+}
+EXPORT_SYMBOL_GPL(get_xen_class);
+
-+/* Todo: merge ia64 ('auto-translate physmap') versions of these functions. */
-+#ifndef __ia64__
-+
++#ifdef CONFIG_X86
+static int f(pte_t *pte, struct page *pmd_page, unsigned long addr, void *data)
+{
+ /* apply_to_page_range() does all the hard work. */
@@ -75670,9 +104880,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/util.c tmp-linux-2.6-xen.patch/driv
+ }
+
+ /* Map page directories into every address space. */
-+#ifdef CONFIG_X86
+ vmalloc_sync_all();
-+#endif
+
+ return area;
+}
@@ -75686,11 +104894,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/util.c tmp-linux-2.6-xen.patch/driv
+ kfree(area);
+}
+EXPORT_SYMBOL_GPL(free_vm_area);
-+
-+#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-11-14 15:35:27.000000000 -0800
++#endif /* CONFIG_X86 */
+diff -rpuN linux-2.6.18.8/drivers/xen/xenbus/Makefile linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/Makefile
+--- linux-2.6.18.8/drivers/xen/xenbus/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/Makefile 2008-02-15 16:22:06.000000000 -0800
@@ -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
@@ -75701,9 +104908,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/Makefile tmp-linux-2.6-xen.p
+xenbus-$(CONFIG_XEN_BACKEND) += xenbus_probe_backend.o
+obj-y += $(xenbus-y) $(xenbus-m)
+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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/xenbus/xenbus_backend_client.c linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_backend_client.c
+--- linux-2.6.18.8/drivers/xen/xenbus/xenbus_backend_client.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_backend_client.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,147 @@
+/******************************************************************************
+ * Backend-client-facing interface for the Xenbus driver. In other words, the
@@ -75852,10 +105059,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_backend_client.c tmp-
+EXPORT_SYMBOL_GPL(xenbus_dev_is_online);
+
+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,283 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/xenbus/xenbus_client.c linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_client.c
+--- linux-2.6.18.8/drivers/xen/xenbus/xenbus_client.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_client.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,284 @@
+/******************************************************************************
+ * Client-facing interface for the Xenbus driver. In other words, the
+ * interface between the Xenbus and the device-specific code, be it the
@@ -75888,6 +105095,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_client.c tmp-linux-2.
+ * IN THE SOFTWARE.
+ */
+
++#include <linux/slab.h>
+#include <xen/evtchn.h>
+#include <xen/gnttab.h>
+#include <xen/xenbus.h>
@@ -75944,7 +105152,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_client.c tmp-linux-2.
+ const char **, unsigned int))
+{
+ int err;
-+ char *state = kasprintf(GFP_KERNEL, "%s/%s", path, path2);
++ char *state = kasprintf(GFP_KERNEL|__GFP_HIGH, "%s/%s", path, path2);
+ if (!state) {
+ xenbus_dev_fatal(dev, -ENOMEM, "allocating path for watch");
+ return -ENOMEM;
@@ -76139,10 +105347,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_client.c tmp-linux-2.
+ return result;
+}
+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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,232 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/xenbus/xenbus_comms.c linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_comms.c
+--- linux-2.6.18.8/drivers/xen/xenbus/xenbus_comms.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_comms.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,233 @@
+/******************************************************************************
+ * xenbus_comms.c
+ *
@@ -76180,6 +105388,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_comms.c tmp-linux-2.6
+#include <linux/sched.h>
+#include <linux/err.h>
+#include <linux/ptrace.h>
++#include <linux/workqueue.h>
+#include <xen/evtchn.h>
+#include <xen/xenbus.h>
+
@@ -76375,9 +105584,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_comms.c tmp-linux-2.6
+
+ return 0;
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/xenbus/xenbus_comms.h linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_comms.h
+--- linux-2.6.18.8/drivers/xen/xenbus/xenbus_comms.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_comms.h 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,46 @@
+/*
+ * Private include for xenbus communications.
@@ -76425,9 +105634,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_comms.h tmp-linux-2.6
+extern int xen_store_evtchn;
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/drivers/xen/xenbus/xenbus_dev.c linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_dev.c
+--- linux-2.6.18.8/drivers/xen/xenbus/xenbus_dev.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_dev.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,404 @@
+/*
+ * xenbus_dev.c
@@ -76833,16 +106042,17 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_dev.c tmp-linux-2.6-x
+
+ return 0;
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,1132 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/xenbus/xenbus_probe.c linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_probe.c
+--- linux-2.6.18.8/drivers/xen/xenbus/xenbus_probe.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_probe.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,1150 @@
+/******************************************************************************
+ * Talks to Xen Store to figure out what devices we have.
+ *
+ * Copyright (C) 2005 Rusty Russell, IBM Corporation
+ * Copyright (C) 2005 Mike Wray, Hewlett-Packard
+ * Copyright (C) 2005, 2006 XenSource Ltd
++ * Copyright (C) 2007 Solarflare Communications, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version 2
@@ -76880,8 +106090,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+#include <linux/fcntl.h>
+#include <linux/mm.h>
+#include <linux/notifier.h>
-+#include <linux/kthread.h>
+#include <linux/mutex.h>
++#include <linux/module.h>
+
+#include <asm/io.h>
+#include <asm/page.h>
@@ -76892,7 +106102,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+#include <xen/xen_proc.h>
+#include <xen/evtchn.h>
+#include <xen/features.h>
++#ifdef MODULE
+#include <xen/hvm.h>
++#endif
+
+#include "xenbus_comms.h"
+#include "xenbus_probe.h"
@@ -76907,7 +106119,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+
+extern struct mutex xenwatch_mutex;
+
-+static ATOMIC_NOTIFIER_HEAD(xenstore_chain);
++static BLOCKING_NOTIFIER_HEAD(xenstore_chain);
+
+static void wait_for_devices(struct xenbus_driver *xendrv);
+
@@ -77663,7 +106875,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+ if (xenstored_ready > 0)
+ ret = nb->notifier_call(nb, 0, NULL);
+ else
-+ atomic_notifier_chain_register(&xenstore_chain, nb);
++ blocking_notifier_chain_register(&xenstore_chain, nb);
+
+ return ret;
+}
@@ -77671,7 +106883,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+
+void unregister_xenstore_notifier(struct notifier_block *nb)
+{
-+ atomic_notifier_chain_unregister(&xenstore_chain, nb);
++ blocking_notifier_chain_unregister(&xenstore_chain, nb);
+}
+EXPORT_SYMBOL_GPL(unregister_xenstore_notifier);
+
@@ -77686,7 +106898,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+ xenbus_backend_probe_and_watch();
+
+ /* Notify others that xenstore is up */
-+ atomic_notifier_call_chain(&xenstore_chain, 0, NULL);
++ blocking_notifier_call_chain(&xenstore_chain, 0, NULL);
+}
+
+
@@ -77889,6 +107101,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;
+
+ /* Is this operation limited to a particular driver? */
+ if (drv && (dev->driver != drv))
@@ -77898,7 +107111,10 @@ 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) {
++ return 0;
++ }
++
++ if (xendev->state < XenbusStateConnected) {
+ enum xenbus_state rstate = XenbusStateUnknown;
+ if (xendev->otherend)
+ rstate = xenbus_read_driver_state(xendev->otherend);
@@ -77907,6 +107123,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+ xendev->nodename, xendev->state, rstate);
+ }
+
++ xendrv = to_xenbus_driver(dev->driver);
++ if (xendrv->is_ready && !xendrv->is_ready(xendev))
++ printk(KERN_WARNING "XENBUS: Device not ready: %s\n",
++ xendev->nodename);
++
+ return 0;
+}
+
@@ -77969,9 +107190,15 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6
+
+late_initcall(boot_wait_for_devices);
+#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-11-14 15:35:27.000000000 -0800
++
++int xenbus_for_each_frontend(void *arg, int (*fn)(struct device *, void *))
++{
++ return bus_for_each_dev(&xenbus_frontend.bus, NULL, arg, fn);
++}
++EXPORT_SYMBOL_GPL(xenbus_for_each_frontend);
+diff -rpuN linux-2.6.18.8/drivers/xen/xenbus/xenbus_probe.h linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_probe.h
+--- linux-2.6.18.8/drivers/xen/xenbus/xenbus_probe.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_probe.h 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,75 @@
+/******************************************************************************
+ * xenbus_probe.h
@@ -78048,16 +107275,17 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe.h tmp-linux-2.6
+
+#endif
+
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,287 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/xenbus/xenbus_probe_backend.c linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_probe_backend.c
+--- linux-2.6.18.8/drivers/xen/xenbus/xenbus_probe_backend.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_probe_backend.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,292 @@
+/******************************************************************************
+ * Talks to Xen Store to figure out what devices we have (backend half).
+ *
+ * Copyright (C) 2005 Rusty Russell, IBM Corporation
+ * Copyright (C) 2005 Mike Wray, Hewlett-Packard
+ * Copyright (C) 2005, 2006 XenSource Ltd
++ * Copyright (C) 2007 Solarflare Communications, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version 2
@@ -78095,7 +107323,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe_backend.c tmp-l
+#include <linux/fcntl.h>
+#include <linux/mm.h>
+#include <linux/notifier.h>
-+#include <linux/kthread.h>
+
+#include <asm/io.h>
+#include <asm/page.h>
@@ -78106,7 +107333,6 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe_backend.c tmp-l
+#include <xen/xen_proc.h>
+#include <xen/evtchn.h>
+#include <xen/features.h>
-+#include <xen/hvm.h>
+
+#include "xenbus_comms.h"
+#include "xenbus_probe.h"
@@ -78339,9 +107565,15 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_probe_backend.c tmp-l
+ xenbus_backend.error);
+ }
+}
-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-11-14 15:35:27.000000000 -0800
++
++int xenbus_for_each_backend(void *arg, int (*fn)(struct device *, void *))
++{
++ return bus_for_each_dev(&xenbus_backend.bus, NULL, arg, fn);
++}
++EXPORT_SYMBOL_GPL(xenbus_for_each_backend);
+diff -rpuN linux-2.6.18.8/drivers/xen/xenbus/xenbus_xs.c linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_xs.c
+--- linux-2.6.18.8/drivers/xen/xenbus/xenbus_xs.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/xenbus/xenbus_xs.c 2008-02-15 16:22:06.000000000 -0800
@@ -0,0 +1,886 @@
+/******************************************************************************
+ * xenbus_xs.c
@@ -78636,9 +107868,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xe
+ char *buffer;
+
+ if (strlen(name) == 0)
-+ buffer = kasprintf(GFP_KERNEL, "%s", dir);
++ buffer = kasprintf(GFP_KERNEL|__GFP_HIGH, "%s", dir);
+ else
-+ buffer = kasprintf(GFP_KERNEL, "%s/%s", dir, name);
++ buffer = kasprintf(GFP_KERNEL|__GFP_HIGH, "%s/%s", dir, name);
+ return (!buffer) ? ERR_PTR(-ENOMEM) : buffer;
+}
+
@@ -78650,7 +107882,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xe
+ *num = count_strings(strings, len);
+
+ /* Transfer to one big alloc for easy freeing. */
-+ ret = kmalloc(*num * sizeof(char *) + len, GFP_KERNEL);
++ ret = kmalloc(*num * sizeof(char *) + len, GFP_KERNEL|__GFP_HIGH);
+ if (!ret) {
+ kfree(strings);
+ return ERR_PTR(-ENOMEM);
@@ -78851,7 +108083,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xe
+#define PRINTF_BUFFER_SIZE 4096
+ char *printf_buffer;
+
-+ printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_KERNEL);
++ printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_KERNEL|__GFP_HIGH);
+ if (printf_buffer == NULL)
+ return -ENOMEM;
+
@@ -79120,7 +108352,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xe
+ }
+
+
-+ msg = kmalloc(sizeof(*msg), GFP_KERNEL);
++ msg = kmalloc(sizeof(*msg), GFP_KERNEL|__GFP_HIGH);
+ if (msg == NULL) {
+ err = -ENOMEM;
+ goto out;
@@ -79132,7 +108364,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xe
+ goto out;
+ }
+
-+ body = kmalloc(msg->hdr.len + 1, GFP_KERNEL);
++ body = kmalloc(msg->hdr.len + 1, GFP_KERNEL|__GFP_HIGH);
+ if (body == NULL) {
+ kfree(msg);
+ err = -ENOMEM;
@@ -79229,10 +108461,10 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xe
+
+ return 0;
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,500 @@
+diff -rpuN linux-2.6.18.8/drivers/xen/xenoprof/xenoprofile.c linux-2.6.18-xen-3.2.0/drivers/xen/xenoprof/xenoprofile.c
+--- linux-2.6.18.8/drivers/xen/xenoprof/xenoprofile.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/drivers/xen/xenoprof/xenoprofile.c 2008-02-15 16:22:06.000000000 -0800
+@@ -0,0 +1,546 @@
+/**
+ * @file xenoprofile.c
+ *
@@ -79286,11 +108518,13 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+static int xenoprof_is_primary = 0;
+static int active_defined;
+
++extern unsigned long backtrace_depth;
++
+/* Number of buffers in shared area (one per VCPU) */
+int nbuf;
+/* Mappings of VIRQ_XENOPROF to irq number (per cpu) */
+int ovf_irq[NR_CPUS];
-+/* cpu model type string - copied from Xen memory space on XENOPROF_init command */
++/* cpu model type string - copied from Xen on XENOPROF_init command */
+char cpu_type[XENOPROF_CPU_TYPE_SIZE];
+
+#ifdef CONFIG_PM
@@ -79350,38 +108584,54 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+unsigned int pdomains;
+struct xenoprof_passive passive_domains[MAX_OPROF_DOMAINS];
+
++/* Check whether the given entry is an escape code */
++static int xenoprof_is_escape(xenoprof_buf_t * buf, int tail)
++{
++ return (buf->event_log[tail].eip == XENOPROF_ESCAPE_CODE);
++}
++
++/* Get the event at the given entry */
++static uint8_t xenoprof_get_event(xenoprof_buf_t * buf, int tail)
++{
++ return (buf->event_log[tail].event);
++}
++
+static void xenoprof_add_pc(xenoprof_buf_t *buf, int is_passive)
+{
+ int head, tail, size;
++ int tracing = 0;
+
+ head = buf->event_head;
+ tail = buf->event_tail;
+ size = buf->event_size;
+
-+ if (tail > head) {
-+ while (tail < size) {
-+ oprofile_add_pc(buf->event_log[tail].eip,
-+ buf->event_log[tail].mode,
-+ buf->event_log[tail].event);
++ while (tail != head) {
++ if (xenoprof_is_escape(buf, tail) &&
++ xenoprof_get_event(buf, tail) == XENOPROF_TRACE_BEGIN) {
++ tracing=1;
++ oprofile_add_pc(ESCAPE_CODE, buf->event_log[tail].mode,
++ CPU_TRACE_BEGIN);
+ if (!is_passive)
+ oprofile_samples++;
+ else
+ p_oprofile_samples++;
-+ tail++;
++
++ } else {
++ oprofile_add_pc(buf->event_log[tail].eip,
++ buf->event_log[tail].mode,
++ buf->event_log[tail].event);
++ if (!tracing) {
++ if (!is_passive)
++ oprofile_samples++;
++ else
++ p_oprofile_samples++;
++ }
++
+ }
-+ tail = 0;
-+ }
-+ while (tail < head) {
-+ oprofile_add_pc(buf->event_log[tail].eip,
-+ buf->event_log[tail].mode,
-+ buf->event_log[tail].event);
-+ if (!is_passive)
-+ oprofile_samples++;
-+ else
-+ p_oprofile_samples++;
+ tail++;
++ if(tail==size)
++ tail=0;
+ }
-+
+ buf->event_tail = tail;
+}
+
@@ -79397,8 +108647,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+ if (buf->event_head == buf->event_tail)
+ continue;
+ if (!flag_domain) {
-+ if (!oprofile_add_domain_switch(passive_domains[i].
-+ domain_id))
++ if (!oprofile_add_domain_switch(
++ passive_domains[i].domain_id))
+ goto done;
+ flag_domain = 1;
+ }
@@ -79415,11 +108665,9 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+xenoprof_ovf_interrupt(int irq, void * dev_id, struct pt_regs * regs)
+{
+ struct xenoprof_buf * buf;
-+ int cpu;
+ static unsigned long flag;
+
-+ cpu = smp_processor_id();
-+ buf = xenoprof_buf[cpu];
++ buf = xenoprof_buf[smp_processor_id()];
+
+ xenoprof_add_pc(buf, 0);
+
@@ -79435,7 +108683,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+
+static void unbind_virq(void)
+{
-+ int i;
++ unsigned int i;
+
+ for_each_online_cpu(i) {
+ if (ovf_irq[i] >= 0) {
@@ -79448,7 +108696,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+
+static int bind_virq(void)
+{
-+ int i, result;
++ unsigned int i;
++ int result;
+
+ for_each_online_cpu(i) {
+ result = bind_virq_to_irqhandler(VIRQ_XENOPROF,
@@ -79519,22 +108768,31 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+ /* Define dom0 as an active domain if not done yet */
+ if (!active_defined) {
+ domid_t domid;
-+ ret = HYPERVISOR_xenoprof_op(XENOPROF_reset_active_list, NULL);
++ ret = HYPERVISOR_xenoprof_op(
++ XENOPROF_reset_active_list, NULL);
+ if (ret)
+ goto err;
+ domid = 0;
-+ ret = HYPERVISOR_xenoprof_op(XENOPROF_set_active, &domid);
++ ret = HYPERVISOR_xenoprof_op(
++ XENOPROF_set_active, &domid);
+ if (ret)
+ goto err;
+ active_defined = 1;
+ }
+
++ if (backtrace_depth > 0) {
++ ret = HYPERVISOR_xenoprof_op(XENOPROF_set_backtrace,
++ &backtrace_depth);
++ if (ret)
++ backtrace_depth = 0;
++ }
++
+ ret = HYPERVISOR_xenoprof_op(XENOPROF_reserve_counters, NULL);
+ if (ret)
+ goto err;
++
+ xenoprof_arch_counter();
+ ret = HYPERVISOR_xenoprof_op(XENOPROF_setup_events, NULL);
-+
+ if (ret)
+ goto err;
+ }
@@ -79555,10 +108813,11 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+{
+ xenoprof_enabled = 0;
+
-+ HYPERVISOR_xenoprof_op(XENOPROF_disable_virq, NULL);
++ WARN_ON(HYPERVISOR_xenoprof_op(XENOPROF_disable_virq, NULL));
+
+ if (xenoprof_is_primary) {
-+ HYPERVISOR_xenoprof_op(XENOPROF_release_counters, NULL);
++ WARN_ON(HYPERVISOR_xenoprof_op(XENOPROF_release_counters,
++ NULL));
+ active_defined = 0;
+ }
+
@@ -79585,7 +108844,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+static void xenoprof_stop(void)
+{
+ if (xenoprof_is_primary)
-+ HYPERVISOR_xenoprof_op(XENOPROF_stop, NULL);
++ WARN_ON(HYPERVISOR_xenoprof_op(XENOPROF_stop, NULL));
+ xenoprof_arch_stop();
+}
+
@@ -79628,7 +108887,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+
+out:
+ if (ret)
-+ HYPERVISOR_xenoprof_op(XENOPROF_reset_active_list, NULL);
++ WARN_ON(HYPERVISOR_xenoprof_op(XENOPROF_reset_active_list,
++ NULL));
+ active_defined = !ret;
+ return ret;
+}
@@ -79637,7 +108897,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+ unsigned int pdoms)
+{
+ int ret;
-+ int i, j;
++ unsigned int i, j;
+ struct xenoprof_buf *buf;
+
+ if (!xenoprof_is_primary)
@@ -79660,7 +108920,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+ goto out;
+ for (j = 0; j < passive_domains[i].nbuf; j++) {
+ buf = (struct xenoprof_buf *)
-+ &p_shared_buffer[i].buffer[j * passive_domains[i].bufsize];
++ &p_shared_buffer[i].buffer[
++ j * passive_domains[i].bufsize];
+ BUG_ON(buf->vcpu_id >= MAX_VIRT_CPUS);
+ p_xenoprof_buf[i][buf->vcpu_id] = buf;
+ }
@@ -79673,9 +108934,23 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+ for (j = 0; j < i; j++)
+ xenoprof_arch_unmap_shared_buffer(&p_shared_buffer[i]);
+
-+ return ret;
++ return ret;
+}
+
++
++/* The dummy backtrace function to keep oprofile happy
++ * The real backtrace is done in xen
++ */
++static void xenoprof_dummy_backtrace(struct pt_regs * const regs,
++ unsigned int depth)
++{
++ /* this should never be called */
++ BUG();
++ return;
++}
++
++
++
+struct oprofile_operations xenoprof_ops = {
+#ifdef HAVE_XENOPROF_CREATE_FILES
+ .create_files = xenoprof_create_files,
@@ -79685,7 +108960,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+ .setup = xenoprof_setup,
+ .shutdown = xenoprof_shutdown,
+ .start = xenoprof_start,
-+ .stop = xenoprof_stop
++ .stop = xenoprof_stop,
++ .backtrace = xenoprof_dummy_backtrace
+};
+
+
@@ -79695,7 +108971,8 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+int __init xenoprofile_init(struct oprofile_operations * ops)
+{
+ struct xenoprof_init init;
-+ int ret, i;
++ unsigned int i;
++ int ret;
+
+ ret = HYPERVISOR_xenoprof_op(XENOPROF_init, &init);
+ if (!ret) {
@@ -79716,6 +108993,7 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+
+ active_defined = 0;
+ }
++
+ printk(KERN_INFO "%s: ret %d, events %d, xenoprof_is_primary %d\n",
+ __func__, ret, init.num_events, xenoprof_is_primary);
+ return ret;
@@ -79730,23 +109008,35 @@ diff -Nurp pristine-linux-2.6.18/drivers/xen/xenoprof/xenoprofile.c tmp-linux-2.
+ xenoprof_arch_unmap_shared_buffer(&shared_buffer);
+ if (xenoprof_is_primary) {
+ unmap_passive_list();
-+ HYPERVISOR_xenoprof_op(XENOPROF_shutdown, NULL);
++ WARN_ON(HYPERVISOR_xenoprof_op(XENOPROF_shutdown, NULL));
+ }
+}
-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-11-14 15:35:27.000000000 -0800
-@@ -865,6 +865,7 @@ config TMPFS
+diff -rpuN linux-2.6.18.8/fs/Kconfig linux-2.6.18-xen-3.2.0/fs/Kconfig
+--- linux-2.6.18.8/fs/Kconfig 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/fs/Kconfig 2008-02-15 16:22:06.000000000 -0800
+@@ -826,6 +826,11 @@ config PROC_VMCORE
+ help
+ Exports the dump image of crashed kernel in ELF format.
+
++config PROC_IOMEM_MACHINE
++ bool
++ depends on PROC_FS && EXPERIMENTAL && KEXEC && XEN && IA64
++ default y
++
+ config SYSFS
+ bool "sysfs file system support" if EMBEDDED
+ default y
+@@ -865,6 +870,7 @@ config TMPFS
config HUGETLBFS
bool "HugeTLB file system support"
depends X86 || IA64 || PPC64 || SPARC64 || SUPERH || BROKEN
-+ depends !XEN
++ depends on !XEN
help
hugetlbfs is a filesystem backing for HugeTLB pages, based on
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-11-16 16:18:12.000000000 -0800
+diff -rpuN linux-2.6.18.8/fs/aio.c linux-2.6.18-xen-3.2.0/fs/aio.c
+--- linux-2.6.18.8/fs/aio.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/fs/aio.c 2008-02-15 16:22:06.000000000 -0800
@@ -34,6 +34,11 @@
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
@@ -79930,9 +109220,56 @@ diff -Nurp pristine-linux-2.6.18/fs/aio.c tmp-linux-2.6-xen.patch/fs/aio.c
get_ioctx(ioctx); /* io_destroy() expects us to hold a ref */
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-11-16 16:18:12.000000000 -0800
+diff -rpuN linux-2.6.18.8/fs/bio.c linux-2.6.18-xen-3.2.0/fs/bio.c
+--- linux-2.6.18.8/fs/bio.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/fs/bio.c 2008-02-15 16:22:06.000000000 -0800
+@@ -112,7 +112,8 @@ void bio_free(struct bio *bio, struct bi
+
+ BIO_BUG_ON(pool_idx >= BIOVEC_NR_POOLS);
+
+- mempool_free(bio->bi_io_vec, bio_set->bvec_pools[pool_idx]);
++ if (bio->bi_io_vec)
++ mempool_free(bio->bi_io_vec, bio_set->bvec_pools[pool_idx]);
+ mempool_free(bio, bio_set->bio_pool);
+ }
+
+diff -rpuN linux-2.6.18.8/fs/compat_ioctl.c linux-2.6.18-xen-3.2.0/fs/compat_ioctl.c
+--- linux-2.6.18.8/fs/compat_ioctl.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/fs/compat_ioctl.c 2008-02-15 16:22:07.000000000 -0800
+@@ -124,6 +124,11 @@
+ #include <linux/dvb/video.h>
+ #include <linux/lp.h>
+
++#include <xen/interface/xen.h>
++#include <xen/public/evtchn.h>
++#include <xen/public/privcmd.h>
++#include <xen/compat_ioctl.h>
++
+ /* Aiee. Someone does not find a difference between int and long */
+ #define EXT2_IOC32_GETFLAGS _IOR('f', 1, int)
+ #define EXT2_IOC32_SETFLAGS _IOW('f', 2, int)
+@@ -2948,6 +2953,18 @@ COMPATIBLE_IOCTL(LPRESET)
+ /*LPGETSTATS not implemented, but no kernels seem to compile it in anyways*/
+ COMPATIBLE_IOCTL(LPGETFLAGS)
+ HANDLE_IOCTL(LPSETTIMEOUT, lp_timeout_trans)
++
++#ifdef CONFIG_XEN
++HANDLE_IOCTL(IOCTL_PRIVCMD_MMAP_32, privcmd_ioctl_32)
++HANDLE_IOCTL(IOCTL_PRIVCMD_MMAPBATCH_32, privcmd_ioctl_32)
++COMPATIBLE_IOCTL(IOCTL_PRIVCMD_HYPERCALL)
++COMPATIBLE_IOCTL(IOCTL_EVTCHN_BIND_VIRQ)
++COMPATIBLE_IOCTL(IOCTL_EVTCHN_BIND_INTERDOMAIN)
++COMPATIBLE_IOCTL(IOCTL_EVTCHN_BIND_UNBOUND_PORT)
++COMPATIBLE_IOCTL(IOCTL_EVTCHN_UNBIND)
++COMPATIBLE_IOCTL(IOCTL_EVTCHN_NOTIFY)
++COMPATIBLE_IOCTL(IOCTL_EVTCHN_RESET)
++#endif
+ };
+
+ int ioctl_table_size = ARRAY_SIZE(ioctl_start);
+diff -rpuN linux-2.6.18.8/fs/eventpoll.c linux-2.6.18-xen-3.2.0/fs/eventpoll.c
+--- linux-2.6.18.8/fs/eventpoll.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/fs/eventpoll.c 2008-02-15 16:22:07.000000000 -0800
@@ -236,8 +236,6 @@ struct ep_pqueue {
static void ep_poll_safewake_init(struct poll_safewake *psw);
@@ -80007,9 +109344,37 @@ 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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/fs/lockd/svc.c linux-2.6.18-xen-3.2.0/fs/lockd/svc.c
+--- linux-2.6.18.8/fs/lockd/svc.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/fs/lockd/svc.c 2008-02-15 16:22:08.000000000 -0800
+@@ -323,9 +323,6 @@ EXPORT_SYMBOL(lockd_down);
+ * Sysctl parameters (same as module parameters, different interface).
+ */
+
+-/* Something that isn't CTL_ANY, CTL_NONE or a value that may clash. */
+-#define CTL_UNNUMBERED -2
+-
+ static ctl_table nlm_sysctls[] = {
+ {
+ .ctl_name = CTL_UNNUMBERED,
+diff -rpuN linux-2.6.18.8/fs/nfs/sysctl.c linux-2.6.18-xen-3.2.0/fs/nfs/sysctl.c
+--- linux-2.6.18.8/fs/nfs/sysctl.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/fs/nfs/sysctl.c 2008-02-15 16:22:08.000000000 -0800
+@@ -18,11 +18,6 @@
+ static const int nfs_set_port_min = 0;
+ static const int nfs_set_port_max = 65535;
+ static struct ctl_table_header *nfs_callback_sysctl_table;
+-/*
+- * Something that isn't CTL_ANY, CTL_NONE or a value that may clash.
+- * Use the same values as fs/lockd/svc.c
+- */
+-#define CTL_UNNUMBERED -2
+
+ static ctl_table nfs_cb_sysctls[] = {
+ #ifdef CONFIG_NFS_V4
+diff -rpuN linux-2.6.18.8/fs/proc/proc_misc.c linux-2.6.18-xen-3.2.0/fs/proc/proc_misc.c
+--- linux-2.6.18.8/fs/proc/proc_misc.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/fs/proc/proc_misc.c 2008-02-15 16:22:08.000000000 -0800
@@ -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),
@@ -80019,9 +109384,9 @@ diff -Nurp pristine-linux-2.6.18/fs/proc/proc_misc.c tmp-linux-2.6-xen.patch/fs/
/* Copy values here to work around gcc-2.95.3, gcc-2.96 */
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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/fs/proc/vmcore.c linux-2.6.18-xen-3.2.0/fs/proc/vmcore.c
+--- linux-2.6.18.8/fs/proc/vmcore.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/fs/proc/vmcore.c 2008-02-15 16:22:08.000000000 -0800
@@ -514,7 +514,7 @@ static int __init parse_crash_elf64_head
/* Do some basic Verification. */
if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 ||
@@ -80031,9 +109396,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/fs/xfs/linux-2.6/xfs_buf.c tmp-linux-2.6-xen.patch/fs/xfs/linux-2.6/xfs_buf.c
---- pristine-linux-2.6.18/fs/xfs/linux-2.6/xfs_buf.c 2006-09-19 20:42:06.000000000 -0700
-+++ tmp-linux-2.6-xen.patch/fs/xfs/linux-2.6/xfs_buf.c 2007-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/fs/splice.c linux-2.6.18-xen-3.2.0/fs/splice.c
+--- linux-2.6.18.8/fs/splice.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/fs/splice.c 2008-02-15 16:22:09.000000000 -0800
+@@ -1141,6 +1141,9 @@ static int get_iovec_page_array(const st
+ if (unlikely(!base))
+ break;
+
++ if (unlikely(!access_ok(VERIFY_READ, base, len)))
++ break;
++
+ /*
+ * Get this base offset and number of pages, then map
+ * in the user pages.
+diff -rpuN linux-2.6.18.8/fs/xfs/linux-2.6/xfs_buf.c linux-2.6.18-xen-3.2.0/fs/xfs/linux-2.6/xfs_buf.c
+--- linux-2.6.18.8/fs/xfs/linux-2.6/xfs_buf.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/fs/xfs/linux-2.6/xfs_buf.c 2008-02-15 16:22:09.000000000 -0800
@@ -182,6 +182,19 @@ free_address(
{
a_list_t *aentry;
@@ -80054,9 +109432,9 @@ diff -Nurp pristine-linux-2.6.18/fs/xfs/linux-2.6/xfs_buf.c tmp-linux-2.6-xen.pa
aentry = kmalloc(sizeof(a_list_t), GFP_NOWAIT);
if (likely(aentry)) {
spin_lock(&as_lock);
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-generic/pci.h linux-2.6.18-xen-3.2.0/include/asm-generic/pci.h
+--- linux-2.6.18.8/include/asm-generic/pci.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-generic/pci.h 2008-02-15 16:22:10.000000000 -0800
@@ -43,7 +43,9 @@ pcibios_select_root(struct pci_dev *pdev
return root;
}
@@ -80067,9 +109445,23 @@ diff -Nurp pristine-linux-2.6.18/include/asm-generic/pci.h tmp-linux-2.6-xen.pat
#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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-generic/pgtable.h linux-2.6.18-xen-3.2.0/include/asm-generic/pgtable.h
+--- linux-2.6.18.8/include/asm-generic/pgtable.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-generic/pgtable.h 2008-02-15 16:22:10.000000000 -0800
+@@ -188,6 +188,10 @@ static inline void ptep_set_wrprotect(st
+ })
+ #endif
+
++#ifndef arch_change_pte_range
++#define arch_change_pte_range(mm, pmd, addr, end, newprot) 0
++#endif
++
+ #ifndef __ASSEMBLY__
+ /*
+ * When walking page tables, we usually want to skip any p?d_none entries;
+diff -rpuN linux-2.6.18.8/include/asm-generic/vmlinux.lds.h linux-2.6.18-xen-3.2.0/include/asm-generic/vmlinux.lds.h
+--- linux-2.6.18.8/include/asm-generic/vmlinux.lds.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-generic/vmlinux.lds.h 2008-02-15 16:22:10.000000000 -0800
@@ -194,3 +194,6 @@
.stab.index 0 : { *(.stab.index) } \
.stab.indexstr 0 : { *(.stab.indexstr) } \
@@ -80077,9 +109469,46 @@ diff -Nurp pristine-linux-2.6.18/include/asm-generic/vmlinux.lds.h tmp-linux-2.6
+
+#define NOTES \
+ .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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/acpi.h linux-2.6.18-xen-3.2.0/include/asm-i386/acpi.h
+--- linux-2.6.18.8/include/asm-i386/acpi.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/acpi.h 2008-02-15 16:22:10.000000000 -0800
+@@ -177,11 +177,17 @@ extern unsigned long acpi_wakeup_address
+ /* early initialization routine */
+ extern void acpi_reserve_bootmem(void);
+
++#ifdef CONFIG_ACPI_PV_SLEEP
++extern int acpi_notify_hypervisor_state(u8 sleep_state,
++ u32 pm1a_cnt, u32 pm1b_cnt);
++#endif /* CONFIG_ACPI_PV_SLEEP */
+ #endif /*CONFIG_ACPI_SLEEP*/
+
+ extern u8 x86_acpiid_to_apicid[];
+
++#ifndef CONFIG_XEN
+ #define ARCH_HAS_POWER_INIT 1
++#endif
+
+ #endif /*__KERNEL__*/
+
+diff -rpuN linux-2.6.18.8/include/asm-i386/agp.h linux-2.6.18-xen-3.2.0/include/asm-i386/agp.h
+--- linux-2.6.18.8/include/asm-i386/agp.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/agp.h 2008-02-15 16:22:10.000000000 -0800
+@@ -12,8 +12,10 @@
+ * data corruption on some CPUs.
+ */
+
+-int map_page_into_agp(struct page *page);
+-int unmap_page_from_agp(struct page *page);
++/* Caller's responsibility to call global_flush_tlb() for
++ * performance reasons */
++#define map_page_into_agp(page) change_page_attr(page, 1, PAGE_KERNEL_NOCACHE)
++#define unmap_page_from_agp(page) change_page_attr(page, 1, PAGE_KERNEL)
+ #define flush_agp_mappings() global_flush_tlb()
+
+ /* Could use CLFLUSH here if the cpu supports it. But then it would
+diff -rpuN linux-2.6.18.8/include/asm-i386/apic.h linux-2.6.18-xen-3.2.0/include/asm-i386/apic.h
+--- linux-2.6.18.8/include/asm-i386/apic.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/apic.h 2008-02-15 16:22:10.000000000 -0800
@@ -119,10 +119,12 @@ extern void enable_NMI_through_LVT0 (voi
extern int disable_timer_pin_1;
@@ -80093,9 +109522,20 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/apic.h tmp-linux-2.6-xen.patch
extern int timer_over_8254;
-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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/e820.h linux-2.6.18-xen-3.2.0/include/asm-i386/e820.h
+--- linux-2.6.18.8/include/asm-i386/e820.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/e820.h 2008-02-15 16:22:10.000000000 -0800
+@@ -38,6 +38,7 @@ extern struct e820map e820;
+
+ extern int e820_all_mapped(unsigned long start, unsigned long end,
+ unsigned type);
++extern int e820_any_mapped(u64 start, u64 end, unsigned type);
+
+ #endif/*!__ASSEMBLY__*/
+
+diff -rpuN linux-2.6.18.8/include/asm-i386/fixmap.h linux-2.6.18-xen-3.2.0/include/asm-i386/fixmap.h
+--- linux-2.6.18.8/include/asm-i386/fixmap.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/fixmap.h 2008-02-15 16:22:10.000000000 -0800
@@ -19,7 +19,7 @@
* Leave one empty page between vmalloc'ed areas and
* the start of the fixmap.
@@ -80114,9 +109554,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/fixmap.h tmp-linux-2.6-xen.pat
#define set_fixmap(idx, phys) \
__set_fixmap(idx, phys, PAGE_KERNEL)
/*
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/kexec.h linux-2.6.18-xen-3.2.0/include/asm-i386/kexec.h
+--- linux-2.6.18.8/include/asm-i386/kexec.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/kexec.h 2008-02-15 16:22:10.000000000 -0800
@@ -1,6 +1,26 @@
#ifndef _I386_KEXEC_H
#define _I386_KEXEC_H
@@ -80181,9 +109621,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/kexec.h tmp-linux-2.6-xen.patc
+#endif /* __ASSEMBLY__ */
#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-default/mach_traps.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-default/mach_traps.h
+--- linux-2.6.18.8/include/asm-i386/mach-default/mach_traps.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-default/mach_traps.h 2008-02-15 16:22:10.000000000 -0800
@@ -15,6 +15,18 @@ static inline void clear_mem_error(unsig
outb(reason, 0x61);
}
@@ -80203,10 +109643,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-default/mach_traps.h tmp-
static inline unsigned char get_nmi_reason(void)
{
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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,37 @@
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/agp.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/agp.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/agp.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/agp.h 2008-02-15 16:22:10.000000000 -0800
+@@ -0,0 +1,44 @@
+#ifndef AGP_H
+#define AGP_H 1
+
@@ -80222,8 +109662,15 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/agp.h tmp-linux-2
+ * data corruption on some CPUs.
+ */
+
-+int map_page_into_agp(struct page *page);
-+int unmap_page_from_agp(struct page *page);
++/* Caller's responsibility to call global_flush_tlb() for
++ * performance reasons */
++#define map_page_into_agp(page) ( \
++ xen_create_contiguous_region((unsigned long)page_address(page), 0, 32) \
++ ?: change_page_attr(page, 1, PAGE_KERNEL_NOCACHE))
++#define unmap_page_from_agp(page) ( \
++ xen_destroy_contiguous_region((unsigned long)page_address(page), 0), \
++ /* only a fallback: xen_destroy_contiguous_region uses PAGE_KERNEL */ \
++ change_page_attr(page, 1, PAGE_KERNEL))
+#define flush_agp_mappings() global_flush_tlb()
+
+/* Could use CLFLUSH here if the cpu supports it. But then it would
@@ -80244,10 +109691,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/agp.h tmp-linux-2
+ dma_free_coherent(NULL,PAGE_SIZE<<(order),(table),virt_to_bus(table))
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,164 @@
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/desc.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/desc.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/desc.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/desc.h 2008-02-15 16:22:10.000000000 -0800
+@@ -0,0 +1,166 @@
+#ifndef __ARCH_DESC_H
+#define __ARCH_DESC_H
+
@@ -80361,7 +109808,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/desc.h tmp-linux-
+
+static inline void load_TLS(struct thread_struct *t, unsigned int cpu)
+{
-+#define C(i) HYPERVISOR_update_descriptor(virt_to_machine(&get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + i]), *(u64 *)&t->tls_array[i])
++#define C(i) if (HYPERVISOR_update_descriptor(virt_to_machine(&get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + i]), \
++ *(u64 *)&t->tls_array[i])) \
++ BUG();
+ C(0); C(1); C(2);
+#undef C
+}
@@ -80375,7 +109824,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/desc.h tmp-linux-
+ * it slows down context switching. Noone uses it anyway.
+ */
+ cpu = cpu; /* XXX avoid compiler warning */
-+ xen_set_ldt(0UL, 0);
++ xen_set_ldt(NULL, 0);
+ put_cpu();
+}
+
@@ -80390,7 +109839,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/desc.h tmp-linux-
+ if (likely(!count))
+ segments = NULL;
+
-+ xen_set_ldt((unsigned long)segments, count);
++ xen_set_ldt(segments, count);
+}
+
+static inline void load_LDT(mm_context_t *pc)
@@ -80412,9 +109861,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/desc.h tmp-linux-
+#endif /* !__ASSEMBLY__ */
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/dma-mapping.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/dma-mapping.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/dma-mapping.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/dma-mapping.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,157 @@
+#ifndef _ASM_I386_DMA_MAPPING_H
+#define _ASM_I386_DMA_MAPPING_H
@@ -80573,9 +110022,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/dma-mapping.h tmp
+ dma_addr_t device_addr, size_t size);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/fixmap.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/fixmap.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/fixmap.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/fixmap.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,155 @@
+/*
+ * fixmap.h: compile-time virtual memory allocation
@@ -80732,160 +110181,54 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/fixmap.h tmp-linu
+
+#endif /* !__ASSEMBLY__ */
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,147 @@
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/gnttab_dma.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/gnttab_dma.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/gnttab_dma.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/gnttab_dma.h 2008-02-15 16:22:10.000000000 -0800
+@@ -0,0 +1,41 @@
+/*
-+ * Architecture specific parts of the Floppy driver
++ * Copyright (c) 2007 Herbert Xu <herbert@gondor.apana.org.au>
++ * Copyright (c) 2007 Isaku Yamahata <yamahata at valinux co jp>
++ * VA Linux Systems Japan K.K.
+ *
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License. See the file "COPYING" in the main directory of this archive
-+ * for more details.
++ * 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.
+ *
-+ * Copyright (C) 1995
++ * 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.
+ *
-+ * Modifications for Xen are Copyright (c) 2004, Keir Fraser.
++ * 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
+ */
-+#ifndef __ASM_XEN_I386_FLOPPY_H
-+#define __ASM_XEN_I386_FLOPPY_H
-+
-+#include <linux/vmalloc.h>
-+
-+/* XEN: Hit DMA paths on the head. This trick from asm-m68k/floppy.h. */
-+#include <asm/dma.h>
-+#undef MAX_DMA_ADDRESS
-+#define MAX_DMA_ADDRESS 0
-+#define CROSS_64KB(a,s) (0)
-+
-+#define fd_inb(port) inb_p(port)
-+#define fd_outb(value,port) outb_p(value,port)
-+
-+#define fd_request_dma() (0)
-+#define fd_free_dma() ((void)0)
-+#define fd_enable_irq() enable_irq(FLOPPY_IRQ)
-+#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
-+#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL)
-+#define fd_get_dma_residue() (virtual_dma_count + virtual_dma_residue)
-+#define fd_dma_setup(addr, size, mode, io) vdma_dma_setup(addr, size, mode, io)
-+/*
-+ * Do not use vmalloc/vfree: floppy_release_irq_and_dma() gets called from
-+ * softirq context via motor_off_callback. A generic bug we happen to trigger.
-+ */
-+#define fd_dma_mem_alloc(size) __get_free_pages(GFP_KERNEL, get_order(size))
-+#define fd_dma_mem_free(addr, size) free_pages(addr, get_order(size))
-+
-+static int virtual_dma_count;
-+static int virtual_dma_residue;
-+static char *virtual_dma_addr;
-+static int virtual_dma_mode;
-+static int doing_pdma;
-+
-+static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
-+{
-+ register unsigned char st;
-+ register int lcount;
-+ register char *lptr;
-+
-+ if (!doing_pdma)
-+ return floppy_interrupt(irq, dev_id, regs);
-+
-+ st = 1;
-+ for(lcount=virtual_dma_count, lptr=virtual_dma_addr;
-+ lcount; lcount--, lptr++) {
-+ st=inb(virtual_dma_port+4) & 0xa0 ;
-+ if(st != 0xa0)
-+ break;
-+ if(virtual_dma_mode)
-+ outb_p(*lptr, virtual_dma_port+5);
-+ else
-+ *lptr = inb_p(virtual_dma_port+5);
-+ }
-+ virtual_dma_count = lcount;
-+ virtual_dma_addr = lptr;
-+ st = inb(virtual_dma_port+4);
+
-+ if(st == 0x20)
-+ return IRQ_HANDLED;
-+ if(!(st & 0x20)) {
-+ virtual_dma_residue += virtual_dma_count;
-+ virtual_dma_count=0;
-+ doing_pdma = 0;
-+ floppy_interrupt(irq, dev_id, regs);
-+ return IRQ_HANDLED;
-+ }
-+ return IRQ_HANDLED;
-+}
++#ifndef _ASM_I386_GNTTAB_DMA_H
++#define _ASM_I386_GNTTAB_DMA_H
+
-+static void fd_disable_dma(void)
++static inline int gnttab_dma_local_pfn(struct page *page)
+{
-+ doing_pdma = 0;
-+ virtual_dma_residue += virtual_dma_count;
-+ virtual_dma_count=0;
++ /* Has it become a local MFN? */
++ return pfn_valid(mfn_to_local_pfn(pfn_to_mfn(page_to_pfn(page))));
+}
+
-+static int fd_request_irq(void)
++static inline maddr_t gnttab_dma_map_page(struct page *page)
+{
-+ return request_irq(FLOPPY_IRQ, floppy_hardint,
-+ IRQF_DISABLED, "floppy", NULL);
++ __gnttab_dma_map_page(page);
++ return ((maddr_t)pfn_to_mfn(page_to_pfn(page)) << PAGE_SHIFT);
+}
+
-+static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
++static inline void gnttab_dma_unmap_page(maddr_t maddr)
+{
-+ doing_pdma = 1;
-+ virtual_dma_port = io;
-+ virtual_dma_mode = (mode == DMA_MODE_WRITE);
-+ virtual_dma_addr = addr;
-+ virtual_dma_count = size;
-+ virtual_dma_residue = 0;
-+ return 0;
++ __gnttab_dma_unmap_page(virt_to_page(bus_to_virt(maddr)));
+}
+
-+/* XEN: This trick to force 'virtual DMA' is from include/asm-m68k/floppy.h. */
-+#define FDC1 xen_floppy_init()
-+static int FDC2 = -1;
-+
-+static int xen_floppy_init(void)
-+{
-+ use_virtual_dma = 1;
-+ can_use_virtual_dma = 1;
-+ return 0x3f0;
-+}
-+
-+/*
-+ * Floppy types are stored in the rtc's CMOS RAM and so rtc_lock
-+ * is needed to prevent corrupted CMOS RAM in case "insmod floppy"
-+ * coincides with another rtc CMOS user. Paul G.
-+ */
-+#define FLOPPY0_TYPE ({ \
-+ unsigned long flags; \
-+ unsigned char val; \
-+ spin_lock_irqsave(&rtc_lock, flags); \
-+ val = (CMOS_READ(0x10) >> 4) & 15; \
-+ spin_unlock_irqrestore(&rtc_lock, flags); \
-+ val; \
-+})
-+
-+#define FLOPPY1_TYPE ({ \
-+ unsigned long flags; \
-+ unsigned char val; \
-+ spin_lock_irqsave(&rtc_lock, flags); \
-+ val = CMOS_READ(0x10) & 15; \
-+ spin_unlock_irqrestore(&rtc_lock, flags); \
-+ val; \
-+})
-+
-+#define N_FDC 2
-+#define N_DRIVE 8
-+
-+#define FLOPPY_MOTOR_MASK 0xf0
-+
-+#define EXTRA_FLOPPY_PARAMS
-+
-+#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-11-14 15:35:27.000000000 -0800
++#endif /* _ASM_I386_GNTTAB_DMA_H */
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/highmem.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/highmem.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/highmem.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/highmem.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,80 @@
+/*
+ * highmem.h: virtual kernel memory mappings for high memory
@@ -80967,9 +110310,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/highmem.h tmp-lin
+#endif /* __KERNEL__ */
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/hw_irq.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/hw_irq.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/hw_irq.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/hw_irq.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,72 @@
+#ifndef _ASM_HW_IRQ_H
+#define _ASM_HW_IRQ_H
@@ -81030,7 +110373,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hw_irq.h tmp-linu
+void init_VISWS_APIC_irqs(void);
+void setup_IO_APIC(void);
+void disable_IO_APIC(void);
-+void print_IO_APIC(void);
++#define print_IO_APIC()
+int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn);
+void send_IPI(int dest, int vector);
+void setup_ioapic_dest(void);
@@ -81043,10 +110386,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hw_irq.h tmp-linu
+#define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs))
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,407 @@
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/hypercall.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/hypercall.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/hypercall.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/hypercall.h 2008-02-15 16:22:10.000000000 -0800
+@@ -0,0 +1,416 @@
+/******************************************************************************
+ * hypercall.h
+ *
@@ -81083,60 +110426,61 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-l
+#define __HYPERCALL_H__
+
+#include <linux/string.h> /* memcpy() */
++#include <linux/stringify.h>
+
+#ifndef __HYPERVISOR_H__
+# error "please don't include this file directly"
+#endif
+
-+#define __STR(x) #x
-+#define STR(x) __STR(x)
-+
+#ifdef CONFIG_XEN
+#define HYPERCALL_STR(name) \
-+ "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"
++ "call hypercall_page + ("__stringify(__HYPERVISOR_##name)" * 32)"
+#else
+#define HYPERCALL_STR(name) \
+ "mov hypercall_stubs,%%eax; " \
-+ "add $("STR(__HYPERVISOR_##name)" * 32),%%eax; " \
++ "add $("__stringify(__HYPERVISOR_##name)" * 32),%%eax; "\
+ "call *%%eax"
+#endif
+
+#define _hypercall0(type, name) \
+({ \
-+ long __res; \
++ type __res; \
+ asm volatile ( \
+ HYPERCALL_STR(name) \
+ : "=a" (__res) \
+ : \
+ : "memory" ); \
-+ (type)__res; \
++ __res; \
+})
+
+#define _hypercall1(type, name, a1) \
+({ \
-+ long __res, __ign1; \
++ type __res; \
++ long __ign1; \
+ asm volatile ( \
+ HYPERCALL_STR(name) \
+ : "=a" (__res), "=b" (__ign1) \
+ : "1" ((long)(a1)) \
+ : "memory" ); \
-+ (type)__res; \
++ __res; \
+})
+
+#define _hypercall2(type, name, a1, a2) \
+({ \
-+ long __res, __ign1, __ign2; \
++ type __res; \
++ long __ign1, __ign2; \
+ asm volatile ( \
+ HYPERCALL_STR(name) \
+ : "=a" (__res), "=b" (__ign1), "=c" (__ign2) \
+ : "1" ((long)(a1)), "2" ((long)(a2)) \
+ : "memory" ); \
-+ (type)__res; \
++ __res; \
+})
+
+#define _hypercall3(type, name, a1, a2, a3) \
+({ \
-+ long __res, __ign1, __ign2, __ign3; \
++ type __res; \
++ long __ign1, __ign2, __ign3; \
+ asm volatile ( \
+ HYPERCALL_STR(name) \
+ : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \
@@ -81144,12 +110488,13 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-l
+ : "1" ((long)(a1)), "2" ((long)(a2)), \
+ "3" ((long)(a3)) \
+ : "memory" ); \
-+ (type)__res; \
++ __res; \
+})
+
+#define _hypercall4(type, name, a1, a2, a3, a4) \
+({ \
-+ long __res, __ign1, __ign2, __ign3, __ign4; \
++ type __res; \
++ long __ign1, __ign2, __ign3, __ign4; \
+ asm volatile ( \
+ HYPERCALL_STR(name) \
+ : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \
@@ -81157,12 +110502,13 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-l
+ : "1" ((long)(a1)), "2" ((long)(a2)), \
+ "3" ((long)(a3)), "4" ((long)(a4)) \
+ : "memory" ); \
-+ (type)__res; \
++ __res; \
+})
+
+#define _hypercall5(type, name, a1, a2, a3, a4, a5) \
+({ \
-+ long __res, __ign1, __ign2, __ign3, __ign4, __ign5; \
++ type __res; \
++ long __ign1, __ign2, __ign3, __ign4, __ign5; \
+ asm volatile ( \
+ HYPERCALL_STR(name) \
+ : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \
@@ -81171,45 +110517,47 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-l
+ "3" ((long)(a3)), "4" ((long)(a4)), \
+ "5" ((long)(a5)) \
+ : "memory" ); \
-+ (type)__res; \
++ __res; \
+})
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_set_trap_table(
-+ trap_info_t *table)
++ const trap_info_t *table)
+{
+ return _hypercall1(int, set_trap_table, table);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_mmu_update(
-+ mmu_update_t *req, int count, int *success_count, domid_t domid)
++ mmu_update_t *req, unsigned int count, unsigned int *success_count,
++ domid_t domid)
+{
+ return _hypercall4(int, mmu_update, req, count, success_count, domid);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_mmuext_op(
-+ struct mmuext_op *op, int count, int *success_count, domid_t domid)
++ struct mmuext_op *op, unsigned int count, unsigned int *success_count,
++ domid_t domid)
+{
+ return _hypercall4(int, mmuext_op, op, count, success_count, domid);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_set_gdt(
-+ unsigned long *frame_list, int entries)
++ unsigned long *frame_list, unsigned int entries)
+{
+ return _hypercall2(int, set_gdt, frame_list, entries);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_stack_switch(
+ unsigned long ss, unsigned long esp)
+{
+ return _hypercall2(int, stack_switch, ss, esp);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_set_callbacks(
+ unsigned long event_selector, unsigned long event_address,
+ unsigned long failsafe_selector, unsigned long failsafe_address)
@@ -81226,21 +110574,21 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-l
+ return _hypercall1(int, fpu_taskswitch, set);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_sched_op_compat(
+ int cmd, unsigned long arg)
+{
+ return _hypercall2(int, sched_op_compat, cmd, arg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_sched_op(
+ int cmd, void *arg)
+{
+ return _hypercall2(int, sched_op, cmd, arg);
+}
+
-+static inline long
++static inline long __must_check
+HYPERVISOR_set_timer_op(
+ u64 timeout)
+{
@@ -81249,7 +110597,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-l
+ return _hypercall2(long, set_timer_op, timeout_lo, timeout_hi);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_platform_op(
+ struct xen_platform_op *platform_op)
+{
@@ -81257,42 +110605,42 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-l
+ return _hypercall1(int, platform_op, platform_op);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_set_debugreg(
-+ int reg, unsigned long value)
++ unsigned int reg, unsigned long value)
+{
+ return _hypercall2(int, set_debugreg, reg, value);
+}
+
-+static inline unsigned long
++static inline unsigned long __must_check
+HYPERVISOR_get_debugreg(
-+ int reg)
++ unsigned int reg)
+{
+ return _hypercall1(unsigned long, get_debugreg, reg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_update_descriptor(
+ u64 ma, u64 desc)
+{
+ return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_memory_op(
+ unsigned int cmd, void *arg)
+{
+ return _hypercall2(int, memory_op, cmd, arg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_multicall(
-+ multicall_entry_t *call_list, int nr_calls)
++ multicall_entry_t *call_list, unsigned int nr_calls)
+{
+ return _hypercall2(int, multicall, call_list, nr_calls);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_update_va_mapping(
+ unsigned long va, pte_t new_val, unsigned long flags)
+{
@@ -81304,7 +110652,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-l
+ new_val.pte_low, pte_hi, flags);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_event_channel_op(
+ int cmd, void *arg)
+{
@@ -81323,28 +110671,28 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-l
+ return rc;
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_acm_op(
+ int cmd, void *arg)
+{
+ return _hypercall2(int, acm_op, cmd, arg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_xen_version(
+ int cmd, void *arg)
+{
+ return _hypercall2(int, xen_version, cmd, arg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_console_io(
-+ int cmd, int count, char *str)
++ int cmd, unsigned int count, char *str)
+{
+ return _hypercall3(int, console_io, cmd, count, str);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_physdev_op(
+ int cmd, void *arg)
+{
@@ -81363,14 +110711,14 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-l
+ return rc;
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_grant_table_op(
+ unsigned int cmd, void *uop, unsigned int count)
+{
+ return _hypercall3(int, grant_table_op, cmd, uop, count);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_update_va_mapping_otherdomain(
+ unsigned long va, pte_t new_val, unsigned long flags, domid_t domid)
+{
@@ -81382,21 +110730,21 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-l
+ new_val.pte_low, pte_hi, flags, domid);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_vm_assist(
+ unsigned int cmd, unsigned int type)
+{
+ return _hypercall2(int, vm_assist, cmd, type);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_vcpu_op(
-+ int cmd, int vcpuid, void *extra_args)
++ int cmd, unsigned int vcpuid, void *extra_args)
+{
+ return _hypercall3(int, vcpu_op, cmd, vcpuid, extra_args);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_suspend(
+ unsigned long srec)
+{
@@ -81416,35 +110764,39 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypercall.h tmp-l
+ return rc;
+}
+
++#if CONFIG_XEN_COMPAT <= 0x030002
+static inline int
+HYPERVISOR_nmi_op(
+ unsigned long op, void *arg)
+{
+ return _hypercall2(int, nmi_op, op, arg);
+}
++#endif
+
-+static inline unsigned long
++#ifndef CONFIG_XEN
++static inline unsigned long __must_check
+HYPERVISOR_hvm_op(
+ int op, void *arg)
+{
+ return _hypercall2(unsigned long, hvm_op, op, arg);
+}
++#endif
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_callback_op(
-+ int cmd, void *arg)
++ int cmd, const void *arg)
+{
+ return _hypercall2(int, callback_op, cmd, arg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_xenoprof_op(
+ int op, void *arg)
+{
+ return _hypercall2(int, xenoprof_op, op, arg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_kexec_op(
+ unsigned long op, void *args)
+{
@@ -81454,10 +110806,10 @@ 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,265 @@
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/hypervisor.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/hypervisor.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/hypervisor.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/hypervisor.h 2008-02-15 16:22:10.000000000 -0800
+@@ -0,0 +1,259 @@
+/******************************************************************************
+ * hypervisor.h
+ *
@@ -81565,7 +110917,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypervisor.h tmp-
+void xen_pgd_pin(unsigned long ptr);
+void xen_pgd_unpin(unsigned long ptr);
+
-+void xen_set_ldt(unsigned long ptr, unsigned long bytes);
++void xen_set_ldt(const void *ptr, unsigned int ents);
+
+#ifdef CONFIG_SMP
+#include <linux/cpumask.h>
@@ -81590,7 +110942,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypervisor.h tmp-
+u64 jiffies_to_st(unsigned long jiffies);
+
+#ifdef CONFIG_XEN_SCRUB_PAGES
-+#define scrub_pages(_p,_n) memset((void *)(_p), 0, (_n) << PAGE_SHIFT)
++void scrub_pages(void *, unsigned int);
+#else
+#define scrub_pages(_p,_n) ((void)0)
+#endif
@@ -81605,7 +110957,12 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypervisor.h tmp-
+#define MULTI_UVMDOMID_INDEX 4
+#endif
+
++#ifdef CONFIG_XEN
+#define is_running_on_xen() 1
++#else
++extern char *hypercall_stubs;
++#define is_running_on_xen() (!!hypercall_stubs)
++#endif
+
+static inline int
+HYPERVISOR_yield(
@@ -81635,7 +110992,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypervisor.h tmp-
+ return rc;
+}
+
-+static inline int
++static inline void /*__noreturn*/
+HYPERVISOR_shutdown(
+ unsigned int reason)
+{
@@ -81643,17 +111000,16 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypervisor.h tmp-
+ .reason = reason
+ };
+
-+ int rc = HYPERVISOR_sched_op(SCHEDOP_shutdown, &sched_shutdown);
-+
++ VOID(HYPERVISOR_sched_op(SCHEDOP_shutdown, &sched_shutdown));
+#if CONFIG_XEN_COMPAT <= 0x030002
-+ if (rc == -ENOSYS)
-+ rc = HYPERVISOR_sched_op_compat(SCHEDOP_shutdown, reason);
++ VOID(HYPERVISOR_sched_op_compat(SCHEDOP_shutdown, reason));
+#endif
-+
-+ return rc;
++ /* Don't recurse needlessly. */
++ BUG_ON(reason != SHUTDOWN_crash);
++ for(;;);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_poll(
+ evtchn_port_t *ports, unsigned int nr_ports, u64 timeout)
+{
@@ -81673,6 +111029,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypervisor.h tmp-
+ return rc;
+}
+
++#ifdef CONFIG_XEN
++
+static inline void
+MULTI_update_va_mapping(
+ multicall_entry_t *mcl, unsigned long va,
@@ -81702,31 +111060,19 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/hypervisor.h tmp-
+ mcl->args[2] = count;
+}
+
-+static inline void
-+MULTI_update_va_mapping_otherdomain(
-+ multicall_entry_t *mcl, unsigned long va,
-+ pte_t new_val, unsigned long flags, domid_t domid)
-+{
-+ mcl->op = __HYPERVISOR_update_va_mapping_otherdomain;
-+ mcl->args[0] = va;
-+#if defined(CONFIG_X86_64)
-+ mcl->args[1] = new_val.pte;
-+#elif defined(CONFIG_X86_PAE)
-+ mcl->args[1] = new_val.pte_low;
-+ mcl->args[2] = new_val.pte_high;
-+#else
-+ mcl->args[1] = new_val.pte_low;
-+ mcl->args[2] = 0;
++#else /* !defined(CONFIG_XEN) */
++
++/* Multicalls not supported for HVM guests. */
++#define MULTI_update_va_mapping(a,b,c,d) ((void)0)
++#define MULTI_grant_table_op(a,b,c,d) ((void)0)
++
+#endif
-+ mcl->args[MULTI_UVMFLAGS_INDEX] = flags;
-+ mcl->args[MULTI_UVMDOMID_INDEX] = domid;
-+}
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,390 @@
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/io.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/io.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/io.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/io.h 2008-02-15 16:22:10.000000000 -0800
+@@ -0,0 +1,389 @@
+#ifndef _ASM_IO_H
+#define _ASM_IO_H
+
@@ -81782,8 +111128,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/io.h tmp-linux-2.
+ * Convert a physical pointer to a virtual kernel pointer for /dev/mem
+ * access
+ */
-+#define xlate_dev_mem_ptr(p, sz) ioremap(p, sz)
-+#define xlate_dev_mem_ptr_unmap(p) iounmap(p)
++#define xlate_dev_mem_ptr(p) __va(p)
+
+/*
+ * Convert a virtual cached pointer to an uncached pointer
@@ -81881,7 +111226,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/io.h tmp-linux-2.
+/*
+ * ISA I/O bus memory addresses are 1:1 with the physical address.
+ */
-+#define isa_virt_to_bus(_x) isa_virt_to_bus_is_UNSUPPORTED->x
++#define isa_virt_to_bus(_x) ({ BUG(); virt_to_bus(_x); })
+#define isa_page_to_bus(_x) isa_page_to_bus_is_UNSUPPORTED->x
+#define isa_bus_to_virt(_x) (void *)(__fix_to_virt(FIX_ISAMAP_BEGIN) + (_x))
+
@@ -82117,9 +111462,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/io.h tmp-linux-2.
+#define ARCH_HAS_DEV_MEM
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/irqflags.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/irqflags.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/irqflags.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/irqflags.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,127 @@
+/*
+ * include/asm-i386/irqflags.h
@@ -82248,9 +111593,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/irqflags.h tmp-li
+#endif
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/maddr.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/maddr.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/maddr.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/maddr.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,193 @@
+#ifndef _I386_MADDR_H
+#define _I386_MADDR_H
@@ -82445,9 +111790,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/maddr.h tmp-linux
+#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT))
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/mmu.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/mmu.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/mmu.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/mmu.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,29 @@
+#ifndef __i386_MMU_H
+#define __i386_MMU_H
@@ -82478,9 +111823,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/mmu.h tmp-linux-2
+#define arch_dup_mmap(mm, oldmm) ((void)(oldmm), _arch_dup_mmap(mm))
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/mmu_context.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/mmu_context.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/mmu_context.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/mmu_context.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,108 @@
+#ifndef __I386_SCHED_H
+#define __I386_SCHED_H
@@ -82590,10 +111935,10 @@ 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,235 @@
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/page.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/page.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/page.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/page.h 2008-02-15 16:22:10.000000000 -0800
+@@ -0,0 +1,227 @@
+#ifndef _I386_PAGE_H
+#define _I386_PAGE_H
+
@@ -82633,14 +111978,6 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/page.h tmp-linux-
+#include <xen/interface/xen.h>
+#include <xen/features.h>
+
-+#define arch_free_page(_page,_order) \
-+({ int foreign = PageForeign(_page); \
-+ if (foreign) \
-+ PageForeignDestructor(_page); \
-+ foreign; \
-+})
-+#define HAVE_ARCH_FREE_PAGE
-+
+#ifdef CONFIG_X86_USE_3DNOW
+
+#include <asm/mmx.h>
@@ -82829,36 +112166,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/page.h tmp-linux-
+#endif /* __KERNEL__ */
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,23 @@
-+#ifndef _ASMi386_PARAM_H
-+#define _ASMi386_PARAM_H
-+
-+#ifdef __KERNEL__
-+# define HZ CONFIG_HZ /* Internal kernel timer frequency */
-+# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
-+# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
-+#endif
-+
-+#ifndef HZ
-+#define HZ 100
-+#endif
-+
-+#define EXEC_PAGESIZE 4096
-+
-+#ifndef NOGROUP
-+#define NOGROUP (-1)
-+#endif
-+
-+#define MAXHOSTNAMELEN 64 /* max length of hostname */
-+#define COMMAND_LINE_SIZE 256
-+
-+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/pci.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pci.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/pci.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pci.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,148 @@
+#ifndef __i386_PCI_H
+#define __i386_PCI_H
@@ -83008,9 +112318,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pci.h tmp-linux-2
+#include <asm-generic/pci.h>
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/pgalloc.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pgalloc.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/pgalloc.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pgalloc.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,59 @@
+#ifndef _I386_PGALLOC_H
+#define _I386_PGALLOC_H
@@ -83071,9 +112381,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgalloc.h tmp-lin
+#define check_pgt_cache() do { } while (0)
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pgtable-2level-defs.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,20 @@
+#ifndef _I386_PGTABLE_2LEVEL_DEFS_H
+#define _I386_PGTABLE_2LEVEL_DEFS_H
@@ -83095,9 +112405,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-2level-de
+#define PTRS_PER_PTE 1024
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/pgtable-2level.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pgtable-2level.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/pgtable-2level.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pgtable-2level.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,119 @@
+#ifndef _I386_PGTABLE_2LEVEL_H
+#define _I386_PGTABLE_2LEVEL_H
@@ -83218,9 +112528,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-2level.h
+void vmalloc_sync_all(void);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pgtable-3level-defs.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,24 @@
+#ifndef _I386_PGTABLE_3LEVEL_DEFS_H
+#define _I386_PGTABLE_3LEVEL_DEFS_H
@@ -83246,9 +112556,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-3level-de
+#define PTRS_PER_PTE 512
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/pgtable-3level.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pgtable-3level.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/pgtable-3level.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pgtable-3level.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,209 @@
+#ifndef _I386_PGTABLE_3LEVEL_H
+#define _I386_PGTABLE_3LEVEL_H
@@ -83459,10 +112769,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable-3level.h
+void vmalloc_sync_all(void);
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,531 @@
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/pgtable.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pgtable.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/pgtable.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/pgtable.h 2008-02-15 16:22:10.000000000 -0800
+@@ -0,0 +1,537 @@
+#ifndef _I386_PGTABLE_H
+#define _I386_PGTABLE_H
+
@@ -83977,6 +113287,12 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable.h tmp-lin
+ unsigned long address,
+ unsigned long size);
+
++int xen_change_pte_range(struct mm_struct *mm, pmd_t *pmd,
++ unsigned long addr, unsigned long end, pgprot_t newprot);
++
++#define arch_change_pte_range(mm, pmd, addr, end, newprot) \
++ xen_change_pte_range(mm, pmd, addr, end, newprot)
++
+#define io_remap_pfn_range(vma,from,pfn,size,prot) \
+direct_remap_pfn_range(vma,from,pfn,size,prot,DOMID_IO)
+
@@ -83994,10 +113310,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/pgtable.h tmp-lin
+#include <asm-generic/pgtable.h>
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,741 @@
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/processor.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/processor.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/processor.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/processor.h 2008-02-15 16:22:10.000000000 -0800
+@@ -0,0 +1,743 @@
+/*
+ * include/asm-i386/processor.h
+ *
@@ -84513,8 +113829,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/processor.h tmp-l
+#define load_esp0(tss, thread) \
+ __load_esp0(tss, thread)
+#else
-+#define load_esp0(tss, thread) \
-+ HYPERVISOR_stack_switch(__KERNEL_DS, (thread)->esp0)
++#define load_esp0(tss, thread) do { \
++ if (HYPERVISOR_stack_switch(__KERNEL_DS, (thread)->esp0)) \
++ BUG(); \
++} while (0)
+#endif
+
+#define start_thread(regs, new_eip, new_esp) do { \
@@ -84534,7 +113852,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/processor.h tmp-l
+#define get_debugreg(var, register) \
+ (var) = HYPERVISOR_get_debugreg((register))
+#define set_debugreg(value, register) \
-+ HYPERVISOR_set_debugreg((register), (value))
++ WARN_ON(HYPERVISOR_set_debugreg((register), (value)))
+
+/*
+ * Set IOPL bits in EFLAGS from given mask
@@ -84545,7 +113863,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/processor.h tmp-l
+
+ /* Force the change at ring 0. */
+ set_iopl.iopl = (mask == 0) ? 1 : (mask >> 12) & 3;
-+ HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
++ WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl));
+}
+
+/* Forward declaration, a strange C thing */
@@ -84739,9 +114057,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/processor.h tmp-l
+extern int sysenter_setup(void);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/ptrace.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/ptrace.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/ptrace.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/ptrace.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,90 @@
+#ifndef _I386_PTRACE_H
+#define _I386_PTRACE_H
@@ -84833,9 +114151,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/ptrace.h tmp-linu
+#endif /* __KERNEL__ */
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/scatterlist.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/scatterlist.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/scatterlist.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/scatterlist.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,22 @@
+#ifndef _I386_SCATTERLIST_H
+#define _I386_SCATTERLIST_H
@@ -84859,9 +114177,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/scatterlist.h tmp
+#define ISA_DMA_THRESHOLD (0x00ffffff)
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/segment.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/segment.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/segment.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/segment.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,117 @@
+#ifndef _ASM_SEGMENT_H
+#define _ASM_SEGMENT_H
@@ -84980,9 +114298,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/segment.h tmp-lin
+#define IDT_ENTRIES 256
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/setup.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/setup.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/setup.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/setup.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,81 @@
+/*
+ * Just a place holder. We don't want to have to test x86 before
@@ -85065,9 +114383,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/setup.h tmp-linux
+#endif /* __ASSEMBLY__ */
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/smp.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/smp.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/smp.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/smp.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,103 @@
+#ifndef __ASM_SMP_H
+#define __ASM_SMP_H
@@ -85172,9 +114490,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/smp.h tmp-linux-2
+
+#endif
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/spinlock.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/spinlock.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/spinlock.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/spinlock.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,202 @@
+#ifndef __ASM_SPINLOCK_H
+#define __ASM_SPINLOCK_H
@@ -85378,9 +114696,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/swiotlb.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/swiotlb.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/swiotlb.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/swiotlb.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,43 @@
+#ifndef _ASM_SWIOTLB_H
+#define _ASM_SWIOTLB_H 1
@@ -85425,9 +114743,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/swiotlb.h tmp-lin
+#endif
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/synch_bitops.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/synch_bitops.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/synch_bitops.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/synch_bitops.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,145 @@
+#ifndef __XEN_SYNCH_BITOPS_H__
+#define __XEN_SYNCH_BITOPS_H__
@@ -85574,9 +114892,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/synch_bitops.h tm
+#define synch_cmpxchg_subword synch_cmpxchg
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/system.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/system.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/system.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/system.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,488 @@
+#ifndef __ASM_SYSTEM_H
+#define __ASM_SYSTEM_H
@@ -86066,9 +115384,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/system.h tmp-linu
+void default_idle(void);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/tlbflush.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/tlbflush.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/tlbflush.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/tlbflush.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,101 @@
+#ifndef _I386_TLBFLUSH_H
+#define _I386_TLBFLUSH_H
@@ -86136,10 +115454,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/tlbflush.h tmp-li
+#define local_flush_tlb() \
+ __flush_tlb()
+
-+extern void flush_tlb_all(void);
-+extern void flush_tlb_current_task(void);
-+extern void flush_tlb_mm(struct mm_struct *);
-+extern void flush_tlb_page(struct vm_area_struct *, unsigned long);
++#define flush_tlb_all xen_tlb_flush_all
++#define flush_tlb_current_task() xen_tlb_flush_mask(&current->mm->cpu_vm_mask)
++#define flush_tlb_mm(mm) xen_tlb_flush_mask(&(mm)->cpu_vm_mask)
++#define flush_tlb_page(vma, va) xen_invlpg_mask(&(vma)->vm_mm->cpu_vm_mask, va)
+
+#define flush_tlb() flush_tlb_current_task()
+
@@ -86171,9 +115489,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/vga.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/vga.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/vga.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/vga.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,20 @@
+/*
+ * Access to VGA videoram
@@ -86195,9 +115513,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/vga.h tmp-linux-2
+#define vga_writeb(x,y) (*(y) = (x))
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/asm/xenoprof.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/xenoprof.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/asm/xenoprof.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/asm/xenoprof.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * asm-i386/mach-xen/asm/xenoprof.h
@@ -86247,9 +115565,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/asm/xenoprof.h tmp-li
+
+#endif /* CONFIG_XEN */
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/irq_vectors.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/irq_vectors.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/irq_vectors.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/irq_vectors.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,125 @@
+/*
+ * This file should contain #defines for all of the interrupt vector
@@ -86376,9 +115694,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/irq_vectors.h tmp-lin
+#define irq_to_dynirq(_x) ((_x) - DYNIRQ_BASE)
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/mach_traps.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/mach_traps.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/mach_traps.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/mach_traps.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,33 @@
+/*
+ * include/asm-xen/asm-i386/mach-xen/mach_traps.h
@@ -86413,18 +115731,18 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/mach-xen/mach_traps.h tmp-linu
+static inline void reassert_nmi(void) {}
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/mach-xen/setup_arch.h linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/setup_arch.h
+--- linux-2.6.18.8/include/asm-i386/mach-xen/setup_arch.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/mach-xen/setup_arch.h 2008-02-15 16:22:10.000000000 -0800
@@ -0,0 +1,5 @@
+/* Hook to call BIOS initialisation function */
+
+#define ARCH_SETUP machine_specific_arch_setup();
+
+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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/page.h linux-2.6.18-xen-3.2.0/include/asm-i386/page.h
+--- linux-2.6.18.8/include/asm-i386/page.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/page.h 2008-02-15 16:22:10.000000000 -0800
@@ -122,7 +122,7 @@ extern int page_is_ram(unsigned long pag
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
@@ -86434,9 +115752,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/page.h tmp-linux-2.6-xen.patch
#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
-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-11-16 16:18:12.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/pgtable-2level-defs.h linux-2.6.18-xen-3.2.0/include/asm-i386/pgtable-2level-defs.h
+--- linux-2.6.18.8/include/asm-i386/pgtable-2level-defs.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/pgtable-2level-defs.h 2008-02-15 16:22:10.000000000 -0800
@@ -1,6 +1,8 @@
#ifndef _I386_PGTABLE_2LEVEL_DEFS_H
#define _I386_PGTABLE_2LEVEL_DEFS_H
@@ -86446,9 +115764,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/pgtable-2level-defs.h tmp-linu
/*
* traditional i386 two-level paging structure:
*/
-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-11-16 16:18:12.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-i386/pgtable-3level-defs.h linux-2.6.18-xen-3.2.0/include/asm-i386/pgtable-3level-defs.h
+--- linux-2.6.18.8/include/asm-i386/pgtable-3level-defs.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-i386/pgtable-3level-defs.h 2008-02-15 16:22:10.000000000 -0800
@@ -1,6 +1,8 @@
#ifndef _I386_PGTABLE_3LEVEL_DEFS_H
#define _I386_PGTABLE_3LEVEL_DEFS_H
@@ -86458,9 +115776,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-i386/pgtable-3level-defs.h tmp-linu
/*
* PGDIR_SHIFT determines what a top-level page table entry can map
*/
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-ia64/agp.h linux-2.6.18-xen-3.2.0/include/asm-ia64/agp.h
+--- linux-2.6.18.8/include/asm-ia64/agp.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/agp.h 2008-02-15 16:22:10.000000000 -0800
@@ -19,13 +19,44 @@
#define flush_agp_cache() mb()
@@ -86506,118 +115824,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/agp.h tmp-linux-2.6-xen.patch/
+#endif /* CONFIG_XEN */
#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-11-14 15:35:27.000000000 -0800
-@@ -6,7 +6,14 @@
- * David Mosberger-Tang <davidm@hpl.hp.com>
- */
- #include <asm/machvec.h>
-+#ifdef CONFIG_XEN
-+/* Needed for arch/i386/kernel/swiotlb.c and arch/i386/kernel/pci-dma-xen.c */
-+#include <asm/hypervisor.h>
-+/* Needed for arch/i386/kernel/swiotlb.c */
-+#include <asm/swiotlb.h>
-+#endif
-
-+#ifndef CONFIG_XEN
- #define dma_alloc_coherent platform_dma_alloc_coherent
- #define dma_alloc_noncoherent platform_dma_alloc_coherent /* coherent mem. is cheap */
- #define dma_free_coherent platform_dma_free_coherent
-@@ -20,6 +27,46 @@
- #define dma_sync_single_for_device platform_dma_sync_single_for_device
- #define dma_sync_sg_for_device platform_dma_sync_sg_for_device
- #define dma_mapping_error platform_dma_mapping_error
-+#else
-+int dma_map_sg(struct device *hwdev, struct scatterlist *sg, int nents,
-+ enum dma_data_direction direction);
-+void dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
-+ enum dma_data_direction direction);
-+int dma_supported(struct device *dev, u64 mask);
-+void *dma_alloc_coherent(struct device *dev, size_t size,
-+ dma_addr_t *dma_handle, gfp_t gfp);
-+void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
-+ dma_addr_t dma_handle);
-+dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
-+ enum dma_data_direction direction);
-+void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-+ enum dma_data_direction direction);
-+void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
-+ size_t size, enum dma_data_direction direction);
-+void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
-+ size_t size,
-+ enum dma_data_direction direction);
-+int dma_mapping_error(dma_addr_t dma_addr);
-+
-+#define flush_write_buffers() do { } while (0)
-+static inline void
-+dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
-+ enum dma_data_direction direction)
-+{
-+ if (swiotlb)
-+ swiotlb_sync_sg_for_cpu(dev,sg,nelems,direction);
-+ flush_write_buffers();
-+}
-+
-+static inline void
-+dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
-+ enum dma_data_direction direction)
-+{
-+ if (swiotlb)
-+ swiotlb_sync_sg_for_device(dev,sg,nelems,direction);
-+ flush_write_buffers();
-+}
-+#endif
-
- #define dma_map_page(dev, pg, off, size, dir) \
- dma_map_single(dev, page_address(pg) + (off), (size), (dir))
-@@ -36,7 +83,9 @@
- #define dma_sync_single_range_for_device(dev, dma_handle, offset, size, dir) \
- dma_sync_single_for_device(dev, dma_handle, size, dir)
-
-+#ifndef CONFIG_XEN
- #define dma_supported platform_dma_supported
-+#endif
-
- static inline int
- dma_set_mask (struct device *dev, u64 mask)
-@@ -61,4 +110,27 @@ dma_cache_sync (void *vaddr, size_t size
-
- #define dma_is_consistent(dma_handle) (1) /* all we do is coherent memory... */
-
-+#ifdef CONFIG_XEN
-+/* arch/i386/kernel/swiotlb.o requires */
-+void contiguous_bitmap_init(unsigned long end_pfn);
-+
-+static inline int
-+address_needs_mapping(struct device *hwdev, dma_addr_t addr)
-+{
-+ dma_addr_t mask = DMA_64BIT_MASK;
-+ /* If the device has a mask, use it, otherwise default to 64 bits */
-+ if (hwdev && hwdev->dma_mask)
-+ mask = *hwdev->dma_mask;
-+ return (addr & ~mask) != 0;
-+}
-+
-+static inline int
-+range_straddles_page_boundary(void *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));
-+}
-+#endif
-+
- #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-11-14 15:35:27.000000000 -0800
-@@ -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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-ia64/gcc_intrin.h linux-2.6.18-xen-3.2.0/include/asm-ia64/gcc_intrin.h
+--- linux-2.6.18.8/include/asm-ia64/gcc_intrin.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/gcc_intrin.h 2008-02-15 16:22:10.000000000 -0800
@@ -26,7 +26,7 @@ extern void ia64_bad_param_for_getreg (v
register unsigned long ia64_r13 asm ("r13") __attribute_used__;
@@ -86807,9 +116016,64 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/gcc_intrin.h tmp-linux-2.6-xen
+#define __ia64_get_psr_i() (__ia64_getreg(_IA64_REG_PSR) & 0x4000UL)
+
#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-ia64/gnttab_dma.h linux-2.6.18-xen-3.2.0/include/asm-ia64/gnttab_dma.h
+--- linux-2.6.18.8/include/asm-ia64/gnttab_dma.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/gnttab_dma.h 2008-02-15 16:22:10.000000000 -0800
+@@ -0,0 +1,51 @@
++/*
++ * Copyright (c) 2007 Herbert Xu <herbert@gondor.apana.org.au>
++ * Copyright (c) 2007 Isaku Yamahata <yamahata at valinux co jp>
++ * VA Linux Systems Japan K.K.
++ *
++ * 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
++ */
++
++#ifndef _ASM_IA64_GNTTAB_DMA_H
++#define _ASM_IA64_GNTTAB_DMA_H
++
++static inline int gnttab_dma_local_pfn(struct page *page)
++{
++ return 0;
++}
++
++/* caller must get dma address after calling this function */
++static inline void gnttab_dma_use_page(struct page *page)
++{
++ __gnttab_dma_map_page(page);
++}
++
++static inline dma_addr_t gnttab_dma_map_page(struct page *page)
++{
++ gnttab_dma_use_page(page);
++ return page_to_bus(page);
++}
++
++static inline dma_addr_t gnttab_dma_map_virt(void *ptr)
++{
++ return gnttab_dma_map_page(virt_to_page(ptr)) + offset_in_page(ptr);
++}
++
++static inline void gnttab_dma_unmap_page(dma_addr_t dma_address)
++{
++ __gnttab_dma_unmap_page(virt_to_page(bus_to_virt(dma_address)));
++}
++
++#endif /* _ASM_IA64_GNTTAB_DMA_H */
+diff -rpuN linux-2.6.18.8/include/asm-ia64/hw_irq.h linux-2.6.18-xen-3.2.0/include/asm-ia64/hw_irq.h
+--- linux-2.6.18.8/include/asm-ia64/hw_irq.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/hw_irq.h 2008-02-15 16:22:10.000000000 -0800
@@ -15,7 +15,11 @@
#include <asm/ptrace.h>
#include <asm/smp.h>
@@ -86835,10 +116099,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hw_irq.h tmp-linux-2.6-xen.pat
platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0);
}
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,425 @@
+diff -rpuN linux-2.6.18.8/include/asm-ia64/hypercall.h linux-2.6.18-xen-3.2.0/include/asm-ia64/hypercall.h
+--- linux-2.6.18.8/include/asm-ia64/hypercall.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/hypercall.h 2008-02-15 16:22:10.000000000 -0800
+@@ -0,0 +1,458 @@
+/******************************************************************************
+ * hypercall.h
+ *
@@ -86998,9 +116262,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(struct xencomm_handle *arg)
++xencomm_arch_hypercall_xsm_op(struct xencomm_handle *arg)
+{
-+ return _hypercall1(int, acm_op, arg);
++ return _hypercall1(int, xsm_op, arg);
+}
+
+static inline int
@@ -87070,6 +116334,12 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypercall.h tmp-linux-2.6-xen.
+ return _hypercall2(int, xenoprof_op, op, arg);
+}
+
++static inline long
++xencomm_arch_hypercall_opt_feature(struct xencomm_handle *arg)
++{
++ return _hypercall1(long, opt_feature, arg);
++}
++
+extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
+static inline void exit_idle(void) {}
+#define do_IRQ(irq, regs) ({ \
@@ -87079,9 +116349,6 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypercall.h tmp-linux-2.6-xen.
+})
+
+#include <linux/err.h>
-+#ifdef CONFIG_XEN
-+#include <asm/xen/privop.h>
-+#endif /* CONFIG_XEN */
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
+#include <xen/platform-compat.h>
+#endif
@@ -87212,6 +116479,23 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypercall.h tmp-linux-2.6-xen.
+ IA64_DOM0VP_expose_p2m, conv_start_gpfn,
+ assign_start_gpfn, expose_size, granule_pfn);
+}
++
++static inline int
++xencomm_arch_expose_foreign_p2m(unsigned long gpfn,
++ domid_t domid, struct xencomm_handle *arg,
++ unsigned long flags)
++{
++ return _hypercall5(int, ia64_dom0vp_op,
++ IA64_DOM0VP_expose_foreign_p2m,
++ gpfn, domid, arg, flags);
++}
++
++static inline int
++HYPERVISOR_unexpose_foreign_p2m(unsigned long gpfn, domid_t domid)
++{
++ return _hypercall3(int, ia64_dom0vp_op,
++ IA64_DOM0VP_unexpose_foreign_p2m, gpfn, domid);
++}
+#endif
+
+static inline int
@@ -87224,6 +116508,21 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypercall.h tmp-linux-2.6-xen.
+}
+
+static inline int
++xencomm_arch_hypercall_fpswa_revision(struct xencomm_handle *arg)
++{
++ return _hypercall2(int, ia64_dom0vp_op,
++ IA64_DOM0VP_fpswa_revision, arg);
++}
++
++static inline int
++xencomm_arch_hypercall_ia64_debug_op(unsigned long cmd,
++ unsigned long domain,
++ struct xencomm_handle *arg)
++{
++ return _hypercall3(int, ia64_debug_op, cmd, domain, arg);
++}
++
++static inline int
+HYPERVISOR_add_io_space(unsigned long phys_base,
+ unsigned long sparse,
+ unsigned long space_number)
@@ -87232,22 +116531,16 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypercall.h tmp-linux-2.6-xen.
+ phys_base, sparse, space_number);
+}
+
++static inline int
++xencomm_arch_hypercall_kexec_op(int cmd, struct xencomm_handle *arg)
++{
++ return _hypercall2(int, kexec_op, cmd, arg);
++}
++
+// for balloon driver
+#define HYPERVISOR_update_va_mapping(va, new_val, flags) (0)
+
+/* Use xencomm to do hypercalls. */
-+#ifdef MODULE
-+#define HYPERVISOR_sched_op xencomm_mini_hypercall_sched_op
-+#define HYPERVISOR_event_channel_op xencomm_mini_hypercall_event_channel_op
-+#define HYPERVISOR_callback_op xencomm_mini_hypercall_callback_op
-+#define HYPERVISOR_multicall xencomm_mini_hypercall_multicall
-+#define HYPERVISOR_xen_version xencomm_mini_hypercall_xen_version
-+#define HYPERVISOR_console_io xencomm_mini_hypercall_console_io
-+#define HYPERVISOR_hvm_op xencomm_mini_hypercall_hvm_op
-+#define HYPERVISOR_memory_op xencomm_mini_hypercall_memory_op
-+#define HYPERVISOR_xenoprof_op xencomm_mini_hypercall_xenoprof_op
-+#define HYPERVISOR_perfmon_op xencomm_mini_hypercall_perfmon_op
-+#else
+#define HYPERVISOR_sched_op xencomm_hypercall_sched_op
+#define HYPERVISOR_event_channel_op xencomm_hypercall_event_channel_op
+#define HYPERVISOR_callback_op xencomm_hypercall_callback_op
@@ -87258,16 +116551,20 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypercall.h tmp-linux-2.6-xen.
+#define HYPERVISOR_memory_op xencomm_hypercall_memory_op
+#define HYPERVISOR_xenoprof_op xencomm_hypercall_xenoprof_op
+#define HYPERVISOR_perfmon_op xencomm_hypercall_perfmon_op
-+#endif
-+
++#define HYPERVISOR_fpswa_revision xencomm_hypercall_fpswa_revision
+#define HYPERVISOR_suspend xencomm_hypercall_suspend
+#define HYPERVISOR_vcpu_op xencomm_hypercall_vcpu_op
++#define HYPERVISOR_opt_feature xencomm_hypercall_opt_feature
++#define HYPERVISOR_kexec_op xencomm_hypercall_kexec_op
++
++/* to compile gnttab_copy_grant_page() in drivers/xen/core/gnttab.c */
++#define HYPERVISOR_mmu_update(req, count, success_count, domid) ({BUG();0;})
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,226 @@
+diff -rpuN linux-2.6.18.8/include/asm-ia64/hypervisor.h linux-2.6.18-xen-3.2.0/include/asm-ia64/hypervisor.h
+--- linux-2.6.18.8/include/asm-ia64/hypervisor.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/hypervisor.h 2008-02-15 16:22:10.000000000 -0800
+@@ -0,0 +1,233 @@
+/******************************************************************************
+ * hypervisor.h
+ *
@@ -87304,7 +116601,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypervisor.h tmp-linux-2.6-xen
+#define __HYPERVISOR_H__
+
+#ifdef CONFIG_XEN
-+extern int running_on_xen;
++/* running_on_xen is set before executing any C code by early_xen_setup */
++extern const int running_on_xen;
+#define is_running_on_xen() (running_on_xen)
+#else /* CONFIG_XEN */
+# ifdef CONFIG_VMX_GUEST
@@ -87386,7 +116684,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypervisor.h tmp-linux-2.6-xen
+}
+
+#ifndef CONFIG_VMX_GUEST
-+// for drivers/xen/privcmd/privcmd.c
++/* for drivers/xen/privcmd/privcmd.c */
+#define machine_to_phys_mapping 0
+struct vm_area_struct;
+int direct_remap_pfn_range(struct vm_area_struct *vma,
@@ -87400,7 +116698,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypervisor.h tmp-linux-2.6-xen
+int privcmd_mmap(struct file * file, struct vm_area_struct * vma);
+#define HAVE_ARCH_PRIVCMD_MMAP
+
-+// for drivers/xen/balloon/balloon.c
++/* for drivers/xen/balloon/balloon.c */
+#ifdef CONFIG_XEN_SCRUB_PAGES
+#define scrub_pages(_p,_n) memset((void *)(_p), 0, (_n) << PAGE_SHIFT)
+#else
@@ -87409,12 +116707,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypervisor.h tmp-linux-2.6-xen
+#define pte_mfn(_x) pte_pfn(_x)
+#define phys_to_machine_mapping_valid(_x) (1)
+
-+#endif /* !CONFIG_VMX_GUEST */
-+
-+#define __pte_ma(_x) ((pte_t) {(_x)}) /* unmodified use */
-+#define pfn_pte_ma(_x,_y) __pte_ma(0) /* unmodified use */
-+
-+#ifndef CONFIG_VMX_GUEST
++void xen_contiguous_bitmap_init(unsigned long end_pfn);
+int __xen_create_contiguous_region(unsigned long vstart, unsigned int order, unsigned int address_bits);
+static inline int
+xen_create_contiguous_region(unsigned long vstart,
@@ -87436,13 +116729,24 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypervisor.h tmp-linux-2.6-xen
+ __xen_destroy_contiguous_region(vstart, order);
+}
+
++struct page;
++
++int xen_limit_pages_to_max_mfn(struct page *pages, unsigned int order,
++ unsigned int address_bits);
++
+/* For drivers/xen/core/machine_reboot.c */
+#define HAVE_XEN_POST_SUSPEND
+void xen_post_suspend(int suspend_cancelled);
++
++/* For setup_arch() in arch/ia64/kernel/setup.c */
++void xen_ia64_enable_opt_feature(void);
+#endif /* !CONFIG_VMX_GUEST */
+
-+// for netfront.c, netback.c
-+#define MULTI_UVMFLAGS_INDEX 0 //XXX any value
++#define __pte_ma(_x) ((pte_t) {(_x)}) /* unmodified use */
++#define pfn_pte_ma(_x,_y) __pte_ma(0) /* unmodified use */
++
++/* for netfront.c, netback.c */
++#define MULTI_UVMFLAGS_INDEX 0 /* XXX any value */
+
+static inline void
+MULTI_update_va_mapping(
@@ -87479,7 +116783,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypervisor.h tmp-linux-2.6-xen
+ (-ENOSYS); \
+ })
+
-+// for debug
++/* for debug */
+asmlinkage int xprintk(const char *fmt, ...);
+#define xprintd(fmt, ...) xprintk("%s:%d " fmt, __func__, __LINE__, \
+ ##__VA_ARGS__)
@@ -87494,9 +116798,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/hypervisor.h tmp-linux-2.6-xen
+#endif
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-ia64/intel_intrin.h linux-2.6.18-xen-3.2.0/include/asm-ia64/intel_intrin.h
+--- linux-2.6.18.8/include/asm-ia64/intel_intrin.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/intel_intrin.h 2008-02-15 16:22:10.000000000 -0800
@@ -16,8 +16,8 @@
* intrinsic
*/
@@ -87618,22 +116922,35 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/intel_intrin.h tmp-linux-2.6-x
#define __builtin_trap() __break(0);
#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-11-14 15:35:27.000000000 -0800
-@@ -66,9 +66,11 @@ extern unsigned int num_io_spaces;
- #define PIO_RESERVED __IA64_UNCACHED_OFFSET
- #define HAVE_ARCH_PIO_SIZE
+diff -rpuN linux-2.6.18.8/include/asm-ia64/intrinsics.h linux-2.6.18-xen-3.2.0/include/asm-ia64/intrinsics.h
+--- linux-2.6.18.8/include/asm-ia64/intrinsics.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/intrinsics.h 2008-02-15 16:22:10.000000000 -0800
+@@ -18,6 +18,15 @@
+ # include <asm/gcc_intrin.h>
+ #endif
-+#include <asm/hypervisor.h>
- #include <asm/intrinsics.h>
- #include <asm/machvec.h>
- #include <asm/page.h>
-+#include <asm/privop.h>
- #include <asm/system.h>
- #include <asm-generic/iomap.h>
++#define __ia64_set_rr0_to_rr4(val0, val1, val2, val3, val4) \
++do { \
++ __ia64_set_rr(0x0000000000000000UL, (val0)); \
++ __ia64_set_rr(0x2000000000000000UL, (val1)); \
++ __ia64_set_rr(0x4000000000000000UL, (val2)); \
++ __ia64_set_rr(0x6000000000000000UL, (val3)); \
++ __ia64_set_rr(0x8000000000000000UL, (val4)); \
++} while (0)
++
+ /*
+ * Force an unresolved reference if someone tries to use
+ * ia64_fetch_and_add() with a bad value.
+@@ -177,4 +186,5 @@ extern long ia64_cmpxchg_called_with_bad
+ #endif /* !CONFIG_IA64_DEBUG_CMPXCHG */
-@@ -96,9 +98,44 @@ extern int valid_mmap_phys_addr_range (u
+ #endif
++#include <asm/privop.h>
+ #endif /* _ASM_IA64_INTRINSICS_H */
+diff -rpuN linux-2.6.18.8/include/asm-ia64/io.h linux-2.6.18-xen-3.2.0/include/asm-ia64/io.h
+--- linux-2.6.18.8/include/asm-ia64/io.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/io.h 2008-02-15 16:22:11.000000000 -0800
+@@ -96,9 +96,39 @@ extern int valid_mmap_phys_addr_range (u
* The following two macros are deprecated and scheduled for removal.
* Please use the PCI-DMA interface defined in <asm/pci.h> instead.
*/
@@ -87669,18 +116986,13 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/io.h tmp-linux-2.6-xen.patch/i
+ (((bvec_to_bus((vec1)) + (vec1)->bv_len) == bvec_to_bus((vec2))) && \
+ ((bvec_to_pseudophys((vec1)) + (vec1)->bv_len) == \
+ bvec_to_pseudophys((vec2))))
-+
-+/* We will be supplying our own /dev/mem implementation */
-+#define ARCH_HAS_DEV_MEM
-+#define ARCH_HAS_DEV_MEM_MMAP_MEM
-+int xen_mmap_mem(struct file * file, struct vm_area_struct * vma);
+#endif /* CONFIG_XEN */
# endif /* KERNEL */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-ia64/iosapic.h linux-2.6.18-xen-3.2.0/include/asm-ia64/iosapic.h
+--- linux-2.6.18.8/include/asm-ia64/iosapic.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/iosapic.h 2008-02-15 16:22:11.000000000 -0800
@@ -53,6 +53,7 @@
#define NR_IOSAPICS 256
@@ -87697,9 +117009,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/iosapic.h tmp-linux-2.6-xen.pa
static inline void iosapic_eoi(char __iomem *iosapic, u32 vector)
{
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-ia64/irq.h linux-2.6.18-xen-3.2.0/include/asm-ia64/irq.h
+--- linux-2.6.18.8/include/asm-ia64/irq.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/irq.h 2008-02-15 16:22:11.000000000 -0800
@@ -11,8 +11,41 @@
* 02/29/00 D.Mosberger moved most things into hw_irq.h
*/
@@ -87722,7 +117034,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/irq.h tmp-linux-2.6-xen.patch/
+#define NR_PIRQS 256
+
+#define DYNIRQ_BASE (PIRQ_BASE + NR_PIRQS)
-+#define NR_DYNIRQS 256
++#define NR_DYNIRQS (CONFIG_NR_CPUS * 8)
+
+#define NR_IRQS (NR_PIRQS + NR_DYNIRQS)
+#define NR_IRQ_VECTORS NR_IRQS
@@ -87742,33 +117054,176 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/irq.h tmp-linux-2.6-xen.patch/
static __inline__ int
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-11-14 15:35:27.000000000 -0800
-@@ -13,4 +13,19 @@ extern ia64_mv_setup_t dig_setup;
- #define platform_name "dig"
- #define platform_setup dig_setup
-
+diff -rpuN linux-2.6.18.8/include/asm-ia64/kexec.h linux-2.6.18-xen-3.2.0/include/asm-ia64/kexec.h
+--- linux-2.6.18.8/include/asm-ia64/kexec.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/kexec.h 2008-02-15 16:22:11.000000000 -0800
+@@ -0,0 +1,58 @@
++#ifndef _ASM_IA64_KEXEC_H
++#define _ASM_IA64_KEXEC_H
++
++
++/* Maximum physical address we can use pages from */
++#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
++/* Maximum address we can reach in physical address mode */
++#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
++/* Maximum address we can use for the control code buffer */
++#define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
++
++#define KEXEC_CONTROL_CODE_SIZE (8192 + 8192 + 4096)
++
++/* The native architecture */
++#define KEXEC_ARCH KEXEC_ARCH_IA_64
++
++#define MAX_NOTE_BYTES 1024
++
++#define kexec_flush_icache_page(page) do { \
++ unsigned long page_addr = (unsigned long)page_address(page); \
++ flush_icache_range(page_addr, page_addr + PAGE_SIZE); \
++ } while(0)
++
++extern struct kimage *ia64_kimage;
++DECLARE_PER_CPU(u64, ia64_mca_pal_base);
++const extern unsigned int relocate_new_kernel_size;
++extern void relocate_new_kernel(unsigned long, unsigned long,
++ struct ia64_boot_param *, unsigned long);
++static inline void
++crash_setup_regs(struct pt_regs *newregs, struct pt_regs *oldregs)
++{
++}
++extern struct resource efi_memmap_res;
++extern struct resource boot_param_res;
++extern void kdump_smp_send_stop(void);
++extern void kdump_smp_send_init(void);
++extern void kexec_disable_iosapic(void);
++extern void crash_save_this_cpu(void);
++struct rsvd_region;
++extern unsigned long kdump_find_rsvd_region(unsigned long size,
++ struct rsvd_region *rsvd_regions, int n);
++extern void kdump_cpu_freeze(struct unw_frame_info *info, void *arg);
++extern int kdump_status[];
++extern atomic_t kdump_cpu_freezed;
++extern atomic_t kdump_in_progress;
++
++/* Kexec needs to know about the actual physical addresss.
++ * But in xen, on some architectures, a physical address is a
++ * pseudo-physical addresss. */
+#ifdef CONFIG_XEN
-+# define platform_dma_map_sg dma_map_sg
-+# define platform_dma_unmap_sg dma_unmap_sg
-+# define platform_dma_mapping_error dma_mapping_error
-+# define platform_dma_supported dma_supported
-+# define platform_dma_alloc_coherent dma_alloc_coherent
-+# define platform_dma_free_coherent dma_free_coherent
-+# define platform_dma_map_single dma_map_single
-+# define platform_dma_unmap_single dma_unmap_single
-+# define platform_dma_sync_single_for_cpu \
-+ dma_sync_single_for_cpu
-+# define platform_dma_sync_single_for_device \
-+ dma_sync_single_for_device
-+#endif
-+
- #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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,98 @@
++#define KEXEC_ARCH_HAS_PAGE_MACROS
++#define kexec_page_to_pfn(page) pfn_to_mfn_for_dma(page_to_pfn(page))
++#define kexec_pfn_to_page(pfn) pfn_to_page(mfn_to_pfn_for_dma(pfn))
++#define kexec_virt_to_phys(addr) phys_to_machine_for_dma(__pa(addr))
++#define kexec_phys_to_virt(addr) phys_to_virt(machine_to_phys_for_dma(addr))
++#endif
++
++#endif /* _ASM_IA64_KEXEC_H */
+diff -rpuN linux-2.6.18.8/include/asm-ia64/machvec.h linux-2.6.18-xen-3.2.0/include/asm-ia64/machvec.h
+--- linux-2.6.18.8/include/asm-ia64/machvec.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/machvec.h 2008-02-15 16:22:11.000000000 -0800
+@@ -35,6 +35,7 @@ typedef int ia64_mv_pci_legacy_read_t (s
+ typedef int ia64_mv_pci_legacy_write_t (struct pci_bus *, u16 port, u32 val,
+ u8 size);
+ typedef void ia64_mv_migrate_t(struct task_struct * task);
++typedef void ia64_mv_kernel_launch_event_t(void);
+
+ /* DMA-mapping interface: */
+ typedef void ia64_mv_dma_init (void);
+@@ -108,6 +109,8 @@ extern void machvec_tlb_migrate_finish (
+ # include <asm/machvec_hpzx1_swiotlb.h>
+ # elif defined (CONFIG_IA64_SGI_SN2)
+ # include <asm/machvec_sn2.h>
++# elif defined (CONFIG_IA64_XEN)
++# include <asm/machvec_xen.h>
+ # elif defined (CONFIG_IA64_GENERIC)
+
+ # ifdef MACHVEC_PLATFORM_HEADER
+@@ -205,6 +208,7 @@ struct ia64_machine_vector {
+ ia64_mv_readq_relaxed_t *readq_relaxed;
+ ia64_mv_migrate_t *migrate;
+ ia64_mv_msi_init_t *msi_init;
++ ia64_mv_kernel_launch_event_t *kernel_launch_event;
+ } __attribute__((__aligned__(16))); /* align attrib? see above comment */
+
+ #define MACHVEC_INIT(name) \
+@@ -303,6 +307,9 @@ extern ia64_mv_dma_supported swiotlb_dm
+ #ifndef platform_tlb_migrate_finish
+ # define platform_tlb_migrate_finish machvec_noop_mm
+ #endif
++#ifndef platform_kernel_launch_event
++# define platform_kernel_launch_event machvec_noop
++#endif
+ #ifndef platform_dma_init
+ # define platform_dma_init swiotlb_init
+ #endif
+diff -rpuN linux-2.6.18.8/include/asm-ia64/machvec_sn2.h linux-2.6.18-xen-3.2.0/include/asm-ia64/machvec_sn2.h
+--- linux-2.6.18.8/include/asm-ia64/machvec_sn2.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/machvec_sn2.h 2008-02-15 16:22:11.000000000 -0800
+@@ -67,6 +67,7 @@ extern ia64_mv_dma_sync_sg_for_device sn
+ extern ia64_mv_dma_mapping_error sn_dma_mapping_error;
+ extern ia64_mv_dma_supported sn_dma_supported;
+ extern ia64_mv_migrate_t sn_migrate;
++extern ia64_mv_kernel_launch_event_t sn_kernel_launch_event;
+ extern ia64_mv_msi_init_t sn_msi_init;
+
+
+@@ -119,6 +120,7 @@ extern ia64_mv_msi_init_t sn_msi_init;
+ #define platform_dma_mapping_error sn_dma_mapping_error
+ #define platform_dma_supported sn_dma_supported
+ #define platform_migrate sn_migrate
++#define platform_kernel_launch_event sn_kernel_launch_event
+ #ifdef CONFIG_PCI_MSI
+ #define platform_msi_init sn_msi_init
+ #else
+diff -rpuN linux-2.6.18.8/include/asm-ia64/machvec_xen.h linux-2.6.18-xen-3.2.0/include/asm-ia64/machvec_xen.h
+--- linux-2.6.18.8/include/asm-ia64/machvec_xen.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/machvec_xen.h 2008-02-15 16:22:11.000000000 -0800
+@@ -0,0 +1,43 @@
++#ifndef _ASM_IA64_MACHVEC_XEN_h
++#define _ASM_IA64_MACHVEC_XEN_h
++
++extern ia64_mv_setup_t xen_setup;
++extern ia64_mv_cpu_init_t xen_cpu_init;
++extern ia64_mv_irq_init_t xen_irq_init;
++extern ia64_mv_send_ipi_t xen_platform_send_ipi;
++extern ia64_mv_dma_alloc_coherent xen_alloc_coherent;
++extern ia64_mv_dma_free_coherent xen_free_coherent;
++extern ia64_mv_dma_map_single xen_map_single;
++extern ia64_mv_dma_unmap_single xen_unmap_single;
++extern ia64_mv_dma_map_sg xen_map_sg;
++extern ia64_mv_dma_unmap_sg xen_unmap_sg;
++extern ia64_mv_dma_supported xen_dma_supported;
++extern ia64_mv_dma_mapping_error xen_dma_mapping_error;
++
++/*
++ * This stuff has dual use!
++ *
++ * For a generic kernel, the macros are used to initialize the
++ * platform's machvec structure. When compiling a non-generic kernel,
++ * the macros are used directly.
++ */
++#define platform_name "xen"
++#define platform_setup xen_setup
++#define platform_cpu_init xen_cpu_init
++#define platform_irq_init xen_irq_init
++#define platform_send_ipi xen_platform_send_ipi
++#define platform_dma_init machvec_noop
++#define platform_dma_alloc_coherent xen_alloc_coherent
++#define platform_dma_free_coherent xen_free_coherent
++#define platform_dma_map_single xen_map_single
++#define platform_dma_unmap_single xen_unmap_single
++#define platform_dma_map_sg xen_map_sg
++#define platform_dma_unmap_sg xen_unmap_sg
++#define platform_dma_sync_single_for_cpu machvec_dma_sync_single
++#define platform_dma_sync_sg_for_cpu machvec_dma_sync_sg
++#define platform_dma_sync_single_for_device machvec_dma_sync_single
++#define platform_dma_sync_sg_for_device machvec_dma_sync_sg
++#define platform_dma_supported xen_dma_supported
++#define platform_dma_mapping_error xen_dma_mapping_error
++
++#endif /* _ASM_IA64_MACHVEC_XEN_h */
+diff -rpuN linux-2.6.18.8/include/asm-ia64/maddr.h linux-2.6.18-xen-3.2.0/include/asm-ia64/maddr.h
+--- linux-2.6.18.8/include/asm-ia64/maddr.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/maddr.h 2008-02-15 16:22:11.000000000 -0800
+@@ -0,0 +1,126 @@
+#ifndef _ASM_IA64_MADDR_H
+#define _ASM_IA64_MADDR_H
+
@@ -87802,8 +117257,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/maddr.h tmp-linux-2.6-xen.patc
+ if (p2m_initialized)
+ return p2m_phystomach(pfn);
+ mfn = HYPERVISOR_phystomach(pfn);
-+ BUG_ON(mfn == 0); // XXX
-+ BUG_ON(mfn == INVALID_P2M_ENTRY); // XXX
++ BUG_ON(mfn == 0); /* XXX */
++ BUG_ON(mfn == INVALID_P2M_ENTRY); /* XXX */
+ BUG_ON(mfn == INVALID_MFN);
+ return mfn;
+}
@@ -87823,7 +117278,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/maddr.h tmp-linux-2.6-xen.patc
+ unsigned long pfn;
+ pfn = HYPERVISOR_machtophys(mfn);
+ BUG_ON(pfn == 0);
-+ //BUG_ON(pfn == INVALID_M2P_ENTRY);
++ /* BUG_ON(pfn == INVALID_M2P_ENTRY); */
+ return pfn;
+}
+
@@ -87836,6 +117291,15 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/maddr.h tmp-linux-2.6-xen.patc
+ return phys;
+}
+
++#ifdef CONFIG_SPARSEMEM
++/*
++ * When CONFIG_SPARSEMEM=y, pfn_valid() is defined in
++ * linux/include/linux/mmzone.h. Hoever #include <linux/mmzone.h>
++ * causes the header inclusion hell.
++ */
++static inline int pfn_valid(unsigned long pfn);
++#endif
++
+static inline unsigned long
+mfn_to_local_pfn(unsigned long mfn)
+{
@@ -87860,35 +117324,73 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/maddr.h tmp-linux-2.6-xen.patc
+
+#define mfn_to_virt(mfn) (__va((mfn) << PAGE_SHIFT))
+#define virt_to_mfn(virt) (__pa(virt) >> PAGE_SHIFT)
-+#define virt_to_machine(virt) __pa(virt) // for tpmfront.c
++#define virt_to_machine(virt) __pa(virt) /* for tpmfront.c */
+
+#define set_phys_to_machine(pfn, mfn) do { } while (0)
+
-+typedef unsigned long maddr_t; // to compile netback, netfront
++typedef unsigned long maddr_t; /* to compile netback, netfront */
++#ifndef _ASM_IA64_SN_TYPES_H /* paddr_t is defined in asm-ia64/sn/types.h */
++typedef unsigned long paddr_t;
++#endif
++
++#ifdef CONFIG_XEN
++static inline int
++range_straddles_page_boundary(paddr_t p, size_t size)
++{
++ extern unsigned long *contiguous_bitmap;
++
++ if (!is_running_on_xen())
++ return 0;
++
++ return ((((p & ~PAGE_MASK) + size) > PAGE_SIZE) &&
++ !test_bit(p >> PAGE_SHIFT, contiguous_bitmap));
++}
++#else
++#define range_straddles_page_boundary(addr, size) (0)
++#endif
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -16,10 +16,15 @@
+diff -rpuN linux-2.6.18.8/include/asm-ia64/meminit.h linux-2.6.18-xen-3.2.0/include/asm-ia64/meminit.h
+--- linux-2.6.18.8/include/asm-ia64/meminit.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/meminit.h 2008-02-15 16:22:11.000000000 -0800
+@@ -15,11 +15,17 @@
+ * - initrd (optional)
* - command line string
* - kernel code & data
++ * - crash dumping code reserved region
* - Kernel memory map built from EFI memory map
+ * - xen start info
*
* More could be added if necessary
*/
+-#define IA64_MAX_RSVD_REGIONS 6
+#ifndef CONFIG_XEN
- #define IA64_MAX_RSVD_REGIONS 6
-+#else
+#define IA64_MAX_RSVD_REGIONS 7
++#else
++#define IA64_MAX_RSVD_REGIONS 8
+#endif
struct rsvd_region {
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-ia64/mmu_context.h linux-2.6.18-xen-3.2.0/include/asm-ia64/mmu_context.h
+--- linux-2.6.18.8/include/asm-ia64/mmu_context.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/mmu_context.h 2008-02-15 16:22:11.000000000 -0800
+@@ -151,11 +151,7 @@ reload_context (nv_mm_context_t context)
+ # endif
+ #endif
+
+- ia64_set_rr(0x0000000000000000UL, rr0);
+- ia64_set_rr(0x2000000000000000UL, rr1);
+- ia64_set_rr(0x4000000000000000UL, rr2);
+- ia64_set_rr(0x6000000000000000UL, rr3);
+- ia64_set_rr(0x8000000000000000UL, rr4);
++ ia64_set_rr0_to_rr4(rr0, rr1, rr2, rr3, rr4);
+ ia64_srlz_i(); /* srlz.i implies srlz.d */
+ }
+
+diff -rpuN linux-2.6.18.8/include/asm-ia64/page.h linux-2.6.18-xen-3.2.0/include/asm-ia64/page.h
+--- linux-2.6.18.8/include/asm-ia64/page.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/page.h 2008-02-15 16:22:11.000000000 -0800
@@ -119,6 +119,7 @@ extern struct page *vmem_map;
#endif
@@ -87907,46 +117409,27 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/page.h tmp-linux-2.6-xen.patch
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
-@@ -227,5 +230,25 @@ get_order (unsigned long size)
+@@ -227,5 +230,17 @@ get_order (unsigned long size)
(((current->personality & READ_IMPLIES_EXEC) != 0) \
? VM_EXEC : 0))
+#ifndef __ASSEMBLY__
-+#ifdef CONFIG_XEN
+
+#include <linux/kernel.h>
-+#include <asm/hypervisor.h>
-+#include <xen/features.h> // to compile netback, netfront
-+#include <asm/maddr.h>
++#include <asm/hypervisor.h> /* to compile ioremap.c */
+
-+#define arch_free_page(_page, _order) \
-+({ \
-+ int foreign = PageForeign(_page); \
-+ if (foreign) \
-+ PageForeignDestructor(_page); \
-+ foreign; \
-+})
-+#define HAVE_ARCH_FREE_PAGE
++#ifdef CONFIG_XEN
++
++#include <asm/maddr.h>
+
+#endif /* CONFIG_XEN */
+#endif /* __ASSEMBLY__ */
+
# endif /* __KERNEL__ */
#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-11-14 15:35:27.000000000 -0800
-@@ -82,6 +82,7 @@
- #ifndef __ASSEMBLY__
-
- #include <linux/types.h>
-+#include <asm/processor.h>
- #include <asm/fpu.h>
-
- /*
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-ia64/pgalloc.h linux-2.6.18-xen-3.2.0/include/asm-ia64/pgalloc.h
+--- linux-2.6.18.8/include/asm-ia64/pgalloc.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/pgalloc.h 2008-02-15 16:22:11.000000000 -0800
@@ -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)
@@ -87959,13 +117442,16 @@ 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,60 @@
+diff -rpuN linux-2.6.18.8/include/asm-ia64/privop.h linux-2.6.18-xen-3.2.0/include/asm-ia64/privop.h
+--- linux-2.6.18.8/include/asm-ia64/privop.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/privop.h 2008-02-15 16:22:11.000000000 -0800
+@@ -0,0 +1,63 @@
+#ifndef _ASM_IA64_PRIVOP_H
+#define _ASM_IA64_PRIVOP_H
+
++#ifndef _ASM_IA64_INTRINSICS_H
++#error "don't include privop.h directly. instead include intrinsics.h"
++#endif
+/*
+ * Copyright (C) 2005 Hewlett-Packard Co
+ * Dan Magenheimer <dan.magenheimer@hp.com>
@@ -88010,33 +117496,22 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/privop.h tmp-linux-2.6-xen.pat
+#define ia64_ptrd __ia64_ptrd
+#define ia64_get_psr_i __ia64_get_psr_i
+#define ia64_intrin_local_irq_restore __ia64_intrin_local_irq_restore
-+#define ia64_pal_halt_light __ia64_pal_halt_light
+#define ia64_leave_kernel __ia64_leave_kernel
+#define ia64_leave_syscall __ia64_leave_syscall
+#define ia64_trace_syscall __ia64_trace_syscall
+#define ia64_ret_from_clone __ia64_ret_from_clone
+#define ia64_switch_to __ia64_switch_to
+#define ia64_pal_call_static __ia64_pal_call_static
++#define ia64_set_rr0_to_rr4 __ia64_set_rr0_to_rr4
+
+#endif /* !IA64_PARAVIRTUALIZED */
+
+#endif /* !__ASSEMBLY */
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -18,6 +18,7 @@
- #include <asm/kregs.h>
- #include <asm/ptrace.h>
- #include <asm/ustack.h>
-+#include <asm/privop.h>
-
- #define IA64_NUM_DBG_REGS 8
- /*
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-ia64/sal.h linux-2.6.18-xen-3.2.0/include/asm-ia64/sal.h
+--- linux-2.6.18.8/include/asm-ia64/sal.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/sal.h 2008-02-15 16:22:11.000000000 -0800
@@ -42,6 +42,9 @@
#include <asm/pal.h>
#include <asm/system.h>
@@ -88047,12 +117522,19 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/sal.h tmp-linux-2.6-xen.patch/
extern spinlock_t sal_lock;
-@@ -686,10 +689,28 @@ ia64_sal_clear_state_info (u64 sal_info_
+@@ -686,10 +689,43 @@ ia64_sal_clear_state_info (u64 sal_info_
/* Get the processor and platform information logged by SAL with respect to the machine
* state at the time of the MCAs, INITs, CMCs, or CPEs.
*/
+#ifdef CONFIG_XEN
+static inline u64 ia64_sal_get_state_info_size (u64 sal_info_type);
++typedef struct ia64_mca_xencomm_t {
++ void *record;
++ struct xencomm_handle *handle;
++ struct list_head list;
++} ia64_mca_xencomm_t;
++extern struct list_head ia64_mca_xencomm_list;
++extern spinlock_t ia64_mca_xencomm_lock;
+#endif
+
static inline u64
@@ -88061,24 +117543,69 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/sal.h tmp-linux-2.6-xen.patch/
struct ia64_sal_retval isrv;
+#ifdef CONFIG_XEN
+ if (is_running_on_xen()) {
-+ struct xencomm_handle *desc;
++ ia64_mca_xencomm_t *entry;
++ struct xencomm_handle *desc = NULL;
++ unsigned long flags;
++
++ spin_lock_irqsave(&ia64_mca_xencomm_lock, flags);
++ list_for_each_entry(entry, &ia64_mca_xencomm_list, list) {
++ if (entry->record == sal_info) {
++ desc = entry->handle;
++ break;
++ }
++ }
++ spin_unlock_irqrestore(&ia64_mca_xencomm_lock, flags);
+
-+ if (xencomm_create(sal_info,
-+ ia64_sal_get_state_info_size(sal_info_type),
-+ &desc, GFP_ATOMIC))
++ if (desc == NULL)
+ return 0;
+
+ SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
+ desc, 0, 0, 0, 0);
-+ xencomm_free(desc);
+ } else
+#endif
SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
sal_info, 0, 0, 0, 0);
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-ia64/sn/sn_sal.h linux-2.6.18-xen-3.2.0/include/asm-ia64/sn/sn_sal.h
+--- linux-2.6.18.8/include/asm-ia64/sn/sn_sal.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/sn/sn_sal.h 2008-02-15 16:22:11.000000000 -0800
+@@ -87,6 +87,8 @@
+ #define SN_SAL_INJECT_ERROR 0x02000067
+ #define SN_SAL_SET_CPU_NUMBER 0x02000068
+
++#define SN_SAL_KERNEL_LAUNCH_EVENT 0x02000069
++
+ /*
+ * Service-specific constants
+ */
+@@ -1154,4 +1156,11 @@ ia64_sn_set_cpu_number(int cpu)
+ SAL_CALL_NOLOCK(rv, SN_SAL_SET_CPU_NUMBER, cpu, 0, 0, 0, 0, 0, 0);
+ return rv.status;
+ }
++static inline int
++ia64_sn_kernel_launch_event(void)
++{
++ struct ia64_sal_retval rv;
++ SAL_CALL_NOLOCK(rv, SN_SAL_KERNEL_LAUNCH_EVENT, 0, 0, 0, 0, 0, 0, 0);
++ return rv.status;
++}
+ #endif /* _ASM_IA64_SN_SN_SAL_H */
+diff -rpuN linux-2.6.18.8/include/asm-ia64/sn/types.h linux-2.6.18-xen-3.2.0/include/asm-ia64/sn/types.h
+--- linux-2.6.18.8/include/asm-ia64/sn/types.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/sn/types.h 2008-02-15 16:22:11.000000000 -0800
+@@ -20,7 +20,9 @@ typedef unsigned char slotid_t; /* slot
+ typedef unsigned char slabid_t; /* slab (asic) within slot */
+ typedef u64 nic_t;
+ typedef unsigned long iopaddr_t;
++#ifndef _ASM_IA64_MADDR_H /* paddr_t is defined in asm-ia64/maddr.h */
+ typedef unsigned long paddr_t;
++#endif
+ typedef short cnodeid_t;
+
+ #endif /* _ASM_IA64_SN_TYPES_H */
+diff -rpuN linux-2.6.18.8/include/asm-ia64/swiotlb.h linux-2.6.18-xen-3.2.0/include/asm-ia64/swiotlb.h
+--- linux-2.6.18.8/include/asm-ia64/swiotlb.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/swiotlb.h 2008-02-15 16:22:11.000000000 -0800
@@ -0,0 +1,41 @@
+#ifndef _ASM_SWIOTLB_H
+#define _ASM_SWIOTLB_H 1
@@ -88121,9 +117648,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/swiotlb.h tmp-linux-2.6-xen.pa
+#endif
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-ia64/synch_bitops.h linux-2.6.18-xen-3.2.0/include/asm-ia64/synch_bitops.h
+--- linux-2.6.18.8/include/asm-ia64/synch_bitops.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/synch_bitops.h 2008-02-15 16:22:11.000000000 -0800
@@ -0,0 +1,61 @@
+#ifndef __XEN_SYNCH_BITOPS_H__
+#define __XEN_SYNCH_BITOPS_H__
@@ -88186,9 +117713,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/synch_bitops.h tmp-linux-2.6-x
+#define synch_cmpxchg_subword synch_cmpxchg
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-ia64/system.h linux-2.6.18-xen-3.2.0/include/asm-ia64/system.h
+--- linux-2.6.18.8/include/asm-ia64/system.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/system.h 2008-02-15 16:22:11.000000000 -0800
@@ -123,7 +123,7 @@ extern struct ia64_boot_param {
#define __local_irq_save(x) \
do { \
@@ -88207,47 +117734,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/system.h tmp-linux-2.6-xen.pat
#define irqs_disabled() \
({ \
-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-11-14 15:35:27.000000000 -0800
-@@ -365,6 +365,7 @@ ia64_done_with_exception (struct pt_regs
- }
-
- #define ARCH_HAS_TRANSLATE_MEM_PTR 1
-+#ifndef CONFIG_XEN
- static __inline__ char *
- xlate_dev_mem_ptr (unsigned long p)
- {
-@@ -379,6 +380,25 @@ xlate_dev_mem_ptr (unsigned long p)
-
- return ptr;
- }
-+#else
-+static __inline__ char *
-+xlate_dev_mem_ptr (unsigned long p, ssize_t sz)
-+{
-+ unsigned long pfn = p >> PAGE_SHIFT;
-+
-+ if (pfn_valid(pfn) && !PageUncached(pfn_to_page(pfn)))
-+ return __va(p);
-+
-+ return ioremap(p, sz);
-+}
-+
-+static __inline__ void
-+xlate_dev_mem_ptr_unmap (char* v)
-+{
-+ if (REGION_NUMBER(v) == RGN_UNCACHED)
-+ iounmap(v);
-+}
-+#endif
-
- /*
- * 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,310 @@
+diff -rpuN linux-2.6.18.8/include/asm-ia64/xen/privop.h linux-2.6.18-xen-3.2.0/include/asm-ia64/xen/privop.h
+--- linux-2.6.18.8/include/asm-ia64/xen/privop.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/xen/privop.h 2008-02-15 16:22:11.000000000 -0800
+@@ -0,0 +1,551 @@
+#ifndef _ASM_IA64_XEN_PRIVOP_H
+#define _ASM_IA64_XEN_PRIVOP_H
+
@@ -88259,7 +117749,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+ *
+ */
+
-+
++#ifndef __ASSEMBLY__
++#include <linux/types.h> /* arch-ia64.h requires uint64_t */
++#include <linux/stringify.h>
++#endif
+#include <xen/interface/arch-ia64.h>
+
+#define IA64_PARAVIRTUALIZED
@@ -88325,10 +117818,48 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+ * may have different semantics depending on whether they are executed
+ * at PL0 vs PL!=0. When paravirtualized, these instructions mustn't
+ * be allowed to execute directly, lest incorrect semantics result. */
-+extern unsigned long xen_fc(unsigned long addr);
-+#define ia64_fc(addr) xen_fc((unsigned long)(addr))
++#ifdef ASM_SUPPORTED
++static inline void
++xen_fc(unsigned long addr)
++{
++ register __u64 __addr asm ("r8") = addr;
++ asm volatile ("break %0":: "i"(HYPERPRIVOP_FC), "r"(__addr));
++}
++
++static inline unsigned long
++xen_thash(unsigned long addr)
++{
++ register __u64 ia64_intri_res asm ("r8");
++ register __u64 __addr asm ("r8") = addr;
++ asm volatile ("break %1":
++ "=r"(ia64_intri_res):
++ "i"(HYPERPRIVOP_THASH), "0"(__addr));
++ return ia64_intri_res;
++}
++#else
++extern void xen_fc(unsigned long addr);
+extern unsigned long xen_thash(unsigned long addr);
-+#define ia64_thash(addr) xen_thash((unsigned long)(addr))
++#endif
++
++#define ia64_fc(addr) \
++do { \
++ if (is_running_on_xen()) \
++ xen_fc((unsigned long)(addr)); \
++ else \
++ __ia64_fc(addr); \
++} while (0)
++
++#define ia64_thash(addr) \
++({ \
++ unsigned long ia64_intri_res; \
++ if (is_running_on_xen()) \
++ ia64_intri_res = \
++ xen_thash((unsigned long)(addr)); \
++ else \
++ ia64_intri_res = __ia64_thash(addr); \
++ ia64_intri_res; \
++})
++
+/* Note that "ttag" and "cover" are also privilege-sensitive; "ttag"
+ * is not currently used (though it may be in a long-format VHPT system!)
+ * and the semantics of cover only change if psr.ic is off which is very
@@ -88336,12 +117867,73 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+
+/* There are also privilege-sensitive registers. These registers are
+ * readable at any privilege level but only writable at PL0. */
++#ifdef ASM_SUPPORTED
++static inline unsigned long
++xen_get_cpuid(int index)
++{
++ register __u64 ia64_intri_res asm ("r8");
++ register __u64 __index asm ("r8") = index;
++ asm volatile ("break %1":
++ "=r"(ia64_intri_res):
++ "i"(HYPERPRIVOP_GET_CPUID), "0"(__index));
++ return ia64_intri_res;
++}
++
++static inline unsigned long
++xen_get_pmd(int index)
++{
++ register __u64 ia64_intri_res asm ("r8");
++ register __u64 __index asm ("r8") = index;
++ asm volatile ("break %1":
++ "=r"(ia64_intri_res):
++ "i"(HYPERPRIVOP_GET_PMD), "0O"(__index));
++ return ia64_intri_res;
++}
++#else
+extern unsigned long xen_get_cpuid(int index);
-+#define ia64_get_cpuid(i) xen_get_cpuid(i)
+extern unsigned long xen_get_pmd(int index);
-+#define ia64_get_pmd(i) xen_get_pmd(i)
++#endif
++
++#define ia64_get_cpuid(i) \
++({ \
++ unsigned long ia64_intri_res; \
++ if (is_running_on_xen()) \
++ ia64_intri_res = xen_get_cpuid(i); \
++ else \
++ ia64_intri_res = __ia64_get_cpuid(i); \
++ ia64_intri_res; \
++})
++
++#define ia64_get_pmd(i) \
++({ \
++ unsigned long ia64_intri_res; \
++ if (is_running_on_xen()) \
++ ia64_intri_res = xen_get_pmd(i); \
++ else \
++ ia64_intri_res = __ia64_get_pmd(i); \
++ ia64_intri_res; \
++})
++
++#ifdef ASM_SUPPORTED
++static inline unsigned long
++xen_get_eflag(void)
++{
++ register __u64 ia64_intri_res asm ("r8");
++ asm volatile ("break %1":
++ "=r"(ia64_intri_res): "i"(HYPERPRIVOP_GET_EFLAG));
++ return ia64_intri_res;
++}
++
++static inline void
++xen_set_eflag(unsigned long val)
++{
++ register __u64 __val asm ("r8") = val;
++ asm volatile ("break %0":: "i"(HYPERPRIVOP_SET_EFLAG), "r"(__val));
++}
++#else
+extern unsigned long xen_get_eflag(void); /* see xen_ia64_getreg */
+extern void xen_set_eflag(unsigned long); /* see xen_ia64_setreg */
++#endif
+
+/************************************************/
+/* Instructions paravirtualized for performance */
@@ -88377,7 +117969,11 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+
+/* turning off interrupts can be paravirtualized simply by writing
+ * to a memory-mapped virtual psr.i bit (implemented as a 16-bit bool) */
-+#define xen_rsm_i() xen_set_virtual_psr_i(0)
++#define xen_rsm_i() \
++{ \
++ xen_set_virtual_psr_i(0); \
++ barrier(); \
++}
+
+/* turning on interrupts is a bit more complicated.. write to the
+ * memory-mapped virtual psr.i bit first (to avoid race condition),
@@ -88386,12 +117982,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+#define xen_ssm_i() \
+({ \
+ int old = xen_get_virtual_psr_i(); \
-+ if (!old) { \
-+ if (xen_get_virtual_pend()) \
-+ xen_hyper_ssm_i(); \
-+ else \
-+ xen_set_virtual_psr_i(1); \
-+ } \
++ xen_set_virtual_psr_i(1); \
++ barrier(); \
++ if (!old && xen_get_virtual_pend()) \
++ xen_hyper_ssm_i(); \
+})
+
+#define xen_ia64_intrin_local_irq_restore(x) \
@@ -88413,7 +118007,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+#define xen_ia64_ssm(mask) \
+{ \
+ if ((mask)==IA64_PSR_I) { \
-+ if (is_running_on_xen()) { xen_ssm_i(); } \
++ if (is_running_on_xen()) { xen_ssm_i(); } \
+ else { __ia64_ssm(mask); } \
+ } \
+ else { __ia64_ssm(mask); } \
@@ -88422,7 +118016,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+#define xen_ia64_rsm(mask) \
+{ \
+ if ((mask)==IA64_PSR_I) { \
-+ if (is_running_on_xen()) { xen_rsm_i(); } \
++ if (is_running_on_xen()) { xen_rsm_i(); } \
+ else { __ia64_rsm(mask); } \
+ } \
+ else { __ia64_rsm(mask); } \
@@ -88433,16 +118027,121 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+ * be properly handled by Xen, some are frequent enough that we use
+ * hyperprivops for performance. */
+
++#ifndef ASM_SUPPORTED
+extern unsigned long xen_get_psr(void);
+extern unsigned long xen_get_ivr(void);
+extern unsigned long xen_get_tpr(void);
+extern void xen_set_itm(unsigned long);
+extern void xen_set_tpr(unsigned long);
-+extern void xen_eoi(void);
++extern void xen_eoi(unsigned long);
+extern void xen_set_rr(unsigned long index, unsigned long val);
+extern unsigned long xen_get_rr(unsigned long index);
+extern void xen_set_kr(unsigned long index, unsigned long val);
+extern void xen_ptcga(unsigned long addr, unsigned long size);
++#else
++static inline unsigned long
++xen_get_psr(void)
++{
++ register __u64 ia64_intri_res asm ("r8");
++ asm volatile ("break %1":
++ "=r"(ia64_intri_res): "i"(HYPERPRIVOP_GET_PSR));
++ return ia64_intri_res;
++}
++
++static inline unsigned long
++xen_get_ivr(void)
++{
++ register __u64 ia64_intri_res asm ("r8");
++ asm volatile ("break %1":
++ "=r"(ia64_intri_res): "i"(HYPERPRIVOP_GET_IVR));
++ return ia64_intri_res;
++}
++
++static inline unsigned long
++xen_get_tpr(void)
++{
++ register __u64 ia64_intri_res asm ("r8");
++ asm volatile ("break %1":
++ "=r"(ia64_intri_res): "i"(HYPERPRIVOP_GET_TPR));
++ return ia64_intri_res;
++}
++
++static inline void
++xen_set_tpr(unsigned long val)
++{
++ register __u64 __val asm ("r8") = val;
++ asm volatile ("break %0"::
++ "i"(HYPERPRIVOP_GET_TPR), "r"(__val));
++}
++
++static inline void
++xen_eoi(unsigned long val)
++{
++ register __u64 __val asm ("r8") = val;
++ asm volatile ("break %0"::
++ "i"(HYPERPRIVOP_EOI), "r"(__val));
++}
++
++static inline void
++xen_set_itm(unsigned long val)
++{
++ register __u64 __val asm ("r8") = val;
++ asm volatile ("break %0":: "i"(HYPERPRIVOP_SET_ITM), "r"(__val));
++}
++
++static inline void
++xen_ptcga(unsigned long addr, unsigned long size)
++{
++ register __u64 __addr asm ("r8") = addr;
++ register __u64 __size asm ("r9") = size;
++ asm volatile ("break %0"::
++ "i"(HYPERPRIVOP_PTC_GA), "r"(__addr), "r"(__size));
++}
++
++static inline unsigned long
++xen_get_rr(unsigned long index)
++{
++ register __u64 ia64_intri_res asm ("r8");
++ register __u64 __index asm ("r8") = index;
++ asm volatile ("break %1":
++ "=r"(ia64_intri_res):
++ "i"(HYPERPRIVOP_GET_RR), "0"(__index));
++ return ia64_intri_res;
++}
++
++static inline void
++xen_set_rr(unsigned long index, unsigned long val)
++{
++ register __u64 __index asm ("r8") = index;
++ register __u64 __val asm ("r9") = val;
++ asm volatile ("break %0"::
++ "i"(HYPERPRIVOP_SET_RR), "r"(__index), "r"(__val));
++}
++
++static inline void
++xen_set_rr0_to_rr4(unsigned long val0, unsigned long val1,
++ unsigned long val2, unsigned long val3, unsigned long val4)
++{
++ register __u64 __val0 asm ("r8") = val0;
++ register __u64 __val1 asm ("r9") = val1;
++ register __u64 __val2 asm ("r10") = val2;
++ register __u64 __val3 asm ("r11") = val3;
++ register __u64 __val4 asm ("r14") = val4;
++ asm volatile ("break %0" ::
++ "i"(HYPERPRIVOP_SET_RR0_TO_RR4),
++ "r"(__val0), "r"(__val1),
++ "r"(__val2), "r"(__val3), "r"(__val4));
++}
++
++static inline void
++xen_set_kr(unsigned long index, unsigned long val)
++{
++ register __u64 __index asm ("r8") = index;
++ register __u64 __val asm ("r9") = val;
++ asm volatile ("break %0"::
++ "i"(HYPERPRIVOP_SET_KR), "r"(__index), "r"(__val));
++}
++#endif
+
+/* Note: It may look wrong to test for is_running_on_xen() in each case.
+ * However regnum is always a constant so, as written, the compiler
@@ -88454,22 +118153,22 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+ \
+ switch(regnum) { \
+ case _IA64_REG_PSR: \
-+ ia64_intri_res = (is_running_on_xen()) ? \
++ ia64_intri_res = (is_running_on_xen()) ? \
+ xen_get_psr() : \
+ __ia64_getreg(regnum); \
+ break; \
+ case _IA64_REG_CR_IVR: \
-+ ia64_intri_res = (is_running_on_xen()) ? \
++ ia64_intri_res = (is_running_on_xen()) ? \
+ xen_get_ivr() : \
+ __ia64_getreg(regnum); \
+ break; \
+ case _IA64_REG_CR_TPR: \
-+ ia64_intri_res = (is_running_on_xen()) ? \
++ ia64_intri_res = (is_running_on_xen()) ? \
+ xen_get_tpr() : \
+ __ia64_getreg(regnum); \
+ break; \
+ case _IA64_REG_AR_EFLAG: \
-+ ia64_intri_res = (is_running_on_xen()) ? \
++ ia64_intri_res = (is_running_on_xen()) ? \
+ xen_get_eflag() : \
+ __ia64_getreg(regnum); \
+ break; \
@@ -88500,7 +118199,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+ break; \
+ case _IA64_REG_CR_EOI: \
+ (is_running_on_xen()) ? \
-+ xen_eoi() : \
++ xen_eoi(val) : \
+ __ia64_setreg(regnum,val); \
+ break; \
+ case _IA64_REG_AR_EFLAG: \
@@ -88514,14 +118213,47 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+ } \
+})
+
++#define ia64_ptcga(addr, size) \
++do { \
++ if (is_running_on_xen()) \
++ xen_ptcga((addr), (size)); \
++ else \
++ __ia64_ptcga((addr), (size)); \
++} while (0)
++
++#define ia64_set_rr(index, val) \
++do { \
++ if (is_running_on_xen()) \
++ xen_set_rr((index), (val)); \
++ else \
++ __ia64_set_rr((index), (val)); \
++} while (0)
++
++#define ia64_get_rr(index) \
++({ \
++ __u64 ia64_intri_res; \
++ if (is_running_on_xen()) \
++ ia64_intri_res = xen_get_rr((index)); \
++ else \
++ ia64_intri_res = __ia64_get_rr((index)); \
++ ia64_intri_res; \
++})
++
++#define ia64_set_rr0_to_rr4(val0, val1, val2, val3, val4) \
++do { \
++ if (is_running_on_xen()) \
++ xen_set_rr0_to_rr4((val0), (val1), (val2), \
++ (val3), (val4)); \
++ else \
++ __ia64_set_rr0_to_rr4((val0), (val1), (val2), \
++ (val3), (val4)); \
++} while (0)
++
++#define ia64_getreg xen_ia64_getreg
++#define ia64_setreg xen_ia64_setreg
+#define ia64_ssm xen_ia64_ssm
+#define ia64_rsm xen_ia64_rsm
+#define ia64_intrin_local_irq_restore xen_ia64_intrin_local_irq_restore
-+#define ia64_ptcga xen_ptcga
-+#define ia64_set_rr(index,val) xen_set_rr(index,val)
-+#define ia64_get_rr(index) xen_get_rr(index)
-+#define ia64_getreg xen_ia64_getreg
-+#define ia64_setreg xen_ia64_setreg
+#define ia64_get_psr_i xen_get_psr_i
+
+/* the remainder of these are not performance-sensitive so its
@@ -88549,7 +118281,6 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+/* these routines utilize privilege-sensitive or performance-sensitive
+ * privileged instructions so the code must be replaced with
+ * paravirtualized versions */
-+#define ia64_pal_halt_light xen_pal_halt_light
+#define ia64_leave_kernel xen_leave_kernel
+#define ia64_leave_syscall xen_leave_syscall
+#define ia64_trace_syscall xen_trace_syscall
@@ -88558,10 +118289,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/privop.h tmp-linux-2.6-xen
+#define ia64_pal_call_static xen_pal_call_static
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,88 @@
+diff -rpuN linux-2.6.18.8/include/asm-ia64/xen/xcom_hcall.h linux-2.6.18-xen-3.2.0/include/asm-ia64/xen/xcom_hcall.h
+--- linux-2.6.18.8/include/asm-ia64/xen/xcom_hcall.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/xen/xcom_hcall.h 2008-02-15 16:22:11.000000000 -0800
+@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2006 Tristan Gingold <tristan.gingold@bull.net>, Bull SAS
+ *
@@ -88583,7 +118314,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/xcom_hcall.h tmp-linux-2.6
+#ifndef _LINUX_XENCOMM_HCALL_H_
+#define _LINUX_XENCOMM_HCALL_H_
+
-+/* These function creates inline descriptor for the parameters and
++/* These function creates inline or mini descriptor for the parameters and
+ calls the corresponding xencomm_arch_hypercall_X.
+ Architectures should defines HYPERVISOR_xxx as xencomm_hypercall_xxx unless
+ they want to use their own wrapper. */
@@ -88617,43 +118348,22 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/xcom_hcall.h tmp-linux-2.6
+
+extern long xencomm_hypercall_vcpu_op(int cmd, int cpu, void *arg);
+
-+/* Using mini xencomm. */
-+extern int xencomm_mini_hypercall_console_io(int cmd, int count, char *str);
-+
-+extern int xencomm_mini_hypercall_event_channel_op(int cmd, void *op);
-+
-+extern int xencomm_mini_hypercall_xen_version(int cmd, void *arg);
-+
-+extern int xencomm_mini_hypercall_physdev_op(int cmd, void *op);
-+
-+extern int xencomm_mini_hypercall_grant_table_op(unsigned int cmd, void *op,
-+ unsigned int count);
-+
-+extern int xencomm_mini_hypercall_sched_op(int cmd, void *arg);
-+
-+extern int xencomm_mini_hypercall_multicall(void *call_list, int nr_calls);
-+
-+extern int xencomm_mini_hypercall_callback_op(int cmd, void *arg);
-+
-+extern int xencomm_mini_hypercall_memory_op(unsigned int cmd, void *arg);
-+
-+extern unsigned long xencomm_mini_hypercall_hvm_op(int cmd, void *arg);
-+
-+extern int xencomm_mini_hypercall_xenoprof_op(int op, void *arg);
-+
-+extern int xencomm_mini_hypercall_perfmon_op(unsigned long cmd, void* arg,
-+ unsigned long count);
++extern long xencomm_hypercall_opt_feature(void *arg);
+
+/* For privcmd. Locally declare argument type to avoid include storm.
+ Type coherency will be checked within privcmd.c */
+struct privcmd_hypercall;
+extern int privcmd_hypercall(struct privcmd_hypercall *hypercall);
+
++extern int xen_foreign_p2m_expose(struct privcmd_hypercall *hypercall);
++
++extern int xencomm_hypercall_kexec_op(int cmd, void *arg);
++
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,60 @@
+diff -rpuN linux-2.6.18.8/include/asm-ia64/xen/xencomm.h linux-2.6.18-xen-3.2.0/include/asm-ia64/xen/xencomm.h
+--- linux-2.6.18.8/include/asm-ia64/xen/xencomm.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/xen/xencomm.h 2008-02-15 16:22:11.000000000 -0800
+@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2006 Hollis Blanchard <hollisb@us.ibm.com>, IBM Corporation
+ *
@@ -88672,51 +118382,24 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xen/xencomm.h tmp-linux-2.6-xe
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
-+#ifndef _LINUX_XENCOMM_H_
-+#define _LINUX_XENCOMM_H_
-+
-+#include <xen/interface/xencomm.h>
++#ifndef _ASM_IA64_XENCOMM_H_
++#define _ASM_IA64_XENCOMM_H_
+
-+#define XENCOMM_MINI_ADDRS 3
-+struct xencomm_mini {
-+ struct xencomm_desc _desc;
-+ uint64_t address[XENCOMM_MINI_ADDRS];
-+};
++#define is_kernel_addr(x) \
++ ((PAGE_OFFSET <= (x) && \
++ (x) < (PAGE_OFFSET + (1UL << IA64_MAX_PHYS_BITS))) || \
++ (KERNEL_START <= (x) && \
++ (x) < KERNEL_START + KERNEL_TR_PAGE_SIZE))
+
+/* Must be called before any hypercall. */
-+extern void xencomm_init (void);
-+
-+/* To avoid additionnal virt to phys conversion, an opaque structure is
-+ presented. */
-+struct xencomm_handle;
-+
-+extern int xencomm_create(void *buffer, unsigned long bytes,
-+ struct xencomm_handle **desc, gfp_t type);
-+extern void xencomm_free(struct xencomm_handle *desc);
-+
-+extern int xencomm_create_mini(struct xencomm_mini *area, int *nbr_area,
-+ void *buffer, unsigned long bytes,
-+ struct xencomm_handle **ret);
-+
-+/* Translate virtual address to physical address. */
-+extern unsigned long xencomm_vaddr_to_paddr(unsigned long vaddr);
-+
-+/* Inline version. To be used only on linear space (kernel space). */
-+static inline struct xencomm_handle *
-+xencomm_create_inline(void *buffer)
-+{
-+ unsigned long paddr;
++extern void xencomm_initialize (void);
+
-+ paddr = xencomm_vaddr_to_paddr((unsigned long)buffer);
-+ return (struct xencomm_handle *)(paddr | XENCOMM_INLINE_FLAG);
-+}
-+
-+#define xen_guest_handle(hnd) ((hnd).p)
++#include <xen/xencomm.h>
+
-+#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-11-14 15:35:27.000000000 -0800
++#endif /* _ASM_IA64_XENCOMM_H_ */
+diff -rpuN linux-2.6.18.8/include/asm-ia64/xenoprof.h linux-2.6.18-xen-3.2.0/include/asm-ia64/xenoprof.h
+--- linux-2.6.18.8/include/asm-ia64/xenoprof.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-ia64/xenoprof.h 2008-02-15 16:22:11.000000000 -0800
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * asm-ia64/xenoprof.h
@@ -88756,31 +118439,604 @@ diff -Nurp pristine-linux-2.6.18/include/asm-ia64/xenoprof.h tmp-linux-2.6-xen.p
+};
+
+struct xenoprof_shared_buffer;
-+void xenoprof_arch_unmap_shared_buffer(struct xenoprof_shared_buffer* sbuf);
++void xenoprof_arch_unmap_shared_buffer(struct xenoprof_shared_buffer *sbuf);
+struct xenoprof_get_buffer;
-+int xenoprof_arch_map_shared_buffer(struct xenoprof_get_buffer* get_buffer,
-+ struct xenoprof_shared_buffer* sbuf);
++int xenoprof_arch_map_shared_buffer(struct xenoprof_get_buffer *get_buffer,
++ struct xenoprof_shared_buffer *sbuf);
+struct xenoprof_passive;
-+int xenoprof_arch_set_passive(struct xenoprof_passive* pdomain,
-+ struct xenoprof_shared_buffer* sbuf);
++int xenoprof_arch_set_passive(struct xenoprof_passive *pdomain,
++ struct xenoprof_shared_buffer *sbuf);
+
+#endif /* CONFIG_XEN */
+#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-11-14 15:35:27.000000000 -0800
-@@ -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
-
--extern void arch_free_page(struct page *page, int order);
-+extern int arch_free_page(struct page *page, int order);
- #define HAVE_ARCH_FREE_PAGE
-
- #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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-powerpc/mpic.h linux-2.6.18-xen-3.2.0/include/asm-powerpc/mpic.h
+--- linux-2.6.18.8/include/asm-powerpc/mpic.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-powerpc/mpic.h 2008-02-15 16:22:13.000000000 -0800
+@@ -305,6 +305,8 @@ struct mpic
+ #define MPIC_SPV_EOI 0x00000020
+ /* No passthrough disable */
+ #define MPIC_NO_PTHROU_DIS 0x00000040
++/* Skip reset of IPI vectors during init */
++#define MPIC_SKIP_IPI_INIT 0x00000080
+
+ /* MPIC HW modification ID */
+ #define MPIC_REGSET_MASK 0xf0000000
+diff -rpuN linux-2.6.18.8/include/asm-powerpc/udbg.h linux-2.6.18-xen-3.2.0/include/asm-powerpc/udbg.h
+--- linux-2.6.18.8/include/asm-powerpc/udbg.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-powerpc/udbg.h 2008-02-15 16:22:13.000000000 -0800
+@@ -42,6 +42,7 @@ extern void __init udbg_init_debug_lpar(
+ extern void __init udbg_init_pmac_realmode(void);
+ extern void __init udbg_init_maple_realmode(void);
+ extern void __init udbg_init_iseries(void);
++extern void __init udbg_init_xen(void);
+ extern void __init udbg_init_rtas_panel(void);
+ extern void __init udbg_init_rtas_console(void);
+
+diff -rpuN linux-2.6.18.8/include/asm-powerpc/xen/asm/gnttab_dma.h linux-2.6.18-xen-3.2.0/include/asm-powerpc/xen/asm/gnttab_dma.h
+--- linux-2.6.18.8/include/asm-powerpc/xen/asm/gnttab_dma.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-powerpc/xen/asm/gnttab_dma.h 2008-02-15 16:22:13.000000000 -0800
+@@ -0,0 +1,29 @@
++/*
++ * 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
++ *
++ * Copyright 2007 IBM Corp.
++ *
++ * Authors: Hollis Blanchard <hollisb@us.ibm.com>
++ */
++
++#ifndef _ASM_PPC_GNTTAB_DMA_H
++#define _ASM_PPC_GNTTAB_DMA_H
++
++static inline int gnttab_dma_local_pfn(struct page *page)
++{
++ return 0;
++}
++
++#endif /* _ASM_PPC_GNTTAB_DMA_H */
+diff -rpuN linux-2.6.18.8/include/asm-powerpc/xen/asm/hypercall.h linux-2.6.18-xen-3.2.0/include/asm-powerpc/xen/asm/hypercall.h
+--- linux-2.6.18.8/include/asm-powerpc/xen/asm/hypercall.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-powerpc/xen/asm/hypercall.h 2008-02-15 16:22:13.000000000 -0800
+@@ -0,0 +1,90 @@
++/******************************************************************************
++ * hypercall.h
++ *
++ * Linux-specific hypervisor handling.
++ *
++ * Copyright (c) 2002-2004, K A Fraser
++ *
++ * This file may be distributed separately from the Linux kernel, or
++ * incorporated into other software packages, subject to the following license:
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this source file (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use, copy, modify,
++ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
++ *
++ * Copyright 2007 IBM Corp.
++ *
++ * Authors: Hollis Blanchard <hollisb@us.ibm.com>
++ * Jimi Xenidis <jimix@watson.ibm.com>
++ */
++
++#ifndef __HYPERCALL_H__
++#define __HYPERCALL_H__
++
++#include <asm/hvcall.h>
++#include <asm/page.h>
++#include <xen/xencomm.h>
++#include <xen/interface/xen.h>
++#include <xen/interface/sched.h>
++
++#define XEN_MARK(a)((a) | (~0UL << 16))
++
++extern int HYPERVISOR_console_io(int cmd, int count, char *str);
++extern int HYPERVISOR_event_channel_op(int cmd, void *op);
++extern int HYPERVISOR_xen_version(int cmd, void *arg);
++extern int HYPERVISOR_physdev_op(int cmd, void *op);
++extern int HYPERVISOR_grant_table_op(unsigned int cmd, void *uop,
++ unsigned int count);
++extern int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args);
++extern int HYPERVISOR_memory_op(unsigned int cmd, void *arg);
++extern int HYPERVISOR_multicall(void *call_list, int nr_calls);
++
++extern int HYPERVISOR_sched_op(int cmd, void *arg);
++extern int HYPERVISOR_poll(
++ evtchn_port_t *ports, unsigned int nr_ports, u64 timeout);
++
++static inline int HYPERVISOR_shutdown(unsigned int reason)
++{
++ struct sched_shutdown sched_shutdown = {
++ .reason = reason
++ };
++
++ return HYPERVISOR_sched_op(SCHEDOP_shutdown, &sched_shutdown);
++}
++
++static inline int HYPERVISOR_set_timer_op(unsigned long arg)
++{
++ return plpar_hcall_norets(XEN_MARK(__HYPERVISOR_set_timer_op), arg);
++}
++
++extern int HYPERVISOR_suspend(unsigned long srec);
++extern int HYPERVISOR_kexec_op(unsigned long op, void *args);
++static inline unsigned long HYPERVISOR_hvm_op(int op, void *arg) {
++ return -ENOSYS;
++}
++
++static inline int
++HYPERVISOR_mmu_update(
++ mmu_update_t *req, int count, int *success_count, domid_t domid)
++{
++ return -ENOSYS;
++}
++
++struct privcmd_hypercall;
++extern int privcmd_hypercall(struct privcmd_hypercall *hypercall);
++
++#endif /* __HYPERCALL_H__ */
+diff -rpuN linux-2.6.18.8/include/asm-powerpc/xen/asm/hypervisor.h linux-2.6.18-xen-3.2.0/include/asm-powerpc/xen/asm/hypervisor.h
+--- linux-2.6.18.8/include/asm-powerpc/xen/asm/hypervisor.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-powerpc/xen/asm/hypervisor.h 2008-02-15 16:22:13.000000000 -0800
+@@ -0,0 +1,276 @@
++/******************************************************************************
++ * hypervisor.h
++ *
++ * Linux-specific hypervisor handling.
++ *
++ * Copyright (c) 2002-2004, K A Fraser
++ *
++ * This file may be distributed separately from the Linux kernel, or
++ * incorporated into other software packages, subject to the following license:
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this source file (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use, copy, modify,
++ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
++ */
++
++#ifndef __HYPERVISOR_H__
++#define __HYPERVISOR_H__
++
++#include <linux/config.h>
++#include <linux/types.h>
++#include <linux/kernel.h>
++#include <linux/version.h>
++#include <xen/interface/xen.h>
++#include <asm/ptrace.h>
++#include <asm/page.h>
++#include <asm/irq.h>
++
++extern shared_info_t *HYPERVISOR_shared_info;
++
++/* arch/xen/i386/kernel/setup.c */
++extern start_info_t *xen_start_info;
++
++#ifdef CONFIG_XEN_PRIVILEGED_GUEST
++#define is_initial_xendomain() (xen_start_info && \
++ (xen_start_info->flags & SIF_INITDOMAIN))
++#else
++#define is_initial_xendomain() 0
++#endif
++
++/* arch/xen/kernel/evtchn.c */
++/* Force a proper event-channel callback from Xen. */
++void force_evtchn_callback(void);
++
++/* arch/xen/kernel/process.c */
++void xen_cpu_idle (void);
++
++/* arch/xen/i386/kernel/hypervisor.c */
++void do_hypervisor_callback(struct pt_regs *regs);
++
++/* arch/xen/i386/kernel/head.S */
++void lgdt_finish(void);
++
++/* arch/xen/i386/mm/hypervisor.c */
++/*
++ * NB. ptr values should be PHYSICAL, not MACHINE. 'vals' should be already
++ * be MACHINE addresses.
++ */
++
++void xen_pt_switch(unsigned long ptr);
++void xen_new_user_pt(unsigned long ptr); /* x86_64 only */
++void xen_load_gs(unsigned int selector); /* x86_64 only */
++void xen_tlb_flush(void);
++void xen_invlpg(unsigned long ptr);
++
++#ifndef CONFIG_XEN_SHADOW_MODE
++void xen_l1_entry_update(pte_t *ptr, pte_t val);
++void xen_l2_entry_update(pmd_t *ptr, pmd_t val);
++void xen_l3_entry_update(pud_t *ptr, pud_t val); /* x86_64/PAE */
++void xen_l4_entry_update(pgd_t *ptr, pgd_t val); /* x86_64 only */
++void xen_pgd_pin(unsigned long ptr);
++void xen_pgd_unpin(unsigned long ptr);
++void xen_pud_pin(unsigned long ptr); /* x86_64 only */
++void xen_pud_unpin(unsigned long ptr); /* x86_64 only */
++void xen_pmd_pin(unsigned long ptr); /* x86_64 only */
++void xen_pmd_unpin(unsigned long ptr); /* x86_64 only */
++void xen_pte_pin(unsigned long ptr);
++void xen_pte_unpin(unsigned long ptr);
++#else
++#define xen_l1_entry_update(_p, _v) set_pte((_p), (_v))
++#define xen_l2_entry_update(_p, _v) set_pgd((_p), (_v))
++#define xen_pgd_pin(_p) ((void)0)
++#define xen_pgd_unpin(_p) ((void)0)
++#define xen_pte_pin(_p) ((void)0)
++#define xen_pte_unpin(_p) ((void)0)
++#endif
++
++void xen_set_ldt(unsigned long ptr, unsigned long bytes);
++void xen_machphys_update(unsigned long mfn, unsigned long pfn);
++
++#ifdef CONFIG_SMP
++#include <linux/cpumask.h>
++void xen_tlb_flush_all(void);
++void xen_invlpg_all(unsigned long ptr);
++void xen_tlb_flush_mask(cpumask_t *mask);
++void xen_invlpg_mask(cpumask_t *mask, unsigned long ptr);
++#endif
++
++/* Returns zero on success else negative errno. */
++static inline int xen_create_contiguous_region(
++ unsigned long vstart, unsigned int order, unsigned int address_bits)
++{
++ return 0;
++}
++static inline void xen_destroy_contiguous_region(
++ unsigned long vstart, unsigned int order)
++{
++ return;
++}
++
++#include <asm/hypercall.h>
++
++/* BEGIN: all of these need a new home */
++struct vm_area_struct;
++int direct_remap_pfn_range(struct vm_area_struct *vma, unsigned long address,
++ unsigned long mfn, unsigned long size,
++ pgprot_t prot, domid_t domid);
++#define pfn_to_mfn(x) (x)
++#define mfn_to_pfn(x) (x)
++#define phys_to_machine(phys) ((maddr_t)(phys))
++#define phys_to_machine_mapping_valid(pfn) (1)
++
++/* VIRT <-> MACHINE conversion */
++#define virt_to_machine(v) (phys_to_machine(__pa(v)))
++#define machine_to_virt(m) (__va(m))
++#define virt_to_mfn(v) (pfn_to_mfn(__pa(v) >> PAGE_SHIFT))
++#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT))
++
++
++#define PIRQ_BASE 0
++#define NR_PIRQS 256
++
++#define DYNIRQ_BASE (PIRQ_BASE + NR_PIRQS)
++#define NR_DYNIRQS 256
++
++#define NR_IPIS 4 /* PPC_MSG_DEBUGGER_BREAK + 1 */
++
++#if NR_IRQS < (NR_PIRQS + NR_DYNIRQS)
++#error to many Xen IRQs
++#endif
++
++#define NR_IRQ_VECTORS NR_IRQS
++
++#define pirq_to_irq(_x) ((_x) + PIRQ_BASE)
++#define irq_to_pirq(_x) ((_x) - PIRQ_BASE)
++
++#define dynirq_to_irq(_x) ((_x) + DYNIRQ_BASE)
++#define irq_to_dynirq(_x) ((_x) - DYNIRQ_BASE)
++
++
++/* END: all of these need a new home */
++
++#if defined(CONFIG_X86_64)
++#define MULTI_UVMFLAGS_INDEX 2
++#define MULTI_UVMDOMID_INDEX 3
++#else
++#define MULTI_UVMFLAGS_INDEX 3
++#define MULTI_UVMDOMID_INDEX 4
++#endif
++
++extern int is_running_on_xen(void);
++
++static inline void
++MULTI_update_va_mapping(
++ multicall_entry_t *mcl, unsigned long va,
++ pte_t new_val, unsigned long flags)
++{
++ mcl->op = __HYPERVISOR_update_va_mapping;
++ mcl->args[0] = va;
++#if defined(CONFIG_X86_64)
++ mcl->args[1] = new_val.pte;
++ mcl->args[2] = flags;
++#elif defined(CONFIG_X86_PAE)
++ mcl->args[1] = new_val.pte_low;
++ mcl->args[2] = new_val.pte_high;
++ mcl->args[3] = flags;
++#elif defined(CONFIG_PPC64)
++ mcl->args[1] = pte_val(new_val);
++ mcl->args[2] = 0;
++ mcl->args[3] = flags;
++#else
++ mcl->args[1] = new_val.pte_low;
++ mcl->args[2] = 0;
++ mcl->args[3] = flags;
++#endif
++}
++
++static inline void
++MULTI_update_va_mapping_otherdomain(
++ multicall_entry_t *mcl, unsigned long va,
++ pte_t new_val, unsigned long flags, domid_t domid)
++{
++ mcl->op = __HYPERVISOR_update_va_mapping_otherdomain;
++ mcl->args[0] = va;
++#if defined(CONFIG_X86_64)
++ mcl->args[1] = new_val.pte;
++ mcl->args[2] = flags;
++ mcl->args[3] = domid;
++#elif defined(CONFIG_X86_PAE)
++ mcl->args[1] = new_val.pte_low;
++ mcl->args[2] = new_val.pte_high;
++ mcl->args[3] = flags;
++ mcl->args[4] = domid;
++#elif defined(CONFIG_PPC64)
++ mcl->args[1] = pte_val(new_val);
++ mcl->args[2] = 0;
++ mcl->args[3] = flags;
++ mcl->args[4] = domid;
++#else
++ mcl->args[1] = new_val.pte_low;
++ mcl->args[2] = 0;
++ mcl->args[3] = flags;
++ mcl->args[4] = domid;
++#endif
++}
++
++#define INVALID_P2M_ENTRY (~0UL)
++#define FOREIGN_FRAME(m) (INVALID_P2M_ENTRY)
++static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
++{
++ if (pfn != mfn && mfn != INVALID_P2M_ENTRY)
++ printk(KERN_EMERG "%s: pfn: 0x%lx mfn: 0x%lx\n",
++ __func__, pfn, mfn);
++
++ return;
++}
++#define pfn_pte_ma(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
++
++typedef unsigned long maddr_t;
++typedef unsigned long paddr_t;
++
++#ifdef CONFIG_XEN_SCRUB_PAGES
++
++static inline void scrub_pages(void *p, unsigned n)
++{
++ unsigned i;
++
++ for (i = 0; i < n; i++) {
++ clear_page(p);
++ p += PAGE_SIZE;
++ }
++}
++#else
++#define scrub_pages(_p,_n) ((void)0)
++#endif
++
++/*
++ * for blktap.c
++ * int create_lookup_pte_addr(struct mm_struct *mm,
++ * unsigned long address,
++ * uint64_t *ptep);
++ */
++#define create_lookup_pte_addr(mm, address, ptep) \
++ ({ \
++ printk(KERN_EMERG \
++ "%s:%d " \
++ "create_lookup_pte_addr() isn't supported.\n", \
++ __func__, __LINE__); \
++ BUG(); \
++ (-ENOSYS); \
++ })
++
++#endif /* __HYPERVISOR_H__ */
+diff -rpuN linux-2.6.18.8/include/asm-powerpc/xen/asm/maddr.h linux-2.6.18-xen-3.2.0/include/asm-powerpc/xen/asm/maddr.h
+--- linux-2.6.18.8/include/asm-powerpc/xen/asm/maddr.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-powerpc/xen/asm/maddr.h 2008-02-15 16:22:13.000000000 -0800
+@@ -0,0 +1,7 @@
++#ifndef _POWERPC_MADDR_H
++#define _POWERPC_MADDR_H
++
++#include <xen/features.h>
++#include <xen/interface/xen.h>
++
++#endif
+diff -rpuN linux-2.6.18.8/include/asm-powerpc/xen/asm/synch_bitops.h linux-2.6.18-xen-3.2.0/include/asm-powerpc/xen/asm/synch_bitops.h
+--- linux-2.6.18.8/include/asm-powerpc/xen/asm/synch_bitops.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-powerpc/xen/asm/synch_bitops.h 2008-02-15 16:22:13.000000000 -0800
+@@ -0,0 +1,100 @@
++/*
++ * 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
++ *
++ * Copyright 2006 IBM Corp.
++ *
++ * Authors: Jimi Xenidis <jimix@watson.ibm.com>
++ */
++
++#ifndef __SYNCH_BITOPS_H__
++#define __SYNCH_BITOPS_H__
++
++#include <linux/config.h>
++#include <xen/interface/xen.h>
++
++#ifdef CONFIG_SMP
++#include <asm/bitops.h>
++
++#define synch_change_bit(a,b) change_bit(a,b)
++#define synch_clear_bit(a,b) clear_bit(a,b)
++#define synch_const_test_bit(a,b) const_test_bit(a,b)
++#define synch_set_bit(a,b) set_bit(a,b)
++#define synch_test_and_set_bit(a,b) test_and_set_bit(a,b)
++#define synch_test_and_change_bit(a,b) test_and_change_bit(a,b)
++#define synch_test_and_clear_bit(a,b) test_and_clear_bit(a,b)
++#define synch_test_bit(a,b) test_bit(a,b)
++
++static __inline__ unsigned long
++__synch_cmpxchg_u16(volatile unsigned short *p, unsigned long old, unsigned long new)
++{
++ int idx;
++ volatile unsigned int *xp = (unsigned int *)((ulong)p & ~(0x3UL));
++ union {
++ unsigned int word;
++ struct {
++ unsigned short s[2];
++ }s;
++ } xold, xnew;
++
++ /* we could start the reservation here and copy the u32
++ * assembler, but I don't think it will gain us a whole
++ * lot. */
++ xold.word = *xp;
++ xnew.word = xold.word;
++ idx = ((ulong)p >> 1) & 0x1;
++ xold.s.s[idx] = old;
++ xnew.s.s[idx] = new;
++
++ return __cmpxchg_u32(xp, xold.word, xnew.word);
++}
++
++/*
++ * This function doesn't exist, so you'll get a linker error
++ * if something tries to do an invalid xchg().
++ */
++extern void __synch_cmpxchg_called_with_bad_pointer(void);
++static __inline__ unsigned long
++__synch_cmpxchg(volatile void *ptr, unsigned long old, unsigned long new,
++ unsigned int size)
++{
++ switch (size) {
++ case 2:
++ return __synch_cmpxchg_u16(ptr, old, new);
++ case 4:
++ return __cmpxchg_u32(ptr, old, new);
++#ifdef CONFIG_PPC64
++ case 8:
++ return __cmpxchg_u64(ptr, old, new);
++#endif
++ }
++ __synch_cmpxchg_called_with_bad_pointer();
++ return old;
++}
++
++#define synch_cmpxchg(ptr,o,n) \
++ ({ \
++ __typeof__(*(ptr)) _o_ = (o); \
++ __typeof__(*(ptr)) _n_ = (n); \
++ (__typeof__(*(ptr))) __synch_cmpxchg((ptr), (unsigned long)_o_, \
++ (unsigned long)_n_, sizeof(*(ptr))); \
++ })
++
++#define synch_cmpxchg_subword(ptr,o,n) __synch_cmpxchg_u16((ptr), (o), (n))
++
++#else
++#error "this only works for CONFIG_SMP"
++#endif
++
++#endif /* __SYNCH_BITOPS_H__ */
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/acpi.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/acpi.h
+--- linux-2.6.18.8/include/asm-x86_64/acpi.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/acpi.h 2008-02-15 16:22:14.000000000 -0800
+@@ -153,6 +153,10 @@ extern unsigned long acpi_wakeup_address
+ /* early initialization routine */
+ extern void acpi_reserve_bootmem(void);
+
++#ifdef CONFIG_ACPI_PV_SLEEP
++extern int acpi_notify_hypervisor_state(u8 sleep_state,
++ u32 pm1a_cnt, u32 pm1b_cnt);
++#endif /* CONFIG_ACPI_PV_SLEEP */
+ #endif /*CONFIG_ACPI_SLEEP*/
+
+ #define boot_cpu_physical_apicid boot_cpu_id
+@@ -162,7 +166,9 @@ extern int acpi_pci_disabled;
+
+ extern u8 x86_acpiid_to_apicid[];
+
++#ifndef CONFIG_XEN
+ #define ARCH_HAS_POWER_INIT 1
++#endif
+
+ extern int acpi_skip_timer_override;
+
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/agp.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/agp.h
+--- linux-2.6.18.8/include/asm-x86_64/agp.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/agp.h 2008-02-15 16:22:14.000000000 -0800
+@@ -10,8 +10,10 @@
+ * with different cachability attributes for the same page.
+ */
+
+-int map_page_into_agp(struct page *page);
+-int unmap_page_from_agp(struct page *page);
++/* Caller's responsibility to call global_flush_tlb() for
++ * performance reasons */
++#define map_page_into_agp(page) change_page_attr(page, 1, PAGE_KERNEL_NOCACHE)
++#define unmap_page_from_agp(page) change_page_attr(page, 1, PAGE_KERNEL)
+ #define flush_agp_mappings() global_flush_tlb()
+
+ /* Could use CLFLUSH here if the cpu supports it. But then it would
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/apic.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/apic.h
+--- linux-2.6.18.8/include/asm-x86_64/apic.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/apic.h 2008-02-15 16:22:14.000000000 -0800
@@ -98,11 +98,13 @@ extern void setup_APIC_extened_lvt(unsig
extern int disable_timer_pin_1;
@@ -88795,9 +119051,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/apic.h tmp-linux-2.6-xen.pat
#endif /* CONFIG_X86_LOCAL_APIC */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/kexec.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/kexec.h
+--- linux-2.6.18.8/include/asm-x86_64/kexec.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/kexec.h 2008-02-15 16:22:14.000000000 -0800
@@ -1,6 +1,27 @@
#ifndef _X86_64_KEXEC_H
#define _X86_64_KEXEC_H
@@ -88852,10 +119108,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/kexec.h tmp-linux-2.6-xen.pa
+#endif /* __ASSEMBLY__ */
+
#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,35 @@
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/agp.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/agp.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/agp.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/agp.h 2008-02-15 16:22:14.000000000 -0800
+@@ -0,0 +1,40 @@
+#ifndef AGP_H
+#define AGP_H 1
+
@@ -88869,8 +119125,13 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/agp.h tmp-linux
+ * with different cachability attributes for the same page.
+ */
+
-+int map_page_into_agp(struct page *page);
-+int unmap_page_from_agp(struct page *page);
++#define map_page_into_agp(page) ( \
++ xen_create_contiguous_region((unsigned long)page_address(page), 0, 32) \
++ ?: change_page_attr(page, 1, PAGE_KERNEL_NOCACHE))
++#define unmap_page_from_agp(page) ( \
++ xen_destroy_contiguous_region((unsigned long)page_address(page), 0), \
++ /* only a fallback: xen_destroy_contiguous_region uses PAGE_KERNEL */ \
++ change_page_attr(page, 1, PAGE_KERNEL))
+#define flush_agp_mappings() global_flush_tlb()
+
+/* Could use CLFLUSH here if the cpu supports it. But then it would
@@ -88891,9 +119152,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/agp.h tmp-linux
+ dma_free_coherent(NULL,PAGE_SIZE<<(order),(table),virt_to_bus(table))
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/arch_hooks.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/arch_hooks.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/arch_hooks.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/arch_hooks.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,27 @@
+#ifndef _ASM_ARCH_HOOKS_H
+#define _ASM_ARCH_HOOKS_H
@@ -88922,9 +119183,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/arch_hooks.h tm
+extern void mca_nmi_hook(void);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/bootsetup.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/bootsetup.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/bootsetup.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/bootsetup.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,42 @@
+
+#ifndef _X86_64_BOOTSETUP_H
@@ -88968,10 +119229,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/bootsetup.h tmp
+#define RAMDISK_LOAD_FLAG 0x4000
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,263 @@
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/desc.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/desc.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/desc.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/desc.h 2008-02-15 16:22:14.000000000 -0800
+@@ -0,0 +1,265 @@
+/* Written 2000 by Andi Kleen */
+#ifndef __ARCH_DESC_H
+#define __ARCH_DESC_H
@@ -89055,7 +119316,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/desc.h tmp-linu
+ * it slows down context switching. Noone uses it anyway.
+ */
+ cpu = cpu; /* XXX avoid compiler warning */
-+ xen_set_ldt(0UL, 0);
++ xen_set_ldt(NULL, 0);
+ put_cpu();
+}
+
@@ -89203,7 +119464,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/desc.h tmp-linu
+ gdt[2] = t->tls_array[2];
+#endif
+#define C(i) \
-+ HYPERVISOR_update_descriptor(virt_to_machine(&cpu_gdt(cpu)[GDT_ENTRY_TLS_MIN + i]), t->tls_array[i])
++ if (HYPERVISOR_update_descriptor(virt_to_machine(&cpu_gdt(cpu)[GDT_ENTRY_TLS_MIN + i]), \
++ t->tls_array[i])) \
++ BUG();
+
+ C(0); C(1); C(2);
+#undef C
@@ -89220,7 +119483,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/desc.h tmp-linu
+ if (likely(!count))
+ segments = NULL;
+
-+ xen_set_ldt((unsigned long)segments, count);
++ xen_set_ldt(segments, count);
+}
+
+static inline void load_LDT(mm_context_t *pc)
@@ -89235,9 +119498,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/desc.h tmp-linu
+#endif /* !__ASSEMBLY__ */
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/dma-mapping.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/dma-mapping.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/dma-mapping.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/dma-mapping.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,207 @@
+#ifndef _X8664_DMA_MAPPING_H
+#define _X8664_DMA_MAPPING_H 1
@@ -89446,9 +119709,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/dma-mapping.h t
+#endif /* _X8664_DMA_MAPPING_H */
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/e820.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/e820.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/e820.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/e820.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,66 @@
+/*
+ * structures and definitions for the int 15, ax=e820 memory map
@@ -89516,9 +119779,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/e820.h tmp-linu
+#endif/*!__ASSEMBLY__*/
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/fixmap.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/fixmap.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/fixmap.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/fixmap.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,112 @@
+/*
+ * fixmap.h: compile-time virtual memory allocation
@@ -89632,219 +119895,14 @@ 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,206 @@
-+/*
-+ * Architecture specific parts of the Floppy driver
-+ *
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License. See the file "COPYING" in the main directory of this archive
-+ * for more details.
-+ *
-+ * Copyright (C) 1995
-+ *
-+ * Modifications for Xen are Copyright (c) 2004, Keir Fraser.
-+ */
-+#ifndef __ASM_XEN_X86_64_FLOPPY_H
-+#define __ASM_XEN_X86_64_FLOPPY_H
-+
-+#include <linux/vmalloc.h>
-+
-+/*
-+ * The DMA channel used by the floppy controller cannot access data at
-+ * addresses >= 16MB
-+ *
-+ * Went back to the 1MB limit, as some people had problems with the floppy
-+ * driver otherwise. It doesn't matter much for performance anyway, as most
-+ * floppy accesses go through the track buffer.
-+ */
-+#define _CROSS_64KB(a,s,vdma) \
-+(!(vdma) && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
-+
-+/* XEN: Hit DMA paths on the head. This trick from asm-m68k/floppy.h. */
-+#include <asm/dma.h>
-+#undef MAX_DMA_ADDRESS
-+#define MAX_DMA_ADDRESS 0
-+#define CROSS_64KB(a,s) (0)
-+
-+#define fd_inb(port) inb_p(port)
-+#define fd_outb(value,port) outb_p(value,port)
-+
-+#define fd_request_dma() (0)
-+#define fd_free_dma() ((void)0)
-+#define fd_enable_irq() enable_irq(FLOPPY_IRQ)
-+#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
-+#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL)
-+#define fd_get_dma_residue() vdma_get_dma_residue(FLOPPY_DMA)
-+/*
-+ * Do not use vmalloc/vfree: floppy_release_irq_and_dma() gets called from
-+ * softirq context via motor_off_callback. A generic bug we happen to trigger.
-+ */
-+#define fd_dma_mem_alloc(size) __get_free_pages(GFP_KERNEL|__GFP_NORETRY, get_order(size))
-+#define fd_dma_mem_free(addr, size) free_pages(addr, get_order(size))
-+#define fd_dma_setup(addr, size, mode, io) vdma_dma_setup(addr, size, mode, io)
-+
-+static int virtual_dma_count;
-+static int virtual_dma_residue;
-+static char *virtual_dma_addr;
-+static int virtual_dma_mode;
-+static int doing_pdma;
-+
-+static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
-+{
-+ register unsigned char st;
-+
-+#undef TRACE_FLPY_INT
-+
-+#ifdef TRACE_FLPY_INT
-+ static int calls=0;
-+ static int bytes=0;
-+ static int dma_wait=0;
-+#endif
-+ if (!doing_pdma)
-+ return floppy_interrupt(irq, dev_id, regs);
-+
-+#ifdef TRACE_FLPY_INT
-+ if(!calls)
-+ bytes = virtual_dma_count;
-+#endif
-+
-+ {
-+ register int lcount;
-+ register char *lptr;
-+
-+ st = 1;
-+ for(lcount=virtual_dma_count, lptr=virtual_dma_addr;
-+ lcount; lcount--, lptr++) {
-+ st=inb(virtual_dma_port+4) & 0xa0 ;
-+ if(st != 0xa0)
-+ break;
-+ if(virtual_dma_mode)
-+ outb_p(*lptr, virtual_dma_port+5);
-+ else
-+ *lptr = inb_p(virtual_dma_port+5);
-+ }
-+ virtual_dma_count = lcount;
-+ virtual_dma_addr = lptr;
-+ st = inb(virtual_dma_port+4);
-+ }
-+
-+#ifdef TRACE_FLPY_INT
-+ calls++;
-+#endif
-+ if(st == 0x20)
-+ return IRQ_HANDLED;
-+ if(!(st & 0x20)) {
-+ virtual_dma_residue += virtual_dma_count;
-+ virtual_dma_count=0;
-+#ifdef TRACE_FLPY_INT
-+ printk("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n",
-+ virtual_dma_count, virtual_dma_residue, calls, bytes,
-+ dma_wait);
-+ calls = 0;
-+ dma_wait=0;
-+#endif
-+ doing_pdma = 0;
-+ floppy_interrupt(irq, dev_id, regs);
-+ return IRQ_HANDLED;
-+ }
-+#ifdef TRACE_FLPY_INT
-+ if(!virtual_dma_count)
-+ dma_wait++;
-+#endif
-+ return IRQ_HANDLED;
-+}
-+
-+static void fd_disable_dma(void)
-+{
-+ doing_pdma = 0;
-+ virtual_dma_residue += virtual_dma_count;
-+ virtual_dma_count=0;
-+}
-+
-+static int vdma_get_dma_residue(unsigned int dummy)
-+{
-+ return virtual_dma_count + virtual_dma_residue;
-+}
-+
-+
-+static int fd_request_irq(void)
-+{
-+ return request_irq(FLOPPY_IRQ, floppy_hardint,
-+ IRQF_DISABLED, "floppy", NULL);
-+}
-+
-+#if 0
-+static unsigned long vdma_mem_alloc(unsigned long size)
-+{
-+ return (unsigned long) vmalloc(size);
-+
-+}
-+
-+static void vdma_mem_free(unsigned long addr, unsigned long size)
-+{
-+ vfree((void *)addr);
-+}
-+#endif
-+
-+static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
-+{
-+ doing_pdma = 1;
-+ virtual_dma_port = io;
-+ virtual_dma_mode = (mode == DMA_MODE_WRITE);
-+ virtual_dma_addr = addr;
-+ virtual_dma_count = size;
-+ virtual_dma_residue = 0;
-+ return 0;
-+}
-+
-+/* XEN: This trick to force 'virtual DMA' is from include/asm-m68k/floppy.h. */
-+#define FDC1 xen_floppy_init()
-+static int FDC2 = -1;
-+
-+static int xen_floppy_init(void)
-+{
-+ use_virtual_dma = 1;
-+ can_use_virtual_dma = 1;
-+ return 0x3f0;
-+}
-+
-+/*
-+ * Floppy types are stored in the rtc's CMOS RAM and so rtc_lock
-+ * is needed to prevent corrupted CMOS RAM in case "insmod floppy"
-+ * coincides with another rtc CMOS user. Paul G.
-+ */
-+#define FLOPPY0_TYPE ({ \
-+ unsigned long flags; \
-+ unsigned char val; \
-+ spin_lock_irqsave(&rtc_lock, flags); \
-+ val = (CMOS_READ(0x10) >> 4) & 15; \
-+ spin_unlock_irqrestore(&rtc_lock, flags); \
-+ val; \
-+})
-+
-+#define FLOPPY1_TYPE ({ \
-+ unsigned long flags; \
-+ unsigned char val; \
-+ spin_lock_irqsave(&rtc_lock, flags); \
-+ val = CMOS_READ(0x10) & 15; \
-+ spin_unlock_irqrestore(&rtc_lock, flags); \
-+ val; \
-+})
-+
-+#define N_FDC 2
-+#define N_DRIVE 8
-+
-+#define FLOPPY_MOTOR_MASK 0xf0
-+
-+#define EXTRA_FLOPPY_PARAMS
-+
-+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/gnttab_dma.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/gnttab_dma.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/gnttab_dma.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/gnttab_dma.h 2008-02-15 16:22:14.000000000 -0800
+@@ -0,0 +1 @@
++#include <asm-i386/mach-xen/asm/gnttab_dma.h>
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/hw_irq.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/hw_irq.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/hw_irq.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/hw_irq.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,136 @@
+#ifndef _ASM_HW_IRQ_H
+#define _ASM_HW_IRQ_H
@@ -89945,7 +120003,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hw_irq.h tmp-li
+extern void init_VISWS_APIC_irqs(void);
+extern void setup_IO_APIC(void);
+extern void disable_IO_APIC(void);
-+extern void print_IO_APIC(void);
++#define print_IO_APIC()
+extern int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn);
+extern void send_IPI(int dest, int vector);
+extern void setup_ioapic_dest(void);
@@ -89982,10 +120040,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hw_irq.h tmp-li
+#endif
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,406 @@
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/hypercall.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/hypercall.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/hypercall.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/hypercall.h 2008-02-15 16:22:14.000000000 -0800
+@@ -0,0 +1,415 @@
+/******************************************************************************
+ * hypercall.h
+ *
@@ -90026,60 +120084,61 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hypercall.h tmp
+#define __HYPERCALL_H__
+
+#include <linux/string.h> /* memcpy() */
++#include <linux/stringify.h>
+
+#ifndef __HYPERVISOR_H__
+# error "please don't include this file directly"
+#endif
+
-+#define __STR(x) #x
-+#define STR(x) __STR(x)
-+
+#ifdef CONFIG_XEN
+#define HYPERCALL_STR(name) \
-+ "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"
++ "call hypercall_page + ("__stringify(__HYPERVISOR_##name)" * 32)"
+#else
+#define HYPERCALL_STR(name) \
-+ "mov hypercall_stubs,%%rax; " \
-+ "add $("STR(__HYPERVISOR_##name)" * 32),%%rax; " \
++ "mov $("__stringify(__HYPERVISOR_##name)" * 32),%%eax; "\
++ "add hypercall_stubs(%%rip),%%rax; " \
+ "call *%%rax"
+#endif
+
+#define _hypercall0(type, name) \
+({ \
-+ long __res; \
++ type __res; \
+ asm volatile ( \
+ HYPERCALL_STR(name) \
+ : "=a" (__res) \
+ : \
+ : "memory" ); \
-+ (type)__res; \
++ __res; \
+})
+
+#define _hypercall1(type, name, a1) \
+({ \
-+ long __res, __ign1; \
++ type __res; \
++ long __ign1; \
+ asm volatile ( \
+ HYPERCALL_STR(name) \
+ : "=a" (__res), "=D" (__ign1) \
+ : "1" ((long)(a1)) \
+ : "memory" ); \
-+ (type)__res; \
++ __res; \
+})
+
+#define _hypercall2(type, name, a1, a2) \
+({ \
-+ long __res, __ign1, __ign2; \
++ type __res; \
++ long __ign1, __ign2; \
+ asm volatile ( \
+ HYPERCALL_STR(name) \
+ : "=a" (__res), "=D" (__ign1), "=S" (__ign2) \
+ : "1" ((long)(a1)), "2" ((long)(a2)) \
+ : "memory" ); \
-+ (type)__res; \
++ __res; \
+})
+
+#define _hypercall3(type, name, a1, a2, a3) \
+({ \
-+ long __res, __ign1, __ign2, __ign3; \
++ type __res; \
++ long __ign1, __ign2, __ign3; \
+ asm volatile ( \
+ HYPERCALL_STR(name) \
+ : "=a" (__res), "=D" (__ign1), "=S" (__ign2), \
@@ -90087,74 +120146,78 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hypercall.h tmp
+ : "1" ((long)(a1)), "2" ((long)(a2)), \
+ "3" ((long)(a3)) \
+ : "memory" ); \
-+ (type)__res; \
++ __res; \
+})
+
+#define _hypercall4(type, name, a1, a2, a3, a4) \
+({ \
-+ long __res, __ign1, __ign2, __ign3; \
++ type __res; \
++ long __ign1, __ign2, __ign3; \
++ register long __arg4 asm("r10") = (long)(a4); \
+ asm volatile ( \
-+ "movq %7,%%r10; " \
+ HYPERCALL_STR(name) \
+ : "=a" (__res), "=D" (__ign1), "=S" (__ign2), \
-+ "=d" (__ign3) \
++ "=d" (__ign3), "+r" (__arg4) \
+ : "1" ((long)(a1)), "2" ((long)(a2)), \
-+ "3" ((long)(a3)), "g" ((long)(a4)) \
-+ : "memory", "r10" ); \
-+ (type)__res; \
++ "3" ((long)(a3)) \
++ : "memory" ); \
++ __res; \
+})
+
+#define _hypercall5(type, name, a1, a2, a3, a4, a5) \
+({ \
-+ long __res, __ign1, __ign2, __ign3; \
++ type __res; \
++ long __ign1, __ign2, __ign3; \
++ register long __arg4 asm("r10") = (long)(a4); \
++ register long __arg5 asm("r8") = (long)(a5); \
+ asm volatile ( \
-+ "movq %7,%%r10; movq %8,%%r8; " \
+ HYPERCALL_STR(name) \
+ : "=a" (__res), "=D" (__ign1), "=S" (__ign2), \
-+ "=d" (__ign3) \
++ "=d" (__ign3), "+r" (__arg4), "+r" (__arg5) \
+ : "1" ((long)(a1)), "2" ((long)(a2)), \
-+ "3" ((long)(a3)), "g" ((long)(a4)), \
-+ "g" ((long)(a5)) \
-+ : "memory", "r10", "r8" ); \
-+ (type)__res; \
++ "3" ((long)(a3)) \
++ : "memory" ); \
++ __res; \
+})
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_set_trap_table(
-+ trap_info_t *table)
++ const trap_info_t *table)
+{
+ return _hypercall1(int, set_trap_table, table);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_mmu_update(
-+ mmu_update_t *req, int count, int *success_count, domid_t domid)
++ mmu_update_t *req, unsigned int count, unsigned int *success_count,
++ domid_t domid)
+{
+ return _hypercall4(int, mmu_update, req, count, success_count, domid);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_mmuext_op(
-+ struct mmuext_op *op, int count, int *success_count, domid_t domid)
++ struct mmuext_op *op, unsigned int count, unsigned int *success_count,
++ domid_t domid)
+{
+ return _hypercall4(int, mmuext_op, op, count, success_count, domid);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_set_gdt(
-+ unsigned long *frame_list, int entries)
++ unsigned long *frame_list, unsigned int entries)
+{
+ return _hypercall2(int, set_gdt, frame_list, entries);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_stack_switch(
+ unsigned long ss, unsigned long esp)
+{
+ return _hypercall2(int, stack_switch, ss, esp);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_set_callbacks(
+ unsigned long event_address, unsigned long failsafe_address,
+ unsigned long syscall_address)
@@ -90170,28 +120233,28 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hypercall.h tmp
+ return _hypercall1(int, fpu_taskswitch, set);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_sched_op_compat(
+ int cmd, unsigned long arg)
+{
+ return _hypercall2(int, sched_op_compat, cmd, arg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_sched_op(
+ int cmd, void *arg)
+{
+ return _hypercall2(int, sched_op, cmd, arg);
+}
+
-+static inline long
++static inline long __must_check
+HYPERVISOR_set_timer_op(
+ u64 timeout)
+{
+ return _hypercall1(long, set_timer_op, timeout);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_platform_op(
+ struct xen_platform_op *platform_op)
+{
@@ -90199,49 +120262,49 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hypercall.h tmp
+ return _hypercall1(int, platform_op, platform_op);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_set_debugreg(
-+ int reg, unsigned long value)
++ unsigned int reg, unsigned long value)
+{
+ return _hypercall2(int, set_debugreg, reg, value);
+}
+
-+static inline unsigned long
++static inline unsigned long __must_check
+HYPERVISOR_get_debugreg(
-+ int reg)
++ unsigned int reg)
+{
+ return _hypercall1(unsigned long, get_debugreg, reg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_update_descriptor(
+ unsigned long ma, unsigned long word)
+{
+ return _hypercall2(int, update_descriptor, ma, word);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_memory_op(
+ unsigned int cmd, void *arg)
+{
+ return _hypercall2(int, memory_op, cmd, arg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_multicall(
-+ multicall_entry_t *call_list, int nr_calls)
++ multicall_entry_t *call_list, unsigned int nr_calls)
+{
+ return _hypercall2(int, multicall, call_list, nr_calls);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_update_va_mapping(
+ unsigned long va, pte_t new_val, unsigned long flags)
+{
+ return _hypercall3(int, update_va_mapping, va, new_val.pte, flags);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_event_channel_op(
+ int cmd, void *arg)
+{
@@ -90260,28 +120323,28 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hypercall.h tmp
+ return rc;
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_acm_op(
+ int cmd, void *arg)
+{
+ return _hypercall2(int, acm_op, cmd, arg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_xen_version(
+ int cmd, void *arg)
+{
+ return _hypercall2(int, xen_version, cmd, arg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_console_io(
-+ int cmd, int count, char *str)
++ int cmd, unsigned int count, char *str)
+{
+ return _hypercall3(int, console_io, cmd, count, str);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_physdev_op(
+ int cmd, void *arg)
+{
@@ -90300,14 +120363,14 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hypercall.h tmp
+ return rc;
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_grant_table_op(
+ unsigned int cmd, void *uop, unsigned int count)
+{
+ return _hypercall3(int, grant_table_op, cmd, uop, count);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_update_va_mapping_otherdomain(
+ unsigned long va, pte_t new_val, unsigned long flags, domid_t domid)
+{
@@ -90315,28 +120378,28 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hypercall.h tmp
+ new_val.pte, flags, domid);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_vm_assist(
+ unsigned int cmd, unsigned int type)
+{
+ return _hypercall2(int, vm_assist, cmd, type);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_vcpu_op(
-+ int cmd, int vcpuid, void *extra_args)
++ int cmd, unsigned int vcpuid, void *extra_args)
+{
+ return _hypercall3(int, vcpu_op, cmd, vcpuid, extra_args);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_set_segment_base(
+ int reg, unsigned long value)
+{
+ return _hypercall2(int, set_segment_base, reg, value);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_suspend(
+ unsigned long srec)
+{
@@ -90356,35 +120419,39 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/hypercall.h tmp
+ return rc;
+}
+
++#if CONFIG_XEN_COMPAT <= 0x030002
+static inline int
+HYPERVISOR_nmi_op(
+ unsigned long op, void *arg)
+{
+ return _hypercall2(int, nmi_op, op, arg);
+}
++#endif
+
-+static inline unsigned long
++#ifndef CONFIG_XEN
++static inline unsigned long __must_check
+HYPERVISOR_hvm_op(
+ int op, void *arg)
+{
+ return _hypercall2(unsigned long, hvm_op, op, arg);
+}
++#endif
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_callback_op(
-+ int cmd, void *arg)
++ int cmd, const void *arg)
+{
+ return _hypercall2(int, callback_op, cmd, arg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_xenoprof_op(
+ int op, void *arg)
+{
+ return _hypercall2(int, xenoprof_op, op, arg);
+}
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_kexec_op(
+ unsigned long op, void *args)
+{
@@ -90392,16 +120459,16 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/hypervisor.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/hypervisor.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/hypervisor.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/hypervisor.h 2008-02-15 16:22:14.000000000 -0800
@@ -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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,330 @@
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/io.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/io.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/io.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/io.h 2008-02-15 16:22:14.000000000 -0800
+@@ -0,0 +1,329 @@
+#ifndef _ASM_IO_H
+#define _ASM_IO_H
+
@@ -90571,7 +120638,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/io.h tmp-linux-
+ * ISA I/O bus memory addresses are 1:1 with the physical address.
+ */
+
-+#define isa_virt_to_bus(_x) isa_virt_to_bus_is_UNSUPPORTED->x
++#define isa_virt_to_bus(_x) ({ BUG(); virt_to_bus(_x); })
+#define isa_page_to_bus(_x) isa_page_to_bus_is_UNSUPPORTED->x
+#define isa_bus_to_virt(_x) (void *)(__fix_to_virt(FIX_ISAMAP_BEGIN) + (_x))
+
@@ -90719,8 +120786,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/io.h tmp-linux-
+ * Convert a physical pointer to a virtual kernel pointer for /dev/mem
+ * access
+ */
-+#define xlate_dev_mem_ptr(p, sz) ioremap(p, sz)
-+#define xlate_dev_mem_ptr_unmap(p) iounmap(p)
++#define xlate_dev_mem_ptr(p) __va(p)
+
+/*
+ * Convert a virtual cached pointer to an uncached pointer
@@ -90732,9 +120798,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/io.h tmp-linux-
+#define ARCH_HAS_DEV_MEM
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/irq.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/irq.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/irq.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/irq.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,38 @@
+#ifndef _ASM_IRQ_H
+#define _ASM_IRQ_H
@@ -90774,9 +120840,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/irq.h tmp-linux
+#define __ARCH_HAS_DO_SOFTIRQ 1
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/irqflags.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/irqflags.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/irqflags.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/irqflags.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,139 @@
+/*
+ * include/asm-x86_64/irqflags.h
@@ -90917,9 +120983,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/irqflags.h tmp-
+#endif
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/maddr.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/maddr.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/maddr.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/maddr.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,161 @@
+#ifndef _X86_64_MADDR_H
+#define _X86_64_MADDR_H
@@ -91082,9 +121148,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/maddr.h tmp-lin
+
+#endif /* _X86_64_MADDR_H */
+
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/mmu.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/mmu.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/mmu.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/mmu.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,38 @@
+#ifndef __x86_64_MMU_H
+#define __x86_64_MMU_H
@@ -91124,9 +121190,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/mmu.h tmp-linux
+#endif
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/mmu_context.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/mmu_context.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/mmu_context.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/mmu_context.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,136 @@
+#ifndef __X86_64_MMU_CONTEXT_H
+#define __X86_64_MMU_CONTEXT_H
@@ -91264,9 +121330,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/msr.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/msr.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/msr.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/msr.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,399 @@
+#ifndef X86_64_MSR_H
+#define X86_64_MSR_H 1
@@ -91667,9 +121733,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/msr.h tmp-linux
+#define MSR_P4_U2L_ESCR1 0x3b1
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/nmi.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/nmi.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/nmi.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/nmi.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,93 @@
+/*
+ * linux/include/asm-i386/nmi.h
@@ -91764,10 +121830,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/nmi.h tmp-linux
+#define NMI_INVALID 3
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,217 @@
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/page.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/page.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/page.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/page.h 2008-02-15 16:22:14.000000000 -0800
+@@ -0,0 +1,209 @@
+#ifndef _X86_64_PAGE_H
+#define _X86_64_PAGE_H
+
@@ -91786,14 +121852,6 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/page.h tmp-linu
+ */
+#define _PAGE_PRESENT 0x001
+
-+#define arch_free_page(_page,_order) \
-+({ int foreign = PageForeign(_page); \
-+ if (foreign) \
-+ PageForeignDestructor(_page); \
-+ foreign; \
-+})
-+#define HAVE_ARCH_FREE_PAGE
-+
+/* PAGE_SHIFT determines the page size */
+#define PAGE_SHIFT 12
+#ifdef __ASSEMBLY__
@@ -91985,9 +122043,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/page.h tmp-linu
+#endif /* __KERNEL__ */
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/pci.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/pci.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/pci.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/pci.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,168 @@
+#ifndef __x8664_PCI_H
+#define __x8664_PCI_H
@@ -92157,9 +122215,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pci.h tmp-linux
+#endif
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/pgalloc.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/pgalloc.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/pgalloc.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/pgalloc.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,204 @@
+#ifndef _X86_64_PGALLOC_H
+#define _X86_64_PGALLOC_H
@@ -92309,8 +122367,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),
-+ __pgd(__pa_symbol(level3_user_pgt) | _PAGE_TABLE));
++ __user_pgd(pgd)[pgd_index(VSYSCALL_START)] =
++ __pgd(__pa_symbol(level3_user_pgt) | _PAGE_TABLE);
+ return pgd;
+}
+
@@ -92365,10 +122423,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgalloc.h tmp-l
+#define __pud_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x))
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,574 @@
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/pgtable.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/pgtable.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/pgtable.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/pgtable.h 2008-02-15 16:22:14.000000000 -0800
+@@ -0,0 +1,579 @@
+#ifndef _X86_64_PGTABLE_H
+#define _X86_64_PGTABLE_H
+
@@ -92386,7 +122444,6 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+#include <asm/hypervisor.h>
+
+extern pud_t level3_user_pgt[512];
-+extern pud_t init_level4_user_pgt[];
+
+extern void xen_init_pt(void);
+
@@ -92765,7 +122822,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+#define pgd_page(pgd) ((unsigned long) __va(pgd_val(pgd) & PTE_MASK))
+#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_offset_k(address) (init_level4_pgt + pgd_index(address))
+#define pgd_present(pgd) (__pgd_val(pgd) & _PAGE_PRESENT)
+#define mk_kernel_pgd(address) __pgd((address) | _KERNPG_TABLE)
+
@@ -92877,7 +122934,7 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+#define __swp_type(x) (((x).val >> 1) & 0x3f)
+#define __swp_offset(x) ((x).val >> 8)
+#define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
-+#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
++#define __pte_to_swp_entry(pte) ((swp_entry_t) { __pte_val(pte) })
+#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
+
+extern spinlock_t pgd_lock;
@@ -92913,6 +122970,12 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+ unsigned long address,
+ unsigned long size);
+
++int xen_change_pte_range(struct mm_struct *mm, pmd_t *pmd,
++ unsigned long addr, unsigned long end, pgprot_t newprot);
++
++#define arch_change_pte_range(mm, pmd, addr, end, newprot) \
++ xen_change_pte_range(mm, pmd, addr, end, newprot)
++
+#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
+ direct_remap_pfn_range(vma,vaddr,pfn,size,prot,DOMID_IO)
+
@@ -92943,10 +123006,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/pgtable.h tmp-l
+#include <asm-generic/pgtable.h>
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,506 @@
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/processor.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/processor.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/processor.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/processor.h 2008-02-15 16:22:14.000000000 -0800
+@@ -0,0 +1,508 @@
+/*
+ * include/asm-x86_64/processor.h
+ *
@@ -93266,8 +123329,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/processor.h tmp
+
+#define get_debugreg(var, register) \
+ var = HYPERVISOR_get_debugreg(register)
-+#define set_debugreg(value, register) \
-+ HYPERVISOR_set_debugreg(register, value)
++#define set_debugreg(value, register) do { \
++ if (HYPERVISOR_set_debugreg(register, value)) \
++ BUG(); \
++} while (0)
+
+struct task_struct;
+struct mm_struct;
@@ -93453,9 +123518,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/processor.h tmp
+#define HAVE_ARCH_PICK_MMAP_LAYOUT 1
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/ptrace.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/ptrace.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/ptrace.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/ptrace.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,127 @@
+#ifndef _X86_64_PTRACE_H
+#define _X86_64_PTRACE_H
@@ -93584,9 +123649,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/ptrace.h tmp-li
+#endif
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/smp.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/smp.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/smp.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/smp.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,150 @@
+#ifndef __ASM_SMP_H
+#define __ASM_SMP_H
@@ -93738,16 +123803,16 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/smp.h tmp-linux
+
+#endif
+
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/synch_bitops.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/synch_bitops.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/synch_bitops.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/synch_bitops.h 2008-02-15 16:22:14.000000000 -0800
@@ -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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,262 @@
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/system.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/system.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/system.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/system.h 2008-02-15 16:22:14.000000000 -0800
+@@ -0,0 +1,256 @@
+#ifndef __ASM_SYSTEM_H
+#define __ASM_SYSTEM_H
+
@@ -93761,12 +123826,6 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/system.h tmp-li
+
+#ifdef __KERNEL__
+
-+#ifdef CONFIG_SMP
-+#define __vcpu_id smp_processor_id()
-+#else
-+#define __vcpu_id 0
-+#endif
-+
+#define __STR(x) #x
+#define STR(x) __STR(x)
+
@@ -93774,8 +123833,8 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/system.h tmp-li
+#define __RESTORE(reg,offset) "movq (14-" #offset ")*8(%%rsp),%%" #reg "\n\t"
+
+/* frame pointer must be last for get_wchan */
-+#define SAVE_CONTEXT "pushq %%rbp ; movq %%rsi,%%rbp\n\t"
-+#define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp\n\t"
++#define SAVE_CONTEXT "pushf ; pushq %%rbp ; movq %%rsi,%%rbp\n\t"
++#define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp ; popf\n\t"
+
+#define __EXTRA_CLOBBER \
+ ,"rcx","rbx","rdx","r8","r9","r10","r11","r12","r13","r14","r15"
@@ -94010,9 +124069,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/system.h tmp-li
+extern void free_init_pages(char *what, unsigned long begin, unsigned long end);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/timer.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/timer.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/timer.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/timer.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,67 @@
+#ifndef _ASMi386_TIMER_H
+#define _ASMi386_TIMER_H
@@ -94081,9 +124140,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/timer.h tmp-lin
+extern struct init_timer_opts timer_pmtmr_init;
+#endif
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/tlbflush.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/tlbflush.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/tlbflush.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/tlbflush.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,103 @@
+#ifndef _X8664_TLBFLUSH_H
+#define _X8664_TLBFLUSH_H
@@ -94156,10 +124215,10 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/tlbflush.h tmp-
+#define local_flush_tlb() \
+ __flush_tlb()
+
-+extern void flush_tlb_all(void);
-+extern void flush_tlb_current_task(void);
-+extern void flush_tlb_mm(struct mm_struct *);
-+extern void flush_tlb_page(struct vm_area_struct *, unsigned long);
++#define flush_tlb_all xen_tlb_flush_all
++#define flush_tlb_current_task() xen_tlb_flush_mask(&current->mm->cpu_vm_mask)
++#define flush_tlb_mm(mm) xen_tlb_flush_mask(&(mm)->cpu_vm_mask)
++#define flush_tlb_page(vma, va) xen_invlpg_mask(&(vma)->vm_mm->cpu_vm_mask, va)
+
+#define flush_tlb() flush_tlb_current_task()
+
@@ -94188,9 +124247,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/vga.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/vga.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/vga.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/vga.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,20 @@
+/*
+ * Access to VGA videoram
@@ -94212,14 +124271,14 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/vga.h tmp-linux
+#define vga_writeb(x,y) (*(y) = (x))
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/xenoprof.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/xenoprof.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/xenoprof.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/xenoprof.h 2008-02-15 16:22:14.000000000 -0800
@@ -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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/xor.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/xor.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/asm/xor.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/asm/xor.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,328 @@
+/*
+ * x86-64 changes / gcc fixes from Andi Kleen.
@@ -94549,9 +124608,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/asm/xor.h tmp-linux
+ We may also be able to load into the L1 only depending on how the cpu
+ deals with a load to a line that is being prefetched. */
+#define XOR_SELECT_TEMPLATE(FASTEST) (&xor_block_sse)
-diff -Nurp 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/irq_vectors.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/irq_vectors.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/irq_vectors.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/irq_vectors.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,123 @@
+/*
+ * This file should contain #defines for all of the interrupt vector
@@ -94676,9 +124735,9 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/irq_vectors.h tmp-l
+#define irq_to_dynirq(_x) ((_x) - DYNIRQ_BASE)
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/mach_time.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/mach_time.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/mach_time.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/mach_time.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,111 @@
+/*
+ * include/asm-i386/mach-default/mach_time.h
@@ -94791,9 +124850,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/mach_timer.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/mach_timer.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/mach_timer.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/mach_timer.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,50 @@
+/*
+ * include/asm-i386/mach-default/mach_timer.h
@@ -94845,9 +124904,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/setup_arch_post.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/setup_arch_post.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/setup_arch_post.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/setup_arch_post.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,63 @@
+/**
+ * machine_specific_* - Hooks for machine specific setup.
@@ -94912,18 +124971,74 @@ diff -Nurp pristine-linux-2.6.18/include/asm-x86_64/mach-xen/setup_arch_post.h t
+#endif
+#endif
+}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/mach-xen/setup_arch_pre.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/setup_arch_pre.h
+--- linux-2.6.18.8/include/asm-x86_64/mach-xen/setup_arch_pre.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/mach-xen/setup_arch_pre.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,5 @@
+/* Hook to call BIOS initialisation function */
+
+#define ARCH_SETUP machine_specific_arch_setup();
+
+static void __init machine_specific_arch_setup(void);
-diff -Nurp 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-11-16 16:18:12.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/signal.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/signal.h
+--- linux-2.6.18.8/include/asm-x86_64/signal.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/signal.h 2008-02-15 16:22:14.000000000 -0800
+@@ -24,10 +24,6 @@ typedef struct {
+ } sigset_t;
+
+
+-struct pt_regs;
+-asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset);
+-
+-
+ #else
+ /* Here we must cater to libcs that poke about in kernel headers. */
+
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/thread_info.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/thread_info.h
+--- linux-2.6.18.8/include/asm-x86_64/thread_info.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/thread_info.h 2008-02-15 16:22:14.000000000 -0800
+@@ -114,6 +114,7 @@ static inline struct thread_info *stack_
+ #define TIF_IRET 5 /* force IRET */
+ #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */
+ #define TIF_SECCOMP 8 /* secure computing */
++#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */
+ /* 16 free */
+ #define TIF_IA32 17 /* 32bit process */
+ #define TIF_FORK 18 /* ret_from_fork */
+@@ -128,6 +129,7 @@ static inline struct thread_info *stack_
+ #define _TIF_IRET (1<<TIF_IRET)
+ #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
+ #define _TIF_SECCOMP (1<<TIF_SECCOMP)
++#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
+ #define _TIF_IA32 (1<<TIF_IA32)
+ #define _TIF_FORK (1<<TIF_FORK)
+ #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
+diff -rpuN linux-2.6.18.8/include/asm-x86_64/unistd.h linux-2.6.18-xen-3.2.0/include/asm-x86_64/unistd.h
+--- linux-2.6.18.8/include/asm-x86_64/unistd.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/asm-x86_64/unistd.h 2008-02-15 16:22:14.000000000 -0800
+@@ -600,9 +600,9 @@ __SYSCALL(__NR_fchmodat, sys_fchmodat)
+ #define __NR_faccessat 269
+ __SYSCALL(__NR_faccessat, sys_faccessat)
+ #define __NR_pselect6 270
+-__SYSCALL(__NR_pselect6, sys_ni_syscall) /* for now */
++__SYSCALL(__NR_pselect6, sys_pselect6)
+ #define __NR_ppoll 271
+-__SYSCALL(__NR_ppoll, sys_ni_syscall) /* for now */
++__SYSCALL(__NR_ppoll, sys_ppoll)
+ #define __NR_unshare 272
+ __SYSCALL(__NR_unshare, sys_unshare)
+ #define __NR_set_robust_list 273
+@@ -658,6 +658,7 @@ do { \
+ #define __ARCH_WANT_SYS_SIGPENDING
+ #define __ARCH_WANT_SYS_SIGPROCMASK
+ #define __ARCH_WANT_SYS_RT_SIGACTION
++#define __ARCH_WANT_SYS_RT_SIGSUSPEND
+ #define __ARCH_WANT_SYS_TIME
+ #define __ARCH_WANT_COMPAT_SYS_TIME
+
+diff -rpuN linux-2.6.18.8/include/linux/aio.h linux-2.6.18-xen-3.2.0/include/linux/aio.h
+--- linux-2.6.18.8/include/linux/aio.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/aio.h 2008-02-15 16:22:14.000000000 -0800
@@ -191,6 +191,11 @@ struct kioctx {
struct aio_ring_info ring_info;
@@ -94936,9 +125051,54 @@ 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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/linux/bio.h linux-2.6.18-xen-3.2.0/include/linux/bio.h
+--- linux-2.6.18.8/include/linux/bio.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/bio.h 2008-02-15 16:22:14.000000000 -0800
+@@ -172,12 +172,27 @@ struct bio {
+ #define bio_offset(bio) bio_iovec((bio))->bv_offset
+ #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx)
+ #define bio_sectors(bio) ((bio)->bi_size >> 9)
+-#define bio_cur_sectors(bio) (bio_iovec(bio)->bv_len >> 9)
+-#define bio_data(bio) (page_address(bio_page((bio))) + bio_offset((bio)))
+ #define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER))
+ #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC))
+ #define bio_failfast(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST))
+ #define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD))
++#define bio_empty_barrier(bio) (bio_barrier(bio) && !(bio)->bi_size)
++
++static inline unsigned int bio_cur_sectors(struct bio *bio)
++{
++ if (bio->bi_vcnt)
++ return bio_iovec(bio)->bv_len >> 9;
++
++ return 0;
++}
++
++static inline void *bio_data(struct bio *bio)
++{
++ if (bio->bi_vcnt)
++ return page_address(bio_page(bio)) + bio_offset(bio);
++
++ return NULL;
++}
+
+ /*
+ * will die
+diff -rpuN linux-2.6.18.8/include/linux/blkdev.h linux-2.6.18-xen-3.2.0/include/linux/blkdev.h
+--- linux-2.6.18.8/include/linux/blkdev.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/blkdev.h 2008-02-15 16:22:14.000000000 -0800
+@@ -506,6 +506,8 @@ enum {
+ #define blk_barrier_rq(rq) ((rq)->flags & REQ_HARDBARRIER)
+ #define blk_fua_rq(rq) ((rq)->flags & REQ_FUA)
+
++#define blk_empty_barrier(rq) (blk_barrier_rq(rq) && blk_fs_request(rq) && !(rq)->hard_nr_sectors)
++
+ #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist)
+
+ #define rq_data_dir(rq) ((rq)->flags & 1)
+diff -rpuN linux-2.6.18.8/include/linux/crash_dump.h linux-2.6.18-xen-3.2.0/include/linux/crash_dump.h
+--- linux-2.6.18.8/include/linux/crash_dump.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/crash_dump.h 2008-02-15 16:22:14.000000000 -0800
@@ -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;
@@ -94953,9 +125113,9 @@ diff -Nurp pristine-linux-2.6.18/include/linux/crash_dump.h tmp-linux-2.6-xen.pa
+
#endif /* CONFIG_CRASH_DUMP */
#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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/linux/elfnote.h linux-2.6.18-xen-3.2.0/include/linux/elfnote.h
+--- linux-2.6.18.8/include/linux/elfnote.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/elfnote.h 2008-02-15 16:22:14.000000000 -0800
@@ -0,0 +1,104 @@
+#ifndef _LINUX_ELFNOTE_H
+#define _LINUX_ELFNOTE_H
@@ -95061,9 +125221,9 @@ diff -Nurp pristine-linux-2.6.18/include/linux/elfnote.h tmp-linux-2.6-xen.patch
+#endif /* __ASSEMBLER__ */
+
+#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-11-16 16:18:12.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/linux/eventpoll.h linux-2.6.18-xen-3.2.0/include/linux/eventpoll.h
+--- linux-2.6.18.8/include/linux/eventpoll.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/eventpoll.h 2008-02-15 16:22:14.000000000 -0800
@@ -90,6 +90,12 @@ static inline void eventpoll_release(str
eventpoll_release_file(file);
}
@@ -95077,25 +125237,9 @@ diff -Nurp pristine-linux-2.6.18/include/linux/eventpoll.h tmp-linux-2.6-xen.pat
#else
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-11-14 15:35:27.000000000 -0800
-@@ -99,7 +99,11 @@ static inline int gfp_zone(gfp_t gfp)
- */
-
- #ifndef HAVE_ARCH_FREE_PAGE
--static inline void arch_free_page(struct page *page, int order) { }
-+/*
-+ * If arch_free_page returns non-zero then the generic free_page code can
-+ * immediately bail: the arch-specific function has done all the work.
-+ */
-+static inline int arch_free_page(struct page *page, int order) { return 0; }
- #endif
-
- 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/linux/highmem.h linux-2.6.18-xen-3.2.0/include/linux/highmem.h
+--- linux-2.6.18.8/include/linux/highmem.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/highmem.h 2008-02-15 16:22:14.000000000 -0800
@@ -24,10 +24,16 @@ static inline void flush_kernel_dcache_p
/* declarations for linux/mm/highmem.c */
@@ -95113,9 +125257,9 @@ diff -Nurp pristine-linux-2.6.18/include/linux/highmem.h tmp-linux-2.6-xen.patch
static inline void *kmap(struct page *page)
{
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/linux/interrupt.h linux-2.6.18-xen-3.2.0/include/linux/interrupt.h
+--- linux-2.6.18.8/include/linux/interrupt.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/interrupt.h 2008-02-15 16:22:14.000000000 -0800
@@ -166,6 +166,12 @@ static inline int disable_irq_wake(unsig
#endif /* CONFIG_GENERIC_HARDIRQS */
@@ -95129,9 +125273,22 @@ diff -Nurp pristine-linux-2.6.18/include/linux/interrupt.h tmp-linux-2.6-xen.pat
#ifndef __ARCH_SET_SOFTIRQ_PENDING
#define set_softirq_pending(x) (local_softirq_pending() = (x))
#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/linux/ioport.h linux-2.6.18-xen-3.2.0/include/linux/ioport.h
+--- linux-2.6.18.8/include/linux/ioport.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/ioport.h 2008-02-15 16:22:14.000000000 -0800
+@@ -93,6 +93,9 @@ struct resource_list {
+ /* PC/ISA/whatever - the normal PC address spaces: IO and memory */
+ extern struct resource ioport_resource;
+ extern struct resource iomem_resource;
++#ifdef CONFIG_XEN
++extern struct resource iomem_machine_resource;
++#endif
+
+ extern int request_resource(struct resource *root, struct resource *new);
+ extern struct resource * ____request_resource(struct resource *root, struct resource *new);
+diff -rpuN linux-2.6.18.8/include/linux/kexec.h linux-2.6.18-xen-3.2.0/include/linux/kexec.h
+--- linux-2.6.18.8/include/linux/kexec.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/kexec.h 2008-02-15 16:22:14.000000000 -0800
@@ -31,6 +31,13 @@
#error KEXEC_ARCH not defined
#endif
@@ -95159,9 +125316,28 @@ diff -Nurp pristine-linux-2.6.18/include/linux/kexec.h tmp-linux-2.6-xen.patch/i
extern asmlinkage long sys_kexec_load(unsigned long entry,
unsigned long nr_segments,
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-11-14 15:35:27.000000000 -0800
+@@ -108,6 +121,10 @@ int kexec_should_crash(struct task_struc
+ extern struct kimage *kexec_image;
+ extern struct kimage *kexec_crash_image;
+
++#ifndef kexec_flush_icache_page
++#define kexec_flush_icache_page(page)
++#endif
++
+ #define KEXEC_ON_CRASH 0x00000001
+ #define KEXEC_ARCH_MASK 0xffff0000
+
+@@ -131,6 +148,7 @@ extern struct resource crashk_res;
+ typedef u32 note_buf_t[MAX_NOTE_BYTES/4];
+ extern note_buf_t *crash_notes;
+
++
+ #else /* !CONFIG_KEXEC */
+ struct pt_regs;
+ struct task_struct;
+diff -rpuN linux-2.6.18.8/include/linux/mm.h linux-2.6.18-xen-3.2.0/include/linux/mm.h
+--- linux-2.6.18.8/include/linux/mm.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/mm.h 2008-02-15 16:22:14.000000000 -0800
@@ -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) */
@@ -95197,9 +125373,45 @@ diff -Nurp pristine-linux-2.6.18/include/linux/mm.h tmp-linux-2.6-xen.patch/incl
#ifdef CONFIG_PROC_FS
void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
#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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/linux/netfilter_bridge.h linux-2.6.18-xen-3.2.0/include/linux/netfilter_bridge.h
+--- linux-2.6.18.8/include/linux/netfilter_bridge.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/netfilter_bridge.h 2008-02-15 16:22:14.000000000 -0800
+@@ -7,6 +7,7 @@
+ #include <linux/netfilter.h>
+ #if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER)
+ #include <linux/if_ether.h>
++#include <linux/if_vlan.h>
+ #endif
+
+ /* Bridge Hooks */
+@@ -54,16 +55,19 @@ int nf_bridge_maybe_copy_header(struct s
+
+ if (skb->nf_bridge) {
+ if (skb->protocol == __constant_htons(ETH_P_8021Q)) {
+- err = skb_cow(skb, 18);
++ int header_size = ETH_HLEN + VLAN_HLEN;
++
++ err = skb_cow(skb, header_size);
+ if (err)
+ return err;
+- memcpy(skb->data - 18, skb->nf_bridge->data, 18);
+- skb_push(skb, 4);
++ memcpy(skb->data - header_size, skb->nf_bridge->data,
++ header_size);
++ skb_push(skb, VLAN_HLEN);
+ } else {
+- err = skb_cow(skb, 16);
++ err = skb_cow(skb, ETH_HLEN);
+ if (err)
+ return err;
+- memcpy(skb->data - 16, skb->nf_bridge->data, 16);
++ memcpy(skb->data - ETH_HLEN, skb->nf_bridge->data, ETH_HLEN);
+ }
+ }
+ return 0;
+diff -rpuN linux-2.6.18.8/include/linux/oprofile.h linux-2.6.18-xen-3.2.0/include/linux/oprofile.h
+--- linux-2.6.18.8/include/linux/oprofile.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/oprofile.h 2008-02-15 16:22:14.000000000 -0800
@@ -16,6 +16,8 @@
#include <linux/types.h>
#include <linux/spinlock.h>
@@ -95230,9 +125442,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/linux/page-flags.h linux-2.6.18-xen-3.2.0/include/linux/page-flags.h
+--- linux-2.6.18.8/include/linux/page-flags.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/page-flags.h 2008-02-15 16:22:14.000000000 -0800
@@ -98,6 +98,8 @@
#define PG_uncached 31 /* Page has been mapped as uncached */
#endif
@@ -95261,9 +125473,26 @@ diff -Nurp pristine-linux-2.6.18/include/linux/page-flags.h tmp-linux-2.6-xen.pa
struct page; /* forward declaration */
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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/linux/pci_ids.h linux-2.6.18-xen-3.2.0/include/linux/pci_ids.h
+--- linux-2.6.18.8/include/linux/pci_ids.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/pci_ids.h 2008-02-15 16:22:14.000000000 -0800
+@@ -2188,6 +2188,13 @@
+ #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815
+ #define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e
+ #define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850
++#define PCI_DEVICE_ID_INTEL_ICH9_0 0x2910
++#define PCI_DEVICE_ID_INTEL_ICH9_1 0x2911
++#define PCI_DEVICE_ID_INTEL_ICH9_2 0x2912
++#define PCI_DEVICE_ID_INTEL_ICH9_3 0x2913
++#define PCI_DEVICE_ID_INTEL_ICH9_4 0x2914
++#define PCI_DEVICE_ID_INTEL_ICH9_5 0x2915
++#define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930
+ #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340
+ #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575
+ #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577
+diff -rpuN linux-2.6.18.8/include/linux/sched.h linux-2.6.18-xen-3.2.0/include/linux/sched.h
+--- linux-2.6.18.8/include/linux/sched.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/sched.h 2008-02-15 16:22:14.000000000 -0800
@@ -211,10 +211,15 @@ extern void update_process_times(int use
extern void scheduler_tick(void);
@@ -95280,9 +125509,9 @@ diff -Nurp pristine-linux-2.6.18/include/linux/sched.h tmp-linux-2.6-xen.patch/i
static inline void softlockup_tick(void)
{
}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/linux/skbuff.h linux-2.6.18-xen-3.2.0/include/linux/skbuff.h
+--- linux-2.6.18.8/include/linux/skbuff.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/skbuff.h 2008-02-15 16:22:14.000000000 -0800
@@ -203,6 +203,8 @@ enum {
* @local_df: allow local fragmentation
* @cloned: Head may be cloned (check refcnt to be sure)
@@ -95306,9 +125535,64 @@ diff -Nurp pristine-linux-2.6.18/include/linux/skbuff.h tmp-linux-2.6-xen.patch/
__be16 protocol;
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/linux/sysctl.h linux-2.6.18-xen-3.2.0/include/linux/sysctl.h
+--- linux-2.6.18.8/include/linux/sysctl.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/sysctl.h 2008-02-15 16:22:14.000000000 -0800
+@@ -6,10 +6,17 @@
+ ****************************************************************
+ ****************************************************************
+ **
++ ** WARNING:
+ ** The values in this file are exported to user space via
+- ** the sysctl() binary interface. However this interface
+- ** is unstable and deprecated and will be removed in the future.
+- ** For a stable interface use /proc/sys.
++ ** the sysctl() binary interface. Do *NOT* change the
++ ** numbering of any existing values here, and do not change
++ ** any numbers within any one set of values. If you have to
++ ** have to redefine an existing interface, use a new number for it.
++ ** The kernel will then return -ENOTDIR to any application using
++ ** the old binary interface.
++ **
++ ** For new interfaces unless you really need a binary number
++ ** please use CTL_UNNUMBERED.
+ **
+ ****************************************************************
+ ****************************************************************
+@@ -48,6 +55,7 @@ struct __sysctl_args {
+ #ifdef __KERNEL__
+ #define CTL_ANY -1 /* Matches any name */
+ #define CTL_NONE 0
++#define CTL_UNNUMBERED CTL_NONE /* sysctl without a binary number */
+ #endif
+
+ enum
+diff -rpuN linux-2.6.18.8/include/linux/vermagic.h linux-2.6.18-xen-3.2.0/include/linux/vermagic.h
+--- linux-2.6.18.8/include/linux/vermagic.h 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/linux/vermagic.h 2008-02-15 16:22:14.000000000 -0800
+@@ -17,6 +17,11 @@
+ #else
+ #define MODULE_VERMAGIC_MODULE_UNLOAD ""
+ #endif
++#ifdef CONFIG_XEN
++#define MODULE_VERMAGIC_XEN "Xen "
++#else
++#define MODULE_VERMAGIC_XEN
++#endif
+ #ifndef MODULE_ARCH_VERMAGIC
+ #define MODULE_ARCH_VERMAGIC ""
+ #endif
+@@ -24,5 +29,6 @@
+ #define VERMAGIC_STRING \
+ UTS_RELEASE " " \
+ MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
+- MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC \
++ MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_XEN \
++ MODULE_ARCH_VERMAGIC \
+ "gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__)
+diff -rpuN linux-2.6.18.8/include/xen/balloon.h linux-2.6.18-xen-3.2.0/include/xen/balloon.h
+--- linux-2.6.18.8/include/xen/balloon.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/balloon.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * balloon.h
@@ -95367,9 +125651,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/balloon.h tmp-linux-2.6-xen.patch/i
+#define balloon_unlock(__flags) spin_unlock_irqrestore(&balloon_lock, __flags)
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/blkif.h linux-2.6.18-xen-3.2.0/include/xen/blkif.h
+--- linux-2.6.18.8/include/xen/blkif.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/blkif.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,101 @@
+#ifndef __XEN_BLKIF_H__
+#define __XEN_BLKIF_H__
@@ -95472,9 +125756,58 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/compat_ioctl.h linux-2.6.18-xen-3.2.0/include/xen/compat_ioctl.h
+--- linux-2.6.18.8/include/xen/compat_ioctl.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/compat_ioctl.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,45 @@
++/*
++ * 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ *
++ * Copyright IBM Corp. 2007
++ *
++ * Authors: Jimi Xenidis <jimix@watson.ibm.com>
++ * Hollis Blanchard <hollisb@us.ibm.com>
++ */
++
++#ifndef __LINUX_XEN_COMPAT_H__
++#define __LINUX_XEN_COMPAT_H__
++
++#include <linux/compat.h>
++
++extern int privcmd_ioctl_32(int fd, unsigned int cmd, unsigned long arg);
++struct privcmd_mmap_32 {
++ int num;
++ domid_t dom;
++ compat_uptr_t entry;
++};
++
++struct privcmd_mmapbatch_32 {
++ int num; /* number of pages to populate */
++ domid_t dom; /* target domain */
++ __u64 addr; /* virtual address */
++ compat_uptr_t arr; /* array of mfns - top nibble set on err */
++};
++#define IOCTL_PRIVCMD_MMAP_32 \
++ _IOC(_IOC_NONE, 'P', 2, sizeof(struct privcmd_mmap_32))
++#define IOCTL_PRIVCMD_MMAPBATCH_32 \
++ _IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch_32))
++
++#endif /* __LINUX_XEN_COMPAT_H__ */
+diff -rpuN linux-2.6.18.8/include/xen/cpu_hotplug.h linux-2.6.18-xen-3.2.0/include/xen/cpu_hotplug.h
+--- linux-2.6.18.8/include/xen/cpu_hotplug.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/cpu_hotplug.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,41 @@
+#ifndef __XEN_CPU_HOTPLUG_H__
+#define __XEN_CPU_HOTPLUG_H__
@@ -95517,9 +125850,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/cpu_hotplug.h tmp-linux-2.6-xen.pat
+#endif /* !defined(CONFIG_HOTPLUG_CPU) */
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/driver_util.h linux-2.6.18-xen-3.2.0/include/xen/driver_util.h
+--- linux-2.6.18.8/include/xen/driver_util.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/driver_util.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,14 @@
+
+#ifndef __ASM_XEN_DRIVER_UTIL_H__
@@ -95535,10 +125868,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/driver_util.h tmp-linux-2.6-xen.pat
+extern struct class *get_xen_class(void);
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,126 @@
+diff -rpuN linux-2.6.18.8/include/xen/evtchn.h linux-2.6.18-xen-3.2.0/include/xen/evtchn.h
+--- linux-2.6.18.8/include/xen/evtchn.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/evtchn.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,139 @@
+/******************************************************************************
+ * evtchn.h
+ *
@@ -95643,8 +125976,21 @@ diff -Nurp pristine-linux-2.6.18/include/xen/evtchn.h tmp-linux-2.6-xen.patch/in
+void evtchn_device_upcall(int port);
+
+void mask_evtchn(int port);
++void disable_all_local_evtchn(void);
+void unmask_evtchn(int port);
+
++#ifdef CONFIG_SMP
++void rebind_evtchn_to_cpu(int port, unsigned int cpu);
++#else
++#define rebind_evtchn_to_cpu(port, cpu) ((void)0)
++#endif
++
++static inline int test_and_set_evtchn_mask(int port)
++{
++ shared_info_t *s = HYPERVISOR_shared_info;
++ return synch_test_and_set_bit(port, s->evtchn_mask);
++}
++
+static inline void clear_evtchn(int port)
+{
+ shared_info_t *s = HYPERVISOR_shared_info;
@@ -95654,7 +126000,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/evtchn.h tmp-linux-2.6-xen.patch/in
+static inline void notify_remote_via_evtchn(int port)
+{
+ struct evtchn_send send = { .port = port };
-+ (void)HYPERVISOR_event_channel_op(EVTCHNOP_send, &send);
++ VOID(HYPERVISOR_event_channel_op(EVTCHNOP_send, &send));
+}
+
+/*
@@ -95665,9 +126011,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/evtchn.h tmp-linux-2.6-xen.patch/in
+int irq_to_evtchn_port(int irq);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/features.h linux-2.6.18-xen-3.2.0/include/xen/features.h
+--- linux-2.6.18.8/include/xen/features.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/features.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,20 @@
+/******************************************************************************
+ * features.h
@@ -95689,10 +126035,24 @@ diff -Nurp pristine-linux-2.6.18/include/xen/features.h tmp-linux-2.6-xen.patch/
+#define xen_feature(flag) (xen_features[flag])
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,138 @@
+diff -rpuN linux-2.6.18.8/include/xen/firmware.h linux-2.6.18-xen-3.2.0/include/xen/firmware.h
+--- linux-2.6.18.8/include/xen/firmware.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/firmware.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,10 @@
++#ifndef __XEN_FIRMWARE_H__
++#define __XEN_FIRMWARE_H__
++
++#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
++void copy_edd(void);
++#endif
++
++void copy_edid(void);
++
++#endif /* __XEN_FIRMWARE_H__ */
+diff -rpuN linux-2.6.18.8/include/xen/gnttab.h linux-2.6.18-xen-3.2.0/include/xen/gnttab.h
+--- linux-2.6.18.8/include/xen/gnttab.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/gnttab.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,163 @@
+/******************************************************************************
+ * gnttab.h
+ *
@@ -95734,6 +126094,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/gnttab.h tmp-linux-2.6-xen.patch/in
+
+#include <asm/hypervisor.h>
+#include <asm/maddr.h> /* maddr_t */
++#include <linux/mm.h>
+#include <xen/interface/grant_table.h>
+#include <xen/features.h>
+
@@ -95745,14 +126106,14 @@ diff -Nurp pristine-linux-2.6.18/include/xen/gnttab.h tmp-linux-2.6-xen.patch/in
+};
+
+int gnttab_grant_foreign_access(domid_t domid, unsigned long frame,
-+ int readonly);
++ int flags);
+
+/*
+ * End access through the given grant reference, iff the grant entry is no
+ * longer in use. Return 1 if the grant entry was freed, 0 if it is still in
+ * use.
+ */
-+int gnttab_end_foreign_access_ref(grant_ref_t ref, int readonly);
++int gnttab_end_foreign_access_ref(grant_ref_t ref);
+
+/*
+ * Eventually end access through the given grant reference, and once that
@@ -95760,8 +126121,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/gnttab.h tmp-linux-2.6-xen.patch/in
+ * immediately iff the grant entry is not in use, otherwise it will happen
+ * some time later. page may be 0, in which case no freeing will occur.
+ */
-+void gnttab_end_foreign_access(grant_ref_t ref, int readonly,
-+ unsigned long page);
++void gnttab_end_foreign_access(grant_ref_t ref, unsigned long page);
+
+int gnttab_grant_foreign_transfer(domid_t domid, unsigned long pfn);
+
@@ -95791,14 +126151,24 @@ diff -Nurp pristine-linux-2.6.18/include/xen/gnttab.h tmp-linux-2.6-xen.patch/in
+void gnttab_cancel_free_callback(struct gnttab_free_callback *callback);
+
+void gnttab_grant_foreign_access_ref(grant_ref_t ref, domid_t domid,
-+ unsigned long frame, int readonly);
++ unsigned long frame, int flags);
+
+void gnttab_grant_foreign_transfer_ref(grant_ref_t, domid_t domid,
+ unsigned long pfn);
+
++int gnttab_copy_grant_page(grant_ref_t ref, struct page **pagep);
++void __gnttab_dma_map_page(struct page *page);
++static inline void __gnttab_dma_unmap_page(struct page *page)
++{
++}
++
++void gnttab_reset_grant_page(struct page *page);
++
+int gnttab_suspend(void);
+int gnttab_resume(void);
+
++void *arch_gnttab_alloc_shared(unsigned long *frames);
++
+static inline void
+gnttab_set_map_op(struct gnttab_map_grant_ref *map, maddr_t addr,
+ uint32_t flags, grant_ref_t ref, domid_t domid)
@@ -95830,10 +126200,25 @@ diff -Nurp pristine-linux-2.6.18/include/xen/gnttab.h tmp-linux-2.6-xen.patch/in
+ unmap->dev_bus_addr = 0;
+}
+
++static inline void
++gnttab_set_replace_op(struct gnttab_unmap_and_replace *unmap, maddr_t addr,
++ maddr_t new_addr, grant_handle_t handle)
++{
++ if (xen_feature(XENFEAT_auto_translated_physmap)) {
++ unmap->host_addr = __pa(addr);
++ unmap->new_addr = __pa(new_addr);
++ } else {
++ unmap->host_addr = addr;
++ unmap->new_addr = new_addr;
++ }
++
++ unmap->handle = handle;
++}
++
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/hvm.h linux-2.6.18-xen-3.2.0/include/xen/hvm.h
+--- linux-2.6.18.8/include/xen/hvm.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/hvm.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,23 @@
+/* Simple wrappers around HVM functions */
+#ifndef XEN_HVM_H__
@@ -95858,18 +126243,18 @@ 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,24 @@
+diff -rpuN linux-2.6.18.8/include/xen/hypercall.h linux-2.6.18-xen-3.2.0/include/xen/hypercall.h
+--- linux-2.6.18.8/include/xen/hypercall.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/hypercall.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,30 @@
+#ifndef __XEN_HYPERCALL_H__
+#define __XEN_HYPERCALL_H__
+
+#include <asm/hypercall.h>
+
-+static inline int
++static inline int __must_check
+HYPERVISOR_multicall_check(
-+ multicall_entry_t *call_list, int nr_calls,
++ multicall_entry_t *call_list, unsigned int nr_calls,
+ const unsigned long *rc_list)
+{
+ int rc = HYPERVISOR_multicall(call_list, nr_calls);
@@ -95877,6 +126262,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/hypercall.h tmp-linux-2.6-xen.patch
+ if (unlikely(rc < 0))
+ return rc;
+ BUG_ON(rc);
++ BUG_ON((int)nr_calls < 0);
+
+ for ( ; nr_calls > 0; --nr_calls, ++call_list)
+ if (unlikely(call_list->result != (rc_list ? *rc_list++ : 0)))
@@ -95885,10 +126271,15 @@ diff -Nurp pristine-linux-2.6.18/include/xen/hypercall.h tmp-linux-2.6-xen.patch
+ return 0;
+}
+
++/* A construct to ignore the return value of hypercall wrappers in a few
++ * exceptional cases (simply casting the function result to void doesn't
++ * avoid the compiler warning): */
++#define VOID(expr) ((void)((expr)?:0))
++
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/hypervisor_sysfs.h linux-2.6.18-xen-3.2.0/include/xen/hypervisor_sysfs.h
+--- linux-2.6.18.8/include/xen/hypervisor_sysfs.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/hypervisor_sysfs.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,30 @@
+/*
+ * copyright (c) 2006 IBM Corporation
@@ -95920,9 +126311,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/COPYING linux-2.6.18-xen-3.2.0/include/xen/interface/COPYING
+--- linux-2.6.18.8/include/xen/interface/COPYING 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/COPYING 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,38 @@
+XEN NOTICE
+==========
@@ -95962,9 +126353,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/COPYING tmp-linux-2.6-xen
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
-diff -Nurp 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/acm.h linux-2.6.18-xen-3.2.0/include/xen/interface/acm.h
+--- linux-2.6.18.8/include/xen/interface/acm.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/acm.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,228 @@
+/*
+ * acm.h: Xen access control module interface defintions
@@ -96194,9 +126585,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm.h tmp-linux-2.6-xen.p
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/acm_ops.h linux-2.6.18-xen-3.2.0/include/xen/interface/acm_ops.h
+--- linux-2.6.18.8/include/xen/interface/acm_ops.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/acm_ops.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,159 @@
+/*
+ * acm_ops.h: Xen access control module hypervisor commands
@@ -96357,10 +126748,315 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/acm_ops.h tmp-linux-2.6-x
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,522 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/arch-ia64/debug_op.h linux-2.6.18-xen-3.2.0/include/xen/interface/arch-ia64/debug_op.h
+--- linux-2.6.18.8/include/xen/interface/arch-ia64/debug_op.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/arch-ia64/debug_op.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,96 @@
++/******************************************************************************
++ * debug_op.h
++ *
++ * Copyright (c) 2007 Tristan Gingold <tgingold@free.fr>
++ *
++ * 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
++ *
++ */
++
++#ifndef __XEN_PUBLIC_IA64_DEBUG_OP_H__
++#define __XEN_PUBLIC_IA64_DEBUG_OP_H__
++
++/* Set/Get extra conditions to break. */
++#define XEN_IA64_DEBUG_OP_SET_FLAGS 1
++#define XEN_IA64_DEBUG_OP_GET_FLAGS 2
++
++/* Break on kernel single step. */
++#define XEN_IA64_DEBUG_ON_KERN_SSTEP (1 << 0)
++
++/* Break on kernel debug (breakpoint or watch point). */
++#define XEN_IA64_DEBUG_ON_KERN_DEBUG (1 << 1)
++
++/* Break on kernel taken branch. */
++#define XEN_IA64_DEBUG_ON_KERN_TBRANCH (1 << 2)
++
++/* Break on interrupt injection. */
++#define XEN_IA64_DEBUG_ON_EXTINT (1 << 3)
++
++/* Break on interrupt injection. */
++#define XEN_IA64_DEBUG_ON_EXCEPT (1 << 4)
++
++/* Break on event injection. */
++#define XEN_IA64_DEBUG_ON_EVENT (1 << 5)
++
++/* Break on privop/virtualized instruction (slow path only). */
++#define XEN_IA64_DEBUG_ON_PRIVOP (1 << 6)
++
++/* Break on emulated PAL call (at entry). */
++#define XEN_IA64_DEBUG_ON_PAL (1 << 7)
++
++/* Break on emulated SAL call (at entry). */
++#define XEN_IA64_DEBUG_ON_SAL (1 << 8)
++
++/* Break on emulated EFI call (at entry). */
++#define XEN_IA64_DEBUG_ON_EFI (1 << 9)
++
++/* Break on rfi emulation (slow path only, before exec). */
++#define XEN_IA64_DEBUG_ON_RFI (1 << 10)
++
++/* Break on address translation switch. */
++#define XEN_IA64_DEBUG_ON_MMU (1 << 11)
++
++/* Break on bad guest physical address. */
++#define XEN_IA64_DEBUG_ON_BAD_MPA (1 << 12)
++
++/* Force psr.ss bit. */
++#define XEN_IA64_DEBUG_FORCE_SS (1 << 13)
++
++/* Force psr.db bit. */
++#define XEN_IA64_DEBUG_FORCE_DB (1 << 14)
++
++/* Break on ITR/PTR. */
++#define XEN_IA64_DEBUG_ON_TR (1 << 15)
++
++/* Break on ITC/PTC.L/PTC.G/PTC.GA. */
++#define XEN_IA64_DEBUG_ON_TC (1 << 16)
++
++/* Get translation cache. */
++#define XEN_IA64_DEBUG_OP_GET_TC 3
++
++/* Translate virtual address to guest physical address. */
++#define XEN_IA64_DEBUG_OP_TRANSLATE 4
++
++union xen_ia64_debug_op {
++ uint64_t flags;
++ struct xen_ia64_debug_vtlb {
++ uint64_t nbr; /* IN/OUT */
++ XEN_GUEST_HANDLE_64(ia64_tr_entry_t) tr; /* IN/OUT */
++ } vtlb;
++};
++typedef union xen_ia64_debug_op xen_ia64_debug_op_t;
++DEFINE_XEN_GUEST_HANDLE(xen_ia64_debug_op_t);
++
++#endif /* __XEN_PUBLIC_IA64_DEBUG_OP_H__ */
+diff -rpuN linux-2.6.18.8/include/xen/interface/arch-ia64/hvm/save.h linux-2.6.18-xen-3.2.0/include/xen/interface/arch-ia64/hvm/save.h
+--- linux-2.6.18.8/include/xen/interface/arch-ia64/hvm/save.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/arch-ia64/hvm/save.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,201 @@
++/******************************************************************************
++ * save_types.h
++ *
++ * Copyright (c) 2007 Isaku Yamahata <yamahata at valinux co jp>
++ * VA Linux Systems Japan K.K.
++ *
++ * 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
++ *
++ */
++
++#ifndef __XEN_PUBLIC_HVM_SAVE_IA64_H__
++#define __XEN_PUBLIC_HVM_SAVE_IA64_H__
++
++#include <public/hvm/save.h>
++#include <public/arch-ia64.h>
++
++/*
++ * Save/restore header: general info about the save file.
++ */
++
++/* x86 uses 0x54381286 */
++#define HVM_FILE_MAGIC 0x343641492f6e6558UL /* "Xen/IA64" */
++#define HVM_FILE_VERSION 0x0000000000000001UL
++
++struct hvm_save_header {
++ uint64_t magic; /* Must be HVM_FILE_MAGIC */
++ uint64_t version; /* File format version */
++ uint64_t changeset; /* Version of Xen that saved this file */
++ uint64_t cpuid[5]; /* CPUID[0x01][%eax] on the saving machine */
++};
++
++DECLARE_HVM_SAVE_TYPE(HEADER, 1, struct hvm_save_header);
++
++/*
++ * CPU
++ */
++struct hvm_hw_ia64_cpu {
++ uint64_t ipsr;
++};
++DECLARE_HVM_SAVE_TYPE(CPU, 2, struct hvm_hw_ia64_cpu);
++
++/*
++ * CPU
++ */
++struct hvm_hw_ia64_vpd {
++ struct vpd vpd;
++};
++DECLARE_HVM_SAVE_TYPE(VPD, 3, struct hvm_hw_ia64_vpd);
++
++/*
++ * device dependency
++ * vacpi => viosapic => vlsapic
++ */
++/*
++ * vlsapic
++ */
++struct hvm_hw_ia64_vlsapic {
++ uint64_t insvc[4];
++ uint64_t vhpi; // ??? should this be saved in vpd
++ uint8_t xtp;
++ uint8_t pal_init_pending;
++ uint8_t pad[2];
++};
++DECLARE_HVM_SAVE_TYPE(VLSAPIC, 4, struct hvm_hw_ia64_vlsapic);
++/* set
++ * unconditionaly set v->arch.irq_new_peding = 1
++ * unconditionaly set v->arch.irq_new_condition = 0
++ */
++
++/*
++ * vtime
++ */
++/* itc, itm, itv are saved by arch vcpu context */
++struct hvm_hw_ia64_vtime {
++ uint64_t itc;
++ uint64_t itm;
++
++ uint64_t last_itc;
++ uint64_t pending;
++};
++DECLARE_HVM_SAVE_TYPE(VTIME, 5, struct hvm_hw_ia64_vtime);
++/*
++ * calculate v->vtm.vtm_offset
++ * ??? Or should vtm_offset be set by leave_hypervisor_tail()?
++ * start vtm_timer if necessary by vtm_set_itm().
++ * ??? Or should vtm_timer be set by leave_hypervisor_tail()?
++ *
++ * ??? or should be done by schedule_tail()
++ * => schedule_tail() should do.
++ */
++
++/*
++ * viosapic
++ */
++#define VIOSAPIC_NUM_PINS 48
++
++union viosapic_rte
++{
++ uint64_t bits;
++ struct {
++ uint8_t vector;
++
++ uint8_t delivery_mode : 3;
++ uint8_t reserve1 : 1;
++ uint8_t delivery_status: 1;
++ uint8_t polarity : 1;
++ uint8_t reserve2 : 1;
++ uint8_t trig_mode : 1;
++
++ uint8_t mask : 1;
++ uint8_t reserve3 : 7;
++
++ uint8_t reserved[3];
++ uint16_t dest_id;
++ };
++};
++
++struct hvm_hw_ia64_viosapic {
++ uint64_t irr;
++ uint64_t isr;
++ uint32_t ioregsel;
++ uint32_t pad;
++ uint64_t lowest_vcpu_id;
++ uint64_t base_address;
++ union viosapic_rte redirtbl[VIOSAPIC_NUM_PINS];
++};
++DECLARE_HVM_SAVE_TYPE(VIOSAPIC, 6, struct hvm_hw_ia64_viosapic);
++
++/*
++ * vacpi
++ * PM timer
++ */
++struct vacpi_regs {
++ union {
++ struct {
++ uint32_t pm1a_sts:16;/* PM1a_EVT_BLK.PM1a_STS: status register */
++ uint32_t pm1a_en:16; /* PM1a_EVT_BLK.PM1a_EN: enable register */
++ };
++ uint32_t evt_blk;
++ };
++ uint32_t tmr_val; /* PM_TMR_BLK.TMR_VAL: 32bit free-running counter */
++};
++
++struct hvm_hw_ia64_vacpi {
++ struct vacpi_regs regs;
++};
++DECLARE_HVM_SAVE_TYPE(VACPI, 7, struct hvm_hw_ia64_vacpi);
++/* update last_gtime and setup timer of struct vacpi */
++
++/*
++ * opt_feature: identity mapping of region 4, 5 and 7.
++ * With the c/s 16396:d2935f9c217f of xen-ia64-devel.hg,
++ * opt_feature hypercall supports only region 4,5,7 identity mappings.
++ * structure hvm_hw_ia64_identity_mappings only supports them.
++ * The new structure, struct hvm_hw_ia64_identity_mappings, is created to
++ * avoid to keep up with change of the xen/ia64 internal structure, struct
++ * opt_feature.
++ *
++ * If it is enhanced in the future, new structure will be created.
++ */
++struct hvm_hw_ia64_identity_mapping {
++ uint64_t on; /* on/off */
++ uint64_t pgprot; /* The page protection bit mask of the pte. */
++ uint64_t key; /* A protection key. */
++};
++
++struct hvm_hw_ia64_identity_mappings {
++ struct hvm_hw_ia64_identity_mapping im_reg4;/* Region 4 identity mapping */
++ struct hvm_hw_ia64_identity_mapping im_reg5;/* Region 5 identity mapping */
++ struct hvm_hw_ia64_identity_mapping im_reg7;/* Region 7 identity mapping */
++};
++DECLARE_HVM_SAVE_TYPE(OPT_FEATURE_IDENTITY_MAPPINGS, 8, struct hvm_hw_ia64_identity_mappings);
++
++/*
++ * Largest type-code in use
++ */
++#define HVM_SAVE_CODE_MAX 8
++
++#endif /* __XEN_PUBLIC_HVM_SAVE_IA64_H__ */
++
++/*
++ * Local variables:
++ * mode: C
++ * c-set-style: "BSD"
++ * c-basic-offset: 4
++ * tab-width: 4
++ * indent-tabs-mode: nil
++ * End:
++ */
+diff -rpuN linux-2.6.18.8/include/xen/interface/arch-ia64.h linux-2.6.18-xen-3.2.0/include/xen/interface/arch-ia64.h
+--- linux-2.6.18.8/include/xen/interface/arch-ia64.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/arch-ia64.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,651 @@
+/******************************************************************************
+ * arch-ia64/hypervisor-if.h
+ *
@@ -96391,13 +127087,17 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+
+/* Structural guest handles introduced in 0x00030201. */
+#if __XEN_INTERFACE_VERSION__ >= 0x00030201
-+#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
++#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
+ typedef struct { type *p; } __guest_handle_ ## name
+#else
-+#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
++#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
+ typedef type * __guest_handle_ ## name
+#endif
+
++#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
++ ___DEFINE_XEN_GUEST_HANDLE(name, type); \
++ ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
++
+#define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
+#define XEN_GUEST_HANDLE(name) __guest_handle_ ## name
+#define XEN_GUEST_HANDLE_64(name) XEN_GUEST_HANDLE(name)
@@ -96408,18 +127108,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+#endif
+
+#ifndef __ASSEMBLY__
-+/* Guest handles for primitive C types. */
-+__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
-+__DEFINE_XEN_GUEST_HANDLE(uint, unsigned int);
-+__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
-+__DEFINE_XEN_GUEST_HANDLE(u64, unsigned long);
-+DEFINE_XEN_GUEST_HANDLE(char);
-+DEFINE_XEN_GUEST_HANDLE(int);
-+DEFINE_XEN_GUEST_HANDLE(long);
-+DEFINE_XEN_GUEST_HANDLE(void);
-+
+typedef unsigned long xen_pfn_t;
-+DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
+#define PRI_xen_pfn "lx"
+#endif
+
@@ -96436,12 +127125,22 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+
+typedef unsigned long xen_ulong_t;
+
++#ifdef __XEN_TOOLS__
++#define XEN_PAGE_SIZE XC_PAGE_SIZE
++#else
++#define XEN_PAGE_SIZE PAGE_SIZE
++#endif
++
+#define INVALID_MFN (~0UL)
+
+#define MEM_G (1UL << 30)
+#define MEM_M (1UL << 20)
+#define MEM_K (1UL << 10)
+
++/* Guest physical address of IO ports space. */
++#define IO_PORTS_PADDR 0x00000ffffc000000UL
++#define IO_PORTS_SIZE 0x0000000004000000UL
++
+#define MMIO_START (3 * MEM_G)
+#define MMIO_SIZE (512 * MEM_M)
+
@@ -96452,16 +127151,16 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+#define LEGACY_IO_SIZE (64*MEM_M)
+
+#define IO_PAGE_START (LEGACY_IO_START + LEGACY_IO_SIZE)
-+#define IO_PAGE_SIZE PAGE_SIZE
++#define IO_PAGE_SIZE XEN_PAGE_SIZE
+
+#define STORE_PAGE_START (IO_PAGE_START + IO_PAGE_SIZE)
-+#define STORE_PAGE_SIZE PAGE_SIZE
++#define STORE_PAGE_SIZE XEN_PAGE_SIZE
+
-+#define BUFFER_IO_PAGE_START (STORE_PAGE_START+STORE_PAGE_SIZE)
-+#define BUFFER_IO_PAGE_SIZE PAGE_SIZE
++#define BUFFER_IO_PAGE_START (STORE_PAGE_START + STORE_PAGE_SIZE)
++#define BUFFER_IO_PAGE_SIZE XEN_PAGE_SIZE
+
-+#define BUFFER_PIO_PAGE_START (BUFFER_IO_PAGE_START+BUFFER_IO_PAGE_SIZE)
-+#define BUFFER_PIO_PAGE_SIZE PAGE_SIZE
++#define BUFFER_PIO_PAGE_START (BUFFER_IO_PAGE_START + BUFFER_IO_PAGE_SIZE)
++#define BUFFER_PIO_PAGE_SIZE XEN_PAGE_SIZE
+
+#define IO_SAPIC_START 0xfec00000UL
+#define IO_SAPIC_SIZE 0x100000
@@ -96489,83 +127188,6 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+ } u;
+};
+
-+struct cpu_user_regs {
-+ /* The following registers are saved by SAVE_MIN: */
-+ unsigned long b6; /* scratch */
-+ unsigned long b7; /* scratch */
-+
-+ unsigned long ar_csd; /* used by cmp8xchg16 (scratch) */
-+ unsigned long ar_ssd; /* reserved for future use (scratch) */
-+
-+ unsigned long r8; /* scratch (return value register 0) */
-+ unsigned long r9; /* scratch (return value register 1) */
-+ unsigned long r10; /* scratch (return value register 2) */
-+ unsigned long r11; /* scratch (return value register 3) */
-+
-+ unsigned long cr_ipsr; /* interrupted task's psr */
-+ unsigned long cr_iip; /* interrupted task's instruction pointer */
-+ unsigned long cr_ifs; /* interrupted task's function state */
-+
-+ unsigned long ar_unat; /* interrupted task's NaT register (preserved) */
-+ unsigned long ar_pfs; /* prev function state */
-+ unsigned long ar_rsc; /* RSE configuration */
-+ /* The following two are valid only if cr_ipsr.cpl > 0: */
-+ unsigned long ar_rnat; /* RSE NaT */
-+ unsigned long ar_bspstore; /* RSE bspstore */
-+
-+ unsigned long pr; /* 64 predicate registers (1 bit each) */
-+ unsigned long b0; /* return pointer (bp) */
-+ unsigned long loadrs; /* size of dirty partition << 16 */
-+
-+ unsigned long r1; /* the gp pointer */
-+ unsigned long r12; /* interrupted task's memory stack pointer */
-+ unsigned long r13; /* thread pointer */
-+
-+ unsigned long ar_fpsr; /* floating point status (preserved) */
-+ unsigned long r15; /* scratch */
-+
-+ /* The remaining registers are NOT saved for system calls. */
-+
-+ unsigned long r14; /* scratch */
-+ unsigned long r2; /* scratch */
-+ unsigned long r3; /* scratch */
-+ unsigned long r16; /* scratch */
-+ unsigned long r17; /* scratch */
-+ unsigned long r18; /* scratch */
-+ unsigned long r19; /* scratch */
-+ unsigned long r20; /* scratch */
-+ unsigned long r21; /* scratch */
-+ unsigned long r22; /* scratch */
-+ unsigned long r23; /* scratch */
-+ unsigned long r24; /* scratch */
-+ unsigned long r25; /* scratch */
-+ unsigned long r26; /* scratch */
-+ unsigned long r27; /* scratch */
-+ unsigned long r28; /* scratch */
-+ unsigned long r29; /* scratch */
-+ unsigned long r30; /* scratch */
-+ unsigned long r31; /* scratch */
-+ unsigned long ar_ccv; /* compare/exchange value (scratch) */
-+
-+ /*
-+ * Floating point registers that the kernel considers scratch:
-+ */
-+ struct pt_fpreg f6; /* scratch */
-+ struct pt_fpreg f7; /* scratch */
-+ struct pt_fpreg f8; /* scratch */
-+ struct pt_fpreg f9; /* scratch */
-+ struct pt_fpreg f10; /* scratch */
-+ struct pt_fpreg f11; /* scratch */
-+ unsigned long r4; /* preserved */
-+ unsigned long r5; /* preserved */
-+ unsigned long r6; /* preserved */
-+ unsigned long r7; /* preserved */
-+ unsigned long eml_unat; /* used for emulating instruction */
-+ unsigned long pad0; /* alignment pad */
-+
-+};
-+typedef struct cpu_user_regs cpu_user_regs_t;
-+
+union vac {
+ unsigned long value;
+ struct {
@@ -96672,8 +127294,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+ int banknum; // 0 or 1, which virtual register bank is active
+ unsigned long rrs[8]; // region registers
+ unsigned long krs[8]; // kernel registers
-+ unsigned long pkrs[8]; // protection key registers
-+ unsigned long tmp[8]; // temp registers (e.g. for hyperprivops)
++ unsigned long tmp[16]; // temp registers (e.g. for hyperprivops)
+ };
+ };
+};
@@ -96691,6 +127312,21 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+};
+typedef struct arch_vcpu_info arch_vcpu_info_t;
+
++/*
++ * This structure is used for magic page in domain pseudo physical address
++ * space and the result of XENMEM_machine_memory_map.
++ * As the XENMEM_machine_memory_map result,
++ * xen_memory_map::nr_entries indicates the size in bytes
++ * including struct xen_ia64_memmap_info. Not the number of entries.
++ */
++struct xen_ia64_memmap_info {
++ uint64_t efi_memmap_size; /* size of EFI memory map */
++ uint64_t efi_memdesc_size; /* size of an EFI memory map descriptor */
++ uint32_t efi_memdesc_version; /* memory descriptor version */
++ void *memdesc[0]; /* array of efi_memory_desc_t */
++};
++typedef struct xen_ia64_memmap_info xen_ia64_memmap_info_t;
++
+struct arch_shared_info {
+ /* PFN of the start_info page. */
+ unsigned long start_info_pfn;
@@ -96698,7 +127334,12 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+ /* Interrupt vector for event channel. */
+ int evtchn_vector;
+
-+ uint64_t pad[32];
++ /* PFN of memmap_info page */
++ unsigned int memmap_info_num_pages;/* currently only = 1 case is
++ supported. */
++ unsigned long memmap_info_pfn;
++
++ uint64_t pad[31];
+};
+typedef struct arch_shared_info arch_shared_info_t;
+
@@ -96710,21 +127351,153 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+ unsigned long vadr;
+ unsigned long rid;
+};
++typedef struct ia64_tr_entry ia64_tr_entry_t;
++DEFINE_XEN_GUEST_HANDLE(ia64_tr_entry_t);
+
-+struct vcpu_extra_regs {
-+ struct ia64_tr_entry itrs[8];
-+ struct ia64_tr_entry dtrs[8];
-+ unsigned long iva;
-+ unsigned long dcr;
-+ unsigned long event_callback_ip;
++struct vcpu_tr_regs {
++ struct ia64_tr_entry itrs[12];
++ struct ia64_tr_entry dtrs[12];
++};
++
++union vcpu_ar_regs {
++ unsigned long ar[128];
++ struct {
++ unsigned long kr[8];
++ unsigned long rsv1[8];
++ unsigned long rsc;
++ unsigned long bsp;
++ unsigned long bspstore;
++ unsigned long rnat;
++ unsigned long rsv2;
++ unsigned long fcr;
++ unsigned long rsv3[2];
++ unsigned long eflag;
++ unsigned long csd;
++ unsigned long ssd;
++ unsigned long cflg;
++ unsigned long fsr;
++ unsigned long fir;
++ unsigned long fdr;
++ unsigned long rsv4;
++ unsigned long ccv; /* 32 */
++ unsigned long rsv5[3];
++ unsigned long unat;
++ unsigned long rsv6[3];
++ unsigned long fpsr;
++ unsigned long rsv7[3];
++ unsigned long itc;
++ unsigned long rsv8[3];
++ unsigned long ign1[16];
++ unsigned long pfs; /* 64 */
++ unsigned long lc;
++ unsigned long ec;
++ unsigned long rsv9[45];
++ unsigned long ign2[16];
++ };
++};
++
++union vcpu_cr_regs {
++ unsigned long cr[128];
++ struct {
++ unsigned long dcr; // CR0
++ unsigned long itm;
++ unsigned long iva;
++ unsigned long rsv1[5];
++ unsigned long pta; // CR8
++ unsigned long rsv2[7];
++ unsigned long ipsr; // CR16
++ unsigned long isr;
++ unsigned long rsv3;
++ unsigned long iip;
++ unsigned long ifa;
++ unsigned long itir;
++ unsigned long iipa;
++ unsigned long ifs;
++ unsigned long iim; // CR24
++ unsigned long iha;
++ unsigned long rsv4[38];
++ unsigned long lid; // CR64
++ unsigned long ivr;
++ unsigned long tpr;
++ unsigned long eoi;
++ unsigned long irr[4];
++ unsigned long itv; // CR72
++ unsigned long pmv;
++ unsigned long cmcv;
++ unsigned long rsv5[5];
++ unsigned long lrr0; // CR80
++ unsigned long lrr1;
++ unsigned long rsv6[46];
++ };
++};
++
++struct vcpu_guest_context_regs {
++ unsigned long r[32];
++ unsigned long b[8];
++ unsigned long bank[16];
++ unsigned long ip;
++ unsigned long psr;
++ unsigned long cfm;
++ unsigned long pr;
++ unsigned int nats; /* NaT bits for r1-r31. */
++ unsigned int bnats; /* Nat bits for banked registers. */
++ union vcpu_ar_regs ar;
++ union vcpu_cr_regs cr;
++ struct pt_fpreg f[128];
++ unsigned long dbr[8];
++ unsigned long ibr[8];
++ unsigned long rr[8];
++ unsigned long pkr[16];
++
++ /* FIXME: cpuid,pmd,pmc */
++
++ unsigned long xip;
++ unsigned long xpsr;
++ unsigned long xfs;
++ unsigned long xr[4];
++
++ struct vcpu_tr_regs tr;
++
++ /* Physical registers in case of debug event. */
++ unsigned long excp_iipa;
++ unsigned long excp_ifa;
++ unsigned long excp_isr;
++ unsigned int excp_vector;
++
++ /*
++ * The rbs is intended to be the image of the stacked registers still
++ * in the cpu (not yet stored in memory). It is laid out as if it
++ * were written in memory at a 512 (64*8) aligned address + offset.
++ * rbs_voff is (offset / 8). rbs_nat contains NaT bits for the
++ * remaining rbs registers. rbs_rnat contains NaT bits for in memory
++ * rbs registers.
++ * Note: loadrs is 2**14 bytes == 2**11 slots.
++ */
++ unsigned int rbs_voff;
++ unsigned long rbs[2048];
++ unsigned long rbs_rnat;
++
++ /*
++ * RSE.N_STACKED_PHYS via PAL_RSE_INFO
++ * Strictly this isn't cpu context, but this value is necessary
++ * for domain save/restore. So is here.
++ */
++ unsigned long num_phys_stacked;
+};
+
+struct vcpu_guest_context {
-+#define VGCF_EXTRA_REGS (1<<1) /* Get/Set extra regs. */
++#define VGCF_EXTRA_REGS (1UL << 1) /* Set extra regs. */
++#define VGCF_SET_CR_IRR (1UL << 2) /* Set cr_irr[0:3]. */
+ unsigned long flags; /* VGCF_* flags */
+
-+ struct cpu_user_regs user_regs;
-+ struct vcpu_extra_regs extra_regs;
++ struct vcpu_guest_context_regs regs;
++
++ unsigned long event_callback_ip;
++
++ /* xen doesn't share privregs pages with hvm domain so that this member
++ * doesn't make sense for hvm domain.
++ * ~0UL is already used for INVALID_P2M_ENTRY. */
++#define VGC_PRIVREGS_HVM (~(-2UL))
+ unsigned long privregs_pfn;
+};
+typedef struct vcpu_guest_context vcpu_guest_context_t;
@@ -96763,9 +127536,19 @@ 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
+
++/* get fpswa revision */
++#define IA64_DOM0VP_fpswa_revision 10
++
+/* Add an I/O port space range */
+#define IA64_DOM0VP_add_io_space 11
+
++/* expose the foreign domain's p2m table into privileged domain */
++#define IA64_DOM0VP_expose_foreign_p2m 12
++#define IA64_DOM0VP_EFP_ALLOC_PTE 0x1 /* allocate p2m table */
++
++/* unexpose the foreign domain's p2m table into privileged domain */
++#define IA64_DOM0VP_unexpose_foreign_p2m 13
++
+// flags for page assignement to pseudo physical address space
+#define _ASSIGN_readonly 0
+#define ASSIGN_readonly (1UL << _ASSIGN_readonly)
@@ -96840,19 +127623,61 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+#define HYPERPRIVOP_SET_EFLAG (HYPERPRIVOP_START + 0x16)
+#define HYPERPRIVOP_RSM_BE (HYPERPRIVOP_START + 0x17)
+#define HYPERPRIVOP_GET_PSR (HYPERPRIVOP_START + 0x18)
-+#define HYPERPRIVOP_MAX (0x19)
++#define HYPERPRIVOP_SET_RR0_TO_RR4 (HYPERPRIVOP_START + 0x19)
++#define HYPERPRIVOP_MAX (0x1a)
+
+/* Fast and light hypercalls. */
+#define __HYPERVISOR_ia64_fast_eoi __HYPERVISOR_arch_1
+
++/* Extra debug features. */
++#define __HYPERVISOR_ia64_debug_op __HYPERVISOR_arch_2
++
+/* Xencomm macros. */
+#define XENCOMM_INLINE_MASK 0xf800000000000000UL
+#define XENCOMM_INLINE_FLAG 0x8000000000000000UL
+
-+#define XENCOMM_IS_INLINE(addr) \
-+ (((unsigned long)(addr) & XENCOMM_INLINE_MASK) == XENCOMM_INLINE_FLAG)
-+#define XENCOMM_INLINE_ADDR(addr) \
-+ ((unsigned long)(addr) & ~XENCOMM_INLINE_MASK)
++#ifndef __ASSEMBLY__
++
++/*
++ * Optimization features.
++ * The hypervisor may do some special optimizations for guests. This hypercall
++ * can be used to switch on/of these special optimizations.
++ */
++#define __HYPERVISOR_opt_feature 0x700UL
++
++#define XEN_IA64_OPTF_OFF 0x0
++#define XEN_IA64_OPTF_ON 0x1
++
++/*
++ * If this feature is switched on, the hypervisor inserts the
++ * tlb entries without calling the guests traphandler.
++ * This is useful in guests using region 7 for identity mapping
++ * like the linux kernel does.
++ */
++#define XEN_IA64_OPTF_IDENT_MAP_REG7 1
++
++/* Identity mapping of region 4 addresses in HVM. */
++#define XEN_IA64_OPTF_IDENT_MAP_REG4 2
++
++/* Identity mapping of region 5 addresses in HVM. */
++#define XEN_IA64_OPTF_IDENT_MAP_REG5 3
++
++#define XEN_IA64_OPTF_IDENT_MAP_NOT_SET (0)
++
++struct xen_ia64_opt_feature {
++ unsigned long cmd; /* Which feature */
++ unsigned char on; /* Switch feature on/off */
++ union {
++ struct {
++ /* The page protection bit mask of the pte.
++ * This will be or'ed with the pte. */
++ unsigned long pgprot;
++ unsigned long key; /* A protection key for itir. */
++ };
++ };
++};
++
++#endif /* __ASSEMBLY__ */
+
+/* xen perfmon */
+#ifdef XEN
@@ -96883,10 +127708,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-ia64.h tmp-linux-2.6
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,125 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/arch-powerpc.h linux-2.6.18-xen-3.2.0/include/xen/interface/arch-powerpc.h
+--- linux-2.6.18.8/include/xen/interface/arch-powerpc.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/arch-powerpc.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,118 @@
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
@@ -96914,12 +127739,15 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-powerpc.h tmp-linux-
+#ifndef __XEN_PUBLIC_ARCH_PPC_64_H__
+#define __XEN_PUBLIC_ARCH_PPC_64_H__
+
-+#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
++#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
+ typedef struct { \
+ int __pad[(sizeof (long long) - sizeof (void *)) / sizeof (int)]; \
+ type *p; \
+ } __attribute__((__aligned__(8))) __guest_handle_ ## name
+
++#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
++ ___DEFINE_XEN_GUEST_HANDLE(name, type); \
++ ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
+#define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
+#define XEN_GUEST_HANDLE(name) __guest_handle_ ## name
+#define set_xen_guest_handle(hnd, val) \
@@ -96934,17 +127762,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-powerpc.h tmp-linux-
+#endif
+
+#ifndef __ASSEMBLY__
-+/* Guest handles for primitive C types. */
-+__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
-+__DEFINE_XEN_GUEST_HANDLE(uint, unsigned int);
-+__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
-+DEFINE_XEN_GUEST_HANDLE(char);
-+DEFINE_XEN_GUEST_HANDLE(int);
-+DEFINE_XEN_GUEST_HANDLE(long);
-+DEFINE_XEN_GUEST_HANDLE(void);
-+
+typedef unsigned long long xen_pfn_t;
-+DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
+#define PRI_xen_pfn "llx"
+#endif
+
@@ -97012,10 +127830,516 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-powerpc.h tmp-linux-
+#endif
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,184 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/arch-x86/cpuid.h linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86/cpuid.h
+--- linux-2.6.18.8/include/xen/interface/arch-x86/cpuid.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86/cpuid.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,68 @@
++/******************************************************************************
++ * arch-x86/cpuid.h
++ *
++ * CPUID interface to Xen.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to
++ * deal in the Software without restriction, including without limitation the
++ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ *
++ * Copyright (c) 2007 Citrix Systems, Inc.
++ *
++ * Authors:
++ * Keir Fraser <keir.fraser@citrix.com>
++ */
++
++#ifndef __XEN_PUBLIC_ARCH_X86_CPUID_H__
++#define __XEN_PUBLIC_ARCH_X86_CPUID_H__
++
++/* Xen identification leaves start at 0x40000000. */
++#define XEN_CPUID_FIRST_LEAF 0x40000000
++#define XEN_CPUID_LEAF(i) (XEN_CPUID_FIRST_LEAF + (i))
++
++/*
++ * Leaf 1 (0x40000000)
++ * EAX: Largest Xen-information leaf. All leaves up to an including @EAX
++ * are supported by the Xen host.
++ * EBX-EDX: "XenVMMXenVMM" signature, allowing positive identification
++ * of a Xen host.
++ */
++#define XEN_CPUID_SIGNATURE_EBX 0x566e6558 /* "XenV" */
++#define XEN_CPUID_SIGNATURE_ECX 0x65584d4d /* "MMXe" */
++#define XEN_CPUID_SIGNATURE_EDX 0x4d4d566e /* "nVMM" */
++
++/*
++ * Leaf 2 (0x40000001)
++ * EAX[31:16]: Xen major version.
++ * EAX[15: 0]: Xen minor version.
++ * EBX-EDX: Reserved (currently all zeroes).
++ */
++
++/*
++ * Leaf 3 (0x40000002)
++ * EAX: Number of hypercall transfer pages. This register is always guaranteed
++ * to specify one hypercall page.
++ * EBX: Base address of Xen-specific MSRs.
++ * ECX: Features 1. Unused bits are set to zero.
++ * EDX: Features 2. Unused bits are set to zero.
++ */
++
++/* Does the host support MMU_PT_UPDATE_PRESERVE_AD for this guest? */
++#define _XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD 0
++#define XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD (1u<<0)
++
++#endif /* __XEN_PUBLIC_ARCH_X86_CPUID_H__ */
+diff -rpuN linux-2.6.18.8/include/xen/interface/arch-x86/hvm/save.h linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86/hvm/save.h
+--- linux-2.6.18.8/include/xen/interface/arch-x86/hvm/save.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86/hvm/save.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,430 @@
++/*
++ * Structure definitions for HVM state that is held by Xen and must
++ * be saved along with the domain's memory and device-model state.
++ *
++ * Copyright (c) 2007 XenSource Ltd.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to
++ * deal in the Software without restriction, including without limitation the
++ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#ifndef __XEN_PUBLIC_HVM_SAVE_X86_H__
++#define __XEN_PUBLIC_HVM_SAVE_X86_H__
++
++/*
++ * Save/restore header: general info about the save file.
++ */
++
++#define HVM_FILE_MAGIC 0x54381286
++#define HVM_FILE_VERSION 0x00000001
++
++struct hvm_save_header {
++ uint32_t magic; /* Must be HVM_FILE_MAGIC */
++ uint32_t version; /* File format version */
++ uint64_t changeset; /* Version of Xen that saved this file */
++ uint32_t cpuid; /* CPUID[0x01][%eax] on the saving machine */
++ uint32_t pad0;
++};
++
++DECLARE_HVM_SAVE_TYPE(HEADER, 1, struct hvm_save_header);
++
++
++/*
++ * Processor
++ */
++
++struct hvm_hw_cpu {
++ uint8_t fpu_regs[512];
++
++ uint64_t rax;
++ uint64_t rbx;
++ uint64_t rcx;
++ uint64_t rdx;
++ uint64_t rbp;
++ uint64_t rsi;
++ uint64_t rdi;
++ uint64_t rsp;
++ uint64_t r8;
++ uint64_t r9;
++ uint64_t r10;
++ uint64_t r11;
++ uint64_t r12;
++ uint64_t r13;
++ uint64_t r14;
++ uint64_t r15;
++
++ uint64_t rip;
++ uint64_t rflags;
++
++ uint64_t cr0;
++ uint64_t cr2;
++ uint64_t cr3;
++ uint64_t cr4;
++
++ uint64_t dr0;
++ uint64_t dr1;
++ uint64_t dr2;
++ uint64_t dr3;
++ uint64_t dr6;
++ uint64_t dr7;
++
++ uint32_t cs_sel;
++ uint32_t ds_sel;
++ uint32_t es_sel;
++ uint32_t fs_sel;
++ uint32_t gs_sel;
++ uint32_t ss_sel;
++ uint32_t tr_sel;
++ uint32_t ldtr_sel;
++
++ uint32_t cs_limit;
++ uint32_t ds_limit;
++ uint32_t es_limit;
++ uint32_t fs_limit;
++ uint32_t gs_limit;
++ uint32_t ss_limit;
++ uint32_t tr_limit;
++ uint32_t ldtr_limit;
++ uint32_t idtr_limit;
++ uint32_t gdtr_limit;
++
++ uint64_t cs_base;
++ uint64_t ds_base;
++ uint64_t es_base;
++ uint64_t fs_base;
++ uint64_t gs_base;
++ uint64_t ss_base;
++ uint64_t tr_base;
++ uint64_t ldtr_base;
++ uint64_t idtr_base;
++ uint64_t gdtr_base;
++
++ uint32_t cs_arbytes;
++ uint32_t ds_arbytes;
++ uint32_t es_arbytes;
++ uint32_t fs_arbytes;
++ uint32_t gs_arbytes;
++ uint32_t ss_arbytes;
++ uint32_t tr_arbytes;
++ uint32_t ldtr_arbytes;
++
++ uint32_t sysenter_cs;
++ uint32_t padding0;
++
++ uint64_t sysenter_esp;
++ uint64_t sysenter_eip;
++
++ /* msr for em64t */
++ uint64_t shadow_gs;
++
++ /* msr content saved/restored. */
++ uint64_t msr_flags;
++ uint64_t msr_lstar;
++ uint64_t msr_star;
++ uint64_t msr_cstar;
++ uint64_t msr_syscall_mask;
++ uint64_t msr_efer;
++
++ /* guest's idea of what rdtsc() would return */
++ uint64_t tsc;
++
++ /* pending event, if any */
++ union {
++ uint32_t pending_event;
++ struct {
++ uint8_t pending_vector:8;
++ uint8_t pending_type:3;
++ uint8_t pending_error_valid:1;
++ uint32_t pending_reserved:19;
++ uint8_t pending_valid:1;
++ };
++ };
++ /* error code for pending event */
++ uint32_t error_code;
++};
++
++DECLARE_HVM_SAVE_TYPE(CPU, 2, struct hvm_hw_cpu);
++
++
++/*
++ * PIC
++ */
++
++struct hvm_hw_vpic {
++ /* IR line bitmasks. */
++ uint8_t irr;
++ uint8_t imr;
++ uint8_t isr;
++
++ /* Line IRx maps to IRQ irq_base+x */
++ uint8_t irq_base;
++
++ /*
++ * Where are we in ICW2-4 initialisation (0 means no init in progress)?
++ * Bits 0-1 (=x): Next write at A=1 sets ICW(x+1).
++ * Bit 2: ICW1.IC4 (1 == ICW4 included in init sequence)
++ * Bit 3: ICW1.SNGL (0 == ICW3 included in init sequence)
++ */
++ uint8_t init_state:4;
++
++ /* IR line with highest priority. */
++ uint8_t priority_add:4;
++
++ /* Reads from A=0 obtain ISR or IRR? */
++ uint8_t readsel_isr:1;
++
++ /* Reads perform a polling read? */
++ uint8_t poll:1;
++
++ /* Automatically clear IRQs from the ISR during INTA? */
++ uint8_t auto_eoi:1;
++
++ /* Automatically rotate IRQ priorities during AEOI? */
++ uint8_t rotate_on_auto_eoi:1;
++
++ /* Exclude slave inputs when considering in-service IRQs? */
++ uint8_t special_fully_nested_mode:1;
++
++ /* Special mask mode excludes masked IRs from AEOI and priority checks. */
++ uint8_t special_mask_mode:1;
++
++ /* Is this a master PIC or slave PIC? (NB. This is not programmable.) */
++ uint8_t is_master:1;
++
++ /* Edge/trigger selection. */
++ uint8_t elcr;
++
++ /* Virtual INT output. */
++ uint8_t int_output;
++};
++
++DECLARE_HVM_SAVE_TYPE(PIC, 3, struct hvm_hw_vpic);
++
++
++/*
++ * IO-APIC
++ */
++
++#ifdef __ia64__
++#define VIOAPIC_IS_IOSAPIC 1
++#define VIOAPIC_NUM_PINS 24
++#else
++#define VIOAPIC_NUM_PINS 48 /* 16 ISA IRQs, 32 non-legacy PCI IRQS. */
++#endif
++
++struct hvm_hw_vioapic {
++ uint64_t base_address;
++ uint32_t ioregsel;
++ uint32_t id;
++ union vioapic_redir_entry
++ {
++ uint64_t bits;
++ struct {
++ uint8_t vector;
++ uint8_t delivery_mode:3;
++ uint8_t dest_mode:1;
++ uint8_t delivery_status:1;
++ uint8_t polarity:1;
++ uint8_t remote_irr:1;
++ uint8_t trig_mode:1;
++ uint8_t mask:1;
++ uint8_t reserve:7;
++#if !VIOAPIC_IS_IOSAPIC
++ uint8_t reserved[4];
++ uint8_t dest_id;
++#else
++ uint8_t reserved[3];
++ uint16_t dest_id;
++#endif
++ } fields;
++ } redirtbl[VIOAPIC_NUM_PINS];
++};
++
++DECLARE_HVM_SAVE_TYPE(IOAPIC, 4, struct hvm_hw_vioapic);
++
++
++/*
++ * LAPIC
++ */
++
++struct hvm_hw_lapic {
++ uint64_t apic_base_msr;
++ uint32_t disabled; /* VLAPIC_xx_DISABLED */
++ uint32_t timer_divisor;
++};
++
++DECLARE_HVM_SAVE_TYPE(LAPIC, 5, struct hvm_hw_lapic);
++
++struct hvm_hw_lapic_regs {
++ /* A 4k page of register state */
++ uint8_t data[0x400];
++};
++
++DECLARE_HVM_SAVE_TYPE(LAPIC_REGS, 6, struct hvm_hw_lapic_regs);
++
++
++/*
++ * IRQs
++ */
++
++struct hvm_hw_pci_irqs {
++ /*
++ * Virtual interrupt wires for a single PCI bus.
++ * Indexed by: device*4 + INTx#.
++ */
++ union {
++ DECLARE_BITMAP(i, 32*4);
++ uint64_t pad[2];
++ };
++};
++
++DECLARE_HVM_SAVE_TYPE(PCI_IRQ, 7, struct hvm_hw_pci_irqs);
++
++struct hvm_hw_isa_irqs {
++ /*
++ * Virtual interrupt wires for ISA devices.
++ * Indexed by ISA IRQ (assumes no ISA-device IRQ sharing).
++ */
++ union {
++ DECLARE_BITMAP(i, 16);
++ uint64_t pad[1];
++ };
++};
++
++DECLARE_HVM_SAVE_TYPE(ISA_IRQ, 8, struct hvm_hw_isa_irqs);
++
++struct hvm_hw_pci_link {
++ /*
++ * PCI-ISA interrupt router.
++ * Each PCI <device:INTx#> is 'wire-ORed' into one of four links using
++ * the traditional 'barber's pole' mapping ((device + INTx#) & 3).
++ * The router provides a programmable mapping from each link to a GSI.
++ */
++ uint8_t route[4];
++ uint8_t pad0[4];
++};
++
++DECLARE_HVM_SAVE_TYPE(PCI_LINK, 9, struct hvm_hw_pci_link);
++
++/*
++ * PIT
++ */
++
++struct hvm_hw_pit {
++ struct hvm_hw_pit_channel {
++ uint32_t count; /* can be 65536 */
++ uint16_t latched_count;
++ uint8_t count_latched;
++ uint8_t status_latched;
++ uint8_t status;
++ uint8_t read_state;
++ uint8_t write_state;
++ uint8_t write_latch;
++ uint8_t rw_mode;
++ uint8_t mode;
++ uint8_t bcd; /* not supported */
++ uint8_t gate; /* timer start */
++ } channels[3]; /* 3 x 16 bytes */
++ uint32_t speaker_data_on;
++ uint32_t pad0;
++};
++
++DECLARE_HVM_SAVE_TYPE(PIT, 10, struct hvm_hw_pit);
++
++
++/*
++ * RTC
++ */
++
++#define RTC_CMOS_SIZE 14
++struct hvm_hw_rtc {
++ /* CMOS bytes */
++ uint8_t cmos_data[RTC_CMOS_SIZE];
++ /* Index register for 2-part operations */
++ uint8_t cmos_index;
++ uint8_t pad0;
++};
++
++DECLARE_HVM_SAVE_TYPE(RTC, 11, struct hvm_hw_rtc);
++
++
++/*
++ * HPET
++ */
++
++#define HPET_TIMER_NUM 3 /* 3 timers supported now */
++struct hvm_hw_hpet {
++ /* Memory-mapped, software visible registers */
++ uint64_t capability; /* capabilities */
++ uint64_t res0; /* reserved */
++ uint64_t config; /* configuration */
++ uint64_t res1; /* reserved */
++ uint64_t isr; /* interrupt status reg */
++ uint64_t res2[25]; /* reserved */
++ uint64_t mc64; /* main counter */
++ uint64_t res3; /* reserved */
++ struct { /* timers */
++ uint64_t config; /* configuration/cap */
++ uint64_t cmp; /* comparator */
++ uint64_t fsb; /* FSB route, not supported now */
++ uint64_t res4; /* reserved */
++ } timers[HPET_TIMER_NUM];
++ uint64_t res5[4*(24-HPET_TIMER_NUM)]; /* reserved, up to 0x3ff */
++
++ /* Hidden register state */
++ uint64_t period[HPET_TIMER_NUM]; /* Last value written to comparator */
++};
++
++DECLARE_HVM_SAVE_TYPE(HPET, 12, struct hvm_hw_hpet);
++
++
++/*
++ * PM timer
++ */
++
++struct hvm_hw_pmtimer {
++ uint32_t tmr_val; /* PM_TMR_BLK.TMR_VAL: 32bit free-running counter */
++ uint16_t pm1a_sts; /* PM1a_EVT_BLK.PM1a_STS: status register */
++ uint16_t pm1a_en; /* PM1a_EVT_BLK.PM1a_EN: enable register */
++};
++
++DECLARE_HVM_SAVE_TYPE(PMTIMER, 13, struct hvm_hw_pmtimer);
++
++/*
++ * MTRR MSRs
++ */
++
++struct hvm_hw_mtrr {
++#define MTRR_VCNT 8
++#define NUM_FIXED_MSR 11
++ uint64_t msr_pat_cr;
++ /* mtrr physbase & physmask msr pair*/
++ uint64_t msr_mtrr_var[MTRR_VCNT*2];
++ uint64_t msr_mtrr_fixed[NUM_FIXED_MSR];
++ uint64_t msr_mtrr_cap;
++ uint64_t msr_mtrr_def_type;
++};
++
++DECLARE_HVM_SAVE_TYPE(MTRR, 14, struct hvm_hw_mtrr);
++
++/*
++ * Largest type-code in use
++ */
++#define HVM_SAVE_CODE_MAX 14
++
++#endif /* __XEN_PUBLIC_HVM_SAVE_X86_H__ */
+diff -rpuN linux-2.6.18.8/include/xen/interface/arch-x86/xen-x86_32.h linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86/xen-x86_32.h
+--- linux-2.6.18.8/include/xen/interface/arch-x86/xen-x86_32.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86/xen-x86_32.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,185 @@
+/******************************************************************************
+ * xen-x86_32.h
+ *
@@ -97125,8 +128449,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen-x86_32.h tmp
+
+/* 32-/64-bit invariability for control interfaces (domctl/sysctl). */
+#if defined(__XEN__) || defined(__XEN_TOOLS__)
-+#undef __DEFINE_XEN_GUEST_HANDLE
-+#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
++#undef ___DEFINE_XEN_GUEST_HANDLE
++#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
+ typedef struct { type *p; } \
+ __guest_handle_ ## name; \
+ typedef struct { union { type *p; uint64_aligned_t q; }; } \
@@ -97137,7 +128461,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen-x86_32.h tmp
+ (hnd).p = val; \
+ } while ( 0 )
+#define uint64_aligned_t uint64_t __attribute__((aligned(8)))
-+#define XEN_GUEST_HANDLE_64(name) __guest_handle_64_ ## name
++#define __XEN_GUEST_HANDLE_64(name) __guest_handle_64_ ## name
++#define XEN_GUEST_HANDLE_64(name) __XEN_GUEST_HANDLE_64(name)
+#endif
+
+#ifndef __ASSEMBLY__
@@ -97200,9 +128525,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen-x86_32.h tmp
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/arch-x86/xen-x86_64.h linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86/xen-x86_64.h
+--- linux-2.6.18.8/include/xen/interface/arch-x86/xen-x86_64.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86/xen-x86_64.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,211 @@
+/******************************************************************************
+ * xen-x86_64.h
@@ -97415,10 +128740,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen-x86_64.h tmp
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,205 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/arch-x86/xen.h linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86/xen.h
+--- linux-2.6.18.8/include/xen/interface/arch-x86/xen.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86/xen.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,198 @@
+/******************************************************************************
+ * arch-x86/xen.h
+ *
@@ -97450,13 +128775,16 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen.h tmp-linux-
+
+/* Structural guest handles introduced in 0x00030201. */
+#if __XEN_INTERFACE_VERSION__ >= 0x00030201
-+#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
++#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
+ typedef struct { type *p; } __guest_handle_ ## name
+#else
-+#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
++#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
+ typedef type * __guest_handle_ ## name
+#endif
+
++#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
++ ___DEFINE_XEN_GUEST_HANDLE(name, type); \
++ ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
+#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) __XEN_GUEST_HANDLE(name)
@@ -97472,17 +128800,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen.h tmp-linux-
+#endif
+
+#ifndef __ASSEMBLY__
-+/* Guest handles for primitive C types. */
-+__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
-+__DEFINE_XEN_GUEST_HANDLE(uint, unsigned int);
-+__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
-+DEFINE_XEN_GUEST_HANDLE(char);
-+DEFINE_XEN_GUEST_HANDLE(int);
-+DEFINE_XEN_GUEST_HANDLE(long);
-+DEFINE_XEN_GUEST_HANDLE(void);
-+
+typedef unsigned long xen_pfn_t;
-+DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
+#define PRI_xen_pfn "lx"
+#endif
+
@@ -97624,9 +128942,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/arch-x86/xen.h tmp-linux-
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/arch-x86_32.h linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86_32.h
+--- linux-2.6.18.8/include/xen/interface/arch-x86_32.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86_32.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,27 @@
+/******************************************************************************
+ * arch-x86_32.h
@@ -97655,9 +128973,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/arch-x86_64.h linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86_64.h
+--- linux-2.6.18.8/include/xen/interface/arch-x86_64.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/arch-x86_64.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,27 @@
+/******************************************************************************
+ * arch-x86_64.h
@@ -97686,10 +129004,10 @@ 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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,92 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/callback.h linux-2.6.18-xen-3.2.0/include/xen/interface/callback.h
+--- linux-2.6.18.8/include/xen/interface/callback.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/callback.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,121 @@
+/******************************************************************************
+ * callback.h
+ *
@@ -97728,17 +129046,41 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/callback.h tmp-linux-2.6-
+ * @extra_args == Operation-specific extra arguments (NULL if none).
+ */
+
++/* ia64, x86: Callback for event delivery. */
+#define CALLBACKTYPE_event 0
++
++/* x86: Failsafe callback when guest state cannot be restored by Xen. */
+#define CALLBACKTYPE_failsafe 1
-+#define CALLBACKTYPE_syscall 2 /* x86_64 only */
++
++/* x86/64 hypervisor: Syscall by 64-bit guest app ('64-on-64-on-64'). */
++#define CALLBACKTYPE_syscall 2
++
+/*
-+ * sysenter is only available on x86_32 with the
-+ * supervisor_mode_kernel option enabled.
++ * x86/32 hypervisor: Only available on x86/32 when supervisor_mode_kernel
++ * feature is enabled. Do not use this callback type in new code.
+ */
-+#define CALLBACKTYPE_sysenter 3
++#define CALLBACKTYPE_sysenter_deprecated 3
++
++/* x86: Callback for NMI delivery. */
+#define CALLBACKTYPE_nmi 4
+
+/*
++ * x86: sysenter is only available as follows:
++ * - 32-bit hypervisor: with the supervisor_mode_kernel feature enabled
++ * - 64-bit hypervisor: 32-bit guest applications on Intel CPUs
++ * ('32-on-32-on-64', '32-on-64-on-64')
++ * [nb. also 64-bit guest applications on Intel CPUs
++ * ('64-on-64-on-64'), but syscall is preferred]
++ */
++#define CALLBACKTYPE_sysenter 5
++
++/*
++ * x86/64 hypervisor: Syscall by 32-bit guest app on AMD CPUs
++ * ('32-on-32-on-64', '32-on-64-on-64')
++ */
++#define CALLBACKTYPE_syscall32 7
++
++/*
+ * Disable event deliver during callback? This flag is ignored for event and
+ * NMI callbacks: event delivery is unconditionally disabled.
+ */
@@ -97771,6 +129113,11 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/callback.h tmp-linux-2.6-
+typedef struct callback_unregister callback_unregister_t;
+DEFINE_XEN_GUEST_HANDLE(callback_unregister_t);
+
++#if __XEN_INTERFACE_VERSION__ < 0x00030207
++#undef CALLBACKTYPE_sysenter
++#define CALLBACKTYPE_sysenter CALLBACKTYPE_sysenter_deprecated
++#endif
++
+#endif /* __XEN_PUBLIC_CALLBACK_H__ */
+
+/*
@@ -97782,9 +129129,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/callback.h tmp-linux-2.6-
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/dom0_ops.h linux-2.6.18-xen-3.2.0/include/xen/interface/dom0_ops.h
+--- linux-2.6.18.8/include/xen/interface/dom0_ops.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/dom0_ops.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,120 @@
+/******************************************************************************
+ * dom0_ops.h
@@ -97906,10 +129253,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/dom0_ops.h tmp-linux-2.6-
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,481 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/domctl.h linux-2.6.18-xen-3.2.0/include/xen/interface/domctl.h
+--- linux-2.6.18.8/include/xen/interface/domctl.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/domctl.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,609 @@
+/******************************************************************************
+ * domctl.h
+ *
@@ -97949,7 +129296,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/domctl.h tmp-linux-2.6-xe
+#define XEN_DOMCTL_INTERFACE_VERSION 0x00000005
+
+struct xenctl_cpumap {
-+ XEN_GUEST_HANDLE_64(uint8_t) bitmap;
++ XEN_GUEST_HANDLE_64(uint8) bitmap;
+ uint32_t nr_cpus;
+};
+
@@ -98027,7 +129374,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/domctl.h tmp-linux-2.6-xe
+ uint64_aligned_t max_pfns;
+ /* Start index in guest's page list. */
+ uint64_aligned_t start_pfn;
-+ XEN_GUEST_HANDLE_64(uint64_t) buffer;
++ XEN_GUEST_HANDLE_64(uint64) buffer;
+ /* OUT variables. */
+ uint64_aligned_t num_pfns;
+};
@@ -98064,7 +129411,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/domctl.h tmp-linux-2.6-xe
+ /* IN variables. */
+ uint64_aligned_t num;
+ /* IN/OUT variables. */
-+ XEN_GUEST_HANDLE_64(uint32_t) array;
++ XEN_GUEST_HANDLE_64(uint32) array;
+};
+typedef struct xen_domctl_getpageframeinfo2 xen_domctl_getpageframeinfo2_t;
+DEFINE_XEN_GUEST_HANDLE(xen_domctl_getpageframeinfo2_t);
@@ -98138,7 +129485,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/domctl.h tmp-linux-2.6-xe
+ uint32_t mb; /* Shadow memory allocation in MB */
+
+ /* OP_PEEK / OP_CLEAN */
-+ XEN_GUEST_HANDLE_64(uint8_t) dirty_bitmap;
++ XEN_GUEST_HANDLE_64(uint8) dirty_bitmap;
+ uint64_aligned_t pages; /* Size of buffer. Updated with actual size. */
+ struct xen_domctl_shadow_op_stats stats;
+};
@@ -98292,6 +129639,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/domctl.h tmp-linux-2.6-xe
+ uint64_aligned_t maxmem; /* Highest memory address for MDT. */
+ uint64_aligned_t xsi_va; /* Xen shared_info area virtual address. */
+ uint32_t hypercall_imm; /* Break imm for Xen hypercalls. */
++ int8_t vhpt_size_log2; /* Log2 of VHPT size. */
+#endif
+} xen_domctl_arch_setup_t;
+DEFINE_XEN_GUEST_HANDLE(xen_domctl_arch_setup_t);
@@ -98309,10 +129657,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/domctl.h tmp-linux-2.6-xe
+#define XEN_DOMCTL_sethvmcontext 34
+typedef struct xen_domctl_hvmcontext {
+ uint32_t size; /* IN/OUT: size of buffer / bytes filled */
-+ XEN_GUEST_HANDLE_64(uint8_t) buffer; /* IN/OUT: data, or call
-+ * gethvmcontext with NULL
-+ * buffer to get size
-+ * req'd */
++ XEN_GUEST_HANDLE_64(uint8) buffer; /* IN/OUT: data, or call
++ * gethvmcontext with NULL
++ * buffer to get size req'd */
+} xen_domctl_hvmcontext_t;
+DEFINE_XEN_GUEST_HANDLE(xen_domctl_hvmcontext_t);
+
@@ -98344,7 +129691,128 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/domctl.h tmp-linux-2.6-xe
+typedef struct xen_domctl_sendtrigger xen_domctl_sendtrigger_t;
+DEFINE_XEN_GUEST_HANDLE(xen_domctl_sendtrigger_t);
+
-+
++
++/* Assign PCI device to HVM guest. Sets up IOMMU structures. */
++#define XEN_DOMCTL_assign_device 37
++#define XEN_DOMCTL_test_assign_device 45
++struct xen_domctl_assign_device {
++ uint32_t machine_bdf; /* machine PCI ID of assigned device */
++};
++typedef struct xen_domctl_assign_device xen_domctl_assign_device_t;
++DEFINE_XEN_GUEST_HANDLE(xen_domctl_assign_device_t);
++
++
++/* Pass-through interrupts: bind real irq -> hvm devfn. */
++#define XEN_DOMCTL_bind_pt_irq 38
++typedef enum pt_irq_type_e {
++ PT_IRQ_TYPE_PCI,
++ PT_IRQ_TYPE_ISA
++} pt_irq_type_t;
++struct xen_domctl_bind_pt_irq {
++ uint32_t machine_irq;
++ pt_irq_type_t irq_type;
++ uint32_t hvm_domid;
++
++ union {
++ struct {
++ uint8_t isa_irq;
++ } isa;
++ struct {
++ uint8_t bus;
++ uint8_t device;
++ uint8_t intx;
++ } pci;
++ } u;
++};
++typedef struct xen_domctl_bind_pt_irq xen_domctl_bind_pt_irq_t;
++DEFINE_XEN_GUEST_HANDLE(xen_domctl_bind_pt_irq_t);
++
++
++/* Bind machine I/O address range -> HVM address range. */
++#define XEN_DOMCTL_memory_mapping 39
++#define DPCI_ADD_MAPPING 1
++#define DPCI_REMOVE_MAPPING 0
++struct xen_domctl_memory_mapping {
++ uint64_aligned_t first_gfn; /* first page (hvm guest phys page) in range */
++ uint64_aligned_t first_mfn; /* first page (machine page) in range */
++ uint64_aligned_t nr_mfns; /* number of pages in range (>0) */
++ uint32_t add_mapping; /* add or remove mapping */
++ uint32_t padding; /* padding for 64-bit aligned structure */
++};
++typedef struct xen_domctl_memory_mapping xen_domctl_memory_mapping_t;
++DEFINE_XEN_GUEST_HANDLE(xen_domctl_memory_mapping_t);
++
++
++/* Bind machine I/O port range -> HVM I/O port range. */
++#define XEN_DOMCTL_ioport_mapping 40
++struct xen_domctl_ioport_mapping {
++ uint32_t first_gport; /* first guest IO port*/
++ uint32_t first_mport; /* first machine IO port */
++ uint32_t nr_ports; /* size of port range */
++ uint32_t add_mapping; /* add or remove mapping */
++};
++typedef struct xen_domctl_ioport_mapping xen_domctl_ioport_mapping_t;
++DEFINE_XEN_GUEST_HANDLE(xen_domctl_ioport_mapping_t);
++
++
++/*
++ * Pin caching type of RAM space for x86 HVM domU.
++ */
++#define XEN_DOMCTL_pin_mem_cacheattr 41
++/* Caching types: these happen to be the same as x86 MTRR/PAT type codes. */
++#define XEN_DOMCTL_MEM_CACHEATTR_UC 0
++#define XEN_DOMCTL_MEM_CACHEATTR_WC 1
++#define XEN_DOMCTL_MEM_CACHEATTR_WT 4
++#define XEN_DOMCTL_MEM_CACHEATTR_WP 5
++#define XEN_DOMCTL_MEM_CACHEATTR_WB 6
++#define XEN_DOMCTL_MEM_CACHEATTR_UCM 7
++struct xen_domctl_pin_mem_cacheattr {
++ uint64_aligned_t start, end;
++ unsigned int type; /* XEN_DOMCTL_MEM_CACHEATTR_* */
++};
++typedef struct xen_domctl_pin_mem_cacheattr xen_domctl_pin_mem_cacheattr_t;
++DEFINE_XEN_GUEST_HANDLE(xen_domctl_pin_mem_cacheattr_t);
++
++
++#define XEN_DOMCTL_set_ext_vcpucontext 42
++#define XEN_DOMCTL_get_ext_vcpucontext 43
++struct xen_domctl_ext_vcpucontext {
++ /* IN: VCPU that this call applies to. */
++ uint32_t vcpu;
++ /*
++ * SET: Size of struct (IN)
++ * GET: Size of struct (OUT)
++ */
++ uint32_t size;
++#if defined(__i386__) || defined(__x86_64__)
++ /* SYSCALL from 32-bit mode and SYSENTER callback information. */
++ /* NB. SYSCALL from 64-bit mode is contained in vcpu_guest_context_t */
++ uint64_aligned_t syscall32_callback_eip;
++ uint64_aligned_t sysenter_callback_eip;
++ uint16_t syscall32_callback_cs;
++ uint16_t sysenter_callback_cs;
++ uint8_t syscall32_disables_events;
++ uint8_t sysenter_disables_events;
++#endif
++};
++typedef struct xen_domctl_ext_vcpucontext xen_domctl_ext_vcpucontext_t;
++DEFINE_XEN_GUEST_HANDLE(xen_domctl_ext_vcpucontext_t);
++
++/*
++ * Set optimizaton features for a domain
++ */
++#define XEN_DOMCTL_set_opt_feature 44
++struct xen_domctl_set_opt_feature {
++#if defined(__ia64__)
++ struct xen_ia64_opt_feature optf;
++#else
++ /* Make struct non-empty: do not depend on this field name! */
++ uint64_t dummy;
++#endif
++};
++typedef struct xen_domctl_set_opt_feature xen_domctl_set_opt_feature_t;
++DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_opt_feature_t);
++
+struct xen_domctl {
+ uint32_t cmd;
+ uint32_t interface_version; /* XEN_DOMCTL_INTERFACE_VERSION */
@@ -98374,6 +129842,13 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/domctl.h tmp-linux-2.6-xe
+ struct xen_domctl_hvmcontext hvmcontext;
+ struct xen_domctl_address_size address_size;
+ struct xen_domctl_sendtrigger sendtrigger;
++ struct xen_domctl_assign_device assign_device;
++ struct xen_domctl_bind_pt_irq bind_pt_irq;
++ struct xen_domctl_memory_mapping memory_mapping;
++ struct xen_domctl_ioport_mapping ioport_mapping;
++ struct xen_domctl_pin_mem_cacheattr pin_mem_cacheattr;
++ struct xen_domctl_ext_vcpucontext ext_vcpucontext;
++ struct xen_domctl_set_opt_feature set_opt_feature;
+ uint8_t pad[128];
+ } u;
+};
@@ -98391,9 +129866,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/domctl.h tmp-linux-2.6-xe
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/elfnote.h linux-2.6.18-xen-3.2.0/include/xen/interface/elfnote.h
+--- linux-2.6.18.8/include/xen/interface/elfnote.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/elfnote.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,233 @@
+/******************************************************************************
+ * elfnote.h
@@ -98628,9 +130103,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/elfnote.h tmp-linux-2.6-x
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/elfstructs.h linux-2.6.18-xen-3.2.0/include/xen/interface/elfstructs.h
+--- linux-2.6.18.8/include/xen/interface/elfstructs.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/elfstructs.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,527 @@
+#ifndef __XEN_PUBLIC_ELFSTRUCTS_H__
+#define __XEN_PUBLIC_ELFSTRUCTS_H__ 1
@@ -99159,9 +130634,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/elfstructs.h tmp-linux-2.
+#endif
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/event_channel.h linux-2.6.18-xen-3.2.0/include/xen/interface/event_channel.h
+--- linux-2.6.18.8/include/xen/interface/event_channel.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/event_channel.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,264 @@
+/******************************************************************************
+ * event_channel.h
@@ -99427,10 +130902,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/event_channel.h tmp-linux
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,71 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/features.h linux-2.6.18-xen-3.2.0/include/xen/interface/features.h
+--- linux-2.6.18.8/include/xen/interface/features.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/features.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,74 @@
+/******************************************************************************
+ * features.h
+ *
@@ -99489,6 +130964,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/features.h tmp-linux-2.6-
+ */
+#define XENFEAT_pae_pgdir_above_4gb 4
+
++/* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */
++#define XENFEAT_mmu_pt_update_preserve_ad 5
++
+#define XENFEAT_NR_SUBMAPS 1
+
+#endif /* __XEN_PUBLIC_FEATURES_H__ */
@@ -99502,9 +130980,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/features.h tmp-linux-2.6-
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/foreign/Makefile linux-2.6.18-xen-3.2.0/include/xen/interface/foreign/Makefile
+--- linux-2.6.18.8/include/xen/interface/foreign/Makefile 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/foreign/Makefile 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,37 @@
+XEN_ROOT=../../../..
+include $(XEN_ROOT)/Config.mk
@@ -99543,9 +131021,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/Makefile tmp-linu
+
+checker.c: $(scripts)
+ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/foreign/mkchecker.py linux-2.6.18-xen-3.2.0/include/xen/interface/foreign/mkchecker.py
+--- linux-2.6.18.8/include/xen/interface/foreign/mkchecker.py 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/foreign/mkchecker.py 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,58 @@
+#!/usr/bin/python
+
@@ -99578,14 +131056,14 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/mkchecker.py tmp-
+f.write('int main(int argc, char *argv[])\n{\n');
+
+f.write('\tprintf("\\n");');
-+f.write('printf("%-20s |", "structs");\n');
++f.write('printf("%-25s |", "structs");\n');
+for a in archs:
+ f.write('\tprintf("%%8s", "%s");\n' % a);
+f.write('\tprintf("\\n");');
+
+f.write('\tprintf("\\n");');
+for struct in structs:
-+ f.write('\tprintf("%%-20s |", "%s");\n' % struct);
++ f.write('\tprintf("%%-25s |", "%s");\n' % struct);
+ for a in archs:
+ if a == arch:
+ s = struct; # native
@@ -99605,14 +131083,14 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/mkchecker.py tmp-
+
+f.close();
+
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,153 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/foreign/mkheader.py linux-2.6.18-xen-3.2.0/include/xen/interface/foreign/mkheader.py
+--- linux-2.6.18.8/include/xen/interface/foreign/mkheader.py 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/foreign/mkheader.py 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,167 @@
+#!/usr/bin/python
+
+import sys, re;
-+from structs import structs, defines;
++from structs import unions, structs, defines;
+
+# command line arguments
+arch = sys.argv[1];
@@ -99721,6 +131199,16 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/mkheader.py tmp-l
+input = re.compile("/\*(.*?)\*/", re.S).sub("", input)
+input = re.compile("\n\s*\n", re.S).sub("\n", input);
+
++# add unions to output
++for union in unions:
++ regex = "union\s+%s\s*\{(.*?)\n\};" % union;
++ match = re.search(regex, input, re.S)
++ if None == match:
++ output += "#define %s_has_no_%s 1\n" % (arch, union);
++ else:
++ output += "union %s_%s {%s\n};\n" % (union, arch, match.group(1));
++ output += "\n";
++
+# add structs to output
+for struct in structs:
+ regex = "struct\s+%s\s*\{(.*?)\n\};" % struct;
@@ -99746,6 +131234,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/mkheader.py tmp-l
+ replace = define + "_" + arch;
+ output = re.sub("\\b%s\\b" % define, replace, output);
+
++# replace: unions
++for union in unions:
++ output = re.sub("\\b(union\s+%s)\\b" % union, "\\1_%s" % arch, output);
++
+# replace: structs + struct typedefs
+for struct in structs:
+ output = re.sub("\\b(struct\s+%s)\\b" % struct, "\\1_%s" % arch, output);
@@ -99762,40 +131254,45 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/mkheader.py tmp-l
+f.write(output);
+f.close;
+
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,17 @@
-+
-+structs | x86_32 x86_64 ia64
-+
-+start_info | 1104 1152 1152
-+trap_info | 8 16 -
-+pt_fpreg | - - 16
-+cpu_user_regs | 68 200 496
-+xen_ia64_boot_param | - - 96
-+ia64_tr_entry | - - 32
-+vcpu_extra_regs | - - 536
-+vcpu_guest_context | 2800 5168 1056
-+arch_vcpu_info | 24 16 0
-+vcpu_time_info | 32 32 32
-+vcpu_info | 64 64 48
-+arch_shared_info | 268 280 272
-+shared_info | 2584 3368 4384
-+
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,54 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/foreign/reference.size linux-2.6.18-xen-3.2.0/include/xen/interface/foreign/reference.size
+--- linux-2.6.18.8/include/xen/interface/foreign/reference.size 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/foreign/reference.size 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,18 @@
++
++structs | x86_32 x86_64 ia64
++
++start_info | 1104 1152 1152
++trap_info | 8 16 -
++pt_fpreg | - - 16
++cpu_user_regs | 68 200 -
++xen_ia64_boot_param | - - 96
++ia64_tr_entry | - - 32
++vcpu_tr_regs | - - 768
++vcpu_guest_context_regs | - - 22176
++vcpu_guest_context | 2800 5168 22208
++arch_vcpu_info | 24 16 0
++vcpu_time_info | 32 32 32
++vcpu_info | 64 64 48
++arch_shared_info | 268 280 272
++shared_info | 2584 3368 4384
++
+diff -rpuN linux-2.6.18.8/include/xen/interface/foreign/structs.py linux-2.6.18-xen-3.2.0/include/xen/interface/foreign/structs.py
+--- linux-2.6.18.8/include/xen/interface/foreign/structs.py 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/foreign/structs.py 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,58 @@
+# configuration: what needs translation
+
++unions = [ "vcpu_cr_regs",
++ "vcpu_ar_regs" ];
++
+structs = [ "start_info",
+ "trap_info",
+ "pt_fpreg",
+ "cpu_user_regs",
+ "xen_ia64_boot_param",
+ "ia64_tr_entry",
-+ "vcpu_extra_regs",
++ "vcpu_tr_regs",
++ "vcpu_guest_context_regs",
+ "vcpu_guest_context",
+ "arch_vcpu_info",
+ "vcpu_time_info",
@@ -99841,10 +131338,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/foreign/structs.py tmp-li
+ "MAX_VIRT_CPUS",
+ "MAX_GUEST_CMDLINE" ];
+
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,399 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/grant_table.h linux-2.6.18-xen-3.2.0/include/xen/interface/grant_table.h
+--- linux-2.6.18.8/include/xen/interface/grant_table.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/grant_table.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,431 @@
+/******************************************************************************
+ * grant_table.h
+ *
@@ -99966,6 +131463,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/grant_table.h tmp-linux-2
+ * GTF_readonly: Restrict @domid to read-only mappings and accesses. [GST]
+ * GTF_reading: Grant entry is currently mapped for reading by @domid. [XEN]
+ * GTF_writing: Grant entry is currently mapped for writing by @domid. [XEN]
++ * GTF_PAT, GTF_PWT, GTF_PCD: (x86) cache attribute flags for the grant [GST]
+ */
+#define _GTF_readonly (2)
+#define GTF_readonly (1U<<_GTF_readonly)
@@ -99973,6 +131471,12 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/grant_table.h tmp-linux-2
+#define GTF_reading (1U<<_GTF_reading)
+#define _GTF_writing (4)
+#define GTF_writing (1U<<_GTF_writing)
++#define _GTF_PWT (5)
++#define GTF_PWT (1U<<_GTF_PWT)
++#define _GTF_PCD (6)
++#define GTF_PCD (1U<<_GTF_PCD)
++#define _GTF_PAT (7)
++#define GTF_PAT (1U<<_GTF_PAT)
+
+/*
+ * Subflags for GTF_accept_transfer:
@@ -100175,6 +131679,29 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/grant_table.h tmp-linux-2
+typedef struct gnttab_query_size gnttab_query_size_t;
+DEFINE_XEN_GUEST_HANDLE(gnttab_query_size_t);
+
++/*
++ * GNTTABOP_unmap_and_replace: Destroy one or more grant-reference mappings
++ * tracked by <handle> but atomically replace the page table entry with one
++ * pointing to the machine address under <new_addr>. <new_addr> will be
++ * redirected to the null entry.
++ * NOTES:
++ * 1. The call may fail in an undefined manner if either mapping is not
++ * tracked by <handle>.
++ * 2. After executing a batch of unmaps, it is guaranteed that no stale
++ * mappings will remain in the device or host TLBs.
++ */
++#define GNTTABOP_unmap_and_replace 7
++struct gnttab_unmap_and_replace {
++ /* IN parameters. */
++ uint64_t host_addr;
++ uint64_t new_addr;
++ grant_handle_t handle;
++ /* OUT parameters. */
++ int16_t status; /* GNTST_* */
++};
++typedef struct gnttab_unmap_and_replace gnttab_unmap_and_replace_t;
++DEFINE_XEN_GUEST_HANDLE(gnttab_unmap_and_replace_t);
++
+
+/*
+ * Bitfield values for update_pin_status.flags.
@@ -100217,7 +131744,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/grant_table.h tmp-linux-2
+#define GNTST_no_device_space (-7) /* Out of space in I/O MMU. */
+#define GNTST_permission_denied (-8) /* Not enough privilege for operation. */
+#define GNTST_bad_page (-9) /* Specified page was invalid for op. */
-+#define GNTST_bad_copy_arg (-10) /* copy arguments cross page boundary */
++#define GNTST_bad_copy_arg (-10) /* copy arguments cross page boundary. */
++#define GNTST_address_too_big (-11) /* transfer page address too large. */
+
+#define GNTTABOP_error_msgs { \
+ "okay", \
@@ -100230,7 +131758,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/grant_table.h tmp-linux-2
+ "no spare translation slot in the I/O MMU", \
+ "permission denied", \
+ "bad page", \
-+ "copy arguments cross page boundary" \
++ "copy arguments cross page boundary", \
++ "page address size too large" \
+}
+
+#endif /* __XEN_PUBLIC_GRANT_TABLE_H__ */
@@ -100244,9 +131773,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/grant_table.h tmp-linux-2
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/hvm/e820.h linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/e820.h
+--- linux-2.6.18.8/include/xen/interface/hvm/e820.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/e820.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,34 @@
+
+/*
@@ -100282,9 +131811,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/e820.h tmp-linux-2.6-
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/hvm/hvm_info_table.h linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/hvm_info_table.h
+--- linux-2.6.18.8/include/xen/interface/hvm/hvm_info_table.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/hvm_info_table.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * hvm/hvm_info_table.h
@@ -100327,9 +131856,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/hvm/hvm_op.h linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/hvm_op.h
+--- linux-2.6.18.8/include/xen/interface/hvm/hvm_op.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/hvm_op.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,76 @@
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -100407,10 +131936,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/hvm_op.h tmp-linux-2.
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,122 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/hvm/ioreq.h linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/ioreq.h
+--- linux-2.6.18.8/include/xen/interface/hvm/ioreq.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/ioreq.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,133 @@
+/*
+ * ioreq.h: I/O request definitions for device models
+ * Copyright (c) 2004, Intel Corporation.
@@ -100471,6 +132000,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/ioreq.h tmp-linux-2.6
+ * of the real data to use. */
+ uint8_t dir:1; /* 1=read, 0=write */
+ uint8_t df:1;
++ uint8_t pad:1;
+ uint8_t type; /* I/O type */
+ uint8_t _pad0[6];
+ uint64_t io_count; /* How many IO done on a vcpu */
@@ -100490,11 +132020,21 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/ioreq.h tmp-linux-2.6
+};
+typedef struct shared_iopage shared_iopage_t;
+
-+#define IOREQ_BUFFER_SLOT_NUM 80
++struct buf_ioreq {
++ uint8_t type; /* I/O type */
++ uint8_t pad:1;
++ uint8_t dir:1; /* 1=read, 0=write */
++ uint8_t size:2; /* 0=>1, 1=>2, 2=>4, 3=>8. If 8, use two buf_ioreqs */
++ uint32_t addr:20;/* physical address */
++ uint32_t data; /* data */
++};
++typedef struct buf_ioreq buf_ioreq_t;
++
++#define IOREQ_BUFFER_SLOT_NUM 511 /* 8 bytes each, plus 2 4-byte indexes */
+struct buffered_iopage {
-+ unsigned int read_pointer;
-+ unsigned int write_pointer;
-+ ioreq_t ioreq[IOREQ_BUFFER_SLOT_NUM];
++ unsigned int read_pointer;
++ unsigned int write_pointer;
++ buf_ioreq_t buf_ioreq[IOREQ_BUFFER_SLOT_NUM];
+}; /* NB. Size of this structure must be no greater than one page. */
+typedef struct buffered_iopage buffered_iopage_t;
+
@@ -100533,10 +132073,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/ioreq.h tmp-linux-2.6
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,60 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/hvm/params.h linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/params.h
+--- linux-2.6.18.8/include/xen/interface/hvm/params.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/params.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,86 @@
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
@@ -100591,22 +132131,47 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/params.h tmp-linux-2.
+
+#ifdef __ia64__
+#define HVM_PARAM_NVRAM_FD 7
-+#define HVM_NR_PARAMS 8
-+#else
-+#define HVM_NR_PARAMS 7
-+#endif
++#define HVM_PARAM_VHPT_SIZE 8
++#define HVM_PARAM_BUFPIOREQ_PFN 9
++#endif
++
++/*
++ * Set mode for virtual timers (currently x86 only):
++ * delay_for_missed_ticks (default):
++ * Do not advance a vcpu's time beyond the correct delivery time for
++ * interrupts that have been missed due to preemption. Deliver missed
++ * interrupts when the vcpu is rescheduled and advance the vcpu's virtual
++ * time stepwise for each one.
++ * no_delay_for_missed_ticks:
++ * As above, missed interrupts are delivered, but guest time always tracks
++ * wallclock (i.e., real) time while doing so.
++ * no_missed_ticks_pending:
++ * No missed interrupts are held pending. Instead, to ensure ticks are
++ * delivered at some non-zero rate, if we detect missed ticks then the
++ * internal tick alarm is not disabled if the VCPU is preempted during the
++ * next tick period.
++ * one_missed_tick_pending:
++ * Missed interrupts are collapsed together and delivered as one 'late tick'.
++ * Guest time always tracks wallclock (i.e., real) time.
++ */
++#define HVM_PARAM_TIMER_MODE 10
++#define HVMPTM_delay_for_missed_ticks 0
++#define HVMPTM_no_delay_for_missed_ticks 1
++#define HVMPTM_no_missed_ticks_pending 2
++#define HVMPTM_one_missed_tick_pending 3
++
++#define HVM_NR_PARAMS 11
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,462 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/hvm/save.h linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/save.h
+--- linux-2.6.18.8/include/xen/interface/hvm/save.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/save.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,84 @@
+/*
+ * hvm/save.h
+ *
+ * Structure definitions for HVM state that is held by Xen and must
+ * be saved along with the domain's memory and device-model state.
-+ *
+ *
+ * Copyright (c) 2007 XenSource Ltd.
+ *
@@ -100670,391 +132235,6 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/save.h tmp-linux-2.6-
+
+
+/*
-+ * Save/restore header: general info about the save file.
-+ */
-+
-+#define HVM_FILE_MAGIC 0x54381286
-+#define HVM_FILE_VERSION 0x00000001
-+
-+struct hvm_save_header {
-+ uint32_t magic; /* Must be HVM_FILE_MAGIC */
-+ uint32_t version; /* File format version */
-+ uint64_t changeset; /* Version of Xen that saved this file */
-+ uint32_t cpuid; /* CPUID[0x01][%eax] on the saving machine */
-+ uint32_t pad0;
-+};
-+
-+DECLARE_HVM_SAVE_TYPE(HEADER, 1, struct hvm_save_header);
-+
-+
-+/*
-+ * Processor
-+ */
-+
-+struct hvm_hw_cpu {
-+ uint8_t fpu_regs[512];
-+
-+ uint64_t rax;
-+ uint64_t rbx;
-+ uint64_t rcx;
-+ uint64_t rdx;
-+ uint64_t rbp;
-+ uint64_t rsi;
-+ uint64_t rdi;
-+ uint64_t rsp;
-+ uint64_t r8;
-+ uint64_t r9;
-+ uint64_t r10;
-+ uint64_t r11;
-+ uint64_t r12;
-+ uint64_t r13;
-+ uint64_t r14;
-+ uint64_t r15;
-+
-+ uint64_t rip;
-+ uint64_t rflags;
-+
-+ uint64_t cr0;
-+ uint64_t cr2;
-+ uint64_t cr3;
-+ uint64_t cr4;
-+
-+ uint64_t dr0;
-+ uint64_t dr1;
-+ uint64_t dr2;
-+ uint64_t dr3;
-+ uint64_t dr6;
-+ uint64_t dr7;
-+
-+ uint32_t cs_sel;
-+ uint32_t ds_sel;
-+ uint32_t es_sel;
-+ uint32_t fs_sel;
-+ uint32_t gs_sel;
-+ uint32_t ss_sel;
-+ uint32_t tr_sel;
-+ uint32_t ldtr_sel;
-+
-+ uint32_t cs_limit;
-+ uint32_t ds_limit;
-+ uint32_t es_limit;
-+ uint32_t fs_limit;
-+ uint32_t gs_limit;
-+ uint32_t ss_limit;
-+ uint32_t tr_limit;
-+ uint32_t ldtr_limit;
-+ uint32_t idtr_limit;
-+ uint32_t gdtr_limit;
-+
-+ uint64_t cs_base;
-+ uint64_t ds_base;
-+ uint64_t es_base;
-+ uint64_t fs_base;
-+ uint64_t gs_base;
-+ uint64_t ss_base;
-+ uint64_t tr_base;
-+ uint64_t ldtr_base;
-+ uint64_t idtr_base;
-+ uint64_t gdtr_base;
-+
-+ uint32_t cs_arbytes;
-+ uint32_t ds_arbytes;
-+ uint32_t es_arbytes;
-+ uint32_t fs_arbytes;
-+ uint32_t gs_arbytes;
-+ uint32_t ss_arbytes;
-+ uint32_t tr_arbytes;
-+ uint32_t ldtr_arbytes;
-+
-+ uint32_t sysenter_cs;
-+ uint32_t padding0;
-+
-+ uint64_t sysenter_esp;
-+ uint64_t sysenter_eip;
-+
-+ /* msr for em64t */
-+ uint64_t shadow_gs;
-+
-+ /* msr content saved/restored. */
-+ uint64_t msr_flags;
-+ uint64_t msr_lstar;
-+ uint64_t msr_star;
-+ uint64_t msr_cstar;
-+ uint64_t msr_syscall_mask;
-+ uint64_t msr_efer;
-+
-+ /* guest's idea of what rdtsc() would return */
-+ uint64_t tsc;
-+
-+ /* pending event, if any */
-+ union {
-+ uint32_t pending_event;
-+ struct {
-+ uint8_t pending_vector:8;
-+ uint8_t pending_type:3;
-+ uint8_t pending_error_valid:1;
-+ uint32_t pending_reserved:19;
-+ uint8_t pending_valid:1;
-+ };
-+ };
-+ /* error code for pending event */
-+ uint32_t error_code;
-+};
-+
-+DECLARE_HVM_SAVE_TYPE(CPU, 2, struct hvm_hw_cpu);
-+
-+
-+/*
-+ * PIC
-+ */
-+
-+struct hvm_hw_vpic {
-+ /* IR line bitmasks. */
-+ uint8_t irr;
-+ uint8_t imr;
-+ uint8_t isr;
-+
-+ /* Line IRx maps to IRQ irq_base+x */
-+ uint8_t irq_base;
-+
-+ /*
-+ * Where are we in ICW2-4 initialisation (0 means no init in progress)?
-+ * Bits 0-1 (=x): Next write at A=1 sets ICW(x+1).
-+ * Bit 2: ICW1.IC4 (1 == ICW4 included in init sequence)
-+ * Bit 3: ICW1.SNGL (0 == ICW3 included in init sequence)
-+ */
-+ uint8_t init_state:4;
-+
-+ /* IR line with highest priority. */
-+ uint8_t priority_add:4;
-+
-+ /* Reads from A=0 obtain ISR or IRR? */
-+ uint8_t readsel_isr:1;
-+
-+ /* Reads perform a polling read? */
-+ uint8_t poll:1;
-+
-+ /* Automatically clear IRQs from the ISR during INTA? */
-+ uint8_t auto_eoi:1;
-+
-+ /* Automatically rotate IRQ priorities during AEOI? */
-+ uint8_t rotate_on_auto_eoi:1;
-+
-+ /* Exclude slave inputs when considering in-service IRQs? */
-+ uint8_t special_fully_nested_mode:1;
-+
-+ /* Special mask mode excludes masked IRs from AEOI and priority checks. */
-+ uint8_t special_mask_mode:1;
-+
-+ /* Is this a master PIC or slave PIC? (NB. This is not programmable.) */
-+ uint8_t is_master:1;
-+
-+ /* Edge/trigger selection. */
-+ uint8_t elcr;
-+
-+ /* Virtual INT output. */
-+ uint8_t int_output;
-+};
-+
-+DECLARE_HVM_SAVE_TYPE(PIC, 3, struct hvm_hw_vpic);
-+
-+
-+/*
-+ * IO-APIC
-+ */
-+
-+#ifdef __ia64__
-+#define VIOAPIC_IS_IOSAPIC 1
-+#define VIOAPIC_NUM_PINS 24
-+#else
-+#define VIOAPIC_NUM_PINS 48 /* 16 ISA IRQs, 32 non-legacy PCI IRQS. */
-+#endif
-+
-+struct hvm_hw_vioapic {
-+ uint64_t base_address;
-+ uint32_t ioregsel;
-+ uint32_t id;
-+ union vioapic_redir_entry
-+ {
-+ uint64_t bits;
-+ struct {
-+ uint8_t vector;
-+ uint8_t delivery_mode:3;
-+ uint8_t dest_mode:1;
-+ uint8_t delivery_status:1;
-+ uint8_t polarity:1;
-+ uint8_t remote_irr:1;
-+ uint8_t trig_mode:1;
-+ uint8_t mask:1;
-+ uint8_t reserve:7;
-+#if !VIOAPIC_IS_IOSAPIC
-+ uint8_t reserved[4];
-+ uint8_t dest_id;
-+#else
-+ uint8_t reserved[3];
-+ uint16_t dest_id;
-+#endif
-+ } fields;
-+ } redirtbl[VIOAPIC_NUM_PINS];
-+};
-+
-+DECLARE_HVM_SAVE_TYPE(IOAPIC, 4, struct hvm_hw_vioapic);
-+
-+
-+/*
-+ * LAPIC
-+ */
-+
-+struct hvm_hw_lapic {
-+ uint64_t apic_base_msr;
-+ uint32_t disabled; /* VLAPIC_xx_DISABLED */
-+ uint32_t timer_divisor;
-+};
-+
-+DECLARE_HVM_SAVE_TYPE(LAPIC, 5, struct hvm_hw_lapic);
-+
-+struct hvm_hw_lapic_regs {
-+ /* A 4k page of register state */
-+ uint8_t data[0x400];
-+};
-+
-+DECLARE_HVM_SAVE_TYPE(LAPIC_REGS, 6, struct hvm_hw_lapic_regs);
-+
-+
-+/*
-+ * IRQs
-+ */
-+
-+struct hvm_hw_pci_irqs {
-+ /*
-+ * Virtual interrupt wires for a single PCI bus.
-+ * Indexed by: device*4 + INTx#.
-+ */
-+ union {
-+ DECLARE_BITMAP(i, 32*4);
-+ uint64_t pad[2];
-+ };
-+};
-+
-+DECLARE_HVM_SAVE_TYPE(PCI_IRQ, 7, struct hvm_hw_pci_irqs);
-+
-+struct hvm_hw_isa_irqs {
-+ /*
-+ * Virtual interrupt wires for ISA devices.
-+ * Indexed by ISA IRQ (assumes no ISA-device IRQ sharing).
-+ */
-+ union {
-+ DECLARE_BITMAP(i, 16);
-+ uint64_t pad[1];
-+ };
-+};
-+
-+DECLARE_HVM_SAVE_TYPE(ISA_IRQ, 8, struct hvm_hw_isa_irqs);
-+
-+struct hvm_hw_pci_link {
-+ /*
-+ * PCI-ISA interrupt router.
-+ * Each PCI <device:INTx#> is 'wire-ORed' into one of four links using
-+ * the traditional 'barber's pole' mapping ((device + INTx#) & 3).
-+ * The router provides a programmable mapping from each link to a GSI.
-+ */
-+ uint8_t route[4];
-+ uint8_t pad0[4];
-+};
-+
-+DECLARE_HVM_SAVE_TYPE(PCI_LINK, 9, struct hvm_hw_pci_link);
-+
-+/*
-+ * PIT
-+ */
-+
-+struct hvm_hw_pit {
-+ struct hvm_hw_pit_channel {
-+ uint32_t count; /* can be 65536 */
-+ uint16_t latched_count;
-+ uint8_t count_latched;
-+ uint8_t status_latched;
-+ uint8_t status;
-+ uint8_t read_state;
-+ uint8_t write_state;
-+ uint8_t write_latch;
-+ uint8_t rw_mode;
-+ uint8_t mode;
-+ uint8_t bcd; /* not supported */
-+ uint8_t gate; /* timer start */
-+ } channels[3]; /* 3 x 16 bytes */
-+ uint32_t speaker_data_on;
-+ uint32_t pad0;
-+};
-+
-+DECLARE_HVM_SAVE_TYPE(PIT, 10, struct hvm_hw_pit);
-+
-+
-+/*
-+ * RTC
-+ */
-+
-+#define RTC_CMOS_SIZE 14
-+struct hvm_hw_rtc {
-+ /* CMOS bytes */
-+ uint8_t cmos_data[RTC_CMOS_SIZE];
-+ /* Index register for 2-part operations */
-+ uint8_t cmos_index;
-+ uint8_t pad0;
-+};
-+
-+DECLARE_HVM_SAVE_TYPE(RTC, 11, struct hvm_hw_rtc);
-+
-+
-+/*
-+ * HPET
-+ */
-+
-+#define HPET_TIMER_NUM 3 /* 3 timers supported now */
-+struct hvm_hw_hpet {
-+ /* Memory-mapped, software visible registers */
-+ uint64_t capability; /* capabilities */
-+ uint64_t res0; /* reserved */
-+ uint64_t config; /* configuration */
-+ uint64_t res1; /* reserved */
-+ uint64_t isr; /* interrupt status reg */
-+ uint64_t res2[25]; /* reserved */
-+ uint64_t mc64; /* main counter */
-+ uint64_t res3; /* reserved */
-+ struct { /* timers */
-+ uint64_t config; /* configuration/cap */
-+ uint64_t cmp; /* comparator */
-+ uint64_t fsb; /* FSB route, not supported now */
-+ uint64_t res4; /* reserved */
-+ } timers[HPET_TIMER_NUM];
-+ uint64_t res5[4*(24-HPET_TIMER_NUM)]; /* reserved, up to 0x3ff */
-+
-+ /* Hidden register state */
-+ uint64_t period[HPET_TIMER_NUM]; /* Last value written to comparator */
-+};
-+
-+DECLARE_HVM_SAVE_TYPE(HPET, 12, struct hvm_hw_hpet);
-+
-+
-+/*
-+ * PM timer
-+ */
-+
-+struct hvm_hw_pmtimer {
-+ uint32_t tmr_val; /* PM_TMR_BLK.TMR_VAL: 32bit free-running counter */
-+ uint16_t pm1a_sts; /* PM1a_EVT_BLK.PM1a_STS: status register */
-+ uint16_t pm1a_en; /* PM1a_EVT_BLK.PM1a_EN: enable register */
-+};
-+
-+DECLARE_HVM_SAVE_TYPE(PMTIMER, 13, struct hvm_hw_pmtimer);
-+
-+/*
-+ * Largest type-code in use
-+ */
-+#define HVM_SAVE_CODE_MAX 13
-+
-+
-+/*
+ * The series of save records is teminated by a zero-type, zero-length
+ * descriptor.
+ */
@@ -101062,10 +132242,18 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/save.h tmp-linux-2.6-
+struct hvm_save_end {};
+DECLARE_HVM_SAVE_TYPE(END, 0, struct hvm_save_end);
+
++#if defined(__i386__) || defined(__x86_64__)
++#include "../arch-x86/hvm/save.h"
++#elif defined(__ia64__)
++#include "../arch-ia64/hvm/save.h"
++#else
++#error "unsupported architecture"
++#endif
++
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/hvm/vmx_assist.h linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/vmx_assist.h
+--- linux-2.6.18.8/include/xen/interface/hvm/vmx_assist.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/hvm/vmx_assist.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,122 @@
+/*
+ * vmx_assist.h: Context definitions for the VMXASSIST world switch.
@@ -101189,10 +132377,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/hvm/vmx_assist.h tmp-linu
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,128 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/io/blkif.h linux-2.6.18-xen-3.2.0/include/xen/interface/io/blkif.h
+--- linux-2.6.18.8/include/xen/interface/io/blkif.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/io/blkif.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,141 @@
+/******************************************************************************
+ * blkif.h
+ *
@@ -101249,7 +132437,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/blkif.h tmp-linux-2.6-
+#define BLKIF_OP_WRITE 1
+/*
+ * Recognised only if "feature-barrier" is present in backend xenbus info.
-+ * The "feature_barrier" node contains a boolean indicating whether barrier
++ * The "feature-barrier" node contains a boolean indicating whether barrier
+ * requests are likely to succeed or fail. Either way, a barrier request
+ * may fail at any time with BLKIF_RSP_EOPNOTSUPP if it is unsupported by
+ * the underlying block-device hardware. The boolean simply indicates whether
@@ -101258,6 +132446,19 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/blkif.h tmp-linux-2.6-
+ * create the "feature-barrier" node!
+ */
+#define BLKIF_OP_WRITE_BARRIER 2
++/*
++ * Recognised if "feature-flush-cache" is present in backend xenbus
++ * info. A flush will ask the underlying storage hardware to flush its
++ * non-volatile caches as appropriate. The "feature-flush-cache" node
++ * contains a boolean indicating whether flush requests are likely to
++ * succeed or fail. Either way, a flush request may fail at any time
++ * with BLKIF_RSP_EOPNOTSUPP if it is unsupported by the underlying
++ * block-device hardware. The boolean simply indicates whether or not it
++ * is worthwhile for the frontend to attempt flushes. If a backend does
++ * not recognise BLKIF_OP_WRITE_FLUSH_CACHE, it should *not* create the
++ * "feature-flush-cache" node!
++ */
++#define BLKIF_OP_FLUSH_DISKCACHE 3
+
+/*
+ * Maximum scatter/gather segments per request.
@@ -101321,9 +132522,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/blkif.h tmp-linux-2.6-
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/io/console.h linux-2.6.18-xen-3.2.0/include/xen/interface/io/console.h
+--- linux-2.6.18.8/include/xen/interface/io/console.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/io/console.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * console.h
@@ -101376,9 +132577,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/console.h tmp-linux-2.
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/io/fbif.h linux-2.6.18-xen-3.2.0/include/xen/interface/io/fbif.h
+--- linux-2.6.18.8/include/xen/interface/io/fbif.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/io/fbif.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,138 @@
+/*
+ * fbif.h -- Xen virtual frame buffer device
@@ -101518,10 +132719,195 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/fbif.h tmp-linux-2.6-x
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,130 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/io/fsif.h linux-2.6.18-xen-3.2.0/include/xen/interface/io/fsif.h
+--- linux-2.6.18.8/include/xen/interface/io/fsif.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/io/fsif.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,181 @@
++/******************************************************************************
++ * fsif.h
++ *
++ * Interface to FS level split device drivers.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to
++ * deal in the Software without restriction, including without limitation the
++ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ *
++ * Copyright (c) 2007, Grzegorz Milos, Sun Microsystems, Inc.
++ */
++
++#ifndef __XEN_PUBLIC_IO_FSIF_H__
++#define __XEN_PUBLIC_IO_FSIF_H__
++
++#include "ring.h"
++#include "../grant_table.h"
++
++#define REQ_FILE_OPEN 1
++#define REQ_FILE_CLOSE 2
++#define REQ_FILE_READ 3
++#define REQ_FILE_WRITE 4
++#define REQ_STAT 5
++#define REQ_FILE_TRUNCATE 6
++#define REQ_REMOVE 7
++#define REQ_RENAME 8
++#define REQ_CREATE 9
++#define REQ_DIR_LIST 10
++#define REQ_CHMOD 11
++#define REQ_FS_SPACE 12
++#define REQ_FILE_SYNC 13
++
++struct fsif_open_request {
++ grant_ref_t gref;
++};
++
++struct fsif_close_request {
++ uint32_t fd;
++};
++
++struct fsif_read_request {
++ uint32_t fd;
++ grant_ref_t gref;
++ uint64_t len;
++ uint64_t offset;
++};
++
++struct fsif_write_request {
++ uint32_t fd;
++ grant_ref_t gref;
++ uint64_t len;
++ uint64_t offset;
++};
++
++struct fsif_stat_request {
++ uint32_t fd;
++ grant_ref_t gref;
++};
++
++/* This structure is a copy of some fields from stat structure, writen to the
++ * granted page. */
++struct fsif_stat_response {
++ int32_t stat_mode;
++ uint32_t stat_uid;
++ uint32_t stat_gid;
++ int32_t pad;
++ int64_t stat_size;
++ int64_t stat_atime;
++ int64_t stat_mtime;
++ int64_t stat_ctime;
++};
++
++struct fsif_truncate_request {
++ uint32_t fd;
++ int32_t pad;
++ int64_t length;
++};
++
++struct fsif_remove_request {
++ grant_ref_t gref;
++};
++
++struct fsif_rename_request {
++ uint16_t old_name_offset;
++ uint16_t new_name_offset;
++ grant_ref_t gref;
++};
++
++struct fsif_create_request {
++ int8_t directory;
++ int8_t pad;
++ int16_t pad2;
++ int32_t mode;
++ grant_ref_t gref;
++};
++
++struct fsif_list_request {
++ uint32_t offset;
++ grant_ref_t gref;
++};
++
++#define NR_FILES_SHIFT 0
++#define NR_FILES_SIZE 16 /* 16 bits for the number of files mask */
++#define NR_FILES_MASK (((1ULL << NR_FILES_SIZE) - 1) << NR_FILES_SHIFT)
++#define ERROR_SIZE 32 /* 32 bits for the error mask */
++#define ERROR_SHIFT (NR_FILES_SIZE + NR_FILES_SHIFT)
++#define ERROR_MASK (((1ULL << ERROR_SIZE) - 1) << ERROR_SHIFT)
++#define HAS_MORE_SHIFT (ERROR_SHIFT + ERROR_SIZE)
++#define HAS_MORE_FLAG (1ULL << HAS_MORE_SHIFT)
++
++struct fsif_chmod_request {
++ uint32_t fd;
++ int32_t mode;
++};
++
++struct fsif_space_request {
++ grant_ref_t gref;
++};
++
++struct fsif_sync_request {
++ uint32_t fd;
++};
++
++
++/* FS operation request */
++struct fsif_request {
++ uint8_t type; /* Type of the request */
++ uint8_t pad;
++ uint16_t id; /* Request ID, copied to the response */
++ uint32_t pad2;
++ union {
++ struct fsif_open_request fopen;
++ struct fsif_close_request fclose;
++ struct fsif_read_request fread;
++ struct fsif_write_request fwrite;
++ struct fsif_stat_request fstat;
++ struct fsif_truncate_request ftruncate;
++ struct fsif_remove_request fremove;
++ struct fsif_rename_request frename;
++ struct fsif_create_request fcreate;
++ struct fsif_list_request flist;
++ struct fsif_chmod_request fchmod;
++ struct fsif_space_request fspace;
++ struct fsif_sync_request fsync;
++ } u;
++};
++typedef struct fsif_request fsif_request_t;
++
++/* FS operation response */
++struct fsif_response {
++ uint16_t id;
++ uint16_t pad1;
++ uint32_t pad2;
++ uint64_t ret_val;
++};
++
++typedef struct fsif_response fsif_response_t;
++
++
++DEFINE_RING_TYPES(fsif, struct fsif_request, struct fsif_response);
++
++#define STATE_INITIALISED "init"
++#define STATE_READY "ready"
++
++
++
++#endif
+diff -rpuN linux-2.6.18.8/include/xen/interface/io/kbdif.h linux-2.6.18-xen-3.2.0/include/xen/interface/io/kbdif.h
+--- linux-2.6.18.8/include/xen/interface/io/kbdif.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/io/kbdif.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,132 @@
+/*
+ * kbdif.h -- Xen virtual keyboard/mouse
+ *
@@ -101574,6 +132960,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/kbdif.h tmp-linux-2.6-
+ uint8_t type; /* XENKBD_TYPE_MOTION */
+ int32_t rel_x; /* relative X motion */
+ int32_t rel_y; /* relative Y motion */
++ int32_t rel_z; /* relative Z motion (wheel) */
+};
+
+struct xenkbd_key
@@ -101588,6 +132975,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/kbdif.h tmp-linux-2.6-
+ uint8_t type; /* XENKBD_TYPE_POS */
+ int32_t abs_x; /* absolute X position (in FB pixels) */
+ int32_t abs_y; /* absolute Y position (in FB pixels) */
++ int32_t abs_z; /* absolute Z position (wheel) */
+};
+
+#define XENKBD_IN_EVENT_SIZE 40
@@ -101652,10 +133040,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/kbdif.h tmp-linux-2.6-
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,184 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/io/netif.h linux-2.6.18-xen-3.2.0/include/xen/interface/io/netif.h
+--- linux-2.6.18.8/include/xen/interface/io/netif.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/io/netif.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,205 @@
+/******************************************************************************
+ * netif.h
+ *
@@ -101733,9 +133121,11 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/netif.h tmp-linux-2.6-
+typedef struct netif_tx_request netif_tx_request_t;
+
+/* Types of netif_extra_info descriptors. */
-+#define XEN_NETIF_EXTRA_TYPE_NONE (0) /* Never used - invalid */
-+#define XEN_NETIF_EXTRA_TYPE_GSO (1) /* u.gso */
-+#define XEN_NETIF_EXTRA_TYPE_MAX (2)
++#define XEN_NETIF_EXTRA_TYPE_NONE (0) /* Never used - invalid */
++#define XEN_NETIF_EXTRA_TYPE_GSO (1) /* u.gso */
++#define XEN_NETIF_EXTRA_TYPE_MCAST_ADD (2) /* u.mcast */
++#define XEN_NETIF_EXTRA_TYPE_MCAST_DEL (3) /* u.mcast */
++#define XEN_NETIF_EXTRA_TYPE_MAX (4)
+
+/* netif_extra_info flags. */
+#define _XEN_NETIF_EXTRA_FLAG_MORE (0)
@@ -101753,6 +133143,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/netif.h tmp-linux-2.6-
+ uint8_t flags; /* XEN_NETIF_EXTRA_FLAG_* */
+
+ union {
++ /*
++ * XEN_NETIF_EXTRA_TYPE_GSO:
++ */
+ struct {
+ /*
+ * Maximum payload size of each segment. For example, for TCP this
@@ -101776,9 +133169,25 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/netif.h tmp-linux-2.6-
+ uint16_t features; /* XEN_NETIF_GSO_FEAT_* */
+ } gso;
+
++ /*
++ * XEN_NETIF_EXTRA_TYPE_MCAST_{ADD,DEL}:
++ * Backend advertises availability via 'feature-multicast-control'
++ * xenbus node containing value '1'.
++ * Frontend requests this feature by advertising
++ * 'request-multicast-control' xenbus node containing value '1'.
++ * If multicast control is requested then multicast flooding is
++ * disabled and the frontend must explicitly register its interest
++ * in multicast groups using dummy transmit requests containing
++ * MCAST_{ADD,DEL} extra-info fragments.
++ */
++ struct {
++ uint8_t addr[6]; /* Address to add/remove. */
++ } mcast;
++
+ uint16_t pad[3];
+ } u;
+};
++typedef struct netif_extra_info netif_extra_info_t;
+
+struct netif_tx_response {
+ uint16_t id;
@@ -101840,9 +133249,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/netif.h tmp-linux-2.6-
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/io/pciif.h linux-2.6.18-xen-3.2.0/include/xen/interface/io/pciif.h
+--- linux-2.6.18.8/include/xen/interface/io/pciif.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/io/pciif.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,83 @@
+/*
+ * PCI Backend/Frontend Common Data Structures & Macros
@@ -101927,9 +133336,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/pciif.h tmp-linux-2.6-
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/io/protocols.h linux-2.6.18-xen-3.2.0/include/xen/interface/io/protocols.h
+--- linux-2.6.18.8/include/xen/interface/io/protocols.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/io/protocols.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,21 @@
+#ifndef __XEN_PROTOCOLS_H__
+#define __XEN_PROTOCOLS_H__
@@ -101952,9 +133361,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/protocols.h tmp-linux-
+#endif
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/io/ring.h linux-2.6.18-xen-3.2.0/include/xen/interface/io/ring.h
+--- linux-2.6.18.8/include/xen/interface/io/ring.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/io/ring.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,299 @@
+/******************************************************************************
+ * ring.h
@@ -102255,9 +133664,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/ring.h tmp-linux-2.6-x
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/io/tpmif.h linux-2.6.18-xen-3.2.0/include/xen/interface/io/tpmif.h
+--- linux-2.6.18.8/include/xen/interface/io/tpmif.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/io/tpmif.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * tpmif.h
@@ -102336,9 +133745,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/tpmif.h tmp-linux-2.6-
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/io/xenbus.h linux-2.6.18-xen-3.2.0/include/xen/interface/io/xenbus.h
+--- linux-2.6.18.8/include/xen/interface/io/xenbus.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/io/xenbus.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * xenbus.h
@@ -102413,10 +133822,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/xenbus.h tmp-linux-2.6
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,121 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/io/xs_wire.h linux-2.6.18-xen-3.2.0/include/xen/interface/io/xs_wire.h
+--- linux-2.6.18.8/include/xen/interface/io/xs_wire.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/io/xs_wire.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,128 @@
+/*
+ * Details of the "wire" protocol between Xen Store Daemon and client
+ * library or guest kernel.
@@ -102527,6 +133936,13 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/xs_wire.h tmp-linux-2.
+ XENSTORE_RING_IDX rsp_cons, rsp_prod;
+};
+
++/* Violating this is very bad. See docs/misc/xenstore.txt. */
++#define XENSTORE_PAYLOAD_MAX 4096
++
++/* Violating these just gets you an error back */
++#define XENSTORE_ABS_PATH_MAX 3072
++#define XENSTORE_REL_PATH_MAX 2048
++
+#endif /* _XS_WIRE_H */
+
+/*
@@ -102538,10 +133954,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/io/xs_wire.h tmp-linux-2.
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,137 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/kexec.h linux-2.6.18-xen-3.2.0/include/xen/interface/kexec.h
+--- linux-2.6.18.8/include/xen/interface/kexec.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/kexec.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,140 @@
+/******************************************************************************
+ * kexec.h - Public portion
+ *
@@ -102623,6 +134039,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/kexec.h tmp-linux-2.6-xen
+#if defined(__i386__) || defined(__x86_64__)
+ unsigned long page_list[KEXEC_XEN_NO_PAGES];
+#endif
++#if defined(__ia64__)
++ unsigned long reboot_code_buffer;
++#endif
+ unsigned long indirection_page;
+ unsigned long start_address;
+} xen_kexec_image_t;
@@ -102679,10 +134098,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/kexec.h tmp-linux-2.6-xen
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,241 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/libelf.h linux-2.6.18-xen-3.2.0/include/xen/interface/libelf.h
+--- linux-2.6.18.8/include/xen/interface/libelf.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/libelf.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,245 @@
+#ifndef __XC_LIBELF__
+#define __XC_LIBELF__ 1
+
@@ -102754,6 +134173,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/libelf.h tmp-linux-2.6-xe
+ uint64_t pend;
+ uint64_t reloc_offset;
+
++ uint64_t bsd_symtab_pstart;
++ uint64_t bsd_symtab_pend;
++
+#ifndef __XEN__
+ /* misc */
+ FILE *log;
@@ -102776,33 +134198,32 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/libelf.h tmp-linux-2.6-xe
+#define elf_lsb(elf) (ELFDATA2LSB == (elf)->data)
+#define elf_swap(elf) (NATIVE_ELFDATA != (elf)->data)
+
-+#define elf_uval(elf, str, elem) \
-+ ((ELFCLASS64 == (elf)->class) \
-+ ? elf_access_unsigned((elf), (str), \
-+ offsetof(typeof(*(str)),e64.elem), \
-+ sizeof((str)->e64.elem)) \
-+ : elf_access_unsigned((elf), (str), \
-+ offsetof(typeof(*(str)),e32.elem), \
-+ sizeof((str)->e32.elem)))
-+
-+#define elf_sval(elf, str, elem) \
-+ ((ELFCLASS64 == (elf)->class) \
-+ ? elf_access_signed((elf), (str), \
-+ offsetof(typeof(*(str)),e64.elem), \
-+ sizeof((str)->e64.elem)) \
-+ : elf_access_signed((elf), (str), \
-+ offsetof(typeof(*(str)),e32.elem), \
-+ sizeof((str)->e32.elem)))
-+
-+#define elf_size(elf, str) \
-+ ((ELFCLASS64 == (elf)->class) \
-+ ? sizeof((str)->e64) \
-+ : sizeof((str)->e32))
++#define elf_uval(elf, str, elem) \
++ ((ELFCLASS64 == (elf)->class) \
++ ? elf_access_unsigned((elf), (str), \
++ offsetof(typeof(*(str)),e64.elem), \
++ sizeof((str)->e64.elem)) \
++ : elf_access_unsigned((elf), (str), \
++ offsetof(typeof(*(str)),e32.elem), \
++ sizeof((str)->e32.elem)))
++
++#define elf_sval(elf, str, elem) \
++ ((ELFCLASS64 == (elf)->class) \
++ ? elf_access_signed((elf), (str), \
++ offsetof(typeof(*(str)),e64.elem), \
++ sizeof((str)->e64.elem)) \
++ : elf_access_signed((elf), (str), \
++ offsetof(typeof(*(str)),e32.elem), \
++ sizeof((str)->e32.elem)))
++
++#define elf_size(elf, str) \
++ ((ELFCLASS64 == (elf)->class) \
++ ? sizeof((str)->e64) : sizeof((str)->e32))
+
+uint64_t elf_access_unsigned(struct elf_binary *elf, const void *ptr,
-+ uint64_t offset, size_t size);
++ uint64_t offset, size_t size);
+int64_t elf_access_signed(struct elf_binary *elf, const void *ptr,
-+ uint64_t offset, size_t size);
++ uint64_t offset, size_t size);
+
+uint64_t elf_round_up(struct elf_binary *elf, uint64_t addr);
+
@@ -102850,6 +134271,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/libelf.h tmp-linux-2.6-xe
+void *elf_get_ptr(struct elf_binary *elf, unsigned long addr);
+uint64_t elf_lookup_addr(struct elf_binary *elf, const char *symbol);
+
++void elf_parse_bsdsyms(struct elf_binary *elf, uint64_t pstart); /* private */
++
+/* ------------------------------------------------------------------------ */
+/* xc_libelf_relocate.c */
+
@@ -102870,8 +134293,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/libelf.h tmp-linux-2.6-xe
+ enum xen_elfnote_type type;
+ const char *name;
+ union {
-+ const char *str;
-+ uint64_t num;
++ const char *str;
++ uint64_t num;
+ } data;
+};
+
@@ -102913,20 +134336,20 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/libelf.h tmp-linux-2.6-xe
+}
+
+int elf_xen_parse_features(const char *features,
-+ uint32_t *supported,
-+ uint32_t *required);
++ uint32_t *supported,
++ uint32_t *required);
+int elf_xen_parse_note(struct elf_binary *elf,
-+ struct elf_dom_parms *parms,
-+ const elf_note *note);
++ struct elf_dom_parms *parms,
++ const elf_note *note);
+int elf_xen_parse_guest_info(struct elf_binary *elf,
-+ struct elf_dom_parms *parms);
++ struct elf_dom_parms *parms);
+int elf_xen_parse(struct elf_binary *elf,
-+ struct elf_dom_parms *parms);
++ struct elf_dom_parms *parms);
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/memory.h linux-2.6.18-xen-3.2.0/include/xen/interface/memory.h
+--- linux-2.6.18.8/include/xen/interface/memory.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/memory.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,281 @@
+/******************************************************************************
+ * memory.h
@@ -103209,9 +134632,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/memory.h tmp-linux-2.6-xe
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/nmi.h linux-2.6.18-xen-3.2.0/include/xen/interface/nmi.h
+--- linux-2.6.18.8/include/xen/interface/nmi.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/nmi.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,78 @@
+/******************************************************************************
+ * nmi.h
@@ -103291,9 +134714,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/nmi.h tmp-linux-2.6-xen.p
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/physdev.h linux-2.6.18-xen-3.2.0/include/xen/interface/physdev.h
+--- linux-2.6.18.8/include/xen/interface/physdev.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/physdev.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,169 @@
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -103378,7 +134801,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/physdev.h tmp-linux-2.6-x
+#define PHYSDEVOP_set_iobitmap 7
+struct physdev_set_iobitmap {
+ /* IN */
-+ XEN_GUEST_HANDLE_00030205(uint8_t) bitmap;
++ XEN_GUEST_HANDLE_00030205(uint8) bitmap;
+ uint32_t nr_ports;
+};
+typedef struct physdev_set_iobitmap physdev_set_iobitmap_t;
@@ -103464,10 +134887,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/physdev.h tmp-linux-2.6-x
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,183 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/platform.h linux-2.6.18-xen-3.2.0/include/xen/interface/platform.h
+--- linux-2.6.18.8/include/xen/interface/platform.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/platform.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,232 @@
+/******************************************************************************
+ * platform.h
+ *
@@ -103616,13 +135039,59 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/platform.h tmp-linux-2.6-
+ uint8_t capabilities;
+ uint8_t edid_transfer_time;
+ /* must refer to 128-byte buffer */
-+ XEN_GUEST_HANDLE(uint8_t) edid;
++ XEN_GUEST_HANDLE(uint8) 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);
+
++#define XENPF_enter_acpi_sleep 51
++struct xenpf_enter_acpi_sleep {
++ /* IN variables */
++ uint16_t pm1a_cnt_val; /* PM1a control value. */
++ uint16_t pm1b_cnt_val; /* PM1b control value. */
++ uint32_t sleep_state; /* Which state to enter (Sn). */
++ uint32_t flags; /* Must be zero. */
++};
++typedef struct xenpf_enter_acpi_sleep xenpf_enter_acpi_sleep_t;
++DEFINE_XEN_GUEST_HANDLE(xenpf_enter_acpi_sleep_t);
++
++#define XENPF_change_freq 52
++struct xenpf_change_freq {
++ /* IN variables */
++ uint32_t flags; /* Must be zero. */
++ uint32_t cpu; /* Physical cpu. */
++ uint64_t freq; /* New frequency (Hz). */
++};
++typedef struct xenpf_change_freq xenpf_change_freq_t;
++DEFINE_XEN_GUEST_HANDLE(xenpf_change_freq_t);
++
++/*
++ * Get idle times (nanoseconds since boot) for physical CPUs specified in the
++ * @cpumap_bitmap with range [0..@cpumap_nr_cpus-1]. The @idletime array is
++ * indexed by CPU number; only entries with the corresponding @cpumap_bitmap
++ * bit set are written to. On return, @cpumap_bitmap is modified so that any
++ * non-existent CPUs are cleared. Such CPUs have their @idletime array entry
++ * cleared.
++ */
++#define XENPF_getidletime 53
++struct xenpf_getidletime {
++ /* IN/OUT variables */
++ /* IN: CPUs to interrogate; OUT: subset of IN which are present */
++ XEN_GUEST_HANDLE(uint8) cpumap_bitmap;
++ /* IN variables */
++ /* Size of cpumap bitmap. */
++ uint32_t cpumap_nr_cpus;
++ /* Must be indexable for every cpu in cpumap_bitmap. */
++ XEN_GUEST_HANDLE(uint64) idletime;
++ /* OUT variables */
++ /* System time when the idletime snapshots were taken. */
++ uint64_t now;
++};
++typedef struct xenpf_getidletime xenpf_getidletime_t;
++DEFINE_XEN_GUEST_HANDLE(xenpf_getidletime_t);
++
+struct xen_platform_op {
+ uint32_t cmd;
+ uint32_t interface_version; /* XENPF_INTERFACE_VERSION */
@@ -103634,6 +135103,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/platform.h tmp-linux-2.6-
+ struct xenpf_microcode_update microcode;
+ struct xenpf_platform_quirk platform_quirk;
+ struct xenpf_firmware_info firmware_info;
++ struct xenpf_enter_acpi_sleep enter_acpi_sleep;
++ struct xenpf_change_freq change_freq;
++ struct xenpf_getidletime getidletime;
+ uint8_t pad[128];
+ } u;
+};
@@ -103651,9 +135123,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/platform.h tmp-linux-2.6-
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/sched.h linux-2.6.18-xen-3.2.0/include/xen/interface/sched.h
+--- linux-2.6.18.8/include/xen/interface/sched.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/sched.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,121 @@
+/******************************************************************************
+ * sched.h
@@ -103776,10 +135248,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/sched.h tmp-linux-2.6-xen
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,198 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/sysctl.h linux-2.6.18-xen-3.2.0/include/xen/interface/sysctl.h
+--- linux-2.6.18.8/include/xen/interface/sysctl.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/sysctl.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,238 @@
+/******************************************************************************
+ * sysctl.h
+ *
@@ -103816,18 +135288,27 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/sysctl.h tmp-linux-2.6-xe
+#include "xen.h"
+#include "domctl.h"
+
-+#define XEN_SYSCTL_INTERFACE_VERSION 0x00000003
++#define XEN_SYSCTL_INTERFACE_VERSION 0x00000006
+
+/*
+ * Read console content from Xen buffer ring.
+ */
+#define XEN_SYSCTL_readconsole 1
+struct xen_sysctl_readconsole {
-+ /* IN variables. */
-+ uint32_t clear; /* Non-zero -> clear after reading. */
-+ XEN_GUEST_HANDLE_64(char) buffer; /* Buffer start */
-+ /* IN/OUT variables. */
-+ uint32_t count; /* In: Buffer size; Out: Used buffer size */
++ /* IN: Non-zero -> clear after reading. */
++ uint8_t clear;
++ /* IN: Non-zero -> start index specified by @index field. */
++ uint8_t incremental;
++ uint8_t pad0, pad1;
++ /*
++ * IN: Start index for consuming from ring buffer (if @incremental);
++ * OUT: End index after consuming from ring buffer.
++ */
++ uint32_t index;
++ /* IN: Virtual address to write console data. */
++ XEN_GUEST_HANDLE_64(char) buffer;
++ /* IN: Size of buffer; OUT: Bytes written to buffer. */
++ uint32_t count;
+};
+typedef struct xen_sysctl_readconsole xen_sysctl_readconsole_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_readconsole_t);
@@ -103858,15 +135339,33 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/sysctl.h tmp-linux-2.6-xe
+ */
+#define XEN_SYSCTL_physinfo 3
+struct xen_sysctl_physinfo {
++ /* IN variables. */
+ uint32_t threads_per_core;
+ uint32_t cores_per_socket;
-+ uint32_t sockets_per_node;
++ uint32_t nr_cpus;
+ uint32_t nr_nodes;
+ uint32_t cpu_khz;
+ uint64_aligned_t total_pages;
+ uint64_aligned_t free_pages;
+ uint64_aligned_t scrub_pages;
+ uint32_t hw_cap[8];
++
++ /* IN/OUT variables. */
++ /*
++ * IN: maximum addressable entry in the caller-provided cpu_to_node array.
++ * OUT: largest cpu identifier in the system.
++ * If OUT is greater than IN then the cpu_to_node array is truncated!
++ */
++ uint32_t max_cpu_id;
++ /*
++ * If not NULL, this array is filled with node identifier for each cpu.
++ * If a cpu has no node information (e.g., cpu not present) then the
++ * sentinel value ~0u is written.
++ * The size of this array is specified by the caller in @max_cpu_id.
++ * If the actual @max_cpu_id is smaller than the array then the trailing
++ * elements of the array will not be written by the sysctl.
++ */
++ XEN_GUEST_HANDLE_64(uint32) cpu_to_node;
+};
+typedef struct xen_sysctl_physinfo xen_sysctl_physinfo_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_physinfo_t);
@@ -103935,7 +135434,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/sysctl.h tmp-linux-2.6-xe
+/* Get physical CPU information. */
+#define XEN_SYSCTL_getcpuinfo 8
+struct xen_sysctl_cpuinfo {
-+ uint64_t idletime;
++ uint64_aligned_t idletime;
+};
+typedef struct xen_sysctl_cpuinfo xen_sysctl_cpuinfo_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_cpuinfo_t);
@@ -103949,6 +135448,18 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/sysctl.h tmp-linux-2.6-xe
+typedef struct xen_sysctl_getcpuinfo xen_sysctl_getcpuinfo_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_getcpuinfo_t);
+
++#define XEN_SYSCTL_availheap 9
++struct xen_sysctl_availheap {
++ /* IN variables. */
++ uint32_t min_bitwidth; /* Smallest address width (zero if don't care). */
++ uint32_t max_bitwidth; /* Largest address width (zero if don't care). */
++ int32_t node; /* NUMA node of interest (-1 for all nodes). */
++ /* OUT variables. */
++ uint64_aligned_t avail_bytes;/* Bytes available in the specified region. */
++};
++typedef struct xen_sysctl_availheap xen_sysctl_availheap_t;
++DEFINE_XEN_GUEST_HANDLE(xen_sysctl_availheap_t);
++
+struct xen_sysctl {
+ uint32_t cmd;
+ uint32_t interface_version; /* XEN_SYSCTL_INTERFACE_VERSION */
@@ -103961,6 +135472,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/sysctl.h tmp-linux-2.6-xe
+ struct xen_sysctl_getdomaininfolist getdomaininfolist;
+ struct xen_sysctl_debug_keys debug_keys;
+ struct xen_sysctl_getcpuinfo getcpuinfo;
++ struct xen_sysctl_availheap availheap;
+ uint8_t pad[128];
+ } u;
+};
@@ -103978,10 +135490,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/sysctl.h tmp-linux-2.6-xe
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,120 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/trace.h linux-2.6.18-xen-3.2.0/include/xen/interface/trace.h
+--- linux-2.6.18.8/include/xen/interface/trace.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/trace.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,159 @@
+/******************************************************************************
+ * include/public/trace.h
+ *
@@ -104010,14 +135522,22 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/trace.h tmp-linux-2.6-xen
+#ifndef __XEN_PUBLIC_TRACE_H__
+#define __XEN_PUBLIC_TRACE_H__
+
++#define TRACE_EXTRA_MAX 7
++#define TRACE_EXTRA_SHIFT 28
++
+/* Trace classes */
+#define TRC_CLS_SHIFT 16
-+#define TRC_GEN 0x0001f000 /* General trace */
-+#define TRC_SCHED 0x0002f000 /* Xen Scheduler trace */
-+#define TRC_DOM0OP 0x0004f000 /* Xen DOM0 operation trace */
-+#define TRC_HVM 0x0008f000 /* Xen HVM trace */
-+#define TRC_MEM 0x0010f000 /* Xen memory trace */
-+#define TRC_ALL 0xfffff000
++#define TRC_GEN 0x0001f000 /* General trace */
++#define TRC_SCHED 0x0002f000 /* Xen Scheduler trace */
++#define TRC_DOM0OP 0x0004f000 /* Xen DOM0 operation trace */
++#define TRC_HVM 0x0008f000 /* Xen HVM trace */
++#define TRC_MEM 0x0010f000 /* Xen memory trace */
++#define TRC_PV 0x0020f000 /* Xen PV traces */
++#define TRC_ALL 0x0ffff000
++#define TRC_HD_TO_EVENT(x) ((x)&0x0fffffff)
++#define TRC_HD_CYCLE_FLAG (1UL<<31)
++#define TRC_HD_INCLUDES_CYCLE_COUNT(x) ( !!( (x) & TRC_HD_CYCLE_FLAG ) )
++#define TRC_HD_EXTRA(x) (((x)>>TRACE_EXTRA_SHIFT)&TRACE_EXTRA_MAX)
+
+/* Trace subclasses */
+#define TRC_SUBCLS_SHIFT 12
@@ -104028,6 +135548,8 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/trace.h tmp-linux-2.6-xen
+
+/* Trace events per class */
+#define TRC_LOST_RECORDS (TRC_GEN + 1)
++#define TRC_TRACE_WRAP_BUFFER (TRC_GEN + 2)
++#define TRC_TRACE_CPU_CHANGE (TRC_GEN + 3)
+
+#define TRC_SCHED_DOM_ADD (TRC_SCHED + 1)
+#define TRC_SCHED_DOM_REM (TRC_SCHED + 2)
@@ -104049,9 +135571,24 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/trace.h tmp-linux-2.6-xen
+#define TRC_MEM_PAGE_GRANT_UNMAP (TRC_MEM + 2)
+#define TRC_MEM_PAGE_GRANT_TRANSFER (TRC_MEM + 3)
+
++#define TRC_PV_HYPERCALL (TRC_PV + 1)
++#define TRC_PV_TRAP (TRC_PV + 3)
++#define TRC_PV_PAGE_FAULT (TRC_PV + 4)
++#define TRC_PV_FORCED_INVALID_OP (TRC_PV + 5)
++#define TRC_PV_EMULATE_PRIVOP (TRC_PV + 6)
++#define TRC_PV_EMULATE_4GB (TRC_PV + 7)
++#define TRC_PV_MATH_STATE_RESTORE (TRC_PV + 8)
++#define TRC_PV_PAGING_FIXUP (TRC_PV + 9)
++#define TRC_PV_GDT_LDT_MAPPING_FAULT (TRC_PV + 10)
++#define TRC_PV_PTWR_EMULATION (TRC_PV + 11)
++#define TRC_PV_PTWR_EMULATION_PAE (TRC_PV + 12)
++ /* Indicates that addresses in trace record are 64 bits */
++#define TRC_PV_64_FLAG (0x100)
++
+/* trace events per subclass */
+#define TRC_HVM_VMENTRY (TRC_HVM_ENTRYEXIT + 0x01)
+#define TRC_HVM_VMEXIT (TRC_HVM_ENTRYEXIT + 0x02)
++#define TRC_HVM_VMEXIT64 (TRC_HVM_ENTRYEXIT + 0x03)
+#define TRC_HVM_PF_XEN (TRC_HVM_HANDLER + 0x01)
+#define TRC_HVM_PF_INJECT (TRC_HVM_HANDLER + 0x02)
+#define TRC_HVM_INJ_EXC (TRC_HVM_HANDLER + 0x03)
@@ -104073,12 +135610,26 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/trace.h tmp-linux-2.6-xen
+#define TRC_HVM_HLT (TRC_HVM_HANDLER + 0x13)
+#define TRC_HVM_INVLPG (TRC_HVM_HANDLER + 0x14)
+#define TRC_HVM_MCE (TRC_HVM_HANDLER + 0x15)
++#define TRC_HVM_IO_ASSIST (TRC_HVM_HANDLER + 0x16)
++#define TRC_HVM_MMIO_ASSIST (TRC_HVM_HANDLER + 0x17)
++#define TRC_HVM_CLTS (TRC_HVM_HANDLER + 0x18)
++#define TRC_HVM_LMSW (TRC_HVM_HANDLER + 0x19)
++#define TRC_HVM_PF_XEN64 (TRC_HVM_HANDLER + 0x20)
+
+/* This structure represents a single trace buffer record. */
+struct t_rec {
-+ uint64_t cycles; /* cycle counter timestamp */
-+ uint32_t event; /* event ID */
-+ unsigned long data[5]; /* event data items */
++ uint32_t event:28;
++ uint32_t extra_u32:3; /* # entries in trailing extra_u32[] array */
++ uint32_t cycles_included:1; /* u.cycles or u.no_cycles? */
++ union {
++ struct {
++ uint32_t cycles_lo, cycles_hi; /* cycle counter timestamp */
++ uint32_t extra_u32[7]; /* event data items */
++ } cycles;
++ struct {
++ uint32_t extra_u32[7]; /* event data items */
++ } nocycles;
++ } u;
+};
+
+/*
@@ -104086,9 +135637,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/trace.h tmp-linux-2.6-xen
+ * field, indexes into an array of struct t_rec's.
+ */
+struct t_buf {
-+ uint32_t cons; /* Next item to be consumed by control tools. */
-+ uint32_t prod; /* Next item to be produced by Xen. */
-+ /* 'nr_recs' records follow immediately after the meta-data header. */
++ uint32_t cons; /* Offset of next item to be consumed by control tools. */
++ uint32_t prod; /* Offset of next item to be produced by Xen. */
++ /* Records follow immediately after the meta-data header. */
+};
+
+#endif /* __XEN_PUBLIC_TRACE_H__ */
@@ -104102,10 +135653,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/trace.h tmp-linux-2.6-xen
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,192 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/vcpu.h linux-2.6.18-xen-3.2.0/include/xen/interface/vcpu.h
+--- linux-2.6.18.8/include/xen/interface/vcpu.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/vcpu.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,195 @@
+/******************************************************************************
+ * vcpu.h
+ *
@@ -104287,6 +135838,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/vcpu.h tmp-linux-2.6-xen.
+typedef struct vcpu_register_vcpu_info vcpu_register_vcpu_info_t;
+DEFINE_XEN_GUEST_HANDLE(vcpu_register_vcpu_info_t);
+
++/* Send an NMI to the specified VCPU. @extra_arg == NULL. */
++#define VCPUOP_send_nmi 11
++
+#endif /* __XEN_PUBLIC_VCPU_H__ */
+
+/*
@@ -104298,9 +135852,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/vcpu.h tmp-linux-2.6-xen.
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/version.h linux-2.6.18-xen-3.2.0/include/xen/interface/version.h
+--- linux-2.6.18.8/include/xen/interface/version.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/version.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * version.h
@@ -104393,9 +135947,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/version.h tmp-linux-2.6-x
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/xen-compat.h linux-2.6.18-xen-3.2.0/include/xen/interface/xen-compat.h
+--- linux-2.6.18.8/include/xen/interface/xen-compat.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/xen-compat.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * xen-compat.h
@@ -104426,7 +135980,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xen-compat.h tmp-linux-2.
+#ifndef __XEN_PUBLIC_XEN_COMPAT_H__
+#define __XEN_PUBLIC_XEN_COMPAT_H__
+
-+#define __XEN_LATEST_INTERFACE_VERSION__ 0x00030205
++#define __XEN_LATEST_INTERFACE_VERSION__ 0x00030207
+
+#if defined(__XEN__) || defined(__XEN_TOOLS__)
+/* Xen is built with matching headers and implements the latest interface. */
@@ -104448,10 +136002,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xen-compat.h tmp-linux-2.
+#endif
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,612 @@
+diff -rpuN linux-2.6.18.8/include/xen/interface/xen.h linux-2.6.18-xen-3.2.0/include/xen/interface/xen.h
+--- linux-2.6.18.8/include/xen/interface/xen.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/xen.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,636 @@
+/******************************************************************************
+ * xen.h
+ *
@@ -104493,6 +136047,19 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xen.h tmp-linux-2.6-xen.p
+#error "Unsupported architecture"
+#endif
+
++#ifndef __ASSEMBLY__
++/* Guest handles for primitive C types. */
++DEFINE_XEN_GUEST_HANDLE(char);
++__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
++DEFINE_XEN_GUEST_HANDLE(int);
++__DEFINE_XEN_GUEST_HANDLE(uint, unsigned int);
++DEFINE_XEN_GUEST_HANDLE(long);
++__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
++DEFINE_XEN_GUEST_HANDLE(void);
++
++DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
++#endif
++
+/*
+ * HYPERCALLS
+ */
@@ -104523,7 +136090,7 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xen.h tmp-linux-2.6-xen.p
+#define __HYPERVISOR_vcpu_op 24
+#define __HYPERVISOR_set_segment_base 25 /* x86/64 only */
+#define __HYPERVISOR_mmuext_op 26
-+#define __HYPERVISOR_acm_op 27
++#define __HYPERVISOR_xsm_op 27
+#define __HYPERVISOR_nmi_op 28
+#define __HYPERVISOR_sched_op 29
+#define __HYPERVISOR_callback_op 30
@@ -104622,9 +136189,14 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xen.h tmp-linux-2.6-xen.p
+ * ptr[:2] -- Machine address within the frame whose mapping to modify.
+ * The frame must belong to the FD, if one is specified.
+ * val -- Value to write into the mapping entry.
++ *
++ * ptr[1:0] == MMU_PT_UPDATE_PRESERVE_AD:
++ * As MMU_NORMAL_PT_UPDATE above, but A/D bits currently in the PTE are ORed
++ * with those in @val.
+ */
-+#define MMU_NORMAL_PT_UPDATE 0 /* checked '*ptr = val'. ptr is MA. */
-+#define MMU_MACHPHYS_UPDATE 1 /* ptr = MA of frame to modify entry for */
++#define MMU_NORMAL_PT_UPDATE 0 /* checked '*ptr = val'. ptr is MA. */
++#define MMU_MACHPHYS_UPDATE 1 /* ptr = MA of frame to modify entry for */
++#define MMU_PT_UPDATE_PRESERVE_AD 2 /* atomically: *ptr = val | (*ptr&(A|D)) */
+
+/*
+ * MMU EXTENDED OPERATIONS
@@ -105019,6 +136591,12 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xen.h tmp-linux-2.6-xen.p
+ uint8_t green_pos, green_size;
+ uint8_t blue_pos, blue_size;
+ uint8_t rsvd_pos, rsvd_size;
++#if __XEN_INTERFACE_VERSION__ >= 0x00030206
++ /* VESA capabilities (offset 0xa, VESA command 0x4f00). */
++ uint32_t gbl_caps;
++ /* Mode attributes (offset 0x0, VESA command 0x4f01). */
++ uint16_t mode_attrs;
++#endif
+ } vesa_lfb;
+ } u;
+} dom0_vga_console_info_t;
@@ -105031,10 +136609,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xen.h tmp-linux-2.6-xen.p
+#define __mk_unsigned_long(x) x ## UL
+#define mk_unsigned_long(x) __mk_unsigned_long(x)
+
-+DEFINE_XEN_GUEST_HANDLE(uint8_t);
-+DEFINE_XEN_GUEST_HANDLE(uint16_t);
-+DEFINE_XEN_GUEST_HANDLE(uint32_t);
-+DEFINE_XEN_GUEST_HANDLE(uint64_t);
++__DEFINE_XEN_GUEST_HANDLE(uint8, uint8_t);
++__DEFINE_XEN_GUEST_HANDLE(uint16, uint16_t);
++__DEFINE_XEN_GUEST_HANDLE(uint32, uint32_t);
++__DEFINE_XEN_GUEST_HANDLE(uint64, uint64_t);
+
+#else /* __ASSEMBLY__ */
+
@@ -105064,9 +136642,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xen.h tmp-linux-2.6-xen.p
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/xencomm.h linux-2.6.18-xen-3.2.0/include/xen/interface/xencomm.h
+--- linux-2.6.18.8/include/xen/interface/xencomm.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/xencomm.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,41 @@
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -105109,9 +136687,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/xenoprof.h linux-2.6.18-xen-3.2.0/include/xen/interface/xenoprof.h
+--- linux-2.6.18.8/include/xen/interface/xenoprof.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/xenoprof.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,138 @@
+/******************************************************************************
+ * xenoprof.h
@@ -105251,9 +136829,452 @@ diff -Nurp pristine-linux-2.6.18/include/xen/interface/xenoprof.h tmp-linux-2.6-
+ * indent-tabs-mode: nil
+ * End:
+ */
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/interface/xsm/acm.h linux-2.6.18-xen-3.2.0/include/xen/interface/xsm/acm.h
+--- linux-2.6.18.8/include/xen/interface/xsm/acm.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/xsm/acm.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,229 @@
++/*
++ * acm.h: Xen access control module interface defintions
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to
++ * deal in the Software without restriction, including without limitation the
++ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ *
++ * Reiner Sailer <sailer@watson.ibm.com>
++ * Copyright (c) 2005, International Business Machines Corporation.
++ */
++
++#ifndef _XEN_PUBLIC_ACM_H
++#define _XEN_PUBLIC_ACM_H
++
++#include "../xen.h"
++
++/* if ACM_DEBUG defined, all hooks should
++ * print a short trace message (comment it out
++ * when not in testing mode )
++ */
++/* #define ACM_DEBUG */
++
++#ifdef ACM_DEBUG
++# define printkd(fmt, args...) printk(fmt,## args)
++#else
++# define printkd(fmt, args...)
++#endif
++
++/* default ssid reference value if not supplied */
++#define ACM_DEFAULT_SSID 0x0
++#define ACM_DEFAULT_LOCAL_SSID 0x0
++
++/* Internal ACM ERROR types */
++#define ACM_OK 0
++#define ACM_UNDEF -1
++#define ACM_INIT_SSID_ERROR -2
++#define ACM_INIT_SOID_ERROR -3
++#define ACM_ERROR -4
++
++/* External ACCESS DECISIONS */
++#define ACM_ACCESS_PERMITTED 0
++#define ACM_ACCESS_DENIED -111
++#define ACM_NULL_POINTER_ERROR -200
++
++/*
++ Error codes reported in when trying to test for a new policy
++ These error codes are reported in an array of tuples where
++ each error code is followed by a parameter describing the error
++ more closely, such as a domain id.
++*/
++#define ACM_EVTCHN_SHARING_VIOLATION 0x100
++#define ACM_GNTTAB_SHARING_VIOLATION 0x101
++#define ACM_DOMAIN_LOOKUP 0x102
++#define ACM_CHWALL_CONFLICT 0x103
++#define ACM_SSIDREF_IN_USE 0x104
++
++
++/* primary policy in lower 4 bits */
++#define ACM_NULL_POLICY 0
++#define ACM_CHINESE_WALL_POLICY 1
++#define ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY 2
++#define ACM_POLICY_UNDEFINED 15
++
++/* combinations have secondary policy component in higher 4bit */
++#define ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY \
++ ((ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY << 4) | ACM_CHINESE_WALL_POLICY)
++
++/* policy: */
++#define ACM_POLICY_NAME(X) \
++ ((X) == (ACM_NULL_POLICY)) ? "NULL" : \
++ ((X) == (ACM_CHINESE_WALL_POLICY)) ? "CHINESE WALL" : \
++ ((X) == (ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY)) ? "SIMPLE TYPE ENFORCEMENT" : \
++ ((X) == (ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY)) ? "CHINESE WALL AND SIMPLE TYPE ENFORCEMENT" : \
++ "UNDEFINED"
++
++/* the following policy versions must be increased
++ * whenever the interpretation of the related
++ * policy's data structure changes
++ */
++#define ACM_POLICY_VERSION 3
++#define ACM_CHWALL_VERSION 1
++#define ACM_STE_VERSION 1
++
++/* defines a ssid reference used by xen */
++typedef uint32_t ssidref_t;
++
++/* hooks that are known to domains */
++#define ACMHOOK_none 0
++#define ACMHOOK_sharing 1
++#define ACMHOOK_authorization 2
++
++/* -------security policy relevant type definitions-------- */
++
++/* type identifier; compares to "equal" or "not equal" */
++typedef uint16_t domaintype_t;
++
++/* CHINESE WALL POLICY DATA STRUCTURES
++ *
++ * current accumulated conflict type set:
++ * When a domain is started and has a type that is in
++ * a conflict set, the conflicting types are incremented in
++ * the aggregate set. When a domain is destroyed, the
++ * conflicting types to its type are decremented.
++ * If a domain has multiple types, this procedure works over
++ * all those types.
++ *
++ * conflict_aggregate_set[i] holds the number of
++ * running domains that have a conflict with type i.
++ *
++ * running_types[i] holds the number of running domains
++ * that include type i in their ssidref-referenced type set
++ *
++ * conflict_sets[i][j] is "0" if type j has no conflict
++ * with type i and is "1" otherwise.
++ */
++/* high-16 = version, low-16 = check magic */
++#define ACM_MAGIC 0x0001debc
++
++/* each offset in bytes from start of the struct they
++ * are part of */
++
++/* V3 of the policy buffer aded a version structure */
++struct acm_policy_version
++{
++ uint32_t major;
++ uint32_t minor;
++};
++
++
++/* each buffer consists of all policy information for
++ * the respective policy given in the policy code
++ *
++ * acm_policy_buffer, acm_chwall_policy_buffer,
++ * and acm_ste_policy_buffer need to stay 32-bit aligned
++ * because we create binary policies also with external
++ * tools that assume packed representations (e.g. the java tool)
++ */
++struct acm_policy_buffer {
++ uint32_t magic;
++ uint32_t policy_version; /* ACM_POLICY_VERSION */
++ uint32_t len;
++ uint32_t policy_reference_offset;
++ uint32_t primary_policy_code;
++ uint32_t primary_buffer_offset;
++ uint32_t secondary_policy_code;
++ uint32_t secondary_buffer_offset;
++ struct acm_policy_version xml_pol_version; /* add in V3 */
++};
++
++
++struct acm_policy_reference_buffer {
++ uint32_t len;
++};
++
++struct acm_chwall_policy_buffer {
++ uint32_t policy_version; /* ACM_CHWALL_VERSION */
++ uint32_t policy_code;
++ uint32_t chwall_max_types;
++ uint32_t chwall_max_ssidrefs;
++ uint32_t chwall_max_conflictsets;
++ uint32_t chwall_ssid_offset;
++ uint32_t chwall_conflict_sets_offset;
++ uint32_t chwall_running_types_offset;
++ uint32_t chwall_conflict_aggregate_offset;
++};
++
++struct acm_ste_policy_buffer {
++ uint32_t policy_version; /* ACM_STE_VERSION */
++ uint32_t policy_code;
++ uint32_t ste_max_types;
++ uint32_t ste_max_ssidrefs;
++ uint32_t ste_ssid_offset;
++};
++
++struct acm_stats_buffer {
++ uint32_t magic;
++ uint32_t len;
++ uint32_t primary_policy_code;
++ uint32_t primary_stats_offset;
++ uint32_t secondary_policy_code;
++ uint32_t secondary_stats_offset;
++};
++
++struct acm_ste_stats_buffer {
++ uint32_t ec_eval_count;
++ uint32_t gt_eval_count;
++ uint32_t ec_denied_count;
++ uint32_t gt_denied_count;
++ uint32_t ec_cachehit_count;
++ uint32_t gt_cachehit_count;
++};
++
++struct acm_ssid_buffer {
++ uint32_t len;
++ ssidref_t ssidref;
++ uint32_t policy_reference_offset;
++ uint32_t primary_policy_code;
++ uint32_t primary_max_types;
++ uint32_t primary_types_offset;
++ uint32_t secondary_policy_code;
++ uint32_t secondary_max_types;
++ uint32_t secondary_types_offset;
++};
++
++#endif
++
++/*
++ * Local variables:
++ * mode: C
++ * c-set-style: "BSD"
++ * c-basic-offset: 4
++ * tab-width: 4
++ * indent-tabs-mode: nil
++ * End:
++ */
+diff -rpuN linux-2.6.18.8/include/xen/interface/xsm/acm_ops.h linux-2.6.18-xen-3.2.0/include/xen/interface/xsm/acm_ops.h
+--- linux-2.6.18.8/include/xen/interface/xsm/acm_ops.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/xsm/acm_ops.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,159 @@
++/*
++ * acm_ops.h: Xen access control module hypervisor commands
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to
++ * deal in the Software without restriction, including without limitation the
++ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ *
++ * Reiner Sailer <sailer@watson.ibm.com>
++ * Copyright (c) 2005,2006 International Business Machines Corporation.
++ */
++
++#ifndef __XEN_PUBLIC_ACM_OPS_H__
++#define __XEN_PUBLIC_ACM_OPS_H__
++
++#include "../xen.h"
++#include "acm.h"
++
++/*
++ * Make sure you increment the interface version whenever you modify this file!
++ * 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 0xAAAA000A
++
++/************************************************************************/
++
++/*
++ * Prototype for this hypercall is:
++ * int acm_op(int cmd, void *args)
++ * @cmd == ACMOP_??? (access control module operation).
++ * @args == Operation-specific extra arguments (NULL if none).
++ */
++
++
++#define ACMOP_setpolicy 1
++struct acm_setpolicy {
++ /* IN */
++ XEN_GUEST_HANDLE_64(void) pushcache;
++ uint32_t pushcache_size;
++};
++
++
++#define ACMOP_getpolicy 2
++struct acm_getpolicy {
++ /* IN */
++ XEN_GUEST_HANDLE_64(void) pullcache;
++ uint32_t pullcache_size;
++};
++
++
++#define ACMOP_dumpstats 3
++struct acm_dumpstats {
++ /* IN */
++ XEN_GUEST_HANDLE_64(void) pullcache;
++ uint32_t pullcache_size;
++};
++
++
++#define ACMOP_getssid 4
++#define ACM_GETBY_ssidref 1
++#define ACM_GETBY_domainid 2
++struct acm_getssid {
++ /* IN */
++ uint32_t get_ssid_by; /* ACM_GETBY_* */
++ union {
++ domaintype_t domainid;
++ ssidref_t ssidref;
++ } id;
++ XEN_GUEST_HANDLE_64(void) ssidbuf;
++ uint32_t ssidbuf_size;
++};
++
++#define ACMOP_getdecision 5
++struct acm_getdecision {
++ /* IN */
++ uint32_t get_decision_by1; /* ACM_GETBY_* */
++ uint32_t get_decision_by2; /* ACM_GETBY_* */
++ union {
++ domaintype_t domainid;
++ ssidref_t ssidref;
++ } id1;
++ union {
++ domaintype_t domainid;
++ ssidref_t ssidref;
++ } id2;
++ uint32_t hook;
++ /* OUT */
++ uint32_t acm_decision;
++};
++
++
++#define ACMOP_chgpolicy 6
++struct acm_change_policy {
++ /* IN */
++ XEN_GUEST_HANDLE_64(void) policy_pushcache;
++ uint32_t policy_pushcache_size;
++ XEN_GUEST_HANDLE_64(void) del_array;
++ uint32_t delarray_size;
++ XEN_GUEST_HANDLE_64(void) chg_array;
++ uint32_t chgarray_size;
++ /* OUT */
++ /* array with error code */
++ XEN_GUEST_HANDLE_64(void) err_array;
++ uint32_t errarray_size;
++};
++
++#define ACMOP_relabeldoms 7
++struct acm_relabel_doms {
++ /* IN */
++ XEN_GUEST_HANDLE_64(void) relabel_map;
++ uint32_t relabel_map_size;
++ /* OUT */
++ XEN_GUEST_HANDLE_64(void) err_array;
++ uint32_t errarray_size;
++};
++
++/* future interface to Xen */
++struct xen_acmctl {
++ uint32_t cmd;
++ uint32_t interface_version;
++ union {
++ struct acm_setpolicy setpolicy;
++ struct acm_getpolicy getpolicy;
++ struct acm_dumpstats dumpstats;
++ struct acm_getssid getssid;
++ struct acm_getdecision getdecision;
++ struct acm_change_policy change_policy;
++ struct acm_relabel_doms relabel_doms;
++ } u;
++};
++
++typedef struct xen_acmctl xen_acmctl_t;
++DEFINE_XEN_GUEST_HANDLE(xen_acmctl_t);
++
++#endif /* __XEN_PUBLIC_ACM_OPS_H__ */
++
++/*
++ * Local variables:
++ * mode: C
++ * c-set-style: "BSD"
++ * c-basic-offset: 4
++ * tab-width: 4
++ * indent-tabs-mode: nil
++ * End:
++ */
+diff -rpuN linux-2.6.18.8/include/xen/interface/xsm/flask_op.h linux-2.6.18-xen-3.2.0/include/xen/interface/xsm/flask_op.h
+--- linux-2.6.18.8/include/xen/interface/xsm/flask_op.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/interface/xsm/flask_op.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,43 @@
++/*
++ * This file contains the flask_op hypercall commands and definitions.
++ *
++ * Author: George Coker, <gscoker@alpha.ncsc.mil>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2,
++ * as published by the Free Software Foundation.
++ */
++
++#ifndef __FLASK_OP_H__
++#define __FLASK_OP_H__
++
++#define FLASK_LOAD 1
++#define FLASK_GETENFORCE 2
++#define FLASK_SETENFORCE 3
++#define FLASK_CONTEXT_TO_SID 4
++#define FLASK_SID_TO_CONTEXT 5
++#define FLASK_ACCESS 6
++#define FLASK_CREATE 7
++#define FLASK_RELABEL 8
++#define FLASK_USER 9
++#define FLASK_POLICYVERS 10
++#define FLASK_GETBOOL 11
++#define FLASK_SETBOOL 12
++#define FLASK_COMMITBOOLS 13
++#define FLASK_MLS 14
++#define FLASK_DISABLE 15
++#define FLASK_GETAVC_THRESHOLD 16
++#define FLASK_SETAVC_THRESHOLD 17
++#define FLASK_AVC_HASHSTATS 18
++#define FLASK_AVC_CACHESTATS 19
++#define FLASK_MEMBER 20
++
++typedef struct flask_op {
++ int cmd;
++ int size;
++ char *buf;
++} flask_op_t;
++
++DEFINE_XEN_GUEST_HANDLE(flask_op_t);
++
++#endif
+diff -rpuN linux-2.6.18.8/include/xen/pcifront.h linux-2.6.18-xen-3.2.0/include/xen/pcifront.h
+--- linux-2.6.18.8/include/xen/pcifront.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/pcifront.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,83 @@
+/*
+ * PCI Frontend - arch-dependendent declarations
@@ -105338,9 +137359,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/pcifront.h tmp-linux-2.6-xen.patch/
+#endif /* __KERNEL__ */
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/public/evtchn.h linux-2.6.18-xen-3.2.0/include/xen/public/evtchn.h
+--- linux-2.6.18.8/include/xen/public/evtchn.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/public/evtchn.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,88 @@
+/******************************************************************************
+ * evtchn.h
@@ -105430,9 +137451,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/public/evtchn.h tmp-linux-2.6-xen.p
+ _IOC(_IOC_NONE, 'E', 5, 0)
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/public/gntdev.h linux-2.6.18-xen-3.2.0/include/xen/public/gntdev.h
+--- linux-2.6.18.8/include/xen/public/gntdev.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/public/gntdev.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,105 @@
+/******************************************************************************
+ * gntdev.h
@@ -105539,9 +137560,9 @@ 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/public/privcmd.h linux-2.6.18-xen-3.2.0/include/xen/public/privcmd.h
+--- linux-2.6.18.8/include/xen/public/privcmd.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/public/privcmd.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * privcmd.h
@@ -105622,9 +137643,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/public/privcmd.h tmp-linux-2.6-xen.
+ _IOC(_IOC_NONE, 'P', 3, sizeof(privcmd_mmapbatch_t))
+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/xen_proc.h linux-2.6.18-xen-3.2.0/include/xen/xen_proc.h
+--- linux-2.6.18.8/include/xen/xen_proc.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/xen_proc.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,12 @@
+
+#ifndef __ASM_XEN_PROC_H__
@@ -105638,10 +137659,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/xen_proc.h tmp-linux-2.6-xen.patch/
+ const char *name);
+
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,304 @@
+diff -rpuN linux-2.6.18.8/include/xen/xenbus.h linux-2.6.18-xen-3.2.0/include/xen/xenbus.h
+--- linux-2.6.18.8/include/xen/xenbus.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/xenbus.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,307 @@
+/******************************************************************************
+ * xenbus.h
+ *
@@ -105945,16 +137966,100 @@ diff -Nurp pristine-linux-2.6.18/include/xen/xenbus.h tmp-linux-2.6-xen.patch/in
+int xenbus_dev_is_online(struct xenbus_device *dev);
+int xenbus_frontend_closed(struct xenbus_device *dev);
+
++int xenbus_for_each_backend(void *arg, int (*fn)(struct device *, void *));
++int xenbus_for_each_frontend(void *arg, int (*fn)(struct device *, void *));
++
+#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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,19 @@
+diff -rpuN linux-2.6.18.8/include/xen/xencomm.h linux-2.6.18-xen-3.2.0/include/xen/xencomm.h
+--- linux-2.6.18.8/include/xen/xencomm.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/xencomm.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,77 @@
++/*
++ * 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
++ *
++ * Copyright (C) IBM Corp. 2006
++ *
++ * Authors: Hollis Blanchard <hollisb@us.ibm.com>
++ * Jerone Young <jyoung5@us.ibm.com>
++ */
++
++#ifndef _LINUX_XENCOMM_H_
++#define _LINUX_XENCOMM_H_
++
++#include <xen/interface/xencomm.h>
++
++#define XENCOMM_MINI_ADDRS 3
++struct xencomm_mini {
++ struct xencomm_desc _desc;
++ uint64_t address[XENCOMM_MINI_ADDRS];
++};
++
++/* To avoid additionnal virt to phys conversion, an opaque structure is
++ presented. */
++struct xencomm_handle;
++
++extern void xencomm_free(struct xencomm_handle *desc);
++extern struct xencomm_handle *xencomm_map(void *ptr, unsigned long bytes);
++extern struct xencomm_handle *__xencomm_map_no_alloc(void *ptr,
++ unsigned long bytes, struct xencomm_mini *xc_area);
++
++#if 0
++#define XENCOMM_MINI_ALIGNED(xc_desc, n) \
++ struct xencomm_mini xc_desc ## _base[(n)] \
++ __attribute__((__aligned__(sizeof(struct xencomm_mini)))); \
++ struct xencomm_mini* xc_desc = &xc_desc ## _base[0];
++#else
++/*
++ * gcc bug workaround:
++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660
++ * gcc doesn't handle properly stack variable with
++ * __attribute__((__align__(sizeof(struct xencomm_mini))))
++ */
++#define XENCOMM_MINI_ALIGNED(xc_desc, n) \
++ unsigned char xc_desc ## _base[((n) + 1 ) * \
++ sizeof(struct xencomm_mini)]; \
++ struct xencomm_mini *xc_desc = (struct xencomm_mini*) \
++ ((unsigned long)xc_desc ## _base + \
++ (sizeof(struct xencomm_mini) - \
++ ((unsigned long)xc_desc ## _base) % \
++ sizeof(struct xencomm_mini)));
++#endif
++#define xencomm_map_no_alloc(ptr, bytes) \
++ ({XENCOMM_MINI_ALIGNED(xc_desc, 1); \
++ __xencomm_map_no_alloc(ptr, bytes, xc_desc);})
++
++/* provided by architecture code: */
++extern unsigned long xencomm_vtop(unsigned long vaddr);
++
++static inline void *xencomm_pa(void *ptr)
++{
++ return (void *)xencomm_vtop((unsigned long)ptr);
++}
++
++#define xen_guest_handle(hnd) ((hnd).p)
++
++#endif /* _LINUX_XENCOMM_H_ */
+diff -rpuN linux-2.6.18.8/include/xen/xencons.h linux-2.6.18-xen-3.2.0/include/xen/xencons.h
+--- linux-2.6.18.8/include/xen/xencons.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/xencons.h 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,17 @@
+#ifndef __ASM_XENCONS_H__
+#define __ASM_XENCONS_H__
+
+struct dom0_vga_console_info;
-+void dom0_init_screen_info(const struct dom0_vga_console_info *info);
++void dom0_init_screen_info(const struct dom0_vga_console_info *, size_t);
+
+void xencons_force_flush(void);
+void xencons_resume(void);
@@ -105966,12 +138071,10 @@ diff -Nurp pristine-linux-2.6.18/include/xen/xencons.h tmp-linux-2.6-xen.patch/i
+int xencons_ring_init(void);
+int xencons_ring_send(const char *data, unsigned len);
+
-+void xencons_early_setup(void);
-+
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/include/xen/xenoprof.h linux-2.6.18-xen-3.2.0/include/xen/xenoprof.h
+--- linux-2.6.18.8/include/xen/xenoprof.h 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/include/xen/xenoprof.h 2008-02-15 16:22:15.000000000 -0800
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * xen/xenoprof.h
@@ -106015,9 +138118,9 @@ diff -Nurp pristine-linux-2.6.18/include/xen/xenoprof.h tmp-linux-2.6-xen.patch/
+
+#endif /* CONFIG_XEN */
+#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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/kernel/Kconfig.preempt linux-2.6.18-xen-3.2.0/kernel/Kconfig.preempt
+--- linux-2.6.18.8/kernel/Kconfig.preempt 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/kernel/Kconfig.preempt 2008-02-15 16:22:15.000000000 -0800
@@ -35,6 +35,7 @@ config PREEMPT_VOLUNTARY
config PREEMPT
@@ -106026,9 +138129,23 @@ diff -Nurp pristine-linux-2.6.18/kernel/Kconfig.preempt tmp-linux-2.6-xen.patch/
help
This option reduces the latency of the kernel by making
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/kernel/cpu.c linux-2.6.18-xen-3.2.0/kernel/cpu.c
+--- linux-2.6.18.8/kernel/cpu.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/kernel/cpu.c 2008-02-15 16:22:15.000000000 -0800
+@@ -48,7 +48,10 @@ EXPORT_SYMBOL_GPL(lock_cpu_hotplug);
+
+ void unlock_cpu_hotplug(void)
+ {
++/* cpufreq lock-takers fixed in mainline; shut up until dom0 kernel catches up*/
++#ifdef CONFIG_XEN
+ WARN_ON(recursive != current);
++#endif
+ if (recursive_depth) {
+ recursive_depth--;
+ return;
+diff -rpuN linux-2.6.18.8/kernel/fork.c linux-2.6.18-xen-3.2.0/kernel/fork.c
+--- linux-2.6.18.8/kernel/fork.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/kernel/fork.c 2008-02-15 16:22:15.000000000 -0800
@@ -276,6 +276,9 @@ static inline int dup_mmap(struct mm_str
if (retval)
goto out;
@@ -106039,9 +138156,9 @@ diff -Nurp pristine-linux-2.6.18/kernel/fork.c tmp-linux-2.6-xen.patch/kernel/fo
retval = 0;
out:
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/kernel/irq/spurious.c linux-2.6.18-xen-3.2.0/kernel/irq/spurious.c
+--- linux-2.6.18.8/kernel/irq/spurious.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/kernel/irq/spurious.c 2008-02-15 16:22:15.000000000 -0800
@@ -139,7 +139,8 @@ void note_interrupt(unsigned int irq, st
irqreturn_t action_ret, struct pt_regs *regs)
{
@@ -106052,9 +138169,9 @@ diff -Nurp pristine-linux-2.6.18/kernel/irq/spurious.c tmp-linux-2.6-xen.patch/k
if (unlikely(action_ret != IRQ_NONE))
report_bad_irq(irq, desc, action_ret);
}
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/kernel/kexec.c linux-2.6.18-xen-3.2.0/kernel/kexec.c
+--- linux-2.6.18.8/kernel/kexec.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/kernel/kexec.c 2008-02-15 16:22:15.000000000 -0800
@@ -330,13 +330,26 @@ static int kimage_is_destination_range(s
return 0;
}
@@ -106237,7 +138354,15 @@ 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 +910,13 @@ static int kimage_load_segment(struct ki
+@@ -851,6 +880,7 @@ static int kimage_load_crash_segment(str
+ memset(ptr + uchunk, 0, mchunk - uchunk);
+ }
+ result = copy_from_user(ptr, buf, uchunk);
++ kexec_flush_icache_page(page);
+ kunmap(page);
+ if (result) {
+ result = (result < 0) ? result : -EIO;
+@@ -881,6 +911,13 @@ static int kimage_load_segment(struct ki
return result;
}
@@ -106251,7 +138376,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 +1027,13 @@ asmlinkage long sys_kexec_load(unsigned
+@@ -991,6 +1028,13 @@ asmlinkage long sys_kexec_load(unsigned
if (result)
goto out;
}
@@ -106265,7 +138390,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 +1087,6 @@ void crash_kexec(struct pt_regs *regs)
+@@ -1044,7 +1088,6 @@ void crash_kexec(struct pt_regs *regs)
{
int locked;
@@ -106273,9 +138398,78 @@ diff -Nurp pristine-linux-2.6.18/kernel/kexec.c tmp-linux-2.6-xen.patch/kernel/k
/* Take the kexec_lock here to prevent sys_kexec_load
* running on one cpu from replacing the crash kernel
* 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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/kernel/resource.c linux-2.6.18-xen-3.2.0/kernel/resource.c
+--- linux-2.6.18.8/kernel/resource.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/kernel/resource.c 2008-02-15 16:22:15.000000000 -0800
+@@ -36,6 +36,16 @@ struct resource iomem_resource = {
+ };
+ EXPORT_SYMBOL(iomem_resource);
+
++#ifdef CONFIG_PROC_IOMEM_MACHINE
++struct resource iomem_machine_resource = {
++ .name = "Machine PCI mem",
++ .start = 0,
++ .end = -1,
++ .flags = IORESOURCE_MEM,
++};
++EXPORT_SYMBOL(iomem_machine_resource);
++#endif
++
+ static DEFINE_RWLOCK(resource_lock);
+
+ #ifdef CONFIG_PROC_FS
+@@ -115,6 +125,18 @@ static int iomem_open(struct inode *inod
+ return res;
+ }
+
++#ifdef CONFIG_PROC_IOMEM_MACHINE
++static int iomem_machine_open(struct inode *inode, struct file *file)
++{
++ int res = seq_open(file, &resource_op);
++ if (!res) {
++ struct seq_file *m = file->private_data;
++ m->private = &iomem_machine_resource;
++ }
++ return res;
++}
++#endif
++
+ static struct file_operations proc_ioports_operations = {
+ .open = ioports_open,
+ .read = seq_read,
+@@ -129,6 +151,15 @@ static struct file_operations proc_iomem
+ .release = seq_release,
+ };
+
++#ifdef CONFIG_PROC_IOMEM_MACHINE
++static struct file_operations proc_iomem_machine_operations = {
++ .open = iomem_machine_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = seq_release,
++};
++#endif
++
+ static int __init ioresources_init(void)
+ {
+ struct proc_dir_entry *entry;
+@@ -139,6 +170,13 @@ static int __init ioresources_init(void)
+ entry = create_proc_entry("iomem", 0, NULL);
+ if (entry)
+ entry->proc_fops = &proc_iomem_operations;
++#ifdef CONFIG_PROC_IOMEM_MACHINE
++ if (is_initial_xendomain()) {
++ entry = create_proc_entry("iomem_machine", 0, NULL);
++ if (entry)
++ entry->proc_fops = &proc_iomem_machine_operations;
++ }
++#endif
+ return 0;
+ }
+ __initcall(ioresources_init);
+diff -rpuN linux-2.6.18.8/kernel/softlockup.c linux-2.6.18-xen-3.2.0/kernel/softlockup.c
+--- linux-2.6.18.8/kernel/softlockup.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/kernel/softlockup.c 2008-02-15 16:22:15.000000000 -0800
@@ -40,6 +40,19 @@ void touch_softlockup_watchdog(void)
}
EXPORT_SYMBOL(touch_softlockup_watchdog);
@@ -106296,9 +138490,21 @@ diff -Nurp pristine-linux-2.6.18/kernel/softlockup.c tmp-linux-2.6-xen.patch/ker
/*
* This callback runs from the timer interrupt, and checks
* 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-11-16 16:18:13.000000000 -0800
+diff -rpuN linux-2.6.18.8/kernel/sysctl.c linux-2.6.18-xen-3.2.0/kernel/sysctl.c
+--- linux-2.6.18.8/kernel/sysctl.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/kernel/sysctl.c 2008-02-15 16:22:15.000000000 -0800
+@@ -661,7 +661,7 @@ static ctl_table kern_table[] = {
+ .proc_handler = &proc_dointvec,
+ },
+ #endif
+-#ifdef CONFIG_ACPI_SLEEP
++#if defined(CONFIG_ACPI_SLEEP) && !defined(CONFIG_ACPI_PV_SLEEP)
+ {
+ .ctl_name = KERN_ACPI_VIDEO_FLAGS,
+ .procname = "acpi_video_flags",
+diff -rpuN linux-2.6.18.8/kernel/timer.c linux-2.6.18-xen-3.2.0/kernel/timer.c
+--- linux-2.6.18.8/kernel/timer.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/kernel/timer.c 2008-02-15 16:22:15.000000000 -0800
@@ -485,7 +485,9 @@ unsigned long next_timer_interrupt(void)
if (hr_expires < 3)
return hr_expires + jiffies;
@@ -106310,38 +138516,771 @@ diff -Nurp pristine-linux-2.6.18/kernel/timer.c tmp-linux-2.6-xen.patch/kernel/t
base = __get_cpu_var(tvec_bases);
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-11-14 15:35:27.000000000 -0800
-@@ -52,6 +52,7 @@ obj-$(CONFIG_SMP) += percpu_counter.o
+diff -rpuN linux-2.6.18.8/lib/Makefile linux-2.6.18-xen-3.2.0/lib/Makefile
+--- linux-2.6.18.8/lib/Makefile 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/lib/Makefile 2008-02-15 16:22:15.000000000 -0800
+@@ -52,6 +52,9 @@ obj-$(CONFIG_SMP) += percpu_counter.o
obj-$(CONFIG_AUDIT_GENERIC) += audit.o
obj-$(CONFIG_SWIOTLB) += swiotlb.o
-+swiotlb-$(CONFIG_XEN) := ../arch/i386/kernel/swiotlb.o
++ifeq ($(CONFIG_IA64),y)
++swiotlb-$(CONFIG_XEN) := ../arch/ia64/xen/swiotlb.o
++endif
hostprogs-y := gen_crc32table
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-11-14 15:35:27.000000000 -0800
-@@ -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.
- # PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes.
-+# XEN on x86 architecture uses the mapping field on pagetable pages to store a
-+# pointer to the destructor. This conflicts with pte_lock_deinit().
- #
- config SPLIT_PTLOCK_CPUS
- int
- default "4096" if ARM && !CPU_CACHE_VIPT
- default "4096" if PARISC && !PA20
-+ default "4096" if X86_XEN || X86_64_XEN
- default "4"
-
- #
-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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/lib/swiotlb-xen.c linux-2.6.18-xen-3.2.0/lib/swiotlb-xen.c
+--- linux-2.6.18.8/lib/swiotlb-xen.c 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/lib/swiotlb-xen.c 2008-02-15 16:22:15.000000000 -0800
+@@ -0,0 +1,745 @@
++/*
++ * Dynamic DMA mapping support.
++ *
++ * This implementation is a fallback for platforms that do not support
++ * I/O TLBs (aka DMA address translation hardware).
++ * Copyright (C) 2000 Asit Mallick <Asit.K.Mallick@intel.com>
++ * Copyright (C) 2000 Goutham Rao <goutham.rao@intel.com>
++ * Copyright (C) 2000, 2003 Hewlett-Packard Co
++ * David Mosberger-Tang <davidm@hpl.hp.com>
++ * Copyright (C) 2005 Keir Fraser <keir@xensource.com>
++ */
++
++#include <linux/cache.h>
++#include <linux/mm.h>
++#include <linux/module.h>
++#include <linux/pci.h>
++#include <linux/spinlock.h>
++#include <linux/string.h>
++#include <linux/types.h>
++#include <linux/ctype.h>
++#include <linux/init.h>
++#include <linux/bootmem.h>
++#include <linux/highmem.h>
++#include <asm/io.h>
++#include <asm/pci.h>
++#include <asm/dma.h>
++#include <asm/uaccess.h>
++#include <xen/gnttab.h>
++#include <xen/interface/memory.h>
++#include <asm-i386/mach-xen/asm/gnttab_dma.h>
++
++int swiotlb;
++EXPORT_SYMBOL(swiotlb);
++
++#define OFFSET(val,align) ((unsigned long)((val) & ( (align) - 1)))
++
++/*
++ * Maximum allowable number of contiguous slabs to map,
++ * must be a power of 2. What is the appropriate value ?
++ * The complexity of {map,unmap}_single is linearly dependent on this value.
++ */
++#define IO_TLB_SEGSIZE 128
++
++/*
++ * log of the size of each IO TLB slab. The number of slabs is command line
++ * controllable.
++ */
++#define IO_TLB_SHIFT 11
++
++int swiotlb_force;
++
++static char *iotlb_virt_start;
++static unsigned long iotlb_nslabs;
++
++/*
++ * Used to do a quick range check in swiotlb_unmap_single and
++ * swiotlb_sync_single_*, to see if the memory was in fact allocated by this
++ * API.
++ */
++static unsigned long iotlb_pfn_start, iotlb_pfn_end;
++
++/* Does the given dma address reside within the swiotlb aperture? */
++static inline int in_swiotlb_aperture(dma_addr_t dev_addr)
++{
++ unsigned long pfn = mfn_to_local_pfn(dev_addr >> PAGE_SHIFT);
++ return (pfn_valid(pfn)
++ && (pfn >= iotlb_pfn_start)
++ && (pfn < iotlb_pfn_end));
++}
++
++/*
++ * When the IOMMU overflows we return a fallback buffer. This sets the size.
++ */
++static unsigned long io_tlb_overflow = 32*1024;
++
++void *io_tlb_overflow_buffer;
++
++/*
++ * This is a free list describing the number of free entries available from
++ * each index
++ */
++static unsigned int *io_tlb_list;
++static unsigned int io_tlb_index;
++
++/*
++ * We need to save away the original address corresponding to a mapped entry
++ * for the sync operations.
++ */
++static struct phys_addr {
++ struct page *page;
++ unsigned int offset;
++} *io_tlb_orig_addr;
++
++/*
++ * Protect the above data structures in the map and unmap calls
++ */
++static DEFINE_SPINLOCK(io_tlb_lock);
++
++static unsigned int dma_bits;
++static unsigned int __initdata max_dma_bits = 32;
++static int __init
++setup_dma_bits(char *str)
++{
++ max_dma_bits = simple_strtoul(str, NULL, 0);
++ return 0;
++}
++__setup("dma_bits=", setup_dma_bits);
++
++static int __init
++setup_io_tlb_npages(char *str)
++{
++ /* Unlike ia64, the size is aperture in megabytes, not 'slabs'! */
++ if (isdigit(*str)) {
++ iotlb_nslabs = simple_strtoul(str, &str, 0) <<
++ (20 - IO_TLB_SHIFT);
++ iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE);
++ /* Round up to power of two (xen_create_contiguous_region). */
++ while (iotlb_nslabs & (iotlb_nslabs-1))
++ iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1);
++ }
++ if (*str == ',')
++ ++str;
++ /*
++ * NB. 'force' enables the swiotlb, but doesn't force its use for
++ * every DMA like it does on native Linux. 'off' forcibly disables
++ * use of the swiotlb.
++ */
++ if (!strcmp(str, "force"))
++ swiotlb_force = 1;
++ else if (!strcmp(str, "off"))
++ swiotlb_force = -1;
++ return 1;
++}
++__setup("swiotlb=", setup_io_tlb_npages);
++/* make io_tlb_overflow tunable too? */
++
++/*
++ * Statically reserve bounce buffer space and initialize bounce buffer data
++ * structures for the software IO TLB used to implement the PCI DMA API.
++ */
++void
++swiotlb_init_with_default_size (size_t default_size)
++{
++ unsigned long i, bytes;
++ int rc;
++
++ if (!iotlb_nslabs) {
++ iotlb_nslabs = (default_size >> IO_TLB_SHIFT);
++ iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE);
++ /* Round up to power of two (xen_create_contiguous_region). */
++ while (iotlb_nslabs & (iotlb_nslabs-1))
++ iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1);
++ }
++
++ bytes = iotlb_nslabs * (1UL << IO_TLB_SHIFT);
++
++ /*
++ * Get IO TLB memory from the low pages
++ */
++ iotlb_virt_start = alloc_bootmem_low_pages(bytes);
++ if (!iotlb_virt_start)
++ panic("Cannot allocate SWIOTLB buffer!\n");
++
++ dma_bits = get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT) + PAGE_SHIFT;
++ for (i = 0; i < iotlb_nslabs; i += IO_TLB_SEGSIZE) {
++ do {
++ rc = xen_create_contiguous_region(
++ (unsigned long)iotlb_virt_start + (i << IO_TLB_SHIFT),
++ get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT),
++ dma_bits);
++ } while (rc && dma_bits++ < max_dma_bits);
++ if (rc) {
++ if (i == 0)
++ panic("No suitable physical memory available for SWIOTLB buffer!\n"
++ "Use dom0_mem Xen boot parameter to reserve\n"
++ "some DMA memory (e.g., dom0_mem=-128M).\n");
++ iotlb_nslabs = i;
++ i <<= IO_TLB_SHIFT;
++ free_bootmem(__pa(iotlb_virt_start + i), bytes - i);
++ bytes = i;
++ for (dma_bits = 0; i > 0; i -= IO_TLB_SEGSIZE << IO_TLB_SHIFT) {
++ unsigned int bits = fls64(virt_to_bus(iotlb_virt_start + i - 1));
++
++ if (bits > dma_bits)
++ dma_bits = bits;
++ }
++ break;
++ }
++ }
++
++ /*
++ * Allocate and initialize the free list array. This array is used
++ * to find contiguous free memory regions of size up to IO_TLB_SEGSIZE.
++ */
++ io_tlb_list = alloc_bootmem(iotlb_nslabs * sizeof(int));
++ for (i = 0; i < iotlb_nslabs; i++)
++ io_tlb_list[i] = IO_TLB_SEGSIZE - OFFSET(i, IO_TLB_SEGSIZE);
++ io_tlb_index = 0;
++ io_tlb_orig_addr = alloc_bootmem(
++ iotlb_nslabs * sizeof(*io_tlb_orig_addr));
++
++ /*
++ * Get the overflow emergency buffer
++ */
++ io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow);
++ if (!io_tlb_overflow_buffer)
++ panic("Cannot allocate SWIOTLB overflow buffer!\n");
++
++ do {
++ rc = xen_create_contiguous_region(
++ (unsigned long)io_tlb_overflow_buffer,
++ get_order(io_tlb_overflow),
++ dma_bits);
++ } while (rc && dma_bits++ < max_dma_bits);
++ if (rc)
++ panic("No suitable physical memory available for SWIOTLB overflow buffer!\n");
++
++ iotlb_pfn_start = __pa(iotlb_virt_start) >> PAGE_SHIFT;
++ iotlb_pfn_end = iotlb_pfn_start + (bytes >> PAGE_SHIFT);
++
++ printk(KERN_INFO "Software IO TLB enabled: \n"
++ " Aperture: %lu megabytes\n"
++ " Kernel range: %p - %p\n"
++ " Address size: %u bits\n",
++ bytes >> 20,
++ iotlb_virt_start, iotlb_virt_start + bytes,
++ dma_bits);
++}
++
++void
++swiotlb_init(void)
++{
++ long ram_end;
++ size_t defsz = 64 * (1 << 20); /* 64MB default size */
++
++ if (swiotlb_force == 1) {
++ swiotlb = 1;
++ } else if ((swiotlb_force != -1) &&
++ is_running_on_xen() &&
++ is_initial_xendomain()) {
++ /* Domain 0 always has a swiotlb. */
++ ram_end = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL);
++ if (ram_end <= 0x7ffff)
++ defsz = 2 * (1 << 20); /* 2MB on <2GB on systems. */
++ swiotlb = 1;
++ }
++
++ if (swiotlb)
++ swiotlb_init_with_default_size(defsz);
++ else
++ printk(KERN_INFO "Software IO TLB disabled\n");
++}
++
++/*
++ * We use __copy_to_user_inatomic to transfer to the host buffer because the
++ * buffer may be mapped read-only (e.g, in blkback driver) but lower-level
++ * drivers map the buffer for DMA_BIDIRECTIONAL access. This causes an
++ * unnecessary copy from the aperture to the host buffer, and a page fault.
++ */
++static void
++__sync_single(struct phys_addr buffer, char *dma_addr, size_t size, int dir)
++{
++ if (PageHighMem(buffer.page)) {
++ size_t len, bytes;
++ char *dev, *host, *kmp;
++ len = size;
++ while (len != 0) {
++ unsigned long flags;
++
++ if (((bytes = len) + buffer.offset) > PAGE_SIZE)
++ bytes = PAGE_SIZE - buffer.offset;
++ local_irq_save(flags); /* protects KM_BOUNCE_READ */
++ kmp = kmap_atomic(buffer.page, KM_BOUNCE_READ);
++ dev = dma_addr + size - len;
++ host = kmp + buffer.offset;
++ if (dir == DMA_FROM_DEVICE) {
++ if (__copy_to_user_inatomic(host, dev, bytes))
++ /* inaccessible */;
++ } else
++ memcpy(dev, host, bytes);
++ kunmap_atomic(kmp, KM_BOUNCE_READ);
++ local_irq_restore(flags);
++ len -= bytes;
++ buffer.page++;
++ buffer.offset = 0;
++ }
++ } else {
++ char *host = (char *)phys_to_virt(
++ page_to_pseudophys(buffer.page)) + buffer.offset;
++ if (dir == DMA_FROM_DEVICE) {
++ if (__copy_to_user_inatomic(host, dma_addr, size))
++ /* inaccessible */;
++ } else if (dir == DMA_TO_DEVICE)
++ memcpy(dma_addr, host, size);
++ }
++}
++
++/*
++ * Allocates bounce buffer and returns its kernel virtual address.
++ */
++static void *
++map_single(struct device *hwdev, struct phys_addr buffer, size_t size, int dir)
++{
++ unsigned long flags;
++ char *dma_addr;
++ unsigned int nslots, stride, index, wrap;
++ struct phys_addr slot_buf;
++ int i;
++
++ /*
++ * For mappings greater than a page, we limit the stride (and
++ * hence alignment) to a page size.
++ */
++ nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
++ if (size > PAGE_SIZE)
++ stride = (1 << (PAGE_SHIFT - IO_TLB_SHIFT));
++ else
++ stride = 1;
++
++ BUG_ON(!nslots);
++
++ /*
++ * Find suitable number of IO TLB entries size that will fit this
++ * request and allocate a buffer from that IO TLB pool.
++ */
++ spin_lock_irqsave(&io_tlb_lock, flags);
++ {
++ wrap = index = ALIGN(io_tlb_index, stride);
++
++ if (index >= iotlb_nslabs)
++ wrap = index = 0;
++
++ do {
++ /*
++ * If we find a slot that indicates we have 'nslots'
++ * number of contiguous buffers, we allocate the
++ * buffers from that slot and mark the entries as '0'
++ * indicating unavailable.
++ */
++ if (io_tlb_list[index] >= nslots) {
++ int count = 0;
++
++ for (i = index; i < (int)(index + nslots); i++)
++ io_tlb_list[i] = 0;
++ for (i = index - 1;
++ (OFFSET(i, IO_TLB_SEGSIZE) !=
++ IO_TLB_SEGSIZE -1) && io_tlb_list[i];
++ i--)
++ io_tlb_list[i] = ++count;
++ dma_addr = iotlb_virt_start +
++ (index << IO_TLB_SHIFT);
++
++ /*
++ * Update the indices to avoid searching in
++ * the next round.
++ */
++ io_tlb_index =
++ ((index + nslots) < iotlb_nslabs
++ ? (index + nslots) : 0);
++
++ goto found;
++ }
++ index += stride;
++ if (index >= iotlb_nslabs)
++ index = 0;
++ } while (index != wrap);
++
++ spin_unlock_irqrestore(&io_tlb_lock, flags);
++ return NULL;
++ }
++ found:
++ spin_unlock_irqrestore(&io_tlb_lock, flags);
++
++ /*
++ * Save away the mapping from the original address to the DMA address.
++ * This is needed when we sync the memory. Then we sync the buffer if
++ * needed.
++ */
++ 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.
++ */
++static void
++unmap_single(struct device *hwdev, char *dma_addr, size_t size, int dir)
++{
++ 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 = dma_addr_to_phys_addr(dma_addr);
++
++ /*
++ * First, sync the memory before unmapping the entry
++ */
++ if ((dir == DMA_FROM_DEVICE) || (dir == DMA_BIDIRECTIONAL))
++ __sync_single(buffer, dma_addr, size, DMA_FROM_DEVICE);
++
++ /*
++ * Return the buffer to the free list by setting the corresponding
++ * entries to indicate the number of contigous entries available.
++ * While returning the entries to the free list, we merge the entries
++ * with slots below and above the pool being returned.
++ */
++ spin_lock_irqsave(&io_tlb_lock, flags);
++ {
++ count = ((index + nslots) < ALIGN(index + 1, IO_TLB_SEGSIZE) ?
++ io_tlb_list[index + nslots] : 0);
++ /*
++ * Step 1: return the slots to the free list, merging the
++ * slots with superceeding slots
++ */
++ for (i = index + nslots - 1; i >= index; i--)
++ io_tlb_list[i] = ++count;
++ /*
++ * Step 2: merge the returned slots with the preceding slots,
++ * if available (non zero)
++ */
++ for (i = index - 1;
++ (OFFSET(i, IO_TLB_SEGSIZE) !=
++ IO_TLB_SEGSIZE -1) && io_tlb_list[i];
++ i--)
++ io_tlb_list[i] = ++count;
++ }
++ spin_unlock_irqrestore(&io_tlb_lock, flags);
++}
++
++static void
++sync_single(struct device *hwdev, char *dma_addr, size_t size, int dir)
++{
++ 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);
++}
++
++static void
++swiotlb_full(struct device *dev, size_t size, int dir, int do_panic)
++{
++ /*
++ * Ran out of IOMMU space for this operation. This is very bad.
++ * Unfortunately the drivers cannot handle this operation properly.
++ * unless they check for pci_dma_mapping_error (most don't)
++ * When the mapping is small enough return a static buffer to limit
++ * the damage, or panic when the transfer is too big.
++ */
++ printk(KERN_ERR "PCI-DMA: Out of SW-IOMMU space for %lu bytes at "
++ "device %s\n", (unsigned long)size, dev ? dev->bus_id : "?");
++
++ if (size > io_tlb_overflow && do_panic) {
++ if (dir == PCI_DMA_FROMDEVICE || dir == PCI_DMA_BIDIRECTIONAL)
++ panic("PCI-DMA: Memory would be corrupted\n");
++ if (dir == PCI_DMA_TODEVICE || dir == PCI_DMA_BIDIRECTIONAL)
++ panic("PCI-DMA: Random memory would be DMAed\n");
++ }
++}
++
++/*
++ * Map a single buffer of the indicated size for DMA in streaming mode. The
++ * PCI address to use is returned.
++ *
++ * Once the device is given the dma address, the device owns this memory until
++ * either swiotlb_unmap_single or swiotlb_dma_sync_single is performed.
++ */
++dma_addr_t
++swiotlb_map_single(struct device *hwdev, void *ptr, size_t size, int dir)
++{
++ dma_addr_t dev_addr = gnttab_dma_map_page(virt_to_page(ptr)) +
++ offset_in_page(ptr);
++ void *map;
++ struct phys_addr buffer;
++
++ BUG_ON(dir == DMA_NONE);
++
++ /*
++ * If the pointer passed in happens to be in the device's DMA window,
++ * we can safely return the device addr and not worry about bounce
++ * buffering it.
++ */
++ if (!range_straddles_page_boundary(__pa(ptr), size) &&
++ !address_needs_mapping(hwdev, dev_addr))
++ return dev_addr;
++
++ /*
++ * Oh well, have to allocate and map a bounce buffer.
++ */
++ gnttab_dma_unmap_page(dev_addr);
++ buffer.page = virt_to_page(ptr);
++ buffer.offset = (unsigned long)ptr & ~PAGE_MASK;
++ map = map_single(hwdev, buffer, size, dir);
++ if (!map) {
++ swiotlb_full(hwdev, size, dir, 1);
++ map = io_tlb_overflow_buffer;
++ }
++
++ dev_addr = virt_to_bus(map);
++ return dev_addr;
++}
++
++/*
++ * Unmap a single streaming mode DMA translation. The dma_addr and size must
++ * match what was provided for in a previous swiotlb_map_single call. All
++ * other usages are undefined.
++ *
++ * After this call, reads by the cpu to the buffer are guaranteed to see
++ * whatever the device wrote there.
++ */
++void
++swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr, size_t size,
++ int dir)
++{
++ BUG_ON(dir == DMA_NONE);
++ if (in_swiotlb_aperture(dev_addr))
++ unmap_single(hwdev, bus_to_virt(dev_addr), size, dir);
++ else
++ gnttab_dma_unmap_page(dev_addr);
++}
++
++/*
++ * Make physical memory consistent for a single streaming mode DMA translation
++ * after a transfer.
++ *
++ * If you perform a swiotlb_map_single() but wish to interrogate the buffer
++ * using the cpu, yet do not wish to teardown the PCI dma mapping, you must
++ * call this function before doing so. At the next point you give the PCI dma
++ * address back to the card, you must first perform a
++ * swiotlb_dma_sync_for_device, and then the device again owns the buffer
++ */
++void
++swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
++ size_t size, int dir)
++{
++ BUG_ON(dir == DMA_NONE);
++ if (in_swiotlb_aperture(dev_addr))
++ sync_single(hwdev, bus_to_virt(dev_addr), size, dir);
++}
++
++void
++swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr,
++ size_t size, int dir)
++{
++ BUG_ON(dir == DMA_NONE);
++ if (in_swiotlb_aperture(dev_addr))
++ sync_single(hwdev, bus_to_virt(dev_addr), size, dir);
++}
++
++/*
++ * Map a set of buffers described by scatterlist in streaming mode for DMA.
++ * This is the scatter-gather version of the above swiotlb_map_single
++ * interface. Here the scatter gather list elements are each tagged with the
++ * appropriate dma address and length. They are obtained via
++ * sg_dma_{address,length}(SG).
++ *
++ * NOTE: An implementation may be able to use a smaller number of
++ * DMA address/length pairs than there are SG table elements.
++ * (for example via virtual mapping capabilities)
++ * The routine returns the number of addr/length pairs actually
++ * used, at most nents.
++ *
++ * Device ownership issues as mentioned above for swiotlb_map_single are the
++ * same here.
++ */
++int
++swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
++ int dir)
++{
++ struct phys_addr buffer;
++ dma_addr_t dev_addr;
++ char *map;
++ int i;
++
++ BUG_ON(dir == DMA_NONE);
++
++ for (i = 0; i < nelems; i++, sg++) {
++ dev_addr = gnttab_dma_map_page(sg->page) + sg->offset;
++
++ if (range_straddles_page_boundary(page_to_pseudophys(sg->page)
++ + sg->offset, sg->length)
++ || address_needs_mapping(hwdev, dev_addr)) {
++ gnttab_dma_unmap_page(dev_addr);
++ buffer.page = sg->page;
++ buffer.offset = sg->offset;
++ map = map_single(hwdev, buffer, sg->length, dir);
++ if (!map) {
++ /* Don't panic here, we expect map_sg users
++ to do proper error handling. */
++ swiotlb_full(hwdev, sg->length, dir, 0);
++ swiotlb_unmap_sg(hwdev, sg - i, i, dir);
++ sg[0].dma_length = 0;
++ return 0;
++ }
++ sg->dma_address = (dma_addr_t)virt_to_bus(map);
++ } else
++ sg->dma_address = dev_addr;
++ sg->dma_length = sg->length;
++ }
++ return nelems;
++}
++
++/*
++ * Unmap a set of streaming mode DMA translations. Again, cpu read rules
++ * concerning calls here are the same as for swiotlb_unmap_single() above.
++ */
++void
++swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
++ int dir)
++{
++ int i;
++
++ BUG_ON(dir == DMA_NONE);
++
++ for (i = 0; i < nelems; i++, sg++)
++ if (in_swiotlb_aperture(sg->dma_address))
++ unmap_single(hwdev,
++ (void *)bus_to_virt(sg->dma_address),
++ sg->dma_length, dir);
++ else
++ gnttab_dma_unmap_page(sg->dma_address);
++}
++
++/*
++ * Make physical memory consistent for a set of streaming mode DMA translations
++ * after a transfer.
++ *
++ * The same as swiotlb_sync_single_* but for a scatter-gather list, same rules
++ * and usage.
++ */
++void
++swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
++ int nelems, int dir)
++{
++ int i;
++
++ BUG_ON(dir == DMA_NONE);
++
++ for (i = 0; i < nelems; i++, sg++)
++ if (in_swiotlb_aperture(sg->dma_address))
++ sync_single(hwdev,
++ (void *)bus_to_virt(sg->dma_address),
++ sg->dma_length, dir);
++}
++
++void
++swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
++ int nelems, int dir)
++{
++ int i;
++
++ BUG_ON(dir == DMA_NONE);
++
++ for (i = 0; i < nelems; i++, sg++)
++ if (in_swiotlb_aperture(sg->dma_address))
++ sync_single(hwdev,
++ (void *)bus_to_virt(sg->dma_address),
++ sg->dma_length, dir);
++}
++
++#ifdef CONFIG_HIGHMEM
++
++dma_addr_t
++swiotlb_map_page(struct device *hwdev, struct page *page,
++ unsigned long offset, size_t size,
++ enum dma_data_direction direction)
++{
++ struct phys_addr buffer;
++ dma_addr_t dev_addr;
++ char *map;
++
++ dev_addr = gnttab_dma_map_page(page) + offset;
++ if (address_needs_mapping(hwdev, dev_addr)) {
++ gnttab_dma_unmap_page(dev_addr);
++ buffer.page = page;
++ buffer.offset = offset;
++ map = map_single(hwdev, buffer, size, direction);
++ if (!map) {
++ swiotlb_full(hwdev, size, direction, 1);
++ map = io_tlb_overflow_buffer;
++ }
++ dev_addr = (dma_addr_t)virt_to_bus(map);
++ }
++
++ return dev_addr;
++}
++
++void
++swiotlb_unmap_page(struct device *hwdev, dma_addr_t dma_address,
++ size_t size, enum dma_data_direction direction)
++{
++ BUG_ON(direction == DMA_NONE);
++ if (in_swiotlb_aperture(dma_address))
++ unmap_single(hwdev, bus_to_virt(dma_address), size, direction);
++ else
++ gnttab_dma_unmap_page(dma_address);
++}
++
++#endif
++
++int
++swiotlb_dma_mapping_error(dma_addr_t dma_addr)
++{
++ return (dma_addr == virt_to_bus(io_tlb_overflow_buffer));
++}
++
++/*
++ * Return whether the given PCI device DMA address mask can be supported
++ * properly. For example, if your device can only drive the low 24-bits
++ * during PCI bus mastering, then you would pass 0x00ffffff as the mask to
++ * this function.
++ */
++int
++swiotlb_dma_supported (struct device *hwdev, u64 mask)
++{
++ return (mask >= ((1UL << dma_bits) - 1));
++}
++
++EXPORT_SYMBOL(swiotlb_init);
++EXPORT_SYMBOL(swiotlb_map_single);
++EXPORT_SYMBOL(swiotlb_unmap_single);
++EXPORT_SYMBOL(swiotlb_map_sg);
++EXPORT_SYMBOL(swiotlb_unmap_sg);
++EXPORT_SYMBOL(swiotlb_sync_single_for_cpu);
++EXPORT_SYMBOL(swiotlb_sync_single_for_device);
++EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu);
++EXPORT_SYMBOL(swiotlb_sync_sg_for_device);
++EXPORT_SYMBOL(swiotlb_dma_mapping_error);
++EXPORT_SYMBOL(swiotlb_dma_supported);
+diff -rpuN linux-2.6.18.8/mm/highmem.c linux-2.6.18-xen-3.2.0/mm/highmem.c
+--- linux-2.6.18.8/mm/highmem.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/mm/highmem.c 2008-02-15 16:22:15.000000000 -0800
@@ -142,6 +142,17 @@ start:
return vaddr;
}
@@ -106360,10 +139299,36 @@ diff -Nurp pristine-linux-2.6.18/mm/highmem.c tmp-linux-2.6-xen.patch/mm/highmem
void fastcall *kmap_high(struct page *page)
{
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-11-14 15:35:27.000000000 -0800
-@@ -403,7 +403,8 @@ struct page *vm_normal_page(struct vm_ar
+@@ -457,6 +468,12 @@ void blk_queue_bounce(request_queue_t *q
+ mempool_t *pool;
+
+ /*
++ * Data-less bio, nothing to bounce
++ */
++ if (bio_empty_barrier(*bio_orig))
++ return;
++
++ /*
+ * for non-isa bounce case, just check if the bounce pfn is equal
+ * to or bigger than the highest pfn in the system -- in that case,
+ * don't waste time iterating over bio segments
+diff -rpuN linux-2.6.18.8/mm/memory.c linux-2.6.18-xen-3.2.0/mm/memory.c
+--- linux-2.6.18.8/mm/memory.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/mm/memory.c 2008-02-15 16:22:15.000000000 -0800
+@@ -396,6 +396,12 @@ struct page *vm_normal_page(struct vm_ar
+ return NULL;
+ }
+
++#if defined(CONFIG_XEN) && defined(CONFIG_X86)
++ /* XEN: Covers user-space grant mappings (even of local pages). */
++ if (unlikely(vma->vm_flags & VM_FOREIGN))
++ return NULL;
++#endif
++
+ /*
+ * Add some anal sanity checks for now. Eventually,
+ * we should just do "return pfn_to_page(pfn)", but
+@@ -403,7 +409,8 @@ struct page *vm_normal_page(struct vm_ar
* and that the resulting page looks ok.
*/
if (unlikely(!pfn_valid(pfn))) {
@@ -106373,7 +139338,7 @@ diff -Nurp pristine-linux-2.6.18/mm/memory.c tmp-linux-2.6-xen.patch/mm/memory.c
return NULL;
}
-@@ -658,8 +659,12 @@ static unsigned long zap_pte_range(struc
+@@ -658,8 +665,12 @@ static unsigned long zap_pte_range(struc
page->index > details->last_index))
continue;
}
@@ -106388,7 +139353,7 @@ diff -Nurp pristine-linux-2.6.18/mm/memory.c tmp-linux-2.6-xen.patch/mm/memory.c
tlb_remove_tlb_entry(tlb, pte, addr);
if (unlikely(!page))
continue;
-@@ -754,6 +759,7 @@ static unsigned long unmap_page_range(st
+@@ -754,6 +765,7 @@ static unsigned long unmap_page_range(st
details = NULL;
BUG_ON(addr >= end);
@@ -106396,7 +139361,7 @@ diff -Nurp pristine-linux-2.6.18/mm/memory.c tmp-linux-2.6-xen.patch/mm/memory.c
tlb_start_vma(tlb, vma);
pgd = pgd_offset(vma->vm_mm, addr);
do {
-@@ -891,6 +897,7 @@ unsigned long zap_page_range(struct vm_a
+@@ -891,6 +903,7 @@ unsigned long zap_page_range(struct vm_a
tlb_finish_mmu(tlb, address, end);
return end;
}
@@ -106404,7 +139369,7 @@ diff -Nurp pristine-linux-2.6.18/mm/memory.c tmp-linux-2.6-xen.patch/mm/memory.c
/*
* Do a quick page-table lookup for a single page.
-@@ -1030,6 +1037,26 @@ int get_user_pages(struct task_struct *t
+@@ -1030,6 +1043,26 @@ int get_user_pages(struct task_struct *t
continue;
}
@@ -106431,7 +139396,7 @@ diff -Nurp pristine-linux-2.6.18/mm/memory.c tmp-linux-2.6-xen.patch/mm/memory.c
if (!vma || (vma->vm_flags & (VM_IO | VM_PFNMAP))
|| !(vm_flags & vma->vm_flags))
return i ? : -EFAULT;
-@@ -1369,6 +1396,102 @@ int remap_pfn_range(struct vm_area_struc
+@@ -1379,6 +1412,102 @@ int remap_pfn_range(struct vm_area_struc
}
EXPORT_SYMBOL(remap_pfn_range);
@@ -106534,9 +139499,9 @@ diff -Nurp pristine-linux-2.6.18/mm/memory.c tmp-linux-2.6-xen.patch/mm/memory.c
/*
* handle_pte_fault chooses page fault handler according to an entry
* 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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/mm/mmap.c linux-2.6.18-xen-3.2.0/mm/mmap.c
+--- linux-2.6.18.8/mm/mmap.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/mm/mmap.c 2008-02-15 16:22:15.000000000 -0800
@@ -1963,6 +1963,10 @@ void exit_mmap(struct mm_struct *mm)
unsigned long nr_accounted = 0;
unsigned long end;
@@ -106548,9 +139513,21 @@ diff -Nurp pristine-linux-2.6.18/mm/mmap.c tmp-linux-2.6-xen.patch/mm/mmap.c
lru_add_drain();
flush_cache_mm(mm);
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/mm/mprotect.c linux-2.6.18-xen-3.2.0/mm/mprotect.c
+--- linux-2.6.18.8/mm/mprotect.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/mm/mprotect.c 2008-02-15 16:22:15.000000000 -0800
+@@ -76,6 +76,8 @@ static inline void change_pmd_range(stru
+ next = pmd_addr_end(addr, end);
+ if (pmd_none_or_clear_bad(pmd))
+ continue;
++ if (arch_change_pte_range(mm, pmd, addr, next, newprot))
++ continue;
+ change_pte_range(mm, pmd, addr, next, newprot);
+ } while (pmd++, addr = next, addr != end);
+ }
+diff -rpuN linux-2.6.18.8/mm/page_alloc.c linux-2.6.18-xen-3.2.0/mm/page_alloc.c
+--- linux-2.6.18.8/mm/page_alloc.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/mm/page_alloc.c 2008-02-15 16:22:15.000000000 -0800
@@ -154,7 +154,11 @@ static void bad_page(struct page *page)
1 << PG_slab |
1 << PG_swapcache |
@@ -106577,17 +139554,20 @@ diff -Nurp pristine-linux-2.6.18/mm/page_alloc.c tmp-linux-2.6-xen.patch/mm/page
bad_page(page);
if (PageDirty(page))
__ClearPageDirty(page);
-@@ -443,7 +451,8 @@ static void __free_pages_ok(struct page
+@@ -443,6 +451,12 @@ static void __free_pages_ok(struct page
int i;
int reserved = 0;
-- arch_free_page(page, order);
-+ if (arch_free_page(page, order))
++#ifdef CONFIG_XEN
++ if (PageForeign(page)) {
++ PageForeignDestructor(page);
+ return;
++ }
++#endif
+ arch_free_page(page, order);
if (!PageHighMem(page))
debug_check_no_locks_freed(page_address(page),
- PAGE_SIZE<<order);
-@@ -538,7 +547,11 @@ static int prep_new_page(struct page *pa
+@@ -538,7 +552,11 @@ static int prep_new_page(struct page *pa
1 << PG_swapcache |
1 << PG_writeback |
1 << PG_reserved |
@@ -106600,19 +139580,58 @@ diff -Nurp pristine-linux-2.6.18/mm/page_alloc.c tmp-linux-2.6-xen.patch/mm/page
bad_page(page);
/*
-@@ -717,7 +730,8 @@ static void fastcall free_hot_cold_page(
+@@ -717,6 +735,12 @@ static void fastcall free_hot_cold_page(
struct per_cpu_pages *pcp;
unsigned long flags;
-- arch_free_page(page, 0);
-+ if (arch_free_page(page, 0))
++#ifdef CONFIG_XEN
++ if (PageForeign(page)) {
++ PageForeignDestructor(page);
+ return;
++ }
++#endif
+ arch_free_page(page, 0);
if (PageAnon(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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/net/bridge/br_netfilter.c linux-2.6.18-xen-3.2.0/net/bridge/br_netfilter.c
+--- linux-2.6.18.8/net/bridge/br_netfilter.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/net/bridge/br_netfilter.c 2008-02-15 16:22:15.000000000 -0800
+@@ -127,10 +127,10 @@ static inline struct nf_bridge_info *nf_
+
+ static inline void nf_bridge_save_header(struct sk_buff *skb)
+ {
+- int header_size = 16;
++ int header_size = ETH_HLEN;
+
+ if (skb->protocol == htons(ETH_P_8021Q))
+- header_size = 18;
++ header_size += VLAN_HLEN;
+
+ memcpy(skb->nf_bridge->data, skb->data - header_size, header_size);
+ }
+diff -rpuN linux-2.6.18.8/net/bridge/netfilter/ebtables.c linux-2.6.18-xen-3.2.0/net/bridge/netfilter/ebtables.c
+--- linux-2.6.18.8/net/bridge/netfilter/ebtables.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/net/bridge/netfilter/ebtables.c 2008-02-15 16:22:15.000000000 -0800
+@@ -597,7 +597,7 @@ ebt_check_entry(struct ebt_entry *e, str
+ struct ebt_entry_target *t;
+ struct ebt_target *target;
+ unsigned int i, j, hook = 0, hookmask = 0;
+- size_t gap = e->next_offset - e->target_offset;
++ size_t gap;
+ int ret;
+
+ /* don't mess with the struct ebt_entries */
+@@ -647,6 +647,7 @@ ebt_check_entry(struct ebt_entry *e, str
+ if (ret != 0)
+ goto cleanup_watchers;
+ t = (struct ebt_entry_target *)(((char *)e) + e->target_offset);
++ gap = e->next_offset - e->target_offset;
+ target = find_target_lock(t->u.name, &ret, &ebt_mutex);
+ if (!target)
+ goto cleanup_watchers;
+diff -rpuN linux-2.6.18.8/net/core/dev.c linux-2.6.18-xen-3.2.0/net/core/dev.c
+--- linux-2.6.18.8/net/core/dev.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/net/core/dev.c 2008-02-15 16:22:15.000000000 -0800
@@ -113,11 +113,18 @@
#include <linux/wireless.h>
#include <net/iw_handler.h>
@@ -106698,7 +139717,7 @@ diff -Nurp pristine-linux-2.6.18/net/core/dev.c tmp-linux-2.6-xen.patch/net/core
/* GSO will handle the following emulations directly. */
if (netif_needs_gso(dev, skb))
goto gso;
-@@ -1796,6 +1846,19 @@ int netif_receive_skb(struct sk_buff *sk
+@@ -1798,6 +1848,19 @@ int netif_receive_skb(struct sk_buff *sk
}
#endif
@@ -106718,7 +139737,7 @@ diff -Nurp pristine-linux-2.6.18/net/core/dev.c tmp-linux-2.6-xen.patch/net/core
list_for_each_entry_rcu(ptype, &ptype_all, list) {
if (!ptype->dev || ptype->dev == skb->dev) {
if (pt_prev)
-@@ -3582,6 +3645,7 @@ EXPORT_SYMBOL(unregister_netdevice_notif
+@@ -3584,6 +3647,7 @@ EXPORT_SYMBOL(unregister_netdevice_notif
EXPORT_SYMBOL(net_enable_timestamp);
EXPORT_SYMBOL(net_disable_timestamp);
EXPORT_SYMBOL(dev_get_flags);
@@ -106726,9 +139745,9 @@ diff -Nurp pristine-linux-2.6.18/net/core/dev.c tmp-linux-2.6-xen.patch/net/core
#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
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-11-14 15:35:27.000000000 -0800
+diff -rpuN linux-2.6.18.8/net/core/skbuff.c linux-2.6.18-xen-3.2.0/net/core/skbuff.c
+--- linux-2.6.18.8/net/core/skbuff.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/net/core/skbuff.c 2008-02-15 16:22:15.000000000 -0800
@@ -240,6 +240,7 @@ struct sk_buff *alloc_skb_from_cache(kme
skb_shinfo(skb)->gso_size = 0;
skb_shinfo(skb)->gso_segs = 0;
@@ -106748,9 +139767,9 @@ diff -Nurp pristine-linux-2.6.18/net/core/skbuff.c tmp-linux-2.6-xen.patch/net/c
C(pkt_type);
C(ip_summed);
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-11-16 16:18:12.000000000 -0800
+diff -rpuN linux-2.6.18.8/net/ipv4/netfilter/ip_nat_proto_tcp.c linux-2.6.18-xen-3.2.0/net/ipv4/netfilter/ip_nat_proto_tcp.c
+--- linux-2.6.18.8/net/ipv4/netfilter/ip_nat_proto_tcp.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/net/ipv4/netfilter/ip_nat_proto_tcp.c 2008-02-15 16:22:16.000000000 -0800
@@ -129,7 +129,12 @@ tcp_manip_pkt(struct sk_buff **pskb,
if (hdrsize < sizeof(*hdr))
return 1;
@@ -106765,9 +139784,9 @@ diff -Nurp pristine-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_tcp.c tmp-linux
ip_nat_cheat_check(oldport ^ 0xFFFF,
newport,
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-11-16 16:18:12.000000000 -0800
+diff -rpuN linux-2.6.18.8/net/ipv4/netfilter/ip_nat_proto_udp.c linux-2.6.18-xen-3.2.0/net/ipv4/netfilter/ip_nat_proto_udp.c
+--- linux-2.6.18.8/net/ipv4/netfilter/ip_nat_proto_udp.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/net/ipv4/netfilter/ip_nat_proto_udp.c 2008-02-15 16:22:16.000000000 -0800
@@ -113,11 +113,17 @@ udp_manip_pkt(struct sk_buff **pskb,
newport = tuple->dst.u.udp.port;
portptr = &hdr->dest;
@@ -106788,9 +139807,9 @@ diff -Nurp pristine-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_udp.c tmp-linux
*portptr = newport;
return 1;
}
-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-11-16 16:18:12.000000000 -0800
+diff -rpuN linux-2.6.18.8/net/ipv4/tcp_input.c linux-2.6.18-xen-3.2.0/net/ipv4/tcp_input.c
+--- linux-2.6.18.8/net/ipv4/tcp_input.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/net/ipv4/tcp_input.c 2008-02-15 16:22:16.000000000 -0800
@@ -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.
@@ -106800,9 +139819,9 @@ diff -Nurp pristine-linux-2.6.18/net/ipv4/tcp_input.c tmp-linux-2.6-xen.patch/ne
if (len >= icsk->icsk_ack.rcv_mss) {
icsk->icsk_ack.rcv_mss = len;
} 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-11-16 16:18:12.000000000 -0800
+diff -rpuN linux-2.6.18.8/net/ipv4/xfrm4_output.c linux-2.6.18-xen-3.2.0/net/ipv4/xfrm4_output.c
+--- linux-2.6.18.8/net/ipv4/xfrm4_output.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/net/ipv4/xfrm4_output.c 2008-02-15 16:22:16.000000000 -0800
@@ -18,6 +18,8 @@
#include <net/xfrm.h>
#include <net/icmp.h>
@@ -106823,21 +139842,101 @@ diff -Nurp pristine-linux-2.6.18/net/ipv4/xfrm4_output.c tmp-linux-2.6-xen.patch
if (skb->ip_summed == CHECKSUM_HW) {
err = skb_checksum_help(skb, 0);
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-11-14 15:35:27.000000000 -0800
-@@ -0,0 +1,14 @@
+diff -rpuN linux-2.6.18.8/scripts/Makefile.build linux-2.6.18-xen-3.2.0/scripts/Makefile.build
+--- linux-2.6.18.8/scripts/Makefile.build 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/scripts/Makefile.build 2008-02-15 16:22:17.000000000 -0800
+@@ -68,6 +68,20 @@ ifndef obj
+ $(warning kbuild: Makefile.build is included improperly)
+ endif
+
++ifeq ($(CONFIG_XEN),y)
++$(objtree)/scripts/Makefile.xen: $(srctree)/scripts/Makefile.xen.awk $(srctree)/scripts/Makefile.build
++ @echo ' Updating $@'
++ $(if $(shell echo a | $(AWK) '{ print gensub(/a/, "AA", "g"); }'),\
++ ,$(error 'Your awk program does not define gensub. Use gawk or another awk with gensub'))
++ @$(AWK) -f $< $(filter-out $<,$^) >$@
++
++xen-src-single-used-m := $(patsubst $(srctree)/%,%,$(wildcard $(addprefix $(srctree)/,$(single-used-m:.o=-xen.c))))
++xen-single-used-m := $(xen-src-single-used-m:-xen.c=.o)
++single-used-m := $(filter-out $(xen-single-used-m),$(single-used-m))
++
++-include $(objtree)/scripts/Makefile.xen
++endif
+
-+# cherrypickxen($1 = allobj)
-+cherrypickxen = $(foreach var, $(1), \
-+ $(shell o=$(var); \
-+ c=$${o%.o}-xen.c; \
-+ s=$${o%.o}-xen.S; \
-+ oxen=$${o%.o}-xen.o; \
-+ [ -f $(srctree)/$(src)/$${c} ] || \
-+ [ -f $(srctree)/$(src)/$${s} ] \
-+ && echo $$oxen \
-+ || echo $(var) ) \
-+ )
-+# filterxen($1 = allobj, $2 = noobjs)
-+filterxen = $(filter-out $(2), $(1))
+ # ===========================================================================
+
+ ifneq ($(strip $(lib-y) $(lib-m) $(lib-n) $(lib-)),)
+diff -rpuN linux-2.6.18.8/scripts/Makefile.lib linux-2.6.18-xen-3.2.0/scripts/Makefile.lib
+--- linux-2.6.18.8/scripts/Makefile.lib 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/scripts/Makefile.lib 2008-02-15 16:22:17.000000000 -0800
+@@ -13,6 +13,12 @@ obj-m := $(filter-out $(obj-y),$(obj-m))
+
+ lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m)))
+
++# Remove objects forcibly disabled
++
++obj-y := $(filter-out $(disabled-obj-y),$(obj-y))
++obj-m := $(filter-out $(disabled-obj-y),$(obj-m))
++lib-y := $(filter-out $(disabled-obj-y),$(lib-y))
++
+
+ # Handle objects in subdirs
+ # ---------------------------------------------------------------------------
+diff -rpuN linux-2.6.18.8/scripts/Makefile.xen.awk linux-2.6.18-xen-3.2.0/scripts/Makefile.xen.awk
+--- linux-2.6.18.8/scripts/Makefile.xen.awk 1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/scripts/Makefile.xen.awk 2008-02-15 16:22:17.000000000 -0800
+@@ -0,0 +1,34 @@
++BEGIN {
++ is_rule = 0
++}
++
++/^[[:space:]]*#/ {
++ next
++}
++
++/^[[:space:]]*$/ {
++ if (is_rule)
++ print("")
++ is_rule = 0
++ next
++}
++
++/:[[:space:]]*%\.[cS][[:space:]]/ {
++ line = gensub(/%.([cS])/, "%-xen.\\1", "g", $0)
++ line = gensub(/(single-used-m)/, "xen-\\1", "g", line)
++ print line
++ is_rule = 1
++ next
++}
++
++/^[^\t]$/ {
++ if (is_rule)
++ print("")
++ is_rule = 0
++ next
++}
++
++is_rule {
++ print $0
++ next
++}
+diff -rpuN linux-2.6.18.8/sound/pci/hda/hda_intel.c linux-2.6.18-xen-3.2.0/sound/pci/hda/hda_intel.c
+--- linux-2.6.18.8/sound/pci/hda/hda_intel.c 2007-02-23 15:52:30.000000000 -0800
++++ linux-2.6.18-xen-3.2.0/sound/pci/hda/hda_intel.c 2008-02-15 16:22:18.000000000 -0800
+@@ -80,6 +80,7 @@ MODULE_SUPPORTED_DEVICE("{{Intel, ICH6},
+ "{Intel, ICH7},"
+ "{Intel, ESB2},"
+ "{Intel, ICH8},"
++ "{Intel, ICH9},"
+ "{ATI, SB450},"
+ "{ATI, SB600},"
+ "{ATI, RS600},"
+@@ -1634,6 +1635,8 @@ static struct pci_device_id azx_ids[] =
+ { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */
+ { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */
+ { 0x8086, 0x284b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH8 */
++ { 0x8086, 0x293e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH9 */
++ { 0x8086, 0x293f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH9 */
+ { 0x1002, 0x437b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ATI }, /* ATI SB450 */
+ { 0x1002, 0x4383, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ATI }, /* ATI SB600 */
+ { 0x1002, 0x793b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ATIHDMI }, /* ATI RS600 HDMI */
diff --git a/trunk/2.6.18/10002_i386-fix-xen_l1_entry_update-for-highptes.patch b/trunk/2.6.18/10002_i386-fix-xen_l1_entry_update-for-highptes.patch
deleted file mode 100644
index d4c059c..0000000
--- a/trunk/2.6.18/10002_i386-fix-xen_l1_entry_update-for-highptes.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-# HG changeset patch
-# User Keir Fraser <keir@xensource.com>
-# Date 1192114936 -3600
-# Node ID e797297402885cc19e0799c7bcaf3e1acb427523
-# Parent 48a6d8bc31b8717c4218fc5e3c5bc9d848703db4
-i386: Fix xen_l1_entry_update() for highptes.
-Signed-off-by: Keir Fraser <keir@xensource.com>
-
-diff -r 48a6d8bc31b8 -r e79729740288 arch/i386/mm/hypervisor.c
---- a/arch/i386/mm/hypervisor.c Wed Oct 10 11:32:15 2007 +0100
-+++ b/arch/i386/mm/hypervisor.c Thu Oct 11 16:02:16 2007 +0100
-@@ -47,7 +47,12 @@ void xen_l1_entry_update(pte_t *ptr, pte
- void xen_l1_entry_update(pte_t *ptr, pte_t val)
- {
- mmu_update_t u;
-+#ifdef CONFIG_HIGHPTE
-+ u.ptr = ((unsigned long)ptr >= (unsigned long)high_memory) ?
-+ arbitrary_virt_to_machine(ptr) : virt_to_machine(ptr);
-+#else
- u.ptr = virt_to_machine(ptr);
-+#endif
- u.val = __pte_val(val);
- BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
- }
diff --git a/trunk/2.6.18/30038_don-t-leak-nt-bit-into-next-task-xen.patch b/trunk/2.6.18/30038_don-t-leak-nt-bit-into-next-task-xen.patch
deleted file mode 100644
index 8ee7bc0..0000000
--- a/trunk/2.6.18/30038_don-t-leak-nt-bit-into-next-task-xen.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-
---- linux-2.6.18.6.orig/arch/x86_64/kernel/entry-xen.S
-+++ linux-2.6.18.6/arch/x86_64/kernel/entry-xen.S
-@@ -146,6 +146,10 @@
- /* rdi: prev */
- ENTRY(ret_from_fork)
- CFI_DEFAULT_STACK
-+ push kernel_eflags(%rip)
-+ CFI_ADJUST_CFA_OFFSET 4
-+ popf # reset kernel eflags
-+ CFI_ADJUST_CFA_OFFSET -4
- call schedule_tail
- GET_THREAD_INFO(%rcx)
- testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),threadinfo_flags(%rcx)
---- linux-2.6.18.6.orig/arch/x86_64/kernel/setup64-xen.c
-+++ linux-2.6.18.6/arch/x86_64/kernel/setup64-xen.c
-@@ -178,6 +178,8 @@ void __cpuinit check_efer(void)
- }
- }
-
-+unsigned long kernel_eflags;
-+
- /*
- * cpu_init() initializes state that is per-CPU. Some data is already
- * initialized (naturally) in the bootstrap process, such as the GDT
-@@ -290,4 +292,6 @@ void __cpuinit cpu_init (void)
- set_debugreg(0UL, 7);
-
- fpu_init();
-+
-+ raw_local_save_flags(kernel_eflags);
- }
diff --git a/trunk/2.6.18/50001_make-install.patch b/trunk/2.6.18/50001_make-install.patch
deleted file mode 100644
index 108c648..0000000
--- a/trunk/2.6.18/50001_make-install.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff -ru linux-2.6.18-xen.orig/arch/i386/Makefile linux-2.6.18-xen/arch/i386/Makefile
---- linux-2.6.18-xen.orig/arch/i386/Makefile 2007-07-16 17:58:05.000000000 -0700
-+++ linux-2.6.18-xen/arch/i386/Makefile 2007-07-16 18:22:18.000000000 -0700
-@@ -125,7 +125,7 @@
- $(Q)$(MAKE) $(build)=$(boot) $@
-
- install:
-- $(Q)$(MAKE) $(build)=$(boot) XENGUEST=$(XENGUEST) $@
-+ $(Q)$(MAKE) $(build)=$(boot) $@
- else
- all: bzImage
-
-diff -ru linux-2.6.18-xen.orig/arch/i386/boot-xen/Makefile linux-2.6.18-xen/arch/i386/boot-xen/Makefile
---- linux-2.6.18-xen.orig/arch/i386/boot-xen/Makefile 2007-07-16 17:58:05.000000000 -0700
-+++ linux-2.6.18-xen/arch/i386/boot-xen/Makefile 2007-07-16 18:36:08.000000000 -0700
-@@ -10,12 +10,17 @@
- INSTALL_ROOT := $(patsubst %/boot,%,$(INSTALL_PATH))
-
- XINSTALL_NAME ?= $(KERNELRELEASE)
-+
-+ifdef CONFIG_XEN_PRIVILEGED_GUEST
-+XENGUEST=
-+else
-+XENGUEST=-domU
-+endif
-+
- install:
- mkdir -p $(INSTALL_ROOT)/boot
-- ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
-- rm -f $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-- install -m0644 vmlinuz $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-- install -m0644 vmlinux $(INSTALL_ROOT)/boot/vmlinux-syms-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-- install -m0664 .config $(INSTALL_ROOT)/boot/config-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-- install -m0664 System.map $(INSTALL_ROOT)/boot/System.map-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
-- ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
-+ install -m0644 vmlinuz $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(XENGUEST)$(INSTALL_SUFFIX)
-+ install -m0644 vmlinux $(INSTALL_ROOT)/boot/vmlinux-syms-$(XINSTALL_NAME)$(XENGUEST)$(INSTALL_SUFFIX)
-+ install -m0664 .config $(INSTALL_ROOT)/boot/config-$(XINSTALL_NAME)$(XENGUEST)$(INSTALL_SUFFIX)
-+ install -m0664 System.map $(INSTALL_ROOT)/boot/System.map-$(XINSTALL_NAME)$(XENGUEST)$(INSTALL_SUFFIX)
-+ ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)-xen$(XENGUEST)$(INSTALL_SUFFIX)
-diff -ru linux-2.6.18-xen.orig/arch/x86_64/Makefile linux-2.6.18-xen/arch/x86_64/Makefile
---- linux-2.6.18-xen.orig/arch/x86_64/Makefile 2007-07-16 17:58:05.000000000 -0700
-+++ linux-2.6.18-xen/arch/x86_64/Makefile 2007-07-16 18:22:34.000000000 -0700
-@@ -91,7 +91,7 @@
- $(Q)$(MAKE) $(build)=$(boot) $@
-
- install:
-- $(Q)$(MAKE) $(build)=$(boot) XENGUEST=$(XENGUEST) $@
-+ $(Q)$(MAKE) $(build)=$(boot) $@
- else
- #Default target when executing "make"
- all: bzImage
diff --git a/trunk/2.6.18/50002_always-enable-xen-genapic.patch b/trunk/2.6.18/50002_always-enable-xen-genapic.patch
deleted file mode 100644
index a9b8b77..0000000
--- a/trunk/2.6.18/50002_always-enable-xen-genapic.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru linux-2.6.18-xen.orig/arch/x86_64/Kconfig linux-2.6.18-xen/arch/x86_64/Kconfig
---- linux-2.6.18-xen.orig/arch/x86_64/Kconfig 2007-08-07 17:37:58.000000000 -0700
-+++ linux-2.6.18-xen/arch/x86_64/Kconfig 2007-08-07 17:39:32.000000000 -0700
-@@ -234,7 +234,7 @@
- config X86_XEN_GENAPIC
- bool
- depends X86_64_XEN
-- default XEN_PRIVILEGED_GUEST || SMP
-+ default y
-
- config X86_LOCAL_APIC
- bool