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 DC17BC43217 for ; Wed, 19 Oct 2022 16:26:14 +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=wqTZlHvSPJOyNMKsYuy6B2+S70M96ph/Yvf9W5de9fk=; b=zg1mC9GHfxWx82 xTCCDYhGnIN842e82IaVX8QjxAMU9oEcQa1hx6GHnllNf+ne64T9xTuzcoW7591JBsMItO7q8EjC2 rnc9wP7+VQ/6dVhlKRuYeFl1VqT3zlBW8nricF+SHCqH7CLXdinsHBW9eOsPyf7FVxo9OQPBCrve+ vlSgTGNMJ8e6SAds4jPMouDbi+V6oQt7sgNOeVi1p9C6Cjb/lmkq7TBWuVjVets1m2PUiNfmkQZJ2 Kj96G6XC57H8S2U5WPppmJuKrypdLTSxBaqBahangGuoHhVC+Ic5r/qihcLXXhpn9K4ZYpF+A1ZNa libVDgocrfDvgGME+WjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olBsE-0045D0-AC; Wed, 19 Oct 2022 16:24:54 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olBsA-00458X-RB for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 16:24:52 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9EDC061844; Wed, 19 Oct 2022 16:24:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36DE5C433D6; Wed, 19 Oct 2022 16:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666196689; bh=OHysm+Nli+SvZ2iZyvMMu+hT8N70B5GzA8H3xvijOIg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mmBCAu2s20SRms0d0qpPEyfmbMP22GEwn7GJqchil/K4jKT/eg79qP6t3UdH+gKqA qy6D5k/EmnXhpbZuK9ndMi6+30cTfhZ0SnNsFeO4XqB2qCeFfB+RlxGu1uJHFLVVnK OfLJC3tKLLuxsNLUNTydXbfiXW1sBzs2dYQmAOmoYyZ92u2oxsnRRMXf4PoZgPCNBB YJ/565mNPuxMCngPdPdR+OJrMn79Ugx49NyonCf0nWLLRH35CUevvl7oE1NOJ1PC/N xiqpa8S1mnGdiPJOKlvm36bvxH/8sJDCVxGvDKPVJw7aXatrpnyYh5ZJnHSuxhoEDy ui6zQQcolBpoA== Date: Wed, 19 Oct 2022 17:24:42 +0100 From: Will Deacon To: Quentin Perret Cc: kvmarm@lists.linux.dev, Sean Christopherson , Vincent Donnefort , Alexandru Elisei , Catalin Marinas , James Morse , Chao Peng , Suzuki K Poulose , Mark Rutland , Fuad Tabba , Oliver Upton , Marc Zyngier , kernel-team@android.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 20/25] KVM: arm64: Return guest memory from EL2 via dedicated teardown memcache Message-ID: <20221019162441.GA4499@willie-the-truck> References: <20221017115209.2099-1-will@kernel.org> <20221017115209.2099-21-will@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_092450_961103_73FD5C23 X-CRM114-Status: GOOD ( 12.44 ) 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 Wed, Oct 19, 2022 at 03:52:10PM +0000, Quentin Perret wrote: > On Monday 17 Oct 2022 at 12:52:04 (+0100), Will Deacon wrote: > > struct kvm_protected_vm { > > pkvm_handle_t handle; > > struct mutex vm_lock; > > - > > - struct { > > - void *pgd; > > - void *vm; > > - void *vcpus[KVM_MAX_VCPUS]; > > - } hyp_donations; > > + struct kvm_hyp_memcache teardown_mc; > > }; > > Argh, I guess that somewhat invalidates my previous comment. Oh well :-) Yup! There's a slight chicken-and-egg problem here, so we introduce explicit tracking of the donations in the host to start with, but then once we have the teardown memcache we can stop tracking things explicitly and remove the temporary pointers. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel