From patchwork Tue Apr 26 18:18:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566066 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3837464map; Tue, 26 Apr 2022 11:26:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzZ0F0bmmWx5KuBJCOcutIeLcj8K3CgK40V6UzixBRQ6brQlsd26CEOTPJnaCcB9lQlbph X-Received: by 2002:a81:3dd8:0:b0:2f1:84ae:8084 with SMTP id k207-20020a813dd8000000b002f184ae8084mr23028998ywa.131.1650997599964; Tue, 26 Apr 2022 11:26:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650997599; cv=none; d=google.com; s=arc-20160816; b=lIQDVpVHhojPEqfNpSRa1W1ZXhlizD8/4NZu/men3FH0mfj6iaM0cgcfZa5V6vTzJu 3tMJcgO1Fwa9JoYgdycNbAjKFeYjEX6VTKK4O5W3RJPOP87OBirESiW9mtOSjv6uc+hN xu3iH9y+Xfk+ii5E72rr4XXi6htcQBV3T4w2NFIQJTahYWlcEaWkOmZsfA1cJTH09zlL e6CZt3wXHThJF3L5pQ/RElrZGSVInvPpomJ9T8Xyx1D9q0nFckhkVMavRLEE1f3YfB6k HH1irVsJC+rl1tNORnafUJxWFyxTbaQoQwokWsgFyJdH3xmuTRoxJj6fvZoaRYP3NZn7 xNdg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Kt2BBU1GUjUG3/EJVuAysOFujg46su8Ylz5CGCHbv4o=; b=wbN0QXdCQ9ZG7FfNgtaDUdOv+bw89Tv1m0Cs86wSbFJeRECs8FpnmRBF73m0vieRwX B1A8kkSSHjQ+nUPNcMXLdaZp/w2G0z0CO3j9wioZcn1hT4SHWFDyd2nHVKxhbJL2P6hv 4xD1wHhttmHhw+oE54OFJJYGiC//p0tM+HT7OTZCvcHc0+wNst4/BiE3hPms118rtbWa ttAzsEh2aB/CiF9N7+Ud45SRQ13U3cLDZFBPA0NnfdF8fB7oPzxJ7cfuSm7RCrSIuyFy Ik+aqcBkSBIX9p2IfEiu/S8xr9pIrtMpt/gaw3KA5kojBeXa7hhSiyBZmLmdhnFPXRBl B3NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=icXI29fQ; 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=pass (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 s7-20020a254507000000b0064579211bdcsi13900148yba.380.2022.04.26.11.26.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 11:26:39 -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=pass header.i=@linaro.org header.s=google header.b=icXI29fQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njPtX-0004s3-F9 for patch@linaro.org; Tue, 26 Apr 2022 14:26:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njPmU-0002Tq-TE for qemu-devel@nongnu.org; Tue, 26 Apr 2022 14:19:23 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:37597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njPmM-0004Jw-4E for qemu-devel@nongnu.org; Tue, 26 Apr 2022 14:19:20 -0400 Received: by mail-pj1-x1035.google.com with SMTP id t11-20020a17090ad50b00b001d95bf21996so2860306pju.2 for ; Tue, 26 Apr 2022 11:19: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=Kt2BBU1GUjUG3/EJVuAysOFujg46su8Ylz5CGCHbv4o=; b=icXI29fQFx8EUBPE1kG1591sIHCEXjgHIWgbv+lliGGI6NT25+GafN5FA0R9kR6gWs vsoLI+QgubqRRfoy8sIgWwb22F1rr8QKbGVw2sU2SkDaCEXevqSVLBYufcX49xgte3H3 t5pAv/W56ltJpY95OU5GAQ6MMa1up4UUxsQpRYxEDGUGkpcbZrp7VmtaOgQQ/c2Fx3Bq ZmisXFyaR4s3huI4Q3zwNktkws6K+vXW0QWz4LwCJN+T9sMGC+fqzLQpSyBjaXcQIwN1 Nu65ee8aN16ac13MD1SWiwnenFKxEya81aUV7OTcUEKtLaUYH/YOc2L+wLrjgKYLgfmO IS3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Kt2BBU1GUjUG3/EJVuAysOFujg46su8Ylz5CGCHbv4o=; b=Co6ivw0kpgBh/PA3sG7FHnX1lgcB3QNmZfNN4Ke2R4Iq+/+k4zsQaEcVx+YDbQlEd7 HtQQGOFSQ5V08fS7O3FIbHRpuobPdysN0p1MgaUEd8GEiSF0nps5LHjaUvMylDZLZjUA qJmCTH/RfhanE6V8s7DDkiY+ei/w5RBsTU5K1skASGTUCxH1SZS3Tz6tx+tLh+eLcT3m /NbRfy9HbBNZXtLSLXlx9D/BHaJGE01NlQfrPYm0Unf/Vyx9irXUByhe6MylWJ1Bes0P CWCDQvYxd5IlzXbIL4Xkw+BIgaYTGnsEbpyDUTxVcJ73rmBC3HyI8P2R1nPvhAfh3TtZ rP3w== X-Gm-Message-State: AOAM531YVUWQKklzOA1YkBKwqAoDWUWXlSQNvfPMktHk1DAy41GkItTG X1qVyhi3Vca2VR7aXSetllxD0FI/qytSJw== X-Received: by 2002:a17:902:aa8e:b0:158:e94b:7c92 with SMTP id d14-20020a170902aa8e00b00158e94b7c92mr24696786plr.126.1650997150521; Tue, 26 Apr 2022 11:19:10 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id j7-20020a056a00130700b004b9f7cd94a4sm16482827pfu.56.2022.04.26.11.19.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 11:19:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 02/68] linux-user/nios2: Fix clone child return Date: Tue, 26 Apr 2022 11:18:01 -0700 Message-Id: <20220426181907.103691-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426181907.103691-1-richard.henderson@linaro.org> References: <20220426181907.103691-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The child side of clone needs to set the secondary syscall return value, r7, to indicate syscall success. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-Id: <20220421151735.31996-3-richard.henderson@linaro.org> --- linux-user/nios2/target_cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/nios2/target_cpu.h b/linux-user/nios2/target_cpu.h index 2d2008f002..830b4c0741 100644 --- a/linux-user/nios2/target_cpu.h +++ b/linux-user/nios2/target_cpu.h @@ -27,6 +27,7 @@ static inline void cpu_clone_regs_child(CPUNios2State *env, target_ulong newsp, env->regs[R_SP] = newsp; } env->regs[R_RET0] = 0; + env->regs[7] = 0; } static inline void cpu_clone_regs_parent(CPUNios2State *env, unsigned flags)