CAmkES Linux VM Tutorial/Minimal Build Issue
So there I was having a lovely time doing the seL4 Tutorials...and I got
hit with debug output #1 below, so I confirmed that I indeed had nested
virtualization working by making an running an Ubuntu VM in side of an
Ubuntu VM on an Ubuntu box in using kvm and qemu, so I do not think it is
that. I tried passing the host processor through just to see if there
something was getting in the way to no avail.
That was when I decided to go through the devel archives and the closest
similar post I could find was 07 Aug 2020 (
https://sel4.systems/pipermail/devel/2020-August/002845.html)
unfortunately there's no debug output so I cannot confirm is it is the same
issue. There was also an issue in April (
https://sel4.systems/pipermail/devel/2020-April/002781.html) that also
looked similar but I grep'd through the source and could not find the line
referenced line from the commit. Finally I natively built minimal from
https://github.com/seL4/camkes-vm-examples in the hopes that it was an
issue with the tutorial docker container which led to output #2 below.
Which brings me to now humbly request for help so I can finish up the
tutorials. Thank you advance for any help anyone can provide, hopefully it
is a simple mistake on my part.
-Jim
====== VERY LONG DEBUG STUFF BELOW ======
- Debug Output #1:
./simulate: qemu-system-x86_64 -machine q35,accel=kvm,kernel-irqchip=split
-cpu
Nehalem,+vme,+pdpe1gb,-xsave,-xsaveopt,-xsavec,-fsgsbase,-invpcid,enforce,+vmx
-nographic -serial mon:stdio -m size=2G -enable-kvm -device
intel-iommu,intremap=off -net nic,model=e1000 -net
tap,script=no,ifname=tap0 -kernel images/kernel-x86_64-pc99 -initrd
images/capdl-loader-image-x86_64-pc99 Boot config: debug_port = 0x3f8
Boot config: disable_iommu = false
Detected 1 boot module(s):
module #0: start=0xa1d000 end=0x1e366e0 size=0x14196e0
name='images/capdl-loader-image-x86_64-pc99'
Parsing GRUB physical memory map
Physical Memory Region from 0 size 9fc00 type 1
Physical Memory Region from 9fc00 size 400 type 2
Physical Memory Region from f0000 size 10000 type 2
Physical Memory Region from 100000 size 7fedf000 type 1
Adding physical memory region 0x100000-0x7ffdf000
Physical Memory Region from 7ffdf000 size 21000 type 2
Physical Memory Region from b0000000 size 10000000 type 2
Physical Memory Region from fed1c000 size 4000 type 2
Physical Memory Region from feffc000 size 4000 type 2
Physical Memory Region from fffc0000 size 40000 type 2
Multiboot gave us no video information
ACPI: RSDP paddr=0xf68d0
ACPI: RSDP vaddr=0xf68d0
ACPI: RSDT paddr=0x7ffe210d
ACPI: RSDT vaddr=0x7ffe210d
Kernel loaded to: start=0x100000 end=0xa1c000 size=0x91c000 entry=0x10125e
ACPI: RSDT paddr=0x7ffe210d
ACPI: RSDT vaddr=0x7ffe210d
ACPI: FADT paddr=0x7ffe1ee5
ACPI: FADT vaddr=0x7ffe1ee5
ACPI: FADT flags=0x84a5
ACPI: DMAR paddr=0x7ffe20c5
ACPI: DMAR vaddr=0x7ffe20c5
ACPI: IOMMU host address width: 39
ACPI: 1 IOMMUs detected
ACPI: MADT paddr=0x7ffe1fd9
ACPI: MADT vaddr=0x7ffe1fd9
ACPI: MADT apic_addr=0xfee00000
ACPI: MADT flags=0x1
ACPI: MADT_APIC apic_id=0x0
ACPI: MADT_IOAPIC ioapic_id=0 ioapic_addr=0xfec00000 gsib=0
ACPI: MADT_ISO bus=0 source=0 gsi=2 flags=0x0
ACPI: MADT_ISO bus=0 source=5 gsi=5 flags=0xd
ACPI: MADT_ISO bus=0 source=9 gsi=9 flags=0xd
ACPI: MADT_ISO bus=0 source=10 gsi=10 flags=0xd
ACPI: MADT_ISO bus=0 source=11 gsi=11 flags=0xd
ACPI: 1 CPU(s) detected
ELF-loading userland images from boot modules:
size=0x289a000 v_entry=0x4083af v_start=0x400000 v_end=0x2c9a000
p_start=0x1e37000 p_end=0x46d1000
Moving loaded userland images to final location: from=0x1e37000 to=0xa1c000
size=0x289a000
Starting node #0 with APIC ID 0
Mapping kernel window is done
vt-x: Load IA32_PERF_GLOBAL_CONTROL not supported. Hardware debugging may
not work
IOMMU 0x0: 16-bit domain IDs supported
IOMMU: Using 3 page-table levels (max. supported:3)
IOMMU: Create VTD context table for PCI bus 0x0 (pptr=0xffffff807e01d000)
===== SNIP ======
IOMMU: Create VTD context table for PCI bus 0xfe (pptr=0xffffff807e11b000)
IOMMU: Create VTD context table for PCI bus 0xff (pptr=0xffffff807e11c000)
IOMMU 0x0: enabling... enabled
Booting all finished, dropped to user space
Single bus detected
lib_pci_scan_dev found pci device 0 0
PCI :: 00.00.00 : intel Unknown device ID. (vid 0x8086 did 0x29c0) line0
pin0
lib_pci_scan_dev found pci device 0 1
PCI :: 00.01.00 : Unknown vendor ID. Unknown device ID. (vid 0x1234 did
0x1111) line0 pin0
BAR0 : [ mem 0xfd000000 sz 0x1000000 szmask 0xff000000 prefetch ]
BAR2 : [ mem 0xfebb0000 sz 0x1000 szmask 0xfffff000 ]
lib_pci_scan_dev found pci device 0 2
PCI :: 00.02.00 : intel Unknown device ID. (vid 0x8086 did 0x100e) line11
pin1
BAR0 : [ mem 0xfeb80000 sz 0x20000 szmask 0xfffe0000 ]
BAR1 : [ io 0xc000 sz 0x40 szmask 0xffffffc0 ]
lib_pci_scan_dev found pci device 0 31
PCI :: 00.1f.00 : intel intel_ich9_8 (vid 0x8086 did 0x2918) line0 pin0
lib_pci_scan_dev found multi function device 0 31
PCI :: 00.1f.02 : intel Unknown device ID. (vid 0x8086 did 0x2922) line10
pin1
BAR4 : [ io 0xc080 sz 0x20 szmask 0xffffffe0 ]
BAR5 : [ mem 0xfebb1000 sz 0x1000 szmask 0xfffff000 ]
PCI :: 00.1f.03 : intel intel_ich9_6 (vid 0x8086 did 0x2930) line10 pin1
BAR4 : [ io 0x700 sz 0x40 szmask 0xffffffc0 ]
========== KERNEL EXCEPTION ==========
Vector: 0xd
ErrCode: 0x0
IP: 0xffffffff8080d2e9
SP: 0xffffffff80a0bd88
FLAGS: 0x10002
CR0: 0x8001003b
CR2: 0x0 (page-fault address)
CR3: 0xa17000 (page-directory physical address)
CR4: 0x2220
Stack Dump:
*0xffffffff80a0bd88 == 0xffffff807c052880
*0xffffffff80a0bd90 == 0xffffff80318c1400
*0xffffffff80a0bd98 == 0x1
*0xffffffff80a0bda0 == 0xffffffff80812415
*0xffffffff80a0bda8 == 0xffffff8020001580
*0xffffffff80a0bdb0 == 0x1000ff8029831000
*0xffffffff80a0bdb8 == 0xc
*0xffffffff80a0bdc0 == 0xffffffff8081eeb8
*0xffffffff80a0bdc8 == 0xc
*0xffffffff80a0bdd0 == 0xffffff8020002560
*0xffffffff80a0bdd8 == 0xffffff8029831000
*0xffffffff80a0bde0 == 0x0
*0xffffffff80a0bde8 == 0x1ffed6
*0xffffffff80a0bdf0 == 0xffffff8029831000
*0xffffffff80a0bdf8 == 0xffffff80318c1c00
*0xffffffff80a0be00 == 0xffffff8020002540
*0xffffffff80a0be08 == 0xffffffff80a0be60
*0xffffffff80a0be10 == 0xffffff8020002540
*0xffffffff80a0be18 == 0xffffff80318c18a0
*0xffffffff80a0be20 == 0xffffff8029831000
Halting...
halting...
Kernel entry via Syscall, number: 1, Call
Cap type: 12, Invocation tag: 54
- Debug Output #2:
===== SNIP: Same as above =====
IOMMU: Create VTD context table for PCI bus 0xff (pptr=0xff10d000)
IOMMU 0x0: enabling... enabled
Booting all finished, dropped to user space
<
Hi Jim,
So there I was having a lovely time doing the seL4 Tutorials...and I got hit with debug output #1 below, so I confirmed that I indeed had nested virtualization working by making an running an Ubuntu VM in side of an Ubuntu VM on an Ubuntu box in using kvm and qemu, so I do not think it is that. I tried passing the host processor through just to see if there something was getting in the way to no avail.
I took a look at the debug output and it looks like there's something funny going on with the kernel and the VMM. I was able to replicate your issue using the manifest available on GitHub, but it was working fine using our internal manifests. So I suspect there were probably fixes that haven't been propagated to GitHub yet via our internal CI processes. I'll take a look at why our CI haven't propagated changes to GitHub and in the meantime, I've created a fork[1] on GitHub of our internal tutorial manifest so you can use that instead. [1] https://github.com/nomadeel/sel4-tutorials-manifest Hope this helps, Damon
participants (2)
-
Jim McColl
-
Lee, Damon (Data61, Kensington NSW)