[kernel] r16178 - in dists/sid/linux-2.6/debian/patches: features/all/xen features/all/xen/pvhvm series
Ian Campbell
ijc-guest at alioth.debian.org
Tue Aug 24 07:22:25 UTC 2010
Author: ijc-guest
Date: Tue Aug 24 07:22:07 2010
New Revision: 16178
Log:
xen: backport a few additional pvhvm changesets from 2.6.36-rc
Added:
dists/sid/linux-2.6/debian/patches/features/all/xen/pvhvm/0015-xen-pvhvm-allow-user-to-request-no-emulated-device.patch
dists/sid/linux-2.6/debian/patches/features/all/xen/pvhvm/0016-xen-pvhvm-rename-xen_emul_unplug-ignore-to-unnnec.patch
dists/sid/linux-2.6/debian/patches/features/all/xen/pvhvm/0017-xen-pvhvm-make-it-clearer-that-XEN_UNPLUG_-define.patch
Modified:
dists/sid/linux-2.6/debian/patches/features/all/xen/pvops.patch
dists/sid/linux-2.6/debian/patches/series/21
Added: dists/sid/linux-2.6/debian/patches/features/all/xen/pvhvm/0015-xen-pvhvm-allow-user-to-request-no-emulated-device.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/features/all/xen/pvhvm/0015-xen-pvhvm-allow-user-to-request-no-emulated-device.patch Tue Aug 24 07:22:07 2010 (r16178)
@@ -0,0 +1,69 @@
+From daf8551f0285e86805dace2fb548a9d177040c1b Mon Sep 17 00:00:00 2001
+From: Ian Campbell <ian.campbell at citrix.com>
+Date: Mon, 23 Aug 2010 11:59:28 +0100
+Subject: [PATCH] xen: pvhvm: allow user to request no emulated device unplug
+
+this allows the user to disable pvhvm and revert to emulated devices
+in case of a system misconfiguration (e.g. initramfs with only
+emulated drivers in it).
+
+Signed-off-by: Ian Campbell <ian.campbell at citrix.com>
+Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
+Acked-by: Stefano Stabellini <Stefano.Stabellini at eu.citrix.com>
+(cherry picked from commit c93a4dfb31f2c023da3ad1238c352452f2cc0e05)
+---
+ Documentation/kernel-parameters.txt | 1 +
+ arch/x86/xen/platform-pci-unplug.c | 5 +++++
+ include/xen/platform_pci.h | 1 +
+ 3 files changed, 7 insertions(+), 0 deletions(-)
+
+diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
+index 3e30e60..f7f5797 100644
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -2770,6 +2770,7 @@ and is between 256 and 4096 characters. It is defined in the file
+ all -- unplug all emulated devices (NICs and IDE disks)
+ ignore -- continue loading the Xen platform PCI driver even
+ if the version check failed
++ never -- do not unplug even if version check succeeds
+
+ xirc2ps_cs= [NET,PCMCIA]
+ Format:
+diff --git a/arch/x86/xen/platform-pci-unplug.c b/arch/x86/xen/platform-pci-unplug.c
+index 554c002..070dfa0 100644
+--- a/arch/x86/xen/platform-pci-unplug.c
++++ b/arch/x86/xen/platform-pci-unplug.c
+@@ -72,6 +72,9 @@ void __init xen_unplug_emulated_devices(void)
+ {
+ int r;
+
++ /* user explicitly requested no unplug */
++ if (xen_emul_unplug & XEN_UNPLUG_NEVER)
++ return;
+ /* check the version of the xen platform PCI device */
+ r = check_platform_magic();
+ /* If the version matches enable the Xen platform PCI driver.
+@@ -127,6 +130,8 @@ static int __init parse_xen_emul_unplug(char *arg)
+ xen_emul_unplug |= XEN_UNPLUG_ALL_NICS;
+ else if (!strncmp(p, "ignore", l))
+ xen_emul_unplug |= XEN_UNPLUG_IGNORE;
++ else if (!strncmp(p, "never", l))
++ xen_emul_unplug |= XEN_UNPLUG_NEVER;
+ else
+ printk(KERN_WARNING "unrecognised option '%s' "
+ "in parameter 'xen_emul_unplug'\n", p);
+diff --git a/include/xen/platform_pci.h b/include/xen/platform_pci.h
+index ce9d671..123b775 100644
+--- a/include/xen/platform_pci.h
++++ b/include/xen/platform_pci.h
+@@ -21,6 +21,7 @@
+ #define XEN_UNPLUG_AUX_IDE_DISKS 4
+ #define XEN_UNPLUG_ALL 7
+ #define XEN_UNPLUG_IGNORE 8
++#define XEN_UNPLUG_NEVER 16
+
+ static inline int xen_must_unplug_nics(void) {
+ #if (defined(CONFIG_XEN_NETDEV_FRONTEND) || \
+--
+1.5.6.5
+
Added: dists/sid/linux-2.6/debian/patches/features/all/xen/pvhvm/0016-xen-pvhvm-rename-xen_emul_unplug-ignore-to-unnnec.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/features/all/xen/pvhvm/0016-xen-pvhvm-rename-xen_emul_unplug-ignore-to-unnnec.patch Tue Aug 24 07:22:07 2010 (r16178)
@@ -0,0 +1,109 @@
+From 124f4ffc5885803e2c0bf6f4c228830ab795b80b Mon Sep 17 00:00:00 2001
+From: Ian Campbell <ian.campbell at citrix.com>
+Date: Mon, 23 Aug 2010 11:59:29 +0100
+Subject: [PATCH] xen: pvhvm: rename xen_emul_unplug=ignore to =unnnecessary
+
+It is not immediately clear what this option causes to become
+ignored. The actual meaning is that it is not necessary to unplug the
+emulated devices to safely use the PV ones, even if the platform does
+not support the unplug protocol. (pressumably the user will only add
+this option if they have ensured that their domain configuration is
+safe).
+
+I think xen_emul_unplug=unnecessary better captures this.
+
+Signed-off-by: Ian Campbell <ian.campbell at citrix.com>
+Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
+Acked-by: Stefano Stabellini <Stefano.Stabellini at eu.citrix.com>
+(cherry picked from commit 1dc7ce99b091a11cce0f34456c1ffcb928f17edd)
+---
+ Documentation/kernel-parameters.txt | 5 +++--
+ arch/x86/xen/platform-pci-unplug.c | 13 +++++++------
+ drivers/block/xen-blkfront.c | 2 +-
+ include/xen/platform_pci.h | 2 +-
+ 4 files changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
+index f7f5797..9ec8558 100644
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -2768,8 +2768,9 @@ and is between 256 and 4096 characters. It is defined in the file
+ aux-ide-disks -- unplug non-primary-master IDE devices
+ nics -- unplug network devices
+ all -- unplug all emulated devices (NICs and IDE disks)
+- ignore -- continue loading the Xen platform PCI driver even
+- if the version check failed
++ unnecessary -- unplugging emulated devices is
++ unnecessary even if the host did not respond to
++ the unplug protocol
+ never -- do not unplug even if version check succeeds
+
+ xirc2ps_cs= [NET,PCMCIA]
+diff --git a/arch/x86/xen/platform-pci-unplug.c b/arch/x86/xen/platform-pci-unplug.c
+index 070dfa0..0f45638 100644
+--- a/arch/x86/xen/platform-pci-unplug.c
++++ b/arch/x86/xen/platform-pci-unplug.c
+@@ -78,10 +78,11 @@ void __init xen_unplug_emulated_devices(void)
+ /* check the version of the xen platform PCI device */
+ r = check_platform_magic();
+ /* If the version matches enable the Xen platform PCI driver.
+- * Also enable the Xen platform PCI driver if the version is really old
+- * and the user told us to ignore it. */
++ * Also enable the Xen platform PCI driver if the host does
++ * not support the unplug protocol (XEN_PLATFORM_ERR_MAGIC)
++ * but the user told us that unplugging is unnecessary. */
+ if (r && !(r == XEN_PLATFORM_ERR_MAGIC &&
+- (xen_emul_unplug & XEN_UNPLUG_IGNORE)))
++ (xen_emul_unplug & XEN_UNPLUG_UNNECESSARY)))
+ return;
+ /* Set the default value of xen_emul_unplug depending on whether or
+ * not the Xen PV frontends and the Xen platform PCI driver have
+@@ -102,7 +103,7 @@ void __init xen_unplug_emulated_devices(void)
+ }
+ }
+ /* Now unplug the emulated devices */
+- if (!(xen_emul_unplug & XEN_UNPLUG_IGNORE))
++ if (!(xen_emul_unplug & XEN_UNPLUG_UNNECESSARY))
+ outw(xen_emul_unplug, XEN_IOPORT_UNPLUG);
+ xen_platform_pci_unplug = xen_emul_unplug;
+ }
+@@ -128,8 +129,8 @@ static int __init parse_xen_emul_unplug(char *arg)
+ xen_emul_unplug |= XEN_UNPLUG_AUX_IDE_DISKS;
+ else if (!strncmp(p, "nics", l))
+ xen_emul_unplug |= XEN_UNPLUG_ALL_NICS;
+- else if (!strncmp(p, "ignore", l))
+- xen_emul_unplug |= XEN_UNPLUG_IGNORE;
++ else if (!strncmp(p, "unnecessary", l))
++ xen_emul_unplug |= XEN_UNPLUG_UNNECESSARY;
+ else if (!strncmp(p, "never", l))
+ xen_emul_unplug |= XEN_UNPLUG_NEVER;
+ else
+diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
+index ac692c5..86d4952 100644
+--- a/drivers/block/xen-blkfront.c
++++ b/drivers/block/xen-blkfront.c
+@@ -741,7 +741,7 @@ static int blkfront_probe(struct xenbus_device *dev,
+ char *type;
+ int len;
+ /* no unplug has been done: do not hook devices != xen vbds */
+- if (xen_platform_pci_unplug & XEN_UNPLUG_IGNORE) {
++ if (xen_platform_pci_unplug & XEN_UNPLUG_UNNECESSARY) {
+ int major;
+
+ if (!VDEV_IS_EXTENDED(vdevice))
+diff --git a/include/xen/platform_pci.h b/include/xen/platform_pci.h
+index 123b775..590ccfd 100644
+--- a/include/xen/platform_pci.h
++++ b/include/xen/platform_pci.h
+@@ -20,7 +20,7 @@
+ #define XEN_UNPLUG_ALL_NICS 2
+ #define XEN_UNPLUG_AUX_IDE_DISKS 4
+ #define XEN_UNPLUG_ALL 7
+-#define XEN_UNPLUG_IGNORE 8
++#define XEN_UNPLUG_UNNECESSARY 8
+ #define XEN_UNPLUG_NEVER 16
+
+ static inline int xen_must_unplug_nics(void) {
+--
+1.5.6.5
+
Added: dists/sid/linux-2.6/debian/patches/features/all/xen/pvhvm/0017-xen-pvhvm-make-it-clearer-that-XEN_UNPLUG_-define.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/features/all/xen/pvhvm/0017-xen-pvhvm-make-it-clearer-that-XEN_UNPLUG_-define.patch Tue Aug 24 07:22:07 2010 (r16178)
@@ -0,0 +1,49 @@
+From 75e8559d8971ac8bb36d535621a8df432b4f8508 Mon Sep 17 00:00:00 2001
+From: Ian Campbell <ian.campbell at citrix.com>
+Date: Mon, 23 Aug 2010 12:01:35 +0100
+Subject: [PATCH] xen: pvhvm: make it clearer that XEN_UNPLUG_* define bits in a bitfield
+
+by defining in terms of (1<<N).
+
+XEN_UNPLUG_UNNECESSARY and XEN_UNPLUG_NEVER are only used within the
+kernel and are not defined as a bit on the unplug IO port. Therefore
+use a bit which is outside the potentially valid range of the 16 bit
+IO port.
+
+Signed-off-by: Ian Campbell <ian.campbell at citrix.com>
+Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
+Acked-by: Stefano Stabellini <Stefano.Stabellini at eu.citrix.com>
+(cherry picked from commit 9c35e90c6fcf7f5baf27a63d9565e9f47633f299)
+---
+ include/xen/platform_pci.h | 15 +++++++++------
+ 1 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/include/xen/platform_pci.h b/include/xen/platform_pci.h
+index 590ccfd..a785a3b 100644
+--- a/include/xen/platform_pci.h
++++ b/include/xen/platform_pci.h
+@@ -16,12 +16,15 @@
+ #define XEN_IOPORT_PROTOVER (XEN_IOPORT_BASE + 2) /* 1 byte access (R) */
+ #define XEN_IOPORT_PRODNUM (XEN_IOPORT_BASE + 2) /* 2 byte access (W) */
+
+-#define XEN_UNPLUG_ALL_IDE_DISKS 1
+-#define XEN_UNPLUG_ALL_NICS 2
+-#define XEN_UNPLUG_AUX_IDE_DISKS 4
+-#define XEN_UNPLUG_ALL 7
+-#define XEN_UNPLUG_UNNECESSARY 8
+-#define XEN_UNPLUG_NEVER 16
++#define XEN_UNPLUG_ALL_IDE_DISKS (1<<0)
++#define XEN_UNPLUG_ALL_NICS (1<<1)
++#define XEN_UNPLUG_AUX_IDE_DISKS (1<<2)
++#define XEN_UNPLUG_ALL (XEN_UNPLUG_ALL_IDE_DISKS|\
++ XEN_UNPLUG_ALL_NICS|\
++ XEN_UNPLUG_AUX_IDE_DISKS)
++
++#define XEN_UNPLUG_UNNECESSARY (1<<16)
++#define XEN_UNPLUG_NEVER (1<<17)
+
+ static inline int xen_must_unplug_nics(void) {
+ #if (defined(CONFIG_XEN_NETDEV_FRONTEND) || \
+--
+1.5.6.5
+
Modified: dists/sid/linux-2.6/debian/patches/features/all/xen/pvops.patch
==============================================================================
--- dists/sid/linux-2.6/debian/patches/features/all/xen/pvops.patch Tue Aug 24 05:13:30 2010 (r16177)
+++ dists/sid/linux-2.6/debian/patches/features/all/xen/pvops.patch Tue Aug 24 07:22:07 2010 (r16178)
@@ -6,14 +6,32 @@
To regenerate:
-$ git checkout -b debian-base v2.6.32.19
+$ git checkout -b debian-base v2.6.32.20
$ git pull git://xenbits.xensource.com/people/ianc/linux-2.6.git debian/squeeze/pvhvm
$ git checkout -b debian-pvops e73f4955a821f850f5b88c32d12a81714523a95f
$ git revert -m 1 bcf16b6b4f34fb40a7aaf637947c7d3bce0be671
+$ git merge v2.6.32.20
$ git diff debian-base..debian-pvops
+diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
+index 9ec8558..3e30e60 100644
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -2768,10 +2768,8 @@ and is between 256 and 4096 characters. It is defined in the file
+ aux-ide-disks -- unplug non-primary-master IDE devices
+ nics -- unplug network devices
+ all -- unplug all emulated devices (NICs and IDE disks)
+- unnecessary -- unplugging emulated devices is
+- unnecessary even if the host did not respond to
+- the unplug protocol
+- never -- do not unplug even if version check succeeds
++ ignore -- continue loading the Xen platform PCI driver even
++ if the version check failed
+
+ xirc2ps_cs= [NET,PCMCIA]
+ Format:
diff --git a/Documentation/x86/x86_64/boot-options.txt b/Documentation/x86/x86_64/boot-options.txt
index 29a6ff8..81f9b94 100644
--- a/Documentation/x86/x86_64/boot-options.txt
@@ -4970,7 +4988,7 @@
+}
+EXPORT_SYMBOL(xen_unregister_device_domain_owner);
diff --git a/arch/x86/xen/platform-pci-unplug.c b/arch/x86/xen/platform-pci-unplug.c
-index 554c002..2f7f3fb 100644
+index 0f45638..2f7f3fb 100644
--- a/arch/x86/xen/platform-pci-unplug.c
+++ b/arch/x86/xen/platform-pci-unplug.c
@@ -32,7 +32,6 @@
@@ -4981,7 +4999,50 @@
static int xen_emul_unplug;
static int __init check_platform_magic(void)
-@@ -134,4 +133,3 @@ static int __init parse_xen_emul_unplug(char *arg)
+@@ -72,17 +71,13 @@ void __init xen_unplug_emulated_devices(void)
+ {
+ int r;
+
+- /* user explicitly requested no unplug */
+- if (xen_emul_unplug & XEN_UNPLUG_NEVER)
+- return;
+ /* check the version of the xen platform PCI device */
+ r = check_platform_magic();
+ /* If the version matches enable the Xen platform PCI driver.
+- * Also enable the Xen platform PCI driver if the host does
+- * not support the unplug protocol (XEN_PLATFORM_ERR_MAGIC)
+- * but the user told us that unplugging is unnecessary. */
++ * Also enable the Xen platform PCI driver if the version is really old
++ * and the user told us to ignore it. */
+ if (r && !(r == XEN_PLATFORM_ERR_MAGIC &&
+- (xen_emul_unplug & XEN_UNPLUG_UNNECESSARY)))
++ (xen_emul_unplug & XEN_UNPLUG_IGNORE)))
+ return;
+ /* Set the default value of xen_emul_unplug depending on whether or
+ * not the Xen PV frontends and the Xen platform PCI driver have
+@@ -103,7 +98,7 @@ void __init xen_unplug_emulated_devices(void)
+ }
+ }
+ /* Now unplug the emulated devices */
+- if (!(xen_emul_unplug & XEN_UNPLUG_UNNECESSARY))
++ if (!(xen_emul_unplug & XEN_UNPLUG_IGNORE))
+ outw(xen_emul_unplug, XEN_IOPORT_UNPLUG);
+ xen_platform_pci_unplug = xen_emul_unplug;
+ }
+@@ -129,10 +124,8 @@ static int __init parse_xen_emul_unplug(char *arg)
+ xen_emul_unplug |= XEN_UNPLUG_AUX_IDE_DISKS;
+ else if (!strncmp(p, "nics", l))
+ xen_emul_unplug |= XEN_UNPLUG_ALL_NICS;
+- else if (!strncmp(p, "unnecessary", l))
+- xen_emul_unplug |= XEN_UNPLUG_UNNECESSARY;
+- else if (!strncmp(p, "never", l))
+- xen_emul_unplug |= XEN_UNPLUG_NEVER;
++ else if (!strncmp(p, "ignore", l))
++ xen_emul_unplug |= XEN_UNPLUG_IGNORE;
+ else
+ printk(KERN_WARNING "unrecognised option '%s' "
+ "in parameter 'xen_emul_unplug'\n", p);
+@@ -140,4 +133,3 @@ static int __init parse_xen_emul_unplug(char *arg)
return 0;
}
early_param("xen_emul_unplug", parse_xen_emul_unplug);
@@ -6401,7 +6462,7 @@
This driver implements the front-end of the Xen virtual
block device driver. It communicates with a back-end driver
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
-index ac692c5..89adac5 100644
+index 86d4952..89adac5 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -42,6 +42,7 @@
@@ -6593,7 +6654,7 @@
- char *type;
- int len;
- /* no unplug has been done: do not hook devices != xen vbds */
-- if (xen_platform_pci_unplug & XEN_UNPLUG_IGNORE) {
+- if (xen_platform_pci_unplug & XEN_UNPLUG_UNNECESSARY) {
- int major;
-
- if (!VDEV_IS_EXTENDED(vdevice))
@@ -30717,6 +30778,31 @@
+
+extern void unregister_xen_pcpu_notifier(struct notifier_block *nb);
+#endif
+diff --git a/include/xen/platform_pci.h b/include/xen/platform_pci.h
+index a785a3b..ce9d671 100644
+--- a/include/xen/platform_pci.h
++++ b/include/xen/platform_pci.h
+@@ -16,15 +16,11 @@
+ #define XEN_IOPORT_PROTOVER (XEN_IOPORT_BASE + 2) /* 1 byte access (R) */
+ #define XEN_IOPORT_PRODNUM (XEN_IOPORT_BASE + 2) /* 2 byte access (W) */
+
+-#define XEN_UNPLUG_ALL_IDE_DISKS (1<<0)
+-#define XEN_UNPLUG_ALL_NICS (1<<1)
+-#define XEN_UNPLUG_AUX_IDE_DISKS (1<<2)
+-#define XEN_UNPLUG_ALL (XEN_UNPLUG_ALL_IDE_DISKS|\
+- XEN_UNPLUG_ALL_NICS|\
+- XEN_UNPLUG_AUX_IDE_DISKS)
+-
+-#define XEN_UNPLUG_UNNECESSARY (1<<16)
+-#define XEN_UNPLUG_NEVER (1<<17)
++#define XEN_UNPLUG_ALL_IDE_DISKS 1
++#define XEN_UNPLUG_ALL_NICS 2
++#define XEN_UNPLUG_AUX_IDE_DISKS 4
++#define XEN_UNPLUG_ALL 7
++#define XEN_UNPLUG_IGNORE 8
+
+ static inline int xen_must_unplug_nics(void) {
+ #if (defined(CONFIG_XEN_NETDEV_FRONTEND) || \
diff --git a/include/xen/privcmd.h b/include/xen/privcmd.h
new file mode 100644
index 0000000..b42cdfd
@@ -32684,7 +32770,7 @@
{
int aligned;
diff --git a/mm/memory.c b/mm/memory.c
-index 76d1b21..ce7f52d 100644
+index babb991..ae85b20 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -553,6 +553,13 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
Modified: dists/sid/linux-2.6/debian/patches/series/21
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/21 Tue Aug 24 05:13:30 2010 (r16177)
+++ dists/sid/linux-2.6/debian/patches/series/21 Tue Aug 24 07:22:07 2010 (r16178)
@@ -23,4 +23,7 @@
+ features/all/xen/pvhvm/0012-blkfront-do-not-create-a-PV-cdrom-device-if-xen_hvm.patch
+ features/all/xen/pvhvm/0013-Introduce-CONFIG_XEN_PVHVM-compile-option.patch
+ features/all/xen/pvhvm/0014-pvops-do-not-notify-callers-from-register_xenstore_.patch
++ features/all/xen/pvhvm/0015-xen-pvhvm-allow-user-to-request-no-emulated-device.patch
++ features/all/xen/pvhvm/0016-xen-pvhvm-rename-xen_emul_unplug-ignore-to-unnnec.patch
++ features/all/xen/pvhvm/0017-xen-pvhvm-make-it-clearer-that-XEN_UNPLUG_-define.patch
+ debian/i915-Blacklist-i830-i845-i855-for-KMS.patch
More information about the Kernel-svn-changes
mailing list