Skip to contentSkip to conversation

KVM: arm64: Pass on SVE mapping failures

PATCH Applied James Clark 4 participants 4 messages Nov 12, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: arm64: Pass on SVE mapping failures

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")
---
 arch/arm64/kvm/hyp/nvhe/setup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/kvm/hyp/nvhe/setup.c +1 -2
index 8fec099c2775..cbdd18cd3f98 100644
@@ -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)
Signature · 1 line
2.34.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · James Clark

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")
	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Reviewed-by on v1 1/1
#2 lore raw
In reply to James Clark
Quoted 15 lines · James Clark

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")
---
 arch/arm64/kvm/hyp/nvhe/setup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/kvm/hyp/nvhe/setup.c +0 -0
index 8fec099c2775..cbdd18cd3f98 100644

arch/arm64/kvm/hyp/nvhe/setup.c static int recreate_hyp_mappings(phys_addr_t phys, unsigned long size, · line 150

Quoted 7 lines
arch/arm64/kvm/hyp/nvhe/setup.c +1 -2
@@ -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();
 }

Thanks,
/fuad

Quoted 5 lines
arch/arm64/kvm/hyp/nvhe/setup.c +0 -1
 static void update_nvhe_init_params(void)
--

2.34.1