[kernel] r6488 - in dists/sid/linux-2.6-exp/debian/patches: . series

Bastian Blank waldi at costa.debian.org
Fri Apr 28 21:43:14 UTC 2006


Author: waldi
Date: Fri Apr 28 21:43:09 2006
New Revision: 6488

Added:
   dists/sid/linux-2.6-exp/debian/patches/xen-tree-3.0-testing-9659.patch
      - copied, changed from r6396, dists/sid/linux-2.6-exp/debian/patches/xen-tree-3.0-testing-9610.patch
Removed:
   dists/sid/linux-2.6-exp/debian/patches/xen-tree-3.0-testing-9610.patch
Modified:
   dists/sid/linux-2.6-exp/debian/patches/series/1-extra
Log:
* debian/patches/series/1-extra: Use new xen patch.
* debian/patches/xen-tree-3.0-testing-9610.patch: Remove.
* debian/patches/xen-tree-3.0-testing-9659.patch: Add.


Modified: dists/sid/linux-2.6-exp/debian/patches/series/1-extra
==============================================================================
--- dists/sid/linux-2.6-exp/debian/patches/series/1-extra	(original)
+++ dists/sid/linux-2.6-exp/debian/patches/series/1-extra	Fri Apr 28 21:43:09 2006
@@ -4,5 +4,5 @@
 + vserver-vs2.0.2-rc15-update.patch *_vserver *_xen-vserver
 + vserver-vs2.0.2-rc17-update.patch *_vserver *_xen-vserver
 + vserver-xen-clash.patch *_xen-vserver
-+ xen-tree-3.0-testing-9610.patch *_xen *_xen-vserver
++ xen-tree-3.0-testing-9659.patch *_xen *_xen-vserver
 + xen-tls.patch *_xen *_xen-vserver

Copied: dists/sid/linux-2.6-exp/debian/patches/xen-tree-3.0-testing-9659.patch (from r6396, dists/sid/linux-2.6-exp/debian/patches/xen-tree-3.0-testing-9610.patch)
==============================================================================
--- dists/sid/linux-2.6-exp/debian/patches/xen-tree-3.0-testing-9610.patch	(original)
+++ dists/sid/linux-2.6-exp/debian/patches/xen-tree-3.0-testing-9659.patch	Fri Apr 28 21:43:09 2006
@@ -2659,7 +2659,7 @@
 +#include "../../x86_64/kernel/early_printk-xen.c"
 diff -Nurp pristine-linux-2.6.16/arch/i386/kernel/entry.S tmp-linux-2.6-xen.patch/arch/i386/kernel/entry.S
 --- pristine-linux-2.6.16/arch/i386/kernel/entry.S	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/entry.S	2006-04-11 21:51:02.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/entry.S	2006-04-28 23:39:09.000000000 +0200
 @@ -406,7 +406,7 @@ vector=0
  ENTRY(irq_entries_start)
  .rept NR_IRQS
@@ -3560,8 +3560,8 @@
 +syscall_table_size=(.-sys_call_table)
 diff -Nurp pristine-linux-2.6.16/arch/i386/kernel/fixup.c tmp-linux-2.6-xen.patch/arch/i386/kernel/fixup.c
 --- pristine-linux-2.6.16/arch/i386/kernel/fixup.c	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/fixup.c	2006-04-05 22:43:19.000000000 +0200
-@@ -0,0 +1,95 @@
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/fixup.c	2006-04-18 16:21:25.000000000 +0200
+@@ -0,0 +1,96 @@
 +/******************************************************************************
 + * fixup.c
 + * 
@@ -3632,6 +3632,7 @@
 +	DP("");
 +
 +	for (i = 5; i > 0; i--) {
++		touch_softlockup_watchdog();
 +		printk("Pausing... %d", i);
 +		mdelay(1000);
 +		printk("\b\b\b\b\b\b\b\b\b\b\b\b");
@@ -3889,8 +3890,8 @@
 +
 diff -Nurp pristine-linux-2.6.16/arch/i386/kernel/io_apic-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/io_apic-xen.c
 --- pristine-linux-2.6.16/arch/i386/kernel/io_apic-xen.c	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/io_apic-xen.c	2006-04-05 22:43:19.000000000 +0200
-@@ -0,0 +1,2747 @@
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/io_apic-xen.c	2006-04-25 11:20:48.000000000 +0200
+@@ -0,0 +1,2753 @@
 +/*
 + *	Intel IO-APIC support for multi-Pentium hosts.
 + *
@@ -6378,6 +6379,12 @@
 +{
 +	if(sis_apic_bug == -1)
 +		sis_apic_bug = 0;
++	if (xen_start_info->flags & SIF_INITDOMAIN) {
++		dom0_op_t op = { .cmd = DOM0_PLATFORM_QUIRK };
++		op.u.platform_quirk.quirk_id = sis_apic_bug ?
++			QUIRK_IOAPIC_BAD_REGSEL : QUIRK_IOAPIC_GOOD_REGSEL;
++		HYPERVISOR_dom0_op(&op);
++	}
 +	return 0;
 +}
 +
@@ -6766,7 +6773,7 @@
 +}
 diff -Nurp pristine-linux-2.6.16/arch/i386/kernel/irq.c tmp-linux-2.6-xen.patch/arch/i386/kernel/irq.c
 --- pristine-linux-2.6.16/arch/i386/kernel/irq.c	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/irq.c	2006-04-11 21:51:02.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/irq.c	2006-04-28 23:39:09.000000000 +0200
 @@ -53,8 +53,8 @@ static union irq_ctx *softirq_ctx[NR_CPU
   */
  fastcall unsigned int do_IRQ(struct pt_regs *regs)
@@ -12656,7 +12663,7 @@
 +
 diff -Nurp pristine-linux-2.6.16/arch/i386/kernel/swiotlb.c tmp-linux-2.6-xen.patch/arch/i386/kernel/swiotlb.c
 --- pristine-linux-2.6.16/arch/i386/kernel/swiotlb.c	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/kernel/swiotlb.c	2006-04-05 22:43:19.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/swiotlb.c	2006-04-18 16:21:25.000000000 +0200
 @@ -0,0 +1,674 @@
 +/*
 + * Dynamic DMA mapping support.
@@ -12866,8 +12873,8 @@
 +}
 +
 +/*
-+ * We use __copy_to_user to transfer to the host buffer because the buffer
-+ * may be mapped read-only (e.g, in blkback driver) but lower-level
++ * 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.
 + */
@@ -12885,7 +12892,7 @@
 +			dev  = dma_addr + size - len;
 +			host = kmp + buffer.offset;
 +			if (dir == DMA_FROM_DEVICE) {
-+				if (__copy_to_user(host, dev, bytes))
++				if (__copy_to_user_inatomic(host, dev, bytes))
 +					/* inaccessible */;
 +			} else
 +				memcpy(dev, host, bytes);
@@ -12898,7 +12905,7 @@
 +		char *host = (char *)phys_to_virt(
 +			page_to_pseudophys(buffer.page)) + buffer.offset;
 +		if (dir == DMA_FROM_DEVICE) {
-+			if (__copy_to_user(host, dma_addr, size))
++			if (__copy_to_user_inatomic(host, dma_addr, size))
 +				/* inaccessible */;
 +		} else if (dir == DMA_TO_DEVICE)
 +			memcpy(dma_addr, host, size);
@@ -18416,7 +18423,7 @@
 +endif
 diff -Nurp pristine-linux-2.6.16/arch/i386/mm/pageattr.c tmp-linux-2.6-xen.patch/arch/i386/mm/pageattr.c
 --- pristine-linux-2.6.16/arch/i386/mm/pageattr.c	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/pageattr.c	2006-04-11 21:51:02.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/pageattr.c	2006-04-28 23:39:09.000000000 +0200
 @@ -78,7 +78,7 @@ static void set_pmd_pte(pte_t *kpte, uns
  	unsigned long flags;
  
@@ -18464,7 +18471,7 @@
  pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
 diff -Nurp pristine-linux-2.6.16/arch/i386/mm/pgtable-xen.c tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable-xen.c
 --- pristine-linux-2.6.16/arch/i386/mm/pgtable-xen.c	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable-xen.c	2006-04-05 22:43:19.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable-xen.c	2006-04-25 11:20:48.000000000 +0200
 @@ -0,0 +1,652 @@
 +/*
 + *  linux/arch/i386/mm/pgtable.c
@@ -18774,14 +18781,14 @@
 +			BUG_ON(rc);
 +		}
 +		if (HAVE_SHARED_KERNEL_PMD)
-+			memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD,
-+			       swapper_pg_dir + USER_PTRS_PER_PGD,
-+			       (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
++			clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
++					swapper_pg_dir + USER_PTRS_PER_PGD,
++					KERNEL_PGD_PTRS);
 +	} else {
 +		spin_lock_irqsave(&pgd_lock, flags);
-+		memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD,
-+		       swapper_pg_dir + USER_PTRS_PER_PGD,
-+		       (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
++		clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
++				swapper_pg_dir + USER_PTRS_PER_PGD,
++				KERNEL_PGD_PTRS);
 +		memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t));
 +		pgd_list_add(pgd);
 +		spin_unlock_irqrestore(&pgd_lock, flags);
@@ -18828,7 +18835,7 @@
 +			pmd_t *pmd = kmem_cache_alloc(pmd_cache, GFP_KERNEL);
 +			if (!pmd)
 +				goto out_oom;
-+			set_pgd(&pgd[USER_PTRS_PER_PGD], __pgd(1 + __pa(pmd)));
++			set_pgd(&pgd[i], __pgd(1 + __pa(pmd)));
 +		}
 +
 +		spin_lock_irqsave(&pgd_lock, flags);
@@ -26260,7 +26267,7 @@
  
 diff -Nurp pristine-linux-2.6.16/arch/x86_64/Kconfig tmp-linux-2.6-xen.patch/arch/x86_64/Kconfig
 --- pristine-linux-2.6.16/arch/x86_64/Kconfig	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/Kconfig	2006-04-05 22:43:19.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/x86_64/Kconfig	2006-04-18 16:21:25.000000000 +0200
 @@ -119,6 +119,22 @@ config GENERIC_CPU
  
  endchoice
@@ -26418,23 +26425,7 @@
  config UNORDERED_IO
         bool "Unordered IO mapping access"
         depends on EXPERIMENTAL
-@@ -522,6 +568,7 @@ config UNORDERED_IO
- 	 from i386. Requires that the driver writer used memory barriers
- 	 properly.
- 
-+if !X86_64_XEN
- source "drivers/pci/pcie/Kconfig"
- 
- source "drivers/pci/Kconfig"
-@@ -529,6 +576,7 @@ source "drivers/pci/Kconfig"
- source "drivers/pcmcia/Kconfig"
- 
- source "drivers/pci/hotplug/Kconfig"
-+endif
- 
- endmenu
- 
-@@ -592,4 +640,6 @@ source "security/Kconfig"
+@@ -592,4 +638,6 @@ source "security/Kconfig"
  
  source "crypto/Kconfig"
  
@@ -27724,7 +27715,7 @@
 +__setup("earlyprintk=", setup_early_printk);
 diff -Nurp pristine-linux-2.6.16/arch/x86_64/kernel/entry.S tmp-linux-2.6-xen.patch/arch/x86_64/kernel/entry.S
 --- pristine-linux-2.6.16/arch/x86_64/kernel/entry.S	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/entry.S	2006-04-11 21:51:02.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/entry.S	2006-04-28 23:39:09.000000000 +0200
 @@ -609,7 +609,7 @@ retint_kernel:	
   */		
  	.macro apicinterrupt num,func
@@ -31823,7 +31814,7 @@
 +}
 diff -Nurp pristine-linux-2.6.16/arch/x86_64/kernel/irq.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/irq.c
 --- pristine-linux-2.6.16/arch/x86_64/kernel/irq.c	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/irq.c	2006-04-11 21:51:02.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/irq.c	2006-04-28 23:39:09.000000000 +0200
 @@ -96,8 +96,8 @@ skip:
   */
  asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
@@ -36241,7 +36232,7 @@
 +
 diff -Nurp pristine-linux-2.6.16/arch/x86_64/kernel/smp.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/smp.c
 --- pristine-linux-2.6.16/arch/x86_64/kernel/smp.c	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/smp.c	2006-04-11 21:51:02.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/smp.c	2006-04-28 23:39:09.000000000 +0200
 @@ -135,10 +135,10 @@ asmlinkage void smp_invalidate_interrupt
  
  	cpu = smp_processor_id();
@@ -40578,7 +40569,7 @@
  		return -ENODEV;
 diff -Nurp pristine-linux-2.6.16/drivers/base/bus.c tmp-linux-2.6-xen.patch/drivers/base/bus.c
 --- pristine-linux-2.6.16/drivers/base/bus.c	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/base/bus.c	2006-04-11 21:51:02.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/base/bus.c	2006-04-28 23:39:08.000000000 +0200
 @@ -188,6 +188,11 @@ static ssize_t driver_bind(struct device
  		up(&dev->sem);
  		if (dev->parent)
@@ -42057,8 +42048,8 @@
 +obj-y += balloon.o
 diff -Nurp pristine-linux-2.6.16/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/blkback.c
 --- pristine-linux-2.6.16/drivers/xen/blkback/blkback.c	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/blkback.c	2006-04-11 14:38:57.000000000 +0200
-@@ -0,0 +1,604 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/blkback.c	2006-04-25 11:20:48.000000000 +0200
+@@ -0,0 +1,596 @@
 +/******************************************************************************
 + * arch/xen/drivers/blkif/backend/main.c
 + * 
@@ -42283,14 +42274,6 @@
 +	if (debug_lvl)
 +		printk(KERN_DEBUG "%s: started\n", current->comm);
 +
-+	/*
-+	 * This thread may start before we are connected to the frontend
-+	 * driver. In that case we must wait to be fully connected.
-+	 */
-+	wait_event_interruptible(
-+		blkif->wq,
-+		blkif_connected(blkif) || kthread_should_stop());
-+
 +	while (!kthread_should_stop()) {
 +		wait_event_interruptible(
 +			blkif->wq,
@@ -42665,8 +42648,8 @@
 + */
 diff -Nurp pristine-linux-2.6.16/drivers/xen/blkback/common.h tmp-linux-2.6-xen.patch/drivers/xen/blkback/common.h
 --- pristine-linux-2.6.16/drivers/xen/blkback/common.h	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/common.h	2006-04-11 14:38:57.000000000 +0200
-@@ -0,0 +1,150 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/common.h	2006-04-25 11:20:48.000000000 +0200
+@@ -0,0 +1,148 @@
 +/* 
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License version 2
@@ -42804,8 +42787,6 @@
 +
 +void update_blkif_status(blkif_t *blkif); 
 +
-+int blkif_connected(blkif_t *blkif);
-+
 +#endif /* __BLKIF__BACKEND__COMMON_H__ */
 +
 +/*
@@ -43148,8 +43129,8 @@
 + */
 diff -Nurp pristine-linux-2.6.16/drivers/xen/blkback/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/xenbus.c
 --- pristine-linux-2.6.16/drivers/xen/blkback/xenbus.c	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/xenbus.c	2006-04-11 14:38:57.000000000 +0200
-@@ -0,0 +1,430 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/xenbus.c	2006-04-25 11:20:48.000000000 +0200
+@@ -0,0 +1,425 @@
 +/*  Xenbus code for blkif backend
 +    Copyright (C) 2005 Rusty Russell <rusty at rustcorp.com.au>
 +    Copyright (C) 2005 XenSource Ltd
@@ -43193,24 +43174,38 @@
 +};
 +
 +
-+static void maybe_connect(struct backend_info *);
 +static void connect(struct backend_info *);
 +static int connect_ring(struct backend_info *);
 +static void backend_changed(struct xenbus_watch *, const char **,
 +			    unsigned int);
 +
-+int blkif_connected(blkif_t *blkif)
-+{
-+	return (blkif->be->dev->state == XenbusStateConnected);
-+}
 +
 +void update_blkif_status(blkif_t *blkif)
 +{ 
-+	if(blkif->irq && blkif->vbd.bdev) {
-+		blkif->status = CONNECTED; 
-+		(void)blkif_be_int(0, blkif, NULL); 
++	int err;
++
++	/* Not ready to connect? */
++	if (!blkif->irq || !blkif->vbd.bdev)
++		return;
++
++	/* Already connected? */
++	if (blkif->be->dev->state == XenbusStateConnected)
++		return;
++
++	/* Attempt to connect: exit if we fail to. */
++	connect(blkif->be);
++	if (blkif->be->dev->state != XenbusStateConnected)
++		return;
++
++	blkif->xenblkd = kthread_run(blkif_schedule, blkif,
++				     "xvd %d %02x:%02x",
++				     blkif->domid,
++				     blkif->be->major, blkif->be->minor);
++	if (IS_ERR(blkif->xenblkd)) {
++		err = PTR_ERR(blkif->xenblkd);
++		blkif->xenblkd = NULL;
++		xenbus_dev_error(blkif->be->dev, err, "start xenblkd");
 +	}
-+	maybe_connect(blkif->be); 
 +}
 +
 +
@@ -43376,17 +43371,6 @@
 +			return;
 +		}
 +
-+		be->blkif->xenblkd = kthread_run(blkif_schedule, be->blkif,
-+						 "xvd %d %02x:%02x",
-+						 be->blkif->domid,
-+						 be->major, be->minor);
-+		if (IS_ERR(be->blkif->xenblkd)) {
-+			err = PTR_ERR(be->blkif->xenblkd);
-+			be->blkif->xenblkd = NULL;
-+			xenbus_dev_error(dev, err, "start xenblkd");
-+			return;
-+		}
-+
 +		device_create_file(&dev->dev, &dev_attr_physical_device);
 +		device_create_file(&dev->dev, &dev_attr_mode);
 +
@@ -43446,14 +43430,6 @@
 +/* ** Connection ** */
 +
 +
-+static void maybe_connect(struct backend_info *be)
-+{
-+	if ((be->major != 0 || be->minor != 0) &&
-+	    be->blkif->status == CONNECTED)
-+		connect(be);
-+}
-+
-+
 +/**
 + * Write the physical details regarding the block device to the store, and
 + * switch to Connected state.
@@ -47351,8 +47327,8 @@
 + */
 diff -Nurp pristine-linux-2.6.16/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.patch/drivers/xen/core/evtchn.c
 --- pristine-linux-2.6.16/drivers/xen/core/evtchn.c	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/evtchn.c	2006-04-05 22:43:19.000000000 +0200
-@@ -0,0 +1,863 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/evtchn.c	2006-04-28 23:38:29.000000000 +0200
+@@ -0,0 +1,869 @@
 +/******************************************************************************
 + * evtchn.c
 + * 
@@ -47543,7 +47519,8 @@
 +{
 +	(void)HYPERVISOR_xen_version(0, NULL);
 +}
-+EXPORT_SYMBOL_GPL(force_evtchn_callback);
++/* Not a GPL symbol: used in ubiquitous macros, so too restrictive. */
++EXPORT_SYMBOL(force_evtchn_callback);
 +
 +/* NB. Interrupts are disabled on entry. */
 +asmlinkage void evtchn_do_upcall(struct pt_regs *regs)
@@ -47580,7 +47557,8 @@
 +{
 +	int irq;
 +
-+	for (irq = 0; irq < NR_IRQS; irq++)
++	/* Only allocate from dynirq range */
++	for (irq = DYNIRQ_BASE; irq < NR_IRQS; irq++)
 +		if (irq_bindcount[irq] == 0)
 +			break;
 +
@@ -47868,6 +47846,8 @@
 +{
 +	int evtchn = evtchn_from_irq(irq);
 +
++	move_native_irq(irq);
++
 +	if (VALID_EVTCHN(evtchn)) {
 +		mask_evtchn(evtchn);
 +		clear_evtchn(evtchn);
@@ -47991,6 +47971,8 @@
 +{
 +	int evtchn = evtchn_from_irq(irq);
 +
++	move_native_irq(irq);
++
 +	if (VALID_EVTCHN(evtchn)) {
 +		mask_evtchn(evtchn);
 +		clear_evtchn(evtchn);
@@ -48218,8 +48200,8 @@
 + */
 diff -Nurp pristine-linux-2.6.16/drivers/xen/core/features.c tmp-linux-2.6-xen.patch/drivers/xen/core/features.c
 --- pristine-linux-2.6.16/drivers/xen/core/features.c	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/core/features.c	2006-04-05 22:43:19.000000000 +0200
-@@ -0,0 +1,29 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/features.c	2006-04-28 23:38:29.000000000 +0200
+@@ -0,0 +1,30 @@
 +/******************************************************************************
 + * features.c
 + *
@@ -48234,7 +48216,8 @@
 +#include <xen/features.h>
 +
 +u8 xen_features[XENFEAT_NR_SUBMAPS * 32] __read_mostly;
-+EXPORT_SYMBOL_GPL(xen_features);
++/* Not a GPL symbol: used in ubiquitous macros, so too restrictive. */
++EXPORT_SYMBOL(xen_features);
 +
 +void setup_xen_features(void)
 +{
@@ -55471,8 +55454,8 @@
 +}
 diff -Nurp pristine-linux-2.6.16/drivers/xen/pciback/pciback.h tmp-linux-2.6-xen.patch/drivers/xen/pciback/pciback.h
 --- pristine-linux-2.6.16/drivers/xen/pciback/pciback.h	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/pciback.h	2006-04-05 22:43:19.000000000 +0200
-@@ -0,0 +1,78 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/pciback.h	2006-04-28 23:38:29.000000000 +0200
+@@ -0,0 +1,79 @@
 +/*
 + * PCI Backend Common Data Structures & Function Declarations
 + *
@@ -55504,6 +55487,7 @@
 +
 +	int evtchn_irq;
 +
++	struct vm_struct *sh_area;
 +	struct xen_pci_sharedinfo *sh_info;
 +};
 +
@@ -56538,8 +56522,8 @@
 +}
 diff -Nurp pristine-linux-2.6.16/drivers/xen/pciback/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/pciback/xenbus.c
 --- pristine-linux-2.6.16/drivers/xen/pciback/xenbus.c	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/xenbus.c	2006-04-05 22:43:19.000000000 +0200
-@@ -0,0 +1,441 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/pciback/xenbus.c	2006-04-28 23:38:29.000000000 +0200
+@@ -0,0 +1,446 @@
 +/*
 + * PCI Backend Xenbus Setup - handles setup with frontend and xend
 + *
@@ -56568,6 +56552,7 @@
 +
 +	spin_lock_init(&pdev->dev_lock);
 +
++	pdev->sh_area = NULL;
 +	pdev->sh_info = NULL;
 +	pdev->evtchn_irq = INVALID_EVTCHN_IRQ;
 +	pdev->be_watching = 0;
@@ -56590,7 +56575,7 @@
 +		unbind_from_irqhandler(pdev->evtchn_irq, pdev);
 +
 +	if (pdev->sh_info)
-+		xenbus_unmap_ring_vfree(pdev->xdev, pdev->sh_info);
++		xenbus_unmap_ring_vfree(pdev->xdev, pdev->sh_area);
 +
 +	pciback_release_devices(pdev);
 +
@@ -56605,15 +56590,19 @@
 +{
 +	int err = 0;
 +	int evtchn;
++	struct vm_struct *area;
++
 +	dev_dbg(&pdev->xdev->dev,
 +		"Attaching to frontend resources - gnt_ref=%d evtchn=%d\n",
 +		gnt_ref, remote_evtchn);
 +
-+	err =
-+	    xenbus_map_ring_valloc(pdev->xdev, gnt_ref,
-+				   (void **)&pdev->sh_info);
-+	if (err)
++	area = xenbus_map_ring_valloc(pdev->xdev, gnt_ref);
++	if (IS_ERR(area)) {
++		err = PTR_ERR(area);
 +		goto out;
++	}
++	pdev->sh_area = area;
++	pdev->sh_info = area->addr;
 +
 +	err = xenbus_bind_evtchn(pdev->xdev, remote_evtchn, &evtchn);
 +	if (err)
@@ -60556,8 +60545,8 @@
 +xenbus-objs += xenbus_dev.o
 diff -Nurp pristine-linux-2.6.16/drivers/xen/xenbus/xenbus_backend_client.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_backend_client.c
 --- pristine-linux-2.6.16/drivers/xen/xenbus/xenbus_backend_client.c	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_backend_client.c	2006-04-11 21:49:57.000000000 +0200
-@@ -0,0 +1,173 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_backend_client.c	2006-04-28 23:38:29.000000000 +0200
+@@ -0,0 +1,151 @@
 +/******************************************************************************
 + * Backend-client-facing interface for the Xenbus driver.  In other words, the
 + * interface between the Xenbus and the device-specific code in the backend
@@ -60590,12 +60579,13 @@
 + * IN THE SOFTWARE.
 + */
 +
++#include <linux/err.h>
 +#include <xen/gnttab.h>
 +#include <xen/xenbus.h>
 +#include <xen/driver_util.h>
 +
 +/* Based on Rusty Russell's skeleton driver's map_page */
-+int xenbus_map_ring_valloc(struct xenbus_device *dev, int gnt_ref, void **vaddr)
++struct vm_struct *xenbus_map_ring_valloc(struct xenbus_device *dev, int gnt_ref)
 +{
 +	struct gnttab_map_grant_ref op = {
 +		.flags = GNTMAP_host_map,
@@ -60604,11 +60594,9 @@
 +	};
 +	struct vm_struct *area;
 +
-+	*vaddr = NULL;
-+
 +	area = alloc_vm_area(PAGE_SIZE);
 +	if (!area)
-+		return -ENOMEM;
++		return ERR_PTR(-ENOMEM);
 +
 +	op.host_addr = (unsigned long)area->addr;
 +
@@ -60621,14 +60609,14 @@
 +		xenbus_dev_fatal(dev, op.status,
 +				 "mapping in shared page %d from domain %d",
 +				 gnt_ref, dev->otherend_id);
-+		return op.status;
++		BUG_ON(!IS_ERR(ERR_PTR(op.status)));
++		return ERR_PTR(op.status);
 +	}
 +
 +	/* Stuff the handle in an unused field */
 +	area->phys_addr = (unsigned long)op.handle;
 +
-+	*vaddr = area->addr;
-+	return 0;
++	return area;
 +}
 +EXPORT_SYMBOL_GPL(xenbus_map_ring_valloc);
 +
@@ -60658,34 +60646,13 @@
 +
 +
 +/* Based on Rusty Russell's skeleton driver's unmap_page */
-+int xenbus_unmap_ring_vfree(struct xenbus_device *dev, void *vaddr)
++int xenbus_unmap_ring_vfree(struct xenbus_device *dev, struct vm_struct *area)
 +{
-+	struct vm_struct *area;
 +	struct gnttab_unmap_grant_ref op = {
-+		.host_addr = (unsigned long)vaddr,
++		.host_addr = (unsigned long)area->addr,
++		.handle = (grant_handle_t)area->phys_addr
 +	};
 +
-+	/* It'd be nice if linux/vmalloc.h provided a find_vm_area(void *addr)
-+	 * method so that we don't have to muck with vmalloc internals here.
-+	 * We could force the user to hang on to their struct vm_struct from
-+	 * xenbus_map_ring_valloc, but these 6 lines considerably simplify
-+	 * this API.
-+	 */
-+	read_lock(&vmlist_lock);
-+	for (area = vmlist; area != NULL; area = area->next) {
-+		if (area->addr == vaddr)
-+			break;
-+	}
-+	read_unlock(&vmlist_lock);
-+
-+	if (!area) {
-+		xenbus_dev_error(dev, -ENOENT,
-+				 "can't find mapped virtual address %p", vaddr);
-+		return GNTST_bad_virt_addr;
-+	}
-+
-+	op.handle = (grant_handle_t)area->phys_addr;
-+
 +	lock_vm_area(area);
 +	BUG_ON(HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref, &op, 1));
 +	unlock_vm_area(area);
@@ -61300,8 +61267,8 @@
 + */
 diff -Nurp pristine-linux-2.6.16/drivers/xen/xenbus/xenbus_dev.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_dev.c
 --- pristine-linux-2.6.16/drivers/xen/xenbus/xenbus_dev.c	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_dev.c	2006-04-05 22:43:19.000000000 +0200
-@@ -0,0 +1,252 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_dev.c	2006-04-18 16:21:25.000000000 +0200
+@@ -0,0 +1,255 @@
 +/*
 + * xenbus_dev.c
 + * 
@@ -61418,6 +61385,7 @@
 +{
 +	struct xenbus_dev_data *u = filp->private_data;
 +	struct xenbus_dev_transaction *trans = NULL;
++	uint32_t msg_type;
 +	void *reply;
 +
 +	if ((len + u->len) > sizeof(u->u.buffer))
@@ -61430,7 +61398,9 @@
 +	if (u->len < (sizeof(u->u.msg) + u->u.msg.len))
 +		return len;
 +
-+	switch (u->u.msg.type) {
++	msg_type = u->u.msg.type;
++
++	switch (msg_type) {
 +	case XS_TRANSACTION_START:
 +	case XS_TRANSACTION_END:
 +	case XS_DIRECTORY:
@@ -61442,7 +61412,7 @@
 +	case XS_MKDIR:
 +	case XS_RM:
 +	case XS_SET_PERMS:
-+		if (u->u.msg.type == XS_TRANSACTION_START) {
++		if (msg_type == XS_TRANSACTION_START) {
 +			trans = kmalloc(sizeof(*trans), GFP_KERNEL);
 +			if (!trans)
 +				return -ENOMEM;
@@ -61454,10 +61424,10 @@
 +			return PTR_ERR(reply);
 +		}
 +
-+		if (u->u.msg.type == XS_TRANSACTION_START) {
++		if (msg_type == XS_TRANSACTION_START) {
 +			trans->handle = simple_strtoul(reply, NULL, 0);
 +			list_add(&trans->list, &u->transactions);
-+		} else if (u->u.msg.type == XS_TRANSACTION_END) {
++		} else if (msg_type == XS_TRANSACTION_END) {
 +			list_for_each_entry(trans, &u->transactions, list)
 +				if (trans->handle == u->u.msg.tx_id)
 +					break;
@@ -61556,8 +61526,8 @@
 + */
 diff -Nurp pristine-linux-2.6.16/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.c
 --- pristine-linux-2.6.16/drivers/xen/xenbus/xenbus_probe.c	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.c	2006-04-11 21:49:57.000000000 +0200
-@@ -0,0 +1,1091 @@
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.c	2006-04-18 16:21:25.000000000 +0200
+@@ -0,0 +1,1093 @@
 +/******************************************************************************
 + * Talks to Xen Store to figure out what devices we have.
 + *
@@ -62385,6 +62355,8 @@
 +		return err;
 +	}
 +
++	xdev->state = XenbusStateInitialising;
++
 +	if (drv->resume)
 +		err = drv->resume(xdev);
 +	if (err)
@@ -69832,7 +69804,7 @@
  #include <asm-generic/page.h>
 diff -Nurp pristine-linux-2.6.16/include/asm-i386/pgtable-2level-defs.h tmp-linux-2.6-xen.patch/include/asm-i386/pgtable-2level-defs.h
 --- pristine-linux-2.6.16/include/asm-i386/pgtable-2level-defs.h	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/pgtable-2level-defs.h	2006-04-11 21:51:02.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/asm-i386/pgtable-2level-defs.h	2006-04-28 23:39:09.000000000 +0200
 @@ -1,6 +1,8 @@
  #ifndef _I386_PGTABLE_2LEVEL_DEFS_H
  #define _I386_PGTABLE_2LEVEL_DEFS_H
@@ -69844,7 +69816,7 @@
   */
 diff -Nurp pristine-linux-2.6.16/include/asm-i386/pgtable-3level-defs.h tmp-linux-2.6-xen.patch/include/asm-i386/pgtable-3level-defs.h
 --- pristine-linux-2.6.16/include/asm-i386/pgtable-3level-defs.h	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-i386/pgtable-3level-defs.h	2006-04-11 21:51:02.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/asm-i386/pgtable-3level-defs.h	2006-04-28 23:39:09.000000000 +0200
 @@ -1,6 +1,8 @@
  #ifndef _I386_PGTABLE_3LEVEL_DEFS_H
  #define _I386_PGTABLE_3LEVEL_DEFS_H
@@ -71404,7 +71376,7 @@
  
 diff -Nurp pristine-linux-2.6.16/include/asm-x86_64/hw_irq.h tmp-linux-2.6-xen.patch/include/asm-x86_64/hw_irq.h
 --- pristine-linux-2.6.16/include/asm-x86_64/hw_irq.h	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/asm-x86_64/hw_irq.h	2006-04-11 21:51:02.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/hw_irq.h	2006-04-28 23:39:09.000000000 +0200
 @@ -127,7 +127,7 @@ asmlinkage void IRQ_NAME(nr); \
  __asm__( \
  "\n.p2align\n" \
@@ -78935,8 +78907,8 @@
 +DEALINGS IN THE SOFTWARE.
 diff -Nurp pristine-linux-2.6.16/include/xen/interface/dom0_ops.h tmp-linux-2.6-xen.patch/include/xen/interface/dom0_ops.h
 --- pristine-linux-2.6.16/include/xen/interface/dom0_ops.h	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/interface/dom0_ops.h	2006-04-11 14:38:57.000000000 +0200
-@@ -0,0 +1,531 @@
++++ tmp-linux-2.6-xen.patch/include/xen/interface/dom0_ops.h	2006-04-25 11:20:48.000000000 +0200
+@@ -0,0 +1,533 @@
 +/******************************************************************************
 + * dom0_ops.h
 + * 
@@ -79343,7 +79315,9 @@
 +DEFINE_GUEST_HANDLE(dom0_getdomaininfolist_t);
 +
 +#define DOM0_PLATFORM_QUIRK      39
-+#define QUIRK_NOIRQBALANCING  1
++#define QUIRK_NOIRQBALANCING      1 /* Do not restrict IO-APIC RTE targets */
++#define QUIRK_IOAPIC_BAD_REGSEL   2 /* IO-APIC REGSEL forgets its value    */
++#define QUIRK_IOAPIC_GOOD_REGSEL  3 /* IO-APIC REGSEL behaves properly     */
 +typedef struct dom0_platform_quirk {
 +    /* IN variables. */
 +    uint32_t quirk_id;
@@ -82606,7 +82580,7 @@
 +#endif
 diff -Nurp pristine-linux-2.6.16/include/xen/xenbus.h tmp-linux-2.6-xen.patch/include/xen/xenbus.h
 --- pristine-linux-2.6.16/include/xen/xenbus.h	1970-01-01 01:00:00.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/include/xen/xenbus.h	2006-04-05 22:43:19.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/xen/xenbus.h	2006-04-28 23:38:29.000000000 +0200
 @@ -0,0 +1,306 @@
 +/******************************************************************************
 + * xenbus.h
@@ -82838,8 +82812,8 @@
 + * or -ENOMEM on error. If an error is returned, device will switch to
 + * XenbusStateClosing and the error message will be saved in XenStore.
 + */
-+int xenbus_map_ring_valloc(struct xenbus_device *dev,
-+			   int gnt_ref, void **vaddr);
++struct vm_struct *xenbus_map_ring_valloc(struct xenbus_device *dev,
++					 int gnt_ref);
 +int xenbus_map_ring(struct xenbus_device *dev, int gnt_ref,
 +			   grant_handle_t *handle, void *vaddr);
 +
@@ -82851,7 +82825,7 @@
 + * Returns 0 on success and returns GNTST_* on error
 + * (see xen/include/interface/grant_table.h).
 + */
-+int xenbus_unmap_ring_vfree(struct xenbus_device *dev, void *vaddr);
++int xenbus_unmap_ring_vfree(struct xenbus_device *dev, struct vm_struct *);
 +int xenbus_unmap_ring(struct xenbus_device *dev,
 +		      grant_handle_t handle, void *vaddr);
 +
@@ -83201,7 +83175,7 @@
  		page->mapping = NULL;
 diff -Nurp pristine-linux-2.6.16/net/core/dev.c tmp-linux-2.6-xen.patch/net/core/dev.c
 --- pristine-linux-2.6.16/net/core/dev.c	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/net/core/dev.c	2006-04-05 22:43:19.000000000 +0200
++++ tmp-linux-2.6-xen.patch/net/core/dev.c	2006-04-25 11:20:48.000000000 +0200
 @@ -116,6 +116,12 @@
  #endif	/* CONFIG_NET_RADIO */
  #include <asm/current.h>
@@ -83215,20 +83189,19 @@
  /*
   *	The list of packet types we will receive (as opposed to discard)
   *	and the routines to invoke.
-@@ -1260,6 +1266,37 @@ int dev_queue_xmit(struct sk_buff *skb)
- 	    __skb_linearize(skb, GFP_ATOMIC))
- 		goto out_kfree_skb;
+@@ -1214,6 +1220,43 @@ int __skb_linearize(struct sk_buff *skb,
+ 	}						\
+ }
  
 +#ifdef CONFIG_XEN
-+	/* If a checksum-deferred packet is forwarded to a device that needs a
-+	 * checksum, correct the pointers and force checksumming.
-+	 */
++inline int skb_checksum_setup(struct sk_buff *skb)
++{
 +	if (skb->proto_csum_blank) {
 +		if (skb->protocol != htons(ETH_P_IP))
-+			goto out_kfree_skb;
++			goto out;
 +		skb->h.raw = (unsigned char *)skb->nh.iph + 4*skb->nh.iph->ihl;
 +		if (skb->h.raw >= skb->tail)
-+			goto out_kfree_skb;
++			goto out;
 +		switch (skb->nh.iph->protocol) {
 +		case IPPROTO_TCP:
 +			skb->csum = offsetof(struct tcphdr, check);
@@ -83241,19 +83214,39 @@
 +				printk(KERN_ERR "Attempting to checksum a non-"
 +				       "TCP/UDP packet, dropping a protocol"
 +				       " %d packet", skb->nh.iph->protocol);
-+			rc = -EPROTO;
-+			goto out_kfree_skb;
++			goto out;
 +		}
 +		if ((skb->h.raw + skb->csum + 2) > skb->tail)
-+			goto out_kfree_skb;
++			goto out;
 +		skb->ip_summed = CHECKSUM_HW;
++		skb->proto_csum_blank = 0;
 +	}
++	return 0;
++out:
++	return -EPROTO;
++}
++#else
++inline int skb_checksum_setup(struct sk_buff *skb) {}
 +#endif
 +
++
+ /**
+  *	dev_queue_xmit - transmit a buffer
+  *	@skb: buffer to transmit
+@@ -1260,6 +1303,12 @@ int dev_queue_xmit(struct sk_buff *skb)
+ 	    __skb_linearize(skb, GFP_ATOMIC))
+ 		goto out_kfree_skb;
+ 
++ 	/* If a checksum-deferred packet is forwarded to a device that needs a
++ 	 * checksum, correct the pointers and force checksumming.
++ 	 */
++ 	if(skb_checksum_setup(skb))
++ 		goto out_kfree_skb;
++  
  	/* If packet is not checksummed and device does not support
  	 * checksumming for this protocol, complete checksumming here.
  	 */
-@@ -1609,6 +1646,19 @@ int netif_receive_skb(struct sk_buff *sk
+@@ -1609,6 +1658,19 @@ int netif_receive_skb(struct sk_buff *sk
  	}
  #endif
  
@@ -83273,6 +83266,14 @@
  	list_for_each_entry_rcu(ptype, &ptype_all, list) {
  		if (!ptype->dev || ptype->dev == skb->dev) {
  			if (pt_prev) 
+@@ -3300,6 +3362,7 @@ EXPORT_SYMBOL(unregister_netdevice_notif
+ EXPORT_SYMBOL(net_enable_timestamp);
+ EXPORT_SYMBOL(net_disable_timestamp);
+ EXPORT_SYMBOL(dev_get_flags);
++EXPORT_SYMBOL(skb_checksum_setup);
+ 
+ #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+ EXPORT_SYMBOL(br_handle_frame_hook);
 diff -Nurp pristine-linux-2.6.16/net/core/skbuff.c tmp-linux-2.6-xen.patch/net/core/skbuff.c
 --- pristine-linux-2.6.16/net/core/skbuff.c	2006-03-20 06:53:29.000000000 +0100
 +++ tmp-linux-2.6-xen.patch/net/core/skbuff.c	2006-04-05 22:43:19.000000000 +0200
@@ -83363,7 +83364,7 @@
  	C(priority);
 diff -Nurp pristine-linux-2.6.16/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.16/net/ipv4/netfilter/ip_nat_proto_tcp.c	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/net/ipv4/netfilter/ip_nat_proto_tcp.c	2006-04-11 21:51:02.000000000 +0200
++++ tmp-linux-2.6-xen.patch/net/ipv4/netfilter/ip_nat_proto_tcp.c	2006-04-28 23:39:09.000000000 +0200
 @@ -129,10 +129,14 @@ tcp_manip_pkt(struct sk_buff **pskb,
  	if (hdrsize < sizeof(*hdr))
  		return 1;
@@ -83382,7 +83383,7 @@
  
 diff -Nurp pristine-linux-2.6.16/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.16/net/ipv4/netfilter/ip_nat_proto_udp.c	2006-03-20 06:53:29.000000000 +0100
-+++ tmp-linux-2.6-xen.patch/net/ipv4/netfilter/ip_nat_proto_udp.c	2006-04-11 21:51:02.000000000 +0200
++++ tmp-linux-2.6-xen.patch/net/ipv4/netfilter/ip_nat_proto_udp.c	2006-04-28 23:39:09.000000000 +0200
 @@ -113,11 +113,16 @@ udp_manip_pkt(struct sk_buff **pskb,
  		newport = tuple->dst.u.udp.port;
  		portptr = &hdr->dest;
@@ -83402,6 +83403,29 @@
  	*portptr = newport;
  	return 1;
  }
+diff -Nurp pristine-linux-2.6.16/net/ipv4/xfrm4_output.c tmp-linux-2.6-xen.patch/net/ipv4/xfrm4_output.c
+--- pristine-linux-2.6.16/net/ipv4/xfrm4_output.c	2006-03-20 06:53:29.000000000 +0100
++++ tmp-linux-2.6-xen.patch/net/ipv4/xfrm4_output.c	2006-04-28 23:39:09.000000000 +0200
+@@ -17,6 +17,8 @@
+ #include <net/xfrm.h>
+ #include <net/icmp.h>
+ 
++extern int skb_checksum_setup(struct sk_buff *skb);
++
+ /* Add encapsulation header.
+  *
+  * In transport mode, the IP header will be moved forward to make space
+@@ -103,6 +105,10 @@ static int xfrm4_output_one(struct sk_bu
+ 	struct xfrm_state *x = dst->xfrm;
+ 	int err;
+ 	
++	err = skb_checksum_setup(skb);
++	if (err)
++		goto error_nolock;
++
+ 	if (skb->ip_summed == CHECKSUM_HW) {
+ 		err = skb_checksum_help(skb, 0);
+ 		if (err)
 diff -Nurp pristine-linux-2.6.16/scripts/Makefile.xen tmp-linux-2.6-xen.patch/scripts/Makefile.xen
 --- pristine-linux-2.6.16/scripts/Makefile.xen	1970-01-01 01:00:00.000000000 +0100
 +++ tmp-linux-2.6-xen.patch/scripts/Makefile.xen	2006-04-05 22:43:19.000000000 +0200



More information about the Kernel-svn-changes mailing list