When booting a guest using "pvshim=1" in the VM configuration file, libxl's
default command line is "pv-shim console=xen,pv".

With a CONFIG_PV_SHIM_EXCLUSIVE hypervisor, the boolean_param() is compiled
out, resulting in a command line parsing warning:

  (d8) [ 1556.334664] (XEN) parameter "pv-shim" unknown!

Avoid the warning by including a second boolean_param() for "pv-shim" which
writes into a unused variable.

Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
---
CC: Jan Beulich <jbeul...@suse.com>
CC: Wei Liu <wei.l...@citrix.com>
CC: Roger Pau Monné <roger....@citrix.com>
CC: Juergen Gross <jgr...@suse.com>
---
 xen/arch/x86/pv/shim.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c
index 636a9d6..c45885a 100644
--- a/xen/arch/x86/pv/shim.c
+++ b/xen/arch/x86/pv/shim.c
@@ -40,7 +40,11 @@
 #undef virt_to_mfn
 #define virt_to_mfn(va) _mfn(__virt_to_mfn(va))
 
-#ifndef CONFIG_PV_SHIM_EXCLUSIVE
+#ifdef CONFIG_PV_SHIM_EXCLUSIVE
+/* Tolerate "pv-shim" being passed to a CONFIG_PV_SHIM_EXCLUSIVE hypervisor. */
+static bool _discard;
+boolean_param("pv-shim", _discard);
+#else
 bool pv_shim;
 boolean_param("pv-shim", pv_shim);
 #endif
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to