Commit 216887f
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>1 parent 8cc9dc1 commit 216887f
1 file changed
Lines changed: 4 additions & 6 deletions
| 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 | | |
| |||
1492 | 1487 | | |
1493 | 1488 | | |
1494 | 1489 | | |
| 1490 | + | |
1495 | 1491 | | |
1496 | 1492 | | |
1497 | 1493 | | |
| |||
1619 | 1615 | | |
1620 | 1616 | | |
1621 | 1617 | | |
| 1618 | + | |
| 1619 | + | |
1622 | 1620 | | |
1623 | 1621 | | |
1624 | 1622 | | |
| |||
1642 | 1640 | | |
1643 | 1641 | | |
1644 | 1642 | | |
1645 | | - | |
| 1643 | + | |
1646 | 1644 | | |
1647 | 1645 | | |
1648 | 1646 | | |
| |||
0 commit comments