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

Re: [Xen-devel] [PATCH v4 08/16] xen/mem_access: Abstract architecture specific sanity check




On Fri, Sep 5, 2014 at 11:29 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>> On 05.09.14 at 10:58, <tklengyel@xxxxxxxxxxxxx> wrote:
> --- a/xen/include/asm-x86/p2m.h
> +++ b/xen/include/asm-x86/p2m.h
> @@ -625,6 +625,14 @@ static inline bool_t p2m_mem_event_sanity_check(struct domain *d)
>      return 1;
>  }
>
> +/* Sanity check for mem_access hardware support */
> +static inline bool_t p2m_mem_access_sanity_check(struct domain *d)
> +{
> +    if ( !is_hvm_domain(d) )
> +        return 0;
> +    return 1;
> +}

In line with the previous one - just "return is_hvm_domain(d);" or
even make this a #define.

Jan


Ack. I prefer static inlines over #defines, it's easier to see what input the function expects that way.

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