Module Name: src
Committed By: imil
Date: Fri Mar 28 05:54:49 UTC 2025
Modified Files:
src/sys/arch/amd64/conf: MICROVM
src/sys/arch/i386/conf: MICROVM
Added Files:
src/sys/arch/x86/conf: MICROVM.common
Log Message:
x86: consolidate MICROVM kernel configurations
Move common configuration options from amd64/conf/MICROVM and
i386/conf/MICROVM into a shared x86/conf/MICROVM.common file.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amd64/conf/MICROVM
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/conf/MICROVM
cvs rdiff -u -r0 -r1.1 src/sys/arch/x86/conf/MICROVM.common
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amd64/conf/MICROVM
diff -u src/sys/arch/amd64/conf/MICROVM:1.2 src/sys/arch/amd64/conf/MICROVM:1.3
--- src/sys/arch/amd64/conf/MICROVM:1.2 Thu Mar 27 12:22:43 2025
+++ src/sys/arch/amd64/conf/MICROVM Fri Mar 28 05:54:49 2025
@@ -1,4 +1,4 @@
-# $NetBSD: MICROVM,v 1.2 2025/03/27 12:22:43 riastradh Exp $
+# $NetBSD: MICROVM,v 1.3 2025/03/28 05:54:49 imil Exp $
#
# MICROVM kernel configuration, for use with Qemu microvm machine type
# or Firecracker.
@@ -19,119 +19,7 @@
# -global virtio-mmio.force-legacy=false -serial stdio
machine amd64 x86 xen
-include "conf/std" # MI standard options
-include "arch/xen/conf/std.xenversion"
-options CPU_IN_CKSUM
-options EXEC_ELF64 # exec ELF binaries
-options EXEC_SCRIPT # exec #! scripts
-options MTRR
-options MULTIPROCESSOR
-
-options CHILD_MAX=1024 # 160 is too few
-options OPEN_MAX=1024 # 128 is too few
-
-mainbus0 at root
-cpu* at mainbus?
-ioapic* at mainbus? apid ?
-
-options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-maxusers 8 # estimated number of users
-
-options INSECURE # disable kernel security levels - X needs this
-
-options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
-
-options PIPE_SOCKETPAIR # smaller, but slower pipe(2)
-
-# Xen PV support for PVH and HVM guests, needed for PVH boot
-options XENPVHVM
-options XEN
-hypervisor* at mainbus? # Xen hypervisor
-xenbus* at hypervisor? # Xen virtual bus
-xencons* at hypervisor? # Xen virtual console
-
-# Include NetBSD 10 compatibility
-options COMPAT_100
-#
-# Because gcc omits the frame pointer for any -O level, the line below
-# is needed to make backtraces in DDB work.
-#
-makeoptions COPTS="-O2 -fno-omit-frame-pointer"
-
-# File systems
-#include "conf/filesystems.config"
-file-system FFS
-file-system EXT2FS
-file-system KERNFS
-file-system MFS
-file-system TMPFS
-file-system PTYFS
-file-system MSDOSFS
-file-system PROCFS
-
-options DKWEDGE_AUTODISCOVER
-options DKWEDGE_METHOD_GPT
-# File system options
-# ffs
-options FFS_NO_SNAPSHOT # No FFS snapshot support
-options WAPBL # File system journaling support
-
-# Networking options
-#options GATEWAY # packet forwarding
-options INET # IP + ICMP + TCP + UDP
-options INET6 # IPV6
-
-# Kernel root file system and dump configuration.
-config netbsd root on ? type ?
+include "arch/x86/conf/MICROVM.common"
-#
-# Device configuration
-#
-
-# ACPI will be used if present. If not it will fall back to MPBIOS
-options MPBIOS # configure CPUs and APICs using MPBIOS
-# Provide bug-for-bug compatibility with Linux in MP Table searching
-# and parsing. Firecracker relies on these bugs.
-options MPTABLE_LINUX_BUG_COMPAT
-
-#pci* at mainbus? bus ?
-#acpi0 at mainbus0
-
-# ISA bus support
-isa0 at mainbus?
-
-# ISA serial interfaces
-com0 at isa? port 0x3f8 irq 4 # Standard PC serial ports
-
-# Virtual bus for non-PCI devices
-pv* at pvbus?
-
-## Virtio devices
-# Use MMIO by default
-virtio* at pv?
-#virtio* at acpi?
-#virtio* at pci? dev ? function ? # Virtio PCI device
-
-include "dev/virtio/virtio.config"
-no viomb* at virtio? # XXX ?
-no vioscsi* at virtio? # XXX ?
-
-pseudo-device md # memory disk device (ramdisk)
-#options MEMORY_DISK_HOOKS # enable md specific hooks
-#options MEMORY_DISK_DYNAMIC # enable dynamic resizing
-#
-pseudo-device vnd # disk-like interface to files
-#options VND_COMPRESSION # compressed vnd(4)
-
-## network pseudo-devices
-pseudo-device bpfilter # Berkeley packet filter
-pseudo-device loop # network loopback
-
-## miscellaneous pseudo-devices
-pseudo-device pty # pseudo-terminals
-# userland interface to drivers, including autoconf and properties retrieval
-pseudo-device drvctl
-
-file-system PUFFS
-pseudo-device putter
+options EXEC_ELF64 # exec ELF binaries
Index: src/sys/arch/i386/conf/MICROVM
diff -u src/sys/arch/i386/conf/MICROVM:1.2 src/sys/arch/i386/conf/MICROVM:1.3
--- src/sys/arch/i386/conf/MICROVM:1.2 Thu Mar 27 12:22:44 2025
+++ src/sys/arch/i386/conf/MICROVM Fri Mar 28 05:54:49 2025
@@ -1,4 +1,4 @@
-# $NetBSD: MICROVM,v 1.2 2025/03/27 12:22:44 riastradh Exp $
+# $NetBSD: MICROVM,v 1.3 2025/03/28 05:54:49 imil Exp $
#
# MICROVM kernel configuration, for use with Qemu microvm machine type
# or Firecracker.
@@ -19,119 +19,7 @@
# -global virtio-mmio.force-legacy=false -serial stdio
machine i386 x86 xen
-include "conf/std" # MI standard options
-include "arch/xen/conf/std.xenversion"
-options CPU_IN_CKSUM
-options EXEC_ELF32 # exec ELF binaries
-options EXEC_SCRIPT # exec #! scripts
-options MTRR
-options MULTIPROCESSOR
-
-options CHILD_MAX=1024 # 160 is too few
-options OPEN_MAX=1024 # 128 is too few
-
-mainbus0 at root
-cpu* at mainbus?
-ioapic* at mainbus? apid ?
-
-options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-maxusers 8 # estimated number of users
-
-options INSECURE # disable kernel security levels - X needs this
-
-options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
-
-options PIPE_SOCKETPAIR # smaller, but slower pipe(2)
-
-# Xen PV support for PVH and HVM guests, needed for PVH boot
-options XENPVHVM
-options XEN
-hypervisor* at mainbus? # Xen hypervisor
-xenbus* at hypervisor? # Xen virtual bus
-xencons* at hypervisor? # Xen virtual console
-
-# Include NetBSD 10 compatibility
-options COMPAT_100
-#
-# Because gcc omits the frame pointer for any -O level, the line below
-# is needed to make backtraces in DDB work.
-#
-makeoptions COPTS="-O2 -fno-omit-frame-pointer"
-
-# File systems
-#include "conf/filesystems.config"
-file-system FFS
-file-system EXT2FS
-file-system KERNFS
-file-system MFS
-file-system TMPFS
-file-system PTYFS
-file-system MSDOSFS
-file-system PROCFS
-
-options DKWEDGE_AUTODISCOVER
-options DKWEDGE_METHOD_GPT
-# File system options
-# ffs
-options FFS_NO_SNAPSHOT # No FFS snapshot support
-options WAPBL # File system journaling support
-
-# Networking options
-#options GATEWAY # packet forwarding
-options INET # IP + ICMP + TCP + UDP
-options INET6 # IPV6
-
-# Kernel root file system and dump configuration.
-config netbsd root on ? type ?
+include "arch/x86/conf/MICROVM.common"
-#
-# Device configuration
-#
-
-# ACPI will be used if present. If not it will fall back to MPBIOS
-options MPBIOS # configure CPUs and APICs using MPBIOS
-# Provide bug-for-bug compatibility with Linux in MP Table searching
-# and parsing. Firecracker relies on these bugs.
-options MPTABLE_LINUX_BUG_COMPAT
-
-#pci* at mainbus? bus ?
-#acpi0 at mainbus0
-
-# ISA bus support
-isa0 at mainbus?
-
-# ISA serial interfaces
-com0 at isa? port 0x3f8 irq 4 # Standard PC serial ports
-
-# Virtual bus for non-PCI devices
-pv* at pvbus?
-
-## Virtio devices
-# Use MMIO by default
-virtio* at pv?
-#virtio* at acpi?
-#virtio* at pci? dev ? function ? # Virtio PCI device
-
-include "dev/virtio/virtio.config"
-no viomb* at virtio? # XXX ?
-no vioscsi* at virtio? # XXX ?
-
-pseudo-device md # memory disk device (ramdisk)
-#options MEMORY_DISK_HOOKS # enable md specific hooks
-#options MEMORY_DISK_DYNAMIC # enable dynamic resizing
-#
-pseudo-device vnd # disk-like interface to files
-#options VND_COMPRESSION # compressed vnd(4)
-
-## network pseudo-devices
-pseudo-device bpfilter # Berkeley packet filter
-pseudo-device loop # network loopback
-
-## miscellaneous pseudo-devices
-pseudo-device pty # pseudo-terminals
-# userland interface to drivers, including autoconf and properties retrieval
-pseudo-device drvctl
-
-file-system PUFFS
-pseudo-device putter
+options EXEC_ELF32 # exec ELF binaries
Added files:
Index: src/sys/arch/x86/conf/MICROVM.common
diff -u /dev/null src/sys/arch/x86/conf/MICROVM.common:1.1
--- /dev/null Fri Mar 28 05:54:49 2025
+++ src/sys/arch/x86/conf/MICROVM.common Fri Mar 28 05:54:49 2025
@@ -0,0 +1,117 @@
+# $NetBSD: MICROVM.common,v 1.1 2025/03/28 05:54:49 imil Exp $
+
+include "conf/std" # MI standard options
+include "arch/xen/conf/std.xenversion"
+
+options CPU_IN_CKSUM
+options EXEC_SCRIPT # exec #! scripts
+options MTRR
+options MULTIPROCESSOR
+
+options CHILD_MAX=1024 # 160 is too few
+options OPEN_MAX=1024 # 128 is too few
+
+mainbus0 at root
+cpu* at mainbus?
+ioapic* at mainbus? apid ?
+
+options INCLUDE_CONFIG_FILE # embed config file in kernel binary
+maxusers 8 # estimated number of users
+
+options INSECURE # disable kernel security levels - X needs this
+
+options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
+
+options PIPE_SOCKETPAIR # smaller, but slower pipe(2)
+
+# Xen PV support for PVH and HVM guests, needed for PVH boot
+options XENPVHVM
+options XEN
+hypervisor* at mainbus? # Xen hypervisor
+xenbus* at hypervisor? # Xen virtual bus
+xencons* at hypervisor? # Xen virtual console
+
+# Include NetBSD 10 compatibility
+options COMPAT_100
+#
+# Because gcc omits the frame pointer for any -O level, the line below
+# is needed to make backtraces in DDB work.
+#
+makeoptions COPTS="-O2 -fno-omit-frame-pointer"
+
+# File systems
+#include "conf/filesystems.config"
+file-system FFS
+file-system EXT2FS
+file-system KERNFS
+file-system MFS
+file-system TMPFS
+file-system PTYFS
+file-system MSDOSFS
+file-system PROCFS
+
+options DKWEDGE_AUTODISCOVER
+options DKWEDGE_METHOD_GPT
+# File system options
+# ffs
+options FFS_NO_SNAPSHOT # No FFS snapshot support
+options WAPBL # File system journaling support
+
+# Networking options
+#options GATEWAY # packet forwarding
+options INET # IP + ICMP + TCP + UDP
+options INET6 # IPV6
+
+# Kernel root file system and dump configuration.
+config netbsd root on ? type ?
+
+#
+# Device configuration
+#
+
+# ACPI will be used if present. If not it will fall back to MPBIOS
+options MPBIOS # configure CPUs and APICs using MPBIOS
+# Provide bug-for-bug compatibility with Linux in MP Table searching
+# and parsing. Firecracker relies on these bugs.
+options MPTABLE_LINUX_BUG_COMPAT
+
+#pci* at mainbus? bus ?
+#acpi0 at mainbus0
+
+# ISA bus support
+isa0 at mainbus?
+
+# ISA serial interfaces
+com0 at isa? port 0x3f8 irq 4 # Standard PC serial ports
+
+# Virtual bus for non-PCI devices
+pv* at pvbus?
+
+## Virtio devices
+# Use MMIO by default
+virtio* at pv?
+#virtio* at acpi?
+#virtio* at pci? dev ? function ? # Virtio PCI device
+
+include "dev/virtio/virtio.config"
+no viomb* at virtio? # XXX ?
+no vioscsi* at virtio? # XXX ?
+
+pseudo-device md # memory disk device (ramdisk)
+#options MEMORY_DISK_HOOKS # enable md specific hooks
+#options MEMORY_DISK_DYNAMIC # enable dynamic resizing
+#
+pseudo-device vnd # disk-like interface to files
+#options VND_COMPRESSION # compressed vnd(4)
+
+## network pseudo-devices
+pseudo-device bpfilter # Berkeley packet filter
+pseudo-device loop # network loopback
+
+## miscellaneous pseudo-devices
+pseudo-device pty # pseudo-terminals
+# userland interface to drivers, including autoconf and properties retrieval
+pseudo-device drvctl
+
+file-system PUFFS
+pseudo-device putter