History log of /openbsd-src/usr.sbin/vmd/loadfile_elf.c (Results 1 – 25 of 50)
Revision Date Author Comments
# 65bbee46 26-Sep-2024 jsg <jsg@openbsd.org>

remove unneeded includes; ok dv@ mlarkin@


# f4b47ae8 11-Sep-2024 bluhm <bluhm@openbsd.org>

Implement AMD SEV support in vmd(8).

To launch a guest with AMD SEV enabled, vmd needs to do a few things:
- retrieve ASID used by guest on VM creation
- provide ASID to psp(4)
- let psp(4) encrypt

Implement AMD SEV support in vmd(8).

To launch a guest with AMD SEV enabled, vmd needs to do a few things:
- retrieve ASID used by guest on VM creation
- provide ASID to psp(4)
- let psp(4) encrypt memory used intially by guest
- run guest
- release resources held by psp(4) on guest shutdown
To enable SEV for a guest use the parameter "sev" in the guest's vm
section in vm.conf.

from hshoexer@; OK mlarkin@

show more ...


# ba66f564 09-Jul-2024 dv <dv@openbsd.org>

vmd/vmm: move vm_run_params into mi header.

To prepare for mi/md splitting vmd, need to fixup the dev/vmm/vmm.h
mi header. Move the vm_run_params struct and clean up the includes
in vmd.

"sure", ml

vmd/vmm: move vm_run_params into mi header.

To prepare for mi/md splitting vmd, need to fixup the dev/vmm/vmm.h
mi header. Move the vm_run_params struct and clean up the includes
in vmd.

"sure", mlarkin@

show more ...


# 73a98491 25-Apr-2023 dv <dv@openbsd.org>

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
i

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@

show more ...


# 6bae335d 19-Apr-2023 jsg <jsg@openbsd.org>

remove duplicate includes


# 3a50f0a9 28-Dec-2022 jmc <jmc@openbsd.org>

spelling fixes; from paul tagliamonte
any parts of his diff not taken are noted on tech


# cf08ffab 26-Dec-2022 dv <dv@openbsd.org>

vmd(8): provide a detailed e820 memory map.

When booting guests with SeaBIOS, vmd(8) supplied details about the
available guest memory via CMOS registers. Consequently, we've been
carrying some patc

vmd(8): provide a detailed e820 memory map.

When booting guests with SeaBIOS, vmd(8) supplied details about the
available guest memory via CMOS registers. Consequently, we've been
carrying some patches in the ports tree to SeaBIOS to fetch this
information like it's the 1990s.

When a vm initializes memory ranges, we now track what each range
represents. This information can be used to supply the e820 memory
map to SeaBIOS via the fw_cfg interface allowing it to properly
communicate memory ranges to a guest operating system. (This will
also allow us to drop some patches from the port.)

Given the ranges can now be marked with a purpose, this also allows
vmm(4) to switch from hard-coded mmio ranges and instead let the
information on the memory range dictate if vmm should be handling
a page fault or sending to vmd for a memory assist.

Tested by Mischa Peters and others. OK mlarkin@.

show more ...


# 8652dcf0 28-Nov-2022 dv <dv@openbsd.org>

vmd(8): zero consdev in bootargs to fix booting ramdisks

Mischa Peters reported that booting a bsd.rd from 7.2 or newer
stopped working with vmd(8) in 7.2.

Direct booting kernels requires vmd to bu

vmd(8): zero consdev in bootargs to fix booting ramdisks

Mischa Peters reported that booting a bsd.rd from 7.2 or newer
stopped working with vmd(8) in 7.2.

Direct booting kernels requires vmd to build boot args in guest
memory. Recently, the bios_consdev_t struct changed in amd64
machdep.c, adding additional struct members. vmd wasn't zeroing out
the struct, causing the booted kernel to read garbage.

While here, cleanup some of push_bootargs to use descriptive names
for boot args and standardize on explicit usage of uint32_t.

ok claudio, mlarkin

show more ...


# 6668a736 28-Jan-2022 guenther <guenther@openbsd.org>

When it's the possessive of 'it', it's spelled "its", without the
apostrophe.


# 98142e86 04-Jan-2022 claudio <claudio@openbsd.org>

Fix some simple -Wunused-but-set-variable warnings.
OK benno@ dv@


# 3227aa04 30-Dec-2021 claudio <claudio@openbsd.org>

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@


# 4dcbda62 04-May-2021 dv <dv@openbsd.org>

gzread(3) doesn't always set errno, so use gzerror(3)

Compression errors from libz don't set errno.

OK mlarkin@


# 45bdc46f 05-Apr-2021 dv <dv@openbsd.org>

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

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@

show more ...


# a13de4d1 19-Mar-2021 kn <kn@openbsd.org>

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

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

show more ...


# 174697be 26-Oct-2020 visa <visa@openbsd.org>

Remove an unneeded variable.

OK kettenis@


# 65d68140 16-May-2019 claudio <claudio@openbsd.org>

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 bootlo

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@

show more ...


# 6fc949a7 01-Mar-2019 mlarkin <mlarkin@openbsd.org>

vmd(8): remove some i386 remnants that missed the original cleanup

ok pd, kn, deraadt


# c4bec800 12-Dec-2018 claudio <claudio@openbsd.org>

Simplify mbzero() by using mem_write with a NULL buf which does zero out
all memory at once without having to use a zero buffer.
OK mlarkin@


# fa2284ec 12-Dec-2018 claudio <claudio@openbsd.org>

Set the com speed to 115200 like we do in our bootloader when using SeaBIOS.
OK mlarkin@


# cc104512 06-Dec-2018 claudio <claudio@openbsd.org>

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

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@

show more ...


# 57544062 17-Jul-2018 mlarkin <mlarkin@openbsd.org>

vmd(8): fix vmctl -b option for i386 kernels.

ok pd@


# c96d1163 29-Nov-2017 mlarkin <mlarkin@openbsd.org>

make vmm(4) less responsible for initial register state, preferring to let
usermode daemons handle that.

ok pd@


# cea90f51 27-Nov-2017 mlarkin <mlarkin@openbsd.org>

typo in comments "optionel" -> "optional"


# 9f79a698 29-Oct-2017 mpi <mpi@openbsd.org>

Prefer <elf.h> to the non portable <sys/exec_elf.h>.

ok jca@, deraadt@


# f9eeb76b 27-Mar-2017 deraadt <deraadt@openbsd.org>

die whitespace die die die


12