Subject: Fix xen configuration.
From: jbeulich@novell.com
Patch-mainline: n/a

--- sle11sp3.orig/arch/x86/Kconfig	2013-04-23 15:26:52.000000000 +0200
+++ sle11sp3/arch/x86/Kconfig	2013-02-05 16:04:48.000000000 +0100
@@ -193,6 +193,7 @@ config HAVE_CPUMASK_OF_CPU_MAP
 
 config ARCH_HIBERNATION_POSSIBLE
 	def_bool y
+	depends on !XEN
 
 config ARCH_SUSPEND_POSSIBLE
 	def_bool y
--- sle11sp3.orig/arch/x86/Kconfig.cpu	2011-06-30 15:35:37.000000000 +0200
+++ sle11sp3/arch/x86/Kconfig.cpu	2011-06-30 16:00:44.000000000 +0200
@@ -6,7 +6,7 @@ choice
 
 config M386
 	bool "386"
-	depends on X86_32 && !UML
+	depends on X86_32 && !UML && !XEN
 	---help---
 	  This is the processor type of your CPU. This information is used for
 	  optimizing purposes. In order to compile a kernel that can run on
@@ -47,7 +47,7 @@ config M386
 
 config M486
 	bool "486"
-	depends on X86_32
+	depends on X86_32 && !XEN
 	---help---
 	  Select this for a 486 series processor, either Intel or one of the
 	  compatible processors from AMD, Cyrix, IBM, or Intel.  Includes DX,
@@ -56,7 +56,7 @@ config M486
 
 config M586
 	bool "586/K5/5x86/6x86/6x86MX"
-	depends on X86_32
+	depends on X86_32 && !XEN
 	---help---
 	  Select this for an 586 or 686 series processor such as the AMD K5,
 	  the Cyrix 5x86, 6x86 and 6x86MX.  This choice does not
@@ -64,14 +64,14 @@ config M586
 
 config M586TSC
 	bool "Pentium-Classic"
-	depends on X86_32
+	depends on X86_32 && !XEN
 	---help---
 	  Select this for a Pentium Classic processor with the RDTSC (Read
 	  Time Stamp Counter) instruction for benchmarking.
 
 config M586MMX
 	bool "Pentium-MMX"
-	depends on X86_32
+	depends on X86_32 && !XEN
 	---help---
 	  Select this for a Pentium with the MMX graphics/multimedia
 	  extended instructions.
@@ -185,7 +185,7 @@ config MEFFICEON
 
 config MWINCHIPC6
 	bool "Winchip-C6"
-	depends on X86_32
+	depends on X86_32 && !XEN
 	---help---
 	  Select this for an IDT Winchip C6 chip.  Linux and GCC
 	  treat this chip as a 586TSC with some extended instructions
@@ -193,7 +193,7 @@ config MWINCHIPC6
 
 config MWINCHIP3D
 	bool "Winchip-2/Winchip-2A/Winchip-3"
-	depends on X86_32
+	depends on X86_32 && !XEN
 	---help---
 	  Select this for an IDT Winchip-2, 2A or 3.  Linux and GCC
 	  treat this chip as a 586TSC with some extended instructions
@@ -203,7 +203,7 @@ config MWINCHIP3D
 
 config MELAN
 	bool "AMD Elan"
-	depends on X86_32
+	depends on X86_32 && !XEN
 	---help---
 	  Select this for an AMD Elan processor.
 
@@ -211,19 +211,19 @@ config MELAN
 
 config MGEODEGX1
 	bool "GeodeGX1"
-	depends on X86_32
+	depends on X86_32 && !XEN
 	---help---
 	  Select this for a Geode GX1 (Cyrix MediaGX) chip.
 
 config MGEODE_LX
 	bool "Geode GX/LX"
-	depends on X86_32
+	depends on X86_32 && !XEN
 	---help---
 	  Select this for AMD Geode GX and LX processors.
 
 config MCYRIXIII
 	bool "CyrixIII/VIA-C3"
-	depends on X86_32
+	depends on X86_32 && !XEN
 	---help---
 	  Select this for a Cyrix III or C3 chip.  Presently Linux and GCC
 	  treat this chip as a generic 586. Whilst the CPU is 686 class,
@@ -338,7 +338,7 @@ config X86_PPRO_FENCE
 
 config X86_F00F_BUG
 	def_bool y
-	depends on (M586MMX || M586TSC || M586 || M486 || M386) && !X86_NO_IDT
+	depends on M586MMX || M586TSC || M586 || M486 || M386
 
 config X86_INVD_BUG
 	def_bool y
--- sle11sp3.orig/arch/x86/Kconfig.debug	2011-06-30 15:35:42.000000000 +0200
+++ sle11sp3/arch/x86/Kconfig.debug	2011-10-04 16:42:22.000000000 +0200
@@ -286,7 +286,7 @@ config DEBUG_STRICT_USER_COPY_CHECKS
 
 config KDB
 	bool "Built-in Kernel Debugger support"
-	depends on DEBUG_KERNEL
+	depends on DEBUG_KERNEL && !XEN
 	select KALLSYMS
 	select KALLSYMS_ALL
 	help
--- sle11sp3.orig/drivers/xen/Kconfig	2012-10-17 11:03:50.000000000 +0200
+++ sle11sp3/drivers/xen/Kconfig	2011-02-24 14:05:09.000000000 +0100
@@ -22,6 +22,7 @@ config XEN_PRIVILEGED_GUEST
 
 config XEN_UNPRIVILEGED_GUEST
 	def_bool !XEN_PRIVILEGED_GUEST
+	select PM
 
 config XEN_PRIVCMD
 	def_bool y
@@ -44,7 +45,7 @@ config XEN_BACKEND
 
 config XEN_BLKDEV_BACKEND
 	tristate "Block-device backend driver"
-        depends on XEN_BACKEND
+	depends on BLOCK && XEN_BACKEND
 	default XEN_BACKEND
 	help
 	  The block-device backend driver allows the kernel to export its
@@ -53,7 +54,7 @@ config XEN_BLKDEV_BACKEND
 
 config XEN_BLKDEV_TAP
 	tristate "Block-device tap backend driver"
-	depends on XEN_BACKEND
+	depends on BLOCK && XEN_BACKEND
 	default XEN_BACKEND
 	help
 	  The block tap driver is an alternative to the block back driver
@@ -65,7 +66,7 @@ config XEN_BLKDEV_TAP
 
 config XEN_BLKDEV_TAP2
 	tristate "Block-device tap backend driver 2"
-	depends on XEN_BACKEND
+	depends on BLOCK && XEN_BACKEND
 	default XEN_BACKEND
 	help
 	  The block tap driver is an alternative to the block back driver
@@ -116,7 +117,7 @@ config XEN_NETDEV_LOOPBACK
 
 config XEN_PCIDEV_BACKEND
 	tristate "PCI-device backend driver"
-	depends on PCI && XEN_BACKEND
+	depends on PCI && XEN_PRIVILEGED_GUEST && XEN_BACKEND
 	default XEN_BACKEND
 	help
 	  The PCI device backend driver allows the kernel to export arbitrary
@@ -127,8 +128,8 @@ config XEN_PCIDEV_BACKEND
 choice
 	prompt "PCI Backend Mode"
 	depends on XEN_PCIDEV_BACKEND
-	default XEN_PCIDEV_BACKEND_VPCI if !IA64
 	default XEN_PCIDEV_BACKEND_CONTROLLER if IA64
+	default XEN_PCIDEV_BACKEND_VPCI
 
 config XEN_PCIDEV_BACKEND_VPCI
 	bool "Virtual PCI"
