Re: [PATCH v4 05/25] KVM: arm64: Unify identifiers used to distinguish host and hypervisor

Philippe Mathieu-Daudé
2022-10-17T20:22:51Z

On 17/10/22 13:51, Will Deacon wrote:
> The 'pkvm_component_id' enum type provides constants to refer to the
> host and the hypervisor, yet this information is duplicated by the
> 'pkvm_hyp_id' constant.
>
> Remove the definition of 'pkvm_hyp_id' and move the 'pkvm_component_id'
> type definition to 'mem_protect.h' so that it can be used outside of
> the memory protection code, for example when initialising the owner for
> hypervisor-owned pages.
>
> Tested-by: Vincent Donnefort <vdonnefort@google.com>
> Signed-off-by: Will Deacon <will@kernel.org>
> ---
> arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 6 +++++-
> arch/arm64/kvm/hyp/nvhe/mem_protect.c | 8 --------
> arch/arm64/kvm/hyp/nvhe/setup.c | 2 +-
> 3 files changed, 6 insertions(+), 10 deletions(-)

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