All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr <olekstysh@gmail.com>
To: Amit Singh Tomar <amittomer25@gmail.com>, xen-devel@lists.xenproject.org
Cc: andre.przywara@arm.com, julien.grall@arm.com, sstabellini@kernel.org
Subject: Re: [PATCH] xen/arm: Black list everything with a PPI
Date: Wed, 15 May 2019 21:54:58 +0300	[thread overview]
Message-ID: <60d23898-7e91-bb59-5bc8-b36d06452f28@gmail.com> (raw)
In-Reply-To: <1556902928-18682-1-git-send-email-amittomer25@gmail.com>


On 03.05.19 20:02, Amit Singh Tomar wrote:

Hi, Amit

> XEN should not forward PPIs to Dom0 as it only support SPIs.
> One of solution to this problem is to skip any device that
> uses PPI source completely while building domain itself.
>
> This patch goes through all the interrupt sources of device and skip it
> if one of interrupt source is PPI. It fixes XEN boot on i.MX8MQ by
> skipping PMU node.
>
> Suggested-by:  Julien Grall <julien.grall@arm.com>
> Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
> ---
>      * This replaces following patch.
>        https://patchwork.kernel.org/patch/10899881/
> ---
>   xen/arch/arm/domain_build.c | 16 +++++++++++++++-
>   1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index d983677..8f54472 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -1353,7 +1353,7 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
>           { /* sentinel */ },
>       };
>       struct dt_device_node *child;
> -    int res;
> +    int res, i, nirq, irq_id;
>       const char *name;
>       const char *path;
>   
> @@ -1399,6 +1399,20 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
>           return 0;
>       }
>   
> +    /* Skip the node, using PPI source */
> +    nirq = dt_number_of_irq(node);
> +
> +    for ( i = 0 ; i < nirq ; i++ )
> +    {
> +        irq_id = platform_get_irq(node, i);

Do we need to do something here if platform_get_irq() returns -1?

> +
> +        if ( irq_id >= 16 && irq_id < 32 )
> +        {
> +            dt_dprintk(" Skip node with (PPI source)\n");
> +            return 0;
> +        }
> +    }
> +
>       /*
>        * Xen is using some path for its own purpose. Warn if a node
>        * already exists with the same path.

Patch looks good. Although R-Car H3 seems to not use PPIs for PMU, I 
have tested your patch just to be sure it wouldn't skip anything by a 
mistake)


-- 
Regards,

Oleksandr Tyshchenko


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: Oleksandr <olekstysh@gmail.com>
To: Amit Singh Tomar <amittomer25@gmail.com>, xen-devel@lists.xenproject.org
Cc: andre.przywara@arm.com, julien.grall@arm.com, sstabellini@kernel.org
Subject: Re: [Xen-devel] [PATCH] xen/arm: Black list everything with a PPI
Date: Wed, 15 May 2019 21:54:58 +0300	[thread overview]
Message-ID: <60d23898-7e91-bb59-5bc8-b36d06452f28@gmail.com> (raw)
Message-ID: <20190515185458.tAM20B9GevHuerD2CuxubQj-LjF0lfAcjDW1dXbOjkw@z> (raw)
In-Reply-To: <1556902928-18682-1-git-send-email-amittomer25@gmail.com>


On 03.05.19 20:02, Amit Singh Tomar wrote:

Hi, Amit

> XEN should not forward PPIs to Dom0 as it only support SPIs.
> One of solution to this problem is to skip any device that
> uses PPI source completely while building domain itself.
>
> This patch goes through all the interrupt sources of device and skip it
> if one of interrupt source is PPI. It fixes XEN boot on i.MX8MQ by
> skipping PMU node.
>
> Suggested-by:  Julien Grall <julien.grall@arm.com>
> Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
> ---
>      * This replaces following patch.
>        https://patchwork.kernel.org/patch/10899881/
> ---
>   xen/arch/arm/domain_build.c | 16 +++++++++++++++-
>   1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index d983677..8f54472 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -1353,7 +1353,7 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
>           { /* sentinel */ },
>       };
>       struct dt_device_node *child;
> -    int res;
> +    int res, i, nirq, irq_id;
>       const char *name;
>       const char *path;
>   
> @@ -1399,6 +1399,20 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
>           return 0;
>       }
>   
> +    /* Skip the node, using PPI source */
> +    nirq = dt_number_of_irq(node);
> +
> +    for ( i = 0 ; i < nirq ; i++ )
> +    {
> +        irq_id = platform_get_irq(node, i);

Do we need to do something here if platform_get_irq() returns -1?

> +
> +        if ( irq_id >= 16 && irq_id < 32 )
> +        {
> +            dt_dprintk(" Skip node with (PPI source)\n");
> +            return 0;
> +        }
> +    }
> +
>       /*
>        * Xen is using some path for its own purpose. Warn if a node
>        * already exists with the same path.

Patch looks good. Although R-Car H3 seems to not use PPIs for PMU, I 
have tested your patch just to be sure it wouldn't skip anything by a 
mistake)


-- 
Regards,

Oleksandr Tyshchenko


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-05-15 18:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-03 17:02 [PATCH] xen/arm: Black list everything with a PPI Amit Singh Tomar
2019-05-03 17:02 ` [Xen-devel] " Amit Singh Tomar
2019-05-15 18:54 ` Oleksandr [this message]
2019-05-15 18:54   ` Oleksandr
2019-05-16 11:45   ` Amit Tomer
2019-05-16 11:45     ` [Xen-devel] " Amit Tomer
2019-05-16 13:17     ` Andre Przywara
2019-05-16 13:17       ` [Xen-devel] " Andre Przywara
2019-05-16 13:59       ` Julien Grall
2019-05-16 13:59         ` [Xen-devel] " Julien Grall
2019-05-29 17:47 ` Julien Grall
2019-05-29 17:47   ` [Xen-devel] " Julien Grall
2019-05-29 18:56   ` Amit Tomer
2019-05-29 18:56     ` [Xen-devel] " Amit Tomer
  -- strict thread matches above, loose matches on Subject: below --
2019-05-03 16:42 Amit Singh Tomar
2019-05-03 16:48 ` Amit Tomer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60d23898-7e91-bb59-5bc8-b36d06452f28@gmail.com \
    --to=olekstysh@gmail.com \
    --cc=amittomer25@gmail.com \
    --cc=andre.przywara@arm.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.