[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 05/11] x86/altp2m: basic data structures and support routines.
>>> On 15.01.15 at 19:49, <edmund.h.white@xxxxxxxxx> wrote: > On 01/15/2015 08:53 AM, Jan Beulich wrote: >>>>> On 15.01.15 at 17:48, <tim@xxxxxxx> wrote: >>> At 13:26 -0800 on 09 Jan (1420806395), Ed White wrote: >>>> + /* Init alternate p2m data */ >>>> + if ( (d->arch.altp2m_eptp = alloc_xenheap_page()) == NULL ) >>>> + { >>>> + rv = -ENOMEM; >>>> + goto out; >>>> + } >>>> + for (i = 0; i < 512; i++) >>>> + d->arch.altp2m_eptp[i] = ~0ul; >>> >>> This 512 is architectural, I guess? It should have a named constant. >> >> Perhaps even calculated rather than just defined as a plain >> number constant, e.g. (PAGE_SIZE / sizeof(something)). > > There are architectural reasons why it's very unlikely to change > from 512, so I'll just name it if that's OK. Imo if it's a calculated value (like the number of page table entries in a page table page is), it should be defined like this. PAGE_SIZE and the appropriate sizeof() won't change either after all. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |