pmap: Add some API routines to help NVMM manage guest memory
authorAaron LI <aly@aaronly.me>
Fri, 25 Jun 2021 10:30:26 +0000 (18:30 +0800)
committerAaron LI <aly@aaronly.me>
Tue, 20 Jul 2021 23:28:23 +0000 (07:28 +0800)
commitf9fa4782687346939b3ab65f7c6cbba9e6da5d56
tree7b3004a4bc2cffa7217a7cb014afa46e4bc18e7c
parent39d0d2cbbe1148ae03999ea78008fd6898d8835d
pmap: Add some API routines to help NVMM manage guest memory

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
sys/platform/pc64/x86_64/pmap.c
sys/vm/pmap.h