** Description changed: When trying to boot 7.0.0-22-generic with Oak's stage0[0] in a SEV-SNP guest, the kernel panics with: PANIC: Unsupported exit-code 0x404 in early #VC exception (IP: 0xffffffff9d7b5e05) [ 0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper Not tainted 7.0.0-22-generic #22-Ubuntu PREEMPT(undef) [ 0.000000] RIP: 0010:reserve_ibft_region+0x75/0x130 [ 0.000000] Code: be 00 10 00 00 4c 89 e7 e8 88 32 fc ff be 00 10 00 00 48 89 df e8 3b 31 fc ff 48 89 d9 49 89 c4 48 89 d8 48 29 c8 49 8d 3c 04 <81> 3f 69 42 46 54 75 13 49 8b 74 04 04 89 f2 48 01 da 48 81 fa ff [ 0.000000] RSP: 0000:ffffffff9d203e80 EFLAGS: 00010046 ORIG_RAX: 0000000000000404 [ 0.000000] RAX: 0000000000000000 RBX: 00000000000c0000 RCX: 00000000000c0000 [ 0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffffff200000 [ 0.000000] RBP: ffffffff9d203e90 R08: 0000000000000000 R09: 0000000000000000 [ 0.000000] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffff200000 [ 0.000000] R13: 0000000000000000 R14: 0000000000000007 R15: 000000000001b000 [ 0.000000] FS: 0000000000000000(0000) GS:0000000000000000(0000) knlGS:0000000000000000 [ 0.000000] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 0.000000] CR2: ffffffffff200000 CR3: 00080000469fc000 CR4: 00000000000000b0 [ 0.000000] Call Trace: [ 0.000000] <TASK> [ 0.000000] setup_arch+0x448/0x880 [ 0.000000] start_kernel+0x66/0x4c0 [ 0.000000] x86_64_start_reservations+0x24/0x30 [ 0.000000] x86_64_start_kernel+0x134/0x140 [ 0.000000] common_startup_64+0x13e/0x141 [ 0.000000] </TASK> Steps to reproduce 1. build stage0[1] or use another non-EFI firmware 2. launch a VM with SEV-SNP: qemu-system-x86_64 \ -enable-kvm \ -nographic \ -no-reboot \ -machine microvm,acpi=on,memory-encryption=sev0 \ -cpu EPYC-v4 \ -smp 1 \ -m 2G \ -object memory-backend-memfd,id=ram1,size=2G,share=true,prealloc=false \ -machine memory-backend=ram1 \ -object sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=1,policy=0x30000 \ -kernel vmlinuz \ -append "console=ttyS0 earlyprintk=serial,ttyS0 loglevel=8 ignore_loglevel panic=-1" \ -bios stage0_bin.bin + Using the same kernel/stage0 binaries without SEV-SNP works fine: + + qemu-system-x86_64 \ + -enable-kvm \ + -nographic \ + -no-reboot \ + -machine microvm,acpi=on \ + -cpu EPYC-v4 \ + -smp 1 \ + -m 2G \ + -kernel kernel/boot/vmlinuz-7.1.0-5-generic \ + -append "console=ttyS0 earlyprintk=serial,ttyS0 loglevel=8 ignore_loglevel panic=-1" \ + -bios stage0_bin.bin + + [0] https://github.com/project-oak/oak/tree/main/stage0 [1] See attached files for build script and pre-built binary
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2158249 Title: SEV-SNP guest panics in reserve_ibft_region() during legacy iBFT scan when booted via non-EFI boot To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2158249/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
