[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 02/12] arm/mem_access: Move PAGE_SHIFT_* macros to lib.h



>>> On 03.07.17 at 15:17, <proskurin@xxxxxxxxxxxxx> wrote:
> On 07/03/2017 11:13 AM, Jan Beulich wrote:
>>>>> On 03.07.17 at 10:40, <proskurin@xxxxxxxxxxxxx> wrote:
>>> On 06/27/2017 02:04 PM, Jan Beulich wrote:
>>>>>>> Sergej Proskurin <proskurin@xxxxxxxxxxxxx> 06/27/17 1:52 PM >>>
>>>>> The following commits introduce a software guest page table walk
>>>>> software implementation that supports varying guest page size
>>>>> granularities. This commit moves already existing PAGE_SHIFT_(4K|64K)
>>>>> and the new PAGE_SHIFT_16K defines to a common place in xen/lib.h as
>>>>> to allow the following commits to use the consolidated defines.
>>>> I don't think the PAGE_SHIFT_* should live far away from the other PAGE_*_*
>>>> macros derived from them. I'm also not convinced lib.h is a good place.
>>> I agree. I can move related PAGE_*_* from xen/iommu.h together with
>>> PAGE_SIZE_* macros into a common place. As we already define PAGE_*
>>> macros in asm/config.h, I believe it would make sense to extend these by
>>> the upper PAGE_*_* macros. What do you think?
>>>
>>> If you believe asm/config.h is a good place for the upper macros,
>> I don't, no: config.h should represent settings only, while here you
>> define constants which aren't necessarily properties of the system
>> the hypervisor is being built for.
>>
> 
> Right. Sorry, I additionally forgot that I took the macros away from a
> header accessible to other architectures as well.. So asm/config.h is
> definitely not the right choice. Alternatively, I thought of
> xen/paging.h, however this would generate a cyclic dependency in mm.h.
> What do you think about using a new header xen/page.h instead?

xen/page-sizes.h or xen/page-defs.h? I don't like page.h very much
because the per-arch headers of that name have a certain purpose
already, and as that's connected to actual page sizes in use on a
system I wouldn't want to see other page sizes to appear in a
header with that name. But if others think page.h is a good name, I
could live with it.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.