path: root/target-cris
authorPaul Brook <[email protected]>2010-03-17 02:14:28 (GMT)
committer Paul Brook <[email protected]>2010-03-17 02:44:41 (GMT)
commitd4c430a80f000d722bb70287af4d4c184a8d7006 (patch) (side-by-side diff)
tree9b9d059b2158f25fc0629fddcef192e3d791b187 /target-cris
parent409dbce54b57b85bd229174da86d77ca08508508 (diff)
Large page TLB flush
QEMU uses a fixed page size for the CPU TLB. If the guest uses large pages then we effectively split these into multiple smaller pages, and populate the corresponding TLB entries on demand. When the guest invalidates the TLB by virtual address we must invalidate all entries covered by the large page. However the address used to invalidate the entry may not be present in the QEMU TLB, so we do not know which regions to clear. Implementing a full vaiable size TLB is hard and slow, so just keep a simple address/mask pair to record which addresses may have been mapped by large pages. If the guest invalidates this region then flush the whole TLB. Signed-off-by: Paul Brook <[email protected]>
Diffstat (limited to 'target-cris') (more/less context) (ignore whitespace changes)
1 files changed, 3 insertions, 2 deletions
diff --git a/target-cris/helper.c b/target-cris/helper.c
index b101dc5..fcdcf97 100644
--- a/target-cris/helper.c
+++ b/target-cris/helper.c
@@ -100,8 +100,9 @@ int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
phy = res.phy & ~0x80000000;
prot = res.prot;
- r = tlb_set_page(env, address & TARGET_PAGE_MASK,
- phy, prot, mmu_idx, is_softmmu);
+ tlb_set_page(env, address & TARGET_PAGE_MASK, phy,
+ prot | PAGE_EXEC, mmu_idx, TARGET_PAGE_SIZE);
+ r = 0;
if (r > 0)
D_LOG("%s returns %d irqreq=%x addr=%x"