qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/2] target-arm: Fix SYS_HEAPINFO for 64-bit guests


From: Peter Maydell
Subject: [Qemu-devel] [PATCH 0/2] target-arm: Fix SYS_HEAPINFO for 64-bit guests
Date: Fri, 24 Jun 2016 16:49:39 +0100

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]