Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp301436lqr; Wed, 5 Jun 2024 06:38:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9ZnAfXyaTUQFOwzQfO0Gjw7KubcLRAyYUVMP41dNU8k2loyUpHSLs67uzUXdlZa4bhoMoJ2jsshL/l+W3YXeP/WtsplHmRuNLhtOcsQ== X-Google-Smtp-Source: AGHT+IGsnuuLNG1zE7BZQfIpqAPCAmDHcMnVYdBewdwoCEWRF9v+Ki7rSvQJvq7b5vQfFPSUVNUb X-Received: by 2002:a17:90a:f0d2:b0:2c2:4f7:522 with SMTP id 98e67ed59e1d1-2c27db5617emr3030532a91.36.1717594725506; Wed, 05 Jun 2024 06:38:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717594725; cv=pass; d=google.com; s=arc-20160816; b=Q472iXlMPj1SrtLGWPX9dR57CxOxN/Zy+p/Q5eGAk3L6wHp0Eik0NkSTSfZm3iRqjJ G3EVjW5ByYZjwru8ECiGXUviK7M6xI8MhVyrPcTblgMNiJ3BhJ21mlePUgGA7myfJT+h UsXQmt7EU2WrhxgCxtZRQflo2HrB9Xz+w8+qTEBC1JXCm6QKD7JcMkrTzhCzoQRZqOOu LDRfrY4Q+0YwLA6uFj8+CtqlmoRlSP8YZML9w5A7A9Mt6kwea3PhzRBvjcDc3VYHucoe dIBDXjSgmTWmHMhUNaEsc996QAZStlnyC2g4g7eEkxQCiduMVToOCdl65cvEAfh472Z3 j6Ng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=PWrhqwixYWUPPJEq2GGoSgOIRDDgOtlNuNoDJxU97a8=; fh=d+INa2YYt/0SAvICdDDyz5X/E2j38xSoc44C+UNU/Fw=; b=t8fCbWhqsk8mCEEisn2kVZIy5uFop4EmYkPOnx2HULlq6lYhKgNj6RSVjERoF4u1o+ VPxeLKEsd7hBfvQXiqZJTqG83PvW4eboxyp2FPY2+xIgOxSKaOYbZVL93mivcplVSEaJ vwegoiVT0SDl7nIH/dyFYX8auWgszVhEbKYQXEU/G3r4D9QEeVYt3EbRLQ0G5r0c7rlv aKMm/mFwoqEPupCKpV0gqj9+7dtRGquteLI+sIXdOHBHShqK4MxlKH9nwrbO9YxjN0xD iZ/57A4U8g4GxMc7OV2UTjKla/Tr1i0B8DkPojc7rntBCjKSux84S6EVxMqInfMUqMXo LJzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iDw0KfdN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202561-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202561-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c28069c0eesi1287759a91.124.2024.06.05.06.38.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:38:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202561-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iDw0KfdN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202561-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202561-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 04B07B2299B for ; Wed, 5 Jun 2024 12:58:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51D1A197548; Wed, 5 Jun 2024 12:13:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iDw0KfdN" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C48C196C9A; Wed, 5 Jun 2024 12:13:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717589604; cv=none; b=Aljp7/RruN75/MjjHoOJV5vVDr+A7J2NrKtTbd7PxNoLBWeHXtpbYgbiDDikuNK3bkYIkGkWb9MelGxlDDy1L30Ijmn8u2vOO/wJ+0S1B/WEQQkAVbNU636wFnaPyAt3+NTgc2buGRxhSRk2eA9JZ8B8Q+QWKxND5pLIqvG4QYw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717589604; c=relaxed/simple; bh=8Qvk4GMBLPewcLA36ipcX0h+jn9RBJObf0Xl8i+W7II=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=HVTT6g8Op5XVxWQ4MVMSeud1oWBf04knpIl819P9CgWxWuqGiids45eaX4a3SQwL9niPpTU6zAyWeQO2Z5lQnQIMPU8QmBqvnej9K7H5s4GC4VhQljT7OydT7zoD4BSmo5BW/KdhIhI0v3oC7nsl0osFTmXJ+x+HZmNGMm40vDE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iDw0KfdN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12996C32786; Wed, 5 Jun 2024 12:13:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717589604; bh=8Qvk4GMBLPewcLA36ipcX0h+jn9RBJObf0Xl8i+W7II=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iDw0KfdNHkEJXKO88Lo2ognlhfMkF49pM/dIaJ7iKL8jZIbaF/fhxljH90xqLIRzs yRXNOudnzpNWaqMitLs7IsQCk1I0ndJ0VGJsNjfXvSSklh1gnHqw0qoeAkl3Btivg/ u3gTlJ3OiY/h6QTJoAn5pKuq2478DB1IAnqGwdcAVmZiFKHDDJCeagVamBMxN8MNf5 jTCmf0ixio6BWUWZwMdXPnQJNwu18AV8vhUV8f4cJJIRGLn56RP5Udhd6fdJua6eyD AGDV+lrzGU7xeJuBYZeISbCDX7zVLRu6rMAN3mfkCNkFFdZF6IqlRPeHRtWT1bj8rW /6+lUXkWot8UA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sEpW5-000vTV-4f; Wed, 05 Jun 2024 13:13:21 +0100 Date: Wed, 05 Jun 2024 13:13:20 +0100 Message-ID: <86bk4flh9b.wl-maz@kernel.org> From: Marc Zyngier To: Mark Brown Cc: Catalin Marinas , Will Deacon , 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 2/4] arm64/fpsimd: Discover maximum vector length implemented by any CPU In-Reply-To: <20240605-kvm-arm64-fix-pkvm-sve-vl-v1-2-680d6b43b4c1@kernel.org> References: <20240605-kvm-arm64-fix-pkvm-sve-vl-v1-0-680d6b43b4c1@kernel.org> <20240605-kvm-arm64-fix-pkvm-sve-vl-v1-2-680d6b43b4c1@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: broonie@kernel.org, catalin.marinas@arm.com, will@kernel.org, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, tabba@google.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Wed, 05 Jun 2024 12:41:28 +0100, Mark Brown wrote: > > @@ -1083,6 +1095,18 @@ int vec_verify_vq_map(enum vec_type type) > if (!IS_ENABLED(CONFIG_KVM) || !is_hyp_mode_available()) > return 0; > > + /* > + * pKVM allocates and uses storage for host state based on the > + * largest per-PE VL, reject new PEs with a larger maximum. > + */ > + if (is_protected_kvm_enabled()) { > + if (max_vl > info->max_cpu_vl) { > + pr_warn("%s: cpu%d: would increase maximum VL\n", > + info->name, smp_processor_id()); > + return -EINVAL; > + } > + } > + Once protected mode is enabled, no new CPU can be booted (see psci_relay.c::psci_cpu_on()). M. -- Without deviation from the norm, progress is not possible.