Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423015AbbD2Mz7 (ORCPT ); Wed, 29 Apr 2015 08:55:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38489 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422843AbbD2Mz4 (ORCPT ); Wed, 29 Apr 2015 08:55:56 -0400 From: Bandan Das To: Jan Kiszka Cc: kvm@vger.kernel.org, Paolo Bonzini , 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> Date: Wed, 29 Apr 2015 08:55:48 -0400 In-Reply-To: <554083D4.8090906@siemens.com> (Jan Kiszka's message of "Wed, 29 Apr 2015 09:10:12 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1623 Lines: 36 Jan Kiszka writes: > Am 2015-04-28 um 21:55 schrieb Bandan Das: >> >> If get_free_page() fails for nested bitmap area, it's evident that >> we are gonna get screwed anyway but returning failure because we failed >> allocating memory for a nested structure seems like an unnecessary big >> hammer. Also, save the call for later; after we are done with other >> non-nested allocations. > > Frankly, I prefer failures over automatic degradations. And, as you > noted, the whole system will probably explode anyway if allocation of a > single page already fails. So what does this buy us? 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. Also, assume we had a printk in there - "Failed allocating memory for nested bitmap", the novice user is going to get confused why he's getting an error about nested virtualization (for the not so distant future when nested is enabled by default :)) > What could makes sense is making the allocation of the vmread/write > bitmap depend on enable_shadow_vmcs, and that again depend on nested. Thanks for the suggestion. I will take a look at this one. > Jan -- 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/