Commits
Laurentiu Tudor committed 4e1b20246e9
arm/arm64: KVM: drop qman mmio cacheable mapping hack Instead of hardcoding checks for qman cacheable mmio region physical addresses extract mapping information from the user-space mapping. The involves several steps; - get access to a pte part of the user-space mapping by using get_locked_pte() / pte_unmap_unlock() apis - extract memtype (normal / device), shareability from the pte - convert to S2 translation bits in newly added function stage1_to_stage2_pgprot() - finish making the s2 translation with the obtained bits Another explored option was using vm_area_struct::vm_page_prot which is set in vfio-mc mmap code to the correct page bits. However, experiments show that these bits are later altered in the generic mmap code (e.g. the shareability bit is always set on arm64). The only place where the original bits can still be found is the user-space mapping, using the method described above. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> [Bharat - Fixed mem_type check issue] [changed "ifdef ARM64" to CONFIG_ARM64] Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com> [Ioana - added a sanity check for hugepages] Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> [Fixed format issues] Signed-off-by: Diana Craciun <diana.craciun@nxp.com>