[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 08/22] linux-user/riscv: initialise the TaskState heap/sta
From: |
Alistair Francis |
Subject: |
Re: [PATCH v2 08/22] linux-user/riscv: initialise the TaskState heap/stack info |
Date: |
Tue, 23 Mar 2021 17:29:46 -0400 |
On Tue, Mar 23, 2021 at 1:07 PM Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Arguably the target_cpu_copy_regs function for each architecture is
> misnamed as a number of the architectures also take the opportunity to
> fill out the TaskState structure. This could arguably be factored out
> into common code but that would require a wider audit of the
> architectures. For now just replicate for riscv so we can correctly
> report semihosting information for SYS_HEAPINFO.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Message-Id: <20210312102029.17017-5-alex.bennee@linaro.org>
> Message-Id: <20210320133706.21475-9-alex.bennee@linaro.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> linux-user/riscv/cpu_loop.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/linux-user/riscv/cpu_loop.c b/linux-user/riscv/cpu_loop.c
> index 6767f941e8..74a9628dc9 100644
> --- a/linux-user/riscv/cpu_loop.c
> +++ b/linux-user/riscv/cpu_loop.c
> @@ -135,4 +135,9 @@ void target_cpu_copy_regs(CPUArchState *env, struct
> target_pt_regs *regs)
> error_report("Incompatible ELF: RVE cpu requires RVE ABI binary");
> exit(EXIT_FAILURE);
> }
> +
> + ts->stack_base = info->start_stack;
> + ts->heap_base = info->brk;
> + /* This will be filled in on the first SYS_HEAPINFO call. */
> + ts->heap_limit = 0;
> }
> --
> 2.20.1
>
>
- [PATCH for 6.0 v2 00/22] fixes for rc1 pre-PR (kernel-doc, semihosting, testing), Alex Bennée, 2021/03/23
- [PATCH v2 01/22] scripts/kernel-doc: strip QEMU_ from function definitions, Alex Bennée, 2021/03/23
- [PATCH v2 02/22] docs/devel: include the plugin API information from the headers, Alex Bennée, 2021/03/23
- [PATCH v2 04/22] tools/virtiofsd: include --socket-group in help, Alex Bennée, 2021/03/23
- [PATCH v2 03/22] docs/devel: expand style section of memory management, Alex Bennée, 2021/03/23
- [PATCH v2 05/22] semihosting: move semihosting tests to multiarch, Alex Bennée, 2021/03/23
- [PATCH v2 07/22] semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO, Alex Bennée, 2021/03/23
- [PATCH v2 08/22] linux-user/riscv: initialise the TaskState heap/stack info, Alex Bennée, 2021/03/23
- Re: [PATCH v2 08/22] linux-user/riscv: initialise the TaskState heap/stack info,
Alistair Francis <=
- [PATCH v2 06/22] semihosting/arm-compat-semi: unify GET/SET_ARG helpers, Alex Bennée, 2021/03/23
- [PATCH v2 13/22] utils: Tighter tests for qemu_strtosz, Alex Bennée, 2021/03/23
- [PATCH v2 12/22] cirrus.yml: Update the FreeBSD task to version 12.2, Alex Bennée, 2021/03/23
- [PATCH v2 09/22] tests/tcg: add HeapInfo checking to semihosting test, Alex Bennée, 2021/03/23
- [PATCH v2 11/22] configure: Don't use the __atomic_*_16 functions for testing 128-bit support, Alex Bennée, 2021/03/23
- [PATCH v2 10/22] gitlab-ci.yml: Merge the trace-backend testing into other jobs, Alex Bennée, 2021/03/23
- [PATCH v2 14/22] utils: Work around mingw strto*l bug with 0x, Alex Bennée, 2021/03/23
- [PATCH v2 21/22] iotests: iothreads need ioeventfd, Alex Bennée, 2021/03/23