lkml.org 
[lkml]   [2021]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 24/24] kvm: x86/mmu: Allow parallel page faults for the TDP MMU
Date
On 12/01/21 19:10, Ben Gardon wrote:
> + if (is_tdp_mmu_root(vcpu->kvm, vcpu->arch.mmu->root_hpa))
> + kvm_mmu_lock_shared(vcpu->kvm);
> + else
> + kvm_mmu_lock(vcpu->kvm);

Perhaps the better API would be kvm_mmu_lock/unlock_root; not exposing
kvm_mmu_lock/unlock_shared and kvm_mmu_lock/unlock_exclusive at all,
just like you use rwlock_needbreak directly in kvm_mmu_lock_needbreak.

Paolo

\
 
 \ /
  Last update: 2021-01-26 14:40    [W:0.411 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site