mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
qht: return existing entry when qht_insert fails
The meaning of "existing" is now changed to "matches in hash and ht->cmp result". This is saner than just checking the pointer value. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
61b8cef1d4
commit
32359d529f
5 changed files with 32 additions and 16 deletions
|
@ -1242,7 +1242,7 @@ static void tb_link_page(TranslationBlock *tb, tb_page_addr_t phys_pc,
|
|||
/* add in the hash table */
|
||||
h = tb_hash_func(phys_pc, tb->pc, tb->flags, tb->cflags & CF_HASH_MASK,
|
||||
tb->trace_vcpu_dstate);
|
||||
qht_insert(&tb_ctx.htable, tb, h);
|
||||
qht_insert(&tb_ctx.htable, tb, h, NULL);
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
if (DEBUG_TB_CHECK_GATE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue