From patchwork Wed May 25 05:27:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 9134759 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 775376075C for ; Wed, 25 May 2016 05:44:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BD4A28164 for ; Wed, 25 May 2016 05:44:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F513282AE; Wed, 25 May 2016 05:44:14 +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=-5.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FSL_HELO_HOME, 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 DE46E28164 for ; Wed, 25 May 2016 05:44:13 +0000 (UTC) Received: from localhost ([::1]:57449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5Rc5-0004Qh-1f for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 May 2016 01:44:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5RMx-00083P-EM for qemu-devel@nongnu.org; Wed, 25 May 2016 01:28:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5RMu-0001NC-7E for qemu-devel@nongnu.org; Wed, 25 May 2016 01:28:35 -0400 Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]:34730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5RMt-0001N4-Va for qemu-devel@nongnu.org; Wed, 25 May 2016 01:28:32 -0400 Received: by mail-lf0-x230.google.com with SMTP id k98so13737236lfi.1 for ; Tue, 24 May 2016 22:28:31 -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; bh=UaUb1qPv9iTT17StaamUdhqTA76nMP/Yt1NWKk6bYwY=; b=SeqmZt9CUvLVIlMDrya8heKpnHZOFevuiqVCWZuPwjTHmNUmKs3+dxpqnTJnMFf2q2 EyNYLw+sSsrMJMdXPLccOl7dPy37MRJlRRLdA83obJFurL8LfjsBYZAIr/UAJ4g1rFOC IopZ88ncz2qQnfxXbfIIErFRMKQk+rs1gDeLA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UaUb1qPv9iTT17StaamUdhqTA76nMP/Yt1NWKk6bYwY=; b=B6jiSxtbxzUZVxvKfZ7ZRNR6lUnZTESRBQZZoBwze0PERM0ALNs9BYQvjqhEs5Y0nc mkqJH5/X0NgcAGOzKCJVvpkeEKTDN7KqNY1+BwtUKY9O8lTg8+zB9tbkaN211secrTD8 guMXhlU9MUJsvoRTmE2lBMYgkw3XWYT89Mpxtea8AdZKK5A4czmCdqcYESmswqNNEVtr 1xxRfBhhTOeBlf2J1M1CPQx2mf/yh5/UIRtUumZyDDlU7nRlQd2NvJnXUqQcuMOEkqPR NqjCL5LXtGX9fFVc7/dUKG3SE1kLQz6Vglug+nQcASjNufmgKbFp/jgEw7mAo6XmzvVr 6wCw== X-Gm-Message-State: ALyK8tLxDaEgb2Gt29IgwEUmWNPpwl5tj/2Wu0qWok5aE5KbKapG+KYBpWS560vOWmXAJrPD X-Received: by 10.25.215.30 with SMTP id o30mr403418lfg.132.1464154111291; Tue, 24 May 2016 22:28:31 -0700 (PDT) Received: from beaming.home (91-157-168-132.elisa-laajakaista.fi. [91.157.168.132]) by smtp.gmail.com with ESMTPSA id g10sm1136823lbc.43.2016.05.24.22.28.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 May 2016 22:28:30 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Wed, 25 May 2016 08:27:39 +0300 Message-Id: <3af2781af082b352b4735023564ff814e7542411.1464153942.git.riku.voipio@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::230 Subject: [Qemu-devel] [PULL 04/38] linux-user: Define TARGET_ERESTART* errno values 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: Timothy E Baldwin Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Timothy E Baldwin Define TARGET_ERESTARTSYS; like the kernel, we will use this to indicate that a guest system call should be restarted. We use the same value the kernel does for this, 512. Signed-off-by: Timothy Edward Baldwin [PMM: split out from the patch which moves and renumbers TARGET_QEMU_ESIGRETURN, add comment on usage] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/errno_defs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linux-user/errno_defs.h b/linux-user/errno_defs.h index 8a1cf76..b7a8c9f 100644 --- a/linux-user/errno_defs.h +++ b/linux-user/errno_defs.h @@ -139,3 +139,11 @@ /* for robust mutexes */ #define TARGET_EOWNERDEAD 130 /* Owner died */ #define TARGET_ENOTRECOVERABLE 131 /* State not recoverable */ + +/* QEMU internal, not visible to the guest. This is returned when a + * system call should be restarted, to tell the main loop that it + * should wind the guest PC backwards so it will re-execute the syscall + * after handling any pending signals. They match with the ones the guest + * kernel uses for the same purpose. + */ +#define TARGET_ERESTARTSYS 512 /* Restart system call (if SA_RESTART) */