Login
Check-in [f02087e92d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge 4.2 (x86_64): A bare-metal test guest

Reviewed against docs/tasks/4.2.md; verdict merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KMXZyLk8eDgCjvQ9hX

Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f02087e92dc183b660c67fff72b874c88894fd135e422c3868cf3151e46a1781
User & Date: x86-1-glint 2026-11-09 18:03:26.089
Context
2026-11-09
18:04
Task 4.3b: The run loop, x86_64 (before 4.3a)

Claim: docs/tasks/4.3b.md has Glint grant hypervisor mode when SVM is present and native is granted. It enters the placed test guest with VMRUN under nested paging over 3.5's guest space, and decodes the first VM exit behind an architecture-neutral vCPU interface that 4.3a implements later. QEMU 11.1.2's svm.h, cpu.h and svm_helper.c stand in for AMD's manual, and the task asks that each offset cite its line.

Passage: docs/WORKFLOW.md, Handing out a slice, step 1; the Phase 4 order note for x86-1.

Demonstration: the exit codes and MSR named were read in QEMU's target/i386/svm.h (lines 114-142) and cpu.h line 571. glint-run's x86_64 CPU is EPYC, with svm=off under --no-virtualization (src/glint/run/runner.cr).

Size: one new task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KMXZyLk8eDgCjvQ9hX check-in: d5473c6e89 user: x86-1-glint tags: trunk

18:03
Merge 4.2 (x86_64): A bare-metal test guest

Reviewed against docs/tasks/4.2.md; verdict merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KMXZyLk8eDgCjvQ9hX check-in: f02087e92d user: x86-1-glint tags: trunk

18:03
4.2 (x86_64): A bare-metal test guest

Claim: guest/test/ is a tiny guest that knows no Linux. It writes 'test guest: started' through GLINT_CONSOLE_WRITE, asks PSCI VERSION and writes the answer in hex, then calls SYSTEM_OFF; if that returns, it says so and halts. bin/glint-build test-guest x86_64 builds it as Glint's images are built, with the same crt0 PE32+ header (its Glint entry left out under GLINT_TEST_GUEST) and boot/efi.lds, into build/x86_64/guest/test.efi. guest/test/README.md fixes the guest ABI for both machines, for 4.3b and 4.4: entry state, HVC #0 or VMMCALL with SMCCC numbering, and the three functions.

Passage: slice 4.2: 'A guest this small isolates Glint's behaviour from a large guest's, so any failure in this phase points at Glint.'

Demonstration: crystal spec spec/test_guest_build_spec.cr spec/glint_build_spec.cr spec/efi_image_spec.cr: 9 examples, 0 failures, 2 pending (aarch64). The spec checks that 3.6's parser accepts the image and that llvm-objdump shows vmmcall (0f 01 d9) after each of the three IDs (0x84000000, 0x86000001, 0x84000008). On x86-1, bin/glint-run x86_64 --guest build/x86_64/guest/test.efi places it: 'Guest image: guest.efi, 16 KiB at 0x200000, entry 0x201000, 0 relocations'. It is position-independent, so it has no DIR64 entries. Nothing enters it yet; that is 4.3b. Glint's own image is byte-for-byte unchanged. The reviewer checked guest_call's register moves against the ABI (rax id, rbx address, rcx length, rdx third). Codex wrote it from docs/tasks/4.2.md; no reviewer changes. SMCCC owner 6 remains unverified, as the README says.

Size: 136 non-spec lines added, 1 removed; guest image 12,800 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KMXZyLk8eDgCjvQ9hX Leaf check-in: b053f3c8a6 user: x86-1-glint tags: slice/4.2-x86_64

17:58
Task 4.2 (x86_64): A bare-metal test guest

Claim: docs/tasks/4.2.md has guest/test/ build a tiny PE32+ guest for x86_64 that writes text through a Glint call, asks PSCI for its version, and powers off. Its README fixes the guest ABI for both machines, for 4.3b and 4.4 to implement: entry state, HVC or VMMCALL with SMCCC numbering, PSCI VERSION and SYSTEM_OFF, and GLINT_CONSOLE_WRITE 0x86000001.

Passage: docs/WORKFLOW.md, Handing out a slice, step 1.

Demonstration: the PSCI IDs were read in U-Boot 2026.07 include/linux/psci.h (0x84000000, 0x84000008). SMCCC owner 6 for vendor hypervisor services is not in the workspace's headers, and the task marks it unverified.

Size: one new task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KMXZyLk8eDgCjvQ9hX check-in: 96f8902075 user: x86-1-glint tags: trunk

Changes
Unified Diff Side-by-Side Diff Patch
Changes to boot/crt0.S.
Added guest/test/README.md.
Added guest/test/call_x86_64.S.
Added guest/test/main.cr.
Added spec/test_guest_build_spec.cr.
Changes to tools/glint_build.cr.