Commit db0d70e
KVM: x86/mmu: Move kvm_arch_flush_shadow_{all,memslot}() to mmu.c
Move x86's implementation of kvm_arch_flush_shadow_{all,memslot}() into
mmu.c, and make kvm_mmu_zap_all() static as it was globally visible only
for kvm_arch_flush_shadow_all(). This will allow refactoring
kvm_arch_flush_shadow_memslot() to call kvm_mmu_zap_all() directly without
having to expose kvm_mmu_zap_all_fast() outside of mmu.c. Keeping
everything in mmu.c will also likely simplify supporting TDX, which
intends to do zap only relevant SPTEs on memslot updates.
No functional change intended.
Suggested-by: Yan Zhao <yan.y.zhao@intel.com>
Tested-by: Yongwei Ma <yongwei.ma@intel.com>
Link: https://lore.kernel.org/r/20230729013535.1070024-13-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 3cca6b2 commit db0d70e
3 files changed
Lines changed: 12 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1853 | 1853 | | |
1854 | 1854 | | |
1855 | 1855 | | |
1856 | | - | |
1857 | 1856 | | |
1858 | 1857 | | |
1859 | 1858 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6678 | 6678 | | |
6679 | 6679 | | |
6680 | 6680 | | |
6681 | | - | |
| 6681 | + | |
6682 | 6682 | | |
6683 | 6683 | | |
6684 | 6684 | | |
| |||
6703 | 6703 | | |
6704 | 6704 | | |
6705 | 6705 | | |
| 6706 | + | |
| 6707 | + | |
| 6708 | + | |
| 6709 | + | |
| 6710 | + | |
| 6711 | + | |
| 6712 | + | |
| 6713 | + | |
| 6714 | + | |
| 6715 | + | |
| 6716 | + | |
6706 | 6717 | | |
6707 | 6718 | | |
6708 | 6719 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12802 | 12802 | | |
12803 | 12803 | | |
12804 | 12804 | | |
12805 | | - | |
12806 | | - | |
12807 | | - | |
12808 | | - | |
12809 | | - | |
12810 | | - | |
12811 | | - | |
12812 | | - | |
12813 | | - | |
12814 | | - | |
12815 | | - | |
12816 | 12805 | | |
12817 | 12806 | | |
12818 | 12807 | | |
| |||
0 commit comments