From: Oliver Upton Date: Sat, 26 Jul 2025 15:47:02 +0000 (-0700) Subject: Merge branch 'kvm-arm64/cacheable-pfnmap' into kvmarm/next X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c535d132a30f7c28148efd266a654e68323608df;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'kvm-arm64/cacheable-pfnmap' into kvmarm/next * kvm-arm64/cacheable-pfnmap: : Cacheable PFNMAP support at stage-2, courtesy of Ankit Agrawal : : For historical reasons, KVM only allows cacheable mappings at stage-2 : when a kernel alias exists in the direct map for the memory region. On : hardware without FEAT_S2FWB, this is necessary as KVM must do cache : maintenance to keep guest/host accesses coherent. : : This is unnecessarily restrictive on systems with FEAT_S2FWB and : CTR_EL0.DIC, as KVM no longer needs to perform cache maintenance to : maintain correctness. : : Allow cacheable mappings at stage-2 on supporting hardware when the : corresponding VMA has cacheable memory attributes and advertise a : capability to userspace such that a VMM can determine if a stage-2 : mapping can be established (e.g. VFIO device). KVM: arm64: Expose new KVM cap for cacheable PFNMAP KVM: arm64: Allow cacheable stage 2 mapping using VMA flags KVM: arm64: Block cacheable PFNMAP mapping KVM: arm64: Assume non-PFNMAP/MIXEDMAP VMAs can be mapped cacheable KVM: arm64: Rename the device variable to s2_force_noncacheable Signed-off-by: Oliver Upton --- c535d132a30f7c28148efd266a654e68323608df