xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/arm: Zeroed vgic ranks during the initialization
@ 2013-06-27 19:58 Julien Grall
  2013-06-28 10:43 ` Stefano Stabellini
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2013-06-27 19:58 UTC (permalink / raw)
  To: xen-devel; +Cc: patches, ian.campbell, Julien Grall, Stefano.Stabellini

vgic_rank contains data which inform the guest if an IRQ is
enabled/actived/pending...

The structure must be zeroed otherwise the guest can retrieve wrong GIC state.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/vgic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
index 7eaccb7..2e4b11f 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -88,7 +88,7 @@ int domain_vgic_init(struct domain *d)
         d->arch.vgic.nr_lines = 0; /* We don't need SPIs for the guest */
 
     d->arch.vgic.shared_irqs =
-        xmalloc_array(struct vgic_irq_rank, DOMAIN_NR_RANKS(d));
+        xzalloc_array(struct vgic_irq_rank, DOMAIN_NR_RANKS(d));
     d->arch.vgic.pending_irqs =
         xzalloc_array(struct pending_irq, d->arch.vgic.nr_lines);
     for (i=0; i<d->arch.vgic.nr_lines; i++)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen/arm: Zeroed vgic ranks during the initialization
  2013-06-27 19:58 [PATCH] xen/arm: Zeroed vgic ranks during the initialization Julien Grall
@ 2013-06-28 10:43 ` Stefano Stabellini
  2013-06-28 11:59   ` Ian Campbell
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Stabellini @ 2013-06-28 10:43 UTC (permalink / raw)
  To: Julien Grall; +Cc: Stefano.Stabellini, ian.campbell, patches, xen-devel

On Thu, 27 Jun 2013, Julien Grall wrote:
> vgic_rank contains data which inform the guest if an IRQ is
> enabled/actived/pending...
> 
> The structure must be zeroed otherwise the guest can retrieve wrong GIC state.
> 
> Signed-off-by: Julien Grall <julien.grall@linaro.org>

Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>


>  xen/arch/arm/vgic.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
> index 7eaccb7..2e4b11f 100644
> --- a/xen/arch/arm/vgic.c
> +++ b/xen/arch/arm/vgic.c
> @@ -88,7 +88,7 @@ int domain_vgic_init(struct domain *d)
>          d->arch.vgic.nr_lines = 0; /* We don't need SPIs for the guest */
>  
>      d->arch.vgic.shared_irqs =
> -        xmalloc_array(struct vgic_irq_rank, DOMAIN_NR_RANKS(d));
> +        xzalloc_array(struct vgic_irq_rank, DOMAIN_NR_RANKS(d));
>      d->arch.vgic.pending_irqs =
>          xzalloc_array(struct pending_irq, d->arch.vgic.nr_lines);
>      for (i=0; i<d->arch.vgic.nr_lines; i++)
> -- 
> 1.7.10.4
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen/arm: Zeroed vgic ranks during the initialization
  2013-06-28 10:43 ` Stefano Stabellini
@ 2013-06-28 11:59   ` Ian Campbell
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2013-06-28 11:59 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: Julien Grall, patches, xen-devel

On Fri, 2013-06-28 at 11:43 +0100, Stefano Stabellini wrote:
> On Thu, 27 Jun 2013, Julien Grall wrote:
> > vgic_rank contains data which inform the guest if an IRQ is
> > enabled/actived/pending...
> > 
> > The structure must be zeroed otherwise the guest can retrieve wrong GIC state.
> > 
> > Signed-off-by: Julien Grall <julien.grall@linaro.org>
> 
> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

Likewise + applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-28 11:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-27 19:58 [PATCH] xen/arm: Zeroed vgic ranks during the initialization Julien Grall
2013-06-28 10:43 ` Stefano Stabellini
2013-06-28 11:59   ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).