diff options
author | Maxim Ostapenko <m.ostapenko@samsung.com> | 2016-07-08 15:47:42 +0300 |
---|---|---|
committer | SoonKyu Park <sk7.park@samsung.com> | 2018-04-10 13:45:33 +0900 |
commit | 0260a51fc6ee88f374a7f3dca974440f7fc94825 (patch) | |
tree | b97fcf3810be0e38279daf2a9e987063588c8bef | |
parent | 185780004b1727e4b60f4592e6c9fea4716b559a (diff) | |
download | qemu-tizen_5.5_base_mobile_hotfix.tar.gz qemu-tizen_5.5_base_mobile_hotfix.tar.bz2 qemu-tizen_5.5_base_mobile_hotfix.zip |
ASan-related hack to speedup aarch64 builds.tizen_5.5.m2_releasesubmit/tizen_5.5_base_wearable_hotfix/20201023.155602submit/tizen_5.5_base_mobile_hotfix/20201023.171502submit/tizen_5.0_base/20181101.000001accepted/tizen/5.5/base/wearable/hotfix/20201023.080204accepted/tizen/5.5/base/mobile/hotfix/20201023.083817accepted/tizen/5.0/base/20181101.091254tizen_5.5_tvtizen_5.5_base_wearable_hotfixtizen_5.5_base_mobile_hotfixtizen_5.5_basetizen_5.0_baseaccepted/tizen_5.5_base_wearable_hotfixaccepted/tizen_5.5_base_mobile_hotfix
Switch off memory pages checks in qemu if memory regions are mapped by ASan
Change-Id: I8233802ee35db00c799f5645072b8014f823b5c6
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
-rw-r--r-- | translate-all.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/translate-all.c b/translate-all.c index 1e7c61b38..5f6657369 100644 --- a/translate-all.c +++ b/translate-all.c @@ -1291,6 +1291,16 @@ TranslationBlock *tb_gen_code(CPUState *cpu, */ void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end) { +#if TARGET_LONG_SIZE == 8 + target_ulong asan_low_shadow_start = 0x0ffffff000; + target_ulong asan_shadow_gap_start = 0x1200000000; + target_ulong asan_high_shadow_start = 0x1400000000; + + if (start == asan_low_shadow_start || start == asan_shadow_gap_start + || start == asan_high_shadow_start) + return; +#endif + while (start < end) { tb_invalidate_phys_page_range(start, end, 0); start &= TARGET_PAGE_MASK; @@ -1947,6 +1957,16 @@ void page_set_flags(target_ulong start, target_ulong end, int flags) flags |= PAGE_WRITE_ORG; } +#if TARGET_LONG_SIZE == 8 + target_ulong asan_low_shadow_start = 0x0ffffff000; + target_ulong asan_shadow_gap_start = 0x1200000000; + target_ulong asan_high_shadow_start = 0x1400000000; + + if (start == asan_low_shadow_start || start == asan_shadow_gap_start + || start == asan_high_shadow_start) + return; +#endif + for (addr = start, len = end - start; len != 0; len -= TARGET_PAGE_SIZE, addr += TARGET_PAGE_SIZE) { @@ -1988,6 +2008,16 @@ int page_check_range(target_ulong start, target_ulong len, int flags) end = TARGET_PAGE_ALIGN(start + len); start = start & TARGET_PAGE_MASK; +#if TARGET_LONG_SIZE == 8 + target_ulong asan_low_shadow_start = 0x0ffffff000; + target_ulong asan_shadow_gap_start = 0x1200000000; + target_ulong asan_high_shadow_start = 0x1400000000; + + if (start == asan_low_shadow_start || start == asan_shadow_gap_start + || start == asan_high_shadow_start) + return 0; +#endif + for (addr = start, len = end - start; len != 0; len -= TARGET_PAGE_SIZE, addr += TARGET_PAGE_SIZE) { |