freebsd-skq/sys/arm64
Andrew Turner 2cb0e95f48 Support creating and using arm64 pmap at stage 2
Add minimal support for creating stage 2 IPA -> PA mappings. For this we
need to:

 - Create a new vmid set to allocate a vmid for each Virtual Machine
 - Add the missing stage 2 attributes
 - Use these in pmap_enter to create a new mapping
 - Handle stage 2 faults

The vmid set is based on the current asid set that was generalised in
r358328. It adds a function pointer for bhyve to use when the kernel needs
to reset the vmid set. This will need to call into EL2 and invalidate the
TLB.

The stage 2 attributes have been added. To simplify setting these fields
two new functions are added to get the memory type and protection fields.
These are slightly different on stage 1 and stage 2 tables. We then use
them in pmap_enter to set the new level 3 entry to be stored.

The D-cache on all entries is cleaned to the point of coherency. This is
to allow the data to be visible to the VM. To allow for userspace to load
code when creating a new executable entry an invalid entry is created. When
the VM tried to use it the I-cache is invalidated. As the D-cache has
already been cleaned this will ensure the I-cache is synchronised with the
D-cache.

When the hardware implements a VPIPT I-cache we need to either have the
correct VMID set or invalidate it from EL2. As the host kernel will have
the wrong VMID set we need to call into EL2 to clean it. For this a second
function pointer is added that is called when this invalidation is needed.

Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D23875
2020-05-27 08:00:38 +00:00
..
acpica Ignore the SMMUv3 and PMCG interrupt controller in the IORT tables 2020-01-31 09:51:38 +00:00
arm64 Support creating and using arm64 pmap at stage 2 2020-05-27 08:00:38 +00:00
broadcom Add genet driver for Raspberry Pi 4B Ethernet 2020-04-22 00:42:10 +00:00
cavium Rename the ThunderX CPU identification macros to include the X. This is the 2018-06-13 12:17:11 +00:00
cloudabi32 Use uintptr_t instead of register_t * for the stack base. 2019-12-03 23:17:54 +00:00
cloudabi64 Use uintptr_t instead of register_t * for the stack base. 2019-12-03 23:17:54 +00:00
conf ice(4): Introduce new driver for Intel E800 Ethernet controllers 2020-05-26 23:35:10 +00:00
coresight Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
include Support creating and using arm64 pmap at stage 2 2020-05-27 08:00:38 +00:00
intel Add support for Intel Stratix 10 platform. 2019-09-13 16:50:57 +00:00
linux Convert canary, execpathp, and pagesizes to pointers. 2020-04-16 21:53:17 +00:00
qoriq Add GPIO support for QorIQ boards. 2020-05-25 14:55:37 +00:00
qualcomm Enable Qualcomm Debug Subsystem (QDSS) block on MSM8916 SoC. 2018-04-10 12:53:48 +00:00
rockchip Don't try to re-initialize already preseted regulator. 2020-04-29 13:45:21 +00:00