From patchwork Thu Nov 2 17:38:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 740460 Delivered-To: patch@linaro.org Received: by 2002:a5d:538f:0:b0:32d:baff:b0ca with SMTP id d15csp962140wrv; Thu, 2 Nov 2023 10:41:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNS14mX1LqGZgLeMbmoNeBwNBSEyI6I4vJp/yZiF1NCRtqdLx37is5yQqNAssblBvte1tG X-Received: by 2002:a05:6808:f8e:b0:3a8:1c07:17d3 with SMTP id o14-20020a0568080f8e00b003a81c0717d3mr24986127oiw.19.1698946881795; Thu, 02 Nov 2023 10:41:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698946881; cv=none; d=google.com; s=arc-20160816; b=bPsKklpd2HWA4n0a12qjdTirrGSEzYTcX4Qe/wdxh4d/GEaLia/paMVwKdcsA1p9JV y3VvFN3o2awCd9Wc8ORzI+hmXVpYZR9EW8ZtvZRXDvW855hwVNnrguEW8Xj0d3EfmH1q deVvGa2TYLyplPF+bfENtgzciZZHhvO5Lq6dwIpJ81bP2XF6hPYy7ymvlLxW1wA+IzwC BchUGac+5TJKvug6ZYBGwvtCR/iAbU6XSZKspojZzbnobV6mrq0lun1+osA9MDTDf/G3 g7XHDbrtxeTMFlUOt7lTEq0eZJ1jFcdi7XIFsd+rZfsRAttQB4Eb6JgW5K/URdba1GSt urzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=5gnjJmQvTJBwOrKE2T0p6/jD0OcYtl+uj21k3TqiHP4=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=PI/FQBCh/szL5pT4hci1Wn1cBtYMkD4K0GOWYCUOsfSap5jxkiGqmnHCHno4KMUbju oGb3QfoWcAKr4AIUN3DWcsY4vBWX2nvByYY98MkB2pGcs0wUPfwRpNYfAA1BI+RCxa+K 6gXlYZTng47qLY5rbJPhYuETxl4orDw9HntmW0A9cqDwTg6cUSQsxDWPGRw0SYHHseWF mfaa4jT1oSZJ0cZ4PNqdHUZBRtuBDK5bRn/7ce4eyLCDmlU0umr3KsSopIkEIxYi6Q4M Fx0+m2v4P9WO0d0dDemGx70/wWb5DZl5Emrlb6ks8/aI7mCpswYvEC+BvfUSV0ltwsMw ezSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FTOQrp86; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x20-20020a05620a449400b00765ad3da644si279333qkp.600.2023.11.02.10.41.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Nov 2023 10:41:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FTOQrp86; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qybfo-000473-4a; Thu, 02 Nov 2023 13:40:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qybeh-0003H5-KL for qemu-devel@nongnu.org; Thu, 02 Nov 2023 13:38:58 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qybec-0002mF-NV for qemu-devel@nongnu.org; Thu, 02 Nov 2023 13:38:55 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-32fa7d15f4eso724855f8f.3 for ; Thu, 02 Nov 2023 10:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698946729; x=1699551529; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=5gnjJmQvTJBwOrKE2T0p6/jD0OcYtl+uj21k3TqiHP4=; b=FTOQrp86S3Zn9+lavvvIfFk70WzcilcwNEREHrSWcZPXsPFX/FY8OdFlphBoIo7MO/ RAYCuXncBVcDklEcbOM+E7w/5RD2zmjw9iXE4pn711gsd4AABdOv+hfEI9/YmM2iUSx6 W5vRqAgseG4mLFyZFK1o38IMWbX9WLT6SNeXvvzf8Jmp8nzFXGIZ+8hoPpge+nwVdWF/ 27sZ/wdRssd90JnIkOJ5q2MTgV4jeLdM3A+H6msIfe/+gOrqfJFQ9ocT2kpFxVhJGHjx W577gsyRDyrhAwLku0+OvIp2/BRX0rr6N0tJEnY5BMJlBvKz5vbk7wEqxNyuUh4iuSK6 naHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698946729; x=1699551529; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5gnjJmQvTJBwOrKE2T0p6/jD0OcYtl+uj21k3TqiHP4=; b=UPBp2JK3UaaqVzVDXSc9NWfZUXDkE+5hw2kvsTBGRFU3ZkBRF+Utg+9JTiWlxahuPi 2IDoawyPYDBx7bgw9oRIENIIPVIAj0j/5V4yKxQoC7e4a3/0ORICmUj8TlAwBSj8ZYxs l4nHfuLDGycoVq+V02Mq6ARe153q+KP0tioG0f1a7sN3Cb3czRxjY5KL7fjIbFqseDqk 53tB2VKvQXcdFVgxU3wJL9epbi7Qsf2cJCd8rFIpl/0zB8tnJnvAkg7X0vpK4vikjOQ6 gmS6RvDMM3migyYpOlMFuS8kkWKQGmffzBd/sgPUU6a8Vyl/KiUO/SVOKN0KljnzTBEE LZxQ== X-Gm-Message-State: AOJu0YzFtpW1Bzl224KHBNFPcwyS7MZZBHSU2swtEkyKFOoms3Zn1rEF TMYZPQqclMM/v/X0pyXwgfo8ayBLm3AkGijs2pc= X-Received: by 2002:a05:6000:156d:b0:32f:7db1:22fe with SMTP id 13-20020a056000156d00b0032f7db122femr15023632wrz.15.1698946729384; Thu, 02 Nov 2023 10:38:49 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id e16-20020adff350000000b003258934a4bcsm3046805wrp.42.2023.11.02.10.38.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 10:38:49 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 23/33] target/arm: Enable FEAT_MOPS insns in user-mode emulation Date: Thu, 2 Nov 2023 17:38:25 +0000 Message-Id: <20231102173835.609985-24-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231102173835.609985-1-peter.maydell@linaro.org> References: <20231102173835.609985-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org In user-mode emulation, we need to set the SCTLR_EL1.MSCEn bit to avoid all the FEAT_MOPS insns UNDEFing. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20231030174000.3792225-2-peter.maydell@linaro.org --- target/arm/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 954328d72a0..df6496b0193 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -296,6 +296,8 @@ static void arm_cpu_reset_hold(Object *obj) env->cp15.sctlr_el[1] |= SCTLR_TSCXT; /* Disable access to Debug Communication Channel (DCC). */ env->cp15.mdscr_el1 |= 1 << 12; + /* Enable FEAT_MOPS */ + env->cp15.sctlr_el[1] |= SCTLR_MSCEN; #else /* Reset into the highest available EL */ if (arm_feature(env, ARM_FEATURE_EL3)) {