]> xenbits.xensource.com Git - xen.git/commit
x86/spec: adjust logic that elides lfence
authorRoger Pau Monné <roger.pau@citrix.com>
Mon, 29 Apr 2024 07:39:53 +0000 (09:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 29 Apr 2024 07:39:53 +0000 (09:39 +0200)
commiteffcf70f020ff12d34c80e2abde0ecb00ce92bda
treec3fc44cc2ae6363a2f879ec361c106b3b0828058
parenta2d9cdbb2dc6a2252e9492580ec80dda3c60ef4f
x86/spec: adjust logic that elides lfence

It's currently too restrictive by just checking whether there's a BHB clearing
sequence selected.  It should instead check whether BHB clearing is used on
entry from PV or HVM specifically.

Switch to use opt_bhb_entry_{pv,hvm} instead, and then remove cpu_has_bhb_seq
since it no longer has any users.

Reported-by: Jan Beulich <jbeulich@suse.com>
Fixes: 954c983abcee ('x86/spec-ctrl: Software BHB-clearing sequences')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 656ae8f1091bcefec9c46ec3ea3ac2118742d4f6
master date: 2024-04-25 16:37:01 +0200
xen/arch/x86/include/asm/cpufeature.h
xen/arch/x86/spec_ctrl.c