[PATCH] x86/thunk: Don't opencode TSX instructions in clear_bhb_tsx()

Andrew Cooper posted 1 patch 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20250501181655.711704-1-andrew.cooper3@citrix.com
xen/arch/x86/bhb-thunk.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] x86/thunk: Don't opencode TSX instructions in clear_bhb_tsx()
Posted by Andrew Cooper 6 months ago
The new toolchain baseline understands the RTM instructions.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/bhb-thunk.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/bhb-thunk.S b/xen/arch/x86/bhb-thunk.S
index 678c00c5d06f..f5ac41834bbd 100644
--- a/xen/arch/x86/bhb-thunk.S
+++ b/xen/arch/x86/bhb-thunk.S
@@ -19,8 +19,8 @@
  * disabled for e.g. TAA mitigation reasons.
  */
 FUNC(clear_bhb_tsx)
-        .byte 0xc7, 0xf8; .long 1f - 0f /* xbegin 1f */
-0:      .byte 0xc6, 0xf8, 0             /* xabort $0 */
+        xbegin  1f
+        xabort  $0
         int3
 1:
         ret
-- 
2.39.5


Re: [PATCH] x86/thunk: Don't opencode TSX instructions in clear_bhb_tsx()
Posted by Jan Beulich 6 months ago
On 01.05.2025 20:16, Andrew Cooper wrote:
> The new toolchain baseline understands the RTM instructions.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>