Skip to content

refactor(VMPromising): Track translation snapshot ranges - #189

Open
febyeji wants to merge 1 commit into
mainfrom
vmp-snapshot-ranges
Open

refactor(VMPromising): Track translation snapshot ranges#189
febyeji wants to merge 1 commit into
mainfrom
vmp-snapshot-ranges

Conversation

@febyeji

@febyeji febyeji commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Fixes an ETS2 invalid-PTE case and adds snapshot optimisation. The motivating test is R+rel+lws-mmufault-po, which expects Forbidden in the VMSA-ETS2 kind, while the old ArchSem behavior could produce no-behaviour.

Initial page table:
  z |-> pa_z with [Valid = 0b0]   // z is invalid from the start

P1:
  STR y = 2                       // advances the write view
  STR z = 0                       // should read the invalid PTE and take a translation fault

P1 EL1 handler:
  LDR x                           // runs after the fault

Forbidden final condition:
  *pa_y = 2 /\ 1:X2 = 0

Before this patch, the invalid z fault candidate was only seen from the initial snapshot (trans_time = 0). After STR y = 2 advanced the write view, ETS2 rejected that stale 0 < vwr candidate, leaving no invalid translation candidate for STR z.

This patch:

  • collects ETS2 invalid fault candidates from snapshots after the prior read/write view;
  • preserves the existing valid-PTE translation behavior. AF=0 final descriptor handling is left for a separate fix.

Ref: Arm ARM DDI0487M.c B2.3 treats Translation Fault Effects as TLBUncacheable, and FEAT_ETS2 orders the implicit TTD read before such a fault, so the invalid PTE read must be selected from a sufficiently late snapshot.

@febyeji
febyeji force-pushed the vmp-snapshot-ranges branch 2 times, most recently from 8c61180 to b3d28ac Compare July 4, 2026 07:14
Comment thread ArchSemArm/VMPromising.v Outdated
@febyeji
febyeji force-pushed the vmp-snapshot-ranges branch 3 times, most recently from 730f197 to 0093769 Compare July 4, 2026 14:32
@febyeji
febyeji requested a review from tperami July 4, 2026 14:45
@febyeji
febyeji force-pushed the vmp-snapshot-ranges branch from 88422d0 to 290c5e5 Compare July 5, 2026 22:54
@tperami

tperami commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Whwwhsewb

@febyeji
febyeji force-pushed the vmp-snapshot-ranges branch from 290c5e5 to 3c25338 Compare July 17, 2026 21:31

@tperami tperami left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go after removing distinct check and fixing the other comment

Comment thread ArchSemArm/VMPromising.v Outdated
Comment thread ArchSemArm/VMPromising.v Outdated
Comment thread ArchSemArm/VMPromising.v Outdated
- Attach start/end ranges to unique VA TLB snapshots after construction.

- Carry translation start/end bounds in TransRes so selected translations retain their snapshot range metadata.

- Delay ETS3 fault timing within the selected translation snapshot range.
@febyeji
febyeji force-pushed the vmp-snapshot-ranges branch from 3c25338 to d7f0d84 Compare July 23, 2026 03:12
@febyeji
febyeji requested a review from tperami July 23, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants