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 E604CC25B74 for ; Thu, 30 May 2024 18:29:27 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H2iqq9JoeRjoABq64A+6j8VeSx/ac5KoZneraB17lcQ=; b=MLZp+OilMMaand OByjD6Mr3CRs6+POcK8wU2ZqidU0P1e5/XX7C4WXlh5qPozhOcbmsUHSkg6CTNiUo1blUep9wilQz aN9LD0V8U2O7xA+O5eitF0x8d1qztvquOoyi3TmJklJynJmwjxScfdyUsdpBo30TGWQSdRahpSzwg OWFxzHdzVk60KYBs1HGFeWXqC/niuREy0Sy8uVJyoujDdKVfSDsWXgrWl7k5AeYVgbiYJJaii1rvJ 7JBhbX9+dHohzhSdwEWY6VwSw+fcOD0X8tFc88cioAfEN7uBpT36FalO6xqqq283xAJDPn+BoTm1v z7X+ROG8mLJB/M92/qHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCkWY-000000086Vd-4BFF; Thu, 30 May 2024 18:29:15 +0000 Received: from out-187.mta1.migadu.com ([95.215.58.187]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCkWW-000000086V8-2krb for linux-arm-kernel@lists.infradead.org; Thu, 30 May 2024 18:29:14 +0000 X-Envelope-To: tabba@google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1717093747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PeAgmjn5IEACX7K92jA1NBjW3rCZLJV/wTFP7BhdnP8=; b=AEipEeXuRQWm2QfZLSln2k5InoPtxiwJh9ixoVfo8HZc5WlDZg4phE73B2SBMH0G89WOwt ywkFpR4blrEHUOWV5MO+Q1DtOzVMiK4UW/KYekuDHf053xnanjtFYiP+/TgqeWdRavbZjB cLRnH1/kejXB0ktmiJOIymNN34KKeAc= X-Envelope-To: kvmarm@lists.linux.dev X-Envelope-To: linux-arm-kernel@lists.infradead.org X-Envelope-To: maz@kernel.org X-Envelope-To: will@kernel.org X-Envelope-To: qperret@google.com X-Envelope-To: seanjc@google.com X-Envelope-To: alexandru.elisei@arm.com X-Envelope-To: catalin.marinas@arm.com X-Envelope-To: philmd@linaro.org X-Envelope-To: james.morse@arm.com X-Envelope-To: suzuki.poulose@arm.com X-Envelope-To: mark.rutland@arm.com X-Envelope-To: broonie@kernel.org X-Envelope-To: joey.gouly@arm.com X-Envelope-To: rananta@google.com X-Envelope-To: yuzenghui@huawei.com Date: Thu, 30 May 2024 11:29:00 -0700 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Fuad Tabba Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, maz@kernel.org, will@kernel.org, qperret@google.com, seanjc@google.com, alexandru.elisei@arm.com, catalin.marinas@arm.com, philmd@linaro.org, james.morse@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, broonie@kernel.org, joey.gouly@arm.com, rananta@google.com, yuzenghui@huawei.com Subject: Re: [PATCH v3 00/11] KVM: arm64: Fix handling of host fpsimd/sve state in protected mode Message-ID: References: <20240528125914.277057-1-tabba@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240528125914.277057-1-tabba@google.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240530_112912_862371_0B62E731 X-CRM114-Status: GOOD ( 23.01 ) 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, May 28, 2024 at 01:59:03PM +0100, Fuad Tabba wrote: > Changes since v2 [1] > - Rebased on Linux 6.10-rc1 (1613e604df0c) > - Apply suggestions/fixes suggested for V2 (Marc) > - Add an isb() to __hyp_sve_restore_guest() > - Squash patch that introduces kvm_host_sve_max_vl with following > patch, since it's used there > - Some refactoring and tidying up > - Introduce and use sve_cond_update_zcr_vq_isb(), which only does > an isb() if ZCR is updated (RFC, next to last patch) > - Remove sve_cond_update_zcr_vq_*, since it's not likely to help > much (RFC, last patch) > > With the KVM host data rework [2], handling of fpsimd and sve > state in protected mode is done at hyp. For protected VMs, we > don't want to leak any guest state to the host, including whether > a guest has used fpsimd/sve. > > To complete the work started with the host data rework, in > regards to protected mode, ensure that the host's fpsimd context > and its sve context are restored on guest exit, since the rework > has hidden the fpsimd/sve state from the host. > > This patch series eagerly restores the host fpsimd/sve state on > guest exit when running in protected mode, which happens only if > the guest has used fpsimd/sve. This means that the saving of the > state is lazy, similar to the behavior of KVM in other modes, but > the restoration of the host state is eager. > > The last two patches are not essential to this patch series, and > the last one undoes the next-to-last. Please consider only one > (or neither) of these two patches for inclusion. For patches 1-7 (with the unnecessary isb()'s addressed): Reviewed-by: Oliver Upton I think we can do without the rest of the series for 6.10. I also tested this on Neoverse V2. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel