@@ -556,13 +556,13 @@ static __always_inline void kvm_incr_pc(struct kvm_vcpu *vcpu)
556556 ({ \
557557 u64 cptr = 0; \
558558 \
559- if ((set) & CPACR_ELx_FPEN ) \
559+ if ((set) & CPACR_EL1_FPEN ) \
560560 cptr |= CPTR_EL2_TFP; \
561- if ((set) & CPACR_ELx_ZEN ) \
561+ if ((set) & CPACR_EL1_ZEN ) \
562562 cptr |= CPTR_EL2_TZ; \
563- if ((set) & CPACR_ELx_SMEN ) \
563+ if ((set) & CPACR_EL1_SMEN ) \
564564 cptr |= CPTR_EL2_TSM; \
565- if ((clr) & CPACR_ELx_TTA ) \
565+ if ((clr) & CPACR_EL1_TTA ) \
566566 cptr |= CPTR_EL2_TTA; \
567567 if ((clr) & CPTR_EL2_TAM) \
568568 cptr |= CPTR_EL2_TAM; \
@@ -576,13 +576,13 @@ static __always_inline void kvm_incr_pc(struct kvm_vcpu *vcpu)
576576 ({ \
577577 u64 cptr = 0; \
578578 \
579- if ((clr) & CPACR_ELx_FPEN ) \
579+ if ((clr) & CPACR_EL1_FPEN ) \
580580 cptr |= CPTR_EL2_TFP; \
581- if ((clr) & CPACR_ELx_ZEN ) \
581+ if ((clr) & CPACR_EL1_ZEN ) \
582582 cptr |= CPTR_EL2_TZ; \
583- if ((clr) & CPACR_ELx_SMEN ) \
583+ if ((clr) & CPACR_EL1_SMEN ) \
584584 cptr |= CPTR_EL2_TSM; \
585- if ((set) & CPACR_ELx_TTA ) \
585+ if ((set) & CPACR_EL1_TTA ) \
586586 cptr |= CPTR_EL2_TTA; \
587587 if ((set) & CPTR_EL2_TAM) \
588588 cptr |= CPTR_EL2_TAM; \
@@ -595,13 +595,13 @@ static __always_inline void kvm_incr_pc(struct kvm_vcpu *vcpu)
595595#define cpacr_clear_set (clr , set ) \
596596 do { \
597597 BUILD_BUG_ON((set) & CPTR_VHE_EL2_RES0); \
598- BUILD_BUG_ON((clr) & CPACR_ELx_E0POE ); \
599- __build_check_all_or_none((clr), CPACR_ELx_FPEN ); \
600- __build_check_all_or_none((set), CPACR_ELx_FPEN ); \
601- __build_check_all_or_none((clr), CPACR_ELx_ZEN ); \
602- __build_check_all_or_none((set), CPACR_ELx_ZEN ); \
603- __build_check_all_or_none((clr), CPACR_ELx_SMEN ); \
604- __build_check_all_or_none((set), CPACR_ELx_SMEN ); \
598+ BUILD_BUG_ON((clr) & CPACR_EL1_E0POE ); \
599+ __build_check_all_or_none((clr), CPACR_EL1_FPEN ); \
600+ __build_check_all_or_none((set), CPACR_EL1_FPEN ); \
601+ __build_check_all_or_none((clr), CPACR_EL1_ZEN ); \
602+ __build_check_all_or_none((set), CPACR_EL1_ZEN ); \
603+ __build_check_all_or_none((clr), CPACR_EL1_SMEN ); \
604+ __build_check_all_or_none((set), CPACR_EL1_SMEN ); \
605605 \
606606 if (has_vhe() || has_hvhe()) \
607607 sysreg_clear_set(cpacr_el1, clr, set); \
@@ -624,16 +624,16 @@ static __always_inline u64 kvm_get_reset_cptr_el2(struct kvm_vcpu *vcpu)
624624 u64 val ;
625625
626626 if (has_vhe ()) {
627- val = (CPACR_ELx_FPEN | CPACR_EL1_ZEN_EL1EN );
627+ val = (CPACR_EL1_FPEN | CPACR_EL1_ZEN_EL1EN );
628628 if (cpus_have_final_cap (ARM64_SME ))
629629 val |= CPACR_EL1_SMEN_EL1EN ;
630630 } else if (has_hvhe ()) {
631- val = CPACR_ELx_FPEN ;
631+ val = CPACR_EL1_FPEN ;
632632
633633 if (!vcpu_has_sve (vcpu ) || !guest_owns_fp_regs ())
634- val |= CPACR_ELx_ZEN ;
634+ val |= CPACR_EL1_ZEN ;
635635 if (cpus_have_final_cap (ARM64_SME ))
636- val |= CPACR_ELx_SMEN ;
636+ val |= CPACR_EL1_SMEN ;
637637 } else {
638638 val = CPTR_NVHE_EL2_RES1 ;
639639
@@ -685,7 +685,7 @@ static inline bool ____cptr_xen_trap_enabled(const struct kvm_vcpu *vcpu,
685685#define __guest_hyp_cptr_xen_trap_enabled (vcpu , xen ) \
686686 (!vcpu_has_nv(vcpu) ? false : \
687687 ____cptr_xen_trap_enabled(vcpu, \
688- SYS_FIELD_GET(CPACR_ELx , xen, \
688+ SYS_FIELD_GET(CPACR_EL1 , xen, \
689689 vcpu_sanitised_cptr_el2(vcpu))))
690690
691691static inline bool guest_hyp_fpsimd_traps_enabled (const struct kvm_vcpu * vcpu )
0 commit comments