Re: [PATCH 1/1] kvm: mmu: zap pages when zapping only parent

2020-08-07 Thread Sean Christopherson
On Wed, Aug 05, 2020 at 08:48:03PM +0200, Paolo Bonzini wrote: > On 05/08/20 19:10, Ben Gardon wrote: > >> > >> Alternatively, what about moving this logic into mmu_page_zap_pte()? That > >> can be done with a little massaging of FNAME(invlpg) and would avoid what > >> is > >> effectively redunda

Re: [PATCH 1/1] kvm: mmu: zap pages when zapping only parent

2020-08-05 Thread Paolo Bonzini
On 05/08/20 19:10, Ben Gardon wrote: >> >> Alternatively, what about moving this logic into mmu_page_zap_pte()? That >> can be done with a little massaging of FNAME(invlpg) and would avoid what is >> effectively redundant checks on is_shadow_present_pte() and is_last_spte(). >> Patches attached an

Re: [PATCH 1/1] kvm: mmu: zap pages when zapping only parent

2020-08-05 Thread Ben Gardon
On Tue, Aug 4, 2020 at 2:14 PM Sean Christopherson wrote: > > On Mon, Jul 27, 2020 at 01:33:24PM -0700, Ben Gardon wrote: > > When the KVM MMU zaps a page, it will recursively zap the unsynced child > > pages, but not the synced ones. This can create problems over time when > > running many nested

Re: [PATCH 1/1] kvm: mmu: zap pages when zapping only parent

2020-08-04 Thread Sean Christopherson
On Mon, Jul 27, 2020 at 01:33:24PM -0700, Ben Gardon wrote: > When the KVM MMU zaps a page, it will recursively zap the unsynced child > pages, but not the synced ones. This can create problems over time when > running many nested guests because it leaves unlinked pages which will not > be freed un

[PATCH 1/1] kvm: mmu: zap pages when zapping only parent

2020-07-27 Thread Ben Gardon
When the KVM MMU zaps a page, it will recursively zap the unsynced child pages, but not the synced ones. This can create problems over time when running many nested guests because it leaves unlinked pages which will not be freed until the page quota is hit. With the default page quota of 20 shadow