On 2022-12-14 14:57, Dave Voutila wrote:
Mischa <open...@mlst.nl> writes:
On 2022-12-13 20:29, Dave Voutila wrote:
Dave Voutila <d...@sisu.io> writes:
tech@,
The below diff tweaks how vmd and vmm define memory ranges (adding
a
"type" attribute) so we can properly build an e820 memory map to
hand to
things like SeaBIOS or the OpenBSD ramdisk kernel (when direct
booting
bsd.rd).
Why do it? We've been carrying a few patches to SeaBIOS in the
ports
tree to hack around how vmd articulates some memory range details.
By
finally implementing a proper bios memory map table we can drop
some of
those patches. (Diff to ports@ coming shortly.)
Bonus is it cleans up how we were hacking a bios memory map for
direct
booting ramdisk kernels.
Note: the below diff *will* work with the current SeaBIOS
(vmm-firmware), so you do *not* need to build the port.
You will, however, need to:
- build, install, & reboot into a new kernel
- make sure you update /usr/include/amd64/vmmvar.h with a copy of
symlink to sys/arch/amd64/include/vmmvar.h
- rebuild & install vmctl
- rebuild & install vmd
This should *not* result in any behavioral changes of current vmd
guests. If you notice any, especially guests failing to start,
please
rebuild a kernel with VMM_DEBUG to help diagnose the regression.
Updated diff to fix some accounting issues with guest memory. (vmctl
should report the correct max mem now.)
Booted... The memory display in vmctl show is normal again.
root@current:~ # vmctl show
ID PID VCPUS MAXMEM CURMEM TTY OWNER STATE NAME
4 56252 1 1.0G 989M ttyp4 runbsd04 running vm04
3 60536 1 8.0G 2.2G ttyp3 runbsd running vm03
2 20642 1 16.0G 3.4G ttyp2 runbsd running vm02
1 81947 1 30.0G 5.6G ttyp1 runbsd running vm01
All seems to running normal. Anything specific I need to look out for?
Other than the above, no not really. Going to keep this diff out on
tech@ a few days to allow folks with a variety of guests to test before
I ask for OK's to commit.
The next change will be SeaBIOS (vmm-firmware) once this lands.
Perfect! Will do some more tests and will let you know if I find
something.
Mischa