From nobody Mon Feb 9 21:12:28 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616247907; cv=none; d=zohomail.com; s=zohoarc; b=hKZnrs9OlkV0TDqWghP7xkF7ynzj7uwLzpV6NjLYjoHhxUCvu70gvPgAqZf8WSzL1uHSRiyE9VfxyRTuQKTM24Z1c6fgvEu8wzHViqpCZ5chcjEC9+1ZxcYjlpkZfS2eqhv6pLNo9HuORsZ6svd0jnUWyr+mALTf5jVS5pS1Bi8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616247907; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lOTtqQ1GqfCDk2mShrLCLuCwUnyYqPWN4bH2H+UmRI8=; b=RkhqVgA5eoyGcaNFIBIgZ/gh6Xbn0Sx2iD/YofsPnN6ruEl2aw/7bPbPVIlWb+j6VllyTjuokq0lJBrkhgq4ehZO5nMYWDXWS/Sp+lM38oqyXWOv8ZgLewqPRaQIx61E9s2NyRQ60I1ry5iFyQliK45sbTlaW6jyWth/PeZ5O3s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616247907410935.4891170543608; Sat, 20 Mar 2021 06:45:07 -0700 (PDT) Received: from localhost ([::1]:36450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNbua-0002gQ-1h for importer@patchew.org; Sat, 20 Mar 2021 09:45:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNbn5-00032X-B0 for qemu-devel@nongnu.org; Sat, 20 Mar 2021 09:37:19 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:38634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNbn3-0004Fo-QF for qemu-devel@nongnu.org; Sat, 20 Mar 2021 09:37:19 -0400 Received: by mail-ed1-x52c.google.com with SMTP id h13so14028062eds.5 for ; Sat, 20 Mar 2021 06:37:17 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id oy8sm5346287ejb.58.2021.03.20.06.37.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Mar 2021 06:37:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 80D0F1FF96; Sat, 20 Mar 2021 13:37:07 +0000 (GMT) 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=lOTtqQ1GqfCDk2mShrLCLuCwUnyYqPWN4bH2H+UmRI8=; b=d6aEufXYSJved5N2un3csV6hO7nw6dV7AH6C5EsjQil81UStphfQfJY4gQ86HYO87J qnB4XmhBD+vVFGC4si866ae8tuqh6Xs0MoZVrwB+HTi+XRN4vIhGQLOoNri5uLSdASJ4 P2KphUGWsg9uWIe5EFJ8A/KZEcDCwJz8CPoxIn/tb4L5vOXC24l4o1qvTDL3DdBmcSZc UVnUr7EV/gBxGRgRaVHFOfnW1AYJv+p2VgIpWCsQA6eiD3+FGq4En2yKwKloozotH2j8 me6Edv6htK6kyScGym8jcmDaOvBrfoFgfMIWI5V6BIcdd9SqMf+RU8VIJuglwbQwYf9o jXwA== 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=lOTtqQ1GqfCDk2mShrLCLuCwUnyYqPWN4bH2H+UmRI8=; b=ZNHEzM+Vwlrfsd86lo7233vcG1tSDaIfJSqk7bA8AF8wCYvJ8vMqxBd2yaWff5YQqX Y7KlaryXxoPoC9/16O1wYff2RuMqaPJVI8oE+TPeCR//yrNxsWQO3DsNswT8r+ZgLVHi rYIL5DrvzB55XeJKX4F53FHZ1Q84NvF4uZbZ43J6o5Ql1pwnVjOE+plJA6M6sLXNNc8a epzSYRip+lp3II7FyGPzVyq3NN117ZV/8/OZSyyQLjR/QO2vfszjU9AlfHWyG1scfSca bw/0RJD5WUBYb6PnHpuVkaJTdAEBPTHz3pHRxuNeaVajgotP2/AIOoP7/Si8j/5HpKZt RK+Q== X-Gm-Message-State: AOAM533qr8TDL0U7V+/qhtVohVHxNG+p/O5I18i3F50SjNxqZUc9blxk NEisqro5atOHx1dpVIMLvPdcZA== X-Google-Smtp-Source: ABdhPJxt29BP8t5HbS4l1O0iZHbkQuXrDClFGYTwR0duK0TMe7/+NixB7qhv2aMD9JRSk+xz9Wq3mw== X-Received: by 2002:a05:6402:614:: with SMTP id n20mr15344467edv.58.1616247436513; Sat, 20 Mar 2021 06:37:16 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 08/14] linux-user/riscv: initialise the TaskState heap/stack info Date: Sat, 20 Mar 2021 13:37:00 +0000 Message-Id: <20210320133706.21475-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210320133706.21475-1-alex.bennee@linaro.org> References: <20210320133706.21475-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52c.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 autolearn=ham autolearn_force=no X-Spam_action: no action 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: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Arguably the target_cpu_copy_regs function for each architecture is misnamed as a number of the architectures also take the opportunity to fill out the TaskState structure. This could arguably be factored out into common code but that would require a wider audit of the architectures. For now just replicate for riscv so we can correctly report semihosting information for SYS_HEAPINFO. Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210312102029.17017-5-alex.bennee@linaro.org> Reviewed-by: Richard Henderson --- linux-user/riscv/cpu_loop.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-user/riscv/cpu_loop.c b/linux-user/riscv/cpu_loop.c index 6767f941e8..74a9628dc9 100644 --- a/linux-user/riscv/cpu_loop.c +++ b/linux-user/riscv/cpu_loop.c @@ -135,4 +135,9 @@ void target_cpu_copy_regs(CPUArchState *env, struct tar= get_pt_regs *regs) error_report("Incompatible ELF: RVE cpu requires RVE ABI binary"); exit(EXIT_FAILURE); } + + ts->stack_base =3D info->start_stack; + ts->heap_base =3D info->brk; + /* This will be filled in on the first SYS_HEAPINFO call. */ + ts->heap_limit =3D 0; } --=20 2.20.1