Thread (44 messages) flat view 44 messages, 4 authors, 2021-03-31

Re: [PATCH 10/18] KVM: Move x86's MMU notifier memslot walkers to generic code

From: Paolo Bonzini <pbonzini@redhat.com>
Date: 2021-03-31 07:53:20
Also in: kvm, kvmarm, linux-arm-kernel, lkml

On 26/03/21 03:19, Sean Christopherson wrote:
+#ifdef KVM_ARCH_WANT_NEW_MMU_NOTIFIER_APIS
+	kvm_handle_hva_range(mn, address, address + 1, pte, kvm_set_spte_gfn);
+#else
  	struct kvm *kvm = mmu_notifier_to_kvm(mn);
  	int idx;
 	trace_kvm_set_spte_hva(address);
 
	idx = srcu_read_lock(&kvm->srcu);

	KVM_MMU_LOCK(kvm);

	kvm->mmu_notifier_seq++;

	if (kvm_set_spte_hva(kvm, address, pte))
		kvm_flush_remote_tlbs(kvm);

  	KVM_MMU_UNLOCK(kvm);
  	srcu_read_unlock(&kvm->srcu, idx);
+#endif
The kvm->mmu_notifier_seq is missing in the new API side.  I guess you 
can add an argument to __kvm_handle_hva_range and handle it also in 
patch 15 ("KVM: Take mmu_lock when handling MMU notifier iff the hva 
hits a memslot").

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help