feat: SKEL skeleton instrumentation - designed-but-unimplemented paths panic

- hypercall.c: 5 Phase 1.3 stubs -> HCALL-E01..E05 panic (no NOSYS return)
- drr_stub.c: snapshot alloc fail -> DRR-E01; new skeletons DRR-E02 root key
  seal, DRR-E03 task kill crypto erase, DRR-E04/E05 segment/system rollback,
  DRR-E06/E07 driver recovery ops dispatch
- sched.c: enable fail -> SCH-E02 panic (no silent demo skip)
- dkm/kernel_api.c: D1 hot-unload DKM-E01, D2 bare code loader DKM-E02,
  SIPI AP wake DKM-E03 skeletons
- virtio_net tx/rx stubs -> VNET-E01/E02; ath9k tx stub -> ATH-E01;
  xhci port reset -> XHC-E01; nvme MSI/MSI-X fail -> NVME-E01..E03 (no
  silent polling downgrade); e1000 MAC fallback -> E1K-E01
- pe_shim unimpl API -> PE-E01; PE ordinal import -> PE-E02
- kernel/main.c: lib sync / vscode install fail -> LNX-E01/E02
- NEW brand/brand.c (E1 boot anim BRAND-E01, E2 time egg BRAND-E02) and
  pkg/pkg.c (pacman skeleton PKG-E01..03), wired into UTSM MAKEFILE
- Deliberate design-internal fallbacks kept and documented (VMX skip,
  bzImage skip, KDE fallback, boot-module fallback, apic->PIC route)
This commit is contained in:
Linehu
2026-10-03 00:30:54 +08:00
parent 38ff3cf93c
commit 583262f5f0
35 changed files with 316 additions and 57 deletions
+16 -9
View File
@@ -160,31 +160,37 @@ static long hcall_surface_info(u64 a0, u64 a1, u64 a2) {
return UTSM_HCALL_OK;
}
/* ===================================================================
* 严格错误策略插桩:Phase 1.3 设计已定但未实现的 hypercall,
* 一律 panic(HCALL-E 系列),零降级零 NOSYS 静默返回。
* =================================================================== */
#include <utsm/panic.h>
static long hcall_cap_validate(u64 a0, u64 a1, u64 a2) {
/* Phase 1.3: stub — capability validation not yet implemented */
(void)a0; (void)a1; (void)a2;
log_info("[HCALL] CAP_VALIDATE (stub)");
panic_full("HCALL-E01 CAP_VALIDATE NOT IMPLEMENTED",
"capability validation hypercall: designed (Phase 1.3), not implemented", 0);
return UTSM_HCALL_NOSYS;
}
static long hcall_utrw_read(u64 a0, u64 a1, u64 a2) {
/* Phase 1.3: stub — sealed memory read not yet implemented */
(void)a0; (void)a1; (void)a2;
log_info("[HCALL] UTRW_READ (stub)");
panic_full("HCALL-E02 UTRW_READ NOT IMPLEMENTED",
"sealed memory read hypercall: designed (Phase 1.3), not implemented", 0);
return UTSM_HCALL_NOSYS;
}
static long hcall_utrw_write(u64 a0, u64 a1, u64 a2) {
/* Phase 1.3: stub — sealed memory write not yet implemented */
(void)a0; (void)a1; (void)a2;
log_info("[HCALL] UTRW_WRITE (stub)");
panic_full("HCALL-E03 UTRW_WRITE NOT IMPLEMENTED",
"sealed memory write hypercall: designed (Phase 1.3), not implemented", 0);
return UTSM_HCALL_NOSYS;
}
static long hcall_drr_checkpoint(u64 a0, u64 a1, u64 a2) {
/* Phase 1.3: stub — DRR checkpoint trigger not yet implemented */
(void)a0; (void)a1; (void)a2;
log_info("[HCALL] DRR_CHECKPOINT (stub)");
panic_full("HCALL-E04 DRR_CHECKPOINT NOT IMPLEMENTED",
"DRR checkpoint hypercall: designed (Phase 1.3), not implemented", 0);
return UTSM_HCALL_NOSYS;
}
@@ -213,8 +219,9 @@ static long hcall_console_write(u64 a0, u64 a1, u64 a2) {
}
static long hcall_console_read(u64 a0, u64 a1, u64 a2) {
/* Phase 1.3: stub — console read not yet implemented */
(void)a0; (void)a1; (void)a2;
panic_full("HCALL-E05 CONSOLE_READ NOT IMPLEMENTED",
"console read hypercall: designed (Phase 1.3), not implemented", 0);
return UTSM_HCALL_NOSYS;
}
+17
View File
@@ -0,0 +1,17 @@
vmm/hypercall.o: vmm\hypercall.c include\utsm\hypercall.h \
include\utsm\types.h include\utsm\vmx.h include\utsm\ept.h \
include\utsm\vmm.h include\utsm\ipc_shm.h ..\utsm-ipc\ipc_proto.h \
include\utsm\linux_compat.h include\utsm\linux_loader.h \
include\utsm\log.h vmm\..\arch\x86_64\limine.h include\utsm\panic.h
include\utsm\hypercall.h:
include\utsm\types.h:
include\utsm\vmx.h:
include\utsm\ept.h:
include\utsm\vmm.h:
include\utsm\ipc_shm.h:
..\utsm-ipc\ipc_proto.h:
include\utsm\linux_compat.h:
include\utsm\linux_loader.h:
include\utsm\log.h:
vmm\..\arch\x86_64\limine.h:
include\utsm\panic.h: