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

Re: [Xen-devel] [PATCH 1/3] x86/mm: drop guest_{map, get_eff}_l1e() hooks



At 14:41 +0000 on 05 Feb (1454683317), Andrew Cooper wrote:
> On 05/02/16 08:01, Jan Beulich wrote:
> > --- a/xen/arch/x86/mm/paging.c
> > +++ b/xen/arch/x86/mm/paging.c
> > @@ -844,6 +844,15 @@ void paging_final_teardown(struct domain
> >   * creation. */
> >  int paging_enable(struct domain *d, u32 mode)
> >  {
> > +    switch ( mode & (PG_external | PG_translate) )
> > +    {
> > +    case 0:
> > +    case PG_external | PG_translate:
> > +        break;
> > +    default:
> > +        return -EINVAL;
> > +    }
> 
> if ( (mode & PG_external) != (mode & PG_translate) )
>     return -EINVAL;
> 
> seems rather more concise.

If you do this, you may keep my reviewed-by, but please add the
necessary !!s to compare truth values rather than bits. 

Tim.

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


 


Rackspace

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