From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bandan Das Subject: Re: [PATCH] KVM: nVMX: Don't return error on nested bitmap memory allocation failure Date: Wed, 29 Apr 2015 12:08:46 -0400 Message-ID: References: <554083D4.8090906@siemens.com> <5540D735.5030103@siemens.com> <5540DB6E.4070108@redhat.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Jan Kiszka , kvm@vger.kernel.org, Wincy Van , linux-kernel@vger.kernel.org To: Paolo Bonzini Return-path: In-Reply-To: <5540DB6E.4070108@redhat.com> (Paolo Bonzini's message of "Wed, 29 Apr 2015 15:23:58 +0200") Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Paolo Bonzini writes: > On 29/04/2015 15:05, Jan Kiszka wrote: >> > Yeah... I hear you. Ok, let me put it this way - Assume that we can >> > defer this allocation up until the point that the nested subsystem is >> > actually used i.e L1 tries running a guest and we try to allocate this >> > area. If get_free_page() failed in that case, would we still want to >> > kill L1 too ? I guess no. >> >> We could block the hypervisor thread on the allocation, just like it >> would block on faults for swapped out pages or new ones that have to be >> reclaimed from the page cache first. So, block on a failure hoping that eventually it will succeed ? > In that case we should avoid making the allocation GFP_ATOMIC to begin with. > > If a GFP_KERNEL allocation failed, returning -ENOMEM from KVM_RUN (which > practically means killing the guest) would actually be a very real > possibility. Sorry Paolo, I missed your point. Isn't the allocation already GFP_KERNEL ? > Paolo