[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-cvs
Subject: [Xen-changelog] [xen stable-4.8] xen/arm: vgic: Make sure the number of SPIs is a multiple of 32
From: patchbot () xen ! org
Date: 2018-03-29 1:22:02
Message-ID: E1f1MGQ-0006iz-Ez () xenbits ! xenproject ! org
[Download RAW message or body]
commit e27fd5c0819b9289a7d1a4aeaaea8bd4e8e490af
Author: Julien Grall <julien.grall@arm.com>
AuthorDate: Fri Feb 16 14:59:56 2018 +0000
Commit: Stefano Stabellini <sstabellini@kernel.org>
CommitDate: Fri Mar 2 15:25:14 2018 -0800
xen/arm: vgic: Make sure the number of SPIs is a multiple of 32
The vGIC relies on having a pending_irq available for every IRQs
described in the ranks. As each rank describes 32 interrupts, we need to
make sure the number of SPIs is a multiple of 32.
Reported-by: Jeff Kubascik <Jeff.Kubascik@dornerworks.com>
Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Cc: Jarvis Roach <Jarvis.Roach@dornerworks.com>
(cherry picked from commit 23b40df6f098e3bcb2f105a4909860240976e40f)
---
xen/arch/arm/vgic.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
index ce3830bb9e..60af06805d 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -118,6 +118,13 @@ int domain_vgic_init(struct domain *d, unsigned int nr_spis)
d->arch.vgic.ctlr = 0;
+ /*
+ * The vGIC relies on having a pending_irq available for every IRQ
+ * described in the ranks. As each rank describes 32 interrupts, we
+ * need to make sure the number of SPIs is a multiple of 32.
+ */
+ nr_spis = ROUNDUP(nr_spis, 32);
+
/* Limit the number of virtual SPIs supported to (1020 - 32) = 988 */
if ( nr_spis > (1020 - NR_LOCAL_IRQS) )
return -EINVAL;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.8
_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xenproject.org
https://lists.xenproject.org/xen-changelog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic