Re: [PATCH] kvm: x86 mmu: avoid mmu_page_hash lookup for direct_map-only VM

2020-06-23 Thread Sean Christopherson
On Mon, Jun 22, 2020 at 11:53:48PM -0700, Sean Christopherson wrote: > If we do get agressive and zap all children (or if my analysis is wrong), > and prevent the mixed level insansity, then a simpler approach would be to > skip the lookup if the MMU is direct. I.e. no need for the per-VM toggle.

Re: [PATCH] kvm: x86 mmu: avoid mmu_page_hash lookup for direct_map-only VM

2020-06-22 Thread Sean Christopherson
On Tue, May 12, 2020 at 03:36:21PM -0700, Peter Feiner wrote: > On Fri, May 8, 2020 at 1:14 PM Sean Christopherson > wrote: > > > > On Fri, May 08, 2020 at 11:24:25AM -0700, Jon Cargille wrote: > > > From: Peter Feiner > > > > > > Optimization for avoiding lookups in mmu_page_hash. When there's a

Re: [PATCH] kvm: x86 mmu: avoid mmu_page_hash lookup for direct_map-only VM

2020-05-12 Thread Peter Feiner
On Fri, May 8, 2020 at 1:14 PM Sean Christopherson wrote: > > On Fri, May 08, 2020 at 11:24:25AM -0700, Jon Cargille wrote: > > From: Peter Feiner > > > > Optimization for avoiding lookups in mmu_page_hash. When there's a > > single direct root, a shadow page has at most one parent SPTE > > (non-

Re: [PATCH] kvm: x86 mmu: avoid mmu_page_hash lookup for direct_map-only VM

2020-05-08 Thread Sean Christopherson
On Fri, May 08, 2020 at 11:24:25AM -0700, Jon Cargille wrote: > From: Peter Feiner > > Optimization for avoiding lookups in mmu_page_hash. When there's a > single direct root, a shadow page has at most one parent SPTE > (non-root SPs have exactly one; the root has none). Thus, if an SPTE > is non

[PATCH] kvm: x86 mmu: avoid mmu_page_hash lookup for direct_map-only VM

2020-05-08 Thread Jon Cargille
From: Peter Feiner Optimization for avoiding lookups in mmu_page_hash. When there's a single direct root, a shadow page has at most one parent SPTE (non-root SPs have exactly one; the root has none). Thus, if an SPTE is non-present, it can be linked to a newly allocated SP without first checking