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

Re: [Xen-devel] [PATCH v2 5/9] x86/pagewalk: Helpers for reserved bit handling



>>> On 24.03.17 at 06:45, <jgross@xxxxxxxx> wrote:
> On 23/03/17 18:35, Andrew Cooper wrote:
>> Would you prefer ~((uint64_t)_PAGE_PSE_PAT | (_PAGE_PSE_PAT - 1)) or
>> ~(_PAGE_PSE_PAT | (_PAGE_PSE_PAT - 1) | 0ULL)
> 
> Wouldn't it be better to just define the _PAGE_PSE bits accordingly?

I don't think that's a good idea, since the flags accessors deal with
unsigned int quantities (see {get,put}_pte_flags()), and there's no
need to promote these to 64 bit operations. Otherwise you'd also
have to e.g. ask for _PAGE_NX_BIT to be made 1ULL << 63 instead
of its current 1ULL << 23.

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®.