coconut-svsm / svsm

COCONUT-SVSM
MIT License
96 stars 40 forks source link

[SVSM] Failed to launch /init #384

Closed ramagali24 closed 1 month ago

ramagali24 commented 1 month ago

I followed procedures in INSTALL.md and built linux host, guest kerns, igvm(1.6), QEMU, but when i run lunch-qemy.sh from SVSM, i do see " [SVSM] Failed to launch /init" and that leads to kernel crash.

Any suggestions. Attached complete log.

Launch QEMU command $SUDO_CMD \ $QEMU \ -enable-kvm \ -cpu EPYC-v4 \ -machine $MACHINE \ -object $MEMORY \ -object sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=1,init-flags=5,igvm-file=$IGVM \ -smp 4 \ -no-reboot \ -netdev user,hostfwd=tcp::10022-:22,id=vmnic -device e1000,netdev=vmnic,romfile= \ $IMAGE_DISK \ -nographic \ -monitor none \ -serial stdio \ $DEBUG_SERIAL \ $QEMU_EXIT_DEVICE \ $QEMU_TEST_IO_DEVICE

char device redirected to /dev/pts/5 (label serial1) [Stage2] COCONUT Secure Virtual Machine Service Module (SVSM) Stage 2 Loader [Stage2] Order-00: total pages: 15 free pages: 0 [Stage2] Order-01: total pages: 0 free pages: 0 [Stage2] Order-02: total pages: 1 free pages: 1 [Stage2] Order-03: total pages: 1 free pages: 1 [Stage2] Order-04: total pages: 0 free pages: 0 [Stage2] Order-05: total pages: 0 free pages: 0 [Stage2] Total memory: 108KiB free memory: 48KiB [Stage2] kernel_region_phys_start = 0x0000008000000000 [Stage2] kernel_region_phys_end = 0x0000008001000000 [Stage2] kernel_virtual_base = 0xffffff8000000000 [SVSM] COCONUT Secure Virtual Machine Service Module (SVSM) [SVSM] Order-00: total pages: 48 free pages: 0 [SVSM] Order-01: total pages: 0 free pages: 0 [SVSM] Order-02: total pages: 1 free pages: 1 [SVSM] Order-03: total pages: 1 free pages: 1 [SVSM] Order-04: total pages: 1 free pages: 1 [SVSM] Order-05: total pages: 106 free pages: 106 [SVSM] Total memory: 13872KiB free memory: 13680KiB [SVSM] Boot stack starts @ 0xffffff800025a000 [SVSM] BSP Runtime stack starts @ 0xffffff000020c000 [SVSM] Guest Memory Regions: [SVSM] 000000000000000000-000000000080000000 [SVSM] 000000000100000000-000000000280000000 [SVSM] Invalidating boot region 000000000000000000-0000000000000a0000 [SVSM] Invalidating boot region 000000000000100000-000000000000356a00 [SVSM] Invalidating boot region 000000000000357000-00000000000035a000 [SVSM] 4 CPU(s) present [SVSM] Launching AP with APIC-ID 1 [SVSM] AP with APIC-ID 1 is online [SVSM] Launching AP with APIC-ID 2 [SVSM] Launching request-processing task on CPU 1 [SVSM] AP with APIC-ID 2 is online [SVSM] Launching AP with APIC-ID 3 [SVSM] Launching request-processing task on CPU 2 [SVSM] AP with APIC-ID 3 is online [SVSM] Brought 3 AP(s) online [SVSM] Launching request-processing task on CPU 3 [SVSM] FW Meta Data [SVSM] CPUID Page : 0x0080e000 [SVSM] Secrets Page : 0x0080d000 [SVSM] CAA Page : 0x0080f000 [SVSM] Pre-Validated Region 0x0000000000800000-0x0000000000809000 [SVSM] Pre-Validated Region 0x000000000080a000-0x000000000080d000 [SVSM] Pre-Validated Region 0x0000000000810000-0x0000000000820000 [SVSM] Validating 0x0000000000800000-0x0000000000809000 [SVSM] Validating 0x000000000080a000-0x0000000000820000 [SVSM] Flash region 0 at 0x00000000ffc00000 size 000000000000400000 [SVSM] Size of OBJECT = 1204 [SVSM] Size of components in TPMT_SENSITIVE = 744 [SVSM] TPMI_ALG_PUBLIC 2 [SVSM] TPM2B_AUTH 50 [SVSM] TPM2B_DIGEST 50 [SVSM] TPMU_SENSITIVE_COMPOSITE 642 [SVSM] MAX_CONTEXT_SIZE can be reduced to 1264 (1344) [SVSM] VTPM: Microsoft TPM 2.0 initialized [SVSM] [CPU 0] Virtual memory pages used: 0 4K, 0 2M [SVSM] VMSA PA: 0x8000f66000 [SVSM] Launching Firmware [SVSM] Launching request-processing task on CPU 0 [SVSM] Failed to launch /init ----- This message lead to crash SecCoreStartupWithStack(0xFFFCC000, 0x820000) Register PPI Notify: DCD0BE23-9586-40F4-B643-06522CED4EDE Install PPI: 8C8CE578-8A3D-4F1C-9935-896185C32DD3

............................... SetUefiImageMemoryAttributes - 0x000000007F2B3000 - 0x0000000000004000 (0x0000000000000008) SetUefiImageMemoryAttributes - 0x000000007F2AE000 - 0x0000000000005000 (0x0000000000000008) KVM: unknown exit reason 24 EAX=00000000 EBX=00000000 ECX=0000020f EDX=00000000 ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000 EIP=00000000 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0000 00000000 00000000 00000000 CS =0000 00000000 00000000 00000000 SS =0000 00000000 00000000 00000000 DS =0000 00000000 00000000 00000000 FS =0000 00000000 00000000 00000000 GS =0000 00000000 00000000 00000000 LDT=0000 00000000 00000000 00000000 TR =0000 00000000 00000000 00000000 GDT= 0000000000000000 00000000 IDT= 0000000000000000 00000000 CR0=80010033 CR2=0000000000000000 CR3=0000000000000000 CR4=00000668 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=0000000000000000 DR7=0000000000000000 EFER=0000000000000d00 Code=<??> ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? qemu-system-x86_64: terminating on signal 2

SVSM latest commit information. /coconut-svsm/svsm$ git log -1 commit c3da88d2ce90ea3ef74e9a8cf54df08252c86c4c (HEAD -> main, origin/main, origin/HEAD) Merge: 2d55a4b 0a05dcc Author: Jörg Rödel jroedel@suse.de Date: Sun Jun 16 09:34:12 2024 +0200

Merge pull request #383 from p4zuu/clippy

igvmbuilder: remove firmware field in GpaMap

qemu_06162024.log

ramagali24 commented 1 month ago

It's my setup issue and [SVSM] Failed to launch /init --> this message is not reason for my guest VM bootup.