ANDROID: KVM: arm64: Remove pkvm_set_max_sve_vq()

This function doesn't encapsulate that much code, and removing it makes
backporting SVE-fix patches easier and cleaner.

No functional change intended.

Bug: 411040189
Change-Id: I27b3fe467b1896a393751349b86771ddbb1bd62b
Signed-off-by: Fuad Tabba <tabba@google.com>
This commit is contained in:
Fuad Tabba
2025-05-12 16:17:40 +01:00
committed by Will Deacon
parent d653b32842
commit c3b505e78c
3 changed files with 4 additions and 8 deletions

View File

@@ -149,12 +149,6 @@ static inline bool pkvm_ipa_range_has_pvmfw(struct pkvm_hyp_vm *vm,
return ipa_end > pkvm->pvmfw_load_addr && ipa_start < pvmfw_load_end;
}
static inline void pkvm_set_max_sve_vq(void)
{
sve_cond_update_zcr_vq(sve_vq_from_vl(kvm_host_sve_max_vl) - 1,
SYS_ZCR_EL2);
}
int pkvm_load_pvmfw_pages(struct pkvm_hyp_vm *vm, u64 ipa, phys_addr_t phys,
u64 size);
void pkvm_poison_pvmfw_pages(void);

View File

@@ -696,7 +696,8 @@ static void fpsimd_host_restore(void)
struct kvm_host_sve_state *sve_state = get_host_sve_state(vcpu);
write_sysreg_el1(sve_state->zcr_el1, SYS_ZCR);
pkvm_set_max_sve_vq();
sve_cond_update_zcr_vq(sve_vq_from_vl(kvm_host_sve_max_vl) - 1,
SYS_ZCR_EL2);
__sve_restore_state(sve_state->sve_regs +
sve_ffr_offset(kvm_host_sve_max_vl),
&sve_state->fpsr);

View File

@@ -201,7 +201,8 @@ static void kvm_hyp_handle_fpsimd_host(struct kvm_vcpu *vcpu)
struct kvm_host_sve_state *sve_state = get_host_sve_state(vcpu);
sve_state->zcr_el1 = read_sysreg_el1(SYS_ZCR);
pkvm_set_max_sve_vq();
sve_cond_update_zcr_vq(sve_vq_from_vl(kvm_host_sve_max_vl) - 1,
SYS_ZCR_EL2);
__sve_save_state(sve_state->sve_regs +
sve_ffr_offset(kvm_host_sve_max_vl),
&sve_state->fpsr);