[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 16/41] accel/tcg: Support split-wx for darwin/iOS with vm_
From: |
Alex Bennée |
Subject: |
Re: [PATCH v3 16/41] accel/tcg: Support split-wx for darwin/iOS with vm_remap |
Date: |
Tue, 10 Nov 2020 17:37:27 +0000 |
User-agent: |
mu4e 1.5.7; emacs 28.0.50 |
Richard Henderson <richard.henderson@linaro.org> writes:
> Cribbed from code posted by Joelle van Dyne <j@getutm.app>,
> and rearranged to a cleaner structure. Completely untested.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> accel/tcg/translate-all.c | 65 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 65 insertions(+)
>
> diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
> index 1931e65365..17df6c94fa 100644
> --- a/accel/tcg/translate-all.c
> +++ b/accel/tcg/translate-all.c
> @@ -1166,9 +1166,71 @@ static bool alloc_code_gen_buffer_splitwx_memfd(size_t
> size, Error **errp)
> }
> #endif /* CONFIG_POSIX */
>
> +#ifdef CONFIG_DARWIN
> +#include <mach/mach.h>
> +
> +extern kern_return_t mach_vm_remap(vm_map_t target_task,
> + mach_vm_address_t *target_address,
> + mach_vm_size_t size,
> + mach_vm_offset_t mask,
> + int flags,
> + vm_map_t src_task,
> + mach_vm_address_t src_address,
> + boolean_t copy,
> + vm_prot_t *cur_protection,
> + vm_prot_t *max_protection,
> + vm_inherit_t inheritance);
Our checkpatch really doesn't like the extern being dropped in here but
having grepped the xnu source I'm not sure we have a choice. I'm curious
how stable the function might be given it's not in a published header.
--
Alex Bennée
- [PATCH v3 11/41] tcg: Make DisasContextBase.tb const, (continued)
- [PATCH v3 11/41] tcg: Make DisasContextBase.tb const, Richard Henderson, 2020/11/05
- [PATCH v3 12/41] tcg: Make tb arg to synchronize_from_tb const, Richard Henderson, 2020/11/05
- [PATCH v3 13/41] tcg: Use Error with alloc_code_gen_buffer, Richard Henderson, 2020/11/05
- [PATCH v3 14/41] tcg: Add --accel tcg,split-wx property, Richard Henderson, 2020/11/05
- [PATCH v3 15/41] accel/tcg: Support split-wx for linux with memfd, Richard Henderson, 2020/11/05
- [PATCH v3 18/41] tcg/i386: Support split-wx code generation, Richard Henderson, 2020/11/05
- [PATCH v3 16/41] accel/tcg: Support split-wx for darwin/iOS with vm_remap, Richard Henderson, 2020/11/05
- [PATCH v3 19/41] tcg/aarch64: Use B not BL for tcg_out_goto_long, Richard Henderson, 2020/11/05
- [PATCH v3 17/41] tcg: Return the TB pointer from the rx region from exit_tb, Richard Henderson, 2020/11/05
- [PATCH v3 20/41] tcg/aarch64: Implement flush_idcache_range manually, Richard Henderson, 2020/11/05
- [PATCH v3 21/41] tcg/aarch64: Support split-wx code generation, Richard Henderson, 2020/11/05
- [PATCH v3 22/41] disas: Push const down through host disasassembly, Richard Henderson, 2020/11/05
- [PATCH v3 23/41] tcg/tci: Push const down through bytecode reading, Richard Henderson, 2020/11/05
- [PATCH v3 24/41] tcg: Introduce tcg_tbrel_diff, Richard Henderson, 2020/11/05
- [PATCH v3 25/41] tcg/ppc: Use tcg_tbrel_diff, Richard Henderson, 2020/11/05
- [PATCH v3 26/41] tcg/ppc: Use tcg_out_mem_long to reset TCG_REG_TB, Richard Henderson, 2020/11/05