Re: [PATCH v2 05/21] KVM: x86/mmu: Try to avoid crashing KVM if a MMU memory cache is empty

2020-06-24 Thread Ben Gardon
On Mon, Jun 22, 2020 at 1:09 PM Sean Christopherson wrote: > > Attempt to allocate a new object instead of crashing KVM (and likely the > kernel) if a memory cache is unexpectedly empty. Use GFP_ATOMIC for the > allocation as the caches are used while holding mmu_lock. The immediate > BUG_ON()

[PATCH v2 05/21] KVM: x86/mmu: Try to avoid crashing KVM if a MMU memory cache is empty

2020-06-22 Thread Sean Christopherson
Attempt to allocate a new object instead of crashing KVM (and likely the kernel) if a memory cache is unexpectedly empty. Use GFP_ATOMIC for the allocation as the caches are used while holding mmu_lock. The immediate BUG_ON() makes the code unnecessarily explosive and led to confusing minimums