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

Re: [Xen-devel] [PATCH v2 02/25] arm/altp2m: Add HVMOP_altp2m_get_domain_state.



On 01/08/16 18:10, Sergej Proskurin wrote:
> diff --git a/xen/include/asm-arm/altp2m.h b/xen/include/asm-arm/altp2m.h
> index 0711796..d47b249 100644
> --- a/xen/include/asm-arm/altp2m.h
> +++ b/xen/include/asm-arm/altp2m.h
> @@ -22,6 +22,8 @@
>  
>  #include <xen/sched.h>
>  
> +#define altp2m_enabled(d) ((d)->arch.hvm_domain.params[HVM_PARAM_ALTP2M])

This macro expects to be used as a predicate, but may return non-boolean
values.  You should use
(!!(d)->arch.hvm_domain.params[HVM_PARAM_ALTP2M]) to make sure it is
strictly 1 or 0 being returned.

~Andrew

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