From patchwork Thu Apr 21 15:16:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 564358 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp551204map; Thu, 21 Apr 2022 08:43:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmzBuV6Y9bCGVKcMFCRW2vEKXxV+4XItQkC4IkOQEcORnllGQstA7JKwojzD8G3bLkg/w0 X-Received: by 2002:a81:8310:0:b0:2ec:610:e6c6 with SMTP id t16-20020a818310000000b002ec0610e6c6mr273503ywf.9.1650555803099; Thu, 21 Apr 2022 08:43:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650555803; cv=none; d=google.com; s=arc-20160816; b=N4zg/4EIfYIrjVz6Yd4EiiJ9v+wh9NBgjVP8H2U/rFWbNPnE/bEykiuuDWdy/PHfK7 /t2imLpTt9JJBN18U61ysJ9TaNsRG1XPvAJRIIxWgKm1wpSzdUnIy5Vbm/C7/A94MaBQ HHUpVtwOaI0NyO9bZ1gxKOkDgb66lSXMKk6VtZZWBlUkguDxjdv+TFrUhhMvJABUV7F6 n51VZiLonYqd/0lKWsDRCIQ7fOa8g18n5DLlUeWTJIsmuQHOH9oph0eu8A6Plrw5VzSJ +u6BU4zV/qKocccJtFUYFlWrh05XHLDcglYeUwWiCAqVCR2YBDXKRJNoTE2QY5mukzoU C7xQ== 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=SzaErCxPynOXfprynx7L2dok5JtwK8hmgMvAuV9lE9s=; b=T7nhNyD0o3xvAKxIliM3ghbmIR8J+QiGa80qRt5PC46kQEmeLSsDUuoyUl//tW/FXS YdNywbBN8tffDwC8AIOsHykhhRoe/7UFyu40vj75fRb1M5KzwOpA5EJFe3mYGZ51wlis FJLwkdCeuPxvTzgkWFUoYaULbpTLCQ9poPjEqinpg/xZyUWfYr35oJJBaRARBBQ36BF6 wAlVQqgIrKSzG3eBnlieUx/ddOZbAvc/lWKYoWBHJEePUMUJvjeswWZAL4FytGvPxn38 zH6jmfmes1/k8oB84YvnYbs9UYvm79NlzrTmSYtfhjqeX1rmZIPFpvsFggOS7bXPqUBc FuDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uRYD+7Lf; 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 m206-20020a2571d7000000b0064110a0b5fasi2730347ybc.144.2022.04.21.08.43.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Apr 2022 08:43:23 -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=uRYD+7Lf; 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]:50844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhYxm-0004oO-K3 for patch@linaro.org; Thu, 21 Apr 2022 11:43:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhYZ0-0006hR-8N for qemu-devel@nongnu.org; Thu, 21 Apr 2022 11:17:46 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:52931) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhYYx-0006CF-Ih for qemu-devel@nongnu.org; Thu, 21 Apr 2022 11:17:45 -0400 Received: by mail-pj1-x1034.google.com with SMTP id 2so5248041pjw.2 for ; Thu, 21 Apr 2022 08:17:43 -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=SzaErCxPynOXfprynx7L2dok5JtwK8hmgMvAuV9lE9s=; b=uRYD+7Lf40jI2JFQsvztWVHdBLVLkSVSJXAnjgo1gZRMxuIY3ltCnfzkz1eLb26lFS d/SusM9pXP+F92f/iEFr0dZztSWFDeZJSCIyQJAZ0ScBMC2oANjFymk0EoJntkoQQkct k9gh+lVTSBdS0jb5sM3JxGQaiOSbr9ulAckf3MA45RpfmfMVixeUwO279AwYwM9laon3 UM0tTcVvtoZFxWm2ZWc3ikYEqzMw6jiDCwZbC3dQOgCbcsvcP9/MxNHSC78pDGtO9Mem GH+sgVDJhmxrMa3XXMYHJsO4prO3a/HZG70hka3iXrs+OO/qrp1gPkC2m50aUjtzGzVO bBDw== 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=SzaErCxPynOXfprynx7L2dok5JtwK8hmgMvAuV9lE9s=; b=qT4ZJ/91IE6ucpczXZdK5tta1xe1ZreuMflBtLtRDwdKULFjSubyFpeNXD/7F2mud4 ZN8MGSNvGtMBwoR76nTXxfKibD+hHBPtwXx/gCAIH6BcpNNQtCBMPVnPEh+r4AwLUTZe 4vQhM1kcXOgOuWfMq58WVLQKkrvvtJkxOUoWgGwiSJFsFEiiVZHnhn4gnrRxofQxNcJZ CFu1c9o2mm6Tbu9w8IEvG5UGVh+jAEByLs1DYwwGV+oTVhrGj5ZaY9YB9JC9AJnXFxXQ xxhKlAcF5qnVtjIvr7BA82FolMVqTnchTeFzrqtKvat1ioGHXrW/IOdDHHq2ia/0V8wy HGsQ== X-Gm-Message-State: AOAM533BNZSOQ09jY008AJuPQxu96OfJQtkux4KBw5WX7FXDiQh6IS62 Cn7hAFGX1MV49FXJO6vjXTdExhZ5Ko7iCw== X-Received: by 2002:a17:902:da84:b0:15a:1214:2eab with SMTP id j4-20020a170902da8400b0015a12142eabmr13493976plx.114.1650554262148; Thu, 21 Apr 2022 08:17:42 -0700 (PDT) Received: from stoup.. ([2607:fb90:80c8:6cf3:a91a:4957:ba18:ac18]) by smtp.gmail.com with ESMTPSA id z16-20020a056a00241000b004f3a647ae89sm24616248pfh.174.2022.04.21.08.17.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 08:17:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v7 02/64] linux-user/nios2: Fix clone child return Date: Thu, 21 Apr 2022 08:16:33 -0700 Message-Id: <20220421151735.31996-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220421151735.31996-1-richard.henderson@linaro.org> References: <20220421151735.31996-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1034.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 --- 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)