| 9bbbdb7e | 27-Jun-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Revamp host TLB flush mechanism
* Leverage the pmap layer to track guest pmap generation id and the host CPUs that the guest pmap is active on. This avoids the inefficient _tlb_flush() ca
nvmm: Revamp host TLB flush mechanism
* Leverage the pmap layer to track guest pmap generation id and the host CPUs that the guest pmap is active on. This avoids the inefficient _tlb_flush() callbacks from NVMM that invalidate all TLB entries.
* Currently just add all CPUs to the backing pmap for guest physical memory as they are encountered. Do not yet try to remove any CPUs, because multiple vCPUs may wind up (temporarily) scheduled to the same physical CPU. So more sophisticated tracking is needed.
* Fix a bug in SVM's host TLB flush handling where breaking out of the loop and returning, then re-entering the loop on the same cpu, could improperly clear the machine flush request.
Credit to Matt Dillon.
show more ...
|
| 3ecc20a0 | 06-Jun-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Port to DragonFly #24: pmap transform & TLB invalidation
* Port NetBSD's pmap_ept_transform() to DragonFly's. We don't make 'pmap_ept_has_ad' a global in the pmap code, so need to pass extr
nvmm: Port to DragonFly #24: pmap transform & TLB invalidation
* Port NetBSD's pmap_ept_transform() to DragonFly's. We don't make 'pmap_ept_has_ad' a global in the pmap code, so need to pass extra flags to our pmap_ept_transform().
* Replace NetBSD's pmap_tlb_shootdown() with our pmap_inval_smp().
* Add two new fields 'pm_data' & 'pm_tlb_flush' to 'struct pmap', which are used as a callback by NVMM to handle its own TLB invalidation.
Note that pmap_enter() also calls pmap_inval_smp() on EPT/NPT pmap and requires the old PTE be returned, so we can't place the NVMM TLB callback at the beginning part of pmap_inval_smp() and return 0.
show more ...
|
| 4b01284d | 05-Jun-2021 |
Aaron LI <aly@aaronly.me> |
pmap: Move pmap_pte_index() and remove pmap_{pde,pdpe,pml4e}_index()
* Move pmap_pte_index() from 'pmap.h' to pc64/pmap.c since it's only used there. (vkernel64 has the same function in its pmap.
pmap: Move pmap_pte_index() and remove pmap_{pde,pdpe,pml4e}_index()
* Move pmap_pte_index() from 'pmap.h' to pc64/pmap.c since it's only used there. (vkernel64 has the same function in its pmap.c) * Remove unused pmap_pde_index(), pmap_pdpe_index() and pmap_pml4e_index() functions from 'pmap.h'. Well, the same functionalities are implemented in pmap.c as pmap_pt_index(), pmap_pd_index() and pmap_pdp_index(), respectively. * Improve the description of these functions a bit.
show more ...
|
| 8078b160 | 03-Jun-2021 |
Aaron LI <aly@aaronly.me> |
pmap: Eliminate a simple macro 'pte_load_clear()'
First, this macro is not used in vkernel64's pmap code. Secondly, this macro is sudden and looks unrelated to other things in the pmap.h header. S
pmap: Eliminate a simple macro 'pte_load_clear()'
First, this macro is not used in vkernel64's pmap code. Secondly, this macro is sudden and looks unrelated to other things in the pmap.h header. So just substitute it in the pmap code and get rid of it.
show more ...
|
| 7e0dbbc6 | 03-Jun-2021 |
Aaron LI <aly@aaronly.me> |
vm/pmap.h: Move vtophys() and vtophys_pte() macros here
The two macros are defined against with pmap_kextract(), which is also declared in this header file, so it's a better place to hold the two ma
vm/pmap.h: Move vtophys() and vtophys_pte() macros here
The two macros are defined against with pmap_kextract(), which is also declared in this header file, so it's a better place to hold the two macros.
In addition, this adjustment avoids the duplicates in both pc64 and vkernel64.
show more ...
|