1
0
Fork 0
alistair23-linux/virt/kvm/arm
Laurentiu Tudor 4e1b20246e 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>
2019-11-25 15:43:43 +08:00
..
hyp KVM: arm: vgic-v3: Mark expected switch fall-through 2019-07-26 15:37:11 +01:00
vgic arm/arm64 KVM: allow specifying s2 prot bits when mapping i/o 2019-11-25 15:43:41 +08:00
aarch32.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
arch_timer.c KVM: arm64: Migrate _elx sysreg accessors to msr_s/mrs_s 2019-07-05 13:57:25 +01:00
arm.c KVM: arm/arm64: vgic: Allow more than 256 vcpus for KVM_IRQ_LINE 2019-09-09 12:29:09 +01:00
mmio.c KVM: arm/arm64: Only skip MMIO insn once 2019-08-22 13:19:56 +01:00
mmu.c arm/arm64: KVM: drop qman mmio cacheable mapping hack 2019-11-25 15:43:43 +08:00
perf.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
pmu.c KVM: arm64: pmu: Reset sample period on overflow handling 2019-10-20 10:47:07 +01:00
psci.c KVM: arm/arm64: Add save/restore support for firmware workaround state 2019-07-05 13:56:27 +01:00
trace.h KVM: arm/arm64: Fix TRACE_INCLUDE_PATH 2019-02-19 21:05:51 +00:00