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 522CBC433FE for ; Wed, 19 Oct 2022 12:47:02 +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=hli4/Ou6lICC4f2Z2uRtY+g9v3pHVGdvXyR6O/+G9K8=; b=bMhBKL2CIwZsHe FROBFJfIUKUMJ8eQ5PHkuCr1agXTf8DGnCH/3XbXkO7Asb/ahpuWQuGX1JlCnDasEc8Xfz0KqtOLj wG8RvPweq0tSZ4aax2+Hqy0I7oDwJXo5ph5JSwBhRI75B+q70eUWjPNQfnJikLcnGcKaCwI5UDvHb aMrUxCQD8j1xZoa+cvfXhTLWYZVdRCj0yvTXkXlzCnkbqUTZoIMdGd5L01g3EeulAGnmmqNISyWuH 8McE9+Kol8iSxJtMGc7f8wvsydz2wpgwJtpITixAu+EiryZK7SRJgks9hY0GdHcxmgQuohJQIvQ4T AzFhtvbL9EW0M7zGKLdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol8SP-001esq-Nj; Wed, 19 Oct 2022 12:46:01 +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 1ol8SM-001eiL-Ij for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 12:45:59 +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 B7C31617E7; Wed, 19 Oct 2022 12:45:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3115AC433C1; Wed, 19 Oct 2022 12:45:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666183557; bh=Obz1Eb/Z1rSTVB9Z76pArj6atKQy6kIjY4hqiJTSRN8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RkiBykevhVkmTsqyfTzSmxmpZk5zDiQoxov0nhLJFVZ3c+l+SFBpCnk6nAGBoAZ+r b0XAJgDCjOw63BLWbG9NOiy01bZeMHUX7Xo0rxHT9p7mswzqAfSfOUuzgFqRiS5s8A QU1yrVdLg5fz6GQK5ABx4nduS5pX1OyjUSMzWFL+CxoibJ0euIbcoDKRYtyeTJJtrS z9NPxJZCmcQsmyAkK9AcT61Mr13cchMvt4LruB7efjoZf8NrFuFKuweD7H3miMBY9K ex8zHjquIYRq8PioeqP5UYjAlQVY7RVLkieDnJS12PuNRgxmwmDKTeimyWcuvhCXzW 94+yYKa3d5UgQ== Date: Wed, 19 Oct 2022 13:45:50 +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 12/25] KVM: arm64: Add infrastructure to create and track pKVM instances at EL2 Message-ID: <20221019124549.GC4220@willie-the-truck> References: <20221017115209.2099-1-will@kernel.org> <20221017115209.2099-13-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_054558_686865_2611801D X-CRM114-Status: GOOD ( 17.49 ) 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, Oct 18, 2022 at 04:21:11PM +0000, Quentin Perret wrote: > On Monday 17 Oct 2022 at 12:51:56 (+0100), Will Deacon wrote: > > +struct pkvm_hyp_vm { > > + struct kvm kvm; > > + > > + /* Backpointer to the host's (untrusted) KVM instance. */ > > + struct kvm *host_kvm; > > + > > + /* > > + * Total amount of memory donated by the host for maintaining > > + * this 'struct pkvm_hyp_vm' in the hypervisor. > > + */ > > + size_t donated_memory_size; > > I think you could get rid of that member. IIUC, all you need to > re-compute it in the teardown path is the number of created vCPUs on > the host, which we should have safely stored in > pkvm_hyp_vm::kvm::created_vcpus. Oh, well spotted! I've dropped this as you have suggested. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel