Re: [PATCH v4 15/25] KVM: arm64: Initialise hypervisor copies of host symbols unconditionally

Philippe Mathieu-Daudé
2022-10-17T20:33:50Z

On 17/10/22 13:51, Will Deacon wrote:
> The nVHE object at EL2 maintains its own copies of some host variables
> so that, when pKVM is enabled, the host cannot directly modify the
> hypervisor state. When running in normal nVHE mode, however, these
> variables are still mirrored at EL2 but are not initialised.
>
> Initialise the hypervisor symbols from the host copies regardless of
> pKVM, ensuring that any reference to this data at EL2 with normal nVHE
> will return a sensibly initialised value.
>
> Tested-by: Vincent Donnefort <vdonnefort@google.com>
> Signed-off-by: Will Deacon <will@kernel.org>
> ---
> arch/arm64/kvm/arm.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>