[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/22] linux-user/riscv: initialise the TaskState heap/stack info
From: |
Alex Bennée |
Subject: |
[PULL 08/22] linux-user/riscv: initialise the TaskState heap/stack info |
Date: |
Wed, 24 Mar 2021 14:30:07 +0000 |
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>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20210323165308.15244-9-alex.bennee@linaro.org>
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
- [PULL 01/22] scripts/kernel-doc: strip QEMU_ from function definitions, (continued)
- [PULL 01/22] scripts/kernel-doc: strip QEMU_ from function definitions, Alex Bennée, 2021/03/24
- [PULL 02/22] docs/devel: include the plugin API information from the headers, Alex Bennée, 2021/03/24
- [PULL 03/22] docs/devel: expand style section of memory management, Alex Bennée, 2021/03/24
- [PULL 04/22] tools/virtiofsd: include --socket-group in help, Alex Bennée, 2021/03/24
- [PULL 07/22] semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO, Alex Bennée, 2021/03/24
- [PULL 05/22] semihosting: move semihosting tests to multiarch, Alex Bennée, 2021/03/24
- [PULL 06/22] semihosting/arm-compat-semi: unify GET/SET_ARG helpers, Alex Bennée, 2021/03/24
- [PULL 11/22] configure: Don't use the __atomic_*_16 functions for testing 128-bit support, Alex Bennée, 2021/03/24
- [PULL 13/22] utils: Tighter tests for qemu_strtosz, Alex Bennée, 2021/03/24
- [PULL 10/22] gitlab-ci.yml: Merge the trace-backend testing into other jobs, Alex Bennée, 2021/03/24
- [PULL 08/22] linux-user/riscv: initialise the TaskState heap/stack info,
Alex Bennée <=
- [PULL 14/22] utils: Work around mingw strto*l bug with 0x, Alex Bennée, 2021/03/24
- [PULL 12/22] cirrus.yml: Update the FreeBSD task to version 12.2, Alex Bennée, 2021/03/24
- [PULL 09/22] tests/tcg: add HeapInfo checking to semihosting test, Alex Bennée, 2021/03/24
- [PULL 18/22] blockdev: with -drive if=virtio, use generic virtio-blk, Alex Bennée, 2021/03/24
- [PULL 20/22] iotests: test m68k with the virt machine, Alex Bennée, 2021/03/24
- [PULL 16/22] qdev: define list of archs with virtio-pci or virtio-ccw, Alex Bennée, 2021/03/24
- [PULL 19/22] iotests: Revert "iotests: use -ccw on s390x for 040, 139, and 182", Alex Bennée, 2021/03/24
- [PULL 21/22] iotests: iothreads need ioeventfd, Alex Bennée, 2021/03/24
- [PULL 17/22] m68k: add the virtio devices aliases, Alex Bennée, 2021/03/24
- [PULL 15/22] gitlab: extend timeouts for CFI builds, Alex Bennée, 2021/03/24