From nobody Sun Oct 5 19:42:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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 (zohomail.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=1579015154; cv=none; d=zohomail.com; s=zohoarc; b=mtSeXogTpckJVaQGDU7j2KMYBLqVngMwqmyvSoVJbNsYPIjV9yyCKehJzAyY3sh8R0FVQq1H1i2xlG0NX0BCSXDvDoudblwGn8ZzgNUEYf6FcQu93SsTmIWum8vCCA9eIOk8+SzV1+rzVCEyd7ito0NiAakFzAOw16i01CCZVG4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579015154; 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; bh=gtTyiABJNzKbT4Hcxk69PnKRIOdsWQYqpdkNpdscjO8=; b=LA4x7fnQsejIp9WRnsG/08xO2Ab4R2EyFjp9UiPyvKKmCQ2tRIx/QLkk5M5vnmjcTZlJQjY/EOSEllrnCO+E9YeYOdfM9+zxUvP/AfyEBbhWoTgHkN9VnbkexpTPgkEO3f/I/aDEkKwbw4jdq07KrXhxseGuJXZpnQ46HFGsru8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1579015154037711.605199774208; Tue, 14 Jan 2020 07:19:14 -0800 (PST) Received: from localhost ([::1]:41770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irNyK-0007nI-7h for importer@patchew.org; Tue, 14 Jan 2020 10:19:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37831) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irNpZ-0005B3-Q6 for qemu-devel@nongnu.org; Tue, 14 Jan 2020 10:10:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irNpY-0007W4-5i for qemu-devel@nongnu.org; Tue, 14 Jan 2020 10:10:09 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:36058) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1irNpX-0007UX-Ta for qemu-devel@nongnu.org; Tue, 14 Jan 2020 10:10:08 -0500 Received: by mail-wr1-x441.google.com with SMTP id z3so12530922wru.3 for ; Tue, 14 Jan 2020 07:10:07 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o15sm20309211wra.83.2020.01.14.07.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2020 07:10:02 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0D12D1FF9A; Tue, 14 Jan 2020 15:09:56 +0000 (GMT) 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=gtTyiABJNzKbT4Hcxk69PnKRIOdsWQYqpdkNpdscjO8=; b=fcSKaYL5RIXTOvSeIFKI2+EUmiNjinug2EPGoLbooNYoru9YNGgl1x94qyPf3+AKVB BsattieJNQUdOz5YEZsdsxUbq5c6FtO5M8D9mr7c8vbR0MOcXo3gR9evm0XeUSjB01M4 YhtpqauhM53Gn6c/YzV0rlGcNwKvH5CIYSgHV/RgZl8iNaNdg+MOd5lJUad6dQIgVgxE PeL7wVKIYyUVr7hgsm3HhKbuhh2VH4ypAjiyrzE868oRJKI4D58lGnrAIggDzhBMYOBS qPbay9MLlc1BznwI6AC+LtAoEDjvnFSGMvmzT2JvF/EV6Lh++chbkPMTO6dYaJK63cfO lC5w== 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=gtTyiABJNzKbT4Hcxk69PnKRIOdsWQYqpdkNpdscjO8=; b=bwKSdSrsdBDN1w0FB63ohbFGuMl5FtGOztMoGzPEHwH0iOZnnxdllY3ToTXLcMJQx1 IMgDmGZaa+cVu7C1isodepTpAEAriVU8U5sD77rLeQQb353k2bphXTXOqeoMU3LJ0W++ O2Sy26gti8xSsj8r/S2w/+VhCWThktUoG+HAOGe+ekc8EydCI40VkqvB85UOdh7CUs7E Cpj1ur01OvjByTOH51LMS4R2iLzIDelPBHCMebFiSxESPMcZz86kGxpotcdshvln6yoT s0LfNvWmcWzPUFVvKnyJJiquVvEN0rs9TyrysY+W5/q9yOKCSU70fcHFk+VtDvLLLcOI Wc1g== X-Gm-Message-State: APjAAAVPFtzSiV2NHifNdybWVLYCXQ2pJiG+au4oP6ey57gqAc7uIgiJ pk9x4+Q+mhHu+thQTKlS9ay6qA== X-Google-Smtp-Source: APXvYqz13a11d6b0hnHET0gjRyEJNHXz97y3j8DQkqIRXr8efdvLoGwZzBxc9dV+Ra1TFFJZKpJifw== X-Received: by 2002:a5d:6a02:: with SMTP id m2mr24831190wru.52.1579014606899; Tue, 14 Jan 2020 07:10:06 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v5 11/22] target/arm: default SVE length to 64 bytes for linux-user Date: Tue, 14 Jan 2020 15:09:42 +0000 Message-Id: <20200114150953.27659-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200114150953.27659-1-alex.bennee@linaro.org> References: <20200114150953.27659-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::441 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: Richard Henderson , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The Linux kernel chooses the default of 64 bytes for SVE registers on the basis that it is the largest size on known hardware that won't grow the signal frame. We still honour the sve-max-vq property and userspace can expand the number of lanes by calling PR_SVE_SET_VL. This should not make any difference to SVE enabled software as the SVE is of course vector length agnostic. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- v2 - tweak zcr_el[1] instead --- target/arm/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index d62fd5fdc6..1c1f34ee5d 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -199,9 +199,9 @@ static void arm_cpu_reset(CPUState *s) /* and to the SVE instructions */ env->cp15.cpacr_el1 =3D deposit64(env->cp15.cpacr_el1, 16, 2, 3); env->cp15.cptr_el[3] |=3D CPTR_EZ; - /* with maximum vector length */ + /* with reasonable vector length */ env->vfp.zcr_el[1] =3D cpu_isar_feature(aa64_sve, cpu) ? - cpu->sve_max_vq - 1 : 0; + MIN(cpu->sve_max_vq - 1, 3) : 0; env->vfp.zcr_el[2] =3D env->vfp.zcr_el[1]; env->vfp.zcr_el[3] =3D env->vfp.zcr_el[1]; /* --=20 2.20.1