lkml.org 
[lkml]   [2021]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 10/18] KVM: Move x86's MMU notifier memslot walkers to generic code
Date
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

\
 
 \ /
  Last update: 2021-03-31 09:53    [W:0.252 / U:5.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site