24 #include <linux/module.h>
29 #define XEN_PLATFORM_ERR_MAGIC -1
30 #define XEN_PLATFORM_ERR_PROTOCOL -2
31 #define XEN_PLATFORM_ERR_BLACKLIST -3
36 #ifdef CONFIG_XEN_PVHVM
37 static int xen_emul_unplug;
39 static int check_platform_magic(
void)
80 r = check_platform_magic();
91 if (!xen_emul_unplug) {
92 if (xen_must_unplug_nics()) {
94 "been compiled for this kernel: unplug emulated NICs.\n");
97 if (xen_must_unplug_disks()) {
99 "been compiled for this kernel: unplug emulated disks.\n"
100 "You might have to change the root device\n"
101 "from /dev/hd[a-d] to /dev/xvd[a-d]\n"
102 "in your root= kernel command line option\n");
107 if (!(xen_emul_unplug & XEN_UNPLUG_UNNECESSARY))
112 static int __init parse_xen_emul_unplug(
char *
arg)
117 for (p = arg;
p; p =
q) {
127 else if (!
strncmp(p,
"ide-disks", l))
129 else if (!
strncmp(p,
"aux-ide-disks", l))
131 else if (!
strncmp(p,
"nics", l))
133 else if (!
strncmp(p,
"unnecessary", l))
135 else if (!
strncmp(p,
"never", l))
139 "in parameter 'xen_emul_unplug'\n", p);
143 early_param(
"xen_emul_unplug", parse_xen_emul_unplug);