[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/11] tcg/sparc: Make direct jump patching thread-s
From: |
Sergey Fedorov |
Subject: |
[Qemu-devel] [PATCH 09/11] tcg/sparc: Make direct jump patching thread-safe |
Date: |
Thu, 7 Apr 2016 18:53:51 +0300 |
From: Sergey Fedorov <address@hidden>
Ensure direct jump patching in SPARC is atomic by using
atomic_read()/atomic_set() for code patching.
Signed-off-by: Sergey Fedorov <address@hidden>
Signed-off-by: Sergey Fedorov <address@hidden>
---
tcg/sparc/tcg-target.inc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/sparc/tcg-target.inc.c b/tcg/sparc/tcg-target.inc.c
index 54df1bc42432..629dd7bdafff 100644
--- a/tcg/sparc/tcg-target.inc.c
+++ b/tcg/sparc/tcg-target.inc.c
@@ -1647,6 +1647,6 @@ void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t
addr)
the code_gen_buffer can't be larger than 2GB. */
assert(disp == (int32_t)disp);
- *ptr = CALL | (uint32_t)disp >> 2;
+ atomic_set(ptr, CALL | (uint32_t)disp >> 2);
flush_icache_range(jmp_addr, jmp_addr + 4);
}
--
2.8.1
- [Qemu-devel] [PATCH 11/11] tcg: Note requirement on atomic direct jump patching, (continued)
Re: [Qemu-devel] [PATCH 08/11] tcg/aarch64: Make direct jump patching thread-safe, Sergey Fedorov, 2016/04/21
[Qemu-devel] [PATCH 09/11] tcg/sparc: Make direct jump patching thread-safe,
Sergey Fedorov <=
[Qemu-devel] [PATCH 10/11] tcg/mips: Make direct jump patching thread-safe, Sergey Fedorov, 2016/04/07
Re: [Qemu-devel] [PATCH 00/11] tcg: Make direct jump patching thread-safe, Sergey Fedorov, 2016/04/07
Re: [Qemu-devel] [PATCH 00/11] tcg: Make direct jump patching thread-safe, Alex Bennée, 2016/04/20