Message ID | 20220422165238.1971496-6-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp661824map; Fri, 22 Apr 2022 10:02:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmEzJrs00fi5+AKYH4QlC4lYWw2vtab5ZbmLHBrAxxLTMeKRDvjCqWcOVR2e0wgVa76COY X-Received: by 2002:a05:6214:c21:b0:443:a2d2:a685 with SMTP id a1-20020a0562140c2100b00443a2d2a685mr4330472qvd.52.1650646954170; Fri, 22 Apr 2022 10:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650646954; cv=none; d=google.com; s=arc-20160816; b=lBtZbIbd+6k/K/23QYgRrB4i2g/4MhYiwGWQkcVuQcL+/oUYZ9x3QNDy7K5aBj8rYw m9MBMSq8zv5ZBj7DSOl4yemxXj2ak5qk0UUyoH9Cs5yx74+aCzLtWt9BSCcFLI5RIAwl mw9itrpDBG9+NvWpzbAsf8mx+vtjeMPUh/bte1BC9cnFkUf9bpVUOYna84taBNt6uWrC L3lMfI0d9DLqpn9wzkv067XgYdkNxB1pi+O8da2Ia2p17+qsCL/K3XlcDXj6WhVJ211o Zg38h5TxA8+Ih6VETOaU/8KtjQD6wcb+aibXEzRSjIkg+1/bDppJ06q3SMIY0Sy7ZyaO 64Og== 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=BaXzjQ4uHQf8aegyrwpNgla1ibfyULSXvI/9Vr/sAxc=; b=FaT2u/cDPikB43ldXZ2dCca1oPZ181UePzgGNPnLshl3pF48N7RCy5en6CyMD4yXu4 yl7qlAOHruy3GeBjYfBALwl9nZ803XcS81/U15zUNviKLcjQlO2r2MrG+zn13wrWcW7+ gSrpiFDRCOZodLnO2Egh2MzftCZIUcAnvKhFhTfDfz3/tM+o/0e+NqslXsvbhs6TNJ/y mSekxYGuKzIUaSe+gTUsyS+XVX1Jq2mN6TT9Hs0/xVrgkK1kf270BWXgLVDyngHnNZEU lF3R+DP9tXxaCfLyHukcym2tavfH9heH0hhn+q7XKkn3JQ3Lc6RqxXkOefZZNhtUXn+M DlrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uzvq1Mmx; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ib6-20020a0562141c8600b00443d25bda82si2341181qvb.63.2022.04.22.10.02.34 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Apr 2022 10:02:34 -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=uzvq1Mmx; 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]:38684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1nhwfx-0005WW-PG for patch@linaro.org; Fri, 22 Apr 2022 13:02:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nhwWb-0000Ce-KR for qemu-devel@nongnu.org; Fri, 22 Apr 2022 12:52:53 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:35496) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nhwWa-0007E1-2L for qemu-devel@nongnu.org; Fri, 22 Apr 2022 12:52:53 -0400 Received: by mail-pl1-x631.google.com with SMTP id b7so12099169plh.2 for <qemu-devel@nongnu.org>; Fri, 22 Apr 2022 09:52:51 -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=BaXzjQ4uHQf8aegyrwpNgla1ibfyULSXvI/9Vr/sAxc=; b=uzvq1Mmx4Z5LeDSrJix1HRmDgnXI16CUHKhB0IpCC4jJErwC+K6nDWPszW5ubK9+El pYFaL3g2doJcDRyVvUe1YaB3PP1cs5SkwXUTw5awRY/vvgj5csQMDpztGB3ixGaFLCog tw1+vH5G+hzQ2I0Oe6wgf4o7CHN/1j6XvOJSDhKD8zPNua3ir20q4UxM4sqtD0FsCWJR 6iwik96YUgffyiXJEJT6aDU7YJJ8Mm+bI4AB0aTCa7eU7afnADHIjbBFF1c3kxyGm+DJ EowY8vqvvzlS2FE6VLvLz/6XeNCylScSq0YyK2sN8zftzZTpfD65S2tuW/L44GCMwixr V0+Q== 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=BaXzjQ4uHQf8aegyrwpNgla1ibfyULSXvI/9Vr/sAxc=; b=NKimjJAoJjP74sXjrwzk0+xuzKVnGP5lQUFpaXM0qH3xgFYoFNMp2d5keAOHI838uk 1k5q9QWbzpZeo5T8C2qPfMN+JJUjjAYZBWBuCLeVyqAz2zgVfsrpJxWYqw2v8iuzcIUB okIPAZ+wauMdxGS+CzQAyRM3DZRk/Q3YtXiEq6rIMmj2Tw0gcu9fxKe65Apk8IlVTDB4 XlG0Ht0RAUoAtY2/6nOhTnG+QLU88uSUGOqNjOp8cVdgbTqI590klYrZ10y0jziQOHRU XjUqacZInhI1xnpWjYPOVPrufe/7MT+4BEkFyFQON9Bz4xJJyWW34dd3yPCi61A8wwJW jOxw== X-Gm-Message-State: AOAM530yAJQzOHeSl+T2/xm5l52syymyX+UpP+EJ+RaMUPuxQ0kgqM27 okRQg5zg2z5kN7wmjr6BAb6Yj4EC8rKYffhI X-Received: by 2002:a17:902:c2c7:b0:159:9f9:85f3 with SMTP id c7-20020a170902c2c700b0015909f985f3mr5227177pla.18.1650646370791; Fri, 22 Apr 2022 09:52:50 -0700 (PDT) Received: from stoup.. ([2607:fb90:27d0:b0f2:934d:3e2:9f8c:dd1]) by smtp.gmail.com with ESMTPSA id 6-20020a17090a030600b001cd4989ff5fsm6835904pje.38.2022.04.22.09.52.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 09:52:50 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH v8 05/68] linux-user/nios2: Handle special qemu syscall return values Date: Fri, 22 Apr 2022 09:51:35 -0700 Message-Id: <20220422165238.1971496-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220422165238.1971496-1-richard.henderson@linaro.org> References: <20220422165238.1971496-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Peter Maydell <peter.maydell@linaro.org> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
nios2 fixes, cleanups, shadow reg sets
|
expand
|
diff --git a/linux-user/nios2/cpu_loop.c b/linux-user/nios2/cpu_loop.c index 63afba5862..2963fc62b4 100644 --- a/linux-user/nios2/cpu_loop.c +++ b/linux-user/nios2/cpu_loop.c @@ -55,6 +55,14 @@ void cpu_loop(CPUNios2State *env) env->regs[7], env->regs[8], env->regs[9], 0, 0); + if (ret == -QEMU_ESIGRETURN) { + /* rt_sigreturn has set all state. */ + break; + } + if (ret == -QEMU_ERESTARTSYS) { + env->regs[R_PC] -= 4; + break; + } /* * See the code after translate_rc_and_ret: all negative * values are errors (aided by userspace restricted to 2G),