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
+10 -3
View File
@@ -920,13 +920,17 @@ static int nvme_msix_program(const struct dkm_kernel_api *api,
* 页属性 PCD|PWT (UC), MSI-X 表访问不要求 cache 一致性操作。 */
volatile u32 *tbl = (volatile u32 *)api->mm_map_mmio(tbl_phys, 4096);
if (!tbl) {
g_log->warn("[nvme] MSI-X: table MMIO map failed; polling");
/* 严格错误策略插桩:MSI-X 表映射失败不允许静默转轮询(NVME-E01) */
g_log->error("[nvme] MSI-X: table MMIO map failed");
g_log->panic("NVME-E01 MSIX TABLE MAP FAILED");
return 0;
}
int vector = api->irq_vector_alloc();
if (vector < 0 || vector > 255) {
g_log->warn("[nvme] MSI-X: vector alloc failed; polling");
/* 严格错误策略插桩:向量分配失败不允许静默转轮询(NVME-E02) */
g_log->error("[nvme] MSI-X: vector alloc failed");
g_log->panic("NVME-E02 VECTOR ALLOC FAILED");
return 0;
}
log_dec("[nvme] MSI-X vector=", (u64)vector);
@@ -958,7 +962,10 @@ static int nvme_msix_program(const struct dkm_kernel_api *api,
log_hex("[nvme] MSI-X readback entry vctl=", rb_vc);
if (!(rb_ctl & 0x8000u) || rb_a0 != addr || rb_a1 != 0 ||
(rb_d & 0xffu) != ((u32)vector & 0xffu) || (rb_vc & 1u)) {
g_log->warn("[nvme] MSI-X: readback mismatch; rolling back");
/* 严格错误策略插桩:MSI-X 编程回读不符 = 硬件/虚拟机拒绝消息中断,
* 不允许静默回滚转轮询(NVME-E03)。 */
g_log->error("[nvme] MSI-X: readback mismatch");
g_log->panic("NVME-E03 MSIX READBACK MISMATCH");
u32 rb = dkm_pci_read(bus, dev, func, (u8)cap);
rb = (rb & 0x0000ffffu) | (msg_ctl << 16); /* 恢复原 msg_ctl */
dkm_pci_write(bus, dev, func, (u8)cap, rb);