@@ -2757,6 +2757,29 @@ static bool kvm_supported_tlbi_s12_op(struct kvm_vcpu *vpcu, u32 instr)
2757
2757
return true;
2758
2758
}
2759
2759
2760
+ static bool handle_alle1is (struct kvm_vcpu * vcpu , struct sys_reg_params * p ,
2761
+ const struct sys_reg_desc * r )
2762
+ {
2763
+ u32 sys_encoding = sys_insn (p -> Op0 , p -> Op1 , p -> CRn , p -> CRm , p -> Op2 );
2764
+
2765
+ if (!kvm_supported_tlbi_s12_op (vcpu , sys_encoding )) {
2766
+ kvm_inject_undefined (vcpu );
2767
+ return false;
2768
+ }
2769
+
2770
+ write_lock (& vcpu -> kvm -> mmu_lock );
2771
+
2772
+ /*
2773
+ * Drop all shadow S2s, resulting in S1/S2 TLBIs for each of the
2774
+ * corresponding VMIDs.
2775
+ */
2776
+ kvm_nested_s2_unmap (vcpu -> kvm );
2777
+
2778
+ write_unlock (& vcpu -> kvm -> mmu_lock );
2779
+
2780
+ return true;
2781
+ }
2782
+
2760
2783
/* Only defined here as this is an internal "abstraction" */
2761
2784
union tlbi_info {
2762
2785
struct {
@@ -2880,7 +2903,9 @@ static struct sys_reg_desc sys_insn_descs[] = {
2880
2903
SYS_INSN (TLBI_VALE1 , handle_tlbi_el1 ),
2881
2904
SYS_INSN (TLBI_VAALE1 , handle_tlbi_el1 ),
2882
2905
2906
+ SYS_INSN (TLBI_ALLE1IS , handle_alle1is ),
2883
2907
SYS_INSN (TLBI_VMALLS12E1IS , handle_vmalls12e1is ),
2908
+ SYS_INSN (TLBI_ALLE1 , handle_alle1is ),
2884
2909
SYS_INSN (TLBI_VMALLS12E1 , handle_vmalls12e1is ),
2885
2910
};
2886
2911
0 commit comments