mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user