aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2010-08-23 06:59:29 -0400
committerIan Campbell <ian.campbell@citrix.com>2010-08-23 06:59:29 -0400
commit1dc7ce99b091a11cce0f34456c1ffcb928f17edd (patch)
treeb9f125fc324a86ff4af64fb0799d20330f61084c
parentc93a4dfb31f2c023da3ad1238c352452f2cc0e05 (diff)
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@citrix.com> Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
-rw-r--r--Documentation/kernel-parameters.txt5
-rw-r--r--arch/x86/xen/platform-pci-unplug.c13
-rw-r--r--drivers/block/xen-blkfront.c2
-rw-r--r--include/xen/platform_pci.h2
4 files changed, 12 insertions, 10 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 8bbe83b9d0b2..f084af0cb8e0 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2629,8 +2629,9 @@ and is between 256 and 4096 characters. It is defined in the file
2629 aux-ide-disks -- unplug non-primary-master IDE devices 2629 aux-ide-disks -- unplug non-primary-master IDE devices
2630 nics -- unplug network devices 2630 nics -- unplug network devices
2631 all -- unplug all emulated devices (NICs and IDE disks) 2631 all -- unplug all emulated devices (NICs and IDE disks)
2632 ignore -- continue loading the Xen platform PCI driver even 2632 unnecessary -- unplugging emulated devices is
2633 if the version check failed 2633 unnecessary even if the host did not respond to
2634 the unplug protocol
2634 never -- do not unplug even if version check succeeds 2635 never -- do not unplug even if version check succeeds
2635 2636
2636 xirc2ps_cs= [NET,PCMCIA] 2637 xirc2ps_cs= [NET,PCMCIA]
diff --git a/arch/x86/xen/platform-pci-unplug.c b/arch/x86/xen/platform-pci-unplug.c
index 070dfa0654bd..0f456386cce5 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)
78 /* check the version of the xen platform PCI device */ 78 /* check the version of the xen platform PCI device */
79 r = check_platform_magic(); 79 r = check_platform_magic();
80 /* If the version matches enable the Xen platform PCI driver. 80 /* If the version matches enable the Xen platform PCI driver.
81 * Also enable the Xen platform PCI driver if the version is really old 81 * Also enable the Xen platform PCI driver if the host does
82 * and the user told us to ignore it. */ 82 * not support the unplug protocol (XEN_PLATFORM_ERR_MAGIC)
83 * but the user told us that unplugging is unnecessary. */
83 if (r && !(r == XEN_PLATFORM_ERR_MAGIC && 84 if (r && !(r == XEN_PLATFORM_ERR_MAGIC &&
84 (xen_emul_unplug & XEN_UNPLUG_IGNORE))) 85 (xen_emul_unplug & XEN_UNPLUG_UNNECESSARY)))
85 return; 86 return;
86 /* Set the default value of xen_emul_unplug depending on whether or 87 /* Set the default value of xen_emul_unplug depending on whether or
87 * not the Xen PV frontends and the Xen platform PCI driver have 88 * not the Xen PV frontends and the Xen platform PCI driver have
@@ -102,7 +103,7 @@ void __init xen_unplug_emulated_devices(void)
102 } 103 }
103 } 104 }
104 /* Now unplug the emulated devices */ 105 /* Now unplug the emulated devices */
105 if (!(xen_emul_unplug & XEN_UNPLUG_IGNORE)) 106 if (!(xen_emul_unplug & XEN_UNPLUG_UNNECESSARY))
106 outw(xen_emul_unplug, XEN_IOPORT_UNPLUG); 107 outw(xen_emul_unplug, XEN_IOPORT_UNPLUG);
107 xen_platform_pci_unplug = xen_emul_unplug; 108 xen_platform_pci_unplug = xen_emul_unplug;
108} 109}
@@ -128,8 +129,8 @@ static int __init parse_xen_emul_unplug(char *arg)
128 xen_emul_unplug |= XEN_UNPLUG_AUX_IDE_DISKS; 129 xen_emul_unplug |= XEN_UNPLUG_AUX_IDE_DISKS;
129 else if (!strncmp(p, "nics", l)) 130 else if (!strncmp(p, "nics", l))
130 xen_emul_unplug |= XEN_UNPLUG_ALL_NICS; 131 xen_emul_unplug |= XEN_UNPLUG_ALL_NICS;
131 else if (!strncmp(p, "ignore", l)) 132 else if (!strncmp(p, "unnecessary", l))
132 xen_emul_unplug |= XEN_UNPLUG_IGNORE; 133 xen_emul_unplug |= XEN_UNPLUG_UNNECESSARY;
133 else if (!strncmp(p, "never", l)) 134 else if (!strncmp(p, "never", l))
134 xen_emul_unplug |= XEN_UNPLUG_NEVER; 135 xen_emul_unplug |= XEN_UNPLUG_NEVER;
135 else 136 else
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index ac1b682edecb..ab735a605cf3 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -834,7 +834,7 @@ static int blkfront_probe(struct xenbus_device *dev,
834 char *type; 834 char *type;
835 int len; 835 int len;
836 /* no unplug has been done: do not hook devices != xen vbds */ 836 /* no unplug has been done: do not hook devices != xen vbds */
837 if (xen_platform_pci_unplug & XEN_UNPLUG_IGNORE) { 837 if (xen_platform_pci_unplug & XEN_UNPLUG_UNNECESSARY) {
838 int major; 838 int major;
839 839
840 if (!VDEV_IS_EXTENDED(vdevice)) 840 if (!VDEV_IS_EXTENDED(vdevice))
diff --git a/include/xen/platform_pci.h b/include/xen/platform_pci.h
index 123b7752fa6a..590ccfd82645 100644
--- a/include/xen/platform_pci.h
+++ b/include/xen/platform_pci.h
@@ -20,7 +20,7 @@
20#define XEN_UNPLUG_ALL_NICS 2 20#define XEN_UNPLUG_ALL_NICS 2
21#define XEN_UNPLUG_AUX_IDE_DISKS 4 21#define XEN_UNPLUG_AUX_IDE_DISKS 4
22#define XEN_UNPLUG_ALL 7 22#define XEN_UNPLUG_ALL 7
23#define XEN_UNPLUG_IGNORE 8 23#define XEN_UNPLUG_UNNECESSARY 8
24#define XEN_UNPLUG_NEVER 16 24#define XEN_UNPLUG_NEVER 16
25 25
26static inline int xen_must_unplug_nics(void) { 26static inline int xen_must_unplug_nics(void) {