@@ -440,6 +440,8 @@ struct mmu_config {
440
440
u64 tcr2 ;
441
441
u64 pir ;
442
442
u64 pire0 ;
443
+ u64 por_el0 ;
444
+ u64 por_el1 ;
443
445
u64 sctlr ;
444
446
u64 vttbr ;
445
447
u64 vtcr ;
@@ -458,6 +460,10 @@ static void __mmu_config_save(struct mmu_config *config)
458
460
config -> pir = read_sysreg_el1 (SYS_PIR );
459
461
config -> pire0 = read_sysreg_el1 (SYS_PIRE0 );
460
462
}
463
+ if (system_supports_poe ()) {
464
+ config -> por_el1 = read_sysreg_el1 (SYS_POR );
465
+ config -> por_el0 = read_sysreg_s (SYS_POR_EL0 );
466
+ }
461
467
}
462
468
config -> sctlr = read_sysreg_el1 (SYS_SCTLR );
463
469
config -> vttbr = read_sysreg (vttbr_el2 );
@@ -485,6 +491,10 @@ static void __mmu_config_restore(struct mmu_config *config)
485
491
write_sysreg_el1 (config -> pir , SYS_PIR );
486
492
write_sysreg_el1 (config -> pire0 , SYS_PIRE0 );
487
493
}
494
+ if (system_supports_poe ()) {
495
+ write_sysreg_el1 (config -> por_el1 , SYS_POR );
496
+ write_sysreg_s (config -> por_el0 , SYS_POR_EL0 );
497
+ }
488
498
}
489
499
write_sysreg_el1 (config -> sctlr , SYS_SCTLR );
490
500
write_sysreg (config -> vttbr , vttbr_el2 );
@@ -1105,6 +1115,10 @@ static u64 __kvm_at_s1e01_fast(struct kvm_vcpu *vcpu, u32 op, u64 vaddr)
1105
1115
write_sysreg_el1 (vcpu_read_sys_reg (vcpu , PIR_EL1 ), SYS_PIR );
1106
1116
write_sysreg_el1 (vcpu_read_sys_reg (vcpu , PIRE0_EL1 ), SYS_PIRE0 );
1107
1117
}
1118
+ if (kvm_has_s1poe (vcpu -> kvm )) {
1119
+ write_sysreg_el1 (vcpu_read_sys_reg (vcpu , POR_EL1 ), SYS_POR );
1120
+ write_sysreg_s (vcpu_read_sys_reg (vcpu , POR_EL0 ), SYS_POR_EL0 );
1121
+ }
1108
1122
}
1109
1123
write_sysreg_el1 (vcpu_read_sys_reg (vcpu , SCTLR_EL1 ), SYS_SCTLR );
1110
1124
__load_stage2 (mmu , mmu -> arch );
0 commit comments