Skip to content

Commit 457f593

Browse files
willamhouclaudehappy-otter
committed
docs: add pKVM explainer (zhihu), dev.to post, and colored demo assets
- docs/zhihu/pkvm-explainer.md: pKVM popular science article for Zhihu, reviewed for technical accuracy (Stage-2/VHE, IOMMU dependency, SESIP vs CC distinction, balanced Qualcomm/Gunyah coverage) - docs/devto-post.md: dev.to formatted blog with front matter and tags - docs/demo.{cast,gif,mp4}: colored terminal recording (asciinema + agg) showing test suite execution with ANSI color differentiation Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
1 parent 897fa62 commit 457f593

5 files changed

Lines changed: 460 additions & 29 deletions

File tree

‎docs/demo.cast‎

Lines changed: 53 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,53 @@
1-
{"version": 2, "width": 80, "height": 35, "timestamp": 1775737095, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
2-
[0.006028, "o", "$ make run\r\n\r\n"]
3-
[0.309182, "o", "[BOOT] Hypervisor started at EL2\r\n[DTB] QEMU virt: UART=0x09000000 GIC=0x08000000 RAM=1GB CPUs=4\r\n[GIC] GICv3 initialized (4 List Registers)\r\n[HEAP] 16MB at 0x41000000\r\n\r\n"]
4-
[0.811146, "o", " ✓ test_dtb\r\n"]
5-
[0.863587, "o", " ✓ test_allocator\r\n"]
6-
[0.916387, "o", " ✓ test_heap\r\n"]
7-
[0.967847, "o", " ✓ test_dynamic_pagetable\r\n"]
8-
[1.019751, "o", " ✓ test_multi_vcpu\r\n"]
9-
[1.071962, "o", " ✓ test_scheduler\r\n"]
10-
[1.124829, "o", " ✓ test_mmio\r\n"]
11-
[1.177722, "o", " ✓ test_gicv3_virt\r\n"]
12-
[1.229842, "o", " ✓ test_decode\r\n"]
13-
[1.282381, "o", " ✓ test_gicd\r\n"]
14-
[1.335129, "o", " ✓ test_gicr\r\n"]
15-
[1.387774, "o", " ✓ test_global\r\n"]
16-
[1.43964, "o", " ✓ test_page_ownership\r\n"]
17-
[1.492377, "o", " ✓ test_pl031\r\n"]
18-
[1.544983, "o", " ✓ test_vswitch\r\n"]
19-
[1.597544, "o", " ✓ test_virtio_net\r\n"]
20-
[1.649602, "o", "\r\n === test_ffa (55 assertions) ===\r\n"]
21-
[1.852309, "o", " FFA_VERSION, ID_GET, FEATURES, RXTX, messaging,\r\n MEM_SHARE, MEM_LEND, RECLAIM, descriptors, VM-to-VM,\r\n notifications, MSG_SEND2, FRAG_RX, CONSOLE_LOG\r\n"]
22-
[1.852527, "o", " ✓ test_ffa\r\n\r\n === test_spmc_handler (182 assertions) ===\r\n"]
23-
[2.055467, "o", " DIRECT_REQ echo, multi-SP routing, MEM_SHARE lifecycle,\r\n SP-to-SP relay, cycle detection, MEM_DONATE,\r\n cross-SP isolation, stress tests\r\n ✓ test_spmc_handler\r\n\r\n"]
24-
[2.055557, "o", " === test_sp_context (58 assertions) ===\r\n ✓ test_sp_context\r\n\r\n"]
25-
[2.358092, "o", "============================\r\n 457 passed, 0 failed\r\n============================\r\n\r\n$ make run-pkvm-ffa-test # (requires TF-A + AOSP kernel)\r\n"]
26-
[2.860792, "o", "\r\n [ffa_test] SP1 DIRECT_REQ_32 echo ............. PASS\r\n"]
27-
[2.861043, "o", " [ffa_test] SP1 DIRECT_REQ_64 echo ............. PASS\r\n [ffa_test] SP1 MEM_SHARE lifecycle ............ PASS\r\n [ffa_test] SP2 DIRECT_REQ_64 echo ............. PASS\r\n"]
28-
[2.861081, "o", " [ffa_test] SP2 MEM_SHARE lifecycle ............ PASS\r\n [ffa_test] SP3 relay SP1→SP3→SP1 .............. PASS\r\n [ffa_test] SP3 relay cycle detection .......... PASS\r\n [ffa_test] SP-to-SP MEM_SHARE SP1→SP2 ........ PASS\r\n [ffa_test] SP-to-SP MEM_RECLAIM ............... PASS\r\n ... (35 total)\r\n\r\n"]
29-
[3.164393, "o", " Result: 35/35 PASS\r\n\r\n Full stack: Linux → pKVM (NS-EL2) → TF-A (EL3) → SPMC (S-EL2) → SPs (S-EL1)\r\n"]
1+
{"version": 2, "width": 80, "height": 40, "timestamp": 1775737232, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
2+
[0.005946, "o", "\u001b[0;36m\u001b[1m$ make run\u001b[0m\r\n\r\n"]
3+
[0.509024, "o", "\u001b[1;34m[BOOT]\u001b[0m Hypervisor started at \u001b[1;37mEL2\u001b[0m\r\n\u001b[1;34m[DTB]\u001b[0m QEMU virt: UART=\u001b[0;90m0x09000000\u001b[0m GIC=\u001b[0;90m0x08000000\u001b[0m RAM=\u001b[1;37m1GB\u001b[0m CPUs=\u001b[1;37m4\u001b[0m\r\n\u001b[1;34m[GIC]\u001b[0m GICv3 initialized (4 List Registers, EOImode=1)\r\n\u001b[1;34m[HEAP]\u001b[0m 16MB BumpAllocator at \u001b[0;90m0x41000000\u001b[0m\r\n\r\n"]
4+
[0.910669, "o", "\u001b[1;33m\u001b[1m━━━ Running 34 test suites ━━━\u001b[0m\r\n\r\n"]
5+
[1.213374, "o", " \u001b[0;32m✓\u001b[0m test_dtb\r\n"]
6+
[1.275526, "o", " \u001b[0;32m✓\u001b[0m test_allocator\r\n"]
7+
[1.337732, "o", " \u001b[0;32m✓\u001b[0m test_heap\r\n"]
8+
[1.399857, "o", " \u001b[0;32m✓\u001b[0m test_dynamic_pagetable\r\n"]
9+
[1.461662, "o", "\r\n"]
10+
[1.461853, "o", " \u001b[0;32m✓\u001b[0m test_multi_vcpu\r\n"]
11+
[1.524159, "o", " \u001b[0;32m✓\u001b[0m test_scheduler\r\n"]
12+
[1.586308, "o", " \u001b[0;32m✓\u001b[0m test_vm_scheduler\r\n"]
13+
[1.648455, "o", "\r\n"]
14+
[1.648651, "o", " \u001b[0;32m✓\u001b[0m test_mmio\r\n"]
15+
[1.710054, "o", " \u001b[0;32m✓\u001b[0m test_gicv3_virt\r\n"]
16+
[1.77284, "o", " \u001b[0;32m✓\u001b[0m test_complete_interrupt\r\n"]
17+
[1.835315, "o", " \u001b[0;32m✓\u001b[0m test_decode\r\n"]
18+
[1.897646, "o", " \u001b[0;32m✓\u001b[0m test_gicd\r\n"]
19+
[1.96022, "o", " \u001b[0;32m✓\u001b[0m test_gicr\r\n"]
20+
[2.023009, "o", " \u001b[0;32m✓\u001b[0m test_device_routing\r\n"]
21+
[2.085062, "o", "\r\n \u001b[0;32m✓\u001b[0m test_net_rx_ring\r\n"]
22+
[2.147725, "o", " \u001b[0;32m✓\u001b[0m test_vswitch\r\n"]
23+
[2.209954, "o", " \u001b[0;32m✓\u001b[0m test_virtio_net\r\n"]
24+
[2.272579, "o", "\r\n \u001b[0;32m✓\u001b[0m test_page_ownership\r\n"]
25+
[2.335009, "o", " \u001b[0;32m✓\u001b[0m test_pl031\r\n"]
26+
[2.397784, "o", " \u001b[0;32m✓\u001b[0m test_global\r\n"]
27+
[2.460256, "o", " \u001b[0;32m✓\u001b[0m test_vm_state_isolation\r\n"]
28+
[2.522674, "o", " \u001b[0;32m✓\u001b[0m test_vmid_vttbr\r\n"]
29+
[2.58502, "o", " \u001b[0;32m✓\u001b[0m test_multi_vm_devices\r\n"]
30+
[2.646813, "o", " \u001b[0;32m✓\u001b[0m test_vm_activate\r\n"]
31+
[2.708698, "o", "\r\n"]
32+
[3.011024, "o", " \u001b[0;36m━━━ test_ffa \u001b[0;90m(55 assertions)\u001b[0m\r\n"]
33+
[3.163762, "o", " \u001b[0;90mVERSION, ID_GET, FEATURES, RXTX, DIRECT_REQ/RESP,\u001b[0m\r\n \u001b[0;90mMEM_SHARE, MEM_LEND, RECLAIM, descriptors, VM-to-VM,\u001b[0m\r\n \u001b[0;90mnotifications, MSG_SEND2, FRAG_RX, CONSOLE_LOG\u001b[0m\r\n \u001b[0;32m✓\u001b[0m test_ffa\r\n"]
34+
[3.163973, "o", "\r\n"]
35+
[3.466792, "o", " \u001b[0;35m━━━ test_spmc_handler \u001b[0;90m(182 assertions)\u001b[0m\r\n"]
36+
[3.619709, "o", " \u001b[0;90mDIRECT_REQ echo (32+64), multi-SP routing,\u001b[0m\r\n \u001b[0;90mMEM_SHARE/LEND/RETRIEVE/RELINQUISH/RECLAIM lifecycle,\u001b[0m\r\n \u001b[0;90mSP-to-SP relay, cycle detection, MEM_DONATE,\u001b[0m\r\n \u001b[0;90mcross-SP isolation, IPA validation, stress tests\u001b[0m\r\n"]
37+
[3.619802, "o", " \u001b[0;32m✓\u001b[0m test_spmc_handler\r\n\r\n"]
38+
[3.922074, "o", " \u001b[0;35m━━━ test_sp_context \u001b[0;90m(58 assertions)\u001b[0m\r\n \u001b[0;32m✓\u001b[0m test_sp_context\r\n\r\n"]
39+
[4.425137, "o", "\u001b[1m\u001b[0;32m════════════════════════════════════════\u001b[0m\r\n\u001b[1m\u001b[0;32m Test result: 457 passed, 0 failed\u001b[0m\r\n"]
40+
[4.425443, "o", "\u001b[1m\u001b[0;32m════════════════════════════════════════\u001b[0m\r\n\r\n"]
41+
[5.428314, "o", "\u001b[0;36m\u001b[1m$ make run-pkvm-ffa-test\u001b[0m \u001b[0;90m# TF-A + AOSP kernel + pKVM\u001b[0m\r\n\r\n"]
42+
[5.931251, "o", "\u001b[1;34m[TF-A]\u001b[0m BL1 → BL2 → BL31\u001b[0;90m(SPMD)\u001b[0m → BL32\u001b[0;90m(SPMC)\u001b[0m → BL33\u001b[0;90m(pKVM)\u001b[0m\r\n\u001b[1;34m[pKVM]\u001b[0m Protected hVHE mode initialized \u001b[0;32msuccessfully\u001b[0m\r\n"]
43+
[5.93149, "o", "\u001b[1;34m[FF-A]\u001b[0m ARM FF-A: Driver version 1.2, Firmware version 1.1\r\n\r\n"]
44+
[6.334168, "o", " \u001b[0;32mPASS\u001b[0m SP1 DIRECT_REQ_32 echo\r\n \u001b[0;32mPASS\u001b[0m SP1 DIRECT_REQ_64 echo\r\n"]
45+
[6.334236, "o", " \u001b[0;32mPASS\u001b[0m SP1 MEM_SHARE lifecycle\r\n \u001b[0;32mPASS\u001b[0m SP1 MEM_LEND lifecycle\r\n"]
46+
[6.437079, "o", " \u001b[0;32mPASS\u001b[0m SP2 DIRECT_REQ_32 echo\r\n \u001b[0;32mPASS\u001b[0m SP2 DIRECT_REQ_64 echo\r\n"]
47+
[6.437284, "o", " \u001b[0;32mPASS\u001b[0m SP2 MEM_SHARE lifecycle\r\n \u001b[0;32mPASS\u001b[0m SP2 MEM_LEND lifecycle\r\n"]
48+
[6.539643, "o", " \u001b[0;32mPASS\u001b[0m SP3 DIRECT_REQ_64 echo\r\n \u001b[0;32mPASS\u001b[0m SP3 relay SP1→SP3→SP1 chain\r\n"]
49+
[6.539852, "o", " \u001b[0;32mPASS\u001b[0m SP3 relay cycle detection\r\n"]
50+
[6.642714, "o", " \u001b[0;32mPASS\u001b[0m SP-to-SP MEM_SHARE \u001b[0;90m(SP1→SP2 Secure DRAM)\u001b[0m\r\n \u001b[0;32mPASS\u001b[0m SP-to-SP MEM_RECLAIM\r\n \u001b[0;90m ... (35 total)\u001b[0m\r\n\r\n"]
51+
[7.14491, "o", "\u001b[1m\u001b[0;32m════════════════════════════════════════\u001b[0m\r\n\u001b[1m\u001b[0;32m pKVM E2E: 35/35 PASS\u001b[0m\r\n"]
52+
[7.144984, "o", "\u001b[1m\u001b[0;32m════════════════════════════════════════\u001b[0m\r\n\r\n"]
53+
[7.145008, "o", "\u001b[0;90m Linux → pKVM (NS-EL2) → TF-A (EL3) → SPMC (S-EL2) → SPs (S-EL1)\u001b[0m\r\n\r\n"]

‎docs/demo.gif‎

488 KB
Loading

‎docs/demo.mp4‎

389 KB
Binary file not shown.

0 commit comments

Comments
 (0)