The hypervisor requires memory and allocates it transparently, e.g. on my T4-2 with 128G in factory-default configuration without guests, the primary domain boots into OBP with 127.5G while the PRI presents 127.62M of physical memory available.
Documentation about those machine dependent allocations seems scarse, I haven't found any so far except for M10/M12 machines of which I don't even know whether OpenBSD would boot on them. ldomctl works with what it gets from the PRI and some configurations (nearly) exhausting the available memory may fail to boot as the hypervisor rejects the configuration, sadly with all too generic memory related warnings. Can we highlight these circumstances under BUGS? I think it helps to shed some light on this until we find proper documentation to fix this or some way to handle this from within ldomctl. Feedback? OK? Index: ldom.conf.5 =================================================================== RCS file: /cvs/src/usr.sbin/ldomctl/ldom.conf.5,v retrieving revision 1.9 diff -u -p -r1.9 ldom.conf.5 --- ldom.conf.5 3 Dec 2019 21:07:03 -0000 1.9 +++ ldom.conf.5 4 Jan 2020 22:51:52 -0000 @@ -107,3 +107,18 @@ On a machine with 32 cores and 64GB phys .Xr eeprom 8 , .Xr ldomctl 8 , .Xr ldomd 8 +.Sh BUGS +The hypervisor requires a machine dependent amount of physical memory that is +reserved automatically. +Although the Physical Resource Inventory +.Pq Em PRI +seems to account for this by presenting less available memory, using the entire +amount via +.Ic memory +is not always successful, e.g. the hypervisor would reject the configuration and +fallback to +.Dq factory-default +upon resetting the machine. +.Pp +If in doubt, leave enough memory unused for the hypervisor to reserve. +On bigger T4 based machines, 1024 megabytes has proven to suffice.
