qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] target-arm: Fix SYS_HEAPINFO for 64-bit guests
@ 2016-06-24 15:49 Peter Maydell
  2016-06-24 15:49 ` [Qemu-devel] [PATCH 1/2] linux-user: Make semihosting heap/stack fields abi_ulongs Peter Maydell
  2016-06-24 15:49 ` [Qemu-devel] [PATCH 2/2] target-arm/arm-semi.c: Fix SYS_HEAPINFO for 64-bit guests Peter Maydell
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Maydell @ 2016-06-24 15:49 UTC (permalink / raw)
  To: qemu-arm, qemu-devel; +Cc: patches, 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-24 16:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-24 15:49 [Qemu-devel] [PATCH 0/2] target-arm: Fix SYS_HEAPINFO for 64-bit guests Peter Maydell
2016-06-24 15:49 ` [Qemu-devel] [PATCH 1/2] linux-user: Make semihosting heap/stack fields abi_ulongs Peter Maydell
2016-06-24 15:58   ` Laurent Desnogues
2016-06-24 15:49 ` [Qemu-devel] [PATCH 2/2] target-arm/arm-semi.c: Fix SYS_HEAPINFO for 64-bit guests Peter Maydell
2016-06-24 16:09   ` Laurent Desnogues
2016-06-24 16:39     ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).