Disable superpage use for stage 2 arm64 mappings

When modifying a stage 2 mapping we may need to call into the
hypervisor to invalidate the TLB. Until it is known if the cost of
this operation is less than the performance gains superpages offers
disable their use.

Reviewed by:	kib. markj
Sponsored by:	Innovate UK
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37299
This commit is contained in:
Andrew Turner
2022-11-07 11:21:42 +00:00
parent ba2bbac4c1
commit 0b976be033
+8 -1
View File
@@ -685,8 +685,15 @@ pmap_pte_exists(pmap_t pmap, vm_offset_t va, int level, const char *diag)
}
bool
pmap_ps_enabled(pmap_t pmap __unused)
pmap_ps_enabled(pmap_t pmap)
{
/*
* Promotion requires a hypervisor call when the kernel is running
* in EL1. To stop this disable superpage support on non-stage 1
* pmaps for now.
*/
if (pmap->pm_stage != PM_STAGE1)
return (false);
return (superpages_enabled != 0);
}