From mboxrd@z Thu Jan 1 00:00:00 1970 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 D7F0C1DFF4; Fri, 5 Jul 2024 13:20:08 +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=1720185608; cv=none; b=FcocbNzFD2J/xm4sLZtVVHA0/F1KLxRF2i7JJrI/GiWdpsZVdH9b/9Bhr0lwaajmB2gcn1XBp3YaxGd3onkc12qSlRlOq9q+qFLpb8IKN/hz4Akrw+2ZCL7t9HVuPdHDYsgAllqeijQfzNWqIs4Ufj2FTYO+syYQ4opLg6BHwD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720185608; c=relaxed/simple; bh=QUhCNAgTuGB0igzzCmZLsmZgPcifJMCXGxFbVnHj46c=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=ivyIbdKHk5EO84Eb66xOnT0u96u1EzNf/2WdmNdaE152KCAEXdg2FPrFRkS6D8Lf/HPjAStugxDDsWgTs5dxzUiosOm16WAwTsVBL4Gaf3Ceyk9VbBsLQnlyLNSmZ8iK8b6VxNDjcBS9FnebOMAnds+OkijemHE4Mg90/BX720A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tYQfSzME; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tYQfSzME" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79A50C116B1; Fri, 5 Jul 2024 13:20:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720185608; bh=QUhCNAgTuGB0igzzCmZLsmZgPcifJMCXGxFbVnHj46c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tYQfSzMECZKoy7nvUbsYVAKaJud5oS/FlrY4bgTU9EeYbfc5d3dSkOJvy0qNdJRzQ /rmKievPsI/lyYvKoeF8EMCe28RXbKxIU954Tz0uQY9zYdv9Pfzer6Xwcms3gDmjKI 2Kp6rLI9YIkWGHuLbsDtg3YV3VvVAT4sKf1BUDS0ypDHKXk7EHboOu2ERFlui1NJcB bSPgM+iEFdkSXVQajXtJVtk1S+phI1cVSbyvcB0+cZhw+pRWEmf9bqhxIlvWARz75a lB+nUzeNi9w1OSImDcbjcvACMDHTijfU7xGR3ep/vm/RTHk/FT6aG4+j7LlXDsMF4U r7OXQ+2HNQraw== 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 1sPir8-00A3qu-Gl; Fri, 05 Jul 2024 14:20:06 +0100 Date: Fri, 05 Jul 2024 14:20:05 +0100 Message-ID: <86a5iw3ri2.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 v4 0/4] KVM: arm64: Fix underallocation of storage for SVE state In-Reply-To: <20240704-kvm-arm64-fix-pkvm-sve-vl-v4-0-b6898ab23dc4@kernel.org> References: <20240704-kvm-arm64-fix-pkvm-sve-vl-v4-0-b6898ab23dc4@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.3 (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 Thu, 04 Jul 2024 18:28:15 +0100, Mark Brown wrote: > > As observed during review the pKVM support for saving host SVE state is > broken if an asymmetric system has VLs larger than the maximum shared > VL, fix this by discovering then using the maximum VL for allocations > and using RDVL during the save/restore process. I really don't see why we need such complexity here. Fuad did post something[1] that did the trick with a far less invasive change, and it really feels like we are putting the complexity at the wrong place. So what's wrong with that approach? I get that you want to shout about secondary CPUs, but that's an orthogonal problem. M. [1] https://lore.kernel.org/r/20240606092623.2236172-1-tabba@google.com -- Without deviation from the norm, progress is not possible.