Commit f55ce5a
KVM: arm64: Expose new KVM cap for cacheable PFNMAP
Introduce a new KVM capability to expose to the userspace whether
cacheable mapping of PFNMAP is supported.
The ability to safely do the cacheable mapping of PFNMAP is contingent
on S2FWB and ARM64_HAS_CACHE_DIC. S2FWB allows KVM to avoid flushing
the D cache, ARM64_HAS_CACHE_DIC allows KVM to avoid flushing the icache
and turns icache_inval_pou() into a NOP. The cap would be false if
those requirements are missing and is checked by making use of
kvm_arch_supports_cacheable_pfnmap.
This capability would allow userspace to discover the support.
It could for instance be used by userspace to prevent live-migration
across FWB and non-FWB hosts.
CC: Catalin Marinas <[email protected]>
CC: Jason Gunthorpe <[email protected]>
CC: Oliver Upton <[email protected]>
CC: David Hildenbrand <[email protected]>
Suggested-by: Marc Zyngier <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Tested-by: Donald Dutile <[email protected]>
Signed-off-by: Ankit Agrawal <[email protected]>
Reviewed-by: Catalin Marinas <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Oliver Upton <[email protected]>1 parent 0c67288 commit f55ce5a
3 files changed
+20
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8585 | 8585 | | |
8586 | 8586 | | |
8587 | 8587 | | |
8588 | | - | |
| 8588 | + | |
8589 | 8589 | | |
8590 | 8590 | | |
8591 | 8591 | | |
| |||
8614 | 8614 | | |
8615 | 8615 | | |
8616 | 8616 | | |
| 8617 | + | |
| 8618 | + | |
| 8619 | + | |
| 8620 | + | |
| 8621 | + | |
| 8622 | + | |
| 8623 | + | |
| 8624 | + | |
| 8625 | + | |
| 8626 | + | |
| 8627 | + | |
8617 | 8628 | | |
8618 | 8629 | | |
8619 | 8630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
411 | 418 | | |
412 | 419 | | |
413 | 420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
| 959 | + | |
959 | 960 | | |
960 | 961 | | |
961 | 962 | | |
| |||
0 commit comments