Skip to content

Initial x86_64 support#198

Draft
dreamliner787-9 wants to merge 35 commits intomainfrom
x86_64_upstream_simple
Draft

Initial x86_64 support#198
dreamliner787-9 wants to merge 35 commits intomainfrom
x86_64_upstream_simple

Conversation

@dreamliner787-9
Copy link
Copy Markdown
Contributor

@dreamliner787-9 dreamliner787-9 commented Mar 18, 2026

This PR:

  • Added initial support for booting raw Linux kernel and initial ramdisk on x86_64 to libvmm.
  • Refactored how guest RAM are managed on ARM to be consistent with x86, removed requirement for guest RAM start GPA and VMM's virtual address to match.

Depends on :

The following aspects of a x86 PC have been emulated in software:

  • ACPI tables and PM timer
    Note that power state transitions (sleep, etc) are not yet supported.
  • APIC (LAPIC + single I/O APIC):
    Currently we are using Intel's hardware accelerated APICv to improve performance, this is not yet supported by seL4. We are working on an RFC to add this feature to seL4 officially.
    The following APICv features are used:
    • Virtual-interrupt Delivery,
    • Use TPR Shadow,
    • Virtualize APIC Accesses,
    • APIC-register Virtualization, and
    • Virtualised End-of-Interrupt (EOI).
  • CPUID
  • HPET
  • Instruction decoding for fault handling
  • Port I/O
  • MSRs
  • PCI (minimal)

UEFI, virtio, PCI passthrough, etc are not included in this PR as they are being actively worked on.

See github.com/au-ts/libvmm/tree/x86_64_rebased for original development history.

An example boot sequence on an Intel® Xeon® W-1250 host:

CPU reports not vulnerable to Rogue Data Cache Load (aka Meltdown https://meltdownattack.com) yet SKIM window is enabled. Performance is needlessly being impacted, consider disabling.
Kernel loaded to: start=0x100000 end=0xa1b000 size=0x91b000 entry=0x100361
ACPI: RSDT paddr=0x849d8394
ACPI: RSDT vaddr=0x849d8394
ACPI: FADT paddr=0x849d3000
ACPI: FADT vaddr=0x849d3000
ACPI: FADT flags=0x3c6a5
ACPI: MADT paddr=0x8497c000
ACPI: MADT vaddr=0x8497c000
ACPI: MADT apic_addr=0xfee00000
ACPI: MADT flags=0x1
ACPI: MADT_APIC apic_id=0x0
ACPI: MADT_APIC apic_id=0x2
ACPI: Not recording this APIC, only support 1
ACPI: MADT_APIC apic_id=0x4
ACPI: Not recording this APIC, only support 1
ACPI: MADT_APIC apic_id=0x6
ACPI: Not recording this APIC, only support 1
ACPI: MADT_APIC apic_id=0x8
ACPI: Not recording this APIC, only support 1
ACPI: MADT_APIC apic_id=0xa
ACPI: Not recording this APIC, only support 1
ACPI: MADT_APIC apic_id=0x1
ACPI: Not recording this APIC, only support 1
ACPI: MADT_APIC apic_id=0x3
ACPI: Not recording this APIC, only support 1
ACPI: MADT_APIC apic_id=0x5
ACPI: Not recording this APIC, only support 1
ACPI: MADT_APIC apic_id=0x7
ACPI: Not recording this APIC, only support 1
ACPI: MADT_APIC apic_id=0x9
ACPI: Not recording this APIC, only support 1
ACPI: MADT_APIC apic_id=0xb
ACPI: Not recording this APIC, only support 1
ACPI: MADT_IOAPIC ioapic_id=2 ioapic_addr=0xfec00000 gsib=0
ACPI: MADT_ISO bus=0 source=0 gsi=2 flags=0x0
ACPI: MADT_ISO bus=0 source=9 gsi=9 flags=0xd
ACPI: 1 CPU(s) detected
ELF-loading userland images from boot modules:
size=0x1248000 v_entry=0x212670 v_start=0x200000 v_end=0x1448000 p_start=0x1c61000 p_end=0x2ea9000
Moving loaded userland images to final location: from=0x1c61000 to=0xa1b000 size=0x1248000
Starting node #0 with APIC ID 0
Mapping kernel window is done
TSC MHz 3311
available phys memory regions: 8
  [100000..40000000)
  [40400000..58066000)
  [58067000..5a921000)
  [5a922000..74e6f000)
  [74e70000..74e93000)
  [74e94000..813fc000)
  [85dff000..85e00000)
  [100000000..106c800000)
reserved virt address space regions: 1
  [ffffff8000100000..ffffff8001c63000)
Booting all finished, dropped to user space
INFO  [sel4_capdl_initializer::initialize] Starting CapDL initializer
INFO  [sel4_capdl_initializer::initialize] Starting threads
MON|INFO: Microkit Monitor started!
TIMER|INFO: CPU does not report Crystal frequency, deriving...
TIMER|INFO: Processor base speed is 3300 MHz
TIMER|INFO: Crystal clock is 23913043 Hz
TIMER|INFO: TSC frequency is 23913043 * (276 / 2) = 3299999934 Hz
TIMER|INFO: using TSC as clocksource, HPET as clockevent
MON|INFO: PD 'timer_driver' is now passive!
VMM|INFO: starting "VMM"
VMM|INFO: Linux kernel size: 13MiB (14472192 bytes)
VMM|INFO: Linux boot protocol 2.15
VMM|INFO: Ramdisk GPA 0xe000000, size 0x28a092
VMM|INFO: Linux kernel version string: 6.19.0 (billn@dwarrowdelf) #1 SMP PREEMPT_DYNAMIC Wed Mar 18 10:31:52 AEDT 2026
VMM|INFO: Linux command line: 'earlyprintk=serial,0x3f8,115200 debug console=ttyS0,115200 earlycon=serial,0x3f8,115200 loglevel=8'
VMM|INFO: Linux load GPA 0x100000
VMM|INFO: Identity page table coverage GPA: [0x0..0x9000000)
VMM|INFO: Identity paging objects GPA: [0xfffd000..0x10000000)
VMM|INFO: ACPI RSDP 0xfffbfdc, ACPI tables GPA: [0xfff9000..0xfffc000)
VMM|TSC: CPU does not report Crystal frequency, deriving...
VMM|TSC: Processor base speed is 3300 MHz
VMM|TSC: Crystal clock is 23913043 Hz
VMM|TSC: detected TSC frequency is 23913043 * (276 / 2) = 3299999934 Hz
VMM|INFO: initialising IRQ book-keeping structures
VMM|INFO: initialising LAPIC
VMM|INFO: initialising I/O APIC
VMM|INFO: starting guest at 0x100200
early console in extract_kernel
input_data: 0x0000000002c812c4
input_len: 0x0000000000db738d
output: 0x0000000001000000
output_len: 0x00000000029edc38
kernel_total_size: 0x0000000002830000
needed_size: 0x0000000002a00000
trampoline_32bit: 0x0000000000000000
Physical KASLR using RDRAND RDTSC...
Virtual KASLR using RDRAND RDTSC...

Decompressing Linux... Parsing ELF... Performing relocations... done.
Booting the kernel (entry_offset: 0x0000000002464f10).
[    0.000000] Linux version 6.19.0 (billn@dwarrowdelf) (gcc (Debian 15.2.0-15) 15.2.0, GNU ld (GNU Binutils for Debian) 2.46) #1 SMP PREEMPT_DYNAMIC Wed Mar 18 10:31:52 AEDT 2026
[    0.000000] Command line: earlyprintk=serial,0x3f8,115200 debug console=ttyS0,115200 earlycon=serial,0x3f8,115200 loglevel=8
[    0.000000] x86/CPU: Model not found in latest microcode list
[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000fff8fff] usable
[    0.000000] BIOS-e820: [mem 0x000000000fff9000-0x000000000fffbfff] ACPI data
[    0.000000] BIOS-e820: [mem 0x000000000fffd000-0x000000000fffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000d0000000-0x00000000d00fffff] reserved
[    0.000000] printk: legacy bootconsole [earlyser0] enabled
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] APIC: Static calls initialized
[    0.000000] DMI not present or invalid.
[    0.000000] tsc: Detected 3299.000 MHz processor
[    0.000000] tsc: Detected 3299.999 MHz TSC
[    0.000005] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.010758] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.016310] last_pfn = 0xfffc max_arch_pfn = 0x400000000
[    0.021602] MTRRs disabled (not available)
[    0.025678] x86/PAT: PAT not supported by the CPU.
[    0.030449] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
Memory KASLR using RDRAND RDTSC...
[    0.045075] Using GB pages for direct mapping
[    0.049335] RAMDISK: [mem 0x0e000000-0x0e28afff]
[    0.053858] ACPI: Early table checksum verification disabled
[    0.059499] ACPI: RSDP 0x000000000FFFBFDC 000024 (v02 libvmm)
[    0.065224] ACPI: XSDT 0x000000000FFFBFA0 00003C (v02 libvmm libvmm   00000001 ?    00000001)
[    0.073728] ACPI: APIC 0x000000000FFFBF56 00004A (v05 libvmm libvmm   00000001 ?    00000001)
[    0.082229] ACPI: HPET 0x000000000FFFBF1E 000038 (v01 libvmm libvmm   00000000 ?    00000001)
[    0.090731] ACPI: FACP 0x000000000FFF9E2A 0000F4 (v06 libvmm libvmm   00000001 ?    00000001)
[    0.099233] ACPI: DSDT 0x000000000FFFAF1E 0000C1 (v02 libvmm libvmm   00000001 INTL 20251212)
[    0.107735] ACPI: FACS 0x000000000FFF9F40 000040
[    0.112334] ACPI: Reserving APIC table memory at [mem 0xfffbf56-0xfffbf9f]
[    0.119185] ACPI: Reserving HPET table memory at [mem 0xfffbf1e-0xfffbf55]
[    0.126040] ACPI: Reserving FACP table memory at [mem 0xfff9e2a-0xfff9f1d]
[    0.132893] ACPI: Reserving DSDT table memory at [mem 0xfffaf1e-0xfffafde]
[    0.139746] ACPI: Reserving FACS table memory at [mem 0xfff9f40-0xfff9f7f]
[    0.146725] No NUMA configuration found
[    0.150417] Faking a node at [mem 0x0000000000000000-0x000000000fffbfff]
[    0.157098] NODE_DATA(0) allocated [mem 0x0fff5900-0x0fff8fff]
[    0.162916] Zone ranges:
[    0.165426]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.171586]   DMA32    [mem 0x0000000001000000-0x000000000fffbfff]
[    0.177745]   Normal   empty
[    0.180609] Movable zone start for each node
[    0.184859] Early memory node ranges
[    0.188416]   node   0: [mem 0x0000000000001000-0x000000000009ffff]
[    0.194664]   node   0: [mem 0x0000000000100000-0x000000000fff8fff]
[    0.200908] Initmem setup node 0 [mem 0x0000000000001000-0x000000000fff8fff]
[    0.207937] On node 0, zone DMA: 1 pages in unavailable ranges
[    0.213768] On node 0, zone DMA: 96 pages in unavailable ranges
[    0.219937] On node 0, zone DMA32: 7 pages in unavailable ranges
[    0.226153] ACPI: PM-Timer IO Port: 0x608
[    0.230026] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
[    0.236853] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.243187] ACPI: Using ACPI (MADT) for SMP configuration information
[    0.249605] ACPI: HPET id: 0x5e14a300 base: 0xfed00000
[    0.254728] CPU topo: Max. logical packages:   1
[    0.259322] CPU topo: Max. logical dies:       1
[    0.263919] CPU topo: Max. dies per package:   1
[    0.268519] CPU topo: Max. threads per core:   1
[    0.273116] CPU topo: Num. cores per package:     1
[    0.277975] CPU topo: Num. threads per package:   1
[    0.282832] CPU topo: Allowing 1 present CPUs plus 0 hotplug CPUs
[    0.288907] PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.296452] PM: hibernation: Registered nosave memory: [mem 0x000a0000-0x000fffff]
[    0.304001] PM: hibernation: Registered nosave memory: [mem 0x0fff9000-0x0fffbfff]
[    0.311549] [mem 0x10000000-0xcfffffff] available for PCI devices
[    0.317620] Booting paravirtualized kernel on bare hardware
[    0.323172] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[    0.338275] setup_percpu: NR_CPUS:64 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1
[    0.345729] percpu: Embedded 52 pages/cpu s174488 r8192 d30312 u2097152
[    0.352185] pcpu-alloc: s174488 r8192 d30312 u2097152 alloc=1*2097152
[    0.358601] pcpu-alloc: [0] 0 
[    0.361644] Kernel command line: earlyprintk=serial,0x3f8,115200 debug console=ttyS0,115200 earlycon=serial,0x3f8,115200 loglevel=8
[    0.373473] random: crng init done
[    0.376821] printk: log buffer data + meta data: 262144 + 917504 = 1179648 bytes
[    0.384212] Dentry cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.391840] Inode-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.399396] Fallback order for Node 0: 0 
[    0.399398] Built 1 zonelists, mobility grouping on.  Total pages: 65432
[    0.410050] Policy zone: DMA32
[    0.413087] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.420190] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.426557] Kernel/User page tables isolation: enabled
Poking KASLR using RDRAND RDTSC...
[    0.435439] Dynamic Preempt: voluntary
[    0.439027] rcu: Preemptible hierarchical RCU implementation.
[    0.444744] rcu:     RCU event tracing is enabled.
[    0.449255] rcu:     RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=1.
[    0.455850]  Trampoline variant of Tasks RCU enabled.
[    0.460881]  Tracing variant of Tasks RCU enabled.
[    0.465652] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
[    0.473287] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.479968] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.
[    0.488641] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.
[    0.500477] NR_IRQS: 4352, nr_irqs: 256, preallocated irqs: 16
[    0.506303] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.513070] Console: colour dummy device 80x25
[    0.517460] printk: legacy console [ttyS0] enabled
[    0.517460] printk: legacy console [ttyS0] enabled
[    0.526997] printk: legacy bootconsole [earlyser0] disabled
[    0.526997] printk: legacy bootconsole [earlyser0] disabled
[    0.538123] ACPI: Core revision 20250807
[    0.542227] hpet: Channel #0 config: Unknown bits 0x80000000
[    0.547899] hpet: Channel #1 config: Unknown bits 0x80000000
[    0.553564] hpet: Channel #2 config: Unknown bits 0x80000040
[    0.559282] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 191126044627 ns
[    0.568480] APIC: Switch to symmetric I/O mode setup
[    0.574469] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.584971] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x2f914bc4411, max_idle_ns: 440795317975 ns
[    0.595502] Calibrating delay loop (skipped), value calculated using timer frequency.. 6599.99 BogoMIPS (lpj=3299999)
[    0.596662] Last level iTLB entries: 4KB 64, 2MB 8, 4MB 8
[    0.597501] Last level dTLB entries: 4KB 64, 2MB 32, 4MB 32, 1GB 4
[    0.598502] mitigations: Enabled attack vectors: user_kernel, user_user, SMT mitigations: auto
[    0.599501] Speculative Store Bypass: Vulnerable
[    0.600501] Spectre V2 : Mitigation: Retpolines
[    0.601501] MDS: Vulnerable: Clear CPU buffers attempted, no microcode
[    0.602501] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
[    0.603501] Spectre V2 : Spectre v2 / SpectreRSB: Filling RSB on context switch and VMEXIT
[    0.604509] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[    0.605501] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[    0.606501] x86/fpu: Enabled xstate features 0x3, context size is 576 bytes, using 'standard' format.
[    0.625725] Freeing SMP alternatives memory: 56K
[    0.626501] pid_max: default: 32768 minimum: 301
[    0.627522] SELinux:  Initializing.
[    0.628582] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.629501] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.630621] smpboot: CPU0: Intel Trustworthy Systems CPU (family: 0x0, model: 0x5, stepping: 0x4)
[    0.631585] Performance Events: unsupported CPU family 0 model 5 no PMU driver, software events only.
[    0.632508] signal: max sigframe size: 1520
[    0.633516] rcu: Hierarchical SRCU implementation.
[    0.634501] rcu:     Max phase no-delay instances is 400.
[    0.635603] smp: Bringing up secondary CPUs ...
[    0.636504] smp: Brought up 1 node, 1 CPU
[    0.637501] smpboot: Total of 1 processors activated (6599.99 BogoMIPS)
[    0.638517] Memory: 210488K/261728K available (19069K kernel code, 2905K rwdata, 7604K rodata, 2816K init, 860K bss, 48956K reserved, 0K cma-reserved)
[    0.639538] devtmpfs: initialized
[    0.640636] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    0.641505] posixtimers hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.642503] futex hash table entries: 256 (16384 bytes on 1 NUMA nodes, total 16 KiB, linear).
[    0.643554] PM: RTC time: 00:00:00, date: 2000-00-00
[    0.644533] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.645542] audit: initializing netlink subsys (disabled)
[    0.646517] audit: type=2000 audit(943920000.057:1): state=initialized audit_enabled=0 res=1
[    0.647536] thermal_sys: Registered thermal governor 'step_wise'
[    0.647541] cpuidle: using governor menu
[    0.649516] ACPI FADT declares the system doesn't support MSI, so disable it
[    0.650539] PCI: Using configuration type 1 for base access
[    0.651545] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible.
[    0.653542] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.654501] HugeTLB: 28 KiB vmemmap can be freed for a 2.00 MiB page
[    0.657625] ACPI: Added _OSI(Module Device)
[    0.659507] ACPI: Added _OSI(Processor Device)
[    0.661513] ACPI: Added _OSI(Processor Aggregator Device)
[    0.663553] ACPI: 1 ACPI AML tables successfully acquired and loaded
[    0.665602] ACPI: Interpreter enabled
[    0.667945] ACPI: PM: (supports S0)
[    0.668501] ACPI: Using IOAPIC for interrupt routing
[    0.670519] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.671501] PCI: Using E820 reservations for host bridge windows
[    0.674944] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    0.675503] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments HPX-Type3]
[    0.676501] acpi PNP0A03:00: _OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI]
[    0.679635] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended configuration space under this bridge
[    0.682160] PCI host bridge to bus 0000:00
[    0.682502] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
[    0.685169] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
[    0.685501] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.687726] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000 conventional PCI endpoint
[    0.688690] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100 conventional PCI endpoint
[    0.690799] pci 0000:00:01.3: [8086:7000] type 00 class 0x060100 conventional PCI endpoint
[    0.693197] iommu: Default domain type: Translated
[    0.693501] iommu: DMA domain TLB invalidation policy: lazy mode
[    0.697016] SCSI subsystem initialized
[    0.697516] libata version 3.00 loaded.
[    0.699555] ACPI: bus type USB registered
[    0.701550] usbcore: registered new interface driver usbfs
[    0.703920] usbcore: registered new interface driver hub
[    0.704504] usbcore: registered new device driver usb
[    0.706743] pps_core: LinuxPPS API ver. 1 registered
[    0.707501] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.709943] PTP clock support registered
[    0.711745] Advanced Linux Sound Architecture Driver Initialized.
[    0.712579] NetLabel: Initializing
[    0.713501] NetLabel:  domain hash size = 128
[    0.714501] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.718767] NetLabel:  unlabeled traffic allowed by default
[    0.720956] PCI: Using ACPI for IRQ routing
[    0.721501] PCI: pci_cache_line_size set to 64 bytes
[    0.722520] e820: reserve RAM buffer [mem 0x0fff9000-0x0fffffff]
[    0.725628] vgaarb: loaded
[    0.728052] hpet: 3 channels of 0 reserved for per-cpu timers
[    0.728504] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 24
[    0.729501] hpet0: 3 comparators, 64-bit 10.000000 MHz counter
[    0.738014] clocksource: Switched to clocksource tsc-early
[    0.748985] VFS: Disk quotas dquot_6.6.0
[    0.756870] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.770118] pnp: PnP ACPI init
[    0.776215] pnp: PnP ACPI: found 1 devices
[    0.789814] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[    0.802675] NET: Registered PF_INET protocol family
[    0.807581] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.814879] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.823236] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.830994] TCP established hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.838747] TCP bind hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.845893] TCP: Hash tables configured (established 2048 bind 2048)
[    0.852260] UDP hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.858891] UDP-Lite hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.865958] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.871660] RPC: Registered named UNIX socket transport module.
[    0.877588] RPC: Registered udp transport module.
[    0.882295] RPC: Registered tcp transport module.
[    0.887005] RPC: Registered tcp-with-tls transport module.
[    0.892498] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.899119] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
[    0.905315] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff window]
[    0.911506] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[    0.917272] pci 0000:00:01.3: PIIX3: Enabling Passive Release
[    0.923029] pci 0000:00:00.0: quirk_passive_release+0x0/0x80 took 11256 usecs
[    0.930174] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[    0.936115] PCI: CLS 0 bytes, default 64
[    0.940085] Unpacking initramfs...
[    0.943508] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2f914bc4411, max_idle_ns: 440795317975 ns
[    0.963864] clocksource: Switched to clocksource tsc
[    0.973598] platform rtc_cmos: registered platform RTC device (no PNP device found)
[    0.989682] Initialise system trusted keyrings
[    0.995230] Freeing initrd memory: 2604K
[    0.999194] workingset: timestamp_bits=56 max_order=16 bucket_order=0
[    1.005715] NFS: Registering the id_resolver key type
[    1.010790] Key type id_resolver registered
[    1.014988] Key type id_legacy registered
[    1.019030] 9p: Installing v9fs 9p2000 file system support
[    1.033017] Key type asymmetric registered
[    1.037135] Asymmetric key parser 'x509' registered
[    1.042032] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    1.049450] io scheduler mq-deadline registered
[    1.054000] io scheduler kyber registered
[    1.058064] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
[    1.065503] ACPI: button: Power Button [PWRF]
[    1.069895] input: Sleep Button as /devices/LNXSYSTM:00/LNXSLPBN:00/input/input1
[    1.077329] ACPI: button: Sleep Button [SLPF]
[    1.081757] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    1.088125] 00:00: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    1.095654] Non-volatile memory driver v1.3
[    1.099860] Linux agpgart interface v0.103
[    1.104007] ACPI: bus type drm_connector registered
[    1.109349] loop: module loaded
[    1.112644] e100: Intel(R) PRO/100 Network Driver
[    1.117367] e100: Copyright(c) 1999-2006 Intel Corporation
[    1.122879] e1000: Intel(R) PRO/1000 Network Driver
[    1.127773] e1000: Copyright (c) 1999-2006 Intel Corporation.
[    1.133538] e1000e: Intel(R) PRO/1000 Network Driver
[    1.138515] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    1.144455] sky2: driver version 1.30
[    1.148188] usbcore: registered new interface driver usblp
[    1.153695] usbcore: registered new interface driver usb-storage
[    1.159731] i8042: PNP: No PS/2 controller found.
[    1.164464] i8042: Probing ports directly.
[    1.683822] i8042: Can't read CTR while initializing i8042
[    1.689328] i8042 i8042: probe with driver i8042 failed with error -5
[    1.695877] rtc_cmos rtc_cmos: only 24-hr supported
[    1.700809] device-mapper: ioctl: 4.50.0-ioctl (2025-04-28) initialised: dm-devel@lists.linux.dev
[    1.709702] intel_pstate: CPU model not supported
[    1.714431] hid: raw HID events driver (C) Jiri Kosina
[    1.719664] usbcore: registered new interface driver usbhid
[    1.725251] usbhid: USB HID core driver
[    1.729197] Initializing XFRM netlink socket
[    1.733501] NET: Registered PF_INET6 protocol family
[    1.738574] Segment Routing with IPv6
[    1.742259] In-situ OAM (IOAM) with IPv6
[    1.746214] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.752224] NET: Registered PF_PACKET protocol family
[    1.757305] 9pnet: Installing 9P2000 support
[    1.761593] Key type dns_resolver registered
[    1.765881] mce: Unable to init MCE device (rc: -5)
[    1.770789] microcode: Intel CPU family 0x0 not supported
[    1.776211] IPI shorthand broadcast: enabled
[    1.781947] sched_clock: Marking stable (1705037985, 76453384)->(2214122062, -432630693)
[    1.790098] registered taskstats version 1
[    1.794218] Loading compiled-in X.509 certificates
[    1.799844] Demotion targets for Node 0: null
[    1.804231] PM:   Magic number: 0:110:269243
[    1.808537] netconsole: network logging started
[    1.813097] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.821351] modprobe (45) used greatest stack depth: 12768 bytes left
[    1.828222] modprobe (46) used greatest stack depth: 12600 bytes left
[    1.834807] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.840587] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
[    1.847838] faux_driver regulatory: Direct firmware load for regulatory.db failed with error -2
[    1.856554] ALSA device list:
[    1.859541]   No soundcards found.
[    1.862965] cfg80211: failed to load regulatory.db
[    1.868128] Freeing unused kernel image (initmem) memory: 2816K
[    1.874097] Write protecting the kernel read-only data: 28672k
[    1.880183] Freeing unused kernel image (text/rodata gap) memory: 1408K
[    1.886904] Freeing unused kernel image (rodata/data gap) memory: 588K
[    1.924584] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[    1.931052] x86/mm: Checking user space page tables
[    1.966144] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[    1.972605] Run /init as init process
[    1.976282]   with arguments:
[    1.979265]     /init
[    1.981556]   with environment:
[    1.984713]     HOME=/
[    1.987089]     TERM=linux
Saving 256 bits [    1.998734] start-stop-daem (65) used greatest stack depth: 12584 bytes left
of creditable seed for next boot
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Starting network: OK
Starting crond: OK

Welcome to Buildroot
buildroot login: 

@dreamliner787-9 dreamliner787-9 force-pushed the x86_64_upstream_simple branch 3 times, most recently from 8b68cec to 8aba050 Compare March 19, 2026 04:54
@dreamliner787-9 dreamliner787-9 force-pushed the x86_64_upstream_simple branch 8 times, most recently from 28236b5 to 5a0f3dc Compare March 31, 2026 10:47
@dreamliner787-9 dreamliner787-9 force-pushed the x86_64_upstream_simple branch from 4f28839 to 2036786 Compare April 13, 2026 01:05
@midnightveil
Copy link
Copy Markdown
Contributor

Can this be split up more / cleaned up more? A lot of the commits seem to be fixes for previous commits. It would be easier if say ACPI, were different PRs.

There's too much to really look at it.

@dreamliner787-9
Copy link
Copy Markdown
Contributor Author

Can this be split up more / cleaned up more? A lot of the commits seem to be fixes for previous commits. It would be easier if say ACPI, were different PRs.

There's too much to really look at it.

Yep I'm still cleaning the code up, I'd imagine Ivan will want to squash everything before merging so I haven't really cleaned up the git history yet.

@dreamliner787-9 dreamliner787-9 force-pushed the x86_64_upstream_simple branch from 2036786 to b8f7f00 Compare April 13, 2026 01:23
Add virtualisation of x86 ACPI, APIC, CMOS, COM port, cpuid, guest
memory, HPET, instruction decoding, Port I/O, MSRs and PCI.

Currently, only booting raw Linux kernel and initial ramdisk is
supported. UEFI, virtio, PCI passthrough, etc not yet supported as of
this commit.

See github.com/au-ts/libvmm/tree/x86_64_rebased for original development
history.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
See github.com/au-ts/libvmm/tree/x86_64_rebased for original development
history.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Rather than hackily including the C header emitted
by the AML compiler.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
As it is not needed to boot bare Linux and Buildroot.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
To prevent cases where users forgets to in VMM, and so that the library
have more control over fault handling. As in certain cases for certain
VM exits, we must inject a fault into the VCPU.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Rather than manually measuring it which is error
prone and can cause Linux's timer watchdog to go
off

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Allow guests to properly use AVX extension if enabled by seL4. By
default seL4 doesn't enable AVX so there isn't an immediate benefit
from the commit. But if you enable AVX in seL4 then it will
automatically be enabled for the guest.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
To prevent undefined behaviours.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Mainly deduplicating port I/O fault handling code

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
@dreamliner787-9 dreamliner787-9 force-pushed the x86_64_upstream_simple branch from b8f7f00 to 174216f Compare April 14, 2026 04:58
So that we only need 1 timer driver channel.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Removed assumption that guest RAM starts from zero
for ACPI tables construction. Added more checks to
guard against buffer overflow. Made sure that all
tables are naturally aligned.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants