mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
tcg: Introduce target-specific page data for user-only
This data can be allocated by page_alloc_target_data() and released by page_set_flags(start, end, prot | PAGE_RESET). This data will be used to hold tag memory for AArch64 MTE. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210212184902.1251044-2-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
8ba4bca570
commit
d9c5858570
4 changed files with 69 additions and 9 deletions
|
@ -599,6 +599,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int target_prot,
|
|||
}
|
||||
}
|
||||
the_end1:
|
||||
page_flags |= PAGE_RESET;
|
||||
page_set_flags(start, start + len, page_flags);
|
||||
the_end:
|
||||
trace_target_mmap_complete(start);
|
||||
|
@ -794,7 +795,8 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
|
|||
new_addr = h2g(host_addr);
|
||||
prot = page_get_flags(old_addr);
|
||||
page_set_flags(old_addr, old_addr + old_size, 0);
|
||||
page_set_flags(new_addr, new_addr + new_size, prot | PAGE_VALID);
|
||||
page_set_flags(new_addr, new_addr + new_size,
|
||||
prot | PAGE_VALID | PAGE_RESET);
|
||||
}
|
||||
tb_invalidate_phys_range(new_addr, new_addr + new_size);
|
||||
mmap_unlock();
|
||||
|
|
|
@ -4643,8 +4643,8 @@ static inline abi_ulong do_shmat(CPUArchState *cpu_env,
|
|||
raddr=h2g((unsigned long)host_raddr);
|
||||
|
||||
page_set_flags(raddr, raddr + shm_info.shm_segsz,
|
||||
PAGE_VALID | PAGE_READ |
|
||||
((shmflg & SHM_RDONLY)? 0 : PAGE_WRITE));
|
||||
PAGE_VALID | PAGE_RESET | PAGE_READ |
|
||||
(shmflg & SHM_RDONLY ? 0 : PAGE_WRITE));
|
||||
|
||||
for (i = 0; i < N_SHM_REGIONS; i++) {
|
||||
if (!shm_regions[i].in_use) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue