Bug 14452

Summary: qemuarm64 (and likely others) don't boot in kvmtool
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: kernelAssignee: Bruce Ashfield <bruce.ashfield>
Status: ACCEPTED --- QA Contact:
Severity: enhancement    
Priority: Medium CC: randy.macleod, tom.zanussi
Version: 3.4   
Target Milestone: 6.1 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2021-06-25 14:54:26 UTC
Some people like to use lkvm instead of qemu, but our qemu kernels don't boot:

$ ~/Code/kvmtool/lkvm  run --disk core-image-sato-qemuarm64.ext4 --kernel Image --debug -c 4 -m 128
  # lkvm run -k Image -m 128 -c 4 --name guest-2181167
  Info: (arm/kvm.c) kvm__arch_load_kernel_image:116: Loaded kernel to 0x80000000 (19505664 bytes)
  Info: (arm/kvm.c) kvm__arch_load_kernel_image:132: Placing fdt at 0x87e00000 - 0x87ffffff
  Info: (virtio/mmio.c) virtio_mmio_init:325: virtio-mmio.devices=0x200@0x3000000:36
  Info: (virtio/mmio.c) virtio_mmio_init:325: virtio-mmio.devices=0x200@0x3000200:37
  Warning: IP header length is not 20 bytes
  Warning: IP header length is not 20 bytes

And then it hangs.

I'm told that there are differences:

"for the background: QEMU and kvmtool use a different virtual platform: they share the usage of virtio, but the memory map is different, and QEMU uses a PL011, while kvmtool emulates an 8250 UART. And there are other differences, but nothing exotic, so defconfig easily covers both"

https://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git/tree/README lists most of the config options that kvmtool expects to work.