summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyveload/bhyveload.c
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2014-06-24 02:02:51 +0000
committerneel <neel@FreeBSD.org>2014-06-24 02:02:51 +0000
commit921bfc7679df9cf30854447c544da55773e33c68 (patch)
tree052db2d099ae0ee24a9afe6f405800312938c422 /usr.sbin/bhyveload/bhyveload.c
parentd94b51f5b9d2ec82746ffdf57ecb15252cca123e (diff)
downloadFreeBSD-src-921bfc7679df9cf30854447c544da55773e33c68.zip
FreeBSD-src-921bfc7679df9cf30854447c544da55773e33c68.tar.gz
Provide APIs to directly get 'lowmem' and 'highmem' size directly.
Previously the sizes were inferred indirectly based on the size of the mappings at 0 and 4GB respectively. This works fine as long as size of the allocation is identical to the size of the mapping in the guest's address space. However, if the mapping is disjoint then this assumption falls apart (e.g., due to the legacy BIOS hole between 640KB and 1MB).
Diffstat (limited to 'usr.sbin/bhyveload/bhyveload.c')
-rw-r--r--usr.sbin/bhyveload/bhyveload.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c
index 4442496..ff6b269 100644
--- a/usr.sbin/bhyveload/bhyveload.c
+++ b/usr.sbin/bhyveload/bhyveload.c
@@ -505,8 +505,8 @@ static void
cb_getmem(void *arg, uint64_t *ret_lowmem, uint64_t *ret_highmem)
{
- vm_get_memory_seg(ctx, 0, ret_lowmem, NULL);
- vm_get_memory_seg(ctx, 4 * GB, ret_highmem, NULL);
+ *ret_lowmem = vm_get_lowmem_size(ctx);
+ *ret_highmem = vm_get_highmem_size(ctx);
}
struct env {
OpenPOWER on IntegriCloud