--- /dev/null
+From: jbeulich@novell.com
+Subject: allow number of guest devices to be configurable
+Patch-mainline: obsolete
+
+... and derive NR_DYNIRQS from this (rather than having a hard-coded
+value).
+Similarly, allow the number of simultaneous transmits in netback to be
+configurable.
+
+--- sle11-2009-03-04.orig/drivers/xen/Kconfig 2009-03-05 15:45:30.000000000 +0100
++++ sle11-2009-03-04/drivers/xen/Kconfig 2008-12-05 16:57:43.000000000 +0100
+@@ -73,6 +73,15 @@ config XEN_NETDEV_BACKEND
+ network devices to other guests via a high-performance shared-memory
+ interface.
+
++config XEN_NETDEV_TX_SHIFT
++ int "Maximum simultaneous transmit requests (as a power of 2)"
++ depends on XEN_NETDEV_BACKEND
++ range 5 16
++ default 8
++ help
++ The maximum number transmits the driver can hold pending, expressed
++ as the exponent of a power of 2.
++
+ config XEN_NETDEV_PIPELINED_TRANSMITTER
+ bool "Pipelined transmitter (DANGEROUS)"
+ depends on XEN_NETDEV_BACKEND
+@@ -255,6 +264,16 @@ config XEN_SYSFS
+ help
+ Xen hypervisor attributes will show up under /sys/hypervisor/.
+
++config XEN_NR_GUEST_DEVICES
++ int "Number of guest devices"
++ range 0 4032 if 64BIT
++ range 0 960
++ default 256 if XEN_BACKEND
++ default 16
++ help
++ Specify the total number of virtual devices (i.e. both frontend
++ and backend) that you want the kernel to be able to service.
++
+ choice
+ prompt "Xen version compatibility"
+ default XEN_COMPAT_030002_AND_LATER
+--- sle11-2009-03-04.orig/drivers/xen/netback/netback.c 2009-03-05 15:45:30.000000000 +0100
++++ sle11-2009-03-04/drivers/xen/netback/netback.c 2008-12-23 09:35:35.000000000 +0100
+@@ -71,7 +71,7 @@ static DECLARE_TASKLET(net_rx_tasklet, n
+ static struct timer_list net_timer;
+ static struct timer_list netbk_tx_pending_timer;
+
+-#define MAX_PENDING_REQS 256
++#define MAX_PENDING_REQS (1U << CONFIG_XEN_NETDEV_TX_SHIFT)
+
+ static struct sk_buff_head rx_queue;
+
+@@ -1212,6 +1212,7 @@ static void net_tx_action(unsigned long
+ net_tx_action_dealloc();
+
+ mop = tx_map_ops;
++ BUILD_BUG_ON(MAX_SKB_FRAGS >= MAX_PENDING_REQS);
+ while (((NR_PENDING_REQS + MAX_SKB_FRAGS) < MAX_PENDING_REQS) &&
+ !list_empty(&net_schedule_list)) {
+ /* Get a netif from the list with work to do. */
+--- sle11-2009-03-04.orig/include/asm-x86/mach-xen/asm/irq_vectors.h 2009-03-05 15:45:30.000000000 +0100
++++ sle11-2009-03-04/include/asm-x86/mach-xen/asm/irq_vectors.h 2009-03-05 15:45:49.000000000 +0100
+@@ -44,7 +44,7 @@
+ #endif
+
+ #define DYNIRQ_BASE (PIRQ_BASE + NR_PIRQS)
+-#define NR_DYNIRQS 256
++#define NR_DYNIRQS (64 + CONFIG_XEN_NR_GUEST_DEVICES)
+
+ #define NR_IRQS (NR_PIRQS + NR_DYNIRQS)
+ #define NR_IRQ_VECTORS NR_IRQS