unicorn/qemu/target
Peter Maydell 5e8e8b9bf8
target/arm: Set page (region) size in get_phys_addr_pmsav7()
We want to handle small MPU region sizes for ARMv7M. To do this,
make get_phys_addr_pmsav7() set the page size to the region
size if it is less that TARGET_PAGE_SIZE, rather than working
only in TARGET_PAGE_SIZE chunks.

Since the core TCG code con't handle execution from small
MPU regions, we strip the exec permission from them so that
any execution attempts will cause an MPU exception, rather
than allowing it to end up with a cpu_abort() in
get_page_addr_code().

(The previous code's intention was to make any small page be
treated as having no permissions, but unfortunately errors
in the implementation meant that it didn't behave that way.
It's possible that some binaries using small regions were
accidentally working with our old behaviour and won't now.)

Backports commit e5e40999b5e03567ef654546e3d448431643f8f3 from qemu
2018-07-03 00:49:51 -04:00
..
arm target/arm: Set page (region) size in get_phys_addr_pmsav7() 2018-07-03 00:49:51 -04:00
i386 i386: Enable TOPOEXT feature on AMD EPYC CPU 2018-07-03 00:32:50 -04:00
m68k target/m68k: Merge disas_m68k_insn into m68k_tr_translate_insn 2018-06-15 11:40:18 -04:00
mips tcg: Pass tb and index to tcg_gen_exit_tb separately 2018-06-07 11:56:32 -04:00
sparc tcg: Pass tb and index to tcg_gen_exit_tb separately 2018-06-07 11:56:32 -04:00