From: "Alex Bennée" <alex.bennee@linaro.org>
To: peter.maydell@linaro.org
Cc: "Riku Voipio" <riku.voipio@iki.fi>,
qemu-arm@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org, "Laurent Vivier" <laurent@vivier.eu>
Subject: [Qemu-devel] [PATCH v1 1/4] target/ppc: fix signal delivery for ppc64abi32
Date: Tue, 10 Sep 2019 20:34:05 +0100 [thread overview]
Message-ID: <20190910193408.28917-2-alex.bennee@linaro.org> (raw)
In-Reply-To: <20190910193408.28917-1-alex.bennee@linaro.org>
We were incorrectly setting NIP resulting in a segfault. This fixes
linux-test for this ABI.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
linux-user/ppc/signal.c | 4 +++-
tests/tcg/configure.sh | 1 +
tests/tcg/multiarch/Makefile.target | 5 -----
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c
index 619a56950df..5b82af6cb62 100644
--- a/linux-user/ppc/signal.c
+++ b/linux-user/ppc/signal.c
@@ -501,7 +501,9 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
int i, err = 0;
#if defined(TARGET_PPC64)
struct target_sigcontext *sc = 0;
+#if !defined(TARGET_ABI32)
struct image_info *image = ((TaskState *)thread_cpu->opaque)->info;
+#endif
#endif
rt_sf_addr = get_sigframe(ka, env, sizeof(*rt_sf));
@@ -557,7 +559,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
env->gpr[5] = (target_ulong) h2g(&rt_sf->uc);
env->gpr[6] = (target_ulong) h2g(rt_sf);
-#if defined(TARGET_PPC64)
+#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
if (get_ppc64_abi(image) < 2) {
/* ELFv1 PPC64 function pointers are pointers to OPD entries. */
struct target_func_ptr *handler =
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index 6c4a471aeae..e8a1a1495fc 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -54,6 +54,7 @@ fi
: ${cross_cc_cflags_ppc="-m32"}
: ${cross_cc_ppc64="powerpc-linux-gnu-gcc"}
: ${cross_cc_cflags_ppc64="-m64"}
+: ${cross_cc_cflags_ppc64abi32="-mcpu=power8"}
: ${cross_cc_ppc64le="powerpc64le-linux-gnu-gcc"}
: ${cross_cc_cflags_s390x="-m64"}
: ${cross_cc_cflags_sparc="-m32 -mv8plus -mcpu=ultrasparc"}
diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target
index 6b1e30e2fec..e6893b2e283 100644
--- a/tests/tcg/multiarch/Makefile.target
+++ b/tests/tcg/multiarch/Makefile.target
@@ -12,11 +12,6 @@ VPATH += $(MULTIARCH_SRC)
MULTIARCH_SRCS =$(notdir $(wildcard $(MULTIARCH_SRC)/*.c))
MULTIARCH_TESTS =$(MULTIARCH_SRCS:.c=)
-# FIXME: ppc64abi32 linux-test seems to have issues but the other basic tests work
-ifeq ($(TARGET_NAME),ppc64abi32)
-BROKEN_TESTS = linux-test
-endif
-
# Update TESTS
TESTS += $(filter-out $(BROKEN_TESTS), $(MULTIARCH_TESTS))
--
2.20.1
next prev parent reply other threads:[~2019-09-10 19:36 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-10 19:34 [Qemu-devel] [PATCH v1 0/4] ELF and (macro) safety Alex Bennée
2019-09-10 19:34 ` Alex Bennée [this message]
2019-09-10 19:45 ` [Qemu-devel] [PATCH v1 1/4] target/ppc: fix signal delivery for ppc64abi32 Alex Bennée
2019-09-10 19:34 ` [Qemu-devel] [PATCH v1 2/4] elf: move elf.h to elf/elf.h and split out types Alex Bennée
2019-09-11 0:08 ` David Gibson
2019-09-11 8:29 ` BALATON Zoltan
2019-09-11 9:19 ` Alex Bennée
2019-09-14 18:15 ` Richard Henderson
2019-10-21 13:53 ` Laurent Vivier
2019-10-21 14:04 ` Peter Maydell
2019-09-10 19:34 ` [Qemu-devel] [PATCH v1 3/4] elf: move elf_ops.h into include/elf/ and rename Alex Bennée
2019-09-11 8:20 ` Alex Bennée
2019-09-14 18:16 ` Richard Henderson
2019-10-21 13:56 ` Laurent Vivier
2019-09-10 19:34 ` [Qemu-devel] [PATCH v1 4/4] elf: move ELF_ARCH definition to elf-arch.h Alex Bennée
2019-09-10 21:14 ` Aleksandar Markovic
2019-09-11 9:26 ` Alex Bennée
2019-09-13 14:45 ` Aleksandar Markovic
2019-09-14 15:52 ` Richard Henderson
2019-09-14 17:51 ` Alex Bennée
2019-09-14 18:19 ` Richard Henderson
2019-09-10 21:39 ` Aleksandar Markovic
2019-09-11 8:19 ` Alex Bennée
2019-10-21 14:03 ` Laurent Vivier
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=20190910193408.28917-2-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=laurent@vivier.eu \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/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).