[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



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.

Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Definitely a good improvement.

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