[PATCH v6 12/26] KVM: arm64: Add infrastructure to create and track pKVM instances at EL2

Marc Zyngier maz at kernel.org
Fri Nov 11 09:11:56 PST 2022


On Thu, 10 Nov 2022 19:02:45 +0000,
Will Deacon <will at kernel.org> wrote:
> 
> From: Fuad Tabba <tabba at google.com>
> 
> 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 <vdonnefort at google.com>
> Signed-off-by: Fuad Tabba <tabba at google.com>
> Co-developed-by: Will Deacon <will at kernel.org>
> Signed-off-by: Will Deacon <will at kernel.org>

[...]

> +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.



More information about the linux-arm-kernel mailing list