Commit 250ce1b
KVM: x86/mmu: always take tdp_mmu_pages_lock
It is cheap to take tdp_mmu_pages_lock in all write-side critical sections.
We already do it all the time when zapping with read_lock(), so it is not
a problem to do it from the kvm_tdp_mmu_zap_all() path (aka
kvm_arch_flush_shadow_all(), aka VM destruction and MMU notifier release).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20231125083400.1399197-4-pbonzini@redhat.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent 484dd27 commit 250ce1b
3 files changed
Lines changed: 13 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1407 | 1407 | | |
1408 | 1408 | | |
1409 | 1409 | | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
| 1410 | + | |
| 1411 | + | |
1413 | 1412 | | |
1414 | 1413 | | |
1415 | 1414 | | |
| |||
1426 | 1425 | | |
1427 | 1426 | | |
1428 | 1427 | | |
1429 | | - | |
1430 | | - | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
1431 | 1432 | | |
1432 | 1433 | | |
1433 | 1434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 78 | | |
85 | 79 | | |
86 | 80 | | |
| |||
281 | 275 | | |
282 | 276 | | |
283 | 277 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | 278 | | |
288 | | - | |
289 | | - | |
| 279 | + | |
290 | 280 | | |
291 | 281 | | |
292 | 282 | | |
293 | 283 | | |
294 | 284 | | |
295 | 285 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 286 | + | |
301 | 287 | | |
302 | 288 | | |
303 | | - | |
304 | | - | |
305 | | - | |
| 289 | + | |
306 | 290 | | |
307 | 291 | | |
308 | 292 | | |
| |||
331 | 315 | | |
332 | 316 | | |
333 | 317 | | |
334 | | - | |
| 318 | + | |
335 | 319 | | |
336 | 320 | | |
337 | 321 | | |
| |||
0 commit comments