Skip to contentSkip to conversation

x86/pv-shim: Avoid a command line parameter warning for CONFIG_PV_SHIM_EXCLUSIVE builds

PATCH Juergen Gross 1 participant 1 message Jan 30, 2019

lore
Share & tools
lore
#0 lore raw
Quoted 32 lines · Jan Beulich
Quoted 28 lines
Quoted 1 line
Quoted 1 line · On 30.01.19 at 11:01, <[email protected]> wrote:
Quoted 18 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 29.01.19 at 20:07, <[email protected]> wrote:
xen/arch/x86/pv/shim.c +0 -0
@@ -40,7 +40,11 @@
 #undef virt_to_mfn
 #define virt_to_mfn(va) _mfn(__virt_to_mfn(va))

xen/arch/x86/pv/shim.c line 50

Quoted 10 lines
xen/arch/x86/pv/shim.c +5 -1
 
-#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

It would end up being less extra code if you did

Quoted 7 lines

#ifdef CONFIG_PV_SHIM_EXCLUSIVE
/* Tolerate "pv-shim" being passed to a CONFIG_PV_SHIM_EXCLUSIVE hypervisor. */ static bool __initdata pv_shim;
#else
bool pv_shim;
#endif
boolean_param("pv-shim", pv_shim);

Quoted 3 lines

Sadly not. In the EXCLUSIVE case, pv_shim is defined to be 1, and then you've got an object named with just a number. (I tried this approach first.)

Quoted 8 lines

Oh, that's unfortunate in this particular case. In which case I don't have any better suggestion either. One that you and others perhaps wouldn't like would be

custom_param("pv-shim", NULL);

with parse_params() suitably adjusted to avoid the call in that case.

I'd rather add something like ignore_param("pv-shim") instead (with the new type OPT_IGNORE).

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel