From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934155AbcKPGGi (ORCPT ); Wed, 16 Nov 2016 01:06:38 -0500 Received: from mx2.suse.de ([195.135.220.15]:56564 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbcKPGGh (ORCPT ); Wed, 16 Nov 2016 01:06:37 -0500 Subject: Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX possible entries To: Alex Thorlton References: <1479168677-23633-1-git-send-email-athorlton@sgi.com> <582AC427020000780011EA7E@suse.com> <582ACEDE020000780011EAC9@suse.com> <478e5d05-ccf6-093e-8301-0eece00ca243@suse.com> <582AE72D020000780011EBB2@suse.com> <4bac3691-f157-4acc-7b29-7c49be6d35d6@suse.com> <20161115152209.GA67776@stormcage.americas.sgi.com> Cc: Jan Beulich , David Vrabel , x86@kernel.org, Thomas Gleixner , xen-devel@lists.xenproject.org, Ingo Molnar , Russ Anderson , linux-kernel@vger.kernel.org, "H. Peter Anvin" From: Juergen Gross Message-ID: <633e8146-d181-a599-498b-abae4af11687@suse.com> Date: Wed, 16 Nov 2016 07:06:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161115152209.GA67776@stormcage.americas.sgi.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/11/16 16:22, Alex Thorlton wrote: > On Tue, Nov 15, 2016 at 10:55:49AM +0100, Juergen Gross wrote: >> I'd go with the new error code. What about E2BIG or ENOSPC? >> >> I think the hypervisor should fill in the number of entries required >> in this case. >> >> In case nobody objects I can post patches for this purpose (both Xen >> and Linux). > > This sounds like a good solution to me. I think it's definitely more > appropriate than simply bumping up the size of xen_e820_map, especially > considering the fact that it's theoretically possible for the e820 map > generated by the hypercall to grow too large, even on a non-EFI machine, > where my change would have no effect. Well, it won't help with the current hypervisor, so bumping up the size of xen_e820_map will still be a good idea. I think using E820_X_MAX is okay since in the end xen_e820_map will be transferred into a struct e820map which can't hold more than E820_X_MAX entries (additional entries are ignored here, so this won't let the boot fail). Juergen