[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8079ca49-d9fe-94ae-9e6c-ebe6e8e1035d@redhat.com>
Date: Tue, 26 Jan 2021 14:37:39 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Ben Gardon <bgardon@...gle.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: Peter Xu <peterx@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
Peter Shier <pshier@...gle.com>,
Peter Feiner <pfeiner@...gle.com>,
Junaid Shahid <junaids@...gle.com>,
Jim Mattson <jmattson@...gle.com>,
Yulei Zhang <yulei.kernel@...il.com>,
Wanpeng Li <kernellwp@...il.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Xiao Guangrong <xiaoguangrong.eric@...il.com>
Subject: Re: [PATCH 24/24] kvm: x86/mmu: Allow parallel page faults for the
TDP MMU
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
Powered by blists - more mailing lists