Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running helloworld-c x64-kvm on QEMU v8.2.2 #1371

Open
RaduMantu opened this issue Mar 30, 2024 · 0 comments
Open

Problem running helloworld-c x64-kvm on QEMU v8.2.2 #1371

RaduMantu opened this issue Mar 30, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@RaduMantu
Copy link
Contributor

Describe the bug

A x86_64-qemu build of helloworld-c crashes early on; see attached log (last 2 lines repeating). Also added the related symbols file.

@razvand mentioned that someone else also had this problem on newer versions of qemu. If anyone wants to do a bisect and find the culprit, I've already checked a few versions starting with v8.0.0. Configure flags taken from the PKGBUILD file, plus --target-list=x86_64-softmmu. Note that you may need to cherry pick commit 497fad3897 to solve a missing file error on older versions; I gave up when more errors started cropping up in v7.x.

Steps to reproduce

Anything built for x64 KVM guest, with or without CONFIG_PAGING. ARMv8 or x64 linuxu both work fine.

Tested on Archlinux -- qemu-system-x86_64 version 8.2.2. Invocation:

$ qemu-system-x86_64                                     \
        -enable-kvm                                      \
        -kernel ${APP_DIR}/build/hello_world_qemu-x86_64 \
        -cpu qemu64,pdpe1gb                              \
        -nographic                                       \
        -smp 1                                           \
        -m 2G

Error occurs both on a manual build make A=${APP_DIR} ... and for kraft build / run ....

Expected behavior

The unikernel to boot and print "hello world".

Which architectures were you using or does this bug affect?

x86_64

Which platforms were you using or does this bug affect?

kvm

Relevant log output

SeaBIOS (version rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org)


iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+7EFD1040+7EF31040 CA00
                                                            


Booting from ROM..[    0.101765] CRIT: [libkvmplat] <trace.c @   41> RIP: 0000002000000004 CS: 0008
[    0.102374] CRIT: [libkvmplat] <trace.c @   42> RSP: 0000000000011f78 SS: 0010 EFLAGS: 00000202
[    0.102553] CRIT: [libkvmplat] <trace.c @   44> RAX: 0000002000000004 RBX: 000000000013b008 RCX: 00000000376cf07e
[    0.102755] CRIT: [libkvmplat] <trace.c @   46> RDX: 0000000000000000 RSI: 0000000400012020 RDI: 0000000000011f90
[    0.102964] CRIT: [libkvmplat] <trace.c @   48> RBP: 0000000000011fc0 R08: 000000000012c14d R09: 000000000012f3d8
[    0.103171] CRIT: [libkvmplat] <trace.c @   50> R10: 0000000000000001 R11: 0000000400001028 R12: 0000000000170220
[    0.103378] CRIT: [libkvmplat] <trace.c @   52> R13: 0000000000000001 R14: 0000000400011020 R15: 0000000000000000
[    0.103656] CRIT: [libkvmplat] <trace.c @   86> base is 0x11fc0 caller is 0x122557
[    0.103856] CRIT: [libkvmplat] <trace.c @   86> base is 0x11fe0 caller is 0x1187c9
[    0.104001] CRIT: [libkvmplat] <trace.c @   86> base is 0x11ff0 caller is 0
[    0.104175] CRIT: [libkvmplat] <trace.c @   66> 
[    0.104264] CRIT: [libkvmplat] <trace.c @   66> 11f60: 00 00 00 00 04 00 00 00 20 02 17 00 00 00 00 00
[    0.104477] CRIT: [libkvmplat] <trace.c @   66> 11f70: c0 1f 01 00 00 00 00 00 46 23 12 00 00 00 00 00
[    0.104669] CRIT: [libkvmplat] <trace.c @   66> 11f80: 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00
[    0.105463] CRIT: [libkvmplat] <trace.c @   66> 11f90: 01 00 00 00 00 00 00 00 20 02 17 00 00 00 00 00
[    0.106140] CRIT: [libkvmplat] <trace.c @   66> 
[    0.106460] CRIT: [libkvmplat] <trace.c @   66> 11fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    0.107111] CRIT: [libkvmplat] <trace.c @   66> 11fc0: e0 1f 01 00 00 00 00 00 57 25 12 00 00 00 00 00
[    0.107768] CRIT: [libkvmplat] <trace.c @   66> 11fd0: 00 00 00 00 00 00 00 00 00 20 01 00 00 00 00 00
[    0.108421] CRIT: [libkvmplat] <trace.c @   66> 11fe0: f0 1f 01 00 00 00 00 00 c9 87 11 00 00 00 00 00
[    0.109090] CRIT: [libkvmplat] <trace.c @   66> 
[    0.109409] CRIT: [libkvmplat] <trace.c @   66> 1ffffffff0:RIP: 0000000000104830 CS: 0008
[    0.110033] CRIT: [libkvmplat] <trace.c @   42> RSP: 000000000015ef10 SS: 0000 EFLAGS: 00000002
[    0.110661] CRIT: [libkvmplat] <trace.c @   44> RAX: 0000000000000000 RBX: 0000001ffffffff0 RCX: 0000000000000780
[    0.111313] CRIT: [libkvmplat] <trace.c @   46> RDX: 00000000000003d4 RSI: 0000000000000000 RDI: 000000000012cf80
[    0.111969] CRIT: [libkvmplat] <trace.c @   48> RBP: 000000000015ef30 R08: 0000000000000046 R09: 000000000000000b
[    0.112621] CRIT: [libkvmplat] <trace.c @   50> R10: 000000000000003e R11: 000000000015ed34 R12: 0000002000000030
[    0.113273] CRIT: [libkvmplat] <trace.c @   52> R13: 0000000000000002 R14: 0000000400011020 R15: 0000000000000000
[    0.113924] CRIT: [libkvmplat] <trace.c @   86> base is 0x15ef30 caller is 0x1057a6
[    0.114529] CRIT: [libkvmplat] <trace.c @   86> base is 0x15ef80 caller is 0x1141c5
[    0.115134] CRIT: [libkvmplat] <trace.c @   86> base is 0x15ef30 caller is 0x1057a6
[    0.115742] CRIT: [libkvmplat] <trace.c @   86> base is 0x15ef80 caller is 0x1141c5
[    0.116347] CRIT: [libkvmplat] <trace.c @   86> base is 0x15ef30 caller is 0x1057a6
@RaduMantu RaduMantu added the kind/bug Something isn't working label Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Status: 🧊 Icebox
Development

No branches or pull requests

1 participant