lkml.org 
[lkml]   [2017]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] Call xen_cleanhighmap() with 4MB aligned for page tables mapping
From
Date
On 09/27/2017 10:56 AM, 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. :-)
>
> For this patch the answer doesn't matter, as Xen does it this way and
> the kernel has to cope with the situation.
>
> This interface is specified in include/xen/interface/xen.h in the
> comment section just before struct start_info:
>
> /*
> * Start-of-day memory layout
> *
> * 1. The domain is started within contiguous virtual-memory region.
> * 2. The contiguous region begins and ends on an aligned 4MB boundary.

Ah, this is what I was really looking for --- that 4MB alignment is part
of the ABI.

-boris

\
 
 \ /
  Last update: 2017-09-27 17:04    [W:0.041 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site