On Tue, May 03, 2022 at 03:39:19PM -0600, Dave Voutila wrote: > CVSROOT: /cvs > Module name: src > Changes by: d...@cvs.openbsd.org 2022/05/03 15:39:19 > > Modified files: > usr.sbin/vmd : parse.y vm.c vmd.h > usr.sbin/vmctl : main.c vmctl.c vmctl.h > sys/arch/amd64/amd64: vmm.c > sys/arch/amd64/include: vmmvar.h > > Log message: > vmm/vmd/vmctl: standardize memory units to bytes > > At different points in the vm lifecycle vmm(4), vmctl(8), and vmd(8) > refer to a vm's memory range sizes in either bytes or megabytes. > This is needlessly complex. > > Switch to using bytes everywhere and adjust types and constants > accordingly. While this makes it possible to specify vm's with > memory in fractions of megabytes, the logic requiring whole > megabyte values remains. > > Feedback from deraadt@, mlarkin@, and Matthew Martin. > > ok mlarkin@
This broke regress. > usr.sbin/vmd: Exit: 1 Duration: 00:00:03 Log: 253-usr.sbin-vmd.log ==== run-pass-memory-round ==== /usr/sbin/vmd -n -f /home/src/regress/usr.sbin/vmd/config/vmd-pass-memory-round.conf 2>&1 | diff -u /home/src/regress/usr.sbin/vmd/config/vmd-pass-memory-round.ok /dev/stdin --- /home/src/regress/usr.sbin/vmd/config/vmd-pass-memory-round.ok Wed Oct 11 14:01:20 2017 +++ /dev/stdin Thu May 5 06:04:37 2022 @@ -1,2 +1,2 @@ -size rounded to 1023 megabytes +memory size rounded to 1023M configuration OK *** Error 1 in config (Makefile:15 'run-pass-memory-round') FAILED ==== run-fail-too-few-ram ==== /usr/sbin/vmd -n -f /home/src/regress/usr.sbin/vmd/config/vmd-fail-too-few-ram.conf 2>&1 | cut -d : -f 2,3,4 | diff -u /home/src/regress/usr.sbin/vmd/config/vmd-fail-too-few-ram.ok /dev/stdin --- /home/src/regress/usr.sbin/vmd/config/vmd-fail-too-few-ram.ok Wed Oct 11 14:01:20 2017 +++ /dev/stdin Thu May 5 06:04:38 2022 @@ -1,2 +1,2 @@ -size must be at least one megabyte +memory size must be at least 1MB 4: failed to parse size: 1048575 *** Error 1 in config (Makefile:22 'run-fail-too-few-ram') FAILED ==== run-regress-vioscribble ==== rm -f scribble.{raw,qcow2} vioscribble.d vioqcow2.d vioraw.d log.d /usr/sbin/vmctl create -s 4G scribble.raw vmctl: create imagefile operation failed: File too large *** Error 1 in diskfmt (Makefile:24 'setup') FAILED