freebsd-src/lib/libvmmapi
Mark Johnston 7e0fa79412 libvmmapi: Make memory segment handling a bit more abstract
libvmmapi leaves a hole at [3GB, 4GB) in the guest physical address
space.  This hole is not used in the arm64 port, which maps everything
above 4GB.  This change makes the code a bit more general to accomodate
arm64 more naturally.  In particular:

- Remove vm_set_lowmem_limit(): it is unused and doesn't have
  well-defined constraints, e.g., nothing prevents a consumer from
  setting a lowmem limit above the highmem base.
- Define a constant for the highmem base and use that everywhere that
  the base is currently hard-coded.
- Make the lowmem limit a compile-time constant instead of a vmctx field.
- Store segment info in an array.
- Add vm_get_highmem_base(), for use in bhyve since the current value is
  hard-coded in some places.

No functional change intended.

Reviewed by:	corvink, jhb
MFC after:	2 weeks
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D41004
2024-04-10 11:17:56 -04:00
..
amd64 libvmmapi: Move PCI passthrough ioctl wrappers into a separate file 2024-04-10 11:17:56 -04:00
internal.h libvmmapi: Make memory segment handling a bit more abstract 2024-04-10 11:17:56 -04:00
Makefile libvmmapi: Add a subdirectory for amd64-specific code 2024-04-10 11:17:55 -04:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ppt.c libvmmapi: Move PCI passthrough ioctl wrappers into a separate file 2024-04-10 11:17:56 -04:00
vmmapi.c libvmmapi: Make memory segment handling a bit more abstract 2024-04-10 11:17:56 -04:00
vmmapi.h libvmmapi: Make memory segment handling a bit more abstract 2024-04-10 11:17:56 -04:00