vmm/vmd/vmctl: standardize memory units to bytes
authordv <dv@openbsd.org>
Tue, 3 May 2022 21:39:18 +0000 (21:39 +0000)
committerdv <dv@openbsd.org>
Tue, 3 May 2022 21:39:18 +0000 (21:39 +0000)
commite545c54c39eba583df20ad368257dbafb2f27d17
treeea3a8e62cc25954254c1e1d90a7fd525b9509ee6
parentca53b3972a3b656d09d5c4cfc9a33477ef256cb0
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@
sys/arch/amd64/amd64/vmm.c
sys/arch/amd64/include/vmmvar.h
usr.sbin/vmctl/main.c
usr.sbin/vmctl/vmctl.c
usr.sbin/vmctl/vmctl.h
usr.sbin/vmd/parse.y
usr.sbin/vmd/vm.c
usr.sbin/vmd/vmd.h