On Mon, Jan 9, 2023 at 3:41 PM David Matlack <dmatlack@xxxxxxxxxx> wrote: > > On Mon, Jan 09, 2023 at 09:53:44PM +0000, Raghavendra Rao Ananta wrote: > > +{ > > + kvm_flush_remote_tlbs(kvm); > > +} > > FYI I also proposed a common kvm_flush_remote_tlbs() in my Common MMU > series [1]. > > Could I interest you in grabbing patches 29-33 from that series, which > has the same end result (common kvm_flush_remote_tlbs_range()) but also > hooks up the KVM/x86 range-based flushing, and folding them into this > series? > > [1] https://lore.kernel.org/kvm/20221208193857.4090582-33-dmatlack@xxxxxxxxxx/ (Also they make kvm_arch_flush_remote_tlbs_memslot() common so you don't need the ARM-specific implementation in patch 4.) > > > #endif > > > > static void kvm_flush_shadow_all(struct kvm *kvm) > > @@ -637,7 +642,7 @@ static __always_inline int __kvm_handle_hva_range(struct kvm *kvm, > > } > > > > if (range->flush_on_ret && ret) > > - kvm_flush_remote_tlbs(kvm); > > + kvm_flush_remote_tlbs_range(kvm, range->start, range->end - 1); > > > > if (locked) { > > KVM_MMU_UNLOCK(kvm); > > -- > > 2.39.0.314.g84b9a713c41-goog > >