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

[Xen-devel] [PATCH v7 19/28] xen/arm: ITS: Store LPIs allocated per domain



From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>

Store number of lpis allocated per domain in vgic structure

Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>
---
v7: - Change commit message.
    - Store only nr_lpis per domain in vgic structure and drop
      id_bits.
---
 xen/arch/arm/vgic-v3-its.c   |    2 ++
 xen/arch/arm/vgic.c          |    1 +
 xen/include/asm-arm/domain.h |    1 +
 3 files changed, 4 insertions(+)

diff --git a/xen/arch/arm/vgic-v3-its.c b/xen/arch/arm/vgic-v3-its.c
index 3679d11..4285af3 100644
--- a/xen/arch/arm/vgic-v3-its.c
+++ b/xen/arch/arm/vgic-v3-its.c
@@ -843,6 +843,8 @@ int vits_domain_init(struct domain *d)
     ASSERT(is_hardware_domain(d));
     ASSERT(vits_hw.enabled);
 
+    d->arch.vgic.nr_lpis = gic_nr_irq_ids() - FIRST_GIC_LPI;
+
     d->arch.vgic.vits = xzalloc(struct vgic_its);
     if ( !d->arch.vgic.vits )
         return -ENOMEM;
diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
index baa74c7..a5ab99d9 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -75,6 +75,7 @@ int domain_vgic_init(struct domain *d, unsigned int nr_spis)
     int ret;
 
     d->arch.vgic.ctlr = 0;
+    d->arch.vgic.nr_lpis = 0;
 
     /* Limit the number of virtual SPIs supported to (1020 - 32) = 988  */
     if ( nr_spis > (1020 - NR_LOCAL_IRQS) )
diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h
index 0f2aa66..011f85b 100644
--- a/xen/include/asm-arm/domain.h
+++ b/xen/include/asm-arm/domain.h
@@ -92,6 +92,7 @@ struct arch_domain
         spinlock_t lock;
         int ctlr;
         int nr_spis; /* Number of SPIs */
+        int nr_lpis; /* Number of LPIs */
         unsigned long *allocated_irqs; /* bitmap of IRQs allocated */
         struct vgic_irq_rank *shared_irqs;
         /*
-- 
1.7.9.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.