cputlb.c (e672f1d39755a6f7007dc8b04a9af43f1b7177ca) cputlb.c (e124536f37377cff5d68925d4976ad604d0ebf3a)
1/*
2 * Common CPU TLB handling
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 1291 unchanged lines hidden (view full) ---

1300{
1301 CPUClass *cc = CPU_GET_CLASS(cpu);
1302 bool ok;
1303
1304 /*
1305 * This is not a probe, so only valid return is success; failure
1306 * should result in exception + longjmp to the cpu loop.
1307 */
1/*
2 * Common CPU TLB handling
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 1291 unchanged lines hidden (view full) ---

1300{
1301 CPUClass *cc = CPU_GET_CLASS(cpu);
1302 bool ok;
1303
1304 /*
1305 * This is not a probe, so only valid return is success; failure
1306 * should result in exception + longjmp to the cpu loop.
1307 */
1308 ok = cc->tlb_fill(cpu, addr, size, access_type, mmu_idx, false, retaddr);
1308 ok = cc->tcg_ops.tlb_fill(cpu, addr, size,
1309 access_type, mmu_idx, false, retaddr);
1309 assert(ok);
1310}
1311
1312static uint64_t io_readx(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
1313 int mmu_idx, target_ulong addr, uintptr_t retaddr,
1314 MMUAccessType access_type, MemOp op)
1315{
1316 CPUState *cpu = env_cpu(env);

--- 254 unchanged lines hidden (view full) ---

1571 tlb_addr = tlb_read_ofs(entry, elt_ofs);
1572
1573 page_addr = addr & TARGET_PAGE_MASK;
1574 if (!tlb_hit_page(tlb_addr, page_addr)) {
1575 if (!victim_tlb_hit(env, mmu_idx, index, elt_ofs, page_addr)) {
1576 CPUState *cs = env_cpu(env);
1577 CPUClass *cc = CPU_GET_CLASS(cs);
1578
1310 assert(ok);
1311}
1312
1313static uint64_t io_readx(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
1314 int mmu_idx, target_ulong addr, uintptr_t retaddr,
1315 MMUAccessType access_type, MemOp op)
1316{
1317 CPUState *cpu = env_cpu(env);

--- 254 unchanged lines hidden (view full) ---

1572 tlb_addr = tlb_read_ofs(entry, elt_ofs);
1573
1574 page_addr = addr & TARGET_PAGE_MASK;
1575 if (!tlb_hit_page(tlb_addr, page_addr)) {
1576 if (!victim_tlb_hit(env, mmu_idx, index, elt_ofs, page_addr)) {
1577 CPUState *cs = env_cpu(env);
1578 CPUClass *cc = CPU_GET_CLASS(cs);
1579
1579 if (!cc->tlb_fill(cs, addr, fault_size, access_type,
1580 mmu_idx, nonfault, retaddr)) {
1580 if (!cc->tcg_ops.tlb_fill(cs, addr, fault_size, access_type,
1581 mmu_idx, nonfault, retaddr)) {
1581 /* Non-faulting page table read failed. */
1582 *phost = NULL;
1583 return TLB_INVALID_MASK;
1584 }
1585
1586 /* TLB resize via tlb_fill may have moved the entry. */
1587 entry = tlb_entry(env, mmu_idx, addr);
1588 }

--- 1158 unchanged lines hidden ---
1582 /* Non-faulting page table read failed. */
1583 *phost = NULL;
1584 return TLB_INVALID_MASK;
1585 }
1586
1587 /* TLB resize via tlb_fill may have moved the entry. */
1588 entry = tlb_entry(env, mmu_idx, addr);
1589 }

--- 1158 unchanged lines hidden ---