From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E70202F2B for ; Fri, 11 Nov 2022 17:11:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B0BBC433D6; Fri, 11 Nov 2022 17:11:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668186719; bh=TdxutI1XV0aUY/REXRLlQEMl+uODGYf9T0Ad8c8nxgU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VDxHwGYqe8S/l8FYc1joK4hEgM/w1GVuLyVFG86I2OrVqmXmvDpsl7vl58cEbdgYk 8Ky9h/+IOCGm6oa88sRVIUJlyqpG1A44pYR/oOmfeEPJIClelvjxT26ESvemwrmIJT YV+h6OLAIPa/PMDZ33VMVezJkWQ4opqwq8Khu8SwGl8xFxR/KGvtwazYQWn+G6M2pI j+8Mqpz6R3MapLXW26Ga9N0ef/65S77oWZcjN0nf0PZzcNgTPbcDca5aaXHBTS+gBU NPMBK8e4+GnHyEQgLvxr8OO+NnJGbkUGjrvdaSmBc772h1HVci+ilFndHSFz5PmKb/ +17Nz2OV2lSbQ== 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 1otXZN-005Tbb-7n; Fri, 11 Nov 2022 17:11:57 +0000 Date: Fri, 11 Nov 2022 17:11:56 +0000 Message-ID: <86cz9tpg9v.wl-maz@kernel.org> From: Marc Zyngier To: Will Deacon Cc: kvmarm@lists.linux.dev, Sean Christopherson , Vincent Donnefort , Alexandru Elisei , Catalin Marinas , Philippe =?UTF-8?B?TWF0aGlldS1EYXVkw6k=?= , James Morse , Chao Peng , Quentin Perret , Suzuki K Poulose , Mark Rutland , Fuad Tabba , Oliver Upton , kernel-team@android.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 12/26] KVM: arm64: Add infrastructure to create and track pKVM instances at EL2 In-Reply-To: <20221110190259.26861-13-will@kernel.org> References: <20221110190259.26861-1-will@kernel.org> <20221110190259.26861-13-will@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/27.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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: will@kernel.org, kvmarm@lists.linux.dev, seanjc@google.com, vdonnefort@google.com, alexandru.elisei@arm.com, catalin.marinas@arm.com, philmd@linaro.org, james.morse@arm.com, chao.p.peng@linux.intel.com, qperret@google.com, suzuki.poulose@arm.com, mark.rutland@arm.com, tabba@google.com, oliver.upton@linux.dev, kernel-team@android.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Thu, 10 Nov 2022 19:02:45 +0000, Will Deacon wrote: > > From: Fuad Tabba > > Introduce a global table (and lock) to track pKVM instances at EL2, and > provide hypercalls that can be used by the untrusted host to create and > destroy pKVM VMs and their vCPUs. pKVM VM/vCPU state is directly > accessible only by the trusted hypervisor (EL2). > > Each pKVM VM is directly associated with an untrusted host KVM instance, > and is referenced by the host using an opaque handle. Future patches > will provide hypercalls to allow the host to initialize/set/get pKVM > VM/vCPU state using the opaque handle. > > Tested-by: Vincent Donnefort > Signed-off-by: Fuad Tabba > Co-developed-by: Will Deacon > Signed-off-by: Will Deacon [...] > +static void unmap_donated_memory_noclear(void *va, size_t size) > +{ > + if (!va) > + return; > + > + __unmap_donated_memory(va, size); > +} This triggers a warning that persist until patch #19 (unused static function) and breaks my build (I've enabled CONFIG_WERROR). I'm going to stick a __maybe_unused there, and drop it once it is used... M. -- Without deviation from the norm, progress is not possible.