From patchwork Mon Apr 30 09:10:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 134699 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp3543749lji; Mon, 30 Apr 2018 02:34:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoy8Inii5CtMXcO2a2MW7YoSD40BPxb2zcv+RctTehbmIkr87fbz0nT1LQ3t72ceAW2lSRM X-Received: by 10.55.171.9 with SMTP id u9mr9588662qke.125.1525080871699; Mon, 30 Apr 2018 02:34:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525080871; cv=none; d=google.com; s=arc-20160816; b=NoxHKU4EO3aTh1kykSKASGkFVLxQxQdGsmNTDT4SXSJvOvnYhJvdSNbI9/ms9C822Z kHIC0NUyYEacC69IhpARbWsnRZLGLN/WFZhFDZ8uysn+3QLvD2bVtmiHMmy3dcInDGa4 xhmtPIgJ8WJ4nKoatyqYkIK0pVkHyfMYBOAptVdGr1J2wamc6xD2HHdnnHiHoFL4o1gT YwfbcYVkJz5T3ukDi+HC1N/I9L2/5cBjLBWisB2WlcAC7P/QAiz9kRDpnpQsaZ16xpzf X8X5a3kxNDr+448Ph/1uRFQVQyAtPu4ttVhVM4lp680gYLArZ0KuSAv5KnMct/t4YzZQ j/aw== 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:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=uE/oKEDtr8SXfM7AsZEbQMp5/Is9ve4ZyOgy6FTuLc8=; b=s5ks6mh8sHGZ40w4YpMK8orPLIf70PgP78+1SSjkgsupOqLdCIJqS4+RRifTM7MXaV b/FuSK6xG5zciM8eHxETF7kvECrAZJuEWcHdvDRgeHWdtjqRIczr9YdJ1WcoHLfoNPmF 2xoXc6hO8ayFOqYRunBr38TM91bFVT83Wb/0VhJFOLn49Vr3zou3iGQrZydgu5KtnANf m4TbABlXZ3ws3G+5QX1PxOUMIdCkZenTVai51RJH6mKOokpAz6dQ38U9R/lbVVO7us9/ 0Z/HGCoJoogfCfjCI+/ifCQc0ewKb8zEmewc/bHPhgeJb0dTIGTDr4AxEj+dfpSnAw6E pttA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id h11-v6si6875250qtp.105.2018.04.30.02.34.31 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 30 Apr 2018 02:34:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:58657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fD5CZ-0008On-4i for patch@linaro.org; Mon, 30 Apr 2018 05:34:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fD4qR-0006gV-CG for qemu-devel@nongnu.org; Mon, 30 Apr 2018 05:11:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fD4qM-0006Wi-11 for qemu-devel@nongnu.org; Mon, 30 Apr 2018 05:11:39 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:35707) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fD4qL-0006VR-HN; Mon, 30 Apr 2018 05:11:33 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MWRtC-1esfcy3Ah0-00XdN0; Mon, 30 Apr 2018 11:11:26 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 30 Apr 2018 11:10:37 +0200 Message-Id: <20180430091037.13878-43-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180430091037.13878-1-laurent@vivier.eu> References: <20180430091037.13878-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:S7c+THSRYyBmJae4q8/KCe9UMEHypAUjwGgdrK/fH5s1JcN8Jpa sDWhscdYRE2jgG6fxD30ncIpjCDLzEYF9L8MEU90q29lFSFQDPcgfcX+sVi+mpq4s/8/VOY EW9kpSIFw1gwsyjK7L3eFjs+HJdHmKf6sd2vga6Uwt/HeaowfrGPBw/0hGRHnsbWX7Ke8lG ujov6mZo9CNesybflF9Kg== X-UI-Out-Filterresults: notjunk:1; V01:K0:Wk4Pn5Sf3zU=:fYgQ/ZN6MbNxgXgiJifKsh DWrCdVGoDjM7r89jA3xYFFZUop5PNLEFw2SPyAZ4jAs/f8pRDBKhhsv1KlHvw71uFu1Ov26Up ydyIdzrijbeN1DbeoJV6uex5UhE8G4dAEhUo5BPJ4j0+Jr9CNNNSdpAupINJdKjvQ/6AcFSGP 7PyMgRv9+8vWkqTguEnXdG/9UtTgHRYjWyfYsu/rowrIpE+Quw/6NdIUtWcgoA30bE/U2qnof IpGNHEnY80eXTbWG+16seLSHwRBn9tRqKogsPHTZHWXwE+ZpKeGPdVSI5g1mHdng/Nh0CWty9 VfPXjifWrfnHVLvdZLV8hK1jvltQ0+rprOlUnfdmcyNs34hFCCsJkfSij0Q3ae8LSW2SqdDrO jV0tQ+ov8XGpUBIjhijTQWz4+dMPoXbPeJFrQ3ml1fnYwSj7d1tAEBmLniQaXyAjvrXR8T758 LQK6ndHfDHKvuN+R4nyQux7gaArGF6JcpminIdAXDCVeFQ8GCUN1jrtI93zRYWwZ6TkBGi6+l qW4nif6ibtOCqpmmvA79C8WhUlHGIHPqGpcj+X3GdUb5eWipd+BDHDPlb4mqVEol5aPJtn8lI PRxOpimJPNJcnTYqsduvr6kYL2knwEa3i5E1zxqnWQxw1d3nyXjS3+Qb7ocJfEUO43KJy4bE7 /JXco3ckcEDOEgBwQDXQ17Wx/yOSd3YuRrvBmnmYN8D5p0Qx26f0/LNEtTRY3OhMcoEPBB2tF hGUWw+lV34P7mwkx X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.73 Subject: [Qemu-devel] [PULL 42/42] linux-user: Add ARM get_tls syscall support 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: Christophe Lyon , qemu-s390x@nongnu.org, Riku Voipio , Laurent Vivier , Cornelia Huck Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Christophe Lyon Co-Authored-By: Mickaël Guêné Signed-off-by: Christophe Lyon Reviewed-by: Peter Maydell Message-Id: <20180416091845.7315-1-christophe.lyon@st.com> [lv: moved the change to linux-user/arm/cpu_loop.c] Signed-off-by: Laurent Vivier --- linux-user/arm/cpu_loop.c | 3 +++ linux-user/arm/target_syscall.h | 1 + 2 files changed, 4 insertions(+) -- 2.14.3 diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index d911929bf6..26928fbbb2 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -347,6 +347,9 @@ void cpu_loop(CPUARMState *env) case ARM_NR_breakpoint: env->regs[15] -= env->thumb ? 2 : 4; goto excp_debug; + case ARM_NR_get_tls: + env->regs[0] = cpu_get_tls(env); + break; default: gemu_log("qemu: Unsupported ARM syscall: 0x%x\n", n); diff --git a/linux-user/arm/target_syscall.h b/linux-user/arm/target_syscall.h index 94e2a42cb2..afc0772e19 100644 --- a/linux-user/arm/target_syscall.h +++ b/linux-user/arm/target_syscall.h @@ -16,6 +16,7 @@ struct target_pt_regs { #define ARM_NR_breakpoint (ARM_NR_BASE + 1) #define ARM_NR_cacheflush (ARM_NR_BASE + 2) #define ARM_NR_set_tls (ARM_NR_BASE + 5) +#define ARM_NR_get_tls (ARM_NR_BASE + 6) #define ARM_NR_semihosting 0x123456 #define ARM_NR_thumb_semihosting 0xAB