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 @@ -719,8 +719,11 @@ Definition prefix (lvl : Level) := bv (level_length lvl).
719719Definition va_to_vpn {n : N} (va : bv 64) : bv n :=
720720 bv_extract 12 n va.
721721
722- Definition prefix_to_va {n : N} (p : bv n) : bv 64 :=
723- bv_concat 64 (bv_0 16) (bv_concat 48 p (bv_0 (48 - n))).
722+ Definition prefix_to_va {n : N} (is_upper : bool) (p : bv n) : bv 64 :=
723+ if is_upper then
724+ bv_concat 64 (bv_1 16) (bv_concat 48 p (bv_0 (48 - n)))
725+ else
726+ bv_concat 64 (bv_0 16) (bv_concat 48 p (bv_0 (48 - n))).
724727
725728Definition level_prefix {n : N} (va : bv n) (lvl : Level) : prefix lvl :=
726729 bv_extract (12 + 9 * (3 - lvl)) (9 * (lvl + 1)) va.
@@ -1204,7 +1207,7 @@ Module TLB.
12041207 | (ev, t) :: tl =>
12051208 match ev with
12061209 | Ev.Tlbi tlbi =>
1207- let va := prefix_to_va (Ctxt.va ctxt) in
1210+ let va := prefix_to_va (Entry.is_upper te) ( Ctxt.va ctxt) in
12081211 if decide (is_te_invalidated_by_tlbi tlbi tid ctxt te) then
12091212 mret (Some t)
12101213 else
You can’t perform that action at this time.
0 commit comments