File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -868,6 +868,9 @@ struct kvm_vcpu_arch {
868
868
869
869
#define vcpu_sve_max_vq (vcpu ) sve_vq_from_vl((vcpu)->arch.sve_max_vl)
870
870
871
+ #define vcpu_sve_zcr_elx (vcpu ) \
872
+ (unlikely(is_hyp_ctxt(vcpu)) ? ZCR_EL2 : ZCR_EL1)
873
+
871
874
#define vcpu_sve_state_size (vcpu ) ({ \
872
875
size_t __size_ret; \
873
876
unsigned int __vcpu_vq; \
Original file line number Diff line number Diff line change @@ -318,7 +318,8 @@ static inline void __hyp_sve_restore_guest(struct kvm_vcpu *vcpu)
318
318
__sve_restore_state (vcpu_sve_pffr (vcpu ),
319
319
& vcpu -> arch .ctxt .fp_regs .fpsr ,
320
320
true);
321
- write_sysreg_el1 (__vcpu_sys_reg (vcpu , ZCR_EL1 ), SYS_ZCR );
321
+
322
+ write_sysreg_el1 (__vcpu_sys_reg (vcpu , vcpu_sve_zcr_elx (vcpu )), SYS_ZCR );
322
323
}
323
324
324
325
static inline void __hyp_sve_save_host (void )
You can’t perform that action at this time.
0 commit comments