From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xensource.com
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: [PATCH 2/3] xen: pvhvm: rename xen_emul_unplug=ignore to =unnnecessary
Date: Fri, 20 Aug 2010 09:14:11 +0100 [thread overview]
Message-ID: <1282292052-13037-2-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1282292035.3170.5238.camel@zakaz.uk.xensource.com>
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>
---
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 8bbe83b..f084af0 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
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 ac1b682..ab735a6 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,
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
next prev parent reply other threads:[~2010-08-20 8:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-19 9:58 [GIT/PATCH 0/3] pvhvm emul unplug fixes Ian Campbell
2010-08-19 9:59 ` [PATCH 1/3] xen: pvhvm: allow user to request no emulated device unplug Ian Campbell
2010-08-19 10:37 ` Stefano Stabellini
2010-08-19 10:50 ` Ian Campbell
2010-08-19 10:52 ` Ian Campbell
2010-08-19 10:54 ` Stefano Stabellini
2010-08-19 16:10 ` Jeremy Fitzhardinge
2010-08-19 16:34 ` Gianni Tedesco
2010-08-19 16:44 ` Jeremy Fitzhardinge
2010-08-19 16:52 ` Ian Campbell
2010-08-20 8:13 ` [GIT/PATCH v2 0/3] pvhvm emul unplug fixes Ian Campbell
2010-08-20 8:14 ` [PATCH 1/3] xen: pvhvm: allow user to request no emulated device unplug Ian Campbell
2010-08-20 8:14 ` Ian Campbell [this message]
2010-08-20 8:14 ` [PATCH 3/3] xen: pvhvm: make it clearer that XEN_UNPLUG_* define bits in a bitfield Ian Campbell
2010-08-20 11:10 ` [GIT/PATCH v2 0/3] pvhvm emul unplug fixes Stefano Stabellini
2010-08-20 16:41 ` Jeremy Fitzhardinge
2010-08-19 9:59 ` [PATCH 2/3] xen: pvhvm: rename xen_emul_unplug=ignore to =unnnecessary Ian Campbell
2010-08-19 9:59 ` [PATCH 3/3] xen: pvhvm: make it clearer that XEN_UNPLUG_* individual bits Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1282292052-13037-2-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=jeremy@goop.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).