x86/mm: use block_lock_speculation() in _mm_write_lock()
PATCH 1/1 x86/mm: use block_lock_speculation() in _mm_write_lock()
I can only guess that using block_speculation() there was a leftover from, earlier on, SPECULATIVE_HARDEN_LOCK depending on SPECULATIVE_HARDEN_BRANCH.
Fixes 197ecd838a2a ("locking: attempt to ensure lock wrappers are always inline")
Signed-off-by Jan Beulich <[email protected]>
---
Noticed while backporting to 4.12, where block_speculation() didn't exist yet.
xen/arch/x86/mm/mm-locks.h +1 -1
@@ -138,7 +138,7 @@ static inline void _mm_write_lock(const struct domain *d, mm_rwlock_t *l,_set_lock_level (_lock_level (d, level)); }else -block_speculation (); +block_lock_speculation (); l->recurse_count++; }
Quoted 6 lines · Jan Beulich
I can only guess that using
block_speculation()there was a leftover from, earlier on,SPECULATIVE_HARDEN_LOCKdepending onSPECULATIVE_HARDEN_BRANCH.Fixes 197ecd838a2a ("locking: attempt to ensure lock wrappers are always inline")Signed-off-by Jan Beulich <[email protected]>
Yes, it looks that way.
Reviewed-by Andrew Cooper <[email protected]>