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 22FCEC3271E for ; Fri, 5 Jul 2024 13:20:44 +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:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID: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=jcBoLHBTO63pcDOeNt5i8eTJkqSFh1ZEzQpBk1ymqas=; b=fzvIt5SPGo+XK6DdwdxTZOGANx /bbAULIfBLz13gbOHFFIWEU1e/CkgpMR2tMa1i8yHLApLsmfT0IJbn07WMG4Wqcxc49toGbHS86ay PjmQdp5ThU2PcTnFYfsyNfTr8F3bbCHmwjjrUQ7HMSs5II02xRxWPkyNs1rOzZzqu6clxTAgx09BA wbuBqG7tb21zD1++I3Fhwh4GgnA06xGnz15+HYuT/M34ff03SZyYBm9CSnwQECJdg8qvD+NrarQBF FSYuIDutboUarV2yGWNXJz0ruO/IZn2KX7fCv4Yilgde+eiPlTGtSHvfzLwy2/eH2OLVWHegeckvU gfhjn7GA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPirT-0000000G14H-1PbG; Fri, 05 Jul 2024 13:20:27 +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 1sPirE-0000000G10V-2zK0 for linux-arm-kernel@lists.infradead.org; Fri, 05 Jul 2024 13:20:14 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 274A5CE3DBB; Fri, 5 Jul 2024 13:20:09 +0000 (UTC) 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) 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240705_062012_952944_BCE0D8C3 X-CRM114-Status: GOOD ( 14.03 ) 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, 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.