Commit c93a4dfb authored by Ian Campbell's avatar Ian Campbell

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: default avatarIan Campbell <ian.campbell@citrix.com>
Acked-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Acked-by: default avatarStefano Stabellini <Stefano.Stabellini@eu.citrix.com>
parent da5cabf8
...@@ -2631,6 +2631,7 @@ and is between 256 and 4096 characters. It is defined in the file ...@@ -2631,6 +2631,7 @@ and is between 256 and 4096 characters. It is defined in the file
all -- unplug all emulated devices (NICs and IDE disks) all -- unplug all emulated devices (NICs and IDE disks)
ignore -- continue loading the Xen platform PCI driver even ignore -- continue loading the Xen platform PCI driver even
if the version check failed if the version check failed
never -- do not unplug even if version check succeeds
xirc2ps_cs= [NET,PCMCIA] xirc2ps_cs= [NET,PCMCIA]
Format: Format:
......
...@@ -72,6 +72,9 @@ void __init xen_unplug_emulated_devices(void) ...@@ -72,6 +72,9 @@ void __init xen_unplug_emulated_devices(void)
{ {
int r; int r;
/* user explicitly requested no unplug */
if (xen_emul_unplug & XEN_UNPLUG_NEVER)
return;
/* check the version of the xen platform PCI device */ /* check the version of the xen platform PCI device */
r = check_platform_magic(); r = check_platform_magic();
/* If the version matches enable the Xen platform PCI driver. /* If the version matches enable the Xen platform PCI driver.
...@@ -127,6 +130,8 @@ static int __init parse_xen_emul_unplug(char *arg) ...@@ -127,6 +130,8 @@ static int __init parse_xen_emul_unplug(char *arg)
xen_emul_unplug |= XEN_UNPLUG_ALL_NICS; xen_emul_unplug |= XEN_UNPLUG_ALL_NICS;
else if (!strncmp(p, "ignore", l)) else if (!strncmp(p, "ignore", l))
xen_emul_unplug |= XEN_UNPLUG_IGNORE; xen_emul_unplug |= XEN_UNPLUG_IGNORE;
else if (!strncmp(p, "never", l))
xen_emul_unplug |= XEN_UNPLUG_NEVER;
else else
printk(KERN_WARNING "unrecognised option '%s' " printk(KERN_WARNING "unrecognised option '%s' "
"in parameter 'xen_emul_unplug'\n", p); "in parameter 'xen_emul_unplug'\n", p);
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#define XEN_UNPLUG_AUX_IDE_DISKS 4 #define XEN_UNPLUG_AUX_IDE_DISKS 4
#define XEN_UNPLUG_ALL 7 #define XEN_UNPLUG_ALL 7
#define XEN_UNPLUG_IGNORE 8 #define XEN_UNPLUG_IGNORE 8
#define XEN_UNPLUG_NEVER 16
static inline int xen_must_unplug_nics(void) { static inline int xen_must_unplug_nics(void) {
#if (defined(CONFIG_XEN_NETDEV_FRONTEND) || \ #if (defined(CONFIG_XEN_NETDEV_FRONTEND) || \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment