]> xenbits.xensource.com Git - xen.git/commit
x86/spec: fix BRANCH_HARDEN option to only be set when build-enabled
authorRoger Pau Monné <roger.pau@citrix.com>
Mon, 26 Feb 2024 15:06:42 +0000 (16:06 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 26 Feb 2024 15:06:42 +0000 (16:06 +0100)
commit60e00f77a5cc671d30c5ef3318f5b8e9b74e4aa3
treecbc740f16fbb5f490545d71315cea9c4526f0ea4
parent21051291ad8851cac973c7ee70f5928967022c7e
x86/spec: fix BRANCH_HARDEN option to only be set when build-enabled

The current logic to handle the BRANCH_HARDEN option will report it as enabled
even when build-time disabled. Fix this by only allowing the option to be set
when support for it is built into Xen.

Fixes: 2d6f36daa086 ('x86/nospec: Introduce CONFIG_SPECULATIVE_HARDEN_BRANCH')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/spec_ctrl.c