[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/10] tcg: set up tb->page_addr before insertion
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 06/10] tcg: set up tb->page_addr before insertion |
Date: |
Tue, 19 Jul 2016 10:32:17 +0200 |
From: Alex Bennée <address@hidden>
This ensures that if we find the TB on the slow path that tb->page_addr
is correctly set before being tested.
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Sergey Fedorov <address@hidden>
Signed-off-by: Sergey Fedorov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
translate-all.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/translate-all.c b/translate-all.c
index eaa1232..1ce05ff 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -1128,10 +1128,6 @@ static void tb_link_page(TranslationBlock *tb,
tb_page_addr_t phys_pc,
{
uint32_t h;
- /* add in the hash table */
- h = tb_hash_func(phys_pc, tb->pc, tb->flags);
- qht_insert(&tcg_ctx.tb_ctx.htable, tb, h);
-
/* add in the page list */
tb_alloc_page(tb, 0, phys_pc & TARGET_PAGE_MASK);
if (phys_page2 != -1) {
@@ -1140,6 +1136,10 @@ static void tb_link_page(TranslationBlock *tb,
tb_page_addr_t phys_pc,
tb->page_addr[1] = -1;
}
+ /* add in the hash table */
+ h = tb_hash_func(phys_pc, tb->pc, tb->flags);
+ qht_insert(&tcg_ctx.tb_ctx.htable, tb, h);
+
#ifdef DEBUG_TB_CHECK
tb_page_check();
#endif
--
2.7.4
- [Qemu-devel] [PATCH v5 00/10] Reduce lock contention on TCG hot-path, Paolo Bonzini, 2016/07/19
- [Qemu-devel] [PATCH 02/10] tcg: Pass last_tb by value to tb_find_fast(), Paolo Bonzini, 2016/07/19
- [Qemu-devel] [PATCH 01/10] util/qht: Document memory ordering assumptions, Paolo Bonzini, 2016/07/19
- [Qemu-devel] [PATCH 05/10] tcg: Prepare TB invalidation for lockless TB lookup, Paolo Bonzini, 2016/07/19
- [Qemu-devel] [PATCH 03/10] tcg: Prepare safe tb_jmp_cache lookup out of tb_lock, Paolo Bonzini, 2016/07/19
- [Qemu-devel] [PATCH 04/10] tcg: Prepare safe access to tb_flushed out of tb_lock, Paolo Bonzini, 2016/07/19
- [Qemu-devel] [PATCH 06/10] tcg: set up tb->page_addr before insertion,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 08/10] tcg: Avoid bouncing tb_lock between tb_gen_code() and tb_add_jump(), Paolo Bonzini, 2016/07/19
- [Qemu-devel] [PATCH 10/10] tcg: rename tb_find_physical(), Paolo Bonzini, 2016/07/19
- [Qemu-devel] [PATCH 09/10] tcg: Merge tb_find_slow() and tb_find_fast(), Paolo Bonzini, 2016/07/19
- [Qemu-devel] [PATCH 07/10] tcg: cpu-exec: remove tb_lock from the hot-path, Paolo Bonzini, 2016/07/19