Repository navigation
Commit 66e507d
KVM: x86/mmu: Remove spurious TLB flushes in TDP MMU zap collapsible path
[ Upstream commit 4b85c92 ]
Drop the "flush" param and return values to/from the TDP MMU's helper for
zapping collapsible SPTEs. Because the helper runs with mmu_lock held
for read, not write, it uses tdp_mmu_zap_spte_atomic(), and the atomic
zap handles the necessary remote TLB flush.
Similarly, because mmu_lock is dropped and re-acquired between zapping
legacy MMUs and zapping TDP MMUs, kvm_mmu_zap_collapsible_sptes() must
handle remote TLB flushes from the legacy MMU before calling into the TDP
MMU.
Fixes: e220971 ("KVM: x86/mmu: Skip rmap operations if rmaps not allocated")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211120045046.3940942-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent e0609b2 commit 66e507d
3 files changed
Lines changed: 11 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5855 | 5855 | | |
5856 | 5856 | | |
5857 | 5857 | | |
5858 | | - | |
5859 | | - | |
5860 | 5858 | | |
5861 | 5859 | | |
5862 | 5860 | | |
5863 | 5861 | | |
5864 | 5862 | | |
5865 | 5863 | | |
5866 | 5864 | | |
5867 | | - | |
5868 | | - | |
| 5865 | + | |
5869 | 5866 | | |
5870 | 5867 | | |
5871 | 5868 | | |
5872 | 5869 | | |
5873 | 5870 | | |
5874 | 5871 | | |
5875 | | - | |
5876 | | - | |
5877 | | - | |
| 5872 | + | |
5878 | 5873 | | |
5879 | 5874 | | |
5880 | 5875 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1413 | 1413 | | |
1414 | 1414 | | |
1415 | 1415 | | |
1416 | | - | |
| 1416 | + | |
1417 | 1417 | | |
1418 | | - | |
1419 | | - | |
| 1418 | + | |
1420 | 1419 | | |
1421 | 1420 | | |
1422 | 1421 | | |
| |||
1427 | 1426 | | |
1428 | 1427 | | |
1429 | 1428 | | |
1430 | | - | |
1431 | | - | |
| 1429 | + | |
1432 | 1430 | | |
1433 | | - | |
1434 | 1431 | | |
1435 | 1432 | | |
1436 | 1433 | | |
| |||
1442 | 1439 | | |
1443 | 1440 | | |
1444 | 1441 | | |
| 1442 | + | |
1445 | 1443 | | |
1446 | 1444 | | |
1447 | 1445 | | |
| |||
1450 | 1448 | | |
1451 | 1449 | | |
1452 | 1450 | | |
1453 | | - | |
1454 | 1451 | | |
1455 | 1452 | | |
1456 | 1453 | | |
1457 | | - | |
1458 | | - | |
1459 | 1454 | | |
1460 | 1455 | | |
1461 | 1456 | | |
1462 | 1457 | | |
1463 | 1458 | | |
1464 | 1459 | | |
1465 | | - | |
1466 | | - | |
1467 | | - | |
| 1460 | + | |
| 1461 | + | |
1468 | 1462 | | |
1469 | 1463 | | |
1470 | 1464 | | |
1471 | 1465 | | |
1472 | 1466 | | |
1473 | 1467 | | |
1474 | | - | |
1475 | | - | |
1476 | | - | |
| 1468 | + | |
1477 | 1469 | | |
1478 | 1470 | | |
1479 | 1471 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 69 | + | |
| 70 | + | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| |||
0 commit comments