mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-02-11 19:39:26 -07:00
linux-user/aarch64: Reset target data on MADV_DONTNEED
aarch64 stores MTE tags in target_date, and they should be reset by MADV_DONTNEED. Signed-off-by: Vitaly Buka <vitalybuka@google.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220711220028.2467290-1-vitalybuka@google.com> [lv: fix code style issues] Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
a6b1c53e79
commit
dbbf89751b
3 changed files with 30 additions and 0 deletions
|
|
@ -894,6 +894,9 @@ abi_long target_madvise(abi_ulong start, abi_ulong len_in, int advice)
|
|||
if (advice == MADV_DONTNEED &&
|
||||
can_passthrough_madv_dontneed(start, end)) {
|
||||
ret = get_errno(madvise(g2h_untagged(start), len, MADV_DONTNEED));
|
||||
if (ret == 0) {
|
||||
page_reset_target_data(start, start + len);
|
||||
}
|
||||
}
|
||||
mmap_unlock();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue