Commit 8c5fa37
RISC-V: KVM: Remove automatic I/O mapping for VM_PFNMAP
As of commit aac6db7 ("vfio/pci: Use unmap_mapping_range()"),
vm_pgoff may no longer guaranteed to hold the PFN for VM_PFNMAP
regions. Using vma->vm_pgoff to derive the HPA here may therefore
produce incorrect mappings.
Instead, I/O mappings for such regions can be established on-demand
during g-stage page faults, making the upfront ioremap in this path
is unnecessary.
Fixes: aac6db7 ("vfio/pci: Use unmap_mapping_range()")
Signed-off-by: Fangyu Yu <[email protected]>
Tested-by: Daniel Henrique Barboza <[email protected]>
Reviewed-by: Guo Ren <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Anup Patel <[email protected]>1 parent 873f10c commit 8c5fa37
1 file changed
+2
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
| |||
190 | 189 | | |
191 | 190 | | |
192 | 191 | | |
193 | | - | |
194 | 192 | | |
195 | 193 | | |
196 | 194 | | |
197 | 195 | | |
198 | 196 | | |
199 | 197 | | |
200 | | - | |
201 | | - | |
| 198 | + | |
202 | 199 | | |
203 | 200 | | |
204 | 201 | | |
| |||
209 | 206 | | |
210 | 207 | | |
211 | 208 | | |
212 | | - | |
| 209 | + | |
213 | 210 | | |
214 | 211 | | |
215 | 212 | | |
| |||
225 | 222 | | |
226 | 223 | | |
227 | 224 | | |
228 | | - | |
229 | 225 | | |
230 | 226 | | |
231 | 227 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | 228 | | |
239 | 229 | | |
240 | 230 | | |
241 | 231 | | |
242 | 232 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | 233 | | |
249 | 234 | | |
250 | 235 | | |
251 | 236 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | 237 | | |
259 | 238 | | |
260 | 239 | | |
| |||
0 commit comments