OpenBSD CVS

CVS log for src/usr.sbin/vmd/fw_cfg.c


[BACK] Up to [local] / src / usr.sbin / vmd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.8 / (download) - annotate - [select for diffs], Sun Feb 4 14:53:12 2024 UTC (3 months, 3 weeks ago) by dv
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Reverse calloc args.

Found by smatch "double check that we're allocating correct size"
warning. Reported by and ok jsg@.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Feb 6 20:33:34 2023 UTC (15 months, 3 weeks ago) by dv
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.6: +16 -6 lines
Diff to previous 1.6 (colored)

vmd(8): scan pci bus to determine bootorder strings.

vmd's SeaBIOS bootorder strings had hardcoded pci device ids, so
if a user added a network interface the bootorder strings didn't
line up with reality. Using vmctl(8) to boot from a cdrom (-B cdrom)
would fail, for instance, if attaching both a nic and a disk as
well.

This change scans the pci devices and finds the first of each type
to construct viable bootorder strings.

ok jan@

Revision 1.6 / (download) - annotate - [select for diffs], Mon Dec 26 23:50:20 2022 UTC (17 months ago) by dv
Branch: MAIN
Changes since 1.5: +20 -1 lines
Diff to previous 1.5 (colored)

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@.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Nov 5 10:18:50 2021 UTC (2 years, 6 months ago) by jan
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

Fix bootorder string for disk

ok mlarkin@

Revision 1.4 / (download) - annotate - [select for diffs], Thu Nov 4 17:50:05 2021 UTC (2 years, 6 months ago) by jan
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

Fix broken "boot device cdrom" feature after a fix in seabios.

seabios fixes wrong LUN handling upstream.  Thus, we have to adapt the LUN
of our cdrom bootorder string, too.

ok brynet@, dv@

Revision 1.3 / (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.2: +1 -2 lines
Diff to previous 1.2 (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.2 / (download) - annotate - [select for diffs], Fri Oct 11 15:25:40 2019 UTC (4 years, 7 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

use sizeof(struct) not sizeof(pointer) in calloc call
ok deraadt@

Revision 1.1 / (download) - annotate - [select for diffs], Mon Dec 10 21:30:33 2018 UTC (5 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5

Implement the fw_cfg interface basics and use it to set the bootorder
if a bootdevice was forced. This implements both the pure IO port interface
and also the new DMA interface, a few direct commands are implemented which
are needed but in general the "file" interface should be used. There is no
write support for the guest. Tested against the latest vmm-firmware port.
This requires also a -current kernel to pass the IO ports to vmd(8).
OK mlarkin@ ccardenas@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.