Hi Stefano,
On 07/08/2019 01:23, Stefano Stabellini wrote:
> Add a p2m_is_mmio macro for easy checkings.
>
> Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Cheers,
> ---
> xen/include/asm-arm/p2m.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
> index 03f2ee75c1..31902317da 100644
> --- a/xen/include/asm-arm/p2m.h
> +++ b/xen/include/asm-arm/p2m.h
> @@ -132,6 +132,11 @@ typedef enum {
> #define P2M_RAM_TYPES (p2m_to_mask(p2m_ram_rw) | \
> p2m_to_mask(p2m_ram_ro))
>
> +/* MMIO types */
> +#define P2M_MMIO_TYPES (p2m_to_mask(p2m_mmio_direct_dev) | \
> + p2m_to_mask(p2m_mmio_direct_nc) | \
> + p2m_to_mask(p2m_mmio_direct_c))
> +
> /* Grant mapping types, which map to a real frame in another VM */
> #define P2M_GRANT_TYPES (p2m_to_mask(p2m_grant_map_rw) | \
> p2m_to_mask(p2m_grant_map_ro))
> @@ -146,6 +151,7 @@ typedef enum {
> #define p2m_is_any_ram(_t) (p2m_to_mask(_t) & \
> (P2M_RAM_TYPES | P2M_GRANT_TYPES | \
> P2M_FOREIGN_TYPES))
> +#define p2m_is_mmio(_t) (p2m_to_mask(_t) & P2M_MMIO_TYPES)
>
> /* All common type definitions should live ahead of this inclusion. */
> #ifdef _XEN_P2M_COMMON_H
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel