pmap: Add some API routines to help NVMM manage guest memory

Operating Systems / DragonFlyBSD - Aaron LI [aaronly.me] - 20 July 2021 23:28 UTC

Add the following three routines for NVMM to use. NVMM can use these routines to manipulate the cpumask for the pmap backing guest physical memory.

- pmap_add_cpu()
- pmap_del_cpu()
- pmap_del_all_cpus()

NOTE: The scheduler might somtimes overload multiple vCPUs on the same physical cpu, so operating is not quite as simple as calling add_cpu/del_cpu in the core vmrun routines.

Credit to Matt Dillon

f9fa478268 pmap: Add some API routines to help NVMM manage guest memory
sys/platform/pc64/x86_64/pmap.c | 30 ++++++++++++++++++++++++++++++
sys/vm/pmap.h | 4 ++++
2 files changed, 34 insertions(+)

Upstream: gitweb.dragonflybsd.org


  • Share