From nobody Tue Feb 10 00:25:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1568388383; cv=none; d=zoho.com; s=zohoarc; b=ZKCAsnqcpoKJqbe8dl9/hkr9lxbByBwI5VyoomT3rYKRv21qio80Q4bucwI5dI0eQZVzfTQe1LhpyvANxtCghwZvfUurHp8R+Y++NgVtFOd48Y36TK108vT42nm3mwxmY7gfcMOJ2sh/B5o35ZZ6KU5Kj6pkEFj3Aseue5uLa0c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568388383; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=JGS4cd+3+YzNw9t73UEu5DEiXh2KRBor/rrPcaum5qs=; b=FBD/vbp4JZQAbUhTsutyabL4YzXrrebBObVzmPshobTmzWlhYD/EtfDTmXgXg9gkFwp79eVPEweKW5B7P9jGTvrpfnBSQYVoFh0hl5JWxMOAm6zg09n8T04YLAODw8T31+Tu4/Mr3mmcAh0RH27BVuBZaFdbpGh6Mr932hi45HA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1568388383748332.37122636341087; Fri, 13 Sep 2019 08:26:23 -0700 (PDT) Received: from localhost ([::1]:45192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8nSl-0006Xu-B3 for importer@patchew.org; Fri, 13 Sep 2019 11:26:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52145) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8nLY-0007hq-Uw for qemu-devel@nongnu.org; Fri, 13 Sep 2019 11:18:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i8nLX-0000Li-Rg for qemu-devel@nongnu.org; Fri, 13 Sep 2019 11:18:52 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:55718) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i8nLX-0000Ky-J1 for qemu-devel@nongnu.org; Fri, 13 Sep 2019 11:18:51 -0400 Received: by mail-wm1-x344.google.com with SMTP id g207so3186399wmg.5 for ; Fri, 13 Sep 2019 08:18:51 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v4sm44135003wrg.56.2019.09.13.08.18.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2019 08:18:48 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DD40C1FF92; Fri, 13 Sep 2019 16:18:45 +0100 (BST) 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 :mime-version:content-transfer-encoding; bh=JGS4cd+3+YzNw9t73UEu5DEiXh2KRBor/rrPcaum5qs=; b=BHfEjxGIgmrPJQeBKR7yfHNuP7KYIDnq29twlVQf3EjHhlqMuXHIwn4G0ng1svRtDN Lw15xPcURZ6r6eyKjlmNvvDDDdhCO2rvqkaYNiGnB1gC93dz3x7fU01IHRLwXIUWzeS6 /ECgj/PRTuYHZHZgziKyS3lPXpMGZFQR72fYgjlzpsF4LXuEu9s9hil5D0UrRq+2LYzp C+hydzJwGF1O3q3Cil9n19KUQEMKuYBDYM6CCeQ3Gc5W5tHwOxKGMjgDzYUdp1ku8rSw velnJpgRrnIRcmQCt31L3pVES/7bcHZH3u/foQHgWgeCeJwPZKhKjxVF9I0I1giF3WaI FfhQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=JGS4cd+3+YzNw9t73UEu5DEiXh2KRBor/rrPcaum5qs=; b=cBNXFEAUcNvLSFdbxsZf0I3+xabKstK+9Cjwu1Xg0a/bYOgeH1pN4m1eJNZ5o2M/l8 CXNWFVqPFn4+rszpl9463ptI9EQ1b3XplSLNChuRc3zbXz0DXQ9wrXx62iz2H/gZxSHX BZOhhPXf7JzvCmBqmJrY9LFWgZLfTiX3x98jH1aROHP3HJop7mQRI5weWWhHCv5bkdbR H4U3iuCaTqQgQxqaWAWK7clVSfSOsl5VW/ojKYmGSW3GZbzFqleFMn56LFQAdSNXC5xs nkntl4yZHp8GiEJZTmUCRspVs6mVCgUAehs3NUzmdVg0NhvyANmR5uc0XriwvqcZbRP+ MOsw== X-Gm-Message-State: APjAAAVhKJ6rUrVtm5rGqtMTE9VJxABYxmOn77aTNNe8bqSV3lpd02+3 wbr8GrOfT1IpT8ZW356lafPwYA== X-Google-Smtp-Source: APXvYqyitFLFFjPuQ+R9jOHkv6y3gV39j/Qji3vOZ/sopWGB+rkrP+qLim9LUVJgqliI21M4somGCA== X-Received: by 2002:a05:600c:230d:: with SMTP id 13mr4104310wmo.114.1568387930536; Fri, 13 Sep 2019 08:18:50 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Fri, 13 Sep 2019 16:18:44 +0100 Message-Id: <20190913151845.12582-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190913151845.12582-1-alex.bennee@linaro.org> References: <20190913151845.12582-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PATCH v6 5/6] target/arm: remove run-time semihosting checks for linux-user X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Now we do all our checking at translate time we can make cpu_loop a little bit simpler. We also introduce a simple linux-user semihosting test case to defend the functionality. The out-of-tree softmmu based semihosting tests are still more comprehensive. Signed-off-by: Alex Benn=C3=A9e --- linux-user/arm/cpu_loop.c | 3 --- linux-user/arm/target_syscall.h | 3 --- 2 files changed, 6 deletions(-) diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index 8d65de5b9f4..e28c45cd4ab 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -325,9 +325,6 @@ void cpu_loop(CPUARMState *env) =20 if (n =3D=3D ARM_NR_cacheflush) { /* nop */ - } else if (n =3D=3D ARM_NR_semihosting - || n =3D=3D ARM_NR_thumb_semihosting) { - env->regs[0] =3D do_arm_semihosting (env); } else if (n =3D=3D 0 || n >=3D ARM_SYSCALL_BASE || env->t= humb) { /* linux syscall */ if (env->thumb || n =3D=3D 0) { diff --git a/linux-user/arm/target_syscall.h b/linux-user/arm/target_syscal= l.h index afc0772e194..f85cbdaf56f 100644 --- a/linux-user/arm/target_syscall.h +++ b/linux-user/arm/target_syscall.h @@ -18,9 +18,6 @@ struct target_pt_regs { #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 - #if defined(TARGET_WORDS_BIGENDIAN) #define UNAME_MACHINE "armv5teb" #else --=20 2.20.1