Re: [PATCH v2 04/20] kvm: x86/mmu: Allocate and free TDP MMU roots

2020-10-21 Thread Paolo Bonzini
On 21/10/20 19:54, Ben Gardon wrote: > On Wed, Oct 21, 2020 at 8:09 AM Yu Zhang wrote: >> >> On Wed, Oct 14, 2020 at 11:26:44AM -0700, Ben Gardon wrote: >>> The TDP MMU must be able to allocate paging structure root pages and track >>> the usage of those pages. Implement a similar, but separate sy

Re: [PATCH v2 04/20] kvm: x86/mmu: Allocate and free TDP MMU roots

2020-10-21 Thread Ben Gardon
On Wed, Oct 21, 2020 at 8:09 AM Yu Zhang wrote: > > On Wed, Oct 14, 2020 at 11:26:44AM -0700, Ben Gardon wrote: > > The TDP MMU must be able to allocate paging structure root pages and track > > the usage of those pages. Implement a similar, but separate system for root > > page allocation to that

Re: [PATCH v2 04/20] kvm: x86/mmu: Allocate and free TDP MMU roots

2020-10-21 Thread Yu Zhang
On Wed, Oct 14, 2020 at 11:26:44AM -0700, Ben Gardon wrote: > The TDP MMU must be able to allocate paging structure root pages and track > the usage of those pages. Implement a similar, but separate system for root > page allocation to that of the x86 shadow paging implementation. When > future pat

Re: [PATCH v2 04/20] kvm: x86/mmu: Allocate and free TDP MMU roots

2020-10-19 Thread Ben Gardon
On Fri, Oct 16, 2020 at 7:56 AM Paolo Bonzini wrote: > > On 14/10/20 20:26, Ben Gardon wrote: > > + > > +static void put_tdp_mmu_root(struct kvm *kvm, struct kvm_mmu_page *root) > > +{ > > + if (kvm_mmu_put_root(root)) > > + kvm_tdp_mmu_free_root(kvm, root); > > +} > > Unused... W

Re: [PATCH v2 04/20] kvm: x86/mmu: Allocate and free TDP MMU roots

2020-10-16 Thread Paolo Bonzini
On 14/10/20 20:26, Ben Gardon wrote: > + > +static void put_tdp_mmu_root(struct kvm *kvm, struct kvm_mmu_page *root) > +{ > + if (kvm_mmu_put_root(root)) > + kvm_tdp_mmu_free_root(kvm, root); > +} Unused... > +static void get_tdp_mmu_root(struct kvm *kvm, struct kvm_mmu_page *root

[PATCH v2 04/20] kvm: x86/mmu: Allocate and free TDP MMU roots

2020-10-14 Thread Ben Gardon
The TDP MMU must be able to allocate paging structure root pages and track the usage of those pages. Implement a similar, but separate system for root page allocation to that of the x86 shadow paging implementation. When future patches add synchronization model changes to allow for parallel page fa