Skip to content

Enable kemu vector caching in l4h - #25

Merged
losfair merged 3 commits into
mainfrom
feat/kemu-vector-state
Oct 25, 2026
Merged

losfair merged 3 commits into
mainfrom
feat/kemu-vector-state

Conversation

@losfair

@losfair losfair commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Enable kemu's vector register cache in x86_64 l4h guests by reading interrupted user XMM0–7 from the seL4 user TCB. Preserve interrupt state, honor XSAVE's SSE init-state bit, and run kemu's return-to-user recovery with interrupts disabled as its API requires.

Pin kemu to latest merged main (3dbb1a0), including the vector cache, interrupted-SVC recovery, and subsequent audit fixes. Forward user #GP faults to kemu_user_gp() for tagged and high AArch64 addresses, and call the new kemu_syscall_rollback() hook so seccomp traps preserve the guest's original x0. Extend the guest smoke test with four threads using tagged SIMD loads/stores, checking live vectors in signal frames and after signal return.

Validation:

  • Linux 6.18.58 builds with 3dbb1a0. The normal KVM guest ABI and vector suites pass, including the new seccomp and semaphore ABI checks.
  • The forced-invalidation run (kemu.stress=1) passed the ABI suite but failed in kemu-vectors with a segmentation fault at address 0x40000040 (host IP 0x40166549). The cause is unresolved. Cache-disabled, one-vCPU, and interpreter checks pass.
  • The previous pin (0934c93, identical in source to tested 4119d6c) passed KVM guest ABI and tagged SIMD/thread/signal tests with forced invalidation, caching disabled, one vCPU, and interpreter execution. The formerly failing SVC reproducer passed five consecutive runs.
  • AArch64 QEMU oracle, strict compiler warnings for the vector test, shell syntax checks, and git diff --check passed.

Guest boots reuse the existing seL4/root-task artifacts with newly built guest kernels; this change does not require rebuilding host components.

@losfair losfair changed the title Prepare l4h for kemu vector caching Enable kemu vector caching in l4h Oct 25, 2026
@losfair
losfair merged commit a4f02a6 into main Oct 25, 2026
4 checks passed
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.

1 participant