void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr)

{

    CPUState *cpu;

    PageDesc *p;

    uint32_t h;

    tb_page_addr_t phys_pc;



    assert_tb_locked();



    atomic_set(&tb->cflags, tb->cflags | CF_INVALID);



    /* remove the TB from the hash list */

    phys_pc = tb->page_addr[0] + (tb->pc & ~TARGET_PAGE_MASK);

    h = tb_hash_func(phys_pc, tb->pc, tb->flags, tb->cflags & CF_HASH_MASK,

                     tb->trace_vcpu_dstate);

    qht_remove(&tb_ctx.htable, tb, h);



    /* remove the TB from the page list */

    if (tb->page_addr[0] != page_addr) {

        p = page_find(tb->page_addr[0] >> TARGET_PAGE_BITS);

        tb_page_remove(&p->first_tb, tb);

        invalidate_page_bitmap(p);

    }

    if (tb->page_addr[1] != -1 && tb->page_addr[1] != page_addr) {

        p = page_find(tb->page_addr[1] >> TARGET_PAGE_BITS);

        tb_page_remove(&p->first_tb, tb);

        invalidate_page_bitmap(p);

    }



    /* remove the TB from the hash list */

    h = tb_jmp_cache_hash_func(tb->pc);

    CPU_FOREACH(cpu) {

        if (atomic_read(&cpu->tb_jmp_cache[h]) == tb) {

            atomic_set(&cpu->tb_jmp_cache[h], NULL);

        }

    }



    /* suppress this TB from the two jump lists */

    tb_remove_from_jmp_list(tb, 0);

    tb_remove_from_jmp_list(tb, 1);



    /* suppress any remaining jumps to this TB */

    tb_jmp_unlink(tb);



    tb_ctx.tb_phys_invalidate_count++;

}

void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr)

{

    CPUState *cpu;

    PageDesc *p;

    uint32_t h;

    tb_page_addr_t phys_pc;



    assert_tb_locked();



    atomic_set(&tb->cflags, tb->cflags | CF_INVALID);



    

    phys_pc = tb->page_addr[0] + (tb->pc & ~TARGET_PAGE_MASK);

    h = tb_hash_func(phys_pc, tb->pc, tb->flags, tb->cflags & CF_HASH_MASK,

                     tb->trace_vcpu_dstate);

    qht_remove(&tb_ctx.htable, tb, h);



    

    if (tb->page_addr[0] != page_addr) {

        p = page_find(tb->page_addr[0] >> TARGET_PAGE_BITS);

        tb_page_remove(&p->first_tb, tb);

        invalidate_page_bitmap(p);

    }

    if (tb->page_addr[1] != -1 && tb->page_addr[1] != page_addr) {

        p = page_find(tb->page_addr[1] >> TARGET_PAGE_BITS);

        tb_page_remove(&p->first_tb, tb);

        invalidate_page_bitmap(p);

    }



    

    h = tb_jmp_cache_hash_func(tb->pc);

    CPU_FOREACH(cpu) {

        if (atomic_read(&cpu->tb_jmp_cache[h]) == tb) {

            atomic_set(&cpu->tb_jmp_cache[h], NULL);

        }

    }



    

    tb_remove_from_jmp_list(tb, 0);

    tb_remove_from_jmp_list(tb, 1);



    

    tb_jmp_unlink(tb);



    tb_ctx.tb_phys_invalidate_count++;

}

    qht_remove(&tb_ctx.htable, tb, h);
void FUNC_0(TranslationBlock *VAR_0, tb_page_addr_t VAR_1)

{

    CPUState *cpu;

    PageDesc *p;

    uint32_t h;

    tb_page_addr_t phys_pc;



    assert_tb_locked();



    atomic_set(&VAR_0->cflags, VAR_0->cflags | CF_INVALID);



    

    phys_pc = VAR_0->VAR_1[0] + (VAR_0->pc & ~TARGET_PAGE_MASK);

    h = tb_hash_func(phys_pc, VAR_0->pc, VAR_0->flags, VAR_0->cflags & CF_HASH_MASK,

                     VAR_0->trace_vcpu_dstate);

    qht_remove(&tb_ctx.htable, VAR_0, h);



    

    if (VAR_0->VAR_1[0] != VAR_1) {

        p = page_find(VAR_0->VAR_1[0] >> TARGET_PAGE_BITS);

        tb_page_remove(&p->first_tb, VAR_0);

        invalidate_page_bitmap(p);

    }

    if (VAR_0->VAR_1[1] != -1 && VAR_0->VAR_1[1] != VAR_1) {

        p = page_find(VAR_0->VAR_1[1] >> TARGET_PAGE_BITS);

        tb_page_remove(&p->first_tb, VAR_0);

        invalidate_page_bitmap(p);

    }



    

    h = tb_jmp_cache_hash_func(VAR_0->pc);

    CPU_FOREACH(cpu) {

        if (atomic_read(&cpu->tb_jmp_cache[h]) == VAR_0) {

            atomic_set(&cpu->tb_jmp_cache[h], NULL);

        }

    }



    

    tb_remove_from_jmp_list(VAR_0, 0);

    tb_remove_from_jmp_list(VAR_0, 1);



    

    tb_jmp_unlink(VAR_0);



    tb_ctx.tb_phys_invalidate_count++;

}

void FUNC_0(TranslationBlock *VAR_0, tb_page_addr_t VAR_1)
{ CPUState *cpu; PageDesc *p; uint32_t h; tb_page_addr_t phys_pc; assert_tb_locked(); atomic_set(&VAR_0->cflags, VAR_0->cflags | CF_INVALID); phys_pc = VAR_0->VAR_1[0] + (VAR_0->pc & ~TARGET_PAGE_MASK); h = tb_hash_func(phys_pc, VAR_0->pc, VAR_0->flags, VAR_0->cflags & CF_HASH_MASK,
VAR_0->trace_vcpu_dstate); qht_remove(&tb_ctx.htable, VAR_0, h); if (VAR_0->VAR_1[0] != VAR_1) { p = page_find(VAR_0->VAR_1[0] >> TARGET_PAGE_BITS); tb_page_remove(&p->first_tb, VAR_0); invalidate_page_bitmap(p); } if (VAR_0->VAR_1[1] != -1 && VAR_0->VAR_1[1] != VAR_1) { p = page_find(VAR_0->VAR_1[1] >> TARGET_PAGE_BITS); tb_page_remove(&p->first_tb, VAR_0); invalidate_page_bitmap(p); } h = tb_jmp_cache_hash_func(VAR_0->pc); CPU_FOREACH(cpu) { if (atomic_read(&cpu->tb_jmp_cache[h]) == VAR_0) { atomic_set(&cpu->tb_jmp_cache[h], NULL); } } tb_remove_from_jmp_list(VAR_0, 0); tb_remove_from_jmp_list(VAR_0, 1); tb_jmp_unlink(VAR_0); tb_ctx.tb_phys_invalidate_count++; }