target-sh4: MMU: optimize UTLB accesses
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 2 Feb 2010 18:50:51 +0000 (19:50 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Tue, 9 Feb 2010 20:08:05 +0000 (21:08 +0100)
commite67fcc1178d21f7cf2c3cac0916f1e4e0bed16f8
tree3f9b7d8d03a1436c45c38256b1dc438053136ca3
parent2909462215c7663d1a6cd2832a9176d0c9f4063f
target-sh4: MMU: optimize UTLB accesses

With the current code, the QEMU TLB is setup to match the read/write
mode of the MMU fault. This means when read access is done, the page
is setup in read-only mode. When the page is later accessed in write
mode, an MMU fault happened, and the page is switch in write-only
mode. This flip-flop causes a lot of calls to the MMU code and slow
down the emulation.

This patch changes the MMU emulation, so that the QEMU TLB is setup
to match the UTLB protection key. This impressively increase the
speed of the emulation.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-sh4/helper.c