File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -708,8 +708,11 @@ Definition prefix (lvl : Level) := bv (level_length lvl).
708708Definition va_to_vpn {n : N} (va : bv 64) : bv n :=
709709 bv_extract 12 n va.
710710
711- Definition prefix_to_va {n : N} (p : bv n) : bv 64 :=
712- bv_concat 64 (bv_0 16) (bv_concat 48 p (bv_0 (48 - n))).
711+ Definition prefix_to_va {n : N} (is_upper : bool) (p : bv n) : bv 64 :=
712+ if is_upper then
713+ bv_concat 64 (bv_1 16) (bv_concat 48 p (bv_0 (48 - n)))
714+ else
715+ bv_concat 64 (bv_0 16) (bv_concat 48 p (bv_0 (48 - n))).
713716
714717Definition level_prefix {n : N} (va : bv n) (lvl : Level) : prefix lvl :=
715718 bv_extract (12 + 9 * (3 - lvl)) (9 * (lvl + 1)) va.
@@ -1195,7 +1198,7 @@ Module TLB.
11951198 | (ev, t) :: tl =>
11961199 match ev with
11971200 | Ev.Tlbi tlbi =>
1198- let va := prefix_to_va (Ctxt.va ctxt) in
1201+ let va := prefix_to_va (Entry.is_upper te) ( Ctxt.va ctxt) in
11991202 if decide (is_te_invalidated_by_tlbi tlbi tid ctxt te) then
12001203 mret (Some t)
12011204 else
You can’t perform that action at this time.
0 commit comments