From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGTMg-0001aa-F4 for qemu-devel@nongnu.org; Fri, 24 Jun 2016 11:49:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGTMe-0004LF-Nl for qemu-devel@nongnu.org; Fri, 24 Jun 2016 11:49:53 -0400 From: Peter Maydell Date: Fri, 24 Jun 2016 16:49:39 +0100 Message-Id: <1466783381-29506-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 0/2] target-arm: Fix SYS_HEAPINFO for 64-bit guests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: patches@linaro.org, Tsung-Han Lin , Laurent Desnogues These patches fix bugs in the ARM semihosting SYS_HEAPINFO syscall for 64-bit guests: * the fields in linux-user's TaskState should be abi_ulong, not uint32_t, since they're guest addresses * the SYS_HEAPINFO implementation needs to write its return data struct using fields of the right width The recent patch from Tsung-Han Lin ("target-arm: fix semihosting ram base issue") addressed this issue in passing, but these patches take a slightly different approach: * factor out the "write fields back" code to reduce duplication between the various (32,64) x (user,system) cases * use put_user*() rather than tswap and direct write, to avoid potential issues with the guest handing us a misaligned pointer thanks -- PMM Peter Maydell (2): linux-user: Make semihosting heap/stack fields abi_ulongs target-arm/arm-semi.c: Fix SYS_HEAPINFO for 64-bit guests linux-user/qemu.h | 6 +++--- target-arm/arm-semi.c | 47 ++++++++++++++++++++++++++--------------------- 2 files changed, 29 insertions(+), 24 deletions(-) -- 1.9.1