From patchwork Fri Mar 30 19:59:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 10318297 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3520C60383 for ; Fri, 30 Mar 2018 20:00:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2461E2A663 for ; Fri, 30 Mar 2018 20:00:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18F842A69B; Fri, 30 Mar 2018 20:00:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FROM_LOCAL_NOVOWEL, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B0D9C2A663 for ; Fri, 30 Mar 2018 20:00:37 +0000 (UTC) Received: from localhost ([::1]:38185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f20CS-0007ku-Fy for patchwork-qemu-devel@patchwork.kernel.org; Fri, 30 Mar 2018 16:00:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f20Be-000791-3Z for qemu-devel@nongnu.org; Fri, 30 Mar 2018 15:59:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f20Bd-0001o8-9u for qemu-devel@nongnu.org; Fri, 30 Mar 2018 15:59:46 -0400 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:42123) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f20Bd-0001nO-1W for qemu-devel@nongnu.org; Fri, 30 Mar 2018 15:59:45 -0400 Received: by mail-lf0-x241.google.com with SMTP id a22-v6so13727149lfg.9 for ; Fri, 30 Mar 2018 12:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ASR33fBQ8Y4TwYFy2Erp2ZCCyCOp0A662uxEL91dYak=; b=AGHXKCF534VGbr22AHZuccHbZRTj/rsCl7RRPwk69p37p2I2KWZMpTwrwhG/cU0FQ5 JDK7wcdmfBIAVcTdsgextmv27bFsnMmnMovv4v9qBpIPNaxDNHoZqqImAngkadnuD/wi dUoe9OgtiIlONZ2vyA76he4UDzAOL4FH8k1CcHQo5oPU7Xg0Ls+Jud3VAzAAkVE7Qmht XEg+98adaiXkMfwgjBc+DlDXuix2vQE7LQv5VU/hr9NuguYkNtL/oiNElkVw1rwY0FEZ nAkji3jj8aYr3H7HdHMOtaN+mcCB8B9R52n+kcJVJxeWDyz7Un7vmyAw1YYFm8Zpcj1d B8Og== 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; bh=ASR33fBQ8Y4TwYFy2Erp2ZCCyCOp0A662uxEL91dYak=; b=tKRKH++bmcwj843T98cA6Y/G0swWSD4hu/Am/O85/SpfIrLTrPmSHDXju/juTJHJLS jTKg2jYn2p585rS3NtT41CZmk3Lps+/v5DQunK0/7vZ5zACvDBs9xnNRgMZJHYrFG4kz BvIseSA4iU9BJk74Dw2T0jlrg8vvuha8+C+BtNaDzRUlKlB6EVPETfiHN47AeV5Stk5q nXTNK6J9YgVCMuMDswmi2jP0tSg00lc9wA929IhiUVbYOjSO2dhLODjwZnj53MT6xfjy f4KEosi8802QTnNtW6Ypv71nSZW8Rq3OizNHWFsBv9AdEmlU3nSbhmS1URXHRg6v27X8 +w4Q== X-Gm-Message-State: AElRT7HcK4cXLgD02ttmKSM+8ZHsR2lDfecme69bGJ4gcyJWolF05D0B 0DpqceVGiyDUtF8iQR1I7YFb6Q== X-Google-Smtp-Source: AIpwx4/tcHQmaZik0v1tKptjvb/a4ummg8U909ZAPAC3D318SKiizT+D51gKKmHM/Wc8kTMAf5CkFg== X-Received: by 10.46.152.203 with SMTP id s11mr174712ljj.92.1522439982968; Fri, 30 Mar 2018 12:59:42 -0700 (PDT) Received: from octofox.cadence.com (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id r25sm1579643ljc.8.2018.03.30.12.59.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Mar 2018 12:59:42 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Date: Fri, 30 Mar 2018 12:59:28 -0700 Message-Id: <20180330195928.15607-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::241 Subject: [Qemu-devel] [PATCH] target/xtensa: linux-user: rewind pc for restarted syscall 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: Max Filippov Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP In case of syscall restart request set pc back to the syscall instruction. Signed-off-by: Max Filippov Reviewed-by: Laurent Vivier --- linux-user/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index ba09b7d0c873..8907a8411411 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4006,6 +4006,9 @@ void cpu_loop(CPUXtensaState *env) break; case -TARGET_ERESTARTSYS: + env->pc -= 3; + break; + case -TARGET_QEMU_ESIGRETURN: break; }