[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 08/11] tcg: set up tb->page_addr before insertion
From: |
Sergey Fedorov |
Subject: |
[Qemu-devel] [PATCH v3 08/11] tcg: set up tb->page_addr before insertion |
Date: |
Tue, 12 Jul 2016 23:13:43 +0300 |
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>
---
translate-all.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/translate-all.c b/translate-all.c
index ee8308209350..b7369fe5bd04 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -1119,10 +1119,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) {
@@ -1131,6 +1127,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
--
1.9.1
- Re: [Qemu-devel] [PATCH v3 01/11] util/qht: Document memory ordering assumptions, (continued)
- [Qemu-devel] [PATCH v3 05/11] target-i386: Remove redundant HF_SOFTMMU_MASK, Sergey Fedorov, 2016/07/12
- [Qemu-devel] [PATCH v3 08/11] tcg: set up tb->page_addr before insertion,
Sergey Fedorov <=
- [Qemu-devel] [PATCH v3 07/11] tcg: Prepare TB invalidation for lockless TB lookup, Sergey Fedorov, 2016/07/12
- [Qemu-devel] [PATCH v3 09/11] tcg: cpu-exec: remove tb_lock from the hot-path, Sergey Fedorov, 2016/07/12
- [Qemu-devel] [PATCH v3 06/11] tcg: Introduce tb_mark_invalid() and tb_is_invalid(), Sergey Fedorov, 2016/07/12
Re: [Qemu-devel] [PATCH v3 06/11] tcg: Introduce tb_mark_invalid() and tb_is_invalid(), Alex Bennée, 2016/07/14