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 ABF05CD1284 for ; Tue, 2 Apr 2024 14:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LnnlykxLTJye7bzHWI30rL+xwZc22TAEwhBRxFnClKs=; b=FjnwBU9o79M1dh NOzQqlPetoOFxYoZTWzPASTvns5avxBNsM5Zwiadvh3aUJ92PNhUU5HxfWyg4uM6s4RXSsXsKhVh/ gzewioF2H9uLKYXEcriN1TtEjSOJJhVSB/csWXzoYH+3zqUZjR34li3id7NtKGU31e3e7L4ZaPmhf CZuK5UhUjgrAwPJi9cel6ZaE82RSwvtK68kPvmCNyzwemc6qLOpW2IOVaOzc4+F/P3MLAOi/CHW9Z 9AmYlSdD1jWyAusZxrk+e6dUCqULrw7zXw7xOileo1I9p0091llYq8iXlpoMfaPwA3B4wWMBSCUet ckl4Lcofg3O9vAKVoXew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrfWA-0000000BhZz-1Yzk; Tue, 02 Apr 2024 14:53:42 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrfW6-0000000BhYc-3yj7 for linux-arm-kernel@lists.infradead.org; Tue, 02 Apr 2024 14:53:40 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 2AEB0CE1C80; Tue, 2 Apr 2024 14:53:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 509FAC43390; Tue, 2 Apr 2024 14:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712069616; bh=vhQsnvRHzwOy3ox3OvUmqvwn0itwQb57/FmYwbndCXU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=u9wM5BM1zVlflI8QFJDAHZYDZYOnPeNYUCR981yXBTjIUiYAuk/3ukwrzYyE9RB94 ggNYHgQ1aWLaJAIwPMuPzimCq9JWUddvfke5tuHoM0dsQKwtlwps5xe/l4EwBAzHDD rf1z2ocnPeEVj5O5c+AsMaSSwuS16ukcZIEKrjjEBxANfz4eCcf1IS4sLyBX7WGV4J X6bfAXGXEkMAukyHifrFowQ8fi42i71UHSa2nc5rdtHTyYs00rXjuHJJ55XSR2HdyJ 0d0USc13F8w/JmKNxjLr8RyCue8Q7EheKu9KzyehW7omtUJefOH2yADQqrus5BNuSp yCsACeDACsJbQ== 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 1rrfW1-000lX6-Ji; Tue, 02 Apr 2024 15:53:33 +0100 Date: Tue, 02 Apr 2024 15:53:33 +0100 Message-ID: <86h6gju87m.wl-maz@kernel.org> From: Marc Zyngier To: Mark Brown Cc: Catalin Marinas , Will Deacon , Oliver Upton , James Morse , Suzuki K Poulose , Jonathan Corbet , Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dave Martin , kvmarm@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v6 1/5] KVM: arm64: Share all userspace hardened thread data with the hypervisor In-Reply-To: References: <20240329-arm64-2023-dpisa-v6-0-ba42db6c27f3@kernel.org> <20240329-arm64-2023-dpisa-v6-1-ba42db6c27f3@kernel.org> <87msqesoty.wl-maz@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) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") 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, corbet@lwn.net, shuah@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dave.Martin@arm.com, kvmarm@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org 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-20240402_075339_361717_49339E81 X-CRM114-Status: GOOD ( 29.70 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 02 Apr 2024 15:34:27 +0100, Mark Brown wrote: > > [1 ] > On Sun, Mar 31, 2024 at 11:00:41AM +0100, Marc Zyngier wrote: > > Mark Brown wrote: > > > > As part of the lazy FPSIMD state transitioning done by the hypervisor we > > > currently share the userpsace FPSIMD state in thread->uw.fpsimd_state with > > > the host. Since this struct is non-extensible userspace ABI we have to keep > > > Using the same representation is just pure convenience, and nothing > > requires us to use the it in the kernel/hypervisor. > > Indeed, the additional data seemed contained enough that it was a > reasonable tradeoff. > > > > the definition as is but the addition of FPMR in the 2023 dpISA means that > > > we will want to share more storage with the host. To facilitate this > > > refactor the current code to share the entire thread->uw rather than just > > > the one field. > > > So this increase the required sharing with EL2 from 528 bytes to > > 560. Not a huge deal, but definitely moving in the wrong direction. Is > > there any plans to add more stuff to this structure that wouldn't be > > *directly* relevant to the hypervisor? > > I'm not aware of any current plans to extend this. > > > > @@ -640,7 +641,7 @@ struct kvm_vcpu_arch { > > > struct kvm_guest_debug_arch vcpu_debug_state; > > > struct kvm_guest_debug_arch external_debug_state; > > > > > > - struct user_fpsimd_state *host_fpsimd_state; /* hyp VA */ > > > + struct thread_struct_uw *host_uw; /* hyp VA */ > > > struct task_struct *parent_task; > > > Well, this is going away, and you know it. > > Sure, those patches are still in flight though. It does seem reasonable > to target the current code. Sure, if your intent is for this code not to be merged. Because it means this series assumes a different data life cycle, and the review effort spent on it will be invalidated once you move to the per-CPU state. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel