All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/mm: use block_lock_speculation() in _mm_write_lock()
@ 2024-03-18 10:54 Jan Beulich
  2024-03-18 12:21 ` Andrew Cooper
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2024-03-18 10:54 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Wei Liu, Roger Pau Monné, George Dunlap

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 <jbeulich@suse.com>
---
Noticed while backporting to 4.12, where block_speculation() didn't
exist yet.

--- a/xen/arch/x86/mm/mm-locks.h
+++ b/xen/arch/x86/mm/mm-locks.h
@@ -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++;
 }
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86/mm: use block_lock_speculation() in _mm_write_lock()
  2024-03-18 10:54 [PATCH] x86/mm: use block_lock_speculation() in _mm_write_lock() Jan Beulich
@ 2024-03-18 12:21 ` Andrew Cooper
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cooper @ 2024-03-18 12:21 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Wei Liu, Roger Pau Monné, George Dunlap

On 18/03/2024 10:54 am, Jan Beulich wrote:
> 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 <jbeulich@suse.com>

Yes, it looks that way.

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-18 12:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-18 10:54 [PATCH] x86/mm: use block_lock_speculation() in _mm_write_lock() Jan Beulich
2024-03-18 12:21 ` Andrew Cooper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.