From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751563AbdCCMHt (ORCPT ); Fri, 3 Mar 2017 07:07:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40734 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751083AbdCCMHr (ORCPT ); Fri, 3 Mar 2017 07:07:47 -0500 Date: Fri, 3 Mar 2017 20:06:16 +0800 From: Baoquan He To: Borislav Petkov Cc: tglx@linutronix.de, hpa@zytor.com, mingo@redhat.com, linux-kernel@vger.kernel.org, x86@kernel.org, keescook@chromium.org, yinghai@kernel.org, anderson@redhat.com, luto@kernel.org, thgarnie@google.com, kuleshovmail@gmail.com Subject: Re: [PATCH v4 1/3] x86: Introduce a new constant KERNEL_MAPPING_SIZE Message-ID: <20170303120616.GE18391@x1> References: <1486040077-3719-1-git-send-email-bhe@redhat.com> <1486040077-3719-2-git-send-email-bhe@redhat.com> <20170214173217.3qtf6fhiklhgsmi5@pd.tnic> <20170226040908.GB14810@x1> <20170303114349.krl6s5qfjmwz3mrg@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170303114349.krl6s5qfjmwz3mrg@pd.tnic> User-Agent: Mutt/1.7.0 (2016-08-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 03 Mar 2017 12:06:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/03/17 at 12:43pm, Borislav Petkov wrote: > On Sun, Feb 26, 2017 at 12:09:08PM +0800, Baoquan He wrote: > > Am I right on understanding it? > > That's exactly what I mean: KERNEL_IMAGE_SIZE is 512M by default but > we're not hard-constrained to it - we're hard-constrained to a 1G limit > as this is the 1G which is covered by level2_kernel_pgt. > > And in thinking about this more, I know I suggested making the > KERNEL_IMAGE_SIZE by default 1G in order to simplify things. > > But you're adding another KERNEL_MAPPING_SIZE which confuses things > more. And I fail to see why we absolutely need it. OK, I am trying to make things clearer, seems I failed. I thought kernel iamge size is only allowed to be 512M at most, but can be mapped into 1G region. > > So we suggest kernel image size should be 512M but then we still will > be using a whole 1G mapping for it anyway and a whole page of PMDs at > level2_kernel_pgt. > > So why even bother? > > Just make it 1G and don't introduce anything new. It's fine to me, thing can be solved anyway. Will repost with KERNEL_IMAGE_SIZE by default 1G. Thanks Baoquan