KVM: arm64: Pass on SVE mapping failures
authorJames Clark <james.clark@linaro.org>
Tue, 12 Nov 2024 10:56:03 +0000 (10:56 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Tue, 12 Nov 2024 19:04:39 +0000 (11:04 -0800)
This function can fail but its return value isn't passed onto the
caller. Presumably this could result in a broken state.

Fixes: 66d5b53e20a6 ("KVM: arm64: Allocate memory mapped at hyp for host sve state in pKVM")
Signed-off-by: James Clark <james.clark@linaro.org>
Reviewed-by: Fuad Tabba <tabba@google.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20241112105604.795809-1-james.clark@linaro.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/hyp/nvhe/setup.c

index 8fec099..cbdd18c 100644 (file)
@@ -146,8 +146,7 @@ static int recreate_hyp_mappings(phys_addr_t phys, unsigned long size,
                        return ret;
        }
 
-       pkvm_create_host_sve_mappings();
-       return 0;
+       return pkvm_create_host_sve_mappings();
 }
 
 static void update_nvhe_init_params(void)