From patchwork Mon Nov 20 21:21:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 119321 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4395557qgn; Mon, 20 Nov 2017 13:27:46 -0800 (PST) X-Google-Smtp-Source: AGs4zMZGlmWy8b1xokJlzf8RM1fvP+OsJgvt4yAG30LaRAx0LhmQhPiJmmsPq0InGIUPX0fGciFw X-Received: by 10.129.93.6 with SMTP id r6mr11083433ywb.95.1511213266549; Mon, 20 Nov 2017 13:27:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511213266; cv=none; d=google.com; s=arc-20160816; b=U5dyHOf+mVrHjYIcI6thwul8wN51cuwk00pqs/QI+qWg2B9qSB9jZmbuVfOH/RSzQj VQoIy4+sMoDVRZQcGzj/XAppx6oHTW/ZMu9LyYWkh1QLZ/lgVje0ad+FV4t0KL1Gp2dD j8DvEpIJbYZyAAVbAOeUSbRBZF4gpd5F/gLGPXVqVaIAwbuCVsJ13BsN063gT4wVxrsz xSIqGaB6697Tw901Bj3pw9L2eWxwX0EOVr7nOeyc+0Mb59f2D+l31YEt3fHdVCC+20tn 7mwEBuzqMmr/YixDb8RGuVJTUL7T0L59YOU5DgdBnT/D+JHYPQVYRYEuNHTbyX+ac/Kb KQKQ== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=EINUFEocM2tBA4frb4/XJv57aamHc/zNVZQt/EVHD5w=; b=zK7Tw+v54YO5F2OyZNw39KFDsSbHnJCMu4ojsrg7SHYAnZoaLjG2QqzEbkgLieUHX1 HaR3xRlog4/C6zjp/AA7L4XhYatBS1aaOmVdY3cr3ygBElGjCu5CDwNntWswiS4qDL0n KuC9MyVdq9ZOj321hWet6+JehRGTt/s5eqKjQD4Unatb1oLkrvR/NDUEagY9YLU2v1QF XrZAlCtkSvLawnXC0st/ZarbV51+A8TXuKlgtmBrFNSelDTLrVVuLiVGya9RRGr5Sn/o 9LLLmmolyVBT5mY7ypOA9tQoBG4RX0w9h7aOg6CcgsUhk2ei7ql3RKPSUtIktaiNWZtN gqxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GByk3qHm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id y5si2231425ybg.367.2017.11.20.13.27.46 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 20 Nov 2017 13:27:46 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GByk3qHm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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]:59825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGtbW-000177-2S for patch@linaro.org; Mon, 20 Nov 2017 16:27:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGtVo-0004Ur-3u for qemu-devel@nongnu.org; Mon, 20 Nov 2017 16:21:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eGtVn-0007iJ-DG for qemu-devel@nongnu.org; Mon, 20 Nov 2017 16:21:52 -0500 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:43426) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eGtVn-0007em-6P for qemu-devel@nongnu.org; Mon, 20 Nov 2017 16:21:51 -0500 Received: by mail-lf0-x242.google.com with SMTP id 73so11682380lfu.10 for ; Mon, 20 Nov 2017 13:21:51 -0800 (PST) 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; bh=EINUFEocM2tBA4frb4/XJv57aamHc/zNVZQt/EVHD5w=; b=GByk3qHmj3P5hsUaEATBe8xWt6m+H4Dl5cn4w4biiFcn8m0rFPEjD/6MGaXpBeWd1+ SjRoWlZ+6msFJwS5G9H766hWv+mDpbejygJcn4kkMOVbaHyJHk/G6fvzH9k6DiAXPjAc 6j0g+MkBFQ3ds1ML8QTSHWEhNUJP/8nN+qK4o= 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; bh=EINUFEocM2tBA4frb4/XJv57aamHc/zNVZQt/EVHD5w=; b=cK6RxfTxC2CdouZlnXgur5NO3hTWIw7axRWxyheQQNB6vK9ZBxqbN7jkGDzM9WhlQY kYkw0r+r4UqI2FyOWwICFIpdnswAFQFDTESQ0JCl2HU26Y2QxNEcZ+S6XoEAk6FaOk14 v3paqtEpaaAKTSYcI64dGNXQEL7tzV1ICDFugDC+ftxjlom0wNsdB/mMk/YnoXBnLHzJ VA3eZIruGySvtySMgDv09Xne337S4Xs/j/aO1jf2Pb4bVNz6sYsVoxhIlVXmiPaa5Geg PVrPzBu/BI2ikgfY74yxMqacKoDtH1a8gC6Cq2G7hp3masoIFDdd2jcUaUNRIrPPPHBa 3NYg== X-Gm-Message-State: AJaThX7IuK9aR+29SSNFleyFg6E7DtPPFSGguDYQ0E3CDUanwyp8o4By UeWXJhRJvpbtR2kp/ZQVzjT+G9+ii30= X-Received: by 10.46.70.26 with SMTP id t26mr4558913lja.181.1511212909682; Mon, 20 Nov 2017 13:21:49 -0800 (PST) Received: from beaming.home (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id v63sm1645409lje.39.2017.11.20.13.21.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Nov 2017 13:21:48 -0800 (PST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Mon, 20 Nov 2017 23:21:31 +0200 Message-Id: X-Mailer: git-send-email 2.14.2 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::242 Subject: [Qemu-devel] [PULL 03/15] linux-user/hppa: Fix cpu_clone_regs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson By failing to return from the syscall in the child, the child issues another clone syscall and hilarity ensues. Signed-off-by: Richard Henderson Signed-off-by: Riku Voipio --- linux-user/hppa/target_cpu.h | 4 ++++ 1 file changed, 4 insertions(+) -- 2.14.2 diff --git a/linux-user/hppa/target_cpu.h b/linux-user/hppa/target_cpu.h index 1a5cecad3c..e50522eae9 100644 --- a/linux-user/hppa/target_cpu.h +++ b/linux-user/hppa/target_cpu.h @@ -24,7 +24,11 @@ static inline void cpu_clone_regs(CPUHPPAState *env, target_ulong newsp) if (newsp) { env->gr[30] = newsp; } + /* Indicate child in return value. */ env->gr[28] = 0; + /* Return from the syscall. */ + env->iaoq_f = env->gr[31]; + env->iaoq_b = env->gr[31] + 4; } static inline void cpu_set_tls(CPUHPPAState *env, target_ulong newtls)