Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423121AbbD2NYK (ORCPT ); Wed, 29 Apr 2015 09:24:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37487 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422971AbbD2NYH (ORCPT ); Wed, 29 Apr 2015 09:24:07 -0400 Message-ID: <5540DB6E.4070108@redhat.com> Date: Wed, 29 Apr 2015 15:23:58 +0200 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jan Kiszka , Bandan Das CC: kvm@vger.kernel.org, Wincy Van , linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: nVMX: Don't return error on nested bitmap memory allocation failure References: <554083D4.8090906@siemens.com> <5540D735.5030103@siemens.com> In-Reply-To: <5540D735.5030103@siemens.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1035 Lines: 25 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. 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. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/