aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2025-02-18 15:53:16 +0000
committerMark Johnston <markj@FreeBSD.org>2025-02-18 16:00:07 +0000
commitc76c2a19ae3763d17aa6a60a5831ed24cbc16e83 (patch)
tree16ff6fb755cd0d68ac7f332a8a856a486dcb625f /libexec
parent896f5be77beb37ff35fa465f8ff2eea0d977a0bb (diff)
vmm: Consolidate code which manages guest memory regions
On all three platforms supported by vmm, we have mostly duplicated code to manage guest physical memory regions. Deduplicate much of this code and move it into sys/dev/vmm/vmm_mem.c. To avoid exporting struct vm outside of machdep vmm.c, add a new struct vm_mem to contain the memory segment descriptors, and add a vm_mem() accessor, akin to vm_vmspace(). This way vmm_mem.c can implement its routines without needing to see the layout of struct vm. The handling of the per-VM vmspace is also duplicated but will be moved to vmm_mem.c in a follow-up patch. On amd64, move the ppt_is_mmio() check out of vm_mem_allocated() to keep the code MI, as PPT is only implemented on amd64. There are only a couple of callers, so this is not unreasonable. No functional change intended. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D48270
Diffstat (limited to 'libexec')
0 files changed, 0 insertions, 0 deletions