Commit d54b5cb
committed
KVM: arm64: Assume non-PFNMAP/MIXEDMAP VMAs can be mapped cacheable
JIRA: https://issues.redhat.com/browse/RHEL-73607
Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git
commit 216887f
Author: Ankit Agrawal <ankita@nvidia.com>
Date: Sat Jul 5 07:17:13 2025 +0000
KVM: arm64: Assume non-PFNMAP/MIXEDMAP VMAs can be mapped cacheable
Despite its name, kvm_is_device_pfn() is actually used to determine if a
given PFN has a kernel mapping that can be used to perform cache
maintenance, as it calls pfn_is_map_memory() internally.
Expand the helper into its single callsite and further condition the
check on the VMA having either VM_PFNMAP or VM_MIXEDMAP set. VMAs that
set neither of these flags must always contain Normal, struct page
backed memory with valid aliases in the kernel address space.
Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Tested-by: Donald Dutile <ddutile@redhat.com>
Signed-off-by: Ankit Agrawal <ankita@nvidia.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20250705071717.5062-3-ankita@nvidia.com
[ Oliver: fixed typos, refined changelog ]
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Donald Dutile <ddutile@redhat.com>1 parent e63474d commit d54b5cb
1 file changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | 196 | | |
202 | 197 | | |
203 | 198 | | |
| |||
1488 | 1483 | | |
1489 | 1484 | | |
1490 | 1485 | | |
| 1486 | + | |
1491 | 1487 | | |
1492 | 1488 | | |
1493 | 1489 | | |
| |||
1615 | 1611 | | |
1616 | 1612 | | |
1617 | 1613 | | |
| 1614 | + | |
| 1615 | + | |
1618 | 1616 | | |
1619 | 1617 | | |
1620 | 1618 | | |
| |||
1638 | 1636 | | |
1639 | 1637 | | |
1640 | 1638 | | |
1641 | | - | |
| 1639 | + | |
1642 | 1640 | | |
1643 | 1641 | | |
1644 | 1642 | | |
| |||
0 commit comments