KVM: arm64: Always populate the trap configuration xarray
authorMarc Zyngier <maz@kernel.org>
Wed, 14 Feb 2024 13:18:14 +0000 (13:18 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 19 Feb 2024 17:13:00 +0000 (17:13 +0000)
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.

Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240214131827.2856277-14-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/sys_regs.c

index 70043bd78cd447d25348d377b8801e233220042a..57f3d0c53fc3335acd3d79c573c5218eaa1415d5 100644 (file)
@@ -3995,8 +3995,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();
 }