From patchwork Fri May 27 12:59:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 9138303 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 A2BA560759 for ; Fri, 27 May 2016 13:01:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94A1227CF9 for ; Fri, 27 May 2016 13:01:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8912428135; Fri, 27 May 2016 13:01:23 +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 CDED727CF9 for ; Fri, 27 May 2016 13:01:22 +0000 (UTC) Received: from localhost ([::1]:45691 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6HOD-0007H2-Sf for patchwork-qemu-devel@patchwork.kernel.org; Fri, 27 May 2016 09:01:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6HNa-0007Em-1t for qemu-devel@nongnu.org; Fri, 27 May 2016 09:00:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6HNX-00015m-VW for qemu-devel@nongnu.org; Fri, 27 May 2016 09:00:41 -0400 Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]:35257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6HNX-00015a-Gl for qemu-devel@nongnu.org; Fri, 27 May 2016 09:00:39 -0400 Received: by mail-lf0-x236.google.com with SMTP id w16so33405801lfd.2 for ; Fri, 27 May 2016 06:00:39 -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=cPic7ur/vLzSZutdzw7ily1BU/fppuLiclqnvAKiSg9bT/7SOxfi4MYgIznfleS+c0 rCgahMZ1OqT+H7mcrTrxGpDIOVrvhdNG4+OH8BWiOEDah7O3GR5EEFludLGn2d1gg+BD Iij74K+9T+0pKTPDOZFXVhWdfC9vVvyh8785g= 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=FOIHbbk+IVrf/93Qq4uVuVhymh6R1+dyDDO9C+yjJ7g1MqMqFfoaX1428hsQmFJm0v OwDuIbFaTdl/rxCNCG+tUQ3al60DJUMR85YzoomPMjcMhOeGwbZ6D5k7ONAKmmnXEpMG ycs/y1JGSIruvfk5q8oh5eroPpwBPe0rfVG7/8jK5Rm0jlEBBLrbG8Yj/QPwDlVtIiZZ CBHIVPbDBVoj0Ltd+Ilo7j39O/aLgGNuPlESJDvUovmR/wkViQDP8CRLvM2EjI6h/sam 2Jeg74FpM/6aWEo97v524IDL6FEHWGKA0K4OQmen++wW6ZWm56qOO4AdV7mqlOzAe7YU GTZA== X-Gm-Message-State: ALyK8tLf9VmThGbhXVaDsfqmLEL9qAZ4Od4GzlJGwGv3I3mZgdY49sf1m5rhx0BF+F7bR4zv X-Received: by 10.25.18.167 with SMTP id 39mr4688428lfs.118.1464354037667; Fri, 27 May 2016 06:00:37 -0700 (PDT) Received: from beaming.home (91-157-168-132.elisa-laajakaista.fi. [91.157.168.132]) by smtp.gmail.com with ESMTPSA id n16sm2281066lfg.31.2016.05.27.06.00.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 May 2016 06:00:36 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Fri, 27 May 2016 15:59:55 +0300 Message-Id: <14896d32814c78ed5b97a22fbd9e5a6cddc2de80.1464353863.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::236 Subject: [Qemu-devel] [PULL v2 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) */