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

Re: [Xen-devel] [PATCH 1/2] x86: limit page type width



>>> On 31.05.17 at 09:14, <JBeulich@xxxxxxxx> wrote:
> There's no reason to burn 4 bits on page type when we only have 7 types
> (plus "none") at present. This requires changing one use of
> PGT_shared_page, which so far assumed that the type is both a power of
> 2 and the only type with the high bit set.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> --- a/xen/arch/x86/mm/mem_sharing.c
> +++ b/xen/arch/x86/mm/mem_sharing.c
> @@ -452,7 +452,7 @@ static int audit(void)
>          }
>  
>          /* Check if the MFN has correct type, owner and handle. */ 
> -        if ( !(pg->u.inuse.type_info & PGT_shared_page) )
> +        if ( (pg->u.inuse.type_info & PGT_type_mask) != PGT_shared_page )
>          {
>             MEM_SHARING_DEBUG("mfn %lx in audit list, but not PGT_shared_page 
> (%lx)!\n",
>                                mfn_x(mfn), pg->u.inuse.type_info & 
> PGT_type_mask);

Tamas,

I've noticed only now that I did forget to Cc you on the change
above (fixing a latent bug, which would otherwise become an
actual one with the other adjustments done here).

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