From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: patches@linaro.org, Tsung-Han Lin <tsunghan.tw@gmail.com>,
Laurent Desnogues <laurent.desnogues@gmail.com>
Subject: [Qemu-devel] [PATCH 0/2] target-arm: Fix SYS_HEAPINFO for 64-bit guests
Date: Fri, 24 Jun 2016 16:49:39 +0100 [thread overview]
Message-ID: <1466783381-29506-1-git-send-email-peter.maydell@linaro.org> (raw)
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
next reply other threads:[~2016-06-24 15:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-24 15:49 Peter Maydell [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1466783381-29506-1-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=laurent.desnogues@gmail.com \
--cc=patches@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=tsunghan.tw@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).