From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79247C3271E for ; Thu, 4 Jul 2024 14:19:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PAFqaSeG2mMBq+8CI3RrI+TuZexqXmB4aI3nh0hbYsM=; b=PIYxJkllHVUwSLt0yXVbCRyFO0 hCWetVDABy3KZmJi7hfgsgYzfr0eV/wxkBsntnpjjbIzliM+uL6Vc+ykK0sRRUl6wfla5Au/lmFR8 z0zYrSYuo5SKO9B4fI6lEey0rjRKg0Eb/6r+LZHnZG7POPADiJR92GvIMIVG4BDOwuqVlWPTk6gi9 wpbZROJpoyB61JghnAiAslyyMLywbPGU5faVf9k6R1Lsf19aI8elu7F6FrwvDJpbDYaDnV3JjUr8x zjd2AczSZt6GYqGR0yNJtEYVxjt9jjrCGtPAdAW4PHq11vxdkTeBuZFfCZR3Jm/fN9UMUbCEt64mu DKIXX1iQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPNIq-0000000DQS7-1dYn; Thu, 04 Jul 2024 14:19:16 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPNIc-0000000DQNq-43Lc for linux-arm-kernel@lists.infradead.org; Thu, 04 Jul 2024 14:19:04 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 6C61CCE354F; Thu, 4 Jul 2024 14:19:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8585C3277B; Thu, 4 Jul 2024 14:18:58 +0000 (UTC) Date: Thu, 4 Jul 2024 15:18:56 +0100 From: Catalin Marinas To: Mark Brown Cc: Will Deacon , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Fuad Tabba , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev Subject: Re: [PATCH v2 2/4] arm64/fpsimd: Discover maximum vector length implemented by any CPU Message-ID: References: <20240606-kvm-arm64-fix-pkvm-sve-vl-v2-0-c88f4eb4b14b@kernel.org> <20240606-kvm-arm64-fix-pkvm-sve-vl-v2-2-c88f4eb4b14b@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240606-kvm-arm64-fix-pkvm-sve-vl-v2-2-c88f4eb4b14b@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240704_071903_194886_1BEDF173 X-CRM114-Status: GOOD ( 13.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jun 06, 2024 at 04:21:44PM +0100, Mark Brown wrote: > When discovering the vector lengths for SVE and SME we do not currently > record the maximum VL supported on any individual CPU. This is expected > to be the same for all CPUs but the architecture allows asymmetry, if we > do encounter an asymmetric system then some CPUs may support VLs higher > than the maximum Linux will use. Since the pKVM hypervisor needs to > support saving and restoring anything the host can physically set it > needs to know the maximum value any CPU could have, add support for > enumerating it and validation for late CPUs. > > Signed-off-by: Mark Brown Acked-by: Catalin Marinas I guess the %lu suggested by Fuad can be done when applying the patch.