Skip to content

[test do not merge] snapshot golden tests#1446

Draft
ludfjig wants to merge 7 commits into
hyperlight-dev:mainfrom
ludfjig:snapshot-golden-tests
Draft

[test do not merge] snapshot golden tests#1446
ludfjig wants to merge 7 commits into
hyperlight-dev:mainfrom
ludfjig:snapshot-golden-tests

Conversation

@ludfjig

@ludfjig ludfjig commented May 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@ludfjig ludfjig added regen-goldens Regenerate snapshot golden fixtures and removed regen-goldens Regenerate snapshot golden fixtures labels May 8, 2026
@ludfjig ludfjig force-pushed the snapshot-golden-tests branch 2 times, most recently from db6f7fb to b5a0b52 Compare June 8, 2026 23:34
ludfjig added 7 commits June 17, 2026 13:54
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
A guest exception handler runs on the IST1 exception stack. When such a
handler writes a copy-on-write page (present and read-only after a
snapshot), the first write raises a page fault. Routing that page fault
through the same IST1 stack makes the CPU reset RSP to the top of IST1
and push the fault frame over the live handler frame, clobbering it. The
handler then returns to a garbage RIP and the guest aborts.

Deliver page faults on their own IST2 stack so a nested fault leaves the
outer handler frame intact. The page-fault stack occupies the second of
the two scratch pages reserved at the top of the region, so snapshot
sizes and golden hashes are undisturbed.

Add a deterministic regression test that installs a handler which writes
a never-touched copy-on-write page, forcing a nested fault on every run.

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
@ludfjig ludfjig force-pushed the snapshot-golden-tests branch from b5a0b52 to cc3e7f8 Compare June 18, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

regen-goldens Regenerate snapshot golden fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant