Commit f42e289
KVM: Add support for read-only usage of gfn_to_page()
Rework gfn_to_page() to support read-only accesses so that it can be used
by arm64 to get MTE tags out of guest memory.
Opportunistically rewrite the comment to be even more stern about using
gfn_to_page(), as there are very few scenarios where requiring a struct
page is actually the right thing to do (though there are such scenarios).
Add a FIXME to call out that KVM probably should be pinning pages, not
just getting pages.
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20241010182427.1434605-77-seanjc@google.com>1 parent ce6bf70 commit f42e289
2 files changed
Lines changed: 14 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1213 | 1213 | | |
1214 | 1214 | | |
1215 | 1215 | | |
1216 | | - | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
1217 | 1222 | | |
1218 | 1223 | | |
1219 | 1224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3132 | 3132 | | |
3133 | 3133 | | |
3134 | 3134 | | |
3135 | | - | |
3136 | | - | |
3137 | | - | |
3138 | | - | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
3139 | 3140 | | |
3140 | | - | |
| 3141 | + | |
3141 | 3142 | | |
3142 | 3143 | | |
3143 | 3144 | | |
3144 | 3145 | | |
3145 | 3146 | | |
3146 | | - | |
| 3147 | + | |
3147 | 3148 | | |
3148 | 3149 | | |
3149 | 3150 | | |
3150 | 3151 | | |
3151 | 3152 | | |
3152 | 3153 | | |
3153 | | - | |
| 3154 | + | |
3154 | 3155 | | |
3155 | 3156 | | |
3156 | 3157 | | |
| |||
0 commit comments