Commit 619b507
KVM: Move kvm_arch_flush_remote_tlbs_memslot() to common code
Move kvm_arch_flush_remote_tlbs_memslot() to common code and drop
"arch_" from the name. kvm_arch_flush_remote_tlbs_memslot() is just a
range-based TLB invalidation where the range is defined by the memslot.
Now that kvm_flush_remote_tlbs_range() can be called from common code we
can just use that and drop a bunch of duplicate code from the arch
directories.
Note this adds a lockdep assertion for slots_lock being held when
calling kvm_flush_remote_tlbs_memslot(), which was previously only
asserted on x86. MIPS has calls to kvm_flush_remote_tlbs_memslot(),
but they all hold the slots_lock, so the lockdep assertion continues to
hold true.
Also drop the CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT ifdef gating
kvm_flush_remote_tlbs_memslot(), since it is no longer necessary.
Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Acked-by: Anup Patel <anup@brainfault.org>
Acked-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230811045127.3308641-7-rananta@google.com1 parent d478899 commit 619b507
7 files changed
Lines changed: 23 additions & 42 deletions
File tree
- arch
- arm64/kvm
- mips/kvm
- riscv/kvm
- x86/kvm
- mmu
- include/linux
- virt/kvm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1532 | 1532 | | |
1533 | 1533 | | |
1534 | 1534 | | |
1535 | | - | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
1539 | | - | |
1540 | | - | |
1541 | 1535 | | |
1542 | 1536 | | |
1543 | 1537 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
987 | 987 | | |
988 | 988 | | |
989 | 989 | | |
990 | | - | |
991 | | - | |
992 | | - | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | 990 | | |
997 | 991 | | |
998 | 992 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | 409 | | |
416 | 410 | | |
417 | 411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6666 | 6666 | | |
6667 | 6667 | | |
6668 | 6668 | | |
6669 | | - | |
| 6669 | + | |
6670 | 6670 | | |
6671 | 6671 | | |
6672 | 6672 | | |
| |||
6685 | 6685 | | |
6686 | 6686 | | |
6687 | 6687 | | |
6688 | | - | |
6689 | | - | |
6690 | | - | |
6691 | | - | |
6692 | | - | |
6693 | | - | |
6694 | | - | |
6695 | | - | |
6696 | | - | |
6697 | | - | |
6698 | | - | |
6699 | | - | |
6700 | | - | |
6701 | | - | |
6702 | 6688 | | |
6703 | 6689 | | |
6704 | 6690 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12751 | 12751 | | |
12752 | 12752 | | |
12753 | 12753 | | |
12754 | | - | |
| 12754 | + | |
12755 | 12755 | | |
12756 | 12756 | | |
12757 | 12757 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1360 | 1360 | | |
1361 | 1361 | | |
1362 | 1362 | | |
| 1363 | + | |
| 1364 | + | |
1363 | 1365 | | |
1364 | 1366 | | |
1365 | 1367 | | |
| |||
1388 | 1390 | | |
1389 | 1391 | | |
1390 | 1392 | | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
| 1393 | + | |
1395 | 1394 | | |
1396 | 1395 | | |
1397 | 1396 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
382 | 396 | | |
383 | 397 | | |
384 | 398 | | |
| |||
2191 | 2205 | | |
2192 | 2206 | | |
2193 | 2207 | | |
2194 | | - | |
| 2208 | + | |
2195 | 2209 | | |
2196 | 2210 | | |
2197 | 2211 | | |
| |||
2308 | 2322 | | |
2309 | 2323 | | |
2310 | 2324 | | |
2311 | | - | |
| 2325 | + | |
2312 | 2326 | | |
2313 | 2327 | | |
2314 | 2328 | | |
| |||
0 commit comments