From nobody Tue Apr 23 22:44:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 152387053809357.5944919257995; Mon, 16 Apr 2018 02:22:18 -0700 (PDT) Received: from localhost ([::1]:59309 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f80L3-0006jW-8V for importer@patchew.org; Mon, 16 Apr 2018 05:22:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f80I5-0004t7-5z for qemu-devel@nongnu.org; Mon, 16 Apr 2018 05:19:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f80Hz-0005OR-Ai for qemu-devel@nongnu.org; Mon, 16 Apr 2018 05:19:13 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:34523 helo=mx07-00178001.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f80Hz-0005Nw-1Q for qemu-devel@nongnu.org; Mon, 16 Apr 2018 05:19:07 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w3G9Eaj1008035; Mon, 16 Apr 2018 11:18:53 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2hb8hf1nbh-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 16 Apr 2018 11:18:53 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1073238; Mon, 16 Apr 2018 09:18:51 +0000 (GMT) Received: from Webmail-eu.st.com (gpxdag5node4.st.com [10.75.127.77]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id AB5AB24E9; Mon, 16 Apr 2018 09:18:51 +0000 (GMT) Received: from gnx2104.gnb.st.com (10.75.127.116) by GPXDAG5NODE4.st.com (10.75.127.77) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 16 Apr 2018 11:18:51 +0200 From: Christophe Lyon To: , , , , Date: Mon, 16 Apr 2018 11:18:25 +0200 Message-ID: <20180416091845.7315-1-christophe.lyon@st.com> X-Mailer: git-send-email 2.9.5 MIME-Version: 1.0 X-Originating-IP: [10.75.127.116] X-ClientProxiedBy: GPXDAG1NODE6.st.com (10.75.127.67) To GPXDAG5NODE4.st.com (10.75.127.77) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-04-16_05:, , signatures=0 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx08-.pphosted.com id w3G9Eaj1008035 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 91.207.212.93 Subject: [Qemu-devel] [PATCH] 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Co-Authored-By: Micka=C3=ABl Gu=C3=AAn=C3=A9 Signed-off-by: Christophe Lyon diff --git a/linux-user/arm/target_syscall.h b/linux-user/arm/target_syscal= l.h index 94e2a42..afc0772 100644 Reviewed-by: Peter Maydell --- 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) =20 #define ARM_NR_semihosting 0x123456 #define ARM_NR_thumb_semihosting 0xAB diff --git a/linux-user/main.c b/linux-user/main.c index 8907a84..2acac36 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -720,6 +720,9 @@ void cpu_loop(CPUARMState *env) case ARM_NR_breakpoint: env->regs[15] -=3D env->thumb ? 2 : 4; goto excp_debug; + case ARM_NR_get_tls: + env->regs[0] =3D cpu_get_tls(env); + break; default: gemu_log("qemu: Unsupported ARM syscall: 0x%x\= n", n); --=20 2.6.3