From patchwork Tue Sep 10 19:34:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 173551 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp6237581ilq; Tue, 10 Sep 2019 12:35:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzx49Im29JXyyCpZaZMRczOEjVLV29CJIB4Rf4HEdjKKYL49Stna9YGSF+26hhMMh+35bgI X-Received: by 2002:ac8:33c3:: with SMTP id d3mr31671589qtb.41.1568144145021; Tue, 10 Sep 2019 12:35:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568144145; cv=none; d=google.com; s=arc-20160816; b=azr6iN5EN1+0y7tdWxdt12YiywAOvPg7xU9N64S4tgtCPU5ReGNcpsfm0Raib2hSwy optlQXXgkcsF4yexcQve3Refea3dF7GdQ1lLEVniZTrElC1T0bzdtfdbn0w4IoFf5sxl V//hUQ6X8uhZ3CMfIHjuD50D/E+WyoQXxDaPIhcAaOXwlafP3BPPxvyBs7e+7NQgPL+V N3Vgf8w+RKhpwdjEDZwN1SNJDcsIujYTSjPOTUXlaX/Tle2UqsBBFLXOOAdmtBdN2zVs PnLkDfFx9Qv95g3LwAvzQjhOxjJleOT+/4TlIQZwx6R0x+Zyf5Za2tQ9Zz6bw/ShsWVL zDiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=5XyzKPTEVeMZHoyBnFttJunUqWTPcDprpKPpXz8/JuA=; b=aYOfH6FOQOwktdCnaQY7oDU5rnRPXmtLAWzd5OBxF2vMuhtjhAkZGXx7aAasMEv640 dNM32IfdWCjQSVXsJWGZwSRKVlaSkA89EMoK/7CM0i97WHGlvn+8CFCpsAi6H8N+IRif dDwGNbO2WIcExWCHzsVPfE/xapnKusLDdBDDZkDIpWXWO8ojHzUPT3cWAOnRp01z6PJB HZrXrDp1pxR3lFo1gSkGqAOFzCYtaQUsz8+IupEVpgJdKVmGH26LhV5YBH7vzT+YYLto 76xSjjEI+AOemOTopHRjcU+Dp2/oMznI6JUBN0ITibgq0uU4LdG2rIrjZ+UnOiZS3szm 5iVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=vTpQxAdJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 32si14439294qvw.120.2019.09.10.12.35.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Sep 2019 12:35:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=vTpQxAdJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7lvU-0000w7-Ad for patch@linaro.org; Tue, 10 Sep 2019 15:35:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58855) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7lu1-0000vG-Kn for qemu-devel@nongnu.org; Tue, 10 Sep 2019 15:34:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7lu0-0006jh-9Q for qemu-devel@nongnu.org; Tue, 10 Sep 2019 15:34:13 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:33750) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i7lu0-0006j7-1X for qemu-devel@nongnu.org; Tue, 10 Sep 2019 15:34:12 -0400 Received: by mail-wr1-x42f.google.com with SMTP id u16so21922418wrr.0 for ; Tue, 10 Sep 2019 12:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5XyzKPTEVeMZHoyBnFttJunUqWTPcDprpKPpXz8/JuA=; b=vTpQxAdJ9xknXNw4aCUYvm+cIC5kA4DL2Qc14EeUWTGi+OAlGOtBRh95WXWVH94Jg3 z28cpsdaComFtDOjngozTVfzXRtK2mFlUskHi+4aRV+z0PIozhy9SEBtjjmDJC8fksVv kFAxNjyTlNTrrcp5n1vL/RAAqRyEpPLJf+OW3jWdDBTyFADBwHXpDi6u0iQNEM3kDom0 joq2XD/LHtZveyctgCqqWX258ApFKG7vY9rLaOVAeBqKmiJwVcuKk6UcyNIogbkHF4N1 B2xcuQglqulqMic/nGsTKQYdCmUMa1UrjcPbUd1xZYu7Dwp2jSCG8bPssL2xkILzlPea /CZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5XyzKPTEVeMZHoyBnFttJunUqWTPcDprpKPpXz8/JuA=; b=QgAmif/8OhwaRfKj6sXF5q7Jy6Rvb94AACgs8YG56zKGS8f6Zt3kF8UsjB36IGwzYJ F95cf/1gZJ15OeL21Jv7S431zVYa/8KljVvudipxfElr1hmx8E39ZGx1p60aq1xjQj8D WrlzH1sxPOxJOsNUBzQgsJnSasT9mb6TyBncsKQ1LUrGDhJoRo4Wqyw/RlOz6aQpjmfL 2oBgkUdLl2hQ7U8DRENPqHr0J885OShMyZk7jVRTGAwsLcSrw2PD8t4CizO8+nOuyzu3 l0aXN0xvDmMM59njiDYZ78pC4XKrJk2tBDCVT/ZyJjGuoTBjuEhGJxWSc8w+KczfxAwl otUw== X-Gm-Message-State: APjAAAVGBbx6jirXqGjUkLWkLErqDjCiS6c9/9NHyOkRZ1y2pGiDaWev SIG4NMUDBqlNczd44Vj96k12Mw== X-Received: by 2002:adf:dc43:: with SMTP id m3mr28062078wrj.118.1568144050368; Tue, 10 Sep 2019 12:34:10 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l5sm491162wmj.4.2019.09.10.12.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2019 12:34:09 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BC91C1FF8C; Tue, 10 Sep 2019 20:34:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 10 Sep 2019 20:34:05 +0100 Message-Id: <20190910193408.28917-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190910193408.28917-1-alex.bennee@linaro.org> References: <20190910193408.28917-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42f Subject: [Qemu-devel] [PATCH v1 1/4] target/ppc: fix signal delivery for ppc64abi32 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , qemu-arm@nongnu.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We were incorrectly setting NIP resulting in a segfault. This fixes linux-test for this ABI. Signed-off-by: Alex Bennée --- linux-user/ppc/signal.c | 4 +++- tests/tcg/configure.sh | 1 + tests/tcg/multiarch/Makefile.target | 5 ----- 3 files changed, 4 insertions(+), 6 deletions(-) -- 2.20.1 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))