[PATCH 13/25] KVM: arm64: Always populate the trap configuration xarray

Joey Gouly joey.gouly at arm.com
Wed Jan 24 08:25:19 PST 2024


On Mon, Jan 22, 2024 at 08:18:40PM +0000, Marc Zyngier wrote:
> As we are going to rely more and more on the global xarray that
> contains the trap configuration, always populate it, even in the
> non-NV case.
> 
> Signed-off-by: Marc Zyngier <maz at kernel.org>
> ---
>  arch/arm64/kvm/sys_regs.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
> index 501de653beb5..77cd818c23b0 100644
> --- a/arch/arm64/kvm/sys_regs.c
> +++ b/arch/arm64/kvm/sys_regs.c
> @@ -3997,8 +3997,5 @@ int __init kvm_sys_reg_table_init(void)
>  	if (!first_idreg)
>  		return -EINVAL;
>  
> -	if (kvm_get_mode() == KVM_MODE_NV)
> -		return populate_nv_trap_config();
> -
> -	return 0;
> +	return populate_nv_trap_config();
>  }

Reviewed-by: Joey Gouly <joey.gouly at arm.com>

Thanks,
Joey



More information about the linux-arm-kernel mailing list