Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932167AbdI0PTu (ORCPT ); Wed, 27 Sep 2017 11:19:50 -0400 Received: from smtp.ctxuk.citrix.com ([185.25.65.24]:44668 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753453AbdI0PTo (ORCPT ); Wed, 27 Sep 2017 11:19:44 -0400 X-IronPort-AV: E=Sophos;i="5.42,445,1500940800"; d="scan'208";a="53570926" Subject: Re: [Xen-devel] [PATCH v2] Call xen_cleanhighmap() with 4MB aligned for page tables mapping To: Juergen Gross , Boris Ostrovsky , Zhenzhong Duan , , , CC: , , , , References: <85bd42d5-b0d2-40f5-81a9-14cb51ec4503@default> <44ebc914-d1a3-06ac-9ec5-b866d5f04e0a@oracle.com> <9faf8d7b-227f-2ecd-26e6-44ae4270d469@suse.com> <30c5a1f0-4425-6c8b-5017-a78710c0bd72@suse.com> From: Andrew Cooper Message-ID: <20bfa071-3120-541b-79e6-5b465e8c2eff@citrix.com> Date: Wed, 27 Sep 2017 16:03:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <30c5a1f0-4425-6c8b-5017-a78710c0bd72@suse.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-GB X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1075 Lines: 22 On 27/09/17 15:56, Juergen Gross wrote: > On 27/09/17 16:48, Boris Ostrovsky wrote: >> On 09/27/2017 10:33 AM, Juergen Gross wrote: >>> On 27/09/17 15:38, Boris Ostrovsky wrote: >>>> On 09/27/2017 05:43 AM, Juergen Gross wrote: >>>>> On 27/09/17 11:41, Zhenzhong Duan wrote: >>>>>> When bootup a PVM guest with large memory(Ex.240GB), XEN provided initial >>>>>> mapping overlaps with kernel module virtual space. When mapping in this space >>>>>> is cleared by xen_cleanhighmap(), in certain case there could be an 2MB mapping >>>>>> left. This is due to XEN initialize 4MB aligned mapping but xen_cleanhighmap() >>>>>> finish at 2MB boundary. >>>> Does this mapping need to be 4MB-aligned? >>> I guess you are questioning the alignment of addr to be 4MB? >>> In this case you are right: the end of the mapping is 4MB aligned, as >>> correctly stated in the comment added. >> Yes, and my question is why does it need to be aligned on 4MB. Doesn't >> 2MB alignment suffice? > I believe this has historical reasons. :-) Back in the day, superpages had 4M alignment. ~Andrew