Up to [local] / src / usr.sbin / vmd
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.17 / (download) - annotate - [select for diffs], Tue Apr 25 12:46:13 2023 UTC (13 months, 2 weeks ago) by dv
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5,
OPENBSD_7_4_BASE,
OPENBSD_7_4,
HEAD
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)
vmm(4)/vmd(8): pull struct members out of vmm ioctl create struct. The object sent to vmm(4) contained file paths and details the kernel does not need for cpu virtualization as device emulation is in userland. Effectively, "pull up" the struct members from the vm_create_params struct to the parent vmop_create_params struct. This allows us to clean up some of vmd(8) and simplify things for switching to having vmctl(8) open the "kernel" file (SeaBIOS, bsd.rd, etc.) to allow users to boot recovery ramdisk kernels. ok mlarkin@
Revision 1.16 / (download) - annotate - [select for diffs], Thu Dec 30 08:12:23 2021 UTC (2 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE,
OPENBSD_7_3,
OPENBSD_7_2_BASE,
OPENBSD_7_2,
OPENBSD_7_1_BASE,
OPENBSD_7_1
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)
Add back support for -B net -b bsd.rd which emulates a PXE install and results in an autoinstall. This can be used to quickly create new OpenBSD installs. OK dv@
Revision 1.15 / (download) - annotate - [select for diffs], Wed Jun 16 16:55:02 2021 UTC (2 years, 11 months ago) by dv
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE,
OPENBSD_7_0
Changes since 1.14: +8 -1 lines
Diff to previous 1.14 (colored)
cleanup vmd(8) includes and header files Lots of organic growth other the years lead to unnecessary includes (proc.h everywhere) and odd dependencies between header files. This cleans things up a bit to help with upcoming cleanup around dhcp code. No functional change. "go for it" mlarkin@
Revision 1.14 / (download) - annotate - [select for diffs], Mon Apr 5 18:09:48 2021 UTC (3 years, 2 months ago) by dv
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE,
OPENBSD_6_9
Changes since 1.13: +5 -3 lines
Diff to previous 1.13 (colored)
Support booting from compressed kernel images. The bsd.rd ramdisk now ships gzip'd on amd64. Use libz in base to transparently handle decompression of any compressed kernel images. Patch from Josh Rickmar. ok kn@
Revision 1.13 / (download) - annotate - [select for diffs], Fri Mar 19 09:29:33 2021 UTC (3 years, 2 months ago) by kn
Branch: MAIN
Changes since 1.12: +2 -4 lines
Diff to previous 1.12 (colored)
Remove booting from kernels in raw/qcow2 images Diff and (slightly tweaked) text below from Dave Voutila < dave at sisu dot io >, thanks! -- Since 6.7 switched to FFS2 as the default filesystem for new installs, the ability for vmd(8) to load a kernel and boot.conf from a disk image directly (without SeaBIOS) has been broken. A diff from tb to add FFS2 support never mdae it into the tree. On 5th Jan 2021, new ramdisks for amd64 have started shipping gzipped, breaking the ability to load the bsd.rd directly as a kernel image for a vmd guest without first uncompressing the image. Using BIOS works, the FFS2 change happend ten months ago and few if any have complained about the breakage. vmctl(8) is still vague about supporting it per its man page and one still has to pass the disk image twice as a "-b" and "-d" argument to boot an OpenBSD guest *without* BIOS. Josh Rickmar reported the gzip issue on bugs@ and provided patches to add support for compressed ramdisks and kernel images. The easiest way to do so is to drop support for FFS images since they require a call to fmemopen(3) while all the other logic uses fopen(3)/fdopen(3) calls and a file descriptor. It is much easier to get thsoe patches merged if they don't have to account for extracting files from disk images. -- No objections anyone "Removing it makes sense" reyk (who wrote the FFS module) OK mlarkin
Revision 1.12 / (download) - annotate - [select for diffs], Thu May 16 21:16:04 2019 UTC (5 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE,
OPENBSD_6_8,
OPENBSD_6_7_BASE,
OPENBSD_6_7,
OPENBSD_6_6_BASE,
OPENBSD_6_6
Changes since 1.11: +1 -2 lines
Diff to previous 1.11 (colored)
Unbreak vmctl start foo -b /bsd -d disk.img -cL Define a local definition of LOADADDR() instead of pulling in machine/loadfile_machdep.h. vmd -b requires the addresses to be masked and the new bootloader no longer does that. OK pd@ kettenis@
Revision 1.11 / (download) - annotate - [select for diffs], Thu Dec 6 09:20:06 2018 UTC (5 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE,
OPENBSD_6_5
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)
Make it possible to define the bootdevice in vmd. This information is used currently only when booting a OpenBSD kernel. If VMBOOTDEV_NET is used the internal dhcp server will pass "auto_install" as boot file to the client and the boot loader passes the MAC of the first interface to the kernel to indicate PXE booting. Adding boot order support to SeaBIOS is not yet implemented. Ok ccardenas@
Revision 1.10 / (download) - annotate - [select for diffs], Wed Nov 29 02:46:10 2017 UTC (6 years, 6 months ago) by mlarkin
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE,
OPENBSD_6_4,
OPENBSD_6_3_BASE,
OPENBSD_6_3
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)
make vmm(4) less responsible for initial register state, preferring to let usermode daemons handle that. ok pd@
Revision 1.9 / (download) - annotate - [select for diffs], Wed Jun 7 14:41:53 2017 UTC (7 years ago) by mlarkin
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE,
OPENBSD_6_2
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)
vmd: properly advertise 640k base memory, not 636k. That was a holdover from before we had seabios support (to fake a hole where the EBDA would be), and seabios always assumes 640k low memory is available. Fixes a problem where FreeDOS guests whose seabios placed the virtio ring too close to 640k would crash vmd. tested on a variety of guest OS, with and without seabios. no regressions seen.
Revision 1.8 / (download) - annotate - [select for diffs], Sat Mar 25 16:28:25 2017 UTC (7 years, 2 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE,
OPENBSD_6_1
Changes since 1.7: +4 -2 lines
Diff to previous 1.7 (colored)
Boot using BIOS from /etc/firmware/vmm-bios by default. Instead of using the internal "vmboot", VMs will now be booted using the external BIOS firmware in /etc/firmware/vmm-bios (which is subject to a LGPLv3 license). Direct booting of OpenBSD kernels or non-default BIOS images is still supported for now using the -b/boot option that is replacing the -k/kernel option. As requested by Theo, vmd(8) fails if neither the default BIOS is found nor a kernel has been specified in the VM configuration. The "vmm" BIOS has to be installed using fw_update(1), which will be done automatically in most cases where the OpenBSD can fetch it after install/upgrade. OK mlarkin@
Revision 1.7 / (download) - annotate - [select for diffs], Sat Nov 26 20:03:42 2016 UTC (7 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)
Implement basic support for boot.conf(8) on the disk image. Like the real boot loader, load and parse hd0a:/etc/boot.conf from the first disk and fall back to /bsd. Not all boot loader options are supported, but it at least does set device, set image, and boot -acds (eg. for booting single-user). For example, it can now boot install60.fs that includes a boot.conf with "set image /6.0/amd64/bsd.rd": vmctl start install -c -d install60.fs -d OpenBSD.img This pseudo-bootloader is only needed without BIOS and could potentially be replaced in the future. OK mlarkin@
Revision 1.6 / (download) - annotate - [select for diffs], Thu Nov 24 07:58:55 2016 UTC (7 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)
Add support for booting the kernel from the disk image. This make the kernel/-k argument optional and, if not specified, tries to find the /bsd kernel in the primary hd0a partition of the first disk image itself. It doesn't support hd0a:/etc/boot.conf yet, and it is no BIOS or full boot loader, but it makes booting and handling of VMs a bit easier - booting an external kernel is still supported. The UFS file system code ufs.c is directly from libsa which is also used by the real boot loader. The code compiles with a few signedness warning which will be fixed separately. OK mlarkin@
Revision 1.5 / (download) - annotate - [select for diffs], Thu Sep 1 16:04:47 2016 UTC (7 years, 9 months ago) by stefan
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)
Make vcpu_reset_regs use new writeregs code Makes reset code a little simpler. ok mlarkin@
Revision 1.4 / (download) - annotate - [select for diffs], Tue Apr 5 09:33:05 2016 UTC (8 years, 2 months ago) by mlarkin
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE,
OPENBSD_6_0
Changes since 1.3: +9 -1 lines
Diff to previous 1.3 (colored)
Support processors without unrestricted guest capability. ok stefan
Revision 1.3 / (download) - annotate - [select for diffs], Sun Mar 13 13:11:47 2016 UTC (8 years, 2 months ago) by stefan
Branch: MAIN
Changes since 1.2: +5 -2 lines
Diff to previous 1.2 (colored)
Introduce memory ranges to support VMs with >= 4G RAM Kernel bits: - When creating a VM, a list of memory ranges has to be specified, similar to the BIOS memory map. This is necessary for VMs with RAM sizes approaching 4G because we'll need PCI MMIO space in the higher parts of the 32 bit address space. vmctl and vmd bits: - Construct appropriate memory ranges to create a VM with a given RAM size - Construct a corresponding BIOS memory map from the memory ranges and update the boot params page accordingly. - Make sure that all variables that represent guest physical addresses match the address width of the target CPU instead of using uint32_t. - Fix some integer promotion glitches that actually restricted VM RAM size to 2G. This changes the VM create ioctl interface, so update your kernel, vmd, and vmctl. ok mlarkin@
Revision 1.2 / (download) - annotate - [select for diffs], Thu Dec 17 09:29:28 2015 UTC (8 years, 5 months ago) by mlarkin
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE,
OPENBSD_5_9
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)
Move vcpu register state init to vmd. Allows vmd bootloader to make the decision as to how the vcpu should be set up for initial start and reset. Also removes some hardcoded register constants from vmm(4). ok jsing@, mpi@
Revision 1.1 / (download) - annotate - [select for diffs], Sun Nov 22 20:20:32 2015 UTC (8 years, 6 months ago) by mlarkin
Branch: MAIN
vmd(8) - virtual machine daemon. There is still a lot to be done, and fixed, in these userland components but I have received enough "it works, commit it" emails that it's time to finish those things in tree. discussed with many, tested by many.