qemu/accel/tcg/cputlb.c
/* This is a cross vCPU call (i.e. another vCPU resetting the flags of
 * the target vCPU).
 * We must take tlb_c.lock to avoid racing with another vCPU update. The only
 * thing actually updated is the target TLB entry ->addr_write flags.
 */
This is a cross vCPU call .
We must take tlb_c.lock to avoid racing with another vCPU update. The only
thing actually updated is the target TLB entry ->addr_write flags.
This is a cross vCPU call . We must take tlb_c . lock to avoid racing with another vCPU update . The only thing actually updated is the target TLB entry - > addr_write flags .
void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length)
{
    CPUArchState *env;
    int mmu_idx;
    env = cpu->env_ptr;
    qemu_spin_lock(&env->tlb_c.lock);
    for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) {
        unsigned int i;
        for (i = 0; i < CPU_TLB_SIZE; i++) {
            tlb_reset_dirty_range_locked(&env->tlb_table[mmu_idx][i], start1,
                                         length);
        }
        for (i = 0; i < CPU_VTLB_SIZE; i++) {
            tlb_reset_dirty_range_locked(&env->tlb_v_table[mmu_idx][i], start1,
                                         length);
        }
    }
    qemu_spin_unlock(&env->tlb_c.lock);
}
void tlb_reset_dirty ( CPUState * cpu , ram_addr_t start1 , ram_addr_t length ) { CPUArchState * env ; int mmu_idx ; env = cpu -> env_ptr ; qemu_spin_lock ( & env -> tlb_c . lock ) ; for ( mmu_idx = 0 ; mmu_idx < NB_MMU_MODES ; mmu_idx ++ ) { unsigned int i ; for ( i = 0 ; i < CPU_TLB_SIZE ; i ++ ) { tlb_reset_dirty_range_locked ( & env -> tlb_table [ mmu_idx ] [ i ] , start1 , length ) ; } for ( i = 0 ; i < CPU_VTLB_SIZE ; i ++ ) { tlb_reset_dirty_range_locked ( & env -> tlb_v_table [ mmu_idx ] [ i ] , start1 , length ) ; } } qemu_spin_unlock ( & env -> tlb_c . lock ) ; }
This is a cross vCPU call (i.e.
This is a cross vCPU call ( i . e .