@@ -758,6 +758,10 @@ static __u64 el2_regs[] = {
758758 SYS_REG (VSESR_EL2 ),
759759};
760760
761+ static __u64 el2_e2h0_regs [] = {
762+ /* Empty */
763+ };
764+
761765#define BASE_SUBLIST \
762766 { "base", .regs = base_regs, .regs_n = ARRAY_SIZE(base_regs), }
763767#define VREGS_SUBLIST \
@@ -792,6 +796,15 @@ static __u64 el2_regs[] = {
792796 .regs = el2_regs, \
793797 .regs_n = ARRAY_SIZE(el2_regs), \
794798 }
799+ #define EL2_E2H0_SUBLIST \
800+ EL2_SUBLIST, \
801+ { \
802+ .name = "EL2 E2H0", \
803+ .capability = KVM_CAP_ARM_EL2_E2H0, \
804+ .feature = KVM_ARM_VCPU_HAS_EL2_E2H0, \
805+ .regs = el2_e2h0_regs, \
806+ .regs_n = ARRAY_SIZE(el2_e2h0_regs), \
807+ }
795808
796809static struct vcpu_reg_list vregs_config = {
797810 .sublists = {
@@ -900,6 +913,65 @@ static struct vcpu_reg_list el2_pauth_pmu_config = {
900913 },
901914};
902915
916+ static struct vcpu_reg_list el2_e2h0_vregs_config = {
917+ .sublists = {
918+ BASE_SUBLIST ,
919+ EL2_E2H0_SUBLIST ,
920+ VREGS_SUBLIST ,
921+ {0 },
922+ },
923+ };
924+
925+ static struct vcpu_reg_list el2_e2h0_vregs_pmu_config = {
926+ .sublists = {
927+ BASE_SUBLIST ,
928+ EL2_E2H0_SUBLIST ,
929+ VREGS_SUBLIST ,
930+ PMU_SUBLIST ,
931+ {0 },
932+ },
933+ };
934+
935+ static struct vcpu_reg_list el2_e2h0_sve_config = {
936+ .sublists = {
937+ BASE_SUBLIST ,
938+ EL2_E2H0_SUBLIST ,
939+ SVE_SUBLIST ,
940+ {0 },
941+ },
942+ };
943+
944+ static struct vcpu_reg_list el2_e2h0_sve_pmu_config = {
945+ .sublists = {
946+ BASE_SUBLIST ,
947+ EL2_E2H0_SUBLIST ,
948+ SVE_SUBLIST ,
949+ PMU_SUBLIST ,
950+ {0 },
951+ },
952+ };
953+
954+ static struct vcpu_reg_list el2_e2h0_pauth_config = {
955+ .sublists = {
956+ BASE_SUBLIST ,
957+ EL2_E2H0_SUBLIST ,
958+ VREGS_SUBLIST ,
959+ PAUTH_SUBLIST ,
960+ {0 },
961+ },
962+ };
963+
964+ static struct vcpu_reg_list el2_e2h0_pauth_pmu_config = {
965+ .sublists = {
966+ BASE_SUBLIST ,
967+ EL2_E2H0_SUBLIST ,
968+ VREGS_SUBLIST ,
969+ PAUTH_SUBLIST ,
970+ PMU_SUBLIST ,
971+ {0 },
972+ },
973+ };
974+
903975struct vcpu_reg_list * vcpu_configs [] = {
904976 & vregs_config ,
905977 & vregs_pmu_config ,
@@ -914,5 +986,12 @@ struct vcpu_reg_list *vcpu_configs[] = {
914986 & el2_sve_pmu_config ,
915987 & el2_pauth_config ,
916988 & el2_pauth_pmu_config ,
989+
990+ & el2_e2h0_vregs_config ,
991+ & el2_e2h0_vregs_pmu_config ,
992+ & el2_e2h0_sve_config ,
993+ & el2_e2h0_sve_pmu_config ,
994+ & el2_e2h0_pauth_config ,
995+ & el2_e2h0_pauth_pmu_config ,
917996};
918997int vcpu_configs_n = ARRAY_SIZE (vcpu_configs );
0 commit comments