]> xenbits.xensource.com Git - xen.git/commit
x86/spec-ctrl: Yet more fixes for xpti= parsing
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 9 Aug 2018 16:22:17 +0000 (17:22 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 10 Aug 2018 13:02:26 +0000 (14:02 +0100)
commit2a3b34ec47817048ab59586855cf0709fc77487e
tree188daafc42b59425920089420a1d9167d7b5d923
parenta2d9a6fa1fcd2dfcfa9d1d34998156f9399a3eb2
x86/spec-ctrl: Yet more fixes for xpti= parsing

As it currently stands, 'xpti=dom0' is indistinguishable from the default
value, which means it will be overridden by ARCH_CAPABILITIES_RDCL_NO on fixed
hardware.

Switch opt_xpti to use -1 as a default like all our other related options, and
clobber it as soon as we have a string to parse.

In addition, 'xpti' alone should be interpreted in its positive boolean form,
rather than resulting in a parse error.

  (XEN) parameter "xpti" has invalid value "", rc=-22!

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/spec_ctrl.c
xen/include/asm-x86/spec_ctrl.h